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

getInstallPrefix() returns a wrong path #161

Open
sevaa opened this issue Aug 26, 2016 · 1 comment
Open

getInstallPrefix() returns a wrong path #161

sevaa opened this issue Aug 26, 2016 · 1 comment

Comments

@sevaa
Copy link

sevaa commented Aug 26, 2016

I'm hacking Cura on Windows. That requires Uranium. I have a clone of Cura repository in d:\dev\Cura, a clone of the Uranium repository under d:\dev\Uranium. The latter is in PYTHONPATH.

The startup file of Cura is d:\dev\Cura\cura_app.py. When I start Cura, sys.argv[0] contains "D:\dev\Cura\cura_app.py", and Uranium's UM.Application.getInstallPrefix() returns the parent of that, which is "d:\dev", which can't be right.

Maybe when Cura is installed into Program Files, the folder hierarchy is different and cura_app.py goes into some folder below the install path.

@awhiemstra
Copy link
Contributor

It is actually correct, but getInstalltionPrefix() is rather useless on non-Linux machines or when running directly from source. The installation prefix is assumed to be the directory one level higher than the application's main script, because on Linux the usual installation location is $prefix/bin/$executable. In your case, on Windows, this ends up being C:\dev. This should cause no problems as far as I know, since we only use it as a base path in certain locations like the resource lookup, which would most of the time just ignore it since it would resolve a resource location to a non-existing directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants