make things more solid for snow-leopard

git-svn-id: http://google-refine.googlecode.com/svn/trunk@400 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
Stefano Mazzocchi 2010-04-07 00:12:40 +00:00
parent 9e90e6f05c
commit 0978a8ec1d
2 changed files with 27 additions and 15 deletions

View File

@ -27,6 +27,7 @@
<property name="conf.dir" value="${basedir}/src/conf" />
<property name="lib.dir" value="${basedir}/lib" />
<property name="tests.dir" value="${basedir}/tests" />
<property name="tools.dir" value="${basedir}/tools" />
<property name="server_classes.dir" value="${build.dir}/classes" />
<property name="webapp_classes.dir" value="${basedir}/src/main/webapp/WEB-INF/classes" />
@ -257,6 +258,7 @@
<target name="distclean" depends="clean">
<delete dir="${build.dir}" />
<delete dir="${dist.dir}" />
<delete dir="${tools.dir}" />
</target>
</project>

View File

@ -219,14 +219,7 @@ findbugs_prepare() {
FINDBUGS_FILE=`echo $FINDBUGS_URL | sed 's|.*/||'`
FINDBUGS_DIR="findbugs-1.3.9"
cd $GRIDWORKS_TOOLS_DIR
if [ ! -f "$FINDBUGS_FILE" ] ; then
download $FINDBUGS_URL $FINDBUGS_FILE
fi
if [ ! -d "$FINDBUGS_DIR" ] ; then
tar xzf $FINDBUGS_FILE || exit 1
fi
cd ..
tool_download $FINDBUGS_URL $FINDBUGS_FILE $FINDBUGS_DIR
}
# ----------------------------------------------------------------------------------------------
@ -289,17 +282,22 @@ mac_dist() {
get_revision
ANT_PARAMS="-Djarbundler.dir=${GRIDWORKS_TOOLS_DIR}/${JARBUNDLER_DIR}"
ant mac
ant mac || exit 1
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
if [ -f "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" ] ; then
rm "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg"
fi
TITLE="Gridworks $VERSION"
echo "Building MacOSX DMG for $TITLE"
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"
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" || error "can't create empty 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"
echo '
tell application "Finder"
@ -319,20 +317,30 @@ mac_dist() {
close
open
update without registering applications
delay 2
delay 2
eject
end tell
end tell
' | osascript
' | osascript || error "error running applescript"
sync
sync
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"
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" || error "Error compressing DMG"
hdiutil internet-enable -yes "$GRIDWORKS_DIST_DIR/gridworks-$VERSION-$REVISION.dmg" || error "Error internet-enabling DMG"
rm -f "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg"
}
test() {
ui_test $1
server_test $1
}
ui_test() {
windmill_prepare
}
server_test() {
if [ ! -d $GRIDWORKS_TEST_DIR/classes ] ; then
ant build_tests
echo ""
@ -529,6 +537,8 @@ case "$ACTION" in
clean) ant clean;;
distclean) ant distclean;;
test) test $1;;
ui_test) ui_test $1;;
server_test) server_test $1;;
findbugs) findbugs;;
run) run;;
execute) execute $*;;