Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support to detect game installations by uninstaller location #18916

Merged
merged 1 commit into from
Mar 20, 2021

Conversation

Mailaender
Copy link
Member

This is for cases where no InstallFolder is available, but the uninstaller executable location is written to the registry and it is located in the game directory, which is quite common place in the 90s.

@pchote
Copy link
Member

pchote commented Dec 12, 2020

This sounds reasonable, but can you please link to a specific example for this? I assume this is being implemented for a mod.

@Mailaender
Copy link
Member Author

image

@pchote
Copy link
Member

pchote commented Dec 12, 2020

Have you tested that this does not break the existing use case? The documentation at https://docs.microsoft.com/en-us/dotnet/api/system.io.path.getdirectoryname?view=net-5.0 suggests that it will.

/*
This code produces the following output:
...
GetDirectoryName('C:\MyDir\MySubDir') returns 'C:\MyDir'
...
*/

@Mailaender
Copy link
Member Author

I didn't expect that behavior from the function. However, the Origin installation has trailing \ which should work:

image

GetDirectoryName('C:\MyDir\') returns 'C:\MyDir'

Can't test this as OpenRA is stuck checking for the disc drive. I have a DVD drive, but it is not detected by Windows 10.

image

@pchote
Copy link
Member

pchote commented Dec 24, 2020

I think a better approach here would be to rename SourceType.Install to SourceType.RegistryDirectory and then add a new SourceType.RegistryDirectoryFromFile that is used to distinguish between the two behaviours.

@Mailaender
Copy link
Member Author

Yes, I agree that will be safer.

Copy link
Member

@pchote pchote left a comment

Choose a reason for hiding this comment

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

This looks fine to me, but one more simplification inline below. We have had several bugfixes in the installation logic recently, so can you please also rebase this on the latest bleed?

@Mailaender
Copy link
Member Author

Updated as instructed.

Copy link
Member

@pchote pchote left a comment

Choose a reason for hiding this comment

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

LGTM but not tested

Copy link
Contributor

@reaperrr reaperrr left a comment

Choose a reason for hiding this comment

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

Also untested, but lgtm anyway

@reaperrr reaperrr merged commit e13fd48 into OpenRA:bleed Mar 20, 2021
@Mailaender Mailaender deleted the install-from-uninstaller branch March 20, 2021 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants