From: DeaDDooMER Date: Tue, 23 May 2023 18:21:48 +0000 (+0300) Subject: osx: fix map test on osx X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=1478a411d9959a016392bb83b6e2260360159758;p=d2df-editor.git osx: fix map test on osx --- diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas index 2bf10e6..8e76360 100644 --- a/src/editor/f_main.pas +++ b/src/editor/f_main.pas @@ -6766,7 +6766,7 @@ begin // Сохраняем временную карту: time := 0; repeat - newWAD := ExtractFilePath(TestD2dExe) + Format('maps/temp%.4d', [time]); + newWAD := Format('%s/temp%.4d', [MapsDir, time]); Inc(time); until not FileExists(newWAD); if OpenedMap <> '' then @@ -6782,7 +6782,6 @@ begin end; tempMap := newWAD + ':\' + TEST_MAP_NAME; SaveMap(tempMap); - tempMap := ExtractRelativePath(ExtractFilePath(TestD2dExe) + 'maps/', tempMap); // Опции игры: opt := 32 + 64; @@ -6800,6 +6799,11 @@ begin // Запускаем: proc := TProcessUTF8.Create(nil); proc.Executable := TestD2dExe; + {$IFDEF DARWIN} + // TODO: get real executable name from Info.plist + if LowerCase(ExtractFileExt(TestD2dExe)) = '.app' then + proc.Executable := TestD2dExe + DirectorySeparator + 'Contents' + DirectorySeparator + 'MacOS' + DirectorySeparator + 'Doom2DF'; + {$ENDIF} proc.Parameters.Add('-map'); proc.Parameters.Add(tempMap); proc.Parameters.Add('-gm');