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

U3D_EXTRA_PATHS is improperly interpreted on Windows #383

Closed
bdominguez opened this issue Nov 20, 2019 · 5 comments · Fixed by #388
Closed

U3D_EXTRA_PATHS is improperly interpreted on Windows #383

bdominguez opened this issue Nov 20, 2019 · 5 comments · Fixed by #388

Comments

@bdominguez
Copy link

Commands:

u3d install 2019.2.12f1 --installation_path "C:\Program Files\Unity\Unity_2019.2.12f1"

u3d install 2019.2.12f1 -p Universal-Windows-Platform --installation_path "C:\Program Files\Unity\Unity_2019.2.12f1"

Log:

E:\workspace\test>u3d install 2019.2.12f1 --installation_path "C:\Program Files\Unity\Unity_2019.2.12f1" 
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/u3d-1.2.1/lib/u3d/installation.rb:324: warning: Win32API is deprecated after Ruby 1.9.1; use fiddle directly instead
Root privileges are required
Unity 2019.2.12f1 is already downloaded
--------------------------------------------
--- Installing Unity 2019.2.12f1 (Unity) ---
--------------------------------------------
Installing with //Apps/Unity/Windows/2019.2.12f1/UnitySetup64.exe
$ //Apps/Unity/Windows/2019.2.12f1/UnitySetup64.exe -UI=reduced /S /D=C:\Program Files\Unity\Unity_2019.2.12f1
No pty implementation found. Falling back to popen. Output might be buffered
Successfully installed Unity 2019.2.12f1
[Pipeline] isUnix
[Pipeline] bat

E:\workspace\test>u3d install 2019.2.12f1 -p Universal-Windows-Platform --installation_path "C:\Program Files\Unity\Unity_2019.2.12f1" 
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/u3d-1.2.1/lib/u3d/installation.rb:324: warning: Win32API is deprecated after Ruby 1.9.1; use fiddle directly instead
Please install Unity before any of its packages
@bdominguez
Copy link
Author

I think I understand the problem, but it seems to me that the behavior has changed.

Before I could not indicate the parameter "-p" if I just wanted to install the editor without any additional platform.

Later, if I wanted to install a platform, I would indicate the "-p" parameter next to the platform/s I wanted.

Now it seems that if I do so, when executing the second command he doesn't know that the editor is installed.

It seems that I have to do it in one command and install the editor as another module with "Unity":

u3d install 2019.2.12f1 -p Unity,Universal-Windows-Platform --installation_path "C:\Program Files\Unity\Unity_2019.2.12f1"

Can you confirm if I'm doing the right thing @niezbop ?

@niezbop
Copy link
Member

niezbop commented Nov 20, 2019

You're absolutely right, you are supposed to be able to do this.

The issue is that as you specify your installation_path for the installation, u3d does not manage to find your installation (it only looks for C:\Program File\Unity_<VERSION> patterns). So what you need to do is to to tell him where to look for (#371 brought the issue and #373 fixed it).

You want to run U3D_EXTRA_PATHS="C:\Program Files\Unity\" u3d install 2019.2.12f1 -p Universal-Windows-Platform, or export U3D_EXTRA_PATHS in your environment first.

The idea is that if u3d list can't find the version you just installed, then u3d install -p whatever will fail since it cannot find Unity.

NOTE: I can't recall exactly how installation_path works on Windows, so you may want to check that the installation was not done under C:\Program Files\Unity\Unity_2019.2.12f1\Unity_2019.2.12f1, in which case you would need to set U3D_EXTRA_PATHS to C:\Program Files\Unity\Unity_2019.2.12f1 (basically the parent directory of your unity installs)!

Let me know if this helps, and feel free to close the issue if this solved it!

@bdominguez
Copy link
Author

bdominguez commented Nov 20, 2019

It seems that it doesn't work correctly:

image

image

Update: Update screenshot with --verbose option

@bdominguez
Copy link
Author

bdominguez commented Nov 20, 2019

The problem is the backslash. I need to replace "\" with "/" in order to work.

It should be fix for Windows or at least documented.

@niezbop
Copy link
Member

niezbop commented Nov 20, 2019

Yep, I just tested that on a Windows, and it works. I agree that we are missing documentation there or it should parse it for Windows paths. I'll leave this issue opened until this is documented.

@lacostej lacostej changed the title Error installing Unity editor and then a module U3D_EXTRA_PATHS is inproperly interpreted on Windows Nov 22, 2019
@lacostej lacostej changed the title U3D_EXTRA_PATHS is inproperly interpreted on Windows U3D_EXTRA_PATHS is improperly interpreted on Windows Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants