|
@@ -869,6 +869,7 @@ Type
|
|
FRunMode: TRunMode;
|
|
FRunMode: TRunMode;
|
|
FListMode : Boolean;
|
|
FListMode : Boolean;
|
|
FLogLevels : TVerboseLevels;
|
|
FLogLevels : TVerboseLevels;
|
|
|
|
+ FFPMakeOptionsString: string;
|
|
Protected
|
|
Protected
|
|
Procedure Log(Level : TVerboseLevel; Const Msg : String);
|
|
Procedure Log(Level : TVerboseLevel; Const Msg : String);
|
|
Procedure CreatePackages; virtual;
|
|
Procedure CreatePackages; virtual;
|
|
@@ -891,6 +892,7 @@ Type
|
|
Destructor destroy; override;
|
|
Destructor destroy; override;
|
|
Function AddPackage(Const AName : String) : TPackage;
|
|
Function AddPackage(Const AName : String) : TPackage;
|
|
Function Run : Boolean;
|
|
Function Run : Boolean;
|
|
|
|
+ Property FPMakeOptionsString: string read FFPMakeOptionsString;
|
|
//files in package
|
|
//files in package
|
|
Property Packages : TPackages Read GetPackages;
|
|
Property Packages : TPackages Read GetPackages;
|
|
Property RunMode : TRunMode Read FRunMode;
|
|
Property RunMode : TRunMode Read FRunMode;
|
|
@@ -1145,6 +1147,8 @@ Const
|
|
KeyNeedLibC = 'NeedLibC';
|
|
KeyNeedLibC = 'NeedLibC';
|
|
KeyDepends = 'Depends';
|
|
KeyDepends = 'Depends';
|
|
KeyAddIn = 'FPMakeAddIn';
|
|
KeyAddIn = 'FPMakeAddIn';
|
|
|
|
+ KeySourcePath = 'SourcePath';
|
|
|
|
+ KeyFPMakeOptions = 'FPMakeOptions';
|
|
|
|
|
|
{****************************************************************************
|
|
{****************************************************************************
|
|
Helpers
|
|
Helpers
|
|
@@ -2553,6 +2557,9 @@ begin
|
|
Values[KeyChecksum]:=IntToStr(DateTimeToFileDate(Now));
|
|
Values[KeyChecksum]:=IntToStr(DateTimeToFileDate(Now));
|
|
Values[KeyCPU]:=CPUToString(ACPU);
|
|
Values[KeyCPU]:=CPUToString(ACPU);
|
|
Values[KeyOS]:=OSToString(AOS);
|
|
Values[KeyOS]:=OSToString(AOS);
|
|
|
|
+ //Installer;
|
|
|
|
+ Values[KeySourcePath]:=IncludeTrailingPathDelimiter(IncludeTrailingPathDelimiter(Installer.BuildEngine.FStartDir)+Directory);
|
|
|
|
+ Values[KeyFPMakeOptions]:=trim(Installer.FPMakeOptionsString);
|
|
Deps:='';
|
|
Deps:='';
|
|
for i:=0 to Dependencies.Count-1 do
|
|
for i:=0 to Dependencies.Count-1 do
|
|
begin
|
|
begin
|
|
@@ -3130,12 +3137,13 @@ end;
|
|
|
|
|
|
procedure TCustomInstaller.AnalyzeOptions;
|
|
procedure TCustomInstaller.AnalyzeOptions;
|
|
|
|
|
|
- Function CheckOption(Index : Integer;const Short,Long : String): Boolean;
|
|
|
|
|
|
+ Function CheckOption(Index : Integer;const Short,Long : String; AddToOptionString: boolean = true): Boolean;
|
|
var
|
|
var
|
|
O : String;
|
|
O : String;
|
|
begin
|
|
begin
|
|
O:=Paramstr(Index);
|
|
O:=Paramstr(Index);
|
|
Result:=(O='-'+short) or (O='--'+long) or (copy(O,1,Length(Long)+3)=('--'+long+'='));
|
|
Result:=(O='-'+short) or (O='--'+long) or (copy(O,1,Length(Long)+3)=('--'+long+'='));
|
|
|
|
+ if AddToOptionString and Result then FFPMakeOptionsString := FFPMakeOptionsString+' '+O;
|
|
end;
|
|
end;
|
|
|
|
|
|
Function CheckCustomOption(Index : Integer; out CustOptName: string): Boolean;
|
|
Function CheckCustomOption(Index : Integer; out CustOptName: string): Boolean;
|
|
@@ -3154,6 +3162,7 @@ procedure TCustomInstaller.AnalyzeOptions;
|
|
O:=copy(O,3,i-3);
|
|
O:=copy(O,3,i-3);
|
|
CustOptName:=O;
|
|
CustOptName:=O;
|
|
Result:=CustomFpmakeCommandlineOptions.IndexOfName(O)>-1;
|
|
Result:=CustomFpmakeCommandlineOptions.IndexOfName(O)>-1;
|
|
|
|
+ if Result then FFPMakeOptionsString := FFPMakeOptionsString+' '+Paramstr(Index);
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
@@ -3220,9 +3229,9 @@ begin
|
|
While (I<ParamCount) do
|
|
While (I<ParamCount) do
|
|
begin
|
|
begin
|
|
Inc(I);
|
|
Inc(I);
|
|
- if CheckOption(I,'v','verbose') then
|
|
|
|
|
|
+ if CheckOption(I,'v','verbose',false) then
|
|
FLogLevels:=AllMessages
|
|
FLogLevels:=AllMessages
|
|
- else if CheckOption(I,'d','debug') then
|
|
|
|
|
|
+ else if CheckOption(I,'d','debug',false) then
|
|
FLogLevels:=AllMessages+[vlDebug]
|
|
FLogLevels:=AllMessages+[vlDebug]
|
|
else if CheckCommand(I,'m','compile') then
|
|
else if CheckCommand(I,'m','compile') then
|
|
FRunMode:=rmCompile
|
|
FRunMode:=rmCompile
|