Skip to content

Commit

Permalink
Debian updates
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed Oct 14, 2021
1 parent 32fc76c commit a6d4c85
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions common/userdir.pas
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ function AppDir2: string; //e.g. c:\folder\ for c:\folder\myapp.exe, but /folder
{$ELSE}
function AppDir: string; //e.g. c:\folder\ for c:\folder\myapp.exe, but /folder/myapp.app/ for /folder/myapp.app/app
begin
result := extractfilepath(paramstr(0));
{$IFDEF Linux}
result := '/usr/share/mricron/';
if not DirExists(result) then
result := '/usr/share/mricron/';
{$ENDIF}
result := extractfilepath(paramstr(0));
end;

function AppDir2: string;
Expand Down
9 changes: 7 additions & 2 deletions nifti_img_view.pas
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,10 @@ implementation
{$R *.DFM}
{$ENDIF}

procedure printf(s: string);
begin
{$IFDEF UNIX} writeln(s); {$ENDIF}
end;
function TImgForm.OpenDialogExecute (lFilter,lCaption: string; lAllowMultiSelect: boolean): boolean;
begin
OpenHdrDlg.Filter := lFilter;
Expand Down Expand Up @@ -1973,13 +1977,14 @@ procedure TImgForm.FormCreate(Sender: TObject);
{$ENDIF}
{$ENDIF}
gTemplateDir := extractfilepath(paramstr(0))+'Resources'+pathdelim+'templates';
if not direxists(gTemplateDir) then
if not direxists(gTemplateDir) then
gTemplateDir := extractfilepath(paramstr(0))+'templates';
{$IFDEF Unix}
if not fileexists(gTemplateDir) then
if not direxists(gTemplateDir) then
gTemplateDir := AppDir + 'templates';
//showmessage(gTemplateDir);
{$ENDIF}
printf('Loading templates from Templates: '+gTemplateDir);
UpdateTemplates;
for lInc := 1 to knMRU do
gMRUstr[lInc] := '';
Expand Down

0 comments on commit a6d4c85

Please sign in to comment.