IDE: compiler options: replaced obsolete -S mode flags with -M flag

git-svn-id: trunk@16144 -
This commit is contained in:
mattias 2008-08-19 12:16:28 +00:00
parent 12518f5618
commit 1e87ce80b9
11 changed files with 1078 additions and 993 deletions

View File

@ -504,7 +504,7 @@ procedure SaveXMLCompileReasons(const AConfig: TXMLConfig; const APath: String;
implementation implementation
const const
CompilerOptionsVersion = 5; CompilerOptionsVersion = 6;
Config_Filename = 'compileroptions.xml'; Config_Filename = 'compileroptions.xml';
function ParseString(Options: TParsedCompilerOptions; function ParseString(Options: TParsedCompilerOptions;
@ -1070,18 +1070,28 @@ begin
p:=Path+'Parsing/SyntaxOptions/' p:=Path+'Parsing/SyntaxOptions/'
else else
p:=Path+'SymantecChecking/'; p:=Path+'SymantecChecking/';
Delphi2Extensions := XMLConfigFile.GetValue(p+'D2Extensions/Value', true); if FileVersion<5 then begin
if XMLConfigFile.GetValue(p+'D2Extensions/Value', true) then
FSyntaxMode:='ObjFPC';
if XMLConfigFile.GetValue(p+'TPCompatible/Value', false) then
FSyntaxMode:='TP';
if XMLConfigFile.GetValue(p+'DelphiCompat/Value', false) then
FSyntaxMode:='Delphi';
if XMLConfigFile.GetValue(p+'GPCCompat/Value', false) then
FSyntaxMode:='GPC';
end else begin
FSyntaxMode:=XMLConfigFile.GetValue(p+'SyntaxMode/Value', '');
if FSyntaxMode='' then
FSyntaxMode:='ObjFPC';
end;
CStyleOperators := XMLConfigFile.GetValue(p+'CStyleOperator/Value', true); CStyleOperators := XMLConfigFile.GetValue(p+'CStyleOperator/Value', true);
IncludeAssertionCode := XMLConfigFile.GetValue(p+'IncludeAssertionCode/Value', false); IncludeAssertionCode := XMLConfigFile.GetValue(p+'IncludeAssertionCode/Value', false);
AllowLabel := XMLConfigFile.GetValue(p+'AllowLabel/Value', true); AllowLabel := XMLConfigFile.GetValue(p+'AllowLabel/Value', true);
CPPInline := XMLConfigFile.GetValue(p+'CPPInline/Value', true); CPPInline := XMLConfigFile.GetValue(p+'CPPInline/Value', true);
CStyleMacros := XMLConfigFile.GetValue(p+'CStyleMacros/Value', false); CStyleMacros := XMLConfigFile.GetValue(p+'CStyleMacros/Value', false);
TPCompatible := XMLConfigFile.GetValue(p+'TPCompatible/Value', false);
InitConstructor := XMLConfigFile.GetValue(p+'InitConstructor/Value', false); InitConstructor := XMLConfigFile.GetValue(p+'InitConstructor/Value', false);
StaticKeyword := XMLConfigFile.GetValue(p+'StaticKeyword/Value', false); StaticKeyword := XMLConfigFile.GetValue(p+'StaticKeyword/Value', false);
DelphiCompat := XMLConfigFile.GetValue(p+'DelphiCompat/Value', false);
UseAnsiStrings := XMLConfigFile.GetValue(p+'UseAnsiStrings/Value', false); UseAnsiStrings := XMLConfigFile.GetValue(p+'UseAnsiStrings/Value', false);
GPCCompat := XMLConfigFile.GetValue(p+'GPCCompat/Value', false);
{ CodeGeneration } { CodeGeneration }
p:=Path+'CodeGeneration/'; p:=Path+'CodeGeneration/';
@ -1221,18 +1231,15 @@ begin
{ Syntax Options } { Syntax Options }
p:=Path+'Parsing/SyntaxOptions/'; p:=Path+'Parsing/SyntaxOptions/';
XMLConfigFile.SetDeleteValue(p+'D2Extensions/Value', Delphi2Extensions,true); XMLConfigFile.SetDeleteValue(p+'SyntaxMode/Value', SyntaxMode,'ObjFPC');
XMLConfigFile.SetDeleteValue(p+'CStyleOperator/Value', CStyleOperators,true); XMLConfigFile.SetDeleteValue(p+'CStyleOperator/Value', CStyleOperators,true);
XMLConfigFile.SetDeleteValue(p+'IncludeAssertionCode/Value', IncludeAssertionCode,false); XMLConfigFile.SetDeleteValue(p+'IncludeAssertionCode/Value', IncludeAssertionCode,false);
XMLConfigFile.SetDeleteValue(p+'AllowLabel/Value', AllowLabel,true); XMLConfigFile.SetDeleteValue(p+'AllowLabel/Value', AllowLabel,true);
XMLConfigFile.SetDeleteValue(p+'CPPInline/Value', CPPInline,true); XMLConfigFile.SetDeleteValue(p+'CPPInline/Value', CPPInline,true);
XMLConfigFile.SetDeleteValue(p+'CStyleMacros/Value', CStyleMacros,false); XMLConfigFile.SetDeleteValue(p+'CStyleMacros/Value', CStyleMacros,false);
XMLConfigFile.SetDeleteValue(p+'TPCompatible/Value', TPCompatible,false);
XMLConfigFile.SetDeleteValue(p+'InitConstructor/Value', InitConstructor,false); XMLConfigFile.SetDeleteValue(p+'InitConstructor/Value', InitConstructor,false);
XMLConfigFile.SetDeleteValue(p+'StaticKeyword/Value', StaticKeyword,false); XMLConfigFile.SetDeleteValue(p+'StaticKeyword/Value', StaticKeyword,false);
XMLConfigFile.SetDeleteValue(p+'DelphiCompat/Value', DelphiCompat,false);
XMLConfigFile.SetDeleteValue(p+'UseAnsiStrings/Value', UseAnsiStrings,false); XMLConfigFile.SetDeleteValue(p+'UseAnsiStrings/Value', UseAnsiStrings,false);
XMLConfigFile.SetDeleteValue(p+'GPCCompat/Value', GPCCompat,false);
{ CodeGeneration } { CodeGeneration }
p:=Path+'CodeGeneration/'; p:=Path+'CodeGeneration/';
@ -1731,6 +1738,8 @@ end;
const MainSourceFilename: string; const MainSourceFilename: string;
Globals: TGlobalCompilerOptions; Globals: TGlobalCompilerOptions;
Flags: TCompilerCmdLineOptions): String; Flags: TCompilerCmdLineOptions): String;
Get all the options and create a string that can be passed to the compiler
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
function TBaseCompilerOptions.MakeOptionsString( function TBaseCompilerOptions.MakeOptionsString(
const MainSourceFilename: string; Globals: TGlobalCompilerOptions; const MainSourceFilename: string; Globals: TGlobalCompilerOptions;
@ -1756,147 +1765,210 @@ begin
switches := ''; switches := '';
{ Get all the options and create a string that can be passed to the compiler } { options of fpc 2.2.2 :
{ options of fpc 1.1 : Put + after a boolean switch option to enable it, - to disable it
-a The compiler doesn't delete the generated assembler file
put + after a boolean switch option to enable it, - to disable it -al List sourcecode lines in assembler file
-a the compiler doesn't delete the generated assembler file -an List node info in assembler file
-al list sourcecode lines in assembler file -ap Use pipes instead of creating temporary assembler files
-ar list register allocation/release info in assembler file -ar List register allocation/release info in assembler file
-at list temp allocation/release info in assembler file -at List temp allocation/release info in assembler file
-b generate browser info -A<x> Output format:
-bl generate local symbol info -Adefault Use default assembler
-B build all modules -Aas Assemble using GNU AS
-C<x> code generation options: -Anasmcoff COFF (Go32v2) file using Nasm
-CD create also dynamic library (not supported) -Anasmelf ELF32 (Linux) file using Nasm
-Anasmwin32Win32 object file using Nasm
-AnasmwdosxWin32/WDOSX object file using Nasm
-Awasm Obj file using Wasm (Watcom)
-Anasmobj Obj file using Nasm
-Amasm Obj file using Masm (Microsoft)
-Atasm Obj file using Tasm (Borland)
-Aelf ELF (Linux) using internal writer
-Acoff COFF (Go32v2) using internal writer
-Apecoff PE-COFF (Win32) using internal writer
-b Generate browser info
-bl Generate local symbol info
-B Build all modules
-C<x> Code generation options:
-Cc<x> Set default calling convention to <x>
-CD Create also dynamic library (not supported)
-Ce Compilation with emulated floating point opcodes -Ce Compilation with emulated floating point opcodes
-Cf<x> Select fpu instruction set to use, see fpc -i for possible values
-CF<x> Minimal floating point constant precision (default, 32, 64)
-Cg Generate PIC code
-Ch<n> <n> bytes heap (between 1023 and 67107840) -Ch<n> <n> bytes heap (between 1023 and 67107840)
-Ci IO-checking -Ci IO-checking
-Cn omit linking stage -Cn Omit linking stage
-Co check overflow of integer operations -Co Check overflow of integer operations
-Cr range checking -CO Check for possible overflow of integer operations
-CR verify object method call validity -Cp<x> Select instruction set, see fpc -i for possible values
-Cs<n> set stack size to <n> -CP<x>=<y> packing settings
-Ct stack checking -CPPACKSET=<y> <y> set allocation: 0, 1 or DEFAULT or NORMAL, 2, 4 and 8
-CX create also smartlinked library -Cr Range checking
-d<x> defines the symbol <x> -CR Verify object method call validity
-e<x> set path to executable -Cs<n> Set stack size to <n>
-E same as -Cn -Ct Stack checking
-F<x> set file names and paths: -CX Create also smartlinked library
-FD<x> sets the directory where to search for compiler utilities -d<x> Defines the symbol <x>
-Fe<x> redirect error output to <x> -D Generate a DEF file
-FE<x> set exe/unit output path to <x> -Dd<x> Set description to <x>
-Fi<x> adds <x> to include path -Dv<x> Set DLL version to <x>
-Fl<x> adds <x> to library path -e<x> Set path to executable
-FL<x> uses <x> as dynamic linker -E Same as -Cn
-Fo<x> adds <x> to object path -fPIC Same as -Cg
-Fr<x> load error message file <x> -F<x> Set file names and paths:
-Fu<x> adds <x> to unit path -Fa<x>[,y] (for a program) load units <x> and [y] before uses is parsed
-FU<x> set unit output path to <x>, overrides -FE -Fc<x> Set input codepage to <x>
-g generate debugger information: -FC<x> Set RC compiler binary name to <x>
-gg use gsym -FD<x> Set the directory where to search for compiler utilities
-gd use dbx -Fe<x> Redirect error output to <x>
-gh use heap trace unit (for memory leak debugging) -Ff<x> Add <x> to framework path (Darwin only)
-gl use line info unit to show more info for backtraces -FE<x> Set exe/unit output path to <x>
-gc generate checks for pointers -Fi<x> Add <x> to include path
-i information -Fl<x> Add <x> to library path
-iD return compiler date -FL<x> Use <x> as dynamic linker
-iV return compiler version -Fm<x> Load unicode conversion table from <x>.txt in the compiler dir
-iSO return compiler OS -Fo<x> Add <x> to object path
-iSP return compiler processor -Fr<x> Load error message file <x>
-iTO return target OS -FR<x> Set resource (.res) linker to <x>
-iTP return target processor -Fu<x> Add <x> to unit path
-I<x> adds <x> to include path -FU<x> Set unit output path to <x>, overrides -FE
-g Generate debug information (default format for target)
-gc Generate checks for pointers
-gh Use heaptrace unit (for memory leak/corruption debugging)
-gl Use line info unit (show more info with backtraces)
-go<x> Set debug information options
-godwarfsets Enable Dwarf set debug information (breaks gdb < 6.5)
-gp Preserve case in stabs symbol names
-gs Generate stabs debug information
-gt Trash local variables (to detect uninitialized uses)
-gv Generates programs traceable with valgrind
-gw Generate dwarf-2 debug information (same as -gw2)
-gw2 Generate dwarf-2 debug information
-gw3 Generate dwarf-3 debug information
-i Information
-iD Return compiler date
-iV Return short compiler version
-iW Return full compiler version
-iSO Return compiler OS
-iSP Return compiler host processor
-iTO Return target OS
-iTP Return target processor
-I<x> Add <x> to include path
-k<x> Pass <x> to the linker -k<x> Pass <x> to the linker
-l write logo -l Write logo
-n don't read the default config file -M<x> Set language mode to <x>
-o<x> change the name of the executable produced to <x> -Mfpc Free Pascal dialect (default)
-pg generate profile code for gprof (defines FPC_PROFILE) -Mobjfpc FPC mode with Object Pascal support
-P use pipes instead of creating temporary assembler files -Mdelphi Delphi 7 compatibility mode
-S<x> syntax options: -Mtp TP/BP 7.0 compatibility mode
-S2 switch some Delphi 2 extensions on -Mmacpas Macintosh Pascal dialects compatibility mode
-Sc supports operators like C (*=,+=,/= and -=) -n Do not read the default config files
-Sa include assertion code. -N<x> Node tree optimizations
-Sd tries to be Delphi compatible -Nu Unroll loops
-Se<x> compiler stops after the <x> errors (default is 1) -o<x> Change the name of the executable produced to <x>
-Sg allow LABEL and GOTO -O<x> Optimizations:
-Sh Use ansistrings -O- Disable optimizations
-Si support C++ styled INLINE -O1 Level 1 optimizations (quick and debugger friendly)
-Sm support macros like C (global) -O2 Level 2 optimizations (-O1 + quick optimizations)
-So tries to be TP/BP 7.0 compatible -O3 Level 3 optimizations (-O2 + slow optimizations)
-Sp tries to be gpc compatible -Oa<x>=<y> Set alignment
-Ss constructor name must be init (destructor must be done) -Oo[NO]<x> Enable or disable optimizations, see fpc -i for possible values
-St allow static keyword in objects -Op<x> Set target cpu for optimizing, see fpc -i for possible values
-s don't call assembler and linker (only with -a) -Os Optimize for size rather than speed
-st Generate script to link on target -pg Generate profile code for gprof (defines FPC_PROFILE)
-R<x> Assembler reading style:
-Rdefault Use default assembler for target
-Ratt Read AT&T style assembler
-Rintel Read Intel style assembler
-S<x> Syntax options:
-S2 Same as -Mobjfpc
-Sc Support operators like C (*=,+=,/= and -=)
-Sa Turn on assertions
-Sd Same as -Mdelphi
-Se<x> Error options. <x> is a combination of the following:
<n> : Compiler halts after the <n> errors (default is 1)
w : Compiler also halts after warnings
n : Compiler also halts after notes
h : Compiler also halts after hints
-Sg Enable LABEL and GOTO (default in -Mtp and -Mdelphi)
-Sh Use ansistrings by default instead of shortstrings
-Si Turn on inlining of procedures/functions declared as "inline"
-Sk Load fpcylix unit
-SI<x> Set interface style to <x>
-SIcom COM compatible interface (default)
-SIcorba CORBA compatible interface
-Sm Support macros like C (global)
-So Same as -Mtp
-Ss Constructor name must be init (destructor must be done)
-St Allow static keyword in objects
-Sx Enable exception keywords (default in Delphi/ObjFPC modes)
-s Do not call assembler and linker
-sh Generate script to link on host -sh Generate script to link on host
-u<x> undefines the symbol <x> -st Generate script to link on target
-U unit options: -sr Skip register allocation phase (use with -alr)
-Un don't check the unit name -T<x> Target operating system:
-Ur generate release unit files -Temx OS/2 via EMX (including EMX/RSX extender)
-Us compile a system unit -Tfreebsd FreeBSD
-Tgo32v2 Version 2 of DJ Delorie DOS extender
-Tlinux Linux
-Tnetbsd NetBSD
-Tnetware Novell Netware Module (clib)
-Tnetwlibc Novell Netware Module (libc)
-Topenbsd OpenBSD
-Tos2 OS/2 / eComStation
-Tsunos SunOS/Solaris
-Tsymbian Symbian OS
-Twatcom Watcom compatible DOS extender
-Twdosx WDOSX DOS extender
-Twin32 Windows 32 Bit
-Twince Windows CE
-u<x> Undefines the symbol <x>
-U Unit options:
-Un Do not check where the unit name matches the file name
-Ur Generate release unit files (never automatically recompiled)
-Us Compile a system unit
-v<x> Be verbose. <x> is a combination of the following letters: -v<x> Be verbose. <x> is a combination of the following letters:
e : Show errors (default) d : Show debug info e : Show errors (default) 0 : Show nothing (except errors)
w : Show warnings u : Show unit info w : Show warnings u : Show unit info
n : Show notes t : Show tried/used files n : Show notes t : Show tried/used files
h : Show hints m : Show defined macros h : Show hints c : Show conditionals
i : Show general info p : Show compiled procedures i : Show general info d : Show debug info
l : Show linenumbers c : Show conditionals l : Show linenumbers r : Rhide/GCC compatibility mode
a : Show everything 0 : Show nothing (except errors) a : Show everything x : Executable info (Win32 only)
b : Show all procedure r : Rhide/GCC compatibility mode b : Write file names messages with full path
declarations if an error x : Executable info (Win32 only) v : Write fpcdebug.txt with p : Write tree.log with parse tree
occurs lots of debugging info
-V write fpcdebug.txt file with lots of debugging info -W<x> Target-specific options (targets)
-X executable options: -Wb Create a bundle instead of a library (Darwin)
-Xc link with the c library -WB Create a relocatable image (Windows)
-Xs strip all symbols from executable -WC Specify console type application (EMX, OS/2, Windows)
-XD try to link dynamic (defines FPC_LINK_DYNAMIC) -WD Use DEFFILE to export functions of DLL or EXE (Windows)
-XS try to link static (default) (defines FPC_LINK_STATIC) -WF Specify full-screen type application (EMX, OS/2)
-XX try to link smart (defines FPC_LINK_SMART) -WG Specify graphic type application (EMX, OS/2, Windows)
-WN Do not generate relocation code, needed for debugging (Windows)
-WR Generate relocation code (Windows)
-X Executable options:
-Xc Pass --shared/-dynamic to the linker (BeOS, Darwin, FreeBSD, Linux)
-Xd Do not use standard library search path (needed for cross compile)
-Xe Use external linker
-Xg Create debuginfo in a separate file and add a debuglink section to executable
-XD Try to link units dynamically (defines FPC_LINK_DYNAMIC)
-Xi Use internal linker
-Xm Generate link map
-XM<x> Set the name of the 'main' program routine (default is 'main')
-XP<x> Prepend the binutils names with the prefix <x>
-Xr<x> Set library search path to <x> (needed for cross compile) (BeOS, Linux)
-XR<x> Prepend <x> to all linker search paths (BeOS, Darwin, FreeBSD, Linux, Mac OS, Solaris)
-Xs Strip all symbols from executable
-XS Try to link units statically (default, defines FPC_LINK_STATIC)
-Xt Link with static libraries (-static is passed to linker)
-XX Try to smartlink units (defines FPC_LINK_SMART)
Processor specific options: -? Show this help
-A<x> output format: -h Shows this help without waiting
-Aas assemble using GNU AS
-Anasmcoff coff (Go32v2) file using Nasm
-Anasmelf elf32 (Linux) file using Nasm
-Anasmobj obj file using Nasm
-Amasm obj file using Masm (Microsoft)
-Atasm obj file using Tasm (Borland)
-Acoff coff (Go32v2) using internal writer
-Apecoff pecoff (Win32) using internal writer
-R<x> assembler reading style:
-Ratt read AT&T style assembler
-Rintel read Intel style assembler
-Rdirect copy assembler text directly to assembler file
-O<x> optimizations:
-Og generate smaller code
-OG generate faster code (default)
-Or keep certain variables in registers
-Ou enable uncertain optimizations (see docs)
-O1 level 1 optimizations (quick optimizations)
-O2 level 2 optimizations (-O1 + slower optimizations)
-O3 level 3 optimizations (-O2 repeatedly, max 5 times)
-Op<x> target processor:
-Op1 set target processor to 386/486
-Op2 set target processor to Pentium/PentiumMMX (tm)
-Op3 set target processor to PPro/PII/c6x86/K6 (tm)
-T<x> Target operating system:
-TGO32V2 version 2 of DJ Delorie DOS extender
- 3*2TWDOSX DOS 32 Bit Extender
-TLINUX Linux
-Tnetware Novell Netware Module (experimental)
-TOS2 OS/2 2.x
-TSUNOS SunOS/Solaris
-TWin32 Windows 32 Bit
-W<x> Win32 target options
-WB<x> Set Image base to Hexadecimal <x> value
-WC Specify console type application
-WD Use DEFFILE to export functions of DLL or EXE
-WF Specify full-screen type application (OS/2 only)
-WG Specify graphic type application
-WN Do not generate relocation code (necessary for debugging)
-WR Generate relocation code
} }
@ -1910,55 +1982,10 @@ Processor specific options:
3: switches := switches + '-Rdirect'; 3: switches := switches + '-Rdirect';
end; end;
{ Syntax Options // Syntax Options
-S2 switch some Delphi 2 extensions on
-Sc supports operators like C (*=,+=,/= and -=)
-sa include assertion code.
-Sd tries to be Delphi compatible
-Se<x> compiler stops after the <x> errors (default is 1)
-Sg allow LABEL and GOTO
-Sh Use ansistrings
-Si support C++ styled INLINE
-Sm support macros like C (global)
-So tries to be TP/BP 7.0 compatible
-Sp tries to be gpc compatible
-Ss constructor name must be init (destructor must be done)
-St allow static keyword in objects
}
tempsw := '';
if (Delphi2Extensions) then
tempsw := tempsw + '2';
if (CStyleOperators) then
tempsw := tempsw + 'c';
if (IncludeAssertionCode) then
tempsw := tempsw + 'a';
if (DelphiCompat) then
tempsw := tempsw + 'd';
if (AllowLabel) then
tempsw := tempsw + 'g';
if (UseAnsiStrings) then
tempsw := tempsw + 'h';
if (CPPInline) then
tempsw := tempsw + 'i';
if (CStyleMacros) then
tempsw := tempsw + 'm';
if (TPCompatible) then
tempsw := tempsw + 'o';
if (GPCCompat) then
tempsw := tempsw + 'p';
if (InitConstructor) then
tempsw := tempsw + 's';
if (StaticKeyword) then
tempsw := tempsw + 't';
if (tempsw <> '') then begin
tempsw := '-S' + tempsw;
switches := switches + ' ' + tempsw;
end;
tempsw:=GetSyntaxOptionsString; tempsw:=GetSyntaxOptionsString;
if (tempsw <> '') then
switches := switches + ' ' + tempsw;
{ TODO: Implement the following switches. They need to be added { TODO: Implement the following switches. They need to be added
to the dialog. } to the dialog. }
@ -2303,10 +2330,8 @@ var
begin begin
{ Syntax Options { Syntax Options
-S<x> Syntax options: -S<x> Syntax options:
-S2 Same as -Mobjfpc
-Sc Support operators like C (*=,+=,/= and -=) -Sc Support operators like C (*=,+=,/= and -=)
-Sa Turn on assertions -Sa Turn on assertions
-Sd Same as -Mdelphi
-Se<x> Error options. <x> is a combination of the following: -Se<x> Error options. <x> is a combination of the following:
<n> : Compiler halts after the <n> errors (default is 1) <n> : Compiler halts after the <n> errors (default is 1)
w : Compiler also halts after warnings w : Compiler also halts after warnings
@ -2320,21 +2345,24 @@ begin
-SIcom COM compatible interface (default) -SIcom COM compatible interface (default)
-SIcorba CORBA compatible interface -SIcorba CORBA compatible interface
-Sm Support macros like C (global) -Sm Support macros like C (global)
-So Same as -Mtp
-Ss Constructor name must be init (destructor must be done) -Ss Constructor name must be init (destructor must be done)
-St Allow static keyword in objects -St Allow static keyword in objects
-Sx Enable exception keywords (default in Delphi/ObjFPC modes) -Sx Enable exception keywords (default in Delphi/ObjFPC modes)
-M<x> Set language mode to <x>
-Mfpc Free Pascal dialect (default)
-Mobjfpc FPC mode with Object Pascal support
-Mdelphi Delphi 7 compatibility mode
-Mtp TP/BP 7.0 compatibility mode
-Mmacpas Macintosh Pascal dialects compatibility mode
} }
tempsw := ''; tempsw := '';
if (Delphi2Extensions) then
tempsw := tempsw + '2';
if (CStyleOperators) then if (CStyleOperators) then
tempsw := tempsw + 'c'; tempsw := tempsw + 'c';
if (IncludeAssertionCode) then if (IncludeAssertionCode) then
tempsw := tempsw + 'a'; tempsw := tempsw + 'a';
if (DelphiCompat) then
tempsw := tempsw + 'd';
if (AllowLabel) then if (AllowLabel) then
tempsw := tempsw + 'g'; tempsw := tempsw + 'g';
if (UseAnsiStrings) then if (UseAnsiStrings) then
@ -2343,10 +2371,6 @@ begin
tempsw := tempsw + 'i'; tempsw := tempsw + 'i';
if (CStyleMacros) then if (CStyleMacros) then
tempsw := tempsw + 'm'; tempsw := tempsw + 'm';
if (TPCompatible) then
tempsw := tempsw + 'o';
if (GPCCompat) then
tempsw := tempsw + 'p';
if (InitConstructor) then if (InitConstructor) then
tempsw := tempsw + 's'; tempsw := tempsw + 's';
if (StaticKeyword) then if (StaticKeyword) then
@ -2356,6 +2380,12 @@ begin
Result := '-S' + tempsw Result := '-S' + tempsw
else else
Result:=''; Result:='';
if SyntaxMode<>'' then begin
if Result<>'' then
Result:=Result+' ';
Result:=Result+'-M'+SyntaxMode;
end;
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
@ -2393,19 +2423,16 @@ begin
fLCLWidgetType := ''; fLCLWidgetType := '';
// parsing // parsing
FSyntaxMode:='ObjFPC';
fAssemblerStyle := 0; fAssemblerStyle := 0;
fDelphi2Ext := true;
fCStyleOp := true; fCStyleOp := true;
fIncludeAssertionCode := false; fIncludeAssertionCode := false;
fAllowLabel := true; fAllowLabel := true;
fCPPInline := true; fCPPInline := true;
fCMacros := false; fCMacros := false;
fTPCompat := false;
fInitConst := false; fInitConst := false;
fStaticKeyword := false; fStaticKeyword := false;
fDelphiCompat := false;
fUseAnsiStr := false; fUseAnsiStr := false;
fGPCCompat := false;
// code generation // code generation
fSmartLinkUnit := false; fSmartLinkUnit := false;
@ -2497,19 +2524,16 @@ begin
DebugPath := CompOpts.DebugPath; DebugPath := CompOpts.DebugPath;
// Parsing // Parsing
FSyntaxMode := CompOpts.FSyntaxMode;
fAssemblerStyle := CompOpts.fAssemblerStyle; fAssemblerStyle := CompOpts.fAssemblerStyle;
fDelphi2Ext := CompOpts.fDelphi2Ext;
fCStyleOp := CompOpts.fCStyleOp; fCStyleOp := CompOpts.fCStyleOp;
fIncludeAssertionCode := CompOpts.fIncludeAssertionCode; fIncludeAssertionCode := CompOpts.fIncludeAssertionCode;
fAllowLabel := CompOpts.fAllowLabel; fAllowLabel := CompOpts.fAllowLabel;
fCPPInline := CompOpts.fCPPInline; fCPPInline := CompOpts.fCPPInline;
fCMacros := CompOpts.fCMacros; fCMacros := CompOpts.fCMacros;
fTPCompat := CompOpts.fTPCompat;
fInitConst := CompOpts.fInitConst; fInitConst := CompOpts.fInitConst;
fStaticKeyword := CompOpts.fStaticKeyword; fStaticKeyword := CompOpts.fStaticKeyword;
fDelphiCompat := CompOpts.fDelphiCompat;
fUseAnsiStr := CompOpts.fUseAnsiStr; fUseAnsiStr := CompOpts.fUseAnsiStr;
fGPCCompat := CompOpts.fGPCCompat;
// Code Generation // Code Generation
fSmartLinkUnit := CompOpts.SmartLinkUnit; fSmartLinkUnit := CompOpts.SmartLinkUnit;
@ -2630,19 +2654,16 @@ begin
// parsing // parsing
Tool.Path:='Parsing'; Tool.Path:='Parsing';
Tool.AddDiff('SyntaxMode',FSyntaxMode,CompOpts.FSyntaxMode);
Tool.AddDiff('AssemblerStyle',fAssemblerStyle,CompOpts.fAssemblerStyle); Tool.AddDiff('AssemblerStyle',fAssemblerStyle,CompOpts.fAssemblerStyle);
Tool.AddDiff('Delphi2Ext',fDelphi2Ext,CompOpts.fDelphi2Ext);
Tool.AddDiff('CStyleOp',fCStyleOp,CompOpts.fCStyleOp); Tool.AddDiff('CStyleOp',fCStyleOp,CompOpts.fCStyleOp);
Tool.AddDiff('IncludeAssertionCode',fIncludeAssertionCode,CompOpts.fIncludeAssertionCode); Tool.AddDiff('IncludeAssertionCode',fIncludeAssertionCode,CompOpts.fIncludeAssertionCode);
Tool.AddDiff('AllowLabel',fAllowLabel,CompOpts.fAllowLabel); Tool.AddDiff('AllowLabel',fAllowLabel,CompOpts.fAllowLabel);
Tool.AddDiff('CPPInline',fCPPInline,CompOpts.fCPPInline); Tool.AddDiff('CPPInline',fCPPInline,CompOpts.fCPPInline);
Tool.AddDiff('CMacros',fCMacros,CompOpts.fCMacros); Tool.AddDiff('CMacros',fCMacros,CompOpts.fCMacros);
Tool.AddDiff('TPCompat',fTPCompat,CompOpts.fTPCompat);
Tool.AddDiff('InitConst',fInitConst,CompOpts.fInitConst); Tool.AddDiff('InitConst',fInitConst,CompOpts.fInitConst);
Tool.AddDiff('StaticKeyword',fStaticKeyword,CompOpts.fStaticKeyword); Tool.AddDiff('StaticKeyword',fStaticKeyword,CompOpts.fStaticKeyword);
Tool.AddDiff('DelphiCompat',fDelphiCompat,CompOpts.fDelphiCompat);
Tool.AddDiff('UseAnsiStr',fUseAnsiStr,CompOpts.fUseAnsiStr); Tool.AddDiff('UseAnsiStr',fUseAnsiStr,CompOpts.fUseAnsiStr);
Tool.AddDiff('GPCCompat',fGPCCompat,CompOpts.fGPCCompat);
// code generation // code generation
Tool.Path:='Code'; Tool.Path:='Code';

View File

@ -11,7 +11,6 @@ object frmCompilerOptions: TfrmCompilerOptions
Constraints.MinHeight = 500 Constraints.MinHeight = 500
Constraints.MinWidth = 600 Constraints.MinWidth = 600
OnClose = frmCompilerOptionsClose OnClose = frmCompilerOptionsClose
OnResize = FormResize
Position = poScreenCenter Position = poScreenCenter
LCLVersion = '0.9.25' LCLVersion = '0.9.25'
object MainNotebook: TNotebook object MainNotebook: TNotebook
@ -24,13 +23,13 @@ object frmCompilerOptions: TfrmCompilerOptions
TabOrder = 0 TabOrder = 0
object PathPage: TPage object PathPage: TPage
Caption = 'PathPage' Caption = 'PathPage'
ClientWidth = 665 ClientWidth = 667
ClientHeight = 449 ClientHeight = 453
object lblOtherUnits: TLabel object lblOtherUnits: TLabel
Left = 6 Left = 6
Height = 20 Height = 20
Top = 6 Top = 6
Width = 653 Width = 655
Align = alTop Align = alTop
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Top = 6 BorderSpacing.Top = 6
@ -130,7 +129,7 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 23 Height = 23
Top = 26 Top = 26
Width = 653 Width = 655
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Right = 6 BorderSpacing.Right = 6
@ -147,7 +146,7 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 23 Height = 23
Top = 75 Top = 75
Width = 653 Width = 655
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Right = 6 BorderSpacing.Right = 6
@ -164,7 +163,7 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 23 Height = 23
Top = 124 Top = 124
Width = 653 Width = 655
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Right = 6 BorderSpacing.Right = 6
@ -181,7 +180,7 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 23 Height = 23
Top = 173 Top = 173
Width = 653 Width = 655
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Right = 6 BorderSpacing.Right = 6
@ -198,7 +197,7 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 23 Height = 23
Top = 222 Top = 222
Width = 653 Width = 655
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Right = 6 BorderSpacing.Right = 6
@ -215,7 +214,7 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 23 Height = 23
Top = 271 Top = 271
Width = 653 Width = 655
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Right = 6 BorderSpacing.Right = 6
@ -241,13 +240,13 @@ object frmCompilerOptions: TfrmCompilerOptions
end end
object ParsingPage: TPage object ParsingPage: TPage
Caption = 'ParsingPage' Caption = 'ParsingPage'
ClientWidth = 665 ClientWidth = 667
ClientHeight = 449 ClientHeight = 453
object grpAsmStyle: TRadioGroup object grpAsmStyle: TRadioGroup
Left = 6 Left = 6
Height = 40 Height = 40
Top = 6 Top = 6
Width = 653 Width = 655
Align = alTop Align = alTop
AutoFill = True AutoFill = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
@ -267,7 +266,7 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 258 Height = 258
Top = 52 Top = 52
Width = 653 Width = 655
Align = alTop Align = alTop
AutoFill = True AutoFill = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
@ -280,14 +279,38 @@ object frmCompilerOptions: TfrmCompilerOptions
ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
OnItemClick = grpSyntaxOptionsItemClick
TabOrder = 1 TabOrder = 1
end end
object grpSyntaxMode: TGroupBox
Left = 6
Height = 60
Top = 316
Width = 655
Align = alTop
AutoSize = True
BorderSpacing.Around = 6
Caption = 'grpSyntaxMode'
ClientHeight = 41
ClientWidth = 651
TabOrder = 2
object cmbSyntaxMode: TComboBox
Left = 6
Height = 29
Top = 6
Width = 337
Align = alLeft
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
BorderSpacing.Around = 6
MaxLength = 0
TabOrder = 0
Text = 'cmbSyntaxMode'
end
end
end end
object CodeGenPage: TPage object CodeGenPage: TPage
Caption = 'CodeGenPage' Caption = 'CodeGenPage'
ClientWidth = 665 ClientWidth = 667
ClientHeight = 449 ClientHeight = 453
object grpSmartLinkUnit: TGroupBox object grpSmartLinkUnit: TGroupBox
AnchorSideLeft.Control = grpChecks AnchorSideLeft.Control = grpChecks
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
@ -298,21 +321,21 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 174 Left = 174
Height = 53 Height = 53
Top = 6 Top = 6
Width = 485 Width = 487
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
AutoSize = True AutoSize = True
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Top = 6 BorderSpacing.Top = 6
BorderSpacing.Right = 6 BorderSpacing.Right = 6
Caption = 'grpSmartLinkUnit' Caption = 'grpSmartLinkUnit'
ClientHeight = 34 ClientHeight = 49
ClientWidth = 481 ClientWidth = 483
TabOrder = 0 TabOrder = 0
object chkSmartLinkUnit: TCheckBox object chkSmartLinkUnit: TCheckBox
Left = 6 Left = 6
Height = 22 Height = 22
Top = 6 Top = 6
Width = 469 Width = 471
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'chkSmartLinkUnit' Caption = 'chkSmartLinkUnit'
@ -384,19 +407,19 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 174 Left = 174
Height = 54 Height = 54
Top = 65 Top = 65
Width = 485 Width = 487
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'grpHeapSize' Caption = 'grpHeapSize'
ClientHeight = 35 ClientHeight = 50
ClientWidth = 481 ClientWidth = 483
TabOrder = 2 TabOrder = 2
object edtHeapSize: TEdit object edtHeapSize: TEdit
Left = 6 Left = 6
Height = 23 Height = 23
Top = 6 Top = 6
Width = 469 Width = 471
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
TabOrder = 0 TabOrder = 0
@ -465,13 +488,13 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 148 Left = 148
Height = 130 Height = 130
Top = 149 Top = 149
Width = 511 Width = 513
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'grpTargetPlatform' Caption = 'grpTargetPlatform'
ClientHeight = 111 ClientHeight = 126
ClientWidth = 507 ClientWidth = 509
TabOrder = 4 TabOrder = 4
object lblTargetOS: TLabel object lblTargetOS: TLabel
AnchorSideLeft.Control = grpTargetPlatform AnchorSideLeft.Control = grpTargetPlatform
@ -517,7 +540,7 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 91 Left = 91
Height = 29 Height = 29
Top = 6 Top = 6
Width = 410 Width = 412
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending] AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
BorderSpacing.Left = 6 BorderSpacing.Left = 6
@ -536,7 +559,7 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 99 Left = 99
Height = 29 Height = 29
Top = 41 Top = 41
Width = 402 Width = 404
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending] AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
BorderSpacing.Left = 6 BorderSpacing.Left = 6
@ -556,7 +579,7 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 127 Left = 127
Height = 29 Height = 29
Top = 76 Top = 76
Width = 374 Width = 376
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending] AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
BorderSpacing.Left = 6 BorderSpacing.Left = 6
@ -575,14 +598,14 @@ object frmCompilerOptions: TfrmCompilerOptions
AnchorSideBottom.Control = CodeGenPage AnchorSideBottom.Control = CodeGenPage
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 6 Left = 6
Height = 158 Height = 162
Top = 285 Top = 285
Width = 653 Width = 655
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'grpOptimizations' Caption = 'grpOptimizations'
ClientHeight = 139 ClientHeight = 158
ClientWidth = 649 ClientWidth = 651
TabOrder = 5 TabOrder = 5
OnResize = grpOptimizationsResize OnResize = grpOptimizationsResize
object radOptLevelNone: TRadioButton object radOptLevelNone: TRadioButton
@ -659,25 +682,25 @@ object frmCompilerOptions: TfrmCompilerOptions
end end
object LinkingPage: TPage object LinkingPage: TPage
Caption = 'LinkingPage' Caption = 'LinkingPage'
ClientWidth = 665 ClientWidth = 667
ClientHeight = 449 ClientHeight = 453
object grpLinkLibraries: TGroupBox object grpLinkLibraries: TGroupBox
Left = 6 Left = 6
Height = 53 Height = 53
Top = 233 Top = 233
Width = 653 Width = 655
Align = alTop Align = alTop
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'grpLinkLibraries' Caption = 'grpLinkLibraries'
ClientHeight = 34 ClientHeight = 49
ClientWidth = 649 ClientWidth = 651
TabOrder = 0 TabOrder = 0
object chkLinkSmart: TCheckBox object chkLinkSmart: TCheckBox
Left = 6 Left = 6
Height = 22 Height = 22
Top = 6 Top = 6
Width = 637 Width = 639
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'chkLinkSmart' Caption = 'chkLinkSmart'
@ -688,19 +711,19 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 53 Height = 53
Top = 292 Top = 292
Width = 653 Width = 655
Align = alTop Align = alTop
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'TargetSpecificsGrpBox' Caption = 'TargetSpecificsGrpBox'
ClientHeight = 34 ClientHeight = 49
ClientWidth = 649 ClientWidth = 651
TabOrder = 1 TabOrder = 1
object chkWin32GraphicApp: TCheckBox object chkWin32GraphicApp: TCheckBox
Left = 6 Left = 6
Height = 22 Height = 22
Top = 6 Top = 6
Width = 637 Width = 639
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'chkWin32GraphicApp' Caption = 'chkWin32GraphicApp'
@ -711,19 +734,19 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 82 Height = 82
Top = 351 Top = 351
Width = 653 Width = 655
Align = alTop Align = alTop
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'grpOptions' Caption = 'grpOptions'
ClientHeight = 63 ClientHeight = 78
ClientWidth = 649 ClientWidth = 651
TabOrder = 2 TabOrder = 2
object chkOptionsLinkOpt: TCheckBox object chkOptionsLinkOpt: TCheckBox
Left = 6 Left = 6
Height = 22 Height = 22
Top = 6 Top = 6
Width = 637 Width = 639
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'chkOptionsLinkOpt' Caption = 'chkOptionsLinkOpt'
@ -733,7 +756,7 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 23 Height = 23
Top = 34 Top = 34
Width = 637 Width = 639
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
TabOrder = 1 TabOrder = 1
@ -744,19 +767,19 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 221 Height = 221
Top = 6 Top = 6
Width = 653 Width = 655
Align = alTop Align = alTop
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'grpDebugging' Caption = 'grpDebugging'
ClientHeight = 202 ClientHeight = 217
ClientWidth = 649 ClientWidth = 651
TabOrder = 3 TabOrder = 3
object chkDebugGDB: TCheckBox object chkDebugGDB: TCheckBox
Left = 6 Left = 6
Height = 22 Height = 22
Top = 6 Top = 6
Width = 637 Width = 639
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'chkDebugGDB' Caption = 'chkDebugGDB'
@ -766,7 +789,7 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 22 Height = 22
Top = 34 Top = 34
Width = 637 Width = 639
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'chkDebugDBX' Caption = 'chkDebugDBX'
@ -776,7 +799,7 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 22 Height = 22
Top = 62 Top = 62
Width = 637 Width = 639
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'chkUseLineInfoUnit' Caption = 'chkUseLineInfoUnit'
@ -786,7 +809,7 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 22 Height = 22
Top = 90 Top = 90
Width = 637 Width = 639
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'chkUseHeaptrc' Caption = 'chkUseHeaptrc'
@ -796,7 +819,7 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 22 Height = 22
Top = 118 Top = 118
Width = 637 Width = 639
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'chkUseValgrind' Caption = 'chkUseValgrind'
@ -806,7 +829,7 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 22 Height = 22
Top = 146 Top = 146
Width = 637 Width = 639
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'chkGenGProfCode' Caption = 'chkGenGProfCode'
@ -816,7 +839,7 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 22 Height = 22
Top = 174 Top = 174
Width = 637 Width = 639
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'chkSymbolsStrip' Caption = 'chkSymbolsStrip'
@ -826,13 +849,13 @@ object frmCompilerOptions: TfrmCompilerOptions
end end
object MsgPage: TPage object MsgPage: TPage
Caption = 'MsgPage' Caption = 'MsgPage'
ClientWidth = 665 ClientWidth = 667
ClientHeight = 449 ClientHeight = 453
object grpVerbosity: TCheckGroup object grpVerbosity: TCheckGroup
Left = 6 Left = 6
Height = 196 Height = 196
Top = 6 Top = 6
Width = 653 Width = 655
Align = alTop Align = alTop
AutoFill = True AutoFill = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
@ -852,19 +875,19 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 54 Height = 54
Top = 208 Top = 208
Width = 653 Width = 655
Align = alTop Align = alTop
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'grpErrorCnt' Caption = 'grpErrorCnt'
ClientHeight = 35 ClientHeight = 50
ClientWidth = 649 ClientWidth = 651
TabOrder = 1 TabOrder = 1
object edtErrorCnt: TEdit object edtErrorCnt: TEdit
Left = 6 Left = 6
Height = 23 Height = 23
Top = 6 Top = 6
Width = 637 Width = 639
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
TabOrder = 0 TabOrder = 0
@ -874,25 +897,25 @@ object frmCompilerOptions: TfrmCompilerOptions
end end
object OtherPage: TPage object OtherPage: TPage
Caption = 'OtherPage' Caption = 'OtherPage'
ClientWidth = 665 ClientWidth = 667
ClientHeight = 449 ClientHeight = 453
object grpConfigFile: TGroupBox object grpConfigFile: TGroupBox
Left = 6 Left = 6
Height = 110 Height = 110
Top = 6 Top = 6
Width = 653 Width = 655
Align = alTop Align = alTop
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'grpConfigFile' Caption = 'grpConfigFile'
ClientHeight = 91 ClientHeight = 106
ClientWidth = 649 ClientWidth = 651
TabOrder = 0 TabOrder = 0
object chkConfigFile: TCheckBox object chkConfigFile: TCheckBox
Left = 6 Left = 6
Height = 22 Height = 22
Top = 6 Top = 6
Width = 637 Width = 639
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'chkConfigFile' Caption = 'chkConfigFile'
@ -902,7 +925,7 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 22 Height = 22
Top = 34 Top = 34
Width = 637 Width = 639
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'chkCustomConfigFile' Caption = 'chkCustomConfigFile'
@ -913,7 +936,7 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 23 Height = 23
Top = 62 Top = 62
Width = 637 Width = 639
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
TabOrder = 2 TabOrder = 2
@ -922,20 +945,20 @@ object frmCompilerOptions: TfrmCompilerOptions
end end
object grpCustomOptions: TGroupBox object grpCustomOptions: TGroupBox
Left = 6 Left = 6
Height = 321 Height = 325
Top = 122 Top = 122
Width = 653 Width = 655
Align = alClient Align = alClient
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'grpCustomOptions' Caption = 'grpCustomOptions'
ClientHeight = 302 ClientHeight = 321
ClientWidth = 649 ClientWidth = 651
TabOrder = 1 TabOrder = 1
object memCustomOptions: TMemo object memCustomOptions: TMemo
Left = 6 Left = 6
Height = 290 Height = 309
Top = 6 Top = 6
Width = 637 Width = 639
Align = alClient Align = alClient
BorderSpacing.Around = 6 BorderSpacing.Around = 6
TabOrder = 0 TabOrder = 0
@ -944,13 +967,13 @@ object frmCompilerOptions: TfrmCompilerOptions
end end
object InheritedPage: TPage object InheritedPage: TPage
Caption = 'InheritedPage' Caption = 'InheritedPage'
ClientWidth = 665 ClientWidth = 667
ClientHeight = 449 ClientHeight = 453
object InhNoteLabel: TLabel object InhNoteLabel: TLabel
Left = 6 Left = 6
Height = 20 Height = 20
Top = 6 Top = 6
Width = 653 Width = 655
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'InhNoteLabel' Caption = 'InhNoteLabel'
@ -960,7 +983,7 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 247 Height = 247
Top = 32 Top = 32
Width = 653 Width = 655
Align = alTop Align = alTop
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Right = 6 BorderSpacing.Right = 6
@ -970,9 +993,9 @@ object frmCompilerOptions: TfrmCompilerOptions
end end
object InhItemMemo: TMemo object InhItemMemo: TMemo
Left = 6 Left = 6
Height = 159 Height = 163
Top = 284 Top = 284
Width = 653 Width = 655
Align = alClient Align = alClient
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Right = 6 BorderSpacing.Right = 6
@ -985,20 +1008,20 @@ object frmCompilerOptions: TfrmCompilerOptions
Cursor = crVSplit Cursor = crVSplit
Height = 5 Height = 5
Top = 279 Top = 279
Width = 665 Width = 667
Align = alTop Align = alTop
ResizeAnchor = akTop ResizeAnchor = akTop
end end
end end
object CompilationPage: TPage object CompilationPage: TPage
Caption = 'CompilationPage' Caption = 'CompilationPage'
ClientWidth = 665 ClientWidth = 667
ClientHeight = 449 ClientHeight = 453
object chkCreateMakefile: TCheckBox object chkCreateMakefile: TCheckBox
Left = 6 Left = 6
Height = 22 Height = 22
Top = 6 Top = 6
Width = 653 Width = 655
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'chkCreateMakefile' Caption = 'chkCreateMakefile'
@ -1008,13 +1031,13 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 108 Height = 108
Top = 233 Top = 233
Width = 653 Width = 655
Align = alTop Align = alTop
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'ExecuteAfterGroupBox' Caption = 'ExecuteAfterGroupBox'
ClientHeight = 89 ClientHeight = 104
ClientWidth = 649 ClientWidth = 651
TabOrder = 1 TabOrder = 1
object lblRunIfExecAfter: TLabel object lblRunIfExecAfter: TLabel
AnchorSideLeft.Control = ExecuteAfterGroupBox AnchorSideLeft.Control = ExecuteAfterGroupBox
@ -1088,7 +1111,7 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 208 Left = 208
Height = 23 Height = 23
Top = 32 Top = 32
Width = 435 Width = 437
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 12 BorderSpacing.Left = 12
BorderSpacing.Around = 6 BorderSpacing.Around = 6
@ -1140,13 +1163,13 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 79 Height = 79
Top = 148 Top = 148
Width = 653 Width = 655
Align = alTop Align = alTop
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'grpCompiler' Caption = 'grpCompiler'
ClientHeight = 60 ClientHeight = 75
ClientWidth = 649 ClientWidth = 651
TabOrder = 2 TabOrder = 2
object lblRunIfCompiler: TLabel object lblRunIfCompiler: TLabel
AnchorSideLeft.Control = grpCompiler AnchorSideLeft.Control = grpCompiler
@ -1223,7 +1246,7 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 96 Left = 96
Height = 23 Height = 23
Top = 31 Top = 31
Width = 547 Width = 549
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 12 BorderSpacing.Left = 12
BorderSpacing.Around = 6 BorderSpacing.Around = 6
@ -1235,13 +1258,13 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 6 Left = 6
Height = 108 Height = 108
Top = 34 Top = 34
Width = 653 Width = 655
Align = alTop Align = alTop
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'ExecuteBeforeGroupBox' Caption = 'ExecuteBeforeGroupBox'
ClientHeight = 89 ClientHeight = 104
ClientWidth = 649 ClientWidth = 651
TabOrder = 3 TabOrder = 3
object lblRunIfExecBefore: TLabel object lblRunIfExecBefore: TLabel
AnchorSideLeft.Control = ExecuteBeforeGroupBox AnchorSideLeft.Control = ExecuteBeforeGroupBox
@ -1315,7 +1338,7 @@ object frmCompilerOptions: TfrmCompilerOptions
Left = 219 Left = 219
Height = 23 Height = 23
Top = 32 Top = 32
Width = 424 Width = 426
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 12 BorderSpacing.Left = 12
BorderSpacing.Around = 6 BorderSpacing.Around = 6

File diff suppressed because it is too large Load Diff

View File

@ -38,8 +38,9 @@ interface
uses uses
Forms, Classes, Math, LCLProc, SysUtils, InterfaceBase, Forms, Classes, Math, LCLProc, SysUtils, InterfaceBase,
ComCtrls, Buttons, StdCtrls, ExtCtrls, ComCtrls, Buttons, StdCtrls, ExtCtrls, Graphics, LResources, FileUtil,
Graphics, LResources, FileUtil, Dialogs, Controls, GraphType, Dialogs, Controls, GraphType,
LinkScanner,
MacroIntf, ProjectIntf, IDEWindowIntf, IDEContextHelpEdit, MacroIntf, ProjectIntf, IDEWindowIntf, IDEContextHelpEdit,
TransferMacros, PathEditorDlg, LazarusIDEStrConsts, IDEOptionDefs, LazConf, TransferMacros, PathEditorDlg, LazarusIDEStrConsts, IDEOptionDefs, LazConf,
IDEProcs, IDEImagesIntf, ShowCompilerOpts, Project, PackageDefs, IDEProcs, IDEImagesIntf, ShowCompilerOpts, Project, PackageDefs,
@ -95,6 +96,8 @@ type
ParsingPage: TPage; ParsingPage: TPage;
grpAsmStyle: TRadioGroup; grpAsmStyle: TRadioGroup;
grpSyntaxOptions: TCheckGroup; grpSyntaxOptions: TCheckGroup;
grpSyntaxMode: TGroupBox;
cmbSyntaxMode: TComboBox;
{ Code Generation Controls } { Code Generation Controls }
CodeGenPage: TPage; CodeGenPage: TPage;
@ -224,8 +227,6 @@ type
procedure ButtonLoadSaveClick(Sender: TObject); procedure ButtonLoadSaveClick(Sender: TObject);
procedure ButtonShowOptionsClicked(Sender: TObject); procedure ButtonShowOptionsClicked(Sender: TObject);
procedure FileBrowseBtnClick(Sender: TObject); procedure FileBrowseBtnClick(Sender: TObject);
procedure FormResize(Sender: TObject);
procedure grpSyntaxOptionsItemClick(Sender: TObject; Index: integer);
procedure HelpButtonClick(Sender: TObject); procedure HelpButtonClick(Sender: TObject);
procedure InhTreeViewSelectionChanged(Sender: TObject); procedure InhTreeViewSelectionChanged(Sender: TObject);
procedure chkCustomConfigFileClick(Sender: TObject); procedure chkCustomConfigFileClick(Sender: TObject);
@ -277,6 +278,9 @@ type
var var
TestCompilerOptions: TNotifyEvent = nil; TestCompilerOptions: TNotifyEvent = nil;
function SyntaxModeToCaption(const Mode: string): string;
function CaptionToSyntaxMode(const Caption: string): string;
implementation implementation
type type
@ -286,6 +290,36 @@ type
end; end;
PInheritedNodeData = ^TInheritedNodeData; PInheritedNodeData = ^TInheritedNodeData;
function SyntaxModeToCaption(const Mode: string): string;
begin
if SysUtils.CompareText(Mode,'ObjFPC')=0 then
Result:=lisObjectPascalDefault+' (-Mobjfpc)'
else if SysUtils.CompareText(Mode,'Delphi')=0 then
Result:=lisDelphi+' (-Mdelphi)'
else if SysUtils.CompareText(Mode,'tp')=0 then
Result:=lisTurboPascal+' (-Mtp)'
else if SysUtils.CompareText(Mode,'fpc')=0 then
Result:=lisFreePascal+' (-Mfpc)'
else if SysUtils.CompareText(Mode,'macpas')=0 then
Result:=lisMacPascal+' (-Mmacpas)'
else
Result:='';
end;
function CaptionToSyntaxMode(const Caption: string): string;
begin
if System.Pos('-Mdelphi',Caption)>0 then
Result:='Delphi'
else if System.Pos('-Mtp',Caption)>0 then
Result:='tp'
else if System.Pos('-Mmacpas',Caption)>0 then
Result:='macpas'
else if System.Pos('-Mfpc',Caption)>0 then
Result:='fpc'
else
Result:='ObjFPC';
end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
TfrmCompilerOptions Constructor TfrmCompilerOptions Constructor
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
@ -425,24 +459,6 @@ begin
end; end;
end; end;
procedure TfrmCompilerOptions.FormResize(Sender: TObject);
begin
end;
procedure TfrmCompilerOptions.grpSyntaxOptionsItemClick(Sender: TObject;
Index: integer);
begin
case Index of
0,6,9,11:
if grpSyntaxOptions.Checked[Index] then begin
grpSyntaxOptions.Checked[0]:=Index=0; // objfpc mode
grpSyntaxOptions.Checked[6]:=Index=6; // tp mode
grpSyntaxOptions.Checked[9]:=Index=9; // delphi mode
grpSyntaxOptions.Checked[11]:=Index=11;// gpc mode
end;
end;
end;
procedure TfrmCompilerOptions.HelpButtonClick(Sender: TObject); procedure TfrmCompilerOptions.HelpButtonClick(Sender: TObject);
begin begin
ShowContextHelpForIDE(Self); ShowContextHelpForIDE(Self);
@ -518,20 +534,18 @@ begin
with grpSyntaxOptions do with grpSyntaxOptions do
begin begin
Checked[0] := Options.Delphi2Extensions; Checked[0] := Options.CStyleOperators;
Checked[1] := Options.CStyleOperators; Checked[1] := Options.IncludeAssertionCode;
Checked[2] := Options.IncludeAssertionCode; Checked[2] := Options.AllowLabel;
Checked[3] := Options.AllowLabel; Checked[3] := Options.CPPInline;
Checked[4] := Options.CPPInline; Checked[4] := Options.CStyleMacros;
Checked[5] := Options.CStyleMacros; Checked[5] := Options.InitConstructor;
Checked[6] := Options.TPCompatible; Checked[6] := Options.StaticKeyword;
Checked[7] := Options.InitConstructor; Checked[7] := Options.UseAnsiStrings;
Checked[8] := Options.StaticKeyword;
Checked[9] := Options.DelphiCompat;
Checked[10] := Options.UseAnsiStrings;
Checked[11] := Options.GPCCompat;
end; end;
cmbSyntaxMode.Text:=SyntaxModeToCaption(Options.SyntaxMode);
// code generation // code generation
chkSmartLinkUnit.Checked := Options.SmartLinkUnit; chkSmartLinkUnit.Checked := Options.SmartLinkUnit;
@ -832,20 +846,18 @@ begin
with grpSyntaxOptions do with grpSyntaxOptions do
begin begin
Options.Delphi2Extensions := Checked[0]; Options.CStyleOperators := Checked[01];
Options.CStyleOperators := Checked[1]; Options.IncludeAssertionCode := Checked[1];
Options.IncludeAssertionCode := Checked[2]; Options.AllowLabel := Checked[2];
Options.AllowLabel := Checked[3]; Options.CPPInline := Checked[3];
Options.CPPInline := Checked[4]; Options.CStyleMacros := Checked[4];
Options.CStyleMacros := Checked[5]; Options.InitConstructor := Checked[5];
Options.TPCompatible := Checked[6]; Options.StaticKeyword := Checked[6];
Options.InitConstructor := Checked[7]; Options.UseAnsiStrings := Checked[7];
Options.StaticKeyword := Checked[8];
Options.DelphiCompat := Checked[9];
Options.UseAnsiStrings := Checked[10];
Options.GPCCompat := Checked[11];
end; end;
Options.SyntaxMode:=CaptionToSyntaxMode(cmbSyntaxMode.Text);
// code generation // code generation
Options.SmartLinkUnit := chkSmartLinkUnit.Checked; Options.SmartLinkUnit := chkSmartLinkUnit.Checked;
@ -1133,6 +1145,9 @@ end;
TfrmCompilerOptions SetupParsingTab TfrmCompilerOptions SetupParsingTab
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
procedure TfrmCompilerOptions.SetupParsingTab(Page: integer); procedure TfrmCompilerOptions.SetupParsingTab(Page: integer);
var
m: TCompilerMode;
s: String;
begin begin
MainNoteBook.Page[Page].Caption:= dlgCOParsing; MainNoteBook.Page[Page].Caption:= dlgCOParsing;
@ -1153,19 +1168,25 @@ begin
AutoSize:=true; AutoSize:=true;
Caption := dlgSyntaxOptions; Caption := dlgSyntaxOptions;
Items.Add(dlgDelphi2Ext+' (-S2)');
Items.Add(dlgCOCOps+' (-Sc)'); Items.Add(dlgCOCOps+' (-Sc)');
Items.Add(dlgAssertCode+' (-Sa)'); Items.Add(dlgAssertCode+' (-Sa)');
Items.Add(dlgLabelGoto+' (-Sg)'); Items.Add(dlgLabelGoto+' (-Sg)');
Items.Add(dlgCppInline+' (-Si)'); Items.Add(dlgCppInline+' (-Si)');
Items.Add(dlgCMacro+' (-Sm)'); Items.Add(dlgCMacro+' (-Sm)');
Items.Add(dlgBP7Cptb+' (-So)');
Items.Add(dlgInitDoneOnly+' (-Ss)'); Items.Add(dlgInitDoneOnly+' (-Ss)');
Items.Add(dlgStaticKeyword+' (-St)'); Items.Add(dlgStaticKeyword+' (-St)');
Items.Add(dlgDeplhiComp+' (-Sd)');
Items.Add(dlgCOAnsiStr+' (-Sh)'); Items.Add(dlgCOAnsiStr+' (-Sh)');
Items.Add(dlgGPCComp+' (-Sp)');
end; end;
grpSyntaxMode.Caption:=lisSyntaxMode+' (-M)';
cmbSyntaxMode.Items.BeginUpdate;
cmbSyntaxMode.Items.Clear;
for m:=Low(TCompilerMode) to High(TCompilerMode) do begin
s:=SyntaxModeToCaption(CompilerModeNames[m]);
if s<>'' then
cmbSyntaxMode.Items.Add(s);
end;
cmbSyntaxMode.Items.EndUpdate;
end; end;

