diff --git a/build.xml b/build.xml index 256b1ad59..e77be267f 100644 --- a/build.xml +++ b/build.xml @@ -30,11 +30,12 @@ - - - - - + + + + + + @@ -82,17 +83,17 @@ - + - + - - + + - - + + @@ -153,83 +154,70 @@ /> - + - + - - + + - + - - - + + + + - + - - + + - + - - - - - - + - + - + - - - - - - - - - - - - - + + + + - - + + - - - + + + diff --git a/gridworks b/gridworks index fc8de526a..ae49c6e25 100755 --- a/gridworks +++ b/gridworks @@ -52,9 +52,9 @@ and is one of test ...................... Test Gridworks - make_dmg ........ Make MacOSX DMG distribution - make_exe ........ Make Windows EXE distribution - make_cli ........ Make distributions to be run at command line + mac_dist ........ Make MacOSX binary distribution + windows_dist .... Make Windows binary distribution + linux_dist ...... Make Linux binary distribution dist ............ Make all distributions @@ -143,13 +143,13 @@ get_revision() { } dist() { - make_dmg $1 - make_exe $1 - make_cli $1 + mac_dist $1 + windows_dist $1 + linux_dist $1 - echo "Distributions were built." + echo "All distributions were built and are located at $GRIDWORKS_DIST_DIR" echo - echo "Upload them, then prepend the GridworksReleases array at" + echo "Upload them to the distibution site, then prepend the GridworksReleases array at" echo echo " http://acre.freebase.com/#app=/user/dfhuynh/labs-site&file=gridworks.js" echo @@ -163,42 +163,41 @@ dist() { echo } -make_exe() { +windows_dist() { check_macosx dist_prepare launch4j_prepare get_version $1 get_revision - ant exe + ant windows } -make_cli() { +linux_dist() { dist_prepare get_version $1 get_revision - ant cli + ant linux } -make_dmg() { +mac_dist() { check_macosx dist_prepare get_version $1 get_revision - ant bundle + ant mac - mkdir "$GRIDWORKS_BUILD_DIR/bundle/.background" - cp src/graphics/dmg_background/dmg_background.png "$GRIDWORKS_BUILD_DIR/bundle/.background/dmg_background.png" + mkdir -p "$GRIDWORKS_BUILD_DIR/mac/.background" + cp src/graphics/dmg_background/dmg_background.png "$GRIDWORKS_BUILD_DIR/mac/.background/dmg_background.png" SIZE=30 TITLE="Gridworks $VERSION" echo "Building MacOSX DMG for $TITLE" - hdiutil create -srcfolder "$GRIDWORKS_BUILD_DIR/bundle" -volname "$TITLE" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW -size ${SIZE}m "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" - DEVICE=$(hdiutil attach -readwrite -noverify -noautoopen "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" | egrep '^/dev/' | sed 1q | awk '{print $1}') - hdiutil attach "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" + hdiutil create -srcfolder "$GRIDWORKS_BUILD_DIR/mac" -volname "$TITLE" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW -size ${SIZE}m "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" + hdiutil attach -readwrite -noverify -noautoopen "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" echo ' tell application "Finder" @@ -224,10 +223,8 @@ make_dmg() { end tell ' | osascript - chmod -Rf go-w /Volumes/Gridworks sync sync - hdiutil detach $DEVICE hdiutil convert "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" -format UDZO -imagekey zlib-level=9 -o "$GRIDWORKS_DIST_DIR/gridworks-$VERSION-$REVISION.dmg" hdiutil internet-enable -yes "$GRIDWORKS_DIST_DIR/gridworks-$VERSION-$REVISION.dmg" rm -f "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" @@ -260,7 +257,6 @@ test() { run() { if [ ! -d $GRIDWORKS_BUILD_DIR/classes ] ; then is_jar=`ls $GRIDWORKS_LIB_DIR | grep gridworks` - echo "\"$is_jar\"" if [ "$is_jar" == "" ] ; then ant build echo "" @@ -305,10 +301,6 @@ execute() { # -------------------------- script ----------------------------- -# ----- We called without arguments print the usage ------------- - -[ $# -gt 0 ] || usage - # ----- Normalize the current directory ------------------------- cd `dirname $0` @@ -366,6 +358,10 @@ done ACTION=$1; shift +if [ "$ACTION" == "" ]; then + ACTION="run" +fi + # ----- Verify and Set Required Environment Variables ------------------------- if [ "$JAVA_OPTIONS" == "" ] ; then @@ -416,9 +412,6 @@ case "$ACTION" in build) ant build;; - bundle) - ant bundle;; - clean) ant clean;; @@ -434,14 +427,14 @@ case "$ACTION" in execute) execute $*;; - make_dmg) - make_dmg $1;; + mac_dist) + mac_dist $1;; - make_exe) - make_exe $1;; + windows_dist) + windows_dist $1;; - make_cli) - make_cli $1;; + linux_dist) + linux_dist $1;; dist) dist $1;; diff --git a/gridworks.bat b/gridworks.bat index cfb77fdb0..e4b46762b 100644 --- a/gridworks.bat +++ b/gridworks.bat @@ -161,11 +161,8 @@ if ""%ACTION%"" == ""clean"" goto doAnt if ""%ACTION%"" == ""distclean"" goto doAnt if ""%ACTION%"" == ""run"" goto doRun -goto usage - :doRun set CLASSPATH="%GRIDWORKS_BUILD_DIR%\classes;%GRIDWORKS_LIB_DIR%\*" -echo %OPTS% "%JAVA_HOME%\bin\java.exe" -cp %CLASSPATH% %OPTS% -Djava.library.path=lib/native/windows com.metaweb.gridworks.Gridworks goto end