Closed StephenHodgson closed 4 years ago
The need for --changeset 9b001d489a54
is very annoying lol, otherwise I think this would be great! Out of curiosity, what's the oldest version of Unity we could install with this?
I'd have to test some examples of what comes down in the 'releases' list. If it's really limited, I'd wonder if we'd still need to do all our web crawling anyways to find the changesets.
I think you can easily get the change set from the download archive
You mean manually? Or you think it'd be easy automatically with less effort than what we're currently doing? A big value here is that you can get a unity project version, find the installers, then install without any human intervention.
no, using a crawler of some kinda like you suggested above. But adding a change set parameter in the powershell installer probably wouldn't be a bad idea either if someone has a specific one in mind.
Going by the above command list it seems this does not support any license management?
Doesn't matter, you can still pass license to the editor application like usual
That has been done using this PowerShell module so far. Are you saying this doesn't actually replace that part then?
Not at the moment, no. But I think it's on their roadmap.
@jwittner I think it's important to note that if you know where the Unity Project is located you can easily get the revision number in the ProjectVersion.txt
:
m_EditorVersion: 2019.3.11f1
m_EditorVersionWithRevision: 2019.3.11f1 (ceef2d848e70)
Regex:
(?<version>(?:(?<major>\d+)\.)?(?:(?<minor>\d+)\.)?(?:(?<patch>\d+[fab]\d+)\b))|((?:\((?<revision>\w+))\))
@StephenHodgson - that's cool! Unfortunately it's only available for Unity 2019 versions. =(
Fallback is the crawler ;)
Or just compile a list of all the revisions to their versions haha. Have a fast lookup table or something lmao.
Here's a powershell script I've been working on and using in my CI/CD workflow. https://github.com/StephenHodgson/UnityCI/blob/master/InstallUnityHub.ps1
Sadly the Linux stuff doesn't work for whatever reason (bc Unity) https://forum.unity.com/threads/unity-hub-linux-commands-do-not-execute-the-same-as-windows-macos.907538/
But maybe we can support both workflows?
In either case I also asked that it get added to the hosted agent image as well. https://github.com/actions/virtual-environments/issues/1013
Any news on this? I personally tested the Hub cli but my feelings are that it's still really unstable and I don't see really bug fixing on recent releases:
No current plans to do this refactor.
Hub cli is now installed on windows images by default but have not checked mac or linux vms.
I've moved on from this for a while as it's much easier to install the required versions I need via hub and a few short ps scripts.
Closing as original creator no longer needs it, if this is very desirable for others let me know and we can reopen.
Now that the Unity Hub has been out of beta for a while with CLI support, I wonder if it's more beneficial to just download the hub itself, and pass in any commands to it to do the downloading process for us?
This should fix any installation issues for Mac and add Linux support without a lot of additional work
Here's the hub download link:
Unity Hub CLI
Commands
editors
e
Unity\ Hub.app/Contents/MacOS/Unity\ Hub -- --headless editors -r
--releases|-r
only list of available releases promoted by Unity--installed|-i
only list of installed editors on your machineinstall-path
ip
Unity\ Hub.app/Contents/MacOS/Unity\ Hub -- --headless ip -s /Applications/Unity/Hub/Editor/
--set|-s <path>
set the install path to the given path--get|-g
returns the install pathinstall
i
Unity\ Hub.app/Contents/MacOS/Unity\ Hub -- --headless install --version 2019.1.11f1 --changeset 9b001d489a54
--version|-v <version>
editor version to be installed (e.g. 2019.1.11f1) - required--changeset|-c <changeset>
changeset of the editor if it is not in the release list (e.g. 9b001d489a54)-r
--module|-m <moduleid>
see install-modules for more informationinstall-modules
im
Unity\ Hub.app/Contents/MacOS/Unity\ Hub -- --headless install-modules --version 2019.1.11f1 -m ios -m android
--version|-v <version>
version of the editor to add the module to (required)--module|-m <moduleid>
the module id. The followings are the available values depending on version. You can specify multiple values.documentation
standardassets
example
android
ios
appletv
linux
samsung
tizen
webgl
windows
facebook-games
monodevelop
vuforia-ar
language-ja
,language-ko
,language-zh-cn
,language-zh-hant
,language-zh-hans
mac-il2cpp
windows-mono
android-sdk-ndk-tools
lumin