Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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: 0 additions & 3 deletions src/HeadlessWrapper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,6 @@ function ConPrintTable(tbl, noRecurse) end
function ConExecute(cmd) end
function ConClear() end
function SpawnProcess(cmdName, args) end
function GetProcessCount(names)
return 1
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You wanna keep this to pass CI

function OpenURL(url) end
function SetProfiling(isEnabled) end
function Restart() end
Expand Down
16 changes: 1 addition & 15 deletions src/Launch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ local updateProcessCandidates = {
-- Returns the total number of running processes that match any known PoB executable names.
local function getMatchingProcessCount()
if not isWindows then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using isWindows anywhere, just call the function and return the error. You could make the error say something platform related on the C++ side.

-- Non-Windows platforms rely on manual confirmation instead of auto-detection.
return 1
return nil, "Process detection only supported on Windows"
end

if not GetProcessCount then
Expand Down Expand Up @@ -358,9 +357,6 @@ function launch:ApplyUpdate(mode)
if not self:EnsureUpdateExclusiveAccess() then
return
end
if not isWindows then
self.runtimeUpdateManualConfirmPromptShown = nil
end
-- 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')
Expand All @@ -386,16 +382,6 @@ function launch:GetAdditionalInstanceCount()
end

function launch:EnsureUpdateExclusiveAccess()
if not isWindows then
-- On Unix-like platforms the updater cannot reliably detect sibling processes, so require manual confirmation.
if not self.runtimeUpdateManualConfirmPromptShown then
self.runtimeUpdateManualConfirmPromptShown = true
local prompt = "^3Linux/Unix confirmation required:^0\n\nClose every other Path of Building window before updating core runtime files.\nOnce all other instances are closed, press Update again to continue.\n\nPress Enter or Escape to dismiss this message."
self:ShowPrompt(1, 0.5, 0, prompt)
return false
end
return true
end
-- Block runtime updates until all other PoB processes exit to avoid DLL write failures.
local otherCount, err = self:GetAdditionalInstanceCount()
if otherCount == nil then
Expand Down
Loading