haxeui / hxWidgets

Haxe externs (and wrappers) for wxWidgets
MIT License
77 stars 23 forks source link

Replace haxelib:hxWidgets usage for lix support #65

Closed Aidan63 closed 4 years ago

Aidan63 commented 4 years ago

Hello, Mentioned not too long ago in the discord channel that hxWidgets doesn't work with lix, and that it seemed to be related to the haxelib: usage. With 1.0 out I decided to take another look and get a fix working! This replaces all haxelib: usage with a custom HXWIDGETS_PATH define which points to the root of the library, the way this is calculated is the same way all the linc libraries do it.

I've tested this with Windows and Linux with the haxeui component examples and it works fine (this repos hxwidget samples fail a wxwidget assert on launch though).

Cheers.

ianharrigan commented 4 years ago

OK, isnt the "problem" with this that the user now has to define the ENV var or things will break? Or if they move the lib they need to update it? Howcome lix doesnt work with "haxelib:xyz", shouldnt that also work in lix, and resolve to whereever lix is getting haxelibs from?

although, i just noticed this: var define = '<set name="HXWIDGETS_PATH" value="$libPath/"/>'; that does work correctly across the board?

Aidan63 commented 4 years ago

Not sure why lix doesn't work with haxelib: stuff (didn't know it existed until I looked at the build xml) and I have been meaning to open a issue about it in the haxeshim repo. This change shouldn't break anything though, and the user doesn't need to manually define the variable as its calculated in the entry macro based on the files position.

ianharrigan commented 4 years ago

Nice one... thanks... works just fine. Wasnt sure about the "../../.." but was reading the code incorrectly, i dont think its really that bad a solution at all, i mean, the file is in the lib, so its just getting the root of that file really.

Ill merge and make a release.

Aidan63 commented 4 years ago

Thanks!