build for linux

This commit is contained in:
Bane Stojkovic
2025-03-24 11:25:28 +01:00
parent cd4694c207
commit 5e70bbe898
5 changed files with 75 additions and 67 deletions
+3
View File
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
}
+16
View File
@@ -0,0 +1,16 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="DIYLCStarter" type="Application" factoryName="Application" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="org.diylc.DIYLCStarter" />
<module name="diylc-swing" />
<option name="VM_PARAMETERS" value="-Xms1024m -Xmx4096m -Dsun.java2d.uiScale=1.5 -Dorg.diylc.scriptRun=true -Dfile.encoding=UTF-8 --add-exports java.desktop/com.apple.eawt.event=ALL-UNNAMED --add-exports java.desktop/com.apple.eio=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.desktop/java.awt=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED --add-opens java.desktop/java.awt.geom=ALL-UNNAMED" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="org.diylc.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
+9 -17
View File
@@ -246,9 +246,13 @@
<minor>1</minor>
<build>0</build>
</versionNumber>
<releaseDate>2025-03-20 00:00:00.000 CET</releaseDate>
<releaseDate>2025-03-22 00:00:00.000 CET</releaseDate>
<name></name>
<changes>
<org.diylc.appframework.update.Change>
<changeType>NEW_FEATURE</changeType>
<description>Added ability to render the underside of boards along with the top side for easier validation, building and debugging</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>NEW_FEATURE</changeType>
<description>Configurable 'High DPI Rendering' feature which makes the diagram smoother on high-resolution displays but can affect performance</description>
@@ -257,6 +261,10 @@
<changeType>IMPROVEMENT</changeType>
<description>Significantly improved rendering performance</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>IMPROVEMENT</changeType>
<description>Increased initial memory allocation to 1GB for smoother performance</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>IMPROVEMENT</changeType>
<description>Upgraded source code structure to modern standards and introduced Maven</description>
@@ -281,22 +289,6 @@
<changeType>BUG_FIX</changeType>
<description>Rotating selected components sometimes wacks the alignment off the grid</description>
</org.diylc.appframework.update.Change>
</changes>
<url>https://github.com/bancika/diy-layout-creator/releases</url>
</org.diylc.appframework.update.Version>
<org.diylc.appframework.update.Version>
<versionNumber>
<major>5</major>
<minor>2</minor>
<build>0</build>
</versionNumber>
<releaseDate>2025-03-20 00:00:00.000 CET</releaseDate>
<name></name>
<changes>
<org.diylc.appframework.update.Change>
<changeType>NEW_FEATURE</changeType>
<description>Added ability to render the underside of boards along with the top side for easier validation, building and debugging</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>BUG_FIX</changeType>
<description>Ctrl+X (Command+X) shortcut for Cut action doesn't work because 'Project Explorer' steals the focus on X key press</description>
@@ -1,26 +1,25 @@
#!/bin/bash
#set -x # Enable debug mode
HERE="$(dirname "$(readlink -f "$0")")"
# Get the AppImage directory
if [ -n "$APPDIR" ]; then
HERE="$APPDIR/usr/bin"
else
HERE="$(cd "$(dirname "$0")" && pwd)"
fi
echo "diylc.sh: Running from directory: $HERE"
# Check if Java is available
if [ -d "$HERE/jre" ]; then
export JAVA_HOME="$HERE/jre"
export PATH="$JAVA_HOME/bin:$PATH"
JAVA="$JAVA_HOME/bin/java"
echo "diylc.sh: Using bundled JRE: $JAVA"
else
JAVA="$(which java)"
echo "diylc.sh: Using system Java: $JAVA"
fi
# Debug: Check Java existence
if [ ! -x "$JAVA" ]; then
echo "diylc.sh: ERROR - Java binary not found or not executable!"
# Use system Java
JAVA="$(which java)"
if [ -z "$JAVA" ] || [ ! -x "$JAVA" ]; then
echo "diylc.sh: ERROR - System Java not found or not executable!"
echo "diylc.sh: Please install Java 17 or later"
exit 1
fi
echo "diylc.sh: Using system Java: $JAVA"
cd "$HERE"
echo "diylc.sh: Current working directory: $(pwd)"
@@ -28,11 +27,9 @@ echo "diylc.sh: Current working directory: $(pwd)"
echo "diylc.sh: Executing DIYLCStarter with Java"
exec "$JAVA" \
-Xms512m \
-Xms1024m \
-Xmx4096m \
-cp "$HERE/../lib/diylc.jar" \
--add-exports java.desktop/com.apple.eawt.event=ALL-UNNAMED \
--add-exports java.desktop/com.apple.eio=ALL-UNNAMED \
-cp "$APPDIR/usr/lib/diylc.jar" \
--add-opens java.base/java.util=ALL-UNNAMED \
--add-opens java.base/java.lang=ALL-UNNAMED \
--add-opens java.base/java.text=ALL-UNNAMED \
+31 -31
View File
@@ -350,38 +350,38 @@
<copy file="${project.basedir}/deploy/linux/appimage/com.diy_fever.DIYLayoutCreator.metainfo.xml"
todir="${appdir.dir}/usr/share/metainfo" />
<!-- Download and extract JRE for Linux -->
<!-- Ensure clean jre folders -->
<delete dir="${jre.dest.linux}" />
<mkdir dir="${jre.dest.linux}" />
<mkdir dir="${project.build.directory}/downloads" />
<!-- Download JRE 17 if not already present -->
<get src="${jdk.url.linux}"
dest="${project.build.directory}/downloads/${jdk.archive.linux}"
usetimestamp="true" />
<!-- Extract JRE -->
<untar src="${project.build.directory}/downloads/${jdk.archive.linux}"
dest="${jre.dest.linux}"
compression="gzip" />
<!-- Move extracted folder into AppImage location -->
<mkdir dir="${appdir.dir}/usr/bin/jre" />
<move todir="${appdir.dir}/usr/bin/jre">
<fileset dir="${jre.dest.linux}/jdk-${jdk.version}-jre" />
</move>
<!-- Clean up temporary directory -->
<delete dir="${jre.dest.linux}" />
<echo message="JRE 17 bundled into ${appdir.dir}/usr/bin/jre" />
<!-- &lt;!&ndash; Download and extract JRE for Linux &ndash;&gt;-->
<!-- &lt;!&ndash; Ensure clean jre folders &ndash;&gt;-->
<!-- <delete dir="${jre.dest.linux}" />-->
<!-- <mkdir dir="${jre.dest.linux}" />-->
<!-- <mkdir dir="${project.build.directory}/downloads" />-->
<!-- -->
<!-- &lt;!&ndash; Download JRE 17 if not already present &ndash;&gt;-->
<!-- <get src="${jdk.url.linux}" -->
<!-- dest="${project.build.directory}/downloads/${jdk.archive.linux}" -->
<!-- usetimestamp="true" />-->
<!-- -->
<!-- &lt;!&ndash; Extract JRE &ndash;&gt;-->
<!-- <untar src="${project.build.directory}/downloads/${jdk.archive.linux}" -->
<!-- dest="${jre.dest.linux}" -->
<!-- compression="gzip" />-->
<!-- -->
<!-- &lt;!&ndash; Move extracted folder into AppImage location &ndash;&gt;-->
<!-- <mkdir dir="${appdir.dir}/usr/bin/jre" />-->
<!-- <move todir="${appdir.dir}/usr/bin/jre">-->
<!-- <fileset dir="${jre.dest.linux}/jdk-${jdk.version}-jre" />-->
<!-- </move>-->
<!-- -->
<!-- &lt;!&ndash; Clean up temporary directory &ndash;&gt;-->
<!-- <delete dir="${jre.dest.linux}" />-->
<!-- -->
<!-- <echo message="JRE 17 bundled into ${appdir.dir}/usr/bin/jre" />-->
<!-- Update the launch script to use the correct JRE path -->
<replace file="${appdir.dir}/usr/bin/diylc.sh">
<replacetoken>JAVA_HOME="$APPDIR/usr/lib/jre"</replacetoken>
<replacevalue>JAVA_HOME="$APPDIR/usr/bin/jre"</replacevalue>
</replace>
<!-- &lt;!&ndash; Update the launch script to use the correct JRE path &ndash;&gt;-->
<!-- <replace file="${appdir.dir}/usr/bin/diylc.sh">-->
<!-- <replacetoken>JAVA_HOME="$APPDIR/usr/lib/jre"</replacetoken>-->
<!-- <replacevalue>JAVA_HOME="$APPDIR/usr/bin/jre"</replacevalue>-->
<!-- </replace>-->
<echo message="AppDir structure created successfully at: ${appdir.dir}" />
</target>