mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
building for win and linux
This commit is contained in:
@@ -1,9 +1,6 @@
|
|||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
encoding//appimage/setup_wsl_appimage.bat=UTF-8
|
|
||||||
encoding//lang/Deutsch.txt=UTF-8
|
|
||||||
encoding//src/main/java=ISO-8859-1
|
encoding//src/main/java=ISO-8859-1
|
||||||
encoding//src/main/resources=ISO-8859-1
|
encoding//src/main/resources=ISO-8859-1
|
||||||
encoding//src/test/java=ISO-8859-1
|
encoding//src/test/java=ISO-8859-1
|
||||||
encoding//src/test/resources=ISO-8859-1
|
encoding//src/test/resources=ISO-8859-1
|
||||||
encoding/<project>=ISO-8859-1
|
encoding/<project>=ISO-8859-1
|
||||||
encoding/lang=UTF-8
|
|
||||||
|
|||||||
@@ -21,5 +21,13 @@
|
|||||||
</includes>
|
</includes>
|
||||||
<fileMode>755</fileMode>
|
<fileMode>755</fileMode>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.basedir}/deploy/win</directory>
|
||||||
|
<outputDirectory>/</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>run.bat</include>
|
||||||
|
</includes>
|
||||||
|
<fileMode>755</fileMode>
|
||||||
|
</fileSet>
|
||||||
</fileSets>
|
</fileSets>
|
||||||
</assembly>
|
</assembly>
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ DefaultGroupName=DIY Layout Creator
|
|||||||
UninstallDisplayIcon={app}\diylc.exe
|
UninstallDisplayIcon={app}\diylc.exe
|
||||||
Compression=zip
|
Compression=zip
|
||||||
SolidCompression=yes
|
SolidCompression=yes
|
||||||
OutputDir=../build
|
OutputDir=..\..\target
|
||||||
OutputBaseFilename=diylc
|
OutputBaseFilename=diylc-{#diylcver}-win64
|
||||||
ChangesAssociations=yes
|
ChangesAssociations=yes
|
||||||
AlwaysShowDirOnReadyPage=yes
|
AlwaysShowDirOnReadyPage=yes
|
||||||
; Only allow the installer to run on x64-compatible systems,
|
; Only allow the installer to run on x64-compatible systems,
|
||||||
@@ -16,16 +16,11 @@ ArchitecturesAllowed={#arch}
|
|||||||
ArchitecturesInstallIn64BitMode={#arch}
|
ArchitecturesInstallIn64BitMode={#arch}
|
||||||
|
|
||||||
[Files]
|
[Files]
|
||||||
Source: "..\build\diylc.exe"; DestDir: "{app}"
|
Source: "diylc-{#arch}.exe"; DestDir: "{app}"; DestName: "diylc.exe"
|
||||||
Source: "..\icons\diylc_file.ico"; DestDir: "{app}"
|
Source: "..\..\src\main\resources\icons\diylc_file.ico"; DestDir: "{app}"
|
||||||
Source: "..\build\jar\diylc.jar"; DestDir: "{app}"
|
Source: "..\..\target\diylc.jar"; DestDir: "{app}"
|
||||||
Source: "..\build\jar\lib\*"; DestDir: "{app}\lib"
|
Source: "..\..\target\jre_win\*"; DestDir: "{app}\jre17"; Flags: ignoreversion recursesubdirs
|
||||||
Source: "..\build\jar\library\*"; DestDir: "{app}\library"
|
Source: "donate.bmp"; DestDir: "{tmp}"; Flags: dontcopy nocompression
|
||||||
Source: "..\themes\*"; DestDir: "{app}\themes"
|
|
||||||
Source: "..\lang\*"; DestDir: "{app}\lang"
|
|
||||||
Source: "..\fonts\*"; DestDir: "{app}\fonts"
|
|
||||||
Source: "..\build\jre_win\*"; DestDir: "{app}\jre17"; Flags: ignoreversion recursesubdirs
|
|
||||||
Source: "innosetup\donate.bmp"; DestDir: "{tmp}"; Flags: dontcopy nocompression
|
|
||||||
|
|
||||||
[Registry]
|
[Registry]
|
||||||
Root: HKCR; Subkey: ".diy"; ValueData: "DIYLC"; Flags: uninsdeletevalue; ValueType: string; ValueName: ""
|
Root: HKCR; Subkey: ".diy"; ValueData: "DIYLC"; Flags: uninsdeletevalue; ValueType: string; ValueName: ""
|
||||||
@@ -34,10 +29,10 @@ Root: HKCR; Subkey: "DIYLC\DefaultIcon"; ValueData: "{app}\diylc_file.ico"; Valu
|
|||||||
Root: HKCR; Subkey: "DIYLC\shell\open\command"; ValueData: """{app}\diylc.exe"" ""%1"""; ValueType: string; ValueName: ""
|
Root: HKCR; Subkey: "DIYLC\shell\open\command"; ValueData: """{app}\diylc.exe"" ""%1"""; ValueType: string; ValueName: ""
|
||||||
|
|
||||||
[Icons]
|
[Icons]
|
||||||
Name: "{group}\DIY Layout Creator"; Filename: "{app}\diylc.exe"
|
Name: "{group}\DIY Layout Creator"; Filename: "{app}/diylc.exe"
|
||||||
|
|
||||||
[Run]
|
[Run]
|
||||||
Filename: "{app}\diylc.exe"; Description: "Launch DIYLC on exit"; Flags: postinstall skipifsilent
|
Filename: "{app}/diylc.exe"; Description: "Launch DIYLC on exit"; Flags: postinstall skipifsilent
|
||||||
|
|
||||||
[Code]
|
[Code]
|
||||||
|
|
||||||
|
|||||||
+106
-14
@@ -427,21 +427,27 @@
|
|||||||
<!-- 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 -->
|
<!-- <!– Linux-specific build –>-->
|
||||||
<echo message="Linux build will execute: ${isLinux}" />
|
<!-- <echo message="Linux build will execute: ${isLinux}" />-->
|
||||||
<exec executable="bash" failonerror="true" osfamily="unix">
|
<!-- <exec executable="bash" failonerror="true" osfamily="unix">-->
|
||||||
<arg line="-c 'echo Building AppImage natively on Linux...'" />
|
<!-- <arg line="-c 'echo Building AppImage natively on Linux...'" />-->
|
||||||
</exec>
|
<!-- </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>-->
|
||||||
|
|
||||||
<!-- Install dependencies if needed -->
|
<!-- Create zip package -->
|
||||||
<exec executable="bash" failonerror="true" osfamily="unix">
|
<zip destfile="${project.build.directory}/diylc-${project.version}-linux.zip">
|
||||||
<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/)'" />
|
<zipfileset file="${project.build.directory}/${appimage.output.file}"
|
||||||
</exec>
|
filemode="755" />
|
||||||
|
</zip>
|
||||||
<!-- Build AppImage -->
|
|
||||||
<exec executable="bash" failonerror="true" osfamily="unix">
|
|
||||||
<arg line="-c 'appimagetool ${appdir.dir} ${project.build.directory}/${appimage.output.file}'" />
|
|
||||||
</exec>
|
|
||||||
|
|
||||||
<echo message="AppImage build completed successfully! Output: ${project.build.directory}/${appimage.output.file}" />
|
<echo message="AppImage build completed successfully! Output: ${project.build.directory}/${appimage.output.file}" />
|
||||||
</target>
|
</target>
|
||||||
@@ -452,5 +458,91 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
|
<!-- Windows InnoSetup build profile using Docker -->
|
||||||
|
<profile>
|
||||||
|
<id>win64-installer</id>
|
||||||
|
<properties>
|
||||||
|
<jdk.version>17.0.14+7</jdk.version>
|
||||||
|
<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.url.win64>https://github.com/adoptium/temurin17-binaries/releases/download/jdk-${jdk.version}/${jdk.archive.win64}</jdk.url.win64>
|
||||||
|
</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_win folder -->
|
||||||
|
<delete dir="${project.build.directory}/jre_win" />
|
||||||
|
|
||||||
|
<!-- Create folder to hold extracted JRE -->
|
||||||
|
<mkdir dir="${project.build.directory}/jre_win" />
|
||||||
|
|
||||||
|
<!-- Download JRE 64-bit for Windows -->
|
||||||
|
<mkdir dir="${project.build.directory}/downloads" />
|
||||||
|
<get src="${jdk.url.win64}"
|
||||||
|
dest="${project.build.directory}/downloads/${jdk.archive.win64}"
|
||||||
|
usetimestamp="true" />
|
||||||
|
|
||||||
|
<!-- Extract JRE into jre_win -->
|
||||||
|
<unzip src="${project.build.directory}/downloads/${jdk.archive.win64}"
|
||||||
|
dest="${project.build.directory}/jre_win" />
|
||||||
|
|
||||||
|
<!-- Move files up one level -->
|
||||||
|
<move todir="${project.build.directory}/jre_win">
|
||||||
|
<fileset dir="${project.build.directory}/jre_win/jdk-${jdk.version}-jre" />
|
||||||
|
</move>
|
||||||
|
|
||||||
|
<!-- Remove empty top-level folder -->
|
||||||
|
<delete dir="${project.build.directory}/jre_win/jdk-${jdk.version}-jre" />
|
||||||
|
</target>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<!-- Run InnoSetup -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>build-windows-installer</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>docker</executable>
|
||||||
|
<arguments>
|
||||||
|
<argument>run</argument>
|
||||||
|
<argument>--rm</argument>
|
||||||
|
<argument>-v</argument>
|
||||||
|
<argument>${project.basedir}:/workspace</argument>
|
||||||
|
<argument>amake/innosetup</argument>
|
||||||
|
<argument>/Ddiylcver=${project.version}</argument>
|
||||||
|
<argument>/Darch=x64</argument>
|
||||||
|
<argument>/workspace/deploy/win/install.iss</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
Reference in New Issue
Block a user