Re: Propose for a patch to avoid duplicate native libs integration for supporting different windows os
Hi Matthias, thanks for your replay. I would prefer "windows" because this corresponds to "linux". An other open question is if there should be an equivialent patch for the JNA stuff. I will have a look at this. An other question is where are the files I have to patch to add the new behavoir into http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/ api.html#jni Its not in the Bootstrap module where the source code lives which is to patch. I can prepere a patch. I think this has low priority but for be it can be a "starter"-patch to learn the complete workflow for a pull request. best regards Oliver > Hi Oliver, > > Am Sonntag, den 04.03.2018, 22:55 +0100 schrieb Oliver Rettig: > > Yes, you are right. It is possible to put all files in the > > modules/lib/amd64 folder to be loaded > > on all 64 bit jvms on windows, but than in the same directory I have > > also the .so-files for the > > linux os. > > > > I think it is more clearly arranged, if the linux and windows files > > are not mixed in the same > > folder. > > > > I have also tryed some linux os and I got always > > > > os.name=linux > > > > I am not sure, if the property is for all linux systems "linux". If > > it is it is different to the > > windows os, where I get "windows 10" ... > > I'm ok with a patch implementing this. One thing, that might be > relevant is the question whether windows or win32 is the better name. > > Greetings > > Matthias > > - > To unsubscribe, e-mail: dev-unsubscr...@netbeans.incubator.apache.org > For additional commands, e-mail: dev-h...@netbeans.incubator.apache.org > > For further information about the NetBeans mailing lists, visit: > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Propose for a patch to avoid duplicate native libs integration for supporting different windows os
Hi Oliver, Am Sonntag, den 04.03.2018, 22:55 +0100 schrieb Oliver Rettig: > Yes, you are right. It is possible to put all files in the > modules/lib/amd64 folder to be loaded > on all 64 bit jvms on windows, but than in the same directory I have > also the .so-files for the > linux os. > > I think it is more clearly arranged, if the linux and windows files > are not mixed in the same > folder. > > I have also tryed some linux os and I got always > > os.name=linux > > I am not sure, if the property is for all linux systems "linux". If > it is it is different to the > windows os, where I get "windows 10" ... I'm ok with a patch implementing this. One thing, that might be relevant is the question whether windows or win32 is the better name. Greetings Matthias - To unsubscribe, e-mail: dev-unsubscr...@netbeans.incubator.apache.org For additional commands, e-mail: dev-h...@netbeans.incubator.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Propose for a patch to avoid duplicate native libs integration for supporting different windows os
Yeah, using searching also for "windows" or similar, when "windows X" search yields nothing is fine idea. At least I think. -jt 2018-03-04 22:55 GMT+01:00 Oliver Rettig : > Hi Matthias, > > thanks for your help. > > > So if you place your .dll in the modules/lib/amd64 directory, it should > > be loaded on all 64 bit JVMs on windows. > Yes, you are right. It is possible to put all files in the > modules/lib/amd64 folder to be loaded > on all 64 bit jvms on windows, but than in the same directory I have also > the .so-files for the > linux os. > > I think it is more clearly arranged, if the linux and windows files are > not mixed in the same > folder. > > I have also tryed some linux os and I got always > > os.name=linux > > I am not sure, if the property is for all linux systems "linux". If it is > it is different to the > windows os, where I get "windows 10" ... > > best regards > Oliver > > > >
Re: Propose for a patch to avoid duplicate native libs integration for supporting different windows os
Hi Matthias, thanks for your help. > So if you place your .dll in the modules/lib/amd64 directory, it should > be loaded on all 64 bit JVMs on windows. Yes, you are right. It is possible to put all files in the modules/lib/amd64 folder to be loaded on all 64 bit jvms on windows, but than in the same directory I have also the .so-files for the linux os. I think it is more clearly arranged, if the linux and windows files are not mixed in the same folder. I have also tryed some linux os and I got always os.name=linux I am not sure, if the property is for all linux systems "linux". If it is it is different to the windows os, where I get "windows 10" ... best regards Oliver
Re: Propose for a patch to avoid duplicate native libs integration for supporting different windows os
Hi Oliver, Am Sonntag, den 04.03.2018, 17:46 +0100 schrieb Oliver Rettig: > integration of native libs in the netbeans platform works fine for > windows, linux, 32bit, 64bit > etc. as described in > > http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html#jni > > > I want to propose some simple lines of code to add in this method > which additional search in > the the folder > > modules/lib//windows for the native libs > > if the value of the environment variable os.name starts with > "windows" but the libs are not > found in the folder modules/lib// > > Does it make sense for you? Any better ideas to solve the problem? > JNA follows a similar pattern and normalizes all windows versions to win32. However for netbeans there is a simpler solution (from the docs): The System.loadLibrary call originating from the module code will try to locate the library file in the following order of directories: modules/lib/ modules/lib// modules/lib/// So if you place your .dll in the modules/lib/amd64 directory, it should be loaded on all 64 bit JVMs on windows. As I'm not aware of any platform apart from windows, that uses the .dll suffix, this should work for you. Maybe this helps already? Greetings Matthias - To unsubscribe, e-mail: dev-unsubscr...@netbeans.incubator.apache.org For additional commands, e-mail: dev-h...@netbeans.incubator.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Propose for a patch to avoid duplicate native libs integration for supporting different windows os
Hi, integration of native libs in the netbeans platform works fine for windows, linux, 32bit, 64bit etc. as described in http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/ api.html#jni Selection of the needed platform dependend native libs is based on the environment variables os.name which is set to values like "windows 8", "windows 10", ... and if I want to support more than one windows versions with my platform app, I have to duplicate my native libs into several sub folder of e.g modules/lib/amd64/windows 8 modules/lib/amd64/windows 10 although for all windows os I want to integrate the same libs. The search code which looks for the libs is implemented in the Bootstrap module in the class StandardModule in the method findLibrary. I want to propose some simple lines of code to add in this method which additional search in the the folder modules/lib//windows for the native libs if the value of the environment variable os.name starts with "windows" but the libs are not found in the folder modules/lib// Does it make sense for you? Any better ideas to solve the problem? best regards Oliver