mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
4093641b7e
* mavenize * mavenization * mavenization * mavenization * mavenization * mavenization * mavenization * mavenization * mavenization * fix * app framework update * fix lib * lib * fix mavenized * fix mavenized * fix mavenized * fix mavenized * fix mavenized * fix mavenized * fix mavenized * fix mavenized * building for win and linux * Create run.bat * fixes for netlist * cleanup * unit tests * unit tests * configurable high dpi * performance upgrade * performance upgrade * rotate bug * Omit boards, wires, traces, terminals, etc from Spice netlist output * splash version update * optimize libs * optimize libs * updates * mac build maven * ruler optimization, moved images * cleanup * notarization * test workflow * build * Update pom.xml * Update pom.xml * Create README.md * Create test.yml * maven * build
114 lines
4.3 KiB
XML
114 lines
4.3 KiB
XML
<project name="diylc-swing-appimage" basedir="../../..">
|
|
|
|
<import file="../../../build.xml"/>
|
|
|
|
<property name="appdir" value="build/AppDir" />
|
|
<property name="appimagetool" value="${basedir}/tools/appimagetool-x86_64.AppImage" />
|
|
<property name="wsl.command" value="wsl bash -c"/>
|
|
|
|
<target name="setup-wsl">
|
|
|
|
<!-- Install necessary Linux dependencies inside WSL -->
|
|
<exec executable="cmd.exe" failonerror="true">
|
|
<arg line="/c ${wsl.command} "sudo apt update && sudo apt install -y wget libfuse2 fuse"" />
|
|
</exec>
|
|
|
|
<!-- Download AppImageTool into WSL -->
|
|
<exec executable="cmd.exe" failonerror="true">
|
|
<arg line="/c ${wsl.command} "wget -O ~/appimagetool https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage && chmod +x ~/appimagetool"" />
|
|
</exec>
|
|
</target>
|
|
|
|
<target name="build-appimage">
|
|
|
|
<mkdir dir="${appdir}/usr/bin" />
|
|
<mkdir dir="${appdir}/usr/share/icons/hicolor/512x512/apps" />
|
|
<mkdir dir="${appdir}/usr/share/metainfo" />
|
|
|
|
<!-- Copy app files -->
|
|
<copy file="${jar.dir}/diylc.jar" todir="${appdir}/usr/lib" />
|
|
<copy todir="${appdir}/usr/lib/lib">
|
|
<fileset dir="${jar.dir}/lib">
|
|
<include name="*"/>
|
|
</fileset>
|
|
</copy>
|
|
<copy todir="${appdir}/usr/lib/library">
|
|
<fileset dir="${jar.dir}/library">
|
|
<include name="*"/>
|
|
</fileset>
|
|
</copy>
|
|
<copy todir="${appdir}/usr/bin/templates">
|
|
<fileset dir="${basedir}/templates">
|
|
<include name="*"/>
|
|
</fileset>
|
|
</copy>
|
|
<copy todir="${appdir}/usr/bin/themes">
|
|
<fileset dir="${basedir}/themes">
|
|
<include name="*"/>
|
|
</fileset>
|
|
</copy>
|
|
<copy todir="${appdir}/usr/bin/fonts">
|
|
<fileset dir="${basedir}/fonts">
|
|
<include name="*"/>
|
|
</fileset>
|
|
</copy>
|
|
<copy todir="${appdir}/usr/bin/lang">
|
|
<fileset dir="${basedir}/lang">
|
|
<include name="*"/>
|
|
</fileset>
|
|
</copy>
|
|
<copy file="appimage/diylc.sh" tofile="${appdir}/usr/bin/diylc.sh" />
|
|
<copy file="appimage/AppRun" tofile="${appdir}/AppRun" />
|
|
<copy file="deploy/splash.png" todir="${appdir}/usr/bin" />
|
|
<chmod file="${appdir}/AppRun" perm="755" />
|
|
|
|
<!-- Copy icons and desktop file -->
|
|
<copy file="icons/icon_512x512.png" tofile="${appdir}/usr/share/icons/hicolor/512x512/apps/com.diy_fever.DIYLayoutCreator.png" />
|
|
<copy file="icons/icon_512x512.png" tofile="${appdir}/com.diy_fever.DIYLayoutCreator.png" />
|
|
<!--<copy file="appimage/com.diy_fever.DIYLayoutCreator.desktop" todir="${appdir}/usr/share/applications" />-->
|
|
<copy file="appimage/com.diy_fever.DIYLayoutCreator.desktop" todir="${appdir}" />
|
|
<copy file="appimage/com.diy_fever.DIYLayoutCreator.metainfo.xml" todir="${appdir}/usr/share/metainfo" />
|
|
|
|
<exec executable="cmd.exe" failonerror="true">
|
|
<arg line="/c wsl echo 'WSL is available'"/>
|
|
</exec>
|
|
|
|
<exec executable="cmd.exe">
|
|
<arg line="/c wsl rm -rf /tmp/AppDir"/>
|
|
</exec>
|
|
|
|
<exec executable="cmd.exe">
|
|
<arg line="/c wsl cp -r "$(wslpath -u '${appdir}')" /tmp/AppDir"/>
|
|
</exec>
|
|
|
|
<!--<exec executable="cmd.exe" failonerror="true">
|
|
<arg line="/c wsl tree /tmp/AppDir"/>
|
|
</exec>-->
|
|
|
|
<!-- Convert to Unix line endings -->
|
|
<exec executable="cmd.exe" failonerror="true">
|
|
<arg line="/c ${wsl.command} "sed -i 's/\r$//' /tmp/AppDir/com.diy_fever.DIYLayoutCreator.desktop""/>
|
|
</exec>
|
|
<exec executable="cmd.exe" failonerror="true">
|
|
<arg line="/c ${wsl.command} "sed -i 's/\r$//' /tmp/AppDir/AppRun""/>
|
|
</exec>
|
|
<exec executable="cmd.exe" failonerror="true">
|
|
<arg line="/c ${wsl.command} "sed -i 's/\r$//' /tmp/AppDir/usr/bin/diylc.sh""/>
|
|
</exec>
|
|
|
|
<echo message="Starting AppImage build process using WSL..."/>
|
|
|
|
<exec executable="cmd.exe" failonerror="true">
|
|
<arg line="/c ${wsl.command} "cd /tmp && ~/appimagetool /tmp/AppDir /tmp/${appimage.output.file}""/>
|
|
</exec>
|
|
|
|
<echo message="AppImage created successfully in WSL! Copying back to Windows..."/>
|
|
|
|
<exec executable="cmd.exe" failonerror="true">
|
|
<arg line="/c wsl bash -c "cp /tmp/${appimage.output.file} $(wslpath -u 'build\\${appimage.output.file}')""/>
|
|
</exec>
|
|
|
|
<echo message="AppImage build completed successfully! Output: ${appimage.output.file}"/>
|
|
</target>
|
|
</project>
|