haxelib icon indicating copy to clipboard operation
haxelib copied to clipboard

Using HAXEPATH Environment Variable

Open drkibitz opened this issue 12 years ago • 9 comments

This issue is in regards to the HAXEPATH environment variable, and the specificity it has to Windows. This should not be the case, the logic used in checking the value should be the same for all platforms. Would be very helpful for any other more complex environments.

drkibitz avatar Nov 06 '13 19:11 drkibitz

This is also related https://github.com/HaxeFoundation/haxelib/issues/93

drkibitz avatar Nov 06 '13 19:11 drkibitz

Can you elaborate on this one? I think HAXEPATH really is a windows only thing, while HAXELIB_PATH is the cross platform way to set the path through environment variables.

back2dos avatar Mar 15 '15 09:03 back2dos

I don't see an issue here either.

Simn avatar Dec 09 '15 17:12 Simn

Maybe a reference to this https://github.com/HaxeFoundation/haxelib/blob/master/src/tools/haxelib/Main.hx#L980-L994 The fact that HAXEPATH is used as a default value if HAXELIB_PATH isn't set and there's no .haxelib in the user's home directory but only on windows.

ibilon avatar Dec 09 '15 19:12 ibilon

Let's reopen this one to see if we can remove the use of HAXEPATH even on Windows :) See https://github.com/HaxeFoundation/haxelib/commit/bd5740ca589287acc719c62a5e9dd0049ce1b905#commitcomment-14917006

andyli avatar Dec 11 '15 03:12 andyli

HAXEPATH is set by Windows installer. We don't want users on Windows to have to run haxelib setup before being able to install libraries.

ncannasse avatar Dec 11 '15 20:12 ncannasse

Yes, but can't we achieve this by determining haxelib.exe folder somehow and using that instead of HAXEPATH?

nadako avatar Dec 11 '15 20:12 nadako

That's usually how I would do :) So if at some point HAXEPATH was used someone must have had a problem with it. Can't tell unless we look at full history

ncannasse avatar Dec 11 '15 21:12 ncannasse

I think we can try using Sys.executablePath() on Windows, since we're always dealing with haxelib.exe there. Unless we want to change it to some haxelib.cmd batch file that does haxe --run haxelib.client.Main

nadako avatar Dec 15 '15 23:12 nadako