move .app location

This commit is contained in:
benfry
2010-02-06 04:17:53 +00:00
parent efa37300e9
commit 0994c0aec3
9 changed files with 0 additions and 468 deletions
-84
View File
@@ -1,84 +0,0 @@
#!/bin/sh
REVISION=`head -1 ../../todo.txt | awk '{print $1}'`
if [ $1 ]
then
RELEASE=$1
echo Creating Processing release $RELEASE...
INFO_SOUGHT="<string>$RELEASE,"
INFO_FOUND=`cat ./dist/Processing.app/Contents/Info.plist | grep $INFO_SOUGHT`
if [ -z "$INFO_FOUND" ]
then
echo Fix the version number in Info.plist
exit
fi
else
RELEASE=$REVISION
echo Creating Processing distribution for revision $REVISION...
fi
VERSIONED=`cat ../../app/src/processing/app/Base.java | grep $REVISION`
if [ -z "$VERSIONED" ]
then
echo Fix the revision number in Base.java
exit
fi
# remove any unfinished builds or old builds
rm -rf processing
rm -rf Processing*
rm -rf processing-*
rm -rf work
./make.sh
if [ $1 ]
then
# write the release version number into the output directory
echo $1 > work/Processing.app/Contents/Resources/Java/lib/version.txt
fi
echo Cleaning file boogers...
# remove boogers
find work -name "*~" -exec rm -f {} ';'
# need to leave ds store stuff cuz one of those is important
#find processing -name ".DS_Store" -exec rm -f {} ';'
find work -name "._*" -exec rm -f {} ';'
find work -name "Thumbs.db" -exec rm -f {} ';'
# clean out the cvs entries
find work -name "CVS" -exec rm -rf {} ';' 2> /dev/null
find work -name ".cvsignore" -exec rm -rf {} ';'
find work -name ".svn" -exec rm -rf {} 2> /dev/null ';'
# the following was adopted from the makefile by Remko Troncon:
# http://el-tramo.be/guides/fancy-dmg
echo Creating disk image...
SOURCE_DIR="work"
SOURCE_FILES="Processing.app"
OUTPUT_DMG="processing-$RELEASE"
WORK_DMG="working.dmg"
WORK_DIR="working_dir"
gzip -cd template.dmg.gz > "$WORK_DMG"
mkdir -p "$WORK_DIR"
hdiutil attach "$WORK_DMG" -noautoopen -quiet -mountpoint "$WORK_DIR"
for i in "$SOURCE_FILES"; do
rm -rf "$WORK_DIR/$i"
ditto -rsrc "$SOURCE_DIR/$i" "$WORK_DIR/$i"
done
WC_DEV=`hdiutil info | grep "$WORK_DIR" | awk '{print $1}'` && hdiutil detach $WC_DEV -quiet -force
hdiutil convert "$WORK_DMG" -quiet -format UDZO -imagekey zlib-level=9 -o "$OUTPUT_DMG"
rm -rf "$WORK_DIR"
rm -f "$WORK_DMG"
# for later, if we need to resize, etc
#hdiutil resize -size 200mb -growonly -imageonly working.dmg
echo Done.
-265
View File
@@ -1,265 +0,0 @@
#!/bin/sh
# http://dev.processing.org/bugs/show_bug.cgi?id=1179
OSX_VERSION=`sw_vers | grep ProductVersion | awk '{print $2}' | awk '{print substr($0,1,4)}'`
if [ "$OSX_VERSION" = "10.4" ]
then
echo "This script uses the -X option for cp (to disable resource forks),"
echo "which is not supported on OS X 10.4. Please either upgrade to 10.5,"
echo "or modify this script to remove use of the -X switch to continue."
# and you will also need to remove this error message
exit
fi
### -- SETUP WORK DIR -------------------------------------------
RESOURCES=`pwd`/work/Processing.app/Contents/Resources/Java
#echo $RESOURCES
#exit
if test -d work
then
BUILD_PREPROC=false
else
echo Setting up directories to build under Mac OS X
BUILD_PREPROC=true
mkdir work
# to have a copy of this guy around for messing with
echo Copying Processing.app...
#cp -a dist/Processing.app work/ # #@$(* bsd switches
#/sw/bin/cp -a dist/Processing.app work/
cp -pRX dist/Processing.app work/
# cvs doesn't seem to want to honor the +x bit
chmod +x work/Processing.app/Contents/MacOS/JavaApplicationStub
cp -rX ../shared/lib "$RESOURCES/"
cp -rX ../shared/libraries "$RESOURCES/"
cp -rX ../shared/tools "$RESOURCES/"
cp -X ../../app/lib/antlr.jar "$RESOURCES/"
cp -X ../../app/lib/ecj.jar "$RESOURCES/"
cp -X ../../app/lib/jna.jar "$RESOURCES/"
cp -X ../../app/lib/ant.jar "$RESOURCES/"
cp -X ../../app/lib/ant-launcher.jar "$RESOURCES/"
echo Extracting examples...
unzip -q -d "$RESOURCES/" ../shared/examples.zip
echo Extracting reference...
unzip -q -d "$RESOURCES/" ../shared/reference.zip
LIBRARIES=$RESOURCES/libraries/
cp -rX ../../net "$LIBRARIES"
cp -rX ../../opengl "$LIBRARIES"
cp -rX ../../serial "$LIBRARIES"
cp -rX ../../video "$LIBRARIES"
cp -rX ../../pdf "$LIBRARIES"
cp -rX ../../dxf "$LIBRARIES"
fi
### -- START BUILDING -------------------------------------------
# move to root 'processing' directory
cd ../..
### -- BUILD CORE ----------------------------------------------
echo Building processing.core...
cd core
#CLASSPATH=/System/Library/Frameworks/JavaVM.framework/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Classes/ui.jar:/System/Library/Java/Extensions/QTJava.zip
#export CLASSPATH
perl preproc.pl
mkdir -p bin
javac -source 1.5 -target 1.5 \
-encoding UTF-8 \
-d bin \
src/processing/core/*.java \
src/processing/xml/*.java
rm -f "$RESOURCES/core.jar"
cd bin && \
zip -rq "$RESOURCES/core.jar" \
processing/core/*.class \
processing/xml/*.class \
&& cd ..
# head back to "processing/app"
cd ../app
### -- BUILD PARSER ---------------------------------------------
#BUILD_PREPROC=true
if $BUILD_PREPROC
then
# build classes/grammar for preprocessor
echo Building antlr grammar code...
# first build the default java goop
java -cp "$RESOURCES/antlr.jar" antlr.Tool \
-o src/antlr/java \
src/antlr/java/java.g
# hack to get around path mess
cp -X src/antlr/java/JavaTokenTypes.txt src/processing/app/preproc/
# now build the pde stuff that extends the java classes
java -cp "$RESOURCES/antlr.jar" antlr.Tool \
-o src/processing/app/preproc \
-glib src/antlr/java/java.g src/processing/app/preproc/pde.g
fi
### -- BUILD PDE ------------------------------------------------
echo Building the PDE...
# For some reason, javac really wants this folder to exist beforehand.
rm -rf ../build/macosx/work/classes
mkdir ../build/macosx/work/classes
# Intentionally keeping this separate from the 'bin' folder
# used by eclipse so that they don't cause conflicts.
javac \
-Xlint:deprecation \
-source 1.5 -target 1.5 \
-encoding UTF-8 \
-classpath "$RESOURCES/core.jar:$RESOURCES/antlr.jar:$RESOURCES/ant.jar:$RESOURCES/ant-launcher.jar:$RESOURCES/ecj.jar:$RESOURCES/jna.jar" \
-d ../build/macosx/work/classes \
src/processing/app/*.java \
src/processing/app/debug/*.java \
src/processing/app/macosx/*.java \
src/processing/app/preproc/*.java \
src/processing/app/syntax/*.java \
src/processing/app/tools/*.java \
src/processing/app/tools/android/*.java \
src/antlr/*.java \
src/antlr/java/*.java
cd ../build/macosx/work/classes
rm -f "$RESOURCES/pde.jar"
zip -0rq "$RESOURCES/pde.jar" .
cd ../..
# get updated core.jar and pde.jar; also antlr.jar and others
#mkdir -p work/Processing.app/Contents/Resources/Java/
#cp work/lib/*.jar work/Processing.app/Contents/Resources/Java/
### -- BUILD LIBRARIES ------------------------------------------------
PLATFORM=macosx
CLASSPATH=$RESOURCES/core.jar
JAVAC="javac -source 1.5 -target 1.5 -encoding UTF-8 -encoding UTF-8"
LIBRARIES=$RESOURCES/libraries
# move to processing/build
cd ..
# SERIAL LIBRARY
echo Building serial library...
cd ../serial
mkdir -p bin
$JAVAC \
-classpath "library/RXTXcomm.jar:$CLASSPATH" \
-d bin src/processing/serial/*.java
rm -f library/serial.jar
#find bin -name "*~" -exec rm -f {} ';'
cd bin && zip -rq ../library/serial.jar processing/serial/*.class && cd ..
mkdir -p "$LIBRARIES/serial/library/"
cp library/serial.jar "$LIBRARIES/serial/library/"
# NET LIBRARY
echo Building net library...
cd ../net
mkdir -p bin
$JAVAC \
-classpath "$CLASSPATH" \
-d bin src/processing/net/*.java
rm -f library/net.jar
#find bin -name "*~" -exec rm -f {} ';'
cd bin && zip -rq ../library/net.jar processing/net/*.class && cd ..
mkdir -p "$LIBRARIES/net/library/"
cp library/net.jar "$LIBRARIES/net/library/"
# VIDEO LIBRARY
echo Building video library...
QTJAVA=/System/Library/Java/Extensions/QTJava.zip
if test -f "${QTJAVA}"
then
echo "Found QuickTime for Java at $QTJAVA"
else
echo "QuickTime for Java must be installed before building."
exit 1;
fi
cd ../video
mkdir -p bin
$JAVAC \
-classpath "$QTJAVA:$CLASSPATH" \
-d bin src/processing/video/*.java
rm -f library/video.jar
#find bin -name "*~" -exec rm -f {} ';'
cd bin && zip -rq ../library/video.jar processing/video/*.class && cd ..
mkdir -p "$LIBRARIES/video/library/"
cp library/video.jar "$LIBRARIES/video/library/"
# OPENGL LIBRARY
echo Building OpenGL library...
cd ../opengl
mkdir -p bin
$JAVAC \
-classpath "library/jogl.jar:$CLASSPATH" \
-d bin src/processing/opengl/*.java
rm -f library/opengl.jar
#find bin -name "*~" -exec rm -f {} ';'
cd bin && zip -rq ../library/opengl.jar processing/opengl/*.class && cd ..
mkdir -p "$LIBRARIES/opengl/library/"
cp library/opengl.jar "$LIBRARIES/opengl/library/"
# PDF LIBRARY
echo Building PDF library...
cd ../pdf
mkdir -p bin
$JAVAC \
-classpath "library/itext.jar:$CLASSPATH" \
-d bin src/processing/pdf/*.java
rm -f library/pdf.jar
#find bin -name "*~" -exec rm -f {} ';'
cd bin && zip -rq ../library/pdf.jar processing/pdf/*.class && cd ..
mkdir -p "$LIBRARIES/pdf/library/"
cp library/pdf.jar "$LIBRARIES/pdf/library/"
# DXF LIBRARY
echo Building DXF library...
cd ../dxf
mkdir -p bin
$JAVAC \
-classpath "$CLASSPATH" \
-d bin src/processing/dxf/*.java
rm -f library/dxf.jar
#find bin -name "*~" -exec rm -f {} ';'
cd bin && zip -rq ../library/dxf.jar processing/dxf/*.class && cd ..
mkdir -p "$LIBRARIES/dxf/library/"
cp library/dxf.jar "$LIBRARIES/dxf/library/"
echo
echo Done.
-107
View File
@@ -1,107 +0,0 @@
#!/bin/sh
#
FOLDER="$1"
if [ -z "$FOLDER" ]; then
echo
echo "usage: $0 <folder>"
echo
exit 1
fi
if [ ! -d "$FOLDER" ]; then
echo $FOLDER does not exist
exit 2
fi
SIZE=`du -s "$FOLDER" | awk '{ print $1 }'`
# allow space for partition map and directory structure
SIZE=`echo 1024 + $SIZE \* 1.1 / 1 | bc`
NAME=`basename "$FOLDER"`
FILE=$NAME.dmg
TMP=${TMP:-/tmp}
if [ $SIZE -lt 9216 ]; then
SIZE=9216
fi
if [ -e "$FILE" ] ; then
echo $FILE already exists!
exit 3
fi
TMPFILE=$TMP/$$.dmg
echo Creating $TMPFILE from $FOLDER, $SIZE sectors...
hdiutil create $TMPFILE -sectors $SIZE -ov
if [ $? -ne 0 ] ; then
rm -f $TMPFILE
exit 4
fi
echo
DEVICES=`hdid -nomount $TMPFILE`
DEVMASTER=`echo $DEVICES| awk '{ print $1 }'`
# Different results on 10.4 vs 10.5. Yay! [fry]
#echo "devices as follows"
#echo $DEVICES
DARWINVERSION=`uname -r`
if [ $DARWINVERSION = "9.5.0" ] ; then
DEVHFS=`echo $DEVICES| awk '{ print $3 }'`
else
if [ $DARWINVERSION = "8.11.1" ] ; then
DEVHFS=`echo $DEVICES| awk '{ print $5 }'`
else
echo "This version of OS X not recognized."
exit;
fi
fi
echo Creating HFS partition $NAME on $TMPFILE at $DEVHFS
newfs_hfs -v "$NAME" $DEVHFS
if [ $? -ne 0 ] ; then
rm -f $TMPFILE
exit 5
fi
hdiutil eject $DEVMASTER
if [ $? -ne 0 ] ; then
rm -f $TMPFILE
exit 6
fi
DEVICES=`hdid $TMPFILE`
if [ $? -ne 0 ] ; then
rm -f $TMPFILE
exit 7
fi
# These two lines removed when doing the 10.4 and 10.5 split above.
# They seem to be duplicates, so just rely on the earlier logic. [fry]
#DEVMASTER=`echo $DEVICES| awk '{ print $1 }'`
#DEVHFS=`echo $DEVICES| awk '{ print $5 }'`
echo Copying $FOLDER to /Volumes/$NAME on $DEVMASTER
#sudo ditto -rsrcFork "$FOLDER" "/Volumes/$NAME"
ditto -rsrcFork "$FOLDER" "/Volumes/$NAME"
if [ $? -ne 0 ]; then
hdiutil eject $DEVMASTER
rm -f $TMPFILE
exit 8
fi
hdiutil eject $DEVMASTER
if [ $? -ne 0 ]; then
#rm -f $TMPFILE
exit 9
fi
echo "Compressing $NAME to $FILE"
#hdiutil convert $TMPFILE -format UDZO -o "$FILE"
hdiutil convert $TMPFILE -format UDZO -imagekey zlib-level=9 -o "$FILE"
if [ $? -ne 0 ]; then
rm -f "$FILE" $TMPFILE
exit 10
fi
rm -f $TMPFILE
# end
-12
View File
@@ -1,12 +0,0 @@
#!/bin/sh
# is qt java already included tho?
#CLASSPATH=/System/Library/Java/Extensions/QTJava.zip:lib:lib/build:lib/pde.jar:lib/core.jar:lib/antlr.jar:lib/oro.jar:lib/registry.jar
#export CLASSPATH
#cd work && /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Commands/java -Dapple.laf.useScreenMenuBar=true -Dapple.awt.showGrowBox=false processing.app.Base
#cd work && java -Dapple.laf.useScreenMenuBar=true -Dapple.awt.showGrowBox=false processing.app.Base
# starting with work on release 0120, run directly from the .app
cd work && ./Processing.app/Contents/MacOS/JavaApplicationStub