Lines 1-40
Link Here
|
1 |
--- src/uGlobsPaths.pas 2012-03-31 18:38:11.000000000 -0500 |
1 |
--- src/uGlobsPaths.pas.old 2012-02-14 04:46:22.000000000 +0100 |
2 |
+++ src/uGlobsPaths.pas 2012-03-31 18:51:02.000000000 -0500 |
2 |
+++ src/uGlobsPaths.pas 2012-04-24 20:34:12.000000000 +0200 |
3 |
@@ -3,7 +3,7 @@ |
3 |
@@ -3,9 +3,9 @@ |
4 |
interface |
4 |
interface |
5 |
|
5 |
|
6 |
var |
6 |
var |
7 |
- gpExePath : String = ''; // executable directory |
7 |
- gpExePath : String = ''; // executable directory |
8 |
+ gpExePath : String = '%%PREFIX%%/bin'; // executable directory |
8 |
+ gpExePath : String = '%%PREFIX%%/bin'; // executable directory |
9 |
gpCfgDir : String = ''; // directory from which configuration files are used |
9 |
gpCfgDir : String = ''; // directory from which configuration files are used |
10 |
gpGlobalCfgDir : String = ''; // config dir global for all user |
10 |
- gpGlobalCfgDir : String = ''; // config dir global for all user |
|
|
11 |
+ gpGlobalCfgDir : String = '%%DATADIR%%'; // config dir global for all user |
11 |
gpCmdLineCfgDir : String = ''; // config dir passed on the command line |
12 |
gpCmdLineCfgDir : String = ''; // config dir passed on the command line |
12 |
@@ -26,10 +26,10 @@ |
13 |
gpLngDir : String = ''; // path to language *.po files |
13 |
procedure LoadPaths; |
14 |
gpPixmapPath : String = ''; // path to pixmaps |
14 |
begin |
15 |
@@ -29,7 +29,7 @@ |
15 |
OnGetApplicationName := @GetAppName; |
16 |
gpExePath := ExtractFilePath(TryReadAllLinks(ParamStrUTF8(0))); |
16 |
- gpExePath := ExtractFilePath(TryReadAllLinks(ParamStrUTF8(0))); |
|
|
17 |
+// gpExePath := ExtractFilePath(TryReadAllLinks(ParamStrUTF8(0))); |
18 |
DCDebug('Executable directory: ', gpExePath); |
17 |
DCDebug('Executable directory: ', gpExePath); |
19 |
|
18 |
|
20 |
- gpGlobalCfgDir := gpExePath; |
19 |
- gpGlobalCfgDir := gpExePath; |
21 |
+ gpGlobalCfgDir := '%%DATADIR%%'; |
20 |
+ //gpGlobalCfgDir := gpExePath; |
22 |
if gpCmdLineCfgDir <> EmptyStr then |
21 |
if gpCmdLineCfgDir <> EmptyStr then |
23 |
begin |
22 |
begin |
24 |
if GetPathType(gpCmdLineCfgDir) <> ptAbsolute then |
23 |
if GetPathType(gpCmdLineCfgDir) <> ptAbsolute then |
25 |
@@ -48,12 +48,12 @@ |
24 |
@@ -48,13 +48,13 @@ |
26 |
end; |
25 |
end; |
27 |
|
26 |
|
28 |
gpCfgDir := IncludeTrailingPathDelimiter(gpCfgDir); |
27 |
gpCfgDir := IncludeTrailingPathDelimiter(gpCfgDir); |
29 |
- gpLngDir := gpExePath + 'language' + DirectorySeparator; |
28 |
- gpLngDir := gpExePath + 'language' + DirectorySeparator; |
30 |
- gpPixmapPath := gpExePath + 'pixmaps' + DirectorySeparator; |
29 |
- gpPixmapPath := gpExePath + 'pixmaps' + DirectorySeparator; |
31 |
+ gpLngDir := '%%DATADIR%%/' + 'language' + DirectorySeparator; |
30 |
+ gpLngDir := '%%DATADIR%%/' + 'language' + DirectorySeparator; |
32 |
+ gpPixmapPath := '%%DATADIR%%/' + 'pixmaps' + DirectorySeparator; |
31 |
+ gpPixmapPath := '%%DATADIR%%/' + 'pixmaps' + DirectorySeparator; |
33 |
gpCacheDir := GetAppCacheDir; |
32 |
gpCacheDir := GetAppCacheDir; |
34 |
|
33 |
|
35 |
// set up environment variables |
34 |
// set up environment variables |
36 |
- mbSetEnvironmentVariable('commander_path', ExcludeTrailingBackslash(gpExePath)); |
35 |
- mbSetEnvironmentVariable('COMMANDER_DRIVE', ExtractRootDir(gpExePath)); |
37 |
+ mbSetEnvironmentVariable('commander_path', ExcludeTrailingBackslash('%%DATADIR%%/')); |
36 |
- mbSetEnvironmentVariable('COMMANDER_PATH', ExcludeTrailingBackslash(gpExePath)); |
|
|
37 |
+ mbSetEnvironmentVariable('COMMANDER_DRIVE', ExtractRootDir('%%DATADIR%%')); |
38 |
+ mbSetEnvironmentVariable('COMMANDER_PATH', ExcludeTrailingBackslash('%%DATADIR%%')); |
38 |
end; |
39 |
end; |
39 |
|
40 |
|
40 |
end. |
41 |
end. |