Skip to content

Conversation

@LocalIdentity
Copy link
Contributor

Description of the problem being solved:

When PoB updates its runtime files it will fail to update if you have more than 1 instance of PoB open. This PR adds a check for if you have more than 1 instance open and will not let you update until you've closed them

Steps taken to verify a working solution:

  • Test on Wine (Paliak)
  • Test on Windows beta branch

After screenshot:

image

LocalIdentity added 3 commits October 24, 2025 17:37
Adds a safeguard when updating runtime files that all other instances of PoB are closed so that the updater doesn't run into issues
For linux systems it instead shows a popup as we can't reliably detect the instance count
mode == "basic" already means we are touching runtime files so no need for extra work
@LocalIdentity LocalIdentity added the enhancement New feature, calculation, or mod label Oct 24, 2025
@LocalIdentity LocalIdentity added the pob1 Should also be merged into PoB1 Repo label Oct 25, 2025
Comment on lines 155 to 157
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


-- 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.

Copy link
Member

@Wires77 Wires77 left a comment

Choose a reason for hiding this comment

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

This works well, though the white error box is a bit jarring. Maybe we can use updateErrMsg instead, like this:
image

The only concern with this approach would be that the message gets missed or ignored.

Code for this if you want to use it:

		local prompt = string.format("%d other Path of Building %s %s open.\nClose other copies before applying this update,\nthen press Update again.", otherCount, instanceLabel, verb)
		--self:ShowPrompt(1, 0.5, 0, prompt)
		self.updateErrMsg = prompt

We'd have to mess with the Update button behavior and title text too to make it perfect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature, calculation, or mod pob1 Should also be merged into PoB1 Repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants