* replace nodefaults with nofpccfg, the nodefaults was the same as not

specifying a config file

git-svn-id: trunk@9234 -
This commit is contained in:
peter 2007-11-13 18:38:14 +00:00
parent ae45cfefce
commit ebbb2db336

View File

@ -576,6 +576,7 @@ Type
FRemove: String; FRemove: String;
FTarget: String; FTarget: String;
FUnixPaths: Boolean; FUnixPaths: Boolean;
FNoFPCCfg: Boolean;
FSourceExt : String; FSourceExt : String;
function GetLocalUnitDir: String; function GetLocalUnitDir: String;
function GetGlobalUnitDir: String; function GetGlobalUnitDir: String;
@ -612,6 +613,7 @@ Type
Property UnixPaths : Boolean Read FUnixPaths Write FUnixPaths; Property UnixPaths : Boolean Read FUnixPaths Write FUnixPaths;
Property Options : String Read FOptions Write FOptions; // Default compiler options. Property Options : String Read FOptions Write FOptions; // Default compiler options.
Property SourceExt : String Read FSourceExt Write FSourceExt; Property SourceExt : String Read FSourceExt Write FSourceExt;
Property NoFPCCfg : Boolean Read FNoFPCCfg Write FNoFPCCfg;
// paths etc. // paths etc.
Property LocalUnitDir : String Read GetLocalUnitDir Write SetLocalUnitDir; Property LocalUnitDir : String Read GetLocalUnitDir Write SetLocalUnitDir;
Property GlobalUnitDir : String Read GetGlobalUnitDir Write SetGlobalUnitDir; Property GlobalUnitDir : String Read GetGlobalUnitDir Write SetGlobalUnitDir;
@ -1001,7 +1003,7 @@ ResourceString
SHelpTarget = 'Compile for indicated target'; SHelpTarget = 'Compile for indicated target';
SHelpList = 'list commands instead of actually executing them.'; SHelpList = 'list commands instead of actually executing them.';
SHelpPrefix = 'Use indicated prefix directory for all commands.'; SHelpPrefix = 'Use indicated prefix directory for all commands.';
SHelpNoDefaults = 'Do not use defaults when compiling.'; SHelpNoFPCCfg = 'Compiler will not use fpc.cfg';
SHelpBaseInstallDir = 'Use indicated directory as base install dir.'; SHelpBaseInstallDir = 'Use indicated directory as base install dir.';
SHelpLocalUnitDir = 'Use indicated directory as local (user) unit dir.'; SHelpLocalUnitDir = 'Use indicated directory as local (user) unit dir.';
SHelpGlobalUnitDir = 'Use indicated directory as global unit dir.'; SHelpGlobalUnitDir = 'Use indicated directory as global unit dir.';
@ -1024,6 +1026,7 @@ Const
KeyMode = 'Mode'; KeyMode = 'Mode';
KeyPrefix = 'Prefix'; KeyPrefix = 'Prefix';
KeyTarget = 'Target'; KeyTarget = 'Target';
KeyNoFPCCfg = 'NoFPCCfg';
KeyLocalUnitDir = 'LocalUnitDir'; KeyLocalUnitDir = 'LocalUnitDir';
KeyGlobalUnitDir = 'GlobalUnitDir'; KeyGlobalUnitDir = 'GlobalUnitDir';
KeyBaseInstallDir = 'BaseInstallDir'; KeyBaseInstallDir = 'BaseInstallDir';
@ -2128,6 +2131,7 @@ begin
UnixPaths:=False; UnixPaths:=False;
{$endif} {$endif}
FSourceExt:=PPExt; FSourceExt:=PPExt;
FNoFPCCfg:=False;
end; end;
@ -2279,6 +2283,8 @@ begin
Values[KeyRemove]:=FRemove; Values[KeyRemove]:=FRemove;
Values[KeyTarget]:=FTarget; Values[KeyTarget]:=FTarget;
Values[KeySourceExt]:=FSourceExt; Values[KeySourceExt]:=FSourceExt;
if FNoFPCCfg then
Values[KeyNoFPCCfg]:='Y';
end; end;
L.SaveToStream(S); L.SaveToStream(S);
Finally Finally
@ -2337,6 +2343,7 @@ begin
FSourceExt:=Values[KeySourceExt]; FSourceExt:=Values[KeySourceExt];
If (FSourceExt='') then If (FSourceExt='') then
FSourceExt:=PPExt; FSourceExt:=PPExt;
FNoFPCCfg:=(Upcase(Values[KeyNoFPCCfg])='Y');
end; end;
Finally Finally
L.Free; L.Free;
@ -2609,12 +2616,10 @@ procedure TCustomInstaller.AnalyzeOptions;
Var Var
I : Integer; I : Integer;
Nodefaults : Boolean;
DefaultsFileName : string; DefaultsFileName : string;
begin begin
I:=0; I:=0;
NoDefaults:=False;
FListMode:=False; FListMode:=False;
FLogLevels := [vlError,vlWarning,vlInfo]; FLogLevels := [vlError,vlWarning,vlInfo];
While (I<ParamCount) do While (I<ParamCount) do
@ -2654,8 +2659,8 @@ begin
FListMode:=True FListMode:=True
else if Checkoption(I,'P','prefix') then else if Checkoption(I,'P','prefix') then
Defaults.Prefix:=OptionArg(I) Defaults.Prefix:=OptionArg(I)
else if Checkoption(I,'n','nodefaults') then else if Checkoption(I,'n','nofpccfg') then
NoDefaults:=true Defaults.NoFPCCfg:=true
else if CheckOption(I,'B','baseinstalldir') then else if CheckOption(I,'B','baseinstalldir') then
Defaults.BaseInstallDir:=OptionArg(I) Defaults.BaseInstallDir:=OptionArg(I)
else if CheckOption(I,'UL','localunitdir') then else if CheckOption(I,'UL','localunitdir') then
@ -2671,7 +2676,7 @@ begin
Usage(SErrInValidArgument,[I,ParamStr(I)]); Usage(SErrInValidArgument,[I,ParamStr(I)]);
end; end;
end; end;
If Not NoDefaults then If DefaultsFileName<>'' then
Defaults.LocalInit(DefaultsFileName); Defaults.LocalInit(DefaultsFileName);
Defaults.CompilerDefaults; Defaults.CompilerDefaults;
{$ifdef debug} {$ifdef debug}
@ -2710,7 +2715,7 @@ begin
Log(vlInfo,SHelpCmdOptions); Log(vlInfo,SHelpCmdOptions);
LogOption('h','help',SHelpHelp); LogOption('h','help',SHelpHelp);
LogOption('l','list-commands',SHelpList); LogOption('l','list-commands',SHelpList);
LogOption('n','nodefaults',SHelpNoDefaults); LogOption('n','nofpccfg',SHelpNoFPCCfg);
LogOption('v','verbose',SHelpVerbose); LogOption('v','verbose',SHelpVerbose);
LogArgOption('C','CPU',SHelpCPU); LogArgOption('C','CPU',SHelpCPU);
LogArgOption('O','OS',SHelpOS); LogArgOption('O','OS',SHelpOS);