install-unity icon indicating copy to clipboard operation
install-unity copied to clipboard

Windows support

Open ewilh opened this issue 3 years ago • 2 comments

Added Windows support to the project.

Had to remove net472 support and go directly to net6, so I'm not sure if Mac support still works.

ewilh avatar Aug 08 '22 12:08 ewilh

Cool, thanks for the PR!

Will take a bit of time before I can review and merge this, thanks for your patience.

net472 was there for Homebrew, which only had mono and no proper net5.0/net6.0 support. Now there's a dotnet formula for Homebrew, so I'll hopefully get it working with net6.0, Homebrew and dotnet.

sttz avatar Aug 21 '22 14:08 sttz

Hey, I released v2.11.0 as preparation for the windows support, to remove net472 support and move everything to net6.0.

I've also merged your PR into the windows branch and added some fixes and changes.

Most notably:

  • Default install path is "C:\Program Files". This mirrors behaviour on macOS where Unity is not installed to the same location as Unity Hub does. This is configurable and I'll probably add a section to the readme to explain how to install into the same location as the Hub.
  • Paths that are searched for Unity installations are now configurable, which allows to install the Unity editors in a completely custom location.

Outstanding issues:

  • Privilege elevation does not work for me. Installing or uninstalling Unity results in a "The Requested Operation Requires Elevation" error. It does work when I run the Command Prompt as administrator. Does this work for you?
  • Run does not support detaching. As far as I could gather, this is not possible in C# directly but it should be possible to PInvoke CreateProcess with the CREATE_NEW_PROCESS_GROUP and DETACHED_PROCESS flags.

Feel free to update your PR if you have further changes.

I also appreciate anyone testing the windows branch.

sttz avatar Sep 05 '22 19:09 sttz