Skip to content

Commit

Permalink
windows packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
jkboyce committed Jul 13, 2020
1 parent 35eb311 commit 43bab50
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 12 deletions.
2 changes: 1 addition & 1 deletion bin/jlab.bat
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ IF DEFINED JL_EXE (
type "%TEMP%\jugglinglab_out.txt"
del "%TEMP%\jugglinglab_out.txt"
) ELSE (
ECHO "Juggling Lab.exe" not found in same directory as this script.
ECHO "Juggling Lab.exe" not found on this computer.
)

SET "JL_EXE="
Expand Down
40 changes: 31 additions & 9 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<property name="lib" value="bin/ortools-lib" />
<property name="debug" value="off" />
<property name="deprecation" value="on" />
<property name="javafx_ant_jar.osx" value="${java.home}/../lib/ant-javafx.jar" />
<property name="javafx_ant_jar.mac" value="${java.home}/../lib/ant-javafx.jar" />
<property name="javafx_ant_jar.win" value="${java.home}/../lib/ant-javafx.jar" />
<property name="packaging_resources" value="${src}/resources" />
<property name="jlab_version" value="1.3" />
Expand All @@ -29,7 +29,7 @@
<javac debug="${debug}" srcdir="${src}/." destdir="${build}/."
target="1.8" source="1.8" deprecation="${deprecation}"
includeAntRuntime="false" includes="**"
excludes="jugglinglab/MacOS/*,gifwriter/*,resources/*,jugglinglab/notation/*.jj">
excludes="gifwriter/*,resources/*,jugglinglab/notation/*.jj">
<classpath refid="master-classpath" />
<compilerarg value="-Xlint:-options"/>
<compilerarg value="-Xlint:unchecked"/>
Expand Down Expand Up @@ -68,12 +68,12 @@
</java>
</target>

<!-- Build the Mac OS X application -->
<!-- Build the macOS application -->

<target name="fxjar" depends="compile">
<target name="fxjar_mac" depends="compile">
<taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
uri="javafx:com.sun.javafx.tools.ant"
classpath="${packaging_resources}:${javafx_ant_jar.osx}" />
classpath="${packaging_resources}:${javafx_ant_jar.mac}" />
<fx:jar destfile="${bin}/JugglingLab_fx.jar">
<fx:application name="Juggling Lab" mainClass="jugglinglab.JugglingLab" />

Expand All @@ -89,10 +89,10 @@
</fx:jar>
</target>

<target name="osx" depends="fxjar" description="Build OS X application">
<target name="mac" depends="fxjar_mac" description="Build macOS application">
<taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
uri="javafx:com.sun.javafx.tools.ant"
classpath="${packaging_resources}:${javafx_ant_jar.osx}" />
classpath="${packaging_resources}:${javafx_ant_jar.mac}" />
<fx:deploy width="600" height="400" verbose="true" nativeBundles="dmg" outdir="./packages" outfile="Juggling Lab">
<fx:application name="Juggling Lab" version="${jlab_version}" mainClass="jugglinglab.JugglingLab" />
<fx:resources>
Expand All @@ -114,18 +114,40 @@
https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/javafx_ant_task_reference.html -->
<!-- For installer configuration in Juggling Lab.iss see:
http://www.jrsoftware.org/ishelp/index.php?topic=setup_disabledirpage -->
<target name="exe" depends="jar" description="Build Windows installer exe">
<target name="fxjar_win" depends="compile">
<taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
uri="javafx:com.sun.javafx.tools.ant"
classpath="${packaging_resources}:${javafx_ant_jar.win}" />
<fx:jar destfile="${bin}/JugglingLab_fx.jar">
<fx:application name="Juggling Lab" mainClass="jugglinglab.JugglingLab" />

<fx:resources>
<fx:fileset dir="${lib}" includes="*.jar"/>
</fx:resources>

<fileset dir="${build}" excludes="gifwriter/*" />
<fileset dir="${src}/resources" includes="GUIStrings*" />
<fileset dir="${src}/resources" includes="ErrorStrings*" />
<fileset dir="${src}/resources" includes="*.au" />
<fileset dir="${src}/resources" includes="*.png" />
</fx:jar>
</target>

<target name="win" depends="fxjar_win" description="Build Windows installer exe">
<taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
uri="javafx:com.sun.javafx.tools.ant"
classpath="${packaging_resources}:${javafx_ant_jar.win}" />
<fx:deploy width="600" height="400" verbose="true" nativeBundles="exe" outdir="./packages" outfile="Juggling Lab">
<fx:application name="Juggling Lab" version="${jlab_version}" mainClass="jugglinglab.JugglingLab" />
<fx:preferences shortcut="true" menu="true" install="true" />
<fx:resources>
<fx:fileset dir="${bin}" includes="JugglingLab.jar" />
<fx:fileset dir="${bin}" includes="JugglingLab_fx.jar" />
<fx:fileset dir="${lib}" includes="*.jar" />
<fx:fileset dir="${lib}" />
</fx:resources>
<!-- set a Java property the code can use to tell it's running as a bundled app: -->
<fx:platform>
<fx:jvmarg value="-Xss2048k" />
<fx:property name="JL_run_as_bundle" value="true" />
</fx:platform>
</fx:deploy>
Expand Down
4 changes: 2 additions & 2 deletions source/resources/package/windows/Juggling Lab.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
;I.e. current directory will contain folder Juggling Lab with application files

#define MyAppName "Juggling Lab"
#define MyAppVersion "1.2.1"
#define MyAppYear "2019"
#define MyAppVersion "1.3"
#define MyAppYear "2020"
#define MyAppExeName "Juggling Lab.exe"
#define MyAppIconsName "Juggling Lab.ico"
#define MyWizardImageFileName "Juggling Lab-setup-icon.bmp"
Expand Down

0 comments on commit 43bab50

Please sign in to comment.