From e0f79449eedac343fbac90b72b7a6792e8e940e9 Mon Sep 17 00:00:00 2001 From: tobigun Date: Wed, 6 Feb 2008 09:59:51 +0000 Subject: fixed the configure stuff though it needs some further adjustments git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@835 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UPlatformLinux.pas | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'Game/Code/Classes') diff --git a/Game/Code/Classes/UPlatformLinux.pas b/Game/Code/Classes/UPlatformLinux.pas index b962d8a5..fe4bbf11 100644 --- a/Game/Code/Classes/UPlatformLinux.pas +++ b/Game/Code/Classes/UPlatformLinux.pas @@ -43,7 +43,8 @@ uses {$ELSE} oldlinux, {$ENDIF} - SysUtils; + SysUtils, + UConfig; {$IFDEF FPC_VERSION_2_2_0_PLUS} Function TPlatformLinux.DirectoryFindFiles(Dir, Filter : WideString; ReturnAllSubDirs : Boolean) : TDirectoryEntryArray; @@ -137,7 +138,11 @@ begin if FindCmdLineSwitch( cUseLocalPaths ) then result := ExtractFilePath(ParamStr(0)) else - result := '/var/log/UltraStarDeluxe/'; +{$IFDEF UseLocalDirs} + result := ExtractFilePath(ParamStr(0)) +{$ELSE} + result := LogPath+'/'; +{$ENDIF} end; function TPlatformLinux.GetGameSharedPath : WideString; @@ -145,7 +150,11 @@ begin if FindCmdLineSwitch( cUseLocalPaths ) then result := ExtractFilePath(ParamStr(0)) else - result := '/usr/share/UltraStarDeluxe/'; +{$IFDEF UseLocalDirs} + result := ExtractFilePath(ParamStr(0)) +{$ELSE} + result := SharedPath+'/'; +{$ENDIF} end; function TPlatformLinux.GetGameUserPath : WideString; @@ -153,7 +162,11 @@ begin if FindCmdLineSwitch( cUseLocalPaths ) then result := ExtractFilePath(ParamStr(0)) else - result := get_homedir()+'/.UltraStarDeluxe/'; +{$IFDEF UseLocalDirs} + result := ExtractFilePath(ParamStr(0)) +{$ELSE} + result := get_homedir()+'/.'+PathSuffix+'/'; +{$ENDIF} end; function TPlatformLinux.get_homedir(): string; -- cgit v1.2.3