install4j: Changing pref_jre.cfg on MacOS doesn't work - install4j

We use install4j for our software and we have our own autoupdate procedure (which perform update of JRE too). We try to change the location of JRE using pref_jre.cfg. On Windows it is working as expected - running our application with /create-i4j-log tells that JRE folder is the same as in pref_jre.cfg. But on MacOS it doesn't work. E.g. if I rename jre.bundle in .install4j folder to v2.jre.bundle, than change pref_jre.cfg appropriately, than run with INSTALL4J_LOG=yes - the log says that JRE is /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home that is not that I expect.
Can installj4 on MacOS use path to JRE defined in pref_jre.cfg?

Indeed, this is currently not implemented on macOS. A workaround is to create a symbolic link from .install4j/jre.bundle to the JRE that should be used.
In the case of a single bundle, the link should be created in Contents/Resources/jre.bundle.

Related

Install4j is not keeping link in prebuild JREs for MacOS

in our install4j script we are using a prebuild jre. The tar.gz file contains a link for MacOS and Linux. When installing on linux, the link is kept. When installing on MacOS (in Version 8.0.8, it did work in 8.0.4), the link is replaced by a real file.
Contents/MacOS/libjli.dylib -> ../Home/jre/lib/jli/libjli.dylib
After installing, the file Contents/MacOS/libjli.dylib is not a link any more, but a real file. It seems that the Eclipse-launcher has a problem with this, it does not start with this error:
Error: could not find libjava.dylib
Failed to GetJREPath()
If the file Contents/MacOS/libjli.dylib is changed back to a link, the Eclipse-Launcher will start again.
I have a temporary solution in my setup.install4j script to remove that file and create a link (action for both exists), but it would be nice to to modify the links in the tar.gz of a prebuild jre.
To be able to fully sign and notarize a JDK bundle on macOS, the file Contents/MacOS/libjli.dylib cannot be a symlink.
See
https://bugs.openjdk.java.net/browse/JDK-8235687
These are new requirements from Apple that have been introduced by notarization.
However, recent JDK versions fix the problems introduced by that change:
https://bugs.openjdk.java.net/browse/JDK-8238225

How to eliminate RubyMine false "No such file to load" errors

I've recently installed RubyMine on a second machine and cloned a GitHub repository there.
My application runs exactly the same as on the first machine, but the RM code inspection result is radically different: I get dozens of "No such file to load" errors.
This even though the application runs fine both from the command line and from RM.
In dialog Run/Debug Configurations, I have specified load paths (-I. -I..) in the Ruby arguments.
Does the code inspection not honor the configuration? Or perhaps it's using a different configuration?
A bit late, but you may need to mark the directories that are load path roots in your app within the Rubymine tree - right click and do "Mark Directory As/Load Path Root".
For me the other solutions did not work. However, the problem was that RubyMine detected the wrong ruby version - while rvm for the project was ruby 2.4.1, in RubyMine it defaulted to the last version it had (2.4.2). So going to RubyMine > Preferences > Ruby SDK & Gems and changing the version for the project to the correct one solved it.
If you use the "Mark Directory As/Load Path Root" action, this will apply for IDE autocompletion only. It will not be propagated onto the interpreter (as it would be in PyCharm with Python).
You have to either keep using the -I switch, or configure $LOAD_PATH in your code, or (preferably) set up a Gem project with bundler support. You can then configure the path in a gemspec file. See https://www.jetbrains.com/help/ruby/creating-gem-project.html.
Sources:
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206741945-Load-Path-not-working-at-all-
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206727915-Building-RubyGems-lib-in-load-path-
You can try changing Project Path Mappings and set relative Local Path and Remote Path to get it to work.

Change installed language in quite-mode

