mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 08:09:26 +02:00
fixed debugger working directory with -FE option
git-svn-id: trunk@7607 -
This commit is contained in:
parent
3029bd9362
commit
abe8ca8638
@ -55,8 +55,6 @@ type
|
||||
TOnPasteComponent = procedure(Sender: TObject; LookupRoot: TComponent;
|
||||
TxtCompStream: TStream; Parent: TWinControl;
|
||||
var NewComponent: TComponent) of object;
|
||||
TOnRemovePersistent = procedure(Sender: TObject; APersistent: TPersistent)
|
||||
of object;
|
||||
TOnPersistentDeleted = procedure(Sender: TObject; APersistent: TPersistent)
|
||||
of object;
|
||||
TOnGetNonVisualCompIcon = procedure(Sender: TObject;
|
||||
@ -104,7 +102,6 @@ type
|
||||
FOnPasteComponent: TOnPasteComponent;
|
||||
FOnProcessCommand: TOnProcessCommand;
|
||||
FOnPropertiesChanged: TNotifyEvent;
|
||||
FOnRemovePersistent: TOnRemovePersistent;
|
||||
FOnRenameComponent: TOnRenameComponent;
|
||||
FOnSetDesigning: TOnSetDesigning;
|
||||
FOnShowOptions: TNotifyEvent;
|
||||
@ -313,8 +310,6 @@ type
|
||||
write FOnPasteComponent;
|
||||
property OnPropertiesChanged: TNotifyEvent
|
||||
read FOnPropertiesChanged write FOnPropertiesChanged;
|
||||
property OnRemovePersistent: TOnRemovePersistent
|
||||
read FOnRemovePersistent write FOnRemovePersistent;
|
||||
property OnRenameComponent: TOnRenameComponent
|
||||
read FOnRenameComponent write FOnRenameComponent;
|
||||
property OnSetDesigning: TOnSetDesigning
|
||||
@ -1758,9 +1753,6 @@ begin
|
||||
IgnoreDeletingPersistent.Remove(APersistent);
|
||||
exit;
|
||||
end;
|
||||
// call RemoveComponent handler
|
||||
if Assigned(FOnRemovePersistent) then
|
||||
FOnRemovePersistent(Self,APersistent);
|
||||
// call component deleting handlers
|
||||
Hook:=GetPropertyEditorHook;
|
||||
if Hook<>nil then
|
||||
|
@ -4,7 +4,132 @@ Hints to cross compile under linux/xxxBSD
|
||||
|
||||
Thanks to Vincent Snijders for the hints.
|
||||
|
||||
================================================================================
|
||||
|
||||
A.
|
||||
for fpc 2.0 and up
|
||||
|
||||
The following steps don't need the root user. They can be done as normal user.
|
||||
|
||||
1. Download the fpc sources
|
||||
The binaries are not enough.
|
||||
See www.freepascal.org. You can use the svn or a daily snapshot.
|
||||
|
||||
For example:
|
||||
|
||||
[]$ mkdir freepascal
|
||||
[]$ cd freepascal
|
||||
[]$ svn co http://svn.freepascal.org/svn/fpc/trunk fpc
|
||||
[]$ svn co http://svn.freepascal.org/svn/fpcbuild/trunk/install install
|
||||
|
||||
For the following examples the fpc sources were downloaded to ~/sources/fpc.
|
||||
|
||||
|
||||
2. Download the binutils.
|
||||
For example binutils-2.14.tar.gz downloaded to
|
||||
~/download/binutils-2.14.tar.gz.
|
||||
|
||||
Homepage:
|
||||
http://www.gnu.org/software/binutils/
|
||||
Download
|
||||
http://ftp.gnu.org/gnu/binutils/
|
||||
At the time of writing the version was binutils-2.16.tar.gz.
|
||||
|
||||
For example:
|
||||
|
||||
[]$ cd download
|
||||
[]$ wget http://ftp.gnu.org/gnu/binutils/binutils-2.16.tar.gz
|
||||
|
||||
|
||||
3. Cross build binutils
|
||||
|
||||
In the fpc source directory there is a script to build the binutils for all
|
||||
cross platforms: install/cross/buildcrossbinutils
|
||||
Create a copy of the script:
|
||||
|
||||
[]$ cd ~/freepascal/install/cross/
|
||||
[]$ cp buildcrossbinutils buildcrossbinutils.sh
|
||||
|
||||
Edit the variables at the start of the new script.
|
||||
|
||||
The BASE variable points to a building and installation directory. So, it
|
||||
should be an empty directory. For example:
|
||||
|
||||
BASE=~/freepascal/binutils
|
||||
|
||||
Now the download file. If you downloaded ~/download/binutils-2.14.tar.gz then
|
||||
set
|
||||
BINUTILSPATH=~/download/
|
||||
BINUTILSBASE=binutils
|
||||
BINUTILSVERSION=2.14
|
||||
BINUTILS_GZIP=yes
|
||||
|
||||
The script will automatically connect this to ~/download/binutils-2.14.tar.gz.
|
||||
The rest variables define what target platforms you have. The default is to
|
||||
build quite a lot, so compilation will take some time (hours).
|
||||
For cross compile to windows, you need only
|
||||
|
||||
TARGETS_WIN="mingw32"
|
||||
|
||||
and to comment all other:
|
||||
|
||||
#BSD="freebsd netbsd openbsd"
|
||||
#TARGETS_WIN="cygwin mingw32 msdosdjgpp"
|
||||
#TARGETS_I386="${BSD} linux solaris darwin"
|
||||
#TARGETS_POWERPC="${BSD} linux darwin"
|
||||
#TARGETS_SPARC="${BSD} linux solaris"
|
||||
#TARGETS_M68k=
|
||||
|
||||
|
||||
Then run the script:
|
||||
|
||||
[]$ sh buildcrossbinutils.sh
|
||||
|
||||
The script creates a subdirectory 'logs' full of log files. If something goes
|
||||
wrong, start there. The scripts should end with a message 'Failed targets: '
|
||||
without failed targets.
|
||||
|
||||
|
||||
4. Cross build fpc
|
||||
|
||||
In the fpc source directory there is a script to build the fpc snapshot for
|
||||
all cross platforms: install/cross/buildcrosssnapshot
|
||||
Create a copy of the script:
|
||||
|
||||
[]$ cd ~/freepascal/install/cross/
|
||||
[]$ cp buildcrosssnapshot buildcrosssnapshot.sh
|
||||
|
||||
Edit the variables at the start of the new script.
|
||||
|
||||
Normally you will change at least CROSSTOOLSROOT, FPCCVS, TARGETS_OS
|
||||
and TARGETS_CPU. For example:
|
||||
|
||||
CROSSTOOLSROOT=~/freepascal/binutils/cross
|
||||
FPCCVS=~/freepascal/fpc
|
||||
TARGETS_OS="win32"
|
||||
TARGETS_CPU="i386"
|
||||
|
||||
And fix the line
|
||||
MOS=cygwin
|
||||
to
|
||||
MOS=mingw32
|
||||
|
||||
|
||||
Then run the script:
|
||||
|
||||
[]$ sh buildcrosssnapshot.sh
|
||||
|
||||
This will create the fpc binaries under
|
||||
~/freepascal/binutils/cross/destination/.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
================================================================================
|
||||
|
||||
|
||||
B.
|
||||
For fpc 1.0.x:
|
||||
|
||||
Hints to cross compile win32 binaries under linux
|
||||
@ -103,89 +228,4 @@ switch.
|
||||
|
||||
================================================================================
|
||||
|
||||
B.
|
||||
for fpc 1.9 and up
|
||||
|
||||
The following steps don't need the root user. They can be done as normal user.
|
||||
|
||||
1. Download the fpc sources
|
||||
The binaries are not enough.
|
||||
See www.freepascal.org. You can use the cvs or a daily snapshot.
|
||||
For the following examples the fpc sources were downloaded to ~/sources/fpc.
|
||||
|
||||
2. Download the binutils.
|
||||
For example binutils-2.14.tar.gz downloaded to
|
||||
~/download/binutils-2.14.tar.gz.
|
||||
|
||||
|
||||
3. Cross build binutils
|
||||
|
||||
In the fpc source directory there is a script to build the binutils for all
|
||||
cross platforms: install/cross/buildcrossbinutils
|
||||
Create a copy of the script:
|
||||
|
||||
[]$ cd ~/sources/fpc/install/cross/
|
||||
[]$ cp buildcrossbinutils buildcrossbinutils.sh
|
||||
|
||||
Edit the variables at the start of the new script.
|
||||
|
||||
The BASE variable points to a building and installation directory. So, it
|
||||
should be an empty directory. For example:
|
||||
BASE=~/cross_fpc
|
||||
|
||||
Now the download file. If you downloaded ~/download/binutils-2.14.tar.gz then
|
||||
set
|
||||
BINUTILSPATH=~/download/
|
||||
BINUTILSBASE=binutils
|
||||
BINUTILSVERSION=2.14
|
||||
BINUTILS_GZIP=yes
|
||||
|
||||
The script will automatically connect this to ~/download/binutils-2.14.tar.gz.
|
||||
The rest variables define what target platforms you have. The default is to
|
||||
build quite a lot, so compilation will take some time (hours).
|
||||
For cross compile to windows, you need only
|
||||
|
||||
TARGETS_WIN="mingw32"
|
||||
|
||||
and to comment all other:
|
||||
|
||||
#BSD="freebsd netbsd openbsd"
|
||||
#TARGETS_WIN="cygwin mingw32 msdosdjgpp"
|
||||
#TARGETS_I386="${BSD} linux solaris darwin"
|
||||
#TARGETS_POWERPC="${BSD} linux darwin"
|
||||
#TARGETS_SPARC="${BSD} linux solaris"
|
||||
#TARGETS_M68k=
|
||||
|
||||
|
||||
Then run the script:
|
||||
|
||||
[]$ sh buildcrossbinutils.sh
|
||||
|
||||
The script creates a subdirectory 'logs' full of log files. If something goes
|
||||
wrong, start there.
|
||||
|
||||
|
||||
4. Cross build fpc
|
||||
|
||||
In the fpc source directory there is a script to build the fpc snapshot for
|
||||
all cross platforms: install/cross/buildcrosssnapshot
|
||||
Create a copy of the script:
|
||||
|
||||
[]$ cd ~/sources/fpc/install/cross/
|
||||
[]$ cp buildcrosssnapshot buildcrosssnapshot.sh
|
||||
|
||||
Edit the variables at the start of the new script.
|
||||
|
||||
Normally you will change at least CROSSTOOLSROOT, FPCCVS, TARGETS_OS
|
||||
and TARGETS_CPU. For example:
|
||||
|
||||
CROSSTOOLSROOT=~/cross_fpc/cross
|
||||
FPCCVS=~/sources/fpc
|
||||
TARGETS_OS="win32"
|
||||
TARGETS_CPU="i386"
|
||||
|
||||
Then run the script:
|
||||
|
||||
[]$ sh buildcrosssnapshot.sh
|
||||
|
||||
|
||||
|
@ -1675,9 +1675,9 @@ begin
|
||||
|
||||
Project1.RunParameterOptions.AssignEnvironmentTo(FDebugger.Environment);
|
||||
NewWorkingDir:=Project1.RunParameterOptions.WorkingDirectory;
|
||||
if NewWorkingDir=''
|
||||
then NewWorkingDir:=Project1.ProjectDirectory;
|
||||
FDebugger.WorkingDir:=NewWorkingDir;
|
||||
if NewWorkingDir='' then
|
||||
NewWorkingDir:=ExtractFilePath(MainIDE.GetProjectTargetFilename);
|
||||
FDebugger.WorkingDir:=CleanAndExpandDirectory(NewWorkingDir);
|
||||
// set filename after workingdir
|
||||
FDebugger.FileName := LaunchingApplication;
|
||||
FDebugger.Arguments := LaunchingParams;
|
||||
|
@ -763,7 +763,7 @@ type
|
||||
|
||||
// methods for debugging, compiling and external tools
|
||||
function GetTestBuildDir: string; override;
|
||||
function GetProjectTargetFilename: string;
|
||||
function GetProjectTargetFilename: string; override;
|
||||
function GetTargetOS: string;
|
||||
function GetTestProjectFilename: string;
|
||||
function GetTestUnitFilename(AnUnitInfo: TUnitInfo): string; override;
|
||||
|
@ -157,6 +157,7 @@ type
|
||||
procedure DoCommand(EditorCommand: integer); virtual; abstract;
|
||||
|
||||
function GetTestBuildDir: string; virtual; abstract;
|
||||
function GetProjectTargetFilename: string; virtual; abstract;
|
||||
function GetTestUnitFilename(AnUnitInfo: TUnitInfo): string; virtual; abstract;
|
||||
function IsTestUnitFilename(const AFilename: string): boolean; virtual; abstract;
|
||||
function GetRunCommandLine: string; virtual; abstract;
|
||||
|
Loading…
Reference in New Issue
Block a user