View File

@ -228,23 +228,35 @@ begin
} }
// FPC modes ---------------------------------------------------------------- // FPC modes ----------------------------------------------------------------
if CompOpts.DelphiCompat then begin if SysUtils.CompareText(CompOpts.SyntaxMode,'Delphi')=0 then begin
// set mode DELPHI // set mode DELPHI
Result:=Result or Result:=Result or
ReplaceAutoGeneratedDefine(ParentTemplate,FPCModeDefTemplName, ReplaceAutoGeneratedDefine(ParentTemplate,FPCModeDefTemplName,
lisEdtDefsetFPCModeToDELPHI, CompilerModeVars[cmDELPHI], '1', lisEdtDefsetFPCModeToDELPHI, CompilerModeVars[cmDELPHI], '1',
RecursiveDefines); RecursiveDefines);
end else if CompOpts.TPCompatible then begin end else if SysUtils.CompareText(CompOpts.SyntaxMode,'TP')=0 then begin
// set mode TP // set mode TP
Result:=Result or Result:=Result or
ReplaceAutoGeneratedDefine(ParentTemplate,FPCModeDefTemplName, ReplaceAutoGeneratedDefine(ParentTemplate,FPCModeDefTemplName,
lisEdtDefsetFPCModeToTP, CompilerModeVars[cmTP], '1', RecursiveDefines); lisEdtDefsetFPCModeToTP, CompilerModeVars[cmTP], '1', RecursiveDefines);
end else if CompOpts.GPCCompat then begin end else if SysUtils.CompareText(CompOpts.SyntaxMode,'GPC')=0 then begin
// set mode GPC // set mode GPC
Result:=Result or Result:=Result or
ReplaceAutoGeneratedDefine(ParentTemplate,FPCModeDefTemplName, ReplaceAutoGeneratedDefine(ParentTemplate,FPCModeDefTemplName,
lisEdtDefsetFPCModeToGPC, CompilerModeVars[cmGPC], '1', RecursiveDefines lisEdtDefsetFPCModeToGPC, CompilerModeVars[cmGPC], '1', RecursiveDefines
); );
end else if SysUtils.CompareText(CompOpts.SyntaxMode,'MacPas')=0 then begin
// set mode MacPas
Result:=Result or
ReplaceAutoGeneratedDefine(ParentTemplate,FPCModeDefTemplName,
lisEdtDefsetFPCModeToMacPas, CompilerModeVars[cmMacPas], '1', RecursiveDefines
);
end else if SysUtils.CompareText(CompOpts.SyntaxMode,'FPC')=0 then begin
// set mode FPC
Result:=Result or
ReplaceAutoGeneratedDefine(ParentTemplate,FPCModeDefTemplName,
lisEdtDefsetFPCModeToFPC, CompilerModeVars[cmFPC], '1', RecursiveDefines
);
end else begin end else begin
// set no mode // set no mode
Result:=Result or Result:=Result or

