Skip to content

Commit

Permalink
Path adjustment stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
nick f authored and nick f committed Dec 13, 2023
1 parent 241c5e8 commit 18e311f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
14 changes: 1 addition & 13 deletions src/hUGETracker.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -187,20 +187,9 @@
<OpenInFileMan Value="True"/>
</PublishOptions>
<RunParams>
<environment>
<UserOverrides Count="1">
<Variable0 Name="PATH" Value="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"/>
</UserOverrides>
</environment>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default">
<environment>
<UserOverrides Count="1">
<Variable0 Name="PATH" Value="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"/>
</UserOverrides>
</environment>
</Mode0>
<Mode0 Name="default"/>
</Modes>
</RunParams>
<RequiredPackages Count="5">
Expand Down Expand Up @@ -375,7 +364,6 @@
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<Libraries Value="\usr\local\lib\"/>
<OtherUnitFiles Value="Pascal-SDL-2-Headers"/>
<UnitOutputDirectory Value="lib\Development\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
Expand Down
8 changes: 4 additions & 4 deletions src/hugesettings.pas
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ procedure InitializeTrackerSettings;
{$if defined(LINUX) or defined(FREEBSD) or defined(OPENBSD)}
XDGConfigDir := GetEnvironmentVariable('XDG_CONFIG_HOME');
if XDGConfigDir = '' then
XDGConfigDir := ConcatPaths([GetEnvironmentVariable('HOME'), '.config', 'hUGETracker']);
XDGConfigDir := ConcatPaths([GetUserDir, '.config', 'hUGETracker']);

XDGCacheDir := GetEnvironmentVariable('XDG_CACHE_HOME');
if XDGCacheDir = '' then
XDGCacheDir := ConcatPaths([GetEnvironmentVariable('HOME'), '.cache', 'hUGETracker']);
XDGCacheDir := ConcatPaths([GetUserDir, '.cache', 'hUGETracker']);

if not DirectoryExists(XDGConfigDir) then CreateDir(XDGConfigDir);
if not DirectoryExists(XDGCacheDir) then CreateDir(XDGCacheDir);
Expand All @@ -97,8 +97,8 @@ procedure InitializeTrackerSettings;
{$endif}

{$ifdef DARWIN}
MacConfigDir := ConcatPaths([GetEnvironmentVariable('HOME'), '.config', 'hUGETracker']);
MacCacheDir := ConcatPaths([GetEnvironmentVariable('HOME'), '.cache', 'hUGETracker']);
MacConfigDir := ConcatPaths([GetUserDir, '.config', 'hUGETracker']);
MacCacheDir := ConcatPaths([GetUserDir, '.cache', 'hUGETracker']);

if not DirectoryExists(MacConfigDir) then CreateDir(MacConfigDir);
if not DirectoryExists(MacCacheDir) then CreateDir(MacCacheDir);
Expand Down

0 comments on commit 18e311f

Please sign in to comment.