Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/HeadlessWrapper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ function ConPrintTable(tbl, noRecurse) end
function ConExecute(cmd) end
function ConClear() end
function SpawnProcess(cmdName, args) end
function SpawnProcessHidden(cmdName, args)
return SpawnProcess(cmdName, args)
end
function OpenURL(url) end
function SetProfiling(isEnabled) end
function Restart() end
Expand Down
13 changes: 12 additions & 1 deletion src/Launch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,22 @@ function launch:DownloadPage(url, callback, params)
end
end

function launch:StartRuntimeUpdateProcess()
local runtimePath = GetRuntimePath()
local args = "UpdateApply.lua Update/opFileRuntime.txt"
if isWindows and SpawnProcessHidden then
SpawnProcessHidden(runtimePath.."/Update", args)
else
SpawnProcess(runtimePath.."/Update", args)
end
return true
end

function launch:ApplyUpdate(mode)
if mode == "basic" then
-- Need to revert to the basic environment to fully apply the update
LoadModule("UpdateApply", "Update/opFile.txt")
SpawnProcess(GetRuntimePath()..'/Update', 'UpdateApply.lua Update/opFileRuntime.txt')
self:StartRuntimeUpdateProcess()
Exit()
elseif mode == "normal" then
-- Update can be applied while normal environment is running
Expand Down