diff options
author | jaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-12-20 22:53:06 +0000 |
---|---|---|
committer | jaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-12-20 22:53:06 +0000 |
commit | d808dde8310ecfd659d36bfe1ba77e76ea43b6c0 (patch) | |
tree | f543ce5b19adeb686d309f60117bdb550fc3a0e8 | |
parent | 8d367ca3e9d49fbac6798f5aad0be03f8e5cfeec (diff) | |
download | usdx-d808dde8310ecfd659d36bfe1ba77e76ea43b6c0.tar.gz usdx-d808dde8310ecfd659d36bfe1ba77e76ea43b6c0.tar.xz usdx-d808dde8310ecfd659d36bfe1ba77e76ea43b6c0.zip |
added -localpaths command line switch
so we dont always have to use the packaged locations.
( profox )
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@737 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r-- | Game/Code/Classes/UCommandLine.pas | 5 | ||||
-rw-r--r-- | Game/Code/Classes/UPlatformLinux.pas | 16 |
2 files changed, 17 insertions, 4 deletions
diff --git a/Game/Code/Classes/UCommandLine.pas b/Game/Code/Classes/UCommandLine.pas index e99ee37a..86f822a4 100644 --- a/Game/Code/Classes/UCommandLine.pas +++ b/Game/Code/Classes/UCommandLine.pas @@ -56,6 +56,7 @@ var const cHelp = 'help'; cMediaInterfaces = 'showinterfaces'; + cUseLocalPaths = 'localpaths'; implementation @@ -93,7 +94,9 @@ begin writeln( '' ); writeln( ' '+s( 'Switch' ) +' : Purpose' ); writeln( ' ----------------------------------------------------------' ); - writeln( ' '+s( cMediaInterfaces ) + ' : Show in-use media interfaces' ); + writeln( ' '+s( cMediaInterfaces ) + #9 + ' : Show in-use media interfaces' ); + writeln( ' '+s( cUseLocalPaths ) + #9 + ' : Use relative paths' ); + writeln( '' ); halt; diff --git a/Game/Code/Classes/UPlatformLinux.pas b/Game/Code/Classes/UPlatformLinux.pas index 03e04560..0098baee 100644 --- a/Game/Code/Classes/UPlatformLinux.pas +++ b/Game/Code/Classes/UPlatformLinux.pas @@ -27,6 +27,7 @@ implementation uses libc, + uCommandLine, {$IFNDEF FPC_V220} oldlinux, {$ELSE} @@ -123,17 +124,26 @@ end; function TPlatformLinux.GetLogPath : WideString; begin - result := '/var/log/UltraStarDeluxe/'; + if FindCmdLineSwitch( cUseLocalPaths ) then + result := inherited + else + result := '/var/log/UltraStarDeluxe/'; end; function TPlatformLinux.GetGameSharedPath : WideString; begin - result := '/usr/share/UltraStarDeluxe/'; + if FindCmdLineSwitch( cUseLocalPaths ) then + result := inherited + else + result := '/usr/share/UltraStarDeluxe/'; end; function TPlatformLinux.GetGameUserPath : WideString; begin - result := get_homedir()+'/.UltraStarDeluxe/'; + if FindCmdLineSwitch( cUseLocalPaths ) then + result := inherited + else + result := get_homedir()+'/.UltraStarDeluxe/'; end; function TPlatformLinux.get_homedir(): string; |