The idea of this Enhancement would be to simplify the usage of the Patcher so Users no longer have to specify their OS, but instead it gets automatically detected in code while keeping the respective OS Flags intact incase someone wants to Patch a Linux executable while running Windows.
Additionally after the OS has been detected we can use the default installation directories (found here: https://docs.unity3d.com/Manual/GettingStartedInstallingHub.html) to present a List of installed Unity Versions to the User. Something like:
Please choose the Unity Version which should get patched:
2018.4.21f1 (Unsupported)
> 2019.3.9f1 (Supported)
2020.1.0b5 (Supported)
The Supported and Unsupported would indicate if we have a matching Patch for that Version. When an Unsupported Version gets selected we could ask the User which Patch it should try to apply, something like:
An Unsupported Version was selected which Patch should be applied?
> 2019.1.0f2
2019.3
2020.1
This would allow people to Patch other Versions in a Release Cycle which we haven't explicitly added but another Patch might work, at least in the same Release Cycle.
After a Version is selected we can build the Path to the actual executable depending on the OS. We can also use the selected Version to get the relevant Patch from the List of Patches, which would probably involve changing how the Patch is selected from the List. Right now its using an Equals-check on the Version specified in the List, but we don't want to define an Entry for every Unity Version so changing the check to a .startsWith or a RegEx match would probably make sense. (Not quite sure what the best option would be going forward).
After that we should have all the relevant information to Patch the executable and just run the same logic as before.
Any suggestions or alternative approaches are welcome!
The idea of this Enhancement would be to simplify the usage of the Patcher so Users no longer have to specify their OS, but instead it gets automatically detected in code while keeping the respective OS Flags intact incase someone wants to Patch a Linux executable while running Windows.
Additionally after the OS has been detected we can use the default installation directories (found here: https://docs.unity3d.com/Manual/GettingStartedInstallingHub.html) to present a List of installed Unity Versions to the User. Something like:
The
SupportedandUnsupportedwould indicate if we have a matching Patch for that Version. When an Unsupported Version gets selected we could ask the User which Patch it should try to apply, something like:This would allow people to Patch other Versions in a Release Cycle which we haven't explicitly added but another Patch might work, at least in the same Release Cycle.
After a Version is selected we can build the Path to the actual executable depending on the OS. We can also use the selected Version to get the relevant Patch from the List of Patches, which would probably involve changing how the Patch is selected from the List. Right now its using an Equals-check on the Version specified in the List, but we don't want to define an Entry for every Unity Version so changing the check to a
.startsWithor a RegEx match would probably make sense. (Not quite sure what the best option would be going forward).After that we should have all the relevant information to Patch the executable and just run the same logic as before.
Any suggestions or alternative approaches are welcome!