tutorials:setup-groimp-dev-environment
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorials:setup-groimp-dev-environment [2024/12/04 22:33] – [Use Maven to compile] gaetan | tutorials:setup-groimp-dev-environment [2024/12/18 10:55] (current) – [Installation of required tools] gaetan | ||
---|---|---|---|
Line 9: | Line 9: | ||
* [[: | * [[: | ||
* [[: | * [[: | ||
- | * [[:dev-guide: | + | * [[https:// |
* [[: | * [[: | ||
Line 18: | Line 18: | ||
* **Maven**: On Debian system you can get Maven with '' | * **Maven**: On Debian system you can get Maven with '' | ||
* **Eclipse**: | * **Eclipse**: | ||
+ | * [[https:// | ||
===== Download GroIMP source code ===== | ===== Download GroIMP source code ===== | ||
Line 90: | Line 91: | ||
==== Add other plugins to the command ==== | ==== Add other plugins to the command ==== | ||
- | set your terminal in the main groimp directory (the one you used mvn package in) and download the two plugins [[https:// | + | set your terminal in the main groimp directory (the one you used mvn package in) and download the two plugins [[https:// |
< | < | ||
Line 132: | Line 133: | ||
You can now go in the directory of any GroIMP plugin (go in the RGG directory for instance) and compile it (With '' | You can now go in the directory of any GroIMP plugin (go in the RGG directory for instance) and compile it (With '' | ||
+ | |||
+ | ===== Set up Eclipse ===== | ||
+ | |||
+ | ==== Import the repository in Eclipse ==== | ||
+ | |||
+ | Now that we have the source code of the plugin(s) we want to modify, we can import it in Eclipse. | ||
+ | |||
+ | Open Eclipse | ||
+ | |||
+ | In Eclipse, click on //File > Import...// | ||
+ | |||
+ | Open the category `Maven`. | ||
+ | |||
+ | Select `Existing Maven Projects`. | ||
+ | |||
+ | Set the Root Directory as either a specific plugin directory, or as the groimp repository you downloaded. | ||
+ | |||
+ | All GroIMP plugins in that directory should appear in the projects list. | ||
+ | |||
+ | Click on `Finish`. | ||
+ | |||
+ | |||
+ | ==== Setting up Java Runtime Environment ==== | ||
+ | |||
+ | To setup the JRE, go to //Java > Installed JREs//. | ||
+ | |||
+ | In Eclipse, the default JRE used can be an embedded JRE from Eclipse, which will not work with GroIMP. | ||
+ | If it is the case, add a new JRE by clicking on `Add...`, `Standard VM`, then, point at the root of a JDK on your computer (e.g. / | ||
+ | |||
+ | Make sure that this version is selected. | ||
+ | |||
+ | Notice that a newer version of Java can work but might not be compatible with the OpenGL 3D view. | ||
+ | |||
+ | In case of changes, click //Apply//. | ||
+ | |||
+ | ==== Setting up the compiler ==== | ||
+ | |||
+ | The next step is to set the compliance level. Therefore, go to //Java > Compiler//. | ||
+ | |||
+ | Set the `Compiler compliance level` to `17`. The warning on the bottom can be ignored. | ||
+ | |||
+ | Then click on //Apply and Close//. | ||
+ | |||
+ | Eclipse will ask whether all projects should be rebuilt now, click on //Yes//. | ||
+ | |||
+ | Depending on your computer, the build process may take some minutes. | ||
+ | |||
+ | ==== Setting up Start configuration ==== | ||
+ | |||
+ | === Maven resources copy === | ||
+ | |||
+ | GroIMP uses some third party library, which are not automatically downloaded with the source code. To run GroIMP in Eclipse you need to force their download into your local repository. | ||
+ | |||
+ | This operation is only required every time you clean the project with Maven. Eclipse will not delete the libraries. | ||
+ | |||
+ | Either use `mvn generate-resources` in a terminal at the root of the project, or in Eclipse | ||
+ | go to //Run > Run Configurations...// | ||
+ | |||
+ | In the menu on the left, select `Maven Build`. In the menu on the right select the root directory as `Base directory`, either by clicking `Workspace...`> | ||
+ | |||
+ | Then, set the `Goals` as `generate-resources`. | ||
+ | |||
+ | Click on `Apply`, then `Run`. | ||
+ | |||
+ | This should copy all third parties libraries defined in the poms files of your projects to their target/lib repository, making it visible to GroIMP. | ||
+ | |||
+ | === Start the platfrom === | ||
+ | |||
+ | Now you need to set up the main GroIMP class to be run. | ||
+ | |||
+ | Go to //Run > Run Configurations...// | ||
+ | |||
+ | In the menu on the left side in the following window, select `Java Application` and click the most left button in the symbol menu above to create a new java application starter. | ||
+ | |||
+ | Give the starter a good name, for example `GroIMP`. | ||
+ | |||
+ | Select the project `Platform-Core` if it is not selected automatically. | ||
+ | |||
+ | Select the main class `de.grogra.pf.boot.Main` if it is not selected automatically. Make sure to select it from the // | ||
+ | |||
+ | Then, click on //Apply// and go to the tab `x() = Arguments`. | ||
+ | |||
+ | For the program arguments, a very special parameter `--project-tree` is required. This parameter is important because the directory structure differs between the development version in Eclipse and the ready-to-use installed version. GroIMP needs this parameter to search in differing directories for plugins and configuration files. If this parameter is missing in the Eclipse development version, GroIMP will show an error window with the text "No application found" | ||
+ | |||
+ | For the JVM arguments, add `-Xmx3000m`. If required, more or less memory can be specified here instead of 3000 MB. | ||
+ | |||
+ | Check [[: |
tutorials/setup-groimp-dev-environment.1733348038.txt.gz · Last modified: 2024/12/04 22:33 by gaetan