openfl / lime

A foundational Haxe framework for cross-platform development
https://lime.openfl.org/
MIT License
753 stars 365 forks source link

Custom Path for ndll's #1676

Closed MAJigsaw77 closed 1 year ago

MAJigsaw77 commented 1 year ago

Is this possible with the current version of lime?

player-03 commented 1 year ago

I don't believe so. There are several places where the path is more or less hard-coded.

MAJigsaw77 commented 1 year ago

This should be a cool future if added cause we would be able to use any dir we want for libs

player-03 commented 1 year ago

Hang on, are you trying to override lime.ndll, or add your own ndll?

MAJigsaw77 commented 1 year ago

Hang on, are you trying to override lime.ndll, or add your own ndll?

Nah, I just want to use another dir than ndll/Platform one for libs

player-03 commented 1 year ago

Can you give an example of a library you're trying to add? I still can't tell if you're trying to override lime.ndll.

MAJigsaw77 commented 1 year ago

Can you give an example of a library you're trying to add? I still can't tell if you're trying to override lime.ndll.

For example, I'm trying to add libvlc.so into a application and i need to add ndll in include.xml but I want to use a custom path for it, to not use ndll folder

MAJigsaw77 commented 1 year ago

I'm not trying to override that lime.ndll xd

player-03 commented 1 year ago

Ok, I see what you're getting at. Luckily, I think the option you want is available, it just isn't documented. Instead we have to look at the source code.

Judging from the source, you can set the following attributes in project.xml:

<ndll name="[name]" haxelib="[optional]" dir="[subdirectory]" type="[static or dynamic]" register="[optional]" />

So try something like <ndll name="libvlc.so" dir="your/file/path" if="cpp" />, and if that doesn't work, try <dependency path="your/file/path/libvlc.so" if="cpp" />.

MAJigsaw77 commented 1 year ago

I'll try

MAJigsaw77 commented 1 year ago

It works, thank you for helping