aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/UCommandLine.pas5
-rw-r--r--Game/Code/Classes/UPlatformLinux.pas16
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;