Changes needed to detect new-style installation
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user