JSON_JAR="json-$JSON_BUILD.jar"
JSON_URL="https://search.maven.org/remotecontent?filepath=org/json/json/$JSON_BUILD/$JSON_JAR"
+# Confirm the command line param $1 is defined.
+if [ -z ${1+x} ]; then
+ echo "Platform argument required";
+ echo "$0 windows | linux";
+ exit 1;
+fi;
+
PLATFORM=$1;
if [ "$PLATFORM" == "windows" ]; then
+ # maintain separate directories for Java deps so they can live
+ # alongside each other (useful for creating Windows builds from
+ # Linux).
+ JDK_DIR_SHORT="$JDK_DIR_SHORT-win"
+ JFX_DIR_SHORT="$JFX_DIR_SHORT-win"
+
if [ ! -d "$JDK_DIR" ]; then
if [ ! -f "$WIN_JDK_ZIP" ]; then
wget "$WIN_JDK_URL";
elif [ "$PLATFORM" == "linux" ]; then
+ JDK_DIR_SHORT="$JDK_DIR_SHORT-linux"
+ JFX_DIR_SHORT="$JFX_DIR_SHORT-linux"
+
if [ ! -d "$JDK_DIR" ]; then
if [ ! -f "$LINUX_JDK_TAR" ]; then
wget "$LINUX_JDK_URL";
fi;
$UNZIP "$LINUX_JFX_ZIP"
fi;
-
else
- echo "Platform argument required";
+
+ echo "Valid platform argument required";
echo "$0 windows | linux";
exit 1;
fi;
mv "$JFX_DIR" "$JFX_DIR_SHORT";
if [ "$PLATFORM" == "windows" ]; then
- echo "Please remove the downloaded ZIP files before completing the Windows build"
+ echo "Please remove all .zip / .tar.gz files before completing the Windows build!"
echo
- echo "rm $WIN_JDK_ZIP"
- echo "rm $WIN_JFX_ZIP"
+ ls *.tar.gz *.zip 2> /dev/null
echo
fi;
[[hatch---java-print-storage-etc-service]]
-Hatch - Java Print / Storage / Etc Service
-------------------------------------------
+= Hatch - Java Print Service Windows Installer
-[[hatch-download-sources]]
-Hatch Download sources
-^^^^^^^^^^^^^^^^^^^^^^
+== Building on Linux
-http://git.evergreen-ils.org/?p=working/Hatch.git;a=summary
-
-[[requirements]]
-Requirements
-~~~~~~~~~~~~
-
-1. NSIS
-2. OpenJDK and OpenJFX v. 1.11 or higher
-
-
-[[pre-installation]]
-Pre-Installation
-~~~~~~~~~~~~~~~~
-
-Download the OpenJDK and OpenJFX bundles for Windows since they
-are added directly to the installer.
+=== Install NSIS
[source,sh]
-----------------------------------------------------------------------------
-
+sudo apt-get install nsis
-----------------------------------------------------------------------------
+=== Download Hatch Sources
-[[compiling-hatch]]
-Compiling Hatch
-^^^^^^^^^^^^^^^
-
-Before installing, Hatch will need to be properly compiled.
-
-Windows:
-++++++++
-
-....
-C:\> hatch.bat compile
-....
-
-Linux:
-++++++
-
-....
-$ ./hatch.sh compile
-....
+[source,sh]
+-----------------------------------------------------------------------------
+git clone git://git.evergreen-ils.org/Hatch.git
+cd Hatch
+-----------------------------------------------------------------------------
-More detail on this process and testing it can be found in
-INSTALL.adoc.
+=== Download Java Dependencies for Compilation
+NOTE: Dependencies for Windows and Linux are fetched since Linux is
+handling the Java compilation step.
-[[adding-contact-information]]
-Adding Contact Information
-^^^^^^^^^^^^^^^^^^^^^^^^^^
+[source,sh]
+-----------------------------------------------------------------------------
+./fetch-deps.sh linux
+./fetch-deps.sh windows
+-----------------------------------------------------------------------------
-Contact Information will be found when a user views the Add/Remove
-Programs tool in Windows in order to uninstall or view the information
-of an installed program. This information usually consists of an Email,
-a URL for updates, and a URL for a description of the program. To set
-these, you’ll have to edit defines.nsh, and edit the following fields:
+=== Compile Hatch
-....
-!define HELPURL "mailto:[your@email.here]"
-!define UPDATEURL "http://..."
-!define ABOUTURL "http://..."
-....
+[source,sh]
+-----------------------------------------------------------------------------
+./hatch.sh compile
+-----------------------------------------------------------------------------
-[[updating-version-number]]
-Updating Version Number
-^^^^^^^^^^^^^^^^^^^^^^^
+=== Updating Version Number
-As with above, there may be times you want Hatch to install with a new
-version number. In Defines.nsh, edit the following fields:
+Modify the following variables in 'defines.nsh' as needed to apply
+version numbers to the Hatch installer.
....
!define VERSIONMAJOR 2
!define VERSIONBUILD 0
....
-[[compile-installer]]
-Compile Installer
-^^^^^^^^^^^^^^^^^
-
-[[windows]]
-Windows:
-++++++++
+=== Create Windows Build
-1. Right click hatch.nsi -> Compile NSIS Script
-2. Run the generated installer
+From the Hatch checkout base directory.
-[[linux]]
-Linux:
-++++++
-
-1. Install NSIS if not already present on your system.
-+
-....
-sudo apt-get install nsis
-....
+[source,sh]
+-----------------------------------------------------------------------------
+# Prevent makensis from including these lib dirs
+# note: tried to do this in hatch.nsi but eventually gave up
+mv java-jdk-linux/lib java-jdk-linux/lib.tmp
+mv javafx-sdk-linux/lib javafx-sdk-linux/lib.tmp
-2. Navigate to the hatch repo and compile the installer
-+
-....
-cd ~/Hatch
makensis installer/windows/hatch.nsi
-....
-[[running-hatch]]
-Running Hatch
-~~~~~~~~~~~~~
-
-1. Once installed, open Chrome and navigate to chrome://extensions
-2. Ensure Developer Mode is ticked, and select ``Load Unpacked
-Extensions''
-3. Select [Installation Directory]/extension/app/.
-4. In Chrome, navigate to the browser staff URL
-(https://HOSTNAME/eg/staff/).
-5. Chrome should display a browser action icon along the top right of
-the +
-browser window (just left of the settings menu) with a letter ``H''. +
-** TODO: we can apply an icon of our choosing here during the install.
-6. Clicking the ``H'' button should produce a security prompt, click
-through +
-to allow the requested permissions.
-7. Reload the browser client login page.
-8. Open the Javascript console. It should show messages like:
+# recover original file names
+mv java-jdk-linux/lib.tmp java-jdk-linux/lib
+mv javafx-sdk-linux/lib.tmp javafx-sdk-linux/lib
+-----------------------------------------------------------------------------
-....
-Loading Hatch relay content script
-...
-sending to Hatch: {"key":"eg.workstation.all","action":"get","msgid":1}
-Hatch responded to message ID 1
-....
+=== Create the MD5 Sum
+
+[source,sh]
+-----------------------------------------------------------------------------
+VERSION=0.2.0 # Change to match version
+md5sum installer/windows/Hatch-Installer-$VERSION.exe > installer/windows/Hatch-Installer-$VERSION.exe.md5
+-----------------------------------------------------------------------------
-1. See if Hatch is able to communicate with your printer… Navigate to +
-https://HOSTNAME/eg/staff/admin/workstation/print/config
-2. The ``Select Printer'' drop-down should show your printer(s).
-3. The various printer attribute selectors should show values
-supported +
-by the selected printer.