aboutsummaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
authorcanni0 <canni0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-01-26 02:03:18 +0000
committercanni0 <canni0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-01-26 02:03:18 +0000
commitca4174bf978fc74150b6b619bbb68ae3d53e4f2c (patch)
treed1be4c34f6b90e69f2f9c0e69796d991aa05b4c3 /src/base
parent8a5aebdd230d32c453292f480be693b08028e619 (diff)
downloadusdx-ca4174bf978fc74150b6b619bbb68ae3d53e4f2c.tar.gz
usdx-ca4174bf978fc74150b6b619bbb68ae3d53e4f2c.tar.xz
usdx-ca4174bf978fc74150b6b619bbb68ae3d53e4f2c.zip
- added windows version check in addition to commit #2094
Behaviour changes as follows: Use local path (old behaviour) if ... - ... config.ini is detected -> use local path (old behaviour) Use global path (%APPDATA%/ultrastardx) if ... - ... no config.ini is present (allows portable installations) - ... user is running Vista or later git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2097 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/base')
-rw-r--r--src/base/UPlatformWindows.pas11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/base/UPlatformWindows.pas b/src/base/UPlatformWindows.pas
index 102ae67a..cf69a359 100644
--- a/src/base/UPlatformWindows.pas
+++ b/src/base/UPlatformWindows.pas
@@ -129,7 +129,7 @@ end;
* of usdx prior to version 1.1
* - It is global if no config.ini exists in the directory of the
* executable the config files are in a separate folder
- * (e.g. APPDATA\ultrastardx)
+ * (e.g. %APPDATA%\ultrastardx)
* On windows resources (themes, language-files)
* reside in the directory of the executable in every case
*
@@ -138,12 +138,15 @@ end;
procedure TPlatformWindows.DetectLocalExecution();
var
LocalDir, ConfigIni: IPath;
+ OSVerInfo: TOSVersionInfo;
begin
- // we just check if the 'languages' folder exists in the
- // directory of the executable. If so -> local execution.
+ // we just check if 'config.ini' exists in the
+ // directory of the executable or if windows version
+ // is less than Windows Vista (major version = 6).
+ // If so -> local execution.
LocalDir := GetExecutionDir();
ConfigIni := LocalDir.Append('config.ini');
- UseLocalDirs := (ConfigIni.IsFile and ConfigIni.Exists);
+ UseLocalDirs := ((ConfigIni.IsFile and ConfigIni.Exists) and (OSVerInfo.dwMajorVersion < 6));
end;
function TPlatformWindows.GetLogPath: IPath;