Changes between Version 18 and Version 19 of BuildingWorldPainter
- Timestamp:
- Jun 22, 2025, 8:13:27 PM (10 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BuildingWorldPainter
v18 v19 3 3 = Prerequisites 4 4 5 !WorldPainter is coded in Java (https://www.oracle.com/java/index.html) and uses Maven (https://maven.apache.org/) as the build system, so you must have a JDK installed (at least version 9), and Maven (at least version 3). These instructions assume that both are correctly installed and added to the `PATH` so that you can execute `java` and `mvn` commands from the command line, but if you are going to be using an IDE exclusively that is not necessary. The !WorldPainter sources do not include any IDE metadata and are not dependent on any particular IDE for being built.5 !WorldPainter is coded in Java (https://www.oracle.com/java/index.html) and uses Maven (https://maven.apache.org/) as the build system, so you must have a JDK installed (at least version 17), and Maven (at least version 3). These instructions assume that both are correctly installed and added to the `PATH` so that you can execute `java` and `mvn` commands from the command line, but if you are going to be using an IDE exclusively that is not necessary. The !WorldPainter sources do not include any IDE metadata and are not dependent on any particular IDE for being built. 6 6 7 7 The source code is contained in a Git repository hosted on !GitHub, so for checking out the source code you will need to have Git installed, although it is also possible to download the source code from !GitHub as a zip file so this is not essential. … … 9 9 == Knowledge and experience 10 10 11 !WorldPainter is a large and complex program. You'll need a good understanding of Java (up to version 8) to be able to understand the code and work on it. If you want to work on the GUI you'll need at least a good working knowledge of Swing as well. Since the build system is Maven, you'll need some experience with that as well, including how to install artifacts in your local Maven repository, which you will need to do below.11 !WorldPainter is a large and complex program. You'll need a good understanding of Java (up to version 17) to be able to understand the code and work on it. If you want to work on the GUI you'll need at least a good working knowledge of Swing as well. Since the build system is Maven, you'll need some experience with that as well, including how to install artifacts in your local Maven repository, which you will need to do below. 12 12 13 13 == Using !WorldPainter in your own code … … 43 43 }}} 44 44 45 '''Note''': if you downloaded a different version than 3.7.13 you must use the correct version numbers in these commands, ''and'' update the version numbers in the pom.xml of the WPGUI module!45 '''Note''': substitute the actual version number from the `pom.xml` of the WPGUI module for the 3.7.13! 46 46 47 47 If you ever want to distribute your own version of !WorldPainter (although I respectfully request that you don't), you'll have to download the release version of the framework and get your own licence. JIDE Software give out open source licences, which are free. When using the release version of the framework, you have to create a file called `src/main/resources/jide_licence.properties` in the WPGUI module to fill in your actual licence details. It should have the following contents, filling in the actual values in place of the texts after the equals signs: … … 57 57 Alternatively you could remove the JIDE Docking Framework from the code and replace it with some alternative docking framework. It's a lot of work, but doable. 58 58 59 = = Apple Java Extensions59 = Set up Maven toolchain 60 60 61 To integrate with Mac OS X on Java 8, the Apple Java Extensions are needed. They are proprietary code which cannot be distributed by us so you will have to download it manually and install it in your local repo the same way as above. They can currently be found [https://developer.apple.com/library/archive/samplecode/AppleJavaExtensions/Introduction/Intro.html here]. Download the `.zip` file and extract the `.jar` file from it. Install it in your local repo with the following command: 62 63 {{{ 64 mvn install:install-file -DgroupId=com.apple -DartifactId=AppleJavaExtensions -Dversion=1.6 -Dpackaging=jar -Dfile=AppleJavaExtensions.jar 65 }}} 66 67 Of course if you are not interested in running the code on Apple Mac OS X, or running it on Java 8, you can also just remove this dependency and the code that uses it. !WorldPainter will still run on Mac OS X on Java 8, but it will be less well integrated into the menus. 68 69 = Set up Maven toolchains 70 71 !WorldPainter uses the Maven toolchain framework (https://maven.apache.org/guides/mini/guide-using-toolchains.html) to find the JDK's it needs. You need to follow the instructions on that page to configure two toolchains: one of type `jdk` and version `1.8` pointing to a Java 8 JDK, and one of type `jdk` and version `9` pointing to a Java 9 JDK. You can do this by placing a file called `toolchains.xml` in your `~/.m2` or `$HOME\.m2` directory with the following contents: 61 !WorldPainter uses the Maven toolchain framework (https://maven.apache.org/guides/mini/guide-using-toolchains.html) to find the JDK it needs. You need to follow the instructions on that page to configure a toolchains of type `jdk` and version `17` pointing to a Java 17 JDK. You can do this by placing a file called `toolchains.xml` in your `~/.m2` or `$HOME\.m2` directory with the following contents: 72 62 73 63 {{{#!xml … … 76 66 <type>jdk</type> 77 67 <provides> 78 <version> 9</version>68 <version>17</version> 79 69 </provides> 80 70 <configuration> 81 <jdkHome>PATH TO JAVA 9 JDK</jdkHome> 82 </configuration> 83 </toolchain> 84 <toolchain> 85 <type>jdk</type> 86 <provides> 87 <version>1.8</version> 88 </provides> 89 <configuration> 90 <jdkHome>PATH TO JAVA 8 JDK</jdkHome> 71 <jdkHome>PATH TO JAVA 17 JDK</jdkHome> 91 72 </configuration> 92 73 </toolchain>