I'm trying to change the installed language with install4j, according to the documentation the parameter I should use is:
-Dinstall4j.language=[ISO code]
I'd like it to install in English but it keeps installing it in Swedish, the iso-codes I've tried is: en and En_us.
This is how I add the parameter, is this correct or am I doing something wrong?
> .\Setup_64bit.exe -Dinstall4j.language=en
Environment: Windows 7, Powershell, Install4j 5.1.6
The simplest way I found to solve this was installing it locally on a OS with the correct language selection. Then I went to the .install4j folder(which can be found in the same folder where your application is installed) and inside this folder there is a response.varfile. The .varfile can be put next to the installation .exe, and if given the same name as the .exe file but with .varfile the installer will automatically use this response-file to select language! :)
Using -Dinstall4j.language=en is correct, but if you have already installed it before, a "Load a response file" action in your project will load the response file from previous installation and override the selection on the command line.

Location of Blackberry code-signing "previous Blackberry Java Development installation directory" in Import Existing Keys (Eclipse BB plugin)

I need to sign the code of my BB application for an update but I've changed computers and I just have a copy of all the files on the previous one's hard drive. When I try to "Import Existing Keys" in the Eclipse BB plugin I am prompted to "select previous BlackBerry Java Development installation directory." To which directory is this prompt referring and where might I find it (where is it placed by default?)
When you originally install code signing keys from RIM, and use them, the toolset will generate three files:
sigtool.csk
sigtool.db
sigtool.set (maybe not needed?)
These are the files that Eclipse wants.
So, you could just use Windows explorer (or Mac equivalent if on OS X) to search for the folder that has those files.
Depending on your situation, it could be in different places. It could be in the user's .eclipse directory:
C:\Users\myname\.eclipse\
Or, it could be under the BlackBerry JDE / Eclipse plugin installation directory. For example,
C:\Eclipse\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.36\components\bin
For completeness, I'll dig up a couple old computers, and see where they have the code signing files installed, but for your purposes, doing a filesearch for *.csk is probably the easiest way to go.
Reference
Backup and Restore BlackBerry Code Signing Keys :
The files that need to be backed up are sigtool.csk and sigtool.db and
are located in the directories outlined below. Their location will
vary based on the tool used to install them. All paths below are
relative to the tool's installation directory. To restore or enable
your code signing keys in another application, copy the sigtool.csk
and sigtool.db to the directories outlined below.
BlackBerry® Java® Plug-in for Eclipse®:
.\Eclipse\plugins\net.rim.ejde\vmTools
BlackBerry® Java® Development Environment (BlackBerry JDE): .\BlackBerry JDE #.#.#\bin
BlackBerry® WebWorks™ SDK: .\BlackBerry WebWorks Packager\bin

Program "make" not found in PATH

