Changes between Version 2 and Version 3 of Ticket #18319, comment 22


Ignore:
Timestamp:
2020-06-03T19:46:22+02:00 (6 years ago)
Author:
Stereo

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #18319, comment 22

    v2 v3  
    11I've played with `jpackage` a bit, and it looks quite promising. I have a JOSM.app that includes the OpenJDK 14 JRE and runs quite well.
    22
    3 I've used `/Library/Java/JavaVirtualMachines/openjdk-14.0.1.jdk/Contents/Home/bin/jpackage -n "JOSM" --input dist --main-jar josm-custom.jar --main-class org.openstreetmap.josm.gui.MainApplication --icon ./native/macosx/JOSM.app/Contents/Resources/JOSM.icns --type app-image --dest appimageoutput --java-options "-Xmx8192m" --app-version "16539" --copyright "JOSM, and all its integral parts, are released under the GNU General Public License v2 or later" --vendor "https://josm.openstreetmap.de" --file-associations native/macosx/gpx.properties --file-associations native/macosx/osm.properties`
     3I've used `/Library/Java/JavaVirtualMachines/openjdk-14.0.1.jdk/Contents/Home/bin/jpackage -n "JOSM" --input dist --main-jar josm-custom.jar --main-class org.openstreetmap.josm.gui.MainApplication --icon ./native/macosx/JOSM.icns --type app-image --dest appimageoutput --java-options "-Xmx8192m" --app-version "16539" --copyright "JOSM, and all its integral parts, are released under the GNU General Public License v2 or later" --vendor "https://josm.openstreetmap.de" --file-associations native/macosx/bz2.properties --file-associations native/macosx/geojson.properties --file-associations native/macosx/gpx.properties --file-associations native/macosx/gz.properties --file-associations native/macosx/jos.properties --file-associations native/macosx/joz.properties --file-associations native/macosx/osm.properties --file-associations native/macosx/zip.properties --add-modules java.base,java.datatransfer,java.desktop,java.logging,java.management,java.prefs,java.rmi,java.xml,java.net.http,java.sql,java.naming,java.transaction.xa,jdk.crypto.ec`
    44
    55The properties files basically look like:
     
    1414What doesn't work yet:
    1515
    16 - I only tell it that it can open .osm and .gpx files, basically out of laziness. Every file type needs a `.properties` file.
    17 - There are no icons for the gpx and osm files. Giving it the path to JOSM.icns in the `.properties` file causes an error ("java.nio.file.FileAlreadyExistsException: appimageoutput/JOSM.app/Contents/Resources/JOSM.icns") and a blank icon for JOSM.app. Hey, maybe I can finally create icons for .osm files on macOS :)
    18 - It includes *all* of the JRE, so the .app is a humongous 147MB. [jlink can be used to produce a jre with only the necessary parts](https://www.baeldung.com/jlink). Not including a JRE is, apparently, not possible. Considering how much of a pain it is to install Java and to debug different JREs, this might actually be a good thing
     16- Done: ~~I only tell it that it can open .osm and .gpx files, basically out of laziness. Every file type needs a `.properties` file.~~
     17- Done: ~~There are no icons for the gpx and osm files. Giving it the path to JOSM.icns in the `.properties` file causes an error ("java.nio.file.FileAlreadyExistsException: appimageoutput/JOSM.app/Contents/Resources/JOSM.icns") and a blank icon for JOSM.app. Hey, maybe I can finally create icons for .osm files on macOS :)~~
     18- Done and shrunk to 36.9M zipped: ~~It includes *all* of the JRE, so the .app is a humongous 147MB. [jlink can be used to produce a jre with only the necessary parts](https://www.baeldung.com/jlink). Not including a JRE is, apparently, not possible. Considering how much of a pain it is to install Java and to debug different JREs, this might actually be a good thing~~
    1919- Building only works on macOS, and the JOSM builds are currently only built on Linux.
     20- No code signature yet
    2021
    2122Wanna test? https://openstreetmap.lu/JOSM.app.zip has this very raw first preview.