|
@@ -96,6 +96,10 @@ var
|
|
LogHandler: TLogProc;
|
|
LogHandler: TLogProc;
|
|
ErrorHandler: TPkgErrorProc;
|
|
ErrorHandler: TPkgErrorProc;
|
|
|
|
|
|
|
|
+function GetFppkgConfigFile(Global : Boolean; SubDir : Boolean): string;
|
|
|
|
+function GetFppkgConfigDir(Global : Boolean): string;
|
|
|
|
+
|
|
|
|
+
|
|
Implementation
|
|
Implementation
|
|
|
|
|
|
// define use_shell to use sysutils.executeprocess
|
|
// define use_shell to use sysutils.executeprocess
|
|
@@ -420,11 +424,42 @@ begin
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+function GetFppkgConfigFile(Global : Boolean; SubDir : Boolean): string;
|
|
|
|
+var
|
|
|
|
+ StoredOnGetApplicationName: TGetAppNameEvent;
|
|
|
|
+ StoredOnGetVendorName: TGetVendorNameEvent;
|
|
|
|
+begin
|
|
|
|
+ StoredOnGetApplicationName := OnGetApplicationName;
|
|
|
|
+ StoredOnGetVendorName := OnGetVendorName;
|
|
|
|
+ try
|
|
|
|
+ OnGetApplicationName := @FPPkgGetApplicationName;
|
|
|
|
+ OnGetVendorName := @FPPkgGetVendorName;
|
|
|
|
+ result := GetAppConfigFile(Global, SubDir);
|
|
|
|
+ finally
|
|
|
|
+ OnGetApplicationName := StoredOnGetApplicationName;
|
|
|
|
+ OnGetVendorName := StoredOnGetVendorName;
|
|
|
|
+ end;
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+function GetFppkgConfigDir(Global : Boolean): string;
|
|
|
|
+var
|
|
|
|
+ StoredOnGetApplicationName: TGetAppNameEvent;
|
|
|
|
+ StoredOnGetVendorName: TGetVendorNameEvent;
|
|
|
|
+begin
|
|
|
|
+ StoredOnGetApplicationName := OnGetApplicationName;
|
|
|
|
+ StoredOnGetVendorName := OnGetVendorName;
|
|
|
|
+ try
|
|
|
|
+ OnGetApplicationName := @FPPkgGetApplicationName;
|
|
|
|
+ OnGetVendorName := @FPPkgGetVendorName;
|
|
|
|
+ result := GetAppConfigDir(Global);
|
|
|
|
+ finally
|
|
|
|
+ OnGetApplicationName := StoredOnGetApplicationName;
|
|
|
|
+ OnGetVendorName := StoredOnGetVendorName;
|
|
|
|
+ end;
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
|
|
initialization
|
|
initialization
|
|
- OnGetVendorName:=@FPPkgGetVendorName;
|
|
|
|
- OnGetApplicationName:=@FPPkgGetApplicationName;
|
|
|
|
LogHandler := @LogCmd;
|
|
LogHandler := @LogCmd;
|
|
ErrorHandler := @ErrorCmd;
|
|
ErrorHandler := @ErrorCmd;
|
|
-
|
|
|
|
end.
|
|
end.
|