unitysetup.powershell icon indicating copy to clipboard operation
unitysetup.powershell copied to clipboard

Incorrect Order Downloading / Installing

Open Ziugy opened this issue 6 years ago • 6 comments

Having a list of installers with the Lumin installer in the list fails to properly install the Lumin component because of download and install order.

Install starts by downloading only Lumin before the editor and other components and then attempts to install Lumin which then fails since the editor was not downloaded and installed first.

Commands to repro below. (Assumes fresh install.)

D:\> $installers = Find-UnitySetupInstaller 2019.1.0f2 -Components All
WARNING: Unable to find installer for the StandardAssets component.
WARNING: Unable to find installer for the UWP_IL2CPP component.
WARNING: Unable to find installer for the Mac_IL2CPP component.
D:\> $installers += Find-UnitySetupInstaller 2019.1.0f2 -Components Lumin
D:\> $installers | Format-Table

 ComponentType Version       Length LastModified         DownloadUrl
 ------------- -------       ------ ------------         -----------
       Windows 2019.1.0f2 765004664 4/15/2019 6:16:28 AM https://netstorage.unity3d.com/unity/292b93d75a2c/Windows64EditorInstaller/UnitySetup64-2019.1.0f2.exe
         Linux 2019.1.0f2 176670984 4/15/2019 6:18:18 AM https://netstorage.unity3d.com/unity/292b93d75a2c/TargetSupportInstaller/UnitySetup-Linux-Support-for-Editor-20...
           Mac 2019.1.0f2  81021088 4/15/2019 6:18:30 AM https://netstorage.unity3d.com/unity/292b93d75a2c/TargetSupportInstaller/UnitySetup-Mac-Mono-Support-for-Editor...
 Documentation 2019.1.0f2 302884184 4/15/2019 6:19:24 AM https://netstorage.unity3d.com/unity/292b93d75a2c/WindowsDocumentationInstaller/UnityDocumentationSetup-2019.1....
Windows_IL2CPP 2019.1.0f2  59137256 4/15/2019 6:19:07 AM https://netstorage.unity3d.com/unity/292b93d75a2c/TargetSupportInstaller/UnitySetup-Windows-IL2CPP-Support-for-...
           UWP 2019.1.0f2 273275800 4/15/2019 6:18:44 AM https://netstorage.unity3d.com/unity/292b93d75a2c/TargetSupportInstaller/UnitySetup-Universal-Windows-Platform-...
       Android 2019.1.0f2 481429688 4/15/2019 6:16:58 AM https://netstorage.unity3d.com/unity/292b93d75a2c/TargetSupportInstaller/UnitySetup-Android-Support-for-Editor-...
           iOS 2019.1.0f2 895919584 4/15/2019 6:18:09 AM https://netstorage.unity3d.com/unity/292b93d75a2c/TargetSupportInstaller/UnitySetup-iOS-Support-for-Editor-2019...
       AppleTV 2019.1.0f2 328364240 4/15/2019 6:17:19 AM https://netstorage.unity3d.com/unity/292b93d75a2c/TargetSupportInstaller/UnitySetup-AppleTV-Support-for-Editor-...
      Facebook 2019.1.0f2  36121584 4/15/2019 6:17:21 AM https://netstorage.unity3d.com/unity/292b93d75a2c/TargetSupportInstaller/UnitySetup-Facebook-Games-Support-for-...
       Vuforia 2019.1.0f2 101001032 4/15/2019 6:18:49 AM https://netstorage.unity3d.com/unity/292b93d75a2c/TargetSupportInstaller/UnitySetup-Vuforia-AR-Support-for-Edit...
         WebGL 2019.1.0f2 235860856 4/15/2019 6:19:03 AM https://netstorage.unity3d.com/unity/292b93d75a2c/TargetSupportInstaller/UnitySetup-WebGL-Support-for-Editor-20...
         Lumin 2019.1.0f2 145120904 4/15/2019 6:18:26 AM https://netstorage.unity3d.com/unity/292b93d75a2c/TargetSupportInstaller/UnitySetup-Lumin-Support-for-Editor-20...


D:\> $installers | Install-UnitySetupInstance

Ziugy avatar May 02 '19 20:05 Ziugy

IMO this issue blocks #164

Ziugy avatar May 02 '19 20:05 Ziugy

Wondering if this was an issue before Lumin was added?

Is it an issue with the order in general? I just added it to the end of the list, and implemented the corresponding component checks. https://github.com/Microsoft/unitysetup.powershell/pull/148/files

StephenHodgson avatar May 02 '19 23:05 StephenHodgson

Ah, yes, it is unrelated to Lumin. We return in order of the enum, but that assumes you aren't installing the core installers from other platforms.

jwittner avatar May 03 '19 00:05 jwittner

Thinking we should process all the contents of the pipeline to determine components that are missing, then put the platform installer at the front, then install. Thoughts on that?

jwittner avatar May 03 '19 00:05 jwittner

Workaround

Pass all the installers to the -Installers parameter and the platform installer will be selected first if available.

Note: We'll make this simple pipelining work across platforms in the near future without any sorting on your part.

jwittner avatar May 03 '19 15:05 jwittner

If you ensure you select and install the component matching the OS first, then install all the rest of them, you won't see this.

I think this is also related to #162. We should likely include the editor platform by default based on the detected OS

StephenHodgson avatar May 03 '19 15:05 StephenHodgson