I'm having the Program "make" not found in PATH error in eclipse. I checked the path variable which is:
C:\cygwin\bin;
%JAVA_HOME%\bin;
%ANT_HOME%\bin;
%ANDROID_SDK%\tools;
%ANDROID_SDK%\platform-tools;
%ANDROID_NDK%;
%CommonProgramFiles%\Microsoft Shared\Windows Live;
C:\Program Files\NVIDIA Corporation\PhysX\Common;
%SystemRoot%\system32;
%SystemRoot%;
%SystemRoot%\System32\Wbem;
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;
C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;
C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;
C:\Program Files\Git\cmd
The PATH starts with the folder which contains make (I checked and make.exe is in there), but eclipse still goes Program "make" not found in PATH.
I have tried changing the path and restarting several times but nothing seems to change.
You may try altering toolchain in case if for some reason you can't use gcc. Open Properties for your project (by right clicking on your project name in the Project Explorer), then C/C++ Build > Tool Chain Editor. You can change the current builder there from GNU Make Builder to CDT Internal Builder or whatever compatible you have.
Are you trying to run "Hello world" for the first time? Please make sure you choose proper toolchain. For Windows you have to choose MinGW GCC.
To make MinGW GCC compiler as default or change you original project with error "Program “make” not found in PATH" or "launch failed binary not found eclipse c++" when you trying to run program simply go to
Windows >> Preferences >> C\C++ Build >> Tool Chain Editor >> Change Current toolchain to MinGW GCC
In MinGW, I had to install the following things:
Basic Setup -> mingw32-base
Basic Setup -> mingw32-gcc-g++
Basic Setup -> msys-base
And in Eclipse, go to
Windows -> Preferences -> C/C++ -> Build -> Environment
And set the following environment variables (with "Append variables to native environment" option set):
MINGW_HOME C:\MinGW
PATH C:\MinGW\bin;C:\MinGW\msys\1.0\bin
Click "Apply" and then "OK".
This worked for me, as far as I can tell.
If you are using MinGw, rename the mingw32-make.exe to make.exe in the folder " C:\MinGW\bin " or wherever minGw is installed in your system.
Just to clarify the details that Adel's linked eclipse forum covers, here's how I solved this (on OS X):
Note: for me, even though my personal environment (i.e. if in bash, echo $PATH) had /Developer/usr/bin in it, I still had to add it to Eclipse's Environment variables:
Go to Eclipse Preferences -> C/C++ -> Build -> Environment -> Add.. -> "${PATH}:/Developer/usr/bin"
In the case of some other OS, just use the right path where make exists.
If you are using MinGW toolchain for CDT, make.exe is found at C:\MinGW\msys\1.0\bin
(or search the make.exe in MinGW folder.)
Add this path in eclipse
window->preferences->environment
Make sure you have installed 'make' tool through Cygwin's installer.
If you are using GNU MCU Eclipse on Windows, make sure Windows Build Tools are installed, then check the installation path and fill the "Global Build Tools Path" inside Eclipse Window/Preferences... :
Probably there are some files inside C:\cygwin\bin called xxxxxmake.exe, try renaming it to make.exe
I had the same problem.
Initially I had setup Eclipse CDT with Cygwing & was working smoothly. One day there happened a problem due to which I had to reset windows. After that when I opened Eclipse I started facing the issue described above. This is how I solved it.
First I searched that in the error the PATH variable value is same as the PATH variable of windows ( just by manual comparison of both two values ). I found that to be same. Now I realized that it is a PATH problem.
Then started looking for Cygwin whether it is there or not? It was there. I located & found that it exists in
C:\cygwin64\bin>
C:\cygwin64\bin>dir ma*
Volume in drive C is Windows8_OS
Volume Serial Number is 042E-11B5
Directory of C:\cygwin64\bin
16-05-2015 18:34 10,259 mag.exe
13-08-2013 04:57 384 mailmail
11-04-2015 02:56 4,252 make-emacs-shortcut
15-02-2015 23:25 194,579 make.exe
04-05-2015 21:36 40,979 makeconv.exe
29-07-2013 11:57 29,203 makedepend.exe
16-05-2015 18:34 79,891 makeindex.exe
16-05-2015 18:34 34,323 makejvf.exe
07-05-2015 03:04 310 mako-render
18-04-2015 02:07 92,179 man.exe
18-04-2015 02:07 113,683 mandb.exe
13-08-2013 04:57 286 manhole
18-04-2015 02:07 29,203 manpath.exe
24-10-2014 13:31 274,461 mate-terminal.exe
24-10-2014 13:31 1,366 mate-terminal.wrapper
15 File(s) 905,358 bytes
0 Dir(s) 373,012,271,104 bytes free
C:\cygwin64\bin>
Then I simply went ahead & updated the PATH variable to include this path & restarted eclipse.
The code compiles & debugging (GDB ) is working nicely.
Hope this helps.
Go to Project> Properties> C/C++ Build> Environment. You will see three fields, choose PATH. See if the folder containing make.exe is appended to the path or not. Sometimes the change to the System PATH variable (made from My Computer> Properties> Advanced System Settings...) is NOT reflected in Eclipse. This solved the problem for me, hope it helps you too!
Additional hint: If you have multiple projects with different toolchains open, check the build console header for the failing project's path.
I've just spent half an hour trying to fix a build that showed this error because another project with hopelessly outdated toolchain settings was open in the same workbench. Closing the other project re-enabled the build.
I also faced this problem but solved it by installing QT and extract the omnet5.6 folder in C: