From 4859734e7e6699e5c88added2df53ba3ff168300 Mon Sep 17 00:00:00 2001 From: tobigun Date: Tue, 2 Sep 2008 13:34:19 +0000 Subject: - 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 --- src/classes/UPlatform.pas | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/classes/UPlatform.pas') 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 *) -- cgit v1.2.3