View File

@ -2660,6 +2660,8 @@ resourcestring
lisEdtDefsetFPCModeToDELPHI = 'set FPC mode to DELPHI'; lisEdtDefsetFPCModeToDELPHI = 'set FPC mode to DELPHI';
lisEdtDefsetFPCModeToTP = 'set FPC mode to TP'; lisEdtDefsetFPCModeToTP = 'set FPC mode to TP';
lisEdtDefsetFPCModeToGPC = 'set FPC mode to GPC'; lisEdtDefsetFPCModeToGPC = 'set FPC mode to GPC';
lisEdtDefsetFPCModeToMacPas = 'set FPC mode to MacPas';
lisEdtDefsetFPCModeToFPC = 'set FPC mode to FPC';
lisEdtDefsetIOCHECKSOn = 'set IOCHECKS on'; lisEdtDefsetIOCHECKSOn = 'set IOCHECKS on';
lisEdtDefsetRANGECHECKSOn = 'set RANGECHECKS on'; lisEdtDefsetRANGECHECKSOn = 'set RANGECHECKS on';
lisEdtDefsetOVERFLOWCHECKSOn = 'set OVERFLOWCHECKS on'; lisEdtDefsetOVERFLOWCHECKSOn = 'set OVERFLOWCHECKS on';
@ -3807,6 +3809,12 @@ resourcestring
+'sIdentifier%sTMyEnum.Enum%sUnitname.Identifier%s#PackageName.UnitName.' +'sIdentifier%sTMyEnum.Enum%sUnitname.Identifier%s#PackageName.UnitName.'
+'Identifier'; +'Identifier';
lisTitleLeaveEmptyForDefault = 'Title (leave empty for default)'; lisTitleLeaveEmptyForDefault = 'Title (leave empty for default)';
lisSyntaxMode = 'Syntax mode';
lisObjectPascalDefault = 'Object Pascal - default';
lisDelphi = 'Delphi';
lisTurboPascal = 'Turbo Pascal';
lisMacPascal = 'Mac Pascal';
lisFreePascal = 'Free Pascal';
implementation implementation

