-
Notifications
You must be signed in to change notification settings - Fork 0
Building GRITS Toolbox
GRITS Toolbox is a multi-platform software that can be run on most operating systems. However to incorporate the platform specific libraries it is necessary to create a own product for each platform. The Multi-platform build allows to do this from a single computer and is the recommended way to generate platform specific builds. To enable this module you need to open your workspace and:
- Open Window/Preferences. (MacOS: Eclipse->Preferences)
- Find Target Platform (under Plug-in Development -> Target Platform)
- Select your (active) target platform
- Click Edit
- Click Add
- Select Software Site
- Click Next
- Add a new software site in Work with
http://download.eclipse.org/eclipse/updates/4.24 (replace 4.24 with your current Eclipse version)
- Check Eclipse RCP Target Components
- Check Equinox Target Components
- Uncheck Include required software
- Check Include all environments
- Press Finish
- Press Finish
- Press Apply and Close
Open your product file and select the Export option. You will see that the "Export for multiple platforms" checkbox is available. For first time use you have to press Next and select windows, linux and mac operating systems before export. If you are using a custom product file, you may have to click on "add required plugins" after the above settings are completed to make sure all operation system specific swt fragments are included in dependencies.
Please note: In difference to the installation of the plugins, this configuration is stored in the preferences of your Eclipse workspace. If you create a new workspace you will have to make this changes again.
Windows built using the product file on a Windows machine results in an error with Eclipse 2022-6 and JDK 17. Therefore we need to use use multi-platform build on a MacOS computer to generate a Windows version for GRITS.
In order to generate a Windows version with a bundled JRE, since Java versions after JDK 8 do not come with a JRE, follow these steps:
- Go to the jdk folder where you would like to generate a JRE version.
cd \Program Files\Java\jdk-17.0.2.jdk\
- Execute the following command to generate a "jre" folder in a given path
bin\jlink --add-modules ALL-MODULE-PATH --output \Users\sena\jre --strip-debug --no-man-pages --no-header-files --compress=2
We then need to copy the generated jre folder under the eclipse folder in the generated grits product, the same level as the executable GRITS.exe
win32.win32.x86_64
|
+--- eclipse
|
+---configuration
+---p2
+---plugins
+---jre
+---GRITS.exe
+---GRITS.ini
In order to generate a release of GRITS with a bundled JRE so that the users do not have to install certain java version on their computer, we need to use GRITS.jre.product file in "org.grits.toolbox" plugin.
Java versions after JDK 8 do not come with a JRE. But it is possible to create own JRE using the following:
- Go to the jdk folder where you would like to generate a JRE version.
cd /Library/Java/JavaVirtualMachines/jdk-17.0.2.jdk/Contents/
- Execute the following command to generate a "jre" folder in the current directory
Home/bin/jlink --add-modules ALL-MODULE-PATH --output jre --strip-debug --no-man-pages --no-header-files --compress=2
We then need to copy the generated jre folder under the MacOS folder in the generated grits product.
macosx.cocoa.x86_64
|
+--- eclipse
+--- info.plist
+--- MacOS
|
+---jre
+---GRITS
+--- Resources