Platform-specific project settings/references

I have a solution which contains a number of subprojects. The “main” one is a Cooper/Silver JavaFX test application. Since it has a reference to jfxrt (in a specific folder on my Mac’s drive), bringing the project over to my Windows VM forces me to remove the invalid reference to jfxrt and add a new one pointing to the proper location on the Windows drive. Is there a better way to manage this?

Also, my macOS shared library project (dylib) is used for JNI and, as a standard, needs to have the jnilib extension instead of dylib. I don’t think there’s any place in the project settings that would cover this (and this would have to be platform-specific, again)

Indeed there is. Add a new .xml file in /Users/mh/Library/Application Support/RemObjects Software/Elements/Reference Paths/Cooper and configure in it the path where you want Fire to locate your Java references. Do the same in %APPDATA%\RemObjects Software\Elements\Reference Paths\Cooper on Windows.

Hmm. Currently we dont have an option to influence the file extension of the output — I wasn’t aware that’s a valid thing, to have those not be .dylib. I’ll add an option for vNext. I assume this is only needed for macOS dynamic, libraries, not for Island/Windows/Linux?

Update: Done, setting is called BinaryExtension.

1 Like

Great. I’ll take a look at this.

This is more of a cosmetic/nice to have setting. I’m sure there are some instances where this could be useful on other platforms. Thanks for adding it!

Make sure to check out Reference Search Path XMLs, as well as the other topics under “References”, as well.

1 Like

As the jfxrt.jar file is always in lib/ext (under the JRE folder that Fire/Water already know about), shouldn’t there be a way to specify it in the .elements project file directly (say, using something like $(JRERoot)/lib/ext/jfxrt.jar) ?

Hmm, if its in JRE/lib, kit should be found… I’ll check if maybe I need to add recursion there…

But wait, but is this the Toffee/macOS JNI project we’re talking about, or the Java “host” project?

Fixed, vNext will check recursively in all JRE/lib subfolders for references.

It was the Java host project. Adding recursion should address the issue. I assume this means the reference entry will no longer need the hint location.

Correct. the refs will work w/o HintPath (if one is present and valid, it’ll still be used, if its present but invalid it will be ignored). Add References in Fire and Water will also show them,

I can confirm this works properly in 2271

1 Like

I haven’t found the BinaryExtension option in my macOS shared library project. Is this something that can only be edited within the .elements file?

Anyhow, it worked when I added the option to the project file with a text editor.

1 Like

Correct, this is not (and probably will not be) an officially supported/exposed option, you need to manually add it to the project.