Skip to content

Commit

Permalink
Initial installer and launcher commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkraljevic committed Jun 2, 2013
1 parent a6881f7 commit 5d50cb8
Show file tree
Hide file tree
Showing 10 changed files with 748 additions and 0 deletions.
8 changes: 8 additions & 0 deletions installer/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

INSTALLER_OUTPUT_DIR = $(CURDIR)/../../installer_output
BITROCK_OPTS = --setvars project.outputDirectory=$(INSTALLER_OUTPUT_DIR)

build:
/Applications/BitRock\ InstallBuilder\ Professional\ 8.5.2/bin/Builder.app/Contents/MacOS/installbuilder.sh build h2o.xml osx $(BITROCK_OPTS)


158 changes: 158 additions & 0 deletions installer/h2o.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
<project>
<shortName>h2o</shortName>
<fullName>H2O</fullName>
<version>1.0</version>
<componentList>
<component>
<name>default</name>
<description>Default Component</description>
<canBeEdited>1</canBeEdited>
<selected>1</selected>
<show>1</show>
<folderList>
<folder>
<description>Program Files</description>
<destination>${installdir}</destination>
<name>programfiles</name>
<platforms>all</platforms>
<shortcutList>
<shortcut>
<comment>Uninstall</comment>
<exec>${installdir}/${uninstallerName}</exec>
<icon></icon>
<name>Uninstall ${product_fullname}</name>
<path>${installdir}</path>
<platforms>all</platforms>
<runAsAdmin>0</runAsAdmin>
<runInTerminal>0</runInTerminal>
<windowsExec>${installdir}/${uninstallerName}.exe</windowsExec>
<windowsExecArgs></windowsExecArgs>
<windowsIcon></windowsIcon>
<windowsPath>${installdir}</windowsPath>
</shortcut>
</shortcutList>
</folder>
<folder>
<description>Program Files</description>
<destination>${installdir}</destination>
<name>programfileslinux</name>
<platforms>linux</platforms>
</folder>
<folder>
<description>Program Files</description>
<destination>${installdir}</destination>
<name>programfileswindows</name>
<platforms>windows</platforms>
<distributionFileList>
<distributionDirectory>
<origin>${build_project_directory}/windows</origin>
</distributionDirectory>
</distributionFileList>
</folder>
<folder>
<description>Program Files</description>
<destination>${installdir}</destination>
<name>programfilesosx</name>
<platforms>osx</platforms>
<distributionFileList>
<distributionDirectory>
<origin>${build_project_directory}/macosx/Contents</origin>
</distributionDirectory>
</distributionFileList>
</folder>
</folderList>
<startMenuShortcutList>
<startMenuShortcut>
<comment>Uninstall ${product_fullname}</comment>
<name>Uninstall ${product_fullname}</name>
<runAsAdmin>0</runAsAdmin>
<runInTerminal>0</runInTerminal>
<windowsExec>${installdir}/${uninstallerName}.exe</windowsExec>
<windowsExecArgs></windowsExecArgs>
<windowsIcon></windowsIcon>
<windowsPath>${installdir}/</windowsPath>
</startMenuShortcut>
</startMenuShortcutList>
</component>
</componentList>
<preInstallationActionList>
<setInstallerVariable>
<name>installdir</name>
<value>/Applications/${product_shortname}.app</value>
<ruleList>
<platformTest>
<type>osx</type>
</platformTest>
</ruleList>
</setInstallerVariable>
<if>
<actionList>
<throwError>
<text>H2O is already installed on your computer. Please uninstall the current version first.</text>
</throwError>
</actionList>
<conditionRuleList>
<fileExists>
<path>${installdir}</path>
</fileExists>
</conditionRuleList>
</if>
</preInstallationActionList>
<postInstallationActionList>
<showQuestion>
<default>yes</default>
<text>Would you like to start H2O now?</text>
<variable>startnow</variable>
</showQuestion>
<if>
<actionList>
<setInstallerVariable>
<name>startscript</name>
<value>${installdir}/Contents/MacOS/h2o</value>
<ruleList>
<platformTest>
<type>osx</type>
</platformTest>
</ruleList>
</setInstallerVariable>
<setInstallerVariable>
<name>startscript</name>
<value>${installdir}/fix-windows-path.bat</value>
<ruleList>
<platformTest>
<type>windows</type>
</platformTest>
</ruleList>
</setInstallerVariable>
<runProgram>
<program>${startscript}</program>
<programArguments></programArguments>
</runProgram>
</actionList>
<conditionRuleList>
<isTrue>
<value>${startnow}</value>
</isTrue>
</conditionRuleList>
</if>
</postInstallationActionList>
<enableRollback>1</enableRollback>
<enableTimestamp>1</enableTimestamp>
<vendor>0xdata</vendor>
<parameterList>
<directoryParameter>
<name>installdir</name>
<description>Installer.Parameter.installdir.description</description>
<explanation>Installer.Parameter.installdir.explanation</explanation>
<value></value>
<default>${platform_install_prefix}/${product_shortname}-${product_version}</default>
<allowEmptyValue>0</allowEmptyValue>
<ask>0</ask>
<cliOptionName>prefix</cliOptionName>
<mustBeWritable>1</mustBeWritable>
<mustExist>0</mustExist>
<width>30</width>
</directoryParameter>
</parameterList>
</project>

26 changes: 26 additions & 0 deletions installer/macosx/Contents/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>

<key>CFBundleName</key>
<string>h2o</string>

<key>CFBundleShortVersionString</key>
<string>1.0</string>

<key>CFBundleVersion</key>
<string>1.0</string>

<key>CFBundleExecutable</key>
<string>h2o</string>

<key>CFBundleIconFile</key>
<string>h2o</string>

<key>CFBundlePackageType</key>
<string>APPL</string>

</dict>
</plist>

13 changes: 13 additions & 0 deletions installer/macosx/Contents/MacOS/h2o
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

# Set up variables and environment variables.
dir=`/usr/bin/dirname $0`
jre_version=jre1.7.0_21-osx
export JAVA_HOME=$dir/../Resources/$jre_version/java-osx
export H2O_DIR=$dir/../Resources
jar_file="${H2O_DIR}/H2OLauncher.jar"

# Run H2OLauncher in the background.
cd $H2O_DIR
$JAVA_HOME/bin/java -ea -cp ${h2o_jar_file} water.Boot 1> /tmp/h2olauncher.out 2> /tmp/h2olauncher.err &

Binary file added installer/macosx/Contents/Resources/h2o.icns
Binary file not shown.
Binary file added installer/macosx/Contents/Resources/h2o.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions launcher/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>
17 changes: 17 additions & 0 deletions launcher/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>H2OLauncher</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
14 changes: 14 additions & 0 deletions launcher/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="create_run_jar" name="Create Runnable Jar for Project H2OLauncher">
<!--this file was created by Eclipse Runnable JAR Export Wizard-->
<!--ANT 1.7 is required -->
<target name="create_run_jar">
<jar destfile="/Users/tomk/0xdata/ws/h2o/launcher/target/H2OLauncher.jar" filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Main-Class" value="H2OLauncher"/>
<attribute name="Class-Path" value="."/>
</manifest>
<fileset dir="/Users/tomk/0xdata/ws/h2o/launcher/bin"/>
</jar>
</target>
</project>
Loading

0 comments on commit 5d50cb8

Please sign in to comment.