aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/UPlatform.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-09-02 13:34:19 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-09-02 13:34:19 +0000
commit4859734e7e6699e5c88added2df53ba3ff168300 (patch)
treec68eb09eda915b976265a4e58e1568a75223ff29 /src/classes/UPlatform.pas
parentfded3a5ed753bd0fff77fb73ab9abcd8ad715e59 (diff)
downloadusdx-4859734e7e6699e5c88added2df53ba3ff168300.tar.gz
usdx-4859734e7e6699e5c88added2df53ba3ff168300.tar.xz
usdx-4859734e7e6699e5c88added2df53ba3ff168300.zip
- removed configure options --enable-local/global
- instead for - global build: just type "make" and "make install" - local build: just type "make" and start "game/ultrastardx" git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1338 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/classes/UPlatform.pas')
-rw-r--r--src/classes/UPlatform.pas9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/classes/UPlatform.pas b/src/classes/UPlatform.pas
index b71ac1b8..1dcdb5b9 100644
--- a/src/classes/UPlatform.pas
+++ b/src/classes/UPlatform.pas
@@ -25,6 +25,7 @@ type
TDirectoryEntryArray = array of TDirectoryEntry;
TPlatform = class
+ function GetExecutionDir(): string;
procedure Init; virtual;
function DirectoryFindFiles(Dir, Filter: WideString; ReturnAllSubDirs: boolean): TDirectoryEntryArray; virtual; abstract;
function TerminateIfAlreadyRunning(var WndTitle : string): boolean; virtual;
@@ -81,6 +82,14 @@ begin
System.Halt;
end;
+{**
+ * Returns the directory of the executable
+ *}
+function TPlatform.GetExecutionDir(): string;
+begin
+ Result := ExtractFilePath(ParamStr(0));
+end;
+
(**
* Default TerminateIfAlreadyRunning() implementation
*)