mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
mac build maven
This commit is contained in:
+263
-28
@@ -112,6 +112,13 @@
|
|||||||
<artifactId>slf4j-simple</artifactId>
|
<artifactId>slf4j-simple</artifactId>
|
||||||
<version>1.7.36</version>
|
<version>1.7.36</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.oracle</groupId>
|
||||||
|
<artifactId>appbundler</artifactId>
|
||||||
|
<version>1.3.1</version>
|
||||||
|
<scope>system</scope>
|
||||||
|
<systemPath>${project.basedir}/tools/ant-lib/appbundler-1.3.1.jar</systemPath>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- Local dependencies from lib folder -->
|
<!-- Local dependencies from lib folder -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -212,14 +219,14 @@
|
|||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>make-assembly</id>
|
<id>make-assembly</id>
|
||||||
<configuration>
|
|
||||||
<finalName>diylc-${project.version}</finalName>
|
|
||||||
<appendAssemblyId>false</appendAssemblyId>
|
|
||||||
</configuration>
|
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>single</goal>
|
<goal>single</goal>
|
||||||
</goals>
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<finalName>diylc-${project.version}</finalName>
|
||||||
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
@@ -236,7 +243,6 @@
|
|||||||
<jdk.archive.linux>OpenJDK17U-jre_x64_linux_hotspot_${jdk.version.file}.tar.gz</jdk.archive.linux>
|
<jdk.archive.linux>OpenJDK17U-jre_x64_linux_hotspot_${jdk.version.file}.tar.gz</jdk.archive.linux>
|
||||||
<jdk.url.linux>https://github.com/adoptium/temurin17-binaries/releases/download/jdk-${jdk.version}/${jdk.archive.linux}</jdk.url.linux>
|
<jdk.url.linux>https://github.com/adoptium/temurin17-binaries/releases/download/jdk-${jdk.version}/${jdk.archive.linux}</jdk.url.linux>
|
||||||
<jre.dest.linux>${project.build.directory}/jre-temp</jre.dest.linux>
|
<jre.dest.linux>${project.build.directory}/jre-temp</jre.dest.linux>
|
||||||
<appdir.jre>${appdir.dir}/usr/bin/jre</appdir.jre>
|
|
||||||
<wsl.command>wsl bash -c</wsl.command>
|
<wsl.command>wsl bash -c</wsl.command>
|
||||||
<appimage.output.file>DIYLayoutCreator-${project.version}-x86_64.AppImage</appimage.output.file>
|
<appimage.output.file>DIYLayoutCreator-${project.version}-x86_64.AppImage</appimage.output.file>
|
||||||
</properties>
|
</properties>
|
||||||
@@ -439,22 +445,6 @@
|
|||||||
<!-- Clean up temporary directory -->
|
<!-- Clean up temporary directory -->
|
||||||
<delete dir="${project.build.directory}/docker-tmp" />
|
<delete dir="${project.build.directory}/docker-tmp" />
|
||||||
|
|
||||||
<!-- <!– Linux-specific build –>-->
|
|
||||||
<!-- <echo message="Linux build will execute: ${isLinux}" />-->
|
|
||||||
<!-- <exec executable="bash" failonerror="true" osfamily="unix">-->
|
|
||||||
<!-- <arg line="-c 'echo Building AppImage natively on Linux...'" />-->
|
|
||||||
<!-- </exec>-->
|
|
||||||
<!-- -->
|
|
||||||
<!-- <!– Install dependencies if needed –>-->
|
|
||||||
<!-- <exec executable="bash" failonerror="true" osfamily="unix">-->
|
|
||||||
<!-- <arg line="-c 'which appimagetool || (echo "Installing appimagetool..." && sudo apt-get update && sudo apt-get install -y libfuse2 fuse && wget -O /tmp/appimagetool https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage && chmod +x /tmp/appimagetool && sudo mv /tmp/appimagetool /usr/local/bin/)'" />-->
|
|
||||||
<!-- </exec>-->
|
|
||||||
<!-- -->
|
|
||||||
<!-- <!– Build AppImage –>-->
|
|
||||||
<!-- <exec executable="bash" failonerror="true" osfamily="unix">-->
|
|
||||||
<!-- <arg line="-c 'appimagetool ${appdir.dir} ${project.build.directory}/${appimage.output.file}'" />-->
|
|
||||||
<!-- </exec>-->
|
|
||||||
|
|
||||||
<!-- Create zip package -->
|
<!-- Create zip package -->
|
||||||
<zip destfile="${project.build.directory}/diylc-${project.version}-linux.zip">
|
<zip destfile="${project.build.directory}/diylc-${project.version}-linux.zip">
|
||||||
<zipfileset file="${project.build.directory}/${appimage.output.file}"
|
<zipfileset file="${project.build.directory}/${appimage.output.file}"
|
||||||
@@ -471,7 +461,6 @@
|
|||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
<!-- Windows InnoSetup build profile using Docker -->
|
|
||||||
<profile>
|
<profile>
|
||||||
<id>win64-installer</id>
|
<id>win64-installer</id>
|
||||||
<properties>
|
<properties>
|
||||||
@@ -479,6 +468,7 @@
|
|||||||
<jdk.version.file>17.0.14_7</jdk.version.file>
|
<jdk.version.file>17.0.14_7</jdk.version.file>
|
||||||
<jdk.archive.win64>OpenJDK17U-jre_x64_windows_hotspot_${jdk.version.file}.zip</jdk.archive.win64>
|
<jdk.archive.win64>OpenJDK17U-jre_x64_windows_hotspot_${jdk.version.file}.zip</jdk.archive.win64>
|
||||||
<jdk.url.win64>https://github.com/adoptium/temurin17-binaries/releases/download/jdk-${jdk.version}/${jdk.archive.win64}</jdk.url.win64>
|
<jdk.url.win64>https://github.com/adoptium/temurin17-binaries/releases/download/jdk-${jdk.version}/${jdk.archive.win64}</jdk.url.win64>
|
||||||
|
<jre.dest.win64>${project.build.directory}/jre_win</jre.dest.win64>
|
||||||
</properties>
|
</properties>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
@@ -497,10 +487,10 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<target>
|
<target>
|
||||||
<!-- Clean old jre_win folder -->
|
<!-- Clean old jre_win folder -->
|
||||||
<delete dir="${project.build.directory}/jre_win" />
|
<delete dir="${jre.dest.win64}" />
|
||||||
|
|
||||||
<!-- Create folder to hold extracted JRE -->
|
<!-- Create folder to hold extracted JRE -->
|
||||||
<mkdir dir="${project.build.directory}/jre_win" />
|
<mkdir dir="${jre.dest.win64}" />
|
||||||
|
|
||||||
<!-- Download JRE 64-bit for Windows -->
|
<!-- Download JRE 64-bit for Windows -->
|
||||||
<mkdir dir="${project.build.directory}/downloads" />
|
<mkdir dir="${project.build.directory}/downloads" />
|
||||||
@@ -510,15 +500,15 @@
|
|||||||
|
|
||||||
<!-- Extract JRE into jre_win -->
|
<!-- Extract JRE into jre_win -->
|
||||||
<unzip src="${project.build.directory}/downloads/${jdk.archive.win64}"
|
<unzip src="${project.build.directory}/downloads/${jdk.archive.win64}"
|
||||||
dest="${project.build.directory}/jre_win" />
|
dest="${jre.dest.win64}" />
|
||||||
|
|
||||||
<!-- Move files up one level -->
|
<!-- Move files up one level -->
|
||||||
<move todir="${project.build.directory}/jre_win">
|
<move todir="${jre.dest.win64}">
|
||||||
<fileset dir="${project.build.directory}/jre_win/jdk-${jdk.version}-jre" />
|
<fileset dir="${jre.dest.win64}/jdk-${jdk.version}-jre" />
|
||||||
</move>
|
</move>
|
||||||
|
|
||||||
<!-- Remove empty top-level folder -->
|
<!-- Remove empty top-level folder -->
|
||||||
<delete dir="${project.build.directory}/jre_win/jdk-${jdk.version}-jre" />
|
<delete dir="${jre.dest.win64}/jdk-${jdk.version}-jre" />
|
||||||
</target>
|
</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
@@ -556,5 +546,250 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
|
<profile>
|
||||||
|
<id>mac-x86</id>
|
||||||
|
<properties>
|
||||||
|
<jdk.version>17.0.14+7</jdk.version>
|
||||||
|
<jdk.version.file>17.0.14_7</jdk.version.file>
|
||||||
|
<jdk.archive.osx>OpenJDK17U-jre_x64_mac_hotspot_${jdk.version.file}.tar.gz</jdk.archive.osx>
|
||||||
|
<jdk.url.osx>https://github.com/adoptium/temurin17-binaries/releases/download/jdk-${jdk.version}/${jdk.archive.osx}</jdk.url.osx>
|
||||||
|
<jre.dest.osx>${project.build.directory}/jre_x86</jre.dest.osx>
|
||||||
|
</properties>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<!-- Download and extract JRE -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>download-extract-jre</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>run</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<target>
|
||||||
|
<!-- Clean old jre folders -->
|
||||||
|
<delete dir="${jre.dest.osx}" />
|
||||||
|
<mkdir dir="${jre.dest.osx}" />
|
||||||
|
<mkdir dir="${project.build.directory}/downloads" />
|
||||||
|
|
||||||
|
<!-- Download JRE -->
|
||||||
|
<get src="${jdk.url.osx}"
|
||||||
|
dest="${project.build.directory}/downloads/${jdk.archive.osx}"
|
||||||
|
usetimestamp="true" />
|
||||||
|
|
||||||
|
<!-- Extract JRE -->
|
||||||
|
<untar src="${project.build.directory}/downloads/${jdk.archive.osx}"
|
||||||
|
dest="${jre.dest.osx}"
|
||||||
|
compression="gzip" />
|
||||||
|
|
||||||
|
<!-- Move files up one level -->
|
||||||
|
<move todir="${jre.dest.osx}">
|
||||||
|
<fileset dir="${jre.dest.osx}/jdk-${jdk.version}-jre" />
|
||||||
|
</move>
|
||||||
|
|
||||||
|
<!-- Remove empty top-level folder -->
|
||||||
|
<delete dir="${jre.dest.osx}/jdk-${jdk.version}-jre" />
|
||||||
|
</target>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
|
||||||
|
<!-- Create macOS app bundle -->
|
||||||
|
<execution>
|
||||||
|
<id>create-mac-bundle</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>run</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<target>
|
||||||
|
<taskdef name="bundleapp"
|
||||||
|
classname="com.oracle.appbundler.AppBundlerTask"
|
||||||
|
classpathref="maven.compile.classpath"/>
|
||||||
|
|
||||||
|
<bundleapp outputdirectory="${project.build.directory}"
|
||||||
|
name="DIYLC"
|
||||||
|
displayname="DIY Layout Creator"
|
||||||
|
identifier="org.diylc.Desktop"
|
||||||
|
shortversion="${project.version}"
|
||||||
|
applicationCategory="public.app-category.graphics-design"
|
||||||
|
icon="${project.basedir}/src/main/resources/icons/diylc.icns"
|
||||||
|
mainclassname="org.diylc.DIYLCStarter"
|
||||||
|
copyright="2025 bancika"
|
||||||
|
jvmrequired="17">
|
||||||
|
<bundledocument contentTypes="org.diylc.diy"
|
||||||
|
name="DIYLC document"
|
||||||
|
role="Editor"
|
||||||
|
handlerRank="Owner">
|
||||||
|
</bundledocument>
|
||||||
|
<typedeclaration
|
||||||
|
identifier="org.diylc.diy"
|
||||||
|
description="DIYLC file type"
|
||||||
|
icon="${project.basedir}/src/main/resources/icons/diylc_file.icns"
|
||||||
|
conformsTo="public.xml,public.text"
|
||||||
|
extensions="diy" />
|
||||||
|
<runtime dir="${jre.dest.osx}/Contents/Home" />
|
||||||
|
<arch name="x86_64"/>
|
||||||
|
<classpath file="${project.build.directory}/diylc.jar" />
|
||||||
|
<option value="-Xms512m" />
|
||||||
|
<option value="-Xmx4096m" />
|
||||||
|
<option value="--add-exports=java.desktop/com.apple.eawt.event=ALL-UNNAMED" />
|
||||||
|
<option value="--add-exports=java.desktop/com.apple.eio=ALL-UNNAMED" />
|
||||||
|
<option value="--add-opens=java.base/java.util=ALL-UNNAMED" />
|
||||||
|
<option value="--add-opens=java.base/java.lang=ALL-UNNAMED" />
|
||||||
|
<option value="--add-opens=java.base/java.text=ALL-UNNAMED" />
|
||||||
|
<option value="--add-opens=java.desktop/java.awt=ALL-UNNAMED" />
|
||||||
|
<option value="--add-opens=java.desktop/java.awt.font=ALL-UNNAMED" />
|
||||||
|
<option value="--add-opens=java.desktop/java.awt.geom=ALL-UNNAMED" />
|
||||||
|
<option value="-Dorg.diylc.scriptRun=true" />
|
||||||
|
<option value="-Dfile.encoding=UTF-8" />
|
||||||
|
<option value="-Dcom.apple.macos.use-file-dialog-packages=true"/>
|
||||||
|
<option value="-Dapple.laf.useScreenMenuBar=true"/>
|
||||||
|
<option value="-Dapple.awt.application.name=DIY Layout Creator"/>
|
||||||
|
<option value="-Dcom.apple.smallTabs=true"/>
|
||||||
|
<option value="-Dsun.java2d.metal=true"/>
|
||||||
|
<option value="-Xdock:name=DIY Layout Creator"/>
|
||||||
|
<option value="-Xdock:icon=Contents/Resources/diylc.icns"/>
|
||||||
|
</bundleapp>
|
||||||
|
|
||||||
|
<!-- Create zip package -->
|
||||||
|
<zip destfile="${project.build.directory}/diylc-${project.version}-osx-x86.zip">
|
||||||
|
<zipfileset filemode="755" dir="${project.build.directory}/DIYLC.app" prefix="DIYLC.app" />
|
||||||
|
</zip>
|
||||||
|
</target>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
|
||||||
|
<profile>
|
||||||
|
<id>mac-arm</id>
|
||||||
|
<properties>
|
||||||
|
<jdk.version>17.0.14+7</jdk.version>
|
||||||
|
<jdk.version.file>17.0.14_7</jdk.version.file>
|
||||||
|
<jdk.archive.osx>OpenJDK17U-jre_aarch64_mac_hotspot_${jdk.version.file}.tar.gz</jdk.archive.osx>
|
||||||
|
<jdk.url.osx>https://github.com/adoptium/temurin17-binaries/releases/download/jdk-${jdk.version}/${jdk.archive.osx}</jdk.url.osx>
|
||||||
|
<jre.dest.osx>${project.build.directory}/jre_arm</jre.dest.osx>
|
||||||
|
</properties>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<!-- Download and extract JRE -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>download-extract-jre</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>run</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<target>
|
||||||
|
<!-- Clean old jre folders -->
|
||||||
|
<delete dir="${jre.dest.osx}" />
|
||||||
|
<mkdir dir="${jre.dest.osx}" />
|
||||||
|
<mkdir dir="${project.build.directory}/downloads" />
|
||||||
|
|
||||||
|
<!-- Download JRE -->
|
||||||
|
<get src="${jdk.url.osx}"
|
||||||
|
dest="${project.build.directory}/downloads/${jdk.archive.osx}"
|
||||||
|
usetimestamp="true" />
|
||||||
|
|
||||||
|
<!-- Extract JRE -->
|
||||||
|
<untar src="${project.build.directory}/downloads/${jdk.archive.osx}"
|
||||||
|
dest="${jre.dest.osx}"
|
||||||
|
compression="gzip" />
|
||||||
|
|
||||||
|
<!-- Move files up one level -->
|
||||||
|
<move todir="${jre.dest.osx}">
|
||||||
|
<fileset dir="${jre.dest.osx}/jdk-${jdk.version}-jre" />
|
||||||
|
</move>
|
||||||
|
|
||||||
|
<!-- Remove empty top-level folder -->
|
||||||
|
<delete dir="${jre.dest.osx}/jdk-${jdk.version}-jre" />
|
||||||
|
</target>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
|
||||||
|
<!-- Create macOS app bundle -->
|
||||||
|
<execution>
|
||||||
|
<id>create-mac-bundle</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>run</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<target>
|
||||||
|
<taskdef name="bundleapp"
|
||||||
|
classname="com.oracle.appbundler.AppBundlerTask"
|
||||||
|
classpathref="maven.compile.classpath"/>
|
||||||
|
|
||||||
|
<bundleapp outputdirectory="${project.build.directory}"
|
||||||
|
name="DIYLC"
|
||||||
|
displayname="DIY Layout Creator"
|
||||||
|
identifier="org.diylc.Desktop"
|
||||||
|
shortversion="${project.version}"
|
||||||
|
applicationCategory="public.app-category.graphics-design"
|
||||||
|
icon="${project.basedir}/src/main/resources/icons/diylc.icns"
|
||||||
|
mainclassname="org.diylc.DIYLCStarter"
|
||||||
|
copyright="2025 bancika"
|
||||||
|
jvmrequired="17">
|
||||||
|
<bundledocument contentTypes="org.diylc.diy"
|
||||||
|
name="DIYLC document"
|
||||||
|
role="Editor"
|
||||||
|
handlerRank="Owner">
|
||||||
|
</bundledocument>
|
||||||
|
<typedeclaration
|
||||||
|
identifier="org.diylc.diy"
|
||||||
|
description="DIYLC file type"
|
||||||
|
icon="${project.basedir}/src/main/resources/icons/diylc_file.icns"
|
||||||
|
conformsTo="public.xml,public.text"
|
||||||
|
extensions="diy" />
|
||||||
|
<runtime dir="${jre.dest.osx}/Contents/Home" />
|
||||||
|
<arch name="arm64"/>
|
||||||
|
<arch name="arm64e"/>
|
||||||
|
<classpath file="${project.build.directory}/diylc.jar" />
|
||||||
|
<option value="-Xms512m" />
|
||||||
|
<option value="-Xmx4096m" />
|
||||||
|
<option value="--add-exports=java.desktop/com.apple.eawt.event=ALL-UNNAMED" />
|
||||||
|
<option value="--add-exports=java.desktop/com.apple.eio=ALL-UNNAMED" />
|
||||||
|
<option value="--add-opens=java.base/java.util=ALL-UNNAMED" />
|
||||||
|
<option value="--add-opens=java.base/java.lang=ALL-UNNAMED" />
|
||||||
|
<option value="--add-opens=java.base/java.text=ALL-UNNAMED" />
|
||||||
|
<option value="--add-opens=java.desktop/java.awt=ALL-UNNAMED" />
|
||||||
|
<option value="--add-opens=java.desktop/java.awt.font=ALL-UNNAMED" />
|
||||||
|
<option value="--add-opens=java.desktop/java.awt.geom=ALL-UNNAMED" />
|
||||||
|
<option value="-Dorg.diylc.scriptRun=true" />
|
||||||
|
<option value="-Dfile.encoding=UTF-8" />
|
||||||
|
<option value="-Dcom.apple.macos.use-file-dialog-packages=true"/>
|
||||||
|
<option value="-Dapple.laf.useScreenMenuBar=true"/>
|
||||||
|
<option value="-Dapple.awt.application.name=DIY Layout Creator"/>
|
||||||
|
<option value="-Dcom.apple.smallTabs=true"/>
|
||||||
|
<option value="-Dsun.java2d.metal=true"/>
|
||||||
|
<option value="-Xdock:name=DIY Layout Creator"/>
|
||||||
|
<option value="-Xdock:icon=Contents/Resources/diylc.icns"/>
|
||||||
|
</bundleapp>
|
||||||
|
|
||||||
|
<!-- Create zip package -->
|
||||||
|
<zip destfile="${project.build.directory}/diylc-${project.version}-osx-arm.zip">
|
||||||
|
<zipfileset filemode="755" dir="${project.build.directory}/DIYLC.app" prefix="DIYLC.app" />
|
||||||
|
</zip>
|
||||||
|
</target>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
Binary file not shown.
+7
-1
@@ -72,7 +72,13 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.poi</groupId>
|
<groupId>org.apache.poi</groupId>
|
||||||
<artifactId>poi</artifactId>
|
<artifactId>poi</artifactId>
|
||||||
<version>3.5-FINAL</version>
|
<version>5.4.0</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- AppBundler for macOS builds -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.oracle</groupId>
|
||||||
|
<artifactId>appbundler</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|||||||
Reference in New Issue
Block a user