Changes needed to detect new-style installation

This commit is contained in:
ppoelzl
2020-06-27 11:16:23 +02:00
parent 4c916adc57
commit 189f7b8d9d
2 changed files with 7 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ SetMainObject(launch)
function launch:OnInit()
self.devMode = false
self.installedMode = false
self.versionNumber = "?"
self.versionBranch = "?"
self.versionPlatform = "?"
@@ -53,6 +54,11 @@ function launch:OnInit()
-- Enable dev mode to disable updates and set user path to be the script path
self.devMode = true
end
local installedFile = io.open("installed.cfg", "r")
if installedFile then
self.installedMode = true
installedFile:close()
end
RenderInit()
ConPrintf("Loading main script...")
local errMsg

View File

@@ -43,7 +43,7 @@ function main:Init()
self.modes["LIST"] = LoadModule("Modules/BuildList")
self.modes["BUILD"] = LoadModule("Modules/Build")
if launch.devMode or GetScriptPath() == GetRuntimePath() then
if launch.devMode or (GetScriptPath() == GetRuntimePath() and not launch.installedMode) then
-- If running in dev mode or standalone mode, put user data in the script path
self.userPath = GetScriptPath().."/"
else