diff --git a/build.xml b/build.xml index 2e566cc9a..fb9a0a609 100644 --- a/build.xml +++ b/build.xml @@ -6,7 +6,7 @@ | +--> - + @@ -17,31 +17,31 @@ + - - - + - + - + + - + + + + + + + ${lib.dir}/*.jar + + + ${java.version} + + + + + + + + + + + + + diff --git a/gridworks b/gridworks index 88891cf15..0395bb3ef 100755 --- a/gridworks +++ b/gridworks @@ -43,6 +43,7 @@ and is one of run ....................... Run Gridworks make_dmg ........ Make MacOSX DMG distribution + make_exe ........ Make Windows EXE distribution clean ..................... Clean compiled classes distclean ................. Remove all generated files @@ -74,18 +75,18 @@ ant_prepare() { ANT=`which ant` if [ "$ANT" = "" ] ; then - ANT_TAR=`ls thirdparty | grep apache-ant` - ANT_DIR="$GRIDWORKS_BUILD_DIR/ant" - ANT="$ANT_DIR/bin/ant" + ANT_TAR=`find thirdparty | grep apache-ant | grep -v svn` + ANT_DIR=`echo $ANT_TAR | sed 's/.tar.gz//'` if [ ! -d $ANT_DIR ] ; then - tar xzf $ANT_TAR -C $BUILD_DIR || exit 1 + tar xzf $ANT_TAR -C $GRIDWORKS_BUILD_DIR || exit 1 fi + ANT="$ANT_DIR/bin/ant" fi } ant() { ant_prepare - $ANT -f build.xml -Dbuild.dir="$GRIDWORKS_BUILD_DIR" -Ddist.dir="$GRIDWORKS_DIST_DIR" -Dversion="$VERSION" $1 || exit 1 + $ANT -f build.xml -Dbuild.dir="$GRIDWORKS_BUILD_DIR" -Ddist.dir="$GRIDWORKS_DIST_DIR" -Dversion="$VERSION" -Djava.options="$JAVA_OPTIONS" $1 || exit 1 } dist_prepare() { @@ -93,7 +94,29 @@ dist_prepare() { mkdir $GRIDWORKS_DIST_DIR || exit 1 fi } - + +launch4j_prepare() { + LAUNCH4J_TAR=`find thirdparty | grep launch4j | grep -v svn` + LAUNCH4J_DIR="thirdparty/launch4j" + if [ ! -d "$LAUNCH4J_DIR" ] ; then + tar xzf $LAUNCH4J_TAR -C thirdparty || exit 1 + fi +} + +make_exe() { + check_macosx + dist_prepare + launch4j_prepare + + VERSION=$1 + + if [ "$VERSION" == "" ] ; then + fail "Must specify a version number" + fi + + ant exe +} + make_dmg() { check_macosx dist_prepare @@ -215,7 +238,7 @@ ACTION=$1; shift # ----- Verify and Set Required Environment Variables ------------------------- if [ "$JAVA_OPTIONS" == "" ] ; then - JAVA_OPTIONS="-Xms256M -Xmx1024M -XX:+UseLargePages -XX:+UseConcMarkSweepGC -XX:+UseParallelGC" + JAVA_OPTIONS="-Xms256M -Xmx1024M -XX:+UseLargePages -XX:+UseParallelGC" fi add_option "$JAVA_OPTIONS" @@ -250,7 +273,7 @@ fi case "$ACTION" in build) - ant compile;; + ant build;; bundle) ant bundle;; @@ -266,6 +289,9 @@ case "$ACTION" in make_dmg) make_dmg $1;; + + make_exe) + make_exe $1;; *) usage; ;; diff --git a/gridworks.bat b/gridworks.bat index 4bed535ad..55b123bba 100644 --- a/gridworks.bat +++ b/gridworks.bat @@ -37,13 +37,16 @@ echo /x enable JMX monitoring (for jconsole and friends) echo. echo and is one of echo. -echo build ..... Build Gridworks -echo run ....... Run Gridworks +echo build ..................... Build Gridworks +echo run ....................... Run Gridworks +echo. +echo clean ..................... Clean compiled classes +echo distclean ................. Remove all generated files echo. goto end :fail -echo See: '%0 /h' for usage. +echo Type 'gridworks /h' for usage. goto end :endUtils @@ -97,7 +100,7 @@ goto loop rem --- Fold in Environment Vars -------------------------------------------- if not "%JAVA_OPTIONS%" == "" goto gotJavaOptions -set JAVA_OPTIONS=-Xms256M -Xmx1024M +set JAVA_OPTIONS=-Xms256M -Xmx1024M -XX:+UseLargePages -XX:+UseParallelGC :gotJavaOptions set OPTS=%OPTS% %JAVA_OPTIONS% @@ -127,23 +130,21 @@ set GRIDWORKS_LIB_DIR=lib rem ----- Respond to the action ---------------------------------------------------------- set ACTION=%1 - -if not "%ACTION%" == "" goto gotAction -set ACTION="run" -:gotAction -if ""%ACTION%"" == ""build"" goto doBuild +if ""%ACTION%"" == ""build"" goto doAnt +if ""%ACTION%"" == ""clean"" goto doAnt +if ""%ACTION%"" == ""distclean"" goto doAnt if ""%ACTION%"" == ""run"" goto doRun goto usage - -:doBuild -ant -f build.xml compile -goto end :doRun set CLASSPATH="%GRIDWORKS_BUILD_DIR%\classes;%GRIDWORKS_LIB_DIR%\*" "%JAVA_HOME%\bin\java.exe" -cp %CLASSPATH% %OPTS% com.metaweb.gridworks.Gridworks goto end + +:doAnt +ant -f build.xml -Dbuild.dir="%GRIDWORKS_BUILD_DI%" -Ddist.dir="%GRIDWORKS_DIST_DIR%" -Dversion="%VERSION%" %ACTION% +goto end :end diff --git a/src/graphics/icon/gridworks.ico b/src/graphics/icon/gridworks.ico new file mode 100644 index 000000000..a62568b57 Binary files /dev/null and b/src/graphics/icon/gridworks.ico differ diff --git a/thirdparty/apache-ant-1.8.0.tar.gz b/thirdparty/apache-ant-1.8.0.tar.gz new file mode 100644 index 000000000..4f61ffcef Binary files /dev/null and b/thirdparty/apache-ant-1.8.0.tar.gz differ diff --git a/thirdparty/apache-ant-1.8.0RC1-slim.tar.gz b/thirdparty/apache-ant-1.8.0RC1-slim.tar.gz deleted file mode 100644 index 1108874dc..000000000 Binary files a/thirdparty/apache-ant-1.8.0RC1-slim.tar.gz and /dev/null differ diff --git a/thirdparty/launch4j-3.0.1-macosx.tar.gz b/thirdparty/launch4j-3.0.1-macosx.tar.gz new file mode 100644 index 000000000..74a408b92 Binary files /dev/null and b/thirdparty/launch4j-3.0.1-macosx.tar.gz differ diff --git a/thirdparty/launch4j-3.01.jar b/thirdparty/launch4j-3.01.jar deleted file mode 100644 index ec68ae48d..000000000 Binary files a/thirdparty/launch4j-3.01.jar and /dev/null differ