View File

@ -357,8 +357,8 @@ end;
procedure TActionListEditor.OnRefreshPropertyValues; procedure TActionListEditor.OnRefreshPropertyValues;
function ValidCategory: Boolean; function ValidCategory: Boolean;
// spr. czy wszystkie kategorie w ListBox'sie istniejš w TActionList // spr. czy wszystkie kategorie w ListBox'sie istniej¹ w TActionList
// inaczej: czy istnieje kategoria elementu wywolujšcego zdarzenie // inaczej: czy istnieje kategoria elementu wywoluj¹cego zdarzenie
var var
i, j: Integer; i, j: Integer;
bool: Boolean; bool: Boolean;
@ -420,12 +420,12 @@ begin
tmpIsActCategory := IsCategory(CurSelect.Category); tmpIsActCategory := IsCategory(CurSelect.Category);
if tmpCategory = '' then tmpCategory := cActionListEditorUnknownCategory; if tmpCategory = '' then tmpCategory := cActionListEditorUnknownCategory;
// jeżeli nie ma tej kategorii na liscie // je¿eli nie ma tej kategorii na liscie
if ((curSelect.Category <> '') and not tmpIsActCategory) if ((curSelect.Category <> '') and not tmpIsActCategory)
// nie wszystkie kategorie z lstCategory istniejš w FActionList // nie wszystkie kategorie z lstCategory istniej¹ w FActionList
// (usuniecie kategorii) // (usuniecie kategorii)
or not tmpValidCategory or not tmpValidCategory
// jeżeli kategoria jest inna od oznaczonej // je¿eli kategoria jest inna od oznaczonej
// oraz nie jest to kategoria '(All)' ani '(Unknown)' // oraz nie jest to kategoria '(All)' ani '(Unknown)'
or ((tmpCategory <> lstCategory.Items[lstCategory.Items.IndexOf(tmpCategory)]) or ((tmpCategory <> lstCategory.Items[lstCategory.Items.IndexOf(tmpCategory)])
and ((lstCategory.Items.IndexOf(cActionListEditorAllCategory) >= 0) and ((lstCategory.Items.IndexOf(cActionListEditorAllCategory) >= 0)
@ -434,7 +434,7 @@ begin
then FillCategories; then FillCategories;
tmpIndex := lstCategory.Items.IndexOf(tmpCategory); // ??? tmpIndex := lstCategory.Items.IndexOf(tmpCategory); // ???
// sš kategorie (nie tylko Unknown) rownież All i inne // s¹ kategorie (nie tylko Unknown) rownie¿ All i inne
if (lstCategory.Items.Count > 1) if (lstCategory.Items.Count > 1)
// nie istniala nowa kategoria // nie istniala nowa kategoria
// nie istniala zaznaczona kategoria // nie istniala zaznaczona kategoria

View File

@ -92,16 +92,13 @@ type
fAssemblerStyle: Integer; fAssemblerStyle: Integer;
// syntax options // syntax options
fDelphi2Ext: Boolean; FSyntaxMode: string;
fCStyleOp: Boolean; fCStyleOp: Boolean;
fIncludeAssertionCode: Boolean; fIncludeAssertionCode: Boolean;
fDelphiCompat: Boolean;
fAllowLabel: Boolean; fAllowLabel: Boolean;
fUseAnsiStr: Boolean; fUseAnsiStr: Boolean;
fCPPInline: Boolean; fCPPInline: Boolean;
fCMacros: Boolean; fCMacros: Boolean;
fTPCompat: Boolean;
fGPCCompat: Boolean;
fInitConst: Boolean; fInitConst: Boolean;
fStaticKeyword: Boolean; fStaticKeyword: Boolean;
@ -198,18 +195,15 @@ type
property LCLWidgetType: string read fLCLWidgetType write fLCLWidgetType; property LCLWidgetType: string read fLCLWidgetType write fLCLWidgetType;
// parsing: // parsing:
property SyntaxMode: string read FSyntaxMode write FSyntaxMode;
property AssemblerStyle: Integer read fAssemblerStyle write fAssemblerStyle; property AssemblerStyle: Integer read fAssemblerStyle write fAssemblerStyle;
property Delphi2Extensions: Boolean read fDelphi2Ext write fDelphi2Ext;
property CStyleOperators: Boolean read fCStyleOp write fCStyleOp; property CStyleOperators: Boolean read fCStyleOp write fCStyleOp;
property IncludeAssertionCode: Boolean property IncludeAssertionCode: Boolean
read fIncludeAssertionCode write fIncludeAssertionCode; read fIncludeAssertionCode write fIncludeAssertionCode;
property DelphiCompat: Boolean read fDelphiCompat write fDelphiCompat;
property AllowLabel: Boolean read fAllowLabel write fAllowLabel; property AllowLabel: Boolean read fAllowLabel write fAllowLabel;
property UseAnsiStrings: Boolean read fUseAnsiStr write fUseAnsiStr; property UseAnsiStrings: Boolean read fUseAnsiStr write fUseAnsiStr;
property CPPInline: Boolean read fCPPInline write fCPPInline; property CPPInline: Boolean read fCPPInline write fCPPInline;
property CStyleMacros: Boolean read fCMacros write fCMacros; property CStyleMacros: Boolean read fCMacros write fCMacros;
property TPCompatible: Boolean read fTPCompat write fTPCompat;
property GPCCompat: Boolean read fGPCCompat write fGPCCompat;
property InitConstructor: Boolean read fInitConst write fInitConst; property InitConstructor: Boolean read fInitConst write fInitConst;
property StaticKeyword: Boolean read fStaticKeyword write fStaticKeyword; property StaticKeyword: Boolean read fStaticKeyword write fStaticKeyword;

View File

@ -18,7 +18,7 @@ object AddToPackageDlg: TAddToPackageDlg
Height = 300 Height = 300
Width = 500 Width = 500
Align = alClient Align = alClient
PageIndex = 5 PageIndex = 4
TabOrder = 0 TabOrder = 0
object NewFilePage: TPage object NewFilePage: TPage
Caption = 'New File' Caption = 'New File'
@ -630,7 +630,8 @@ object AddToPackageDlg: TAddToPackageDlg
ChildSizing.ShrinkHorizontal = crsScaleChilds ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 2
Columns = 2
Constraints.MinHeight = 30 Constraints.MinHeight = 30
Constraints.MinWidth = 100 Constraints.MinWidth = 100
TabOrder = 3 TabOrder = 3

View File

@ -8,7 +8,7 @@ LazarusResources.Add('TAddToPackageDlg','FORMDATA',[
+'e'#9'OnDestroy'#7#11'FormDestroy'#9'OnKeyDown'#7#22'AddToPackageDlgKeyDown' +'e'#9'OnDestroy'#7#11'FormDestroy'#9'OnKeyDown'#7#22'AddToPackageDlgKeyDown'
+#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#6'0.9.25'#0#9'TNotebook'#8 +#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#6'0.9.25'#0#9'TNotebook'#8
+'NoteBook'#6'Height'#3','#1#5'Width'#3#244#1#5'Align'#7#8'alClient'#9'PageIn' +'NoteBook'#6'Height'#3','#1#5'Width'#3#244#1#5'Align'#7#8'alClient'#9'PageIn'
+'dex'#2#5#8'TabOrder'#2#0#0#5'TPage'#11'NewFilePage'#7'Caption'#6#8'New File' +'dex'#2#4#8'TabOrder'#2#0#0#5'TPage'#11'NewFilePage'#7'Caption'#6#8'New File'
+#11'ClientWidth'#3#242#1#12'ClientHeight'#3#17#1#8'OnResize'#7#17'NewFilePag' +#11'ClientWidth'#3#242#1#12'ClientHeight'#3#17#1#8'OnResize'#7#17'NewFilePag'
+'eResize'#0#9'TTreeView'#15'NewFileTreeView'#24'AnchorSideBottom.Control'#7 +'eResize'#0#9'TTreeView'#15'NewFileTreeView'#24'AnchorSideBottom.Control'#7
+#15'NewFileOkButton'#6'Height'#3#218#0#5'Width'#3#249#0#5'Align'#7#6'alLeft' +#15'NewFileOkButton'#6'Height'#3#218#0#5'Width'#3#249#0#5'Align'#7#6'alLeft'
@ -217,38 +217,38 @@ LazarusResources.Add('TAddToPackageDlg','FORMDATA',[
+'ldResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28 +'ldResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28
+'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVer' +'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVer'
+'tical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenT' +'tical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenT'
+'opToBottom'#27'ChildSizing.ControlsPerLine'#2#1#21'Constraints.MinHeight'#2 +'opToBottom'#27'ChildSizing.ControlsPerLine'#2#2#7'Columns'#2#2#21'Constrain'
+#30#20'Constraints.MinWidth'#2'd'#8'TabOrder'#2#3#0#0#7'TButton'#13'AddFileB' +'ts.MinHeight'#2#30#20'Constraints.MinWidth'#2'd'#8'TabOrder'#2#3#0#0#7'TBut'
+'utton'#21'AnchorSideTop.Control'#7#21'AddFileTypeRadioGroup'#18'AnchorSideT' +'ton'#13'AddFileButton'#21'AnchorSideTop.Control'#7#21'AddFileTypeRadioGroup'
+'op.Side'#7#9'asrBottom'#4'Left'#2#5#6'Height'#2#29#3'Top'#2']'#5'Width'#2'd' +#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#5#6'Height'#2#29#3'Top'#2']'
+#8'AutoSize'#9#17'BorderSpacing.Top'#2#25#7'Caption'#6#13'AddFileButton'#7'O' +#5'Width'#2'd'#8'AutoSize'#9#17'BorderSpacing.Top'#2#25#7'Caption'#6#13'AddF'
+'nClick'#7#18'AddFileButtonClick'#8'TabOrder'#2#4#0#0#7'TButton'#19'CancelAd' +'ileButton'#7'OnClick'#7#18'AddFileButtonClick'#8'TabOrder'#2#4#0#0#7'TButto'
+'dFileButton'#22'AnchorSideLeft.Control'#7#13'AddFileButton'#19'AnchorSideLe' +'n'#19'CancelAddFileButton'#22'AnchorSideLeft.Control'#7#13'AddFileButton'#19
+'ft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#13'AddFileButton'#4'Lef' +'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#13'AddFileB'
+'t'#2'o'#6'Height'#2#29#3'Top'#2']'#5'Width'#3#143#0#8'AutoSize'#9#18'Border' +'utton'#4'Left'#2'o'#6'Height'#2#29#3'Top'#2']'#5'Width'#3#143#0#8'AutoSize'
+'Spacing.Left'#2#6#7'Caption'#6#19'CancelAddFileButton'#7'OnClick'#7#24'Canc' +#9#18'BorderSpacing.Left'#2#6#7'Caption'#6#19'CancelAddFileButton'#7'OnClick'
+'elAddFileButtonClick'#8'TabOrder'#2#5#0#0#0#5'TPage'#12'AddFilesPage'#7'Cap' +#7#24'CancelAddFileButtonClick'#8'TabOrder'#2#5#0#0#0#5'TPage'#12'AddFilesPa'
+'tion'#6#9'Add Files'#11'ClientWidth'#3#242#1#12'ClientHeight'#3#17#1#0#9'TL' +'ge'#7'Caption'#6#9'Add Files'#11'ClientWidth'#3#242#1#12'ClientHeight'#3#17
+'istView'#13'FilesListView'#24'AnchorSideBottom.Control'#7#17'FilesBrowseBut' +#1#0#9'TListView'#13'FilesListView'#24'AnchorSideBottom.Control'#7#17'FilesB'
+'ton'#6'Height'#3#227#0#5'Width'#3#242#1#5'Align'#7#8'alClient'#20'BorderSpa' +'rowseButton'#6'Height'#3#227#0#5'Width'#3#242#1#5'Align'#7#8'alClient'#20'B'
+'cing.Bottom'#2#5#7'Columns'#14#1#7'Caption'#6#8'Filename'#5'Width'#3#200#0#0 +'orderSpacing.Bottom'#2#5#7'Columns'#14#1#7'Caption'#6#8'Filename'#5'Width'#3
+#1#7'Caption'#6#4'Type'#5'Width'#3#24#1#0#0#11'MultiSelect'#9#8'TabOrder'#2#0 +#200#0#0#1#7'Caption'#6#4'Type'#5'Width'#3#24#1#0#0#11'MultiSelect'#9#8'TabO'
+#9'ViewStyle'#7#8'vsReport'#0#0#6'TPanel'#16'AddFilesBtnPanel'#6'Height'#2')' +'rder'#2#0#9'ViewStyle'#7#8'vsReport'#0#0#6'TPanel'#16'AddFilesBtnPanel'#6'H'
+#3'Top'#3#232#0#5'Width'#3#242#1#5'Align'#7#8'alBottom'#8'AutoSize'#9#10'Bev' +'eight'#2')'#3'Top'#3#232#0#5'Width'#3#242#1#5'Align'#7#8'alBottom'#8'AutoSi'
+'elOuter'#7#6'bvNone'#12'ClientHeight'#2')'#11'ClientWidth'#3#242#1#8'TabOrd' +'ze'#9#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'#2')'#11'ClientWidth'#3#242
+'er'#2#1#0#7'TButton'#17'FilesBrowseButton'#21'AnchorSideBottom.Side'#7#9'as' +#1#8'TabOrder'#2#1#0#7'TButton'#17'FilesBrowseButton'#21'AnchorSideBottom.Si'
+'rBottom'#4'Left'#3#25#1#6'Height'#2#29#3'Top'#2#6#5'Width'#3#128#0#5'Align' +'de'#7#9'asrBottom'#4'Left'#3#25#1#6'Height'#2#29#3'Top'#2#6#5'Width'#3#128#0
+#7#6'alLeft'#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#17'File' +#5'Align'#7#6'alLeft'#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6
+'sBrowseButton'#7'OnClick'#7#22'FilesBrowseButtonClick'#8'TabOrder'#2#0#0#0#7 +#17'FilesBrowseButton'#7'OnClick'#7#22'FilesBrowseButtonClick'#8'TabOrder'#2
+'TButton'#14'FilesAddButton'#19'AnchorSideLeft.Side'#7#9'asrBottom'#4'Left'#3 +#0#0#0#7'TButton'#14'FilesAddButton'#19'AnchorSideLeft.Side'#7#9'asrBottom'#4
+#159#1#6'Height'#2#29#3'Top'#2#6#5'Width'#2'k'#5'Align'#7#6'alLeft'#8'AutoSi' +'Left'#3#159#1#6'Height'#2#29#3'Top'#2#6#5'Width'#2'k'#5'Align'#7#6'alLeft'#8
+'ze'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#14'FilesAddButton'#7'OnClic' +'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#14'FilesAddButton'#7
+'k'#7#19'FilesAddButtonClick'#8'TabOrder'#2#1#0#0#7'TBitBtn'#18'FilesShorten' +'OnClick'#7#19'FilesAddButtonClick'#8'TabOrder'#2#1#0#0#7'TBitBtn'#18'FilesS'
+'Button'#19'AnchorSideLeft.Side'#7#9'asrBottom'#4'Left'#3#139#0#6'Height'#2 +'hortenButton'#19'AnchorSideLeft.Side'#7#9'asrBottom'#4'Left'#3#139#0#6'Heig'
+#29#3'Top'#2#6#5'Width'#3#136#0#5'Align'#7#6'alLeft'#8'AutoSize'#9#20'Border' +'ht'#2#29#3'Top'#2#6#5'Width'#3#136#0#5'Align'#7#6'alLeft'#8'AutoSize'#9#20
+'Spacing.Around'#2#6#7'Caption'#6#18'FilesShortenButton'#9'NumGlyphs'#2#0#8 +'BorderSpacing.Around'#2#6#7'Caption'#6#18'FilesShortenButton'#9'NumGlyphs'#2
+'TabOrder'#2#2#0#0#7'TBitBtn'#17'FilesDeleteButton'#19'AnchorSideLeft.Side'#7 +#0#8'TabOrder'#2#2#0#0#7'TBitBtn'#17'FilesDeleteButton'#19'AnchorSideLeft.Si'
+#9'asrBottom'#4'Left'#2#6#6'Height'#2#29#3'Top'#2#6#5'Width'#2''#5'Align'#7 +'de'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#29#3'Top'#2#6#5'Width'#2''#5'Al'
+#6'alLeft'#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#17'FilesD' +'ign'#7#6'alLeft'#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#17
+'eleteButton'#9'NumGlyphs'#2#0#8'TabOrder'#2#3#0#0#0#0#0#0 +'FilesDeleteButton'#9'NumGlyphs'#2#0#8'TabOrder'#2#3#0#0#0#0#0#0
]); ]);

View File

@ -1308,10 +1308,9 @@ begin
coptParsedPlatformIndependent); coptParsedPlatformIndependent);
CustomOptions:=APackage.CompilerOptions.GetCustomOptions( CustomOptions:=APackage.CompilerOptions.GetCustomOptions(
coptParsedPlatformIndependent); coptParsedPlatformIndependent);
if APackage.CompilerOptions.Delphi2Extensions then s:=APackage.CompilerOptions.GetSyntaxOptionsString;
CustomOptions:=CustomOptions+' -S2'; if s<>'' then
if APackage.CompilerOptions.UseLineInfoUnit then CustomOptions:=CustomOptions+' '+s;
CustomOptions:=CustomOptions+' -gl';
// TODO: other options // TODO: other options
//DebugLn('TPkgManager.DoWriteMakefile ',APackage.Name,' makefile UnitPath="',UnitPath,'"'); //DebugLn('TPkgManager.DoWriteMakefile ',APackage.Name,' makefile UnitPath="',UnitPath,'"');