mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
removing old build scripts
This commit is contained in:
@@ -1,115 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
REVISION=`head -1 ../../todo.txt | awk '{print $1}'`
|
||||
|
||||
if [ $1 ]
|
||||
then
|
||||
RELEASE=$1
|
||||
echo Creating Processing release $RELEASE...
|
||||
else
|
||||
RELEASE=$REVISION
|
||||
echo Creating Processing distribution for revision $REVISION...
|
||||
fi
|
||||
|
||||
# check to see if the version number in the app is correct
|
||||
# so that mikkel doesn't kick my ass
|
||||
VERSIONED=`cat ../../app/src/processing/app/Base.java | grep $REVISION`
|
||||
if [ -z "$VERSIONED" ]
|
||||
then
|
||||
echo Fix the revision number in Base.java
|
||||
exit
|
||||
fi
|
||||
|
||||
./make.sh
|
||||
|
||||
# remove any old boogers
|
||||
rm -rf processing
|
||||
rm -rf processing-*
|
||||
|
||||
mkdir processing
|
||||
cp -r ../shared/lib processing/
|
||||
cp -r ../shared/libraries processing/
|
||||
cp -r ../shared/tools processing/
|
||||
|
||||
if [ $1 ]
|
||||
then
|
||||
# write the release version number into the output directory
|
||||
echo $1 > processing/lib/version.txt
|
||||
fi
|
||||
|
||||
cp ../../app/lib/antlr.jar processing/lib/
|
||||
cp ../../app/lib/ecj.jar processing/lib/
|
||||
cp ../../app/lib/jna.jar processing/lib/
|
||||
cp ../../app/lib/ant.jar processing/lib/
|
||||
cp ../../app/lib/ant-launcher.jar processing/lib/
|
||||
|
||||
cp ../shared/revisions.txt processing/
|
||||
|
||||
echo Extracting examples...
|
||||
unzip -q -d processing/ ../shared/examples.zip
|
||||
|
||||
echo Extracting reference...
|
||||
unzip -q -d processing/ ../shared/reference.zip
|
||||
|
||||
# add the libraries folder with source
|
||||
cp -r ../../net processing/libraries/
|
||||
cp -r ../../opengl processing/libraries/
|
||||
cp -r ../../serial processing/libraries/
|
||||
cp -r ../../video processing/libraries/
|
||||
cp -r ../../pdf processing/libraries/
|
||||
cp -r ../../dxf processing/libraries/
|
||||
|
||||
# add java (jre) files
|
||||
unzip -q -d processing jre.zip
|
||||
|
||||
# get platform-specific goodies from the dist dir
|
||||
cp launcher/processing.exe processing/
|
||||
|
||||
# grab pde.jar and export from the working dir
|
||||
cp work/lib/pde.jar processing/lib/
|
||||
cp work/lib/core.jar processing/lib/
|
||||
|
||||
# convert revisions.txt to windows LFs
|
||||
# the 2> is because the app is a little chatty
|
||||
unix2dos processing/revisions.txt 2> /dev/null
|
||||
unix2dos processing/lib/preferences.txt 2> /dev/null
|
||||
unix2dos processing/lib/keywords.txt 2> /dev/null
|
||||
|
||||
# remove boogers
|
||||
find processing -name "*.bak" -exec rm -f {} ';'
|
||||
find processing -name "*~" -exec rm -f {} ';'
|
||||
find processing -name ".DS_Store" -exec rm -f {} ';'
|
||||
find processing -name "._*" -exec rm -f {} ';'
|
||||
find processing -name "Thumbs.db" -exec rm -f {} ';'
|
||||
|
||||
# chmod +x the crew
|
||||
find processing -name "*.html" -exec chmod +x {} ';'
|
||||
find processing -name "*.dll" -exec chmod +x {} ';'
|
||||
find processing -name "*.exe" -exec chmod +x {} ';'
|
||||
find processing -name "*.html" -exec chmod +x {} ';'
|
||||
|
||||
# clean out the cvs entries
|
||||
find processing -name "CVS" -exec rm -rf {} ';' 2> /dev/null
|
||||
find processing -name ".cvsignore" -exec rm -rf {} ';'
|
||||
find processing -name ".svn" -exec rm -rf {} ';' 2> /dev/null
|
||||
|
||||
# zip it all up for release
|
||||
echo Packaging standard release...
|
||||
echo
|
||||
P5=processing-$RELEASE
|
||||
mv processing $P5
|
||||
zip -rq $P5.zip $P5
|
||||
# nah, keep the new directory around
|
||||
#rm -rf $P5
|
||||
|
||||
# zip up another for experts
|
||||
#echo Expert release is disabled until further notice.
|
||||
echo Packaging expert release...
|
||||
echo
|
||||
cp -a $P5 $P5-expert
|
||||
# remove enormous java runtime
|
||||
rm -rf $P5-expert/java
|
||||
zip -rq $P5-expert.zip $P5-expert
|
||||
|
||||
echo Done.
|
||||
|
||||
@@ -1,288 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
### -- SETUP WORK DIR -------------------------------------------
|
||||
|
||||
if test -d work
|
||||
then
|
||||
BUILD_PREPROC=false
|
||||
else
|
||||
echo Setting up directories to build P5...
|
||||
BUILD_PREPROC=true
|
||||
|
||||
mkdir work
|
||||
cp -r ../shared/lib work/
|
||||
cp -r ../shared/libraries work/
|
||||
cp -r ../shared/tools work/
|
||||
|
||||
cp ../../app/lib/antlr.jar work/lib/
|
||||
cp ../../app/lib/ecj.jar work/lib/
|
||||
cp ../../app/lib/jna.jar work/lib/
|
||||
cp ../../app/lib/ant.jar work/lib/
|
||||
cp ../../app/lib/ant-launcher.jar work/lib/
|
||||
|
||||
echo Extracting examples...
|
||||
unzip -q -d work/ ../shared/examples.zip
|
||||
|
||||
echo Extracting reference...
|
||||
unzip -q -d work/ ../shared/reference.zip
|
||||
|
||||
cp -r ../../net work/libraries/
|
||||
cp -r ../../opengl work/libraries/
|
||||
cp -r ../../serial work/libraries/
|
||||
cp -r ../../video work/libraries/
|
||||
cp -r ../../pdf work/libraries/
|
||||
cp -r ../../dxf work/libraries/
|
||||
|
||||
echo Extracting enormous JRE...
|
||||
unzip -q -d work jre.zip
|
||||
|
||||
# build the export launcher
|
||||
cd export
|
||||
make
|
||||
cd ..
|
||||
|
||||
# build the processing.exe bundle
|
||||
# there are a few hacks in the source to launch4j-3.0.1
|
||||
# to build them, use the following:
|
||||
# cd head_src/gui_head && make -f Makefile.win
|
||||
cd launcher
|
||||
./launch4j/launch4jc.exe config.xml
|
||||
cp processing.exe ../work/
|
||||
cd ..
|
||||
|
||||
# chmod +x the crew
|
||||
# cygwin requires this because of unknown weirdness
|
||||
# it was not formerly this anal retentive
|
||||
# with the html, it's necessary on windows for launching reference
|
||||
# from shell/command prompt, which is done internally to view reference
|
||||
find work -name "*.html" -exec chmod +x {} ';'
|
||||
find work -name "*.dll" -exec chmod +x {} ';'
|
||||
find work -name "*.exe" -exec chmod +x {} ';'
|
||||
find work -name "*.html" -exec chmod +x {} ';'
|
||||
fi
|
||||
|
||||
cd ../..
|
||||
|
||||
|
||||
### -- BUILD CORE ----------------------------------------------
|
||||
|
||||
echo Building processing.core...
|
||||
|
||||
cd core
|
||||
|
||||
#CLASSPATH="..\\build\\windows\\work\\java\\lib\\rt.jar;..\\build\\windows\\work\\java\\lib\\tools.jar"
|
||||
#CLASSPATH="..\\build\\windows\\work\\java\\lib\\tools.jar"
|
||||
#export CLASSPATH
|
||||
|
||||
perl preproc.pl
|
||||
|
||||
mkdir -p bin
|
||||
../build/windows/work/java/bin/java \
|
||||
-classpath "..\\build\\windows\\work\\java\\lib\\tools.jar" \
|
||||
com.sun.tools.javac.Main \
|
||||
-source 1.5 -target 1.5 -d bin \
|
||||
-encoding UTF-8 \
|
||||
src/processing/core/*.java src/processing/xml/*.java
|
||||
|
||||
rm -f ../build/windows/work/lib/core.jar
|
||||
|
||||
# package this folder into core.jar
|
||||
cd bin && zip -rq ../../build/windows/work/lib/core.jar \
|
||||
processing/core/*.class processing/xml/*.class && cd ..
|
||||
|
||||
# back to base processing dir
|
||||
cd ..
|
||||
|
||||
### -- BUILD PREPROC ---------------------------------------------
|
||||
|
||||
if $BUILD_PREPROC
|
||||
then
|
||||
|
||||
echo Building PDE for JDK 1.5
|
||||
|
||||
cd app
|
||||
|
||||
# first build the default java goop
|
||||
../build/windows/work/java/bin/java \
|
||||
-cp "..\\build\\windows\\work\\lib\\antlr.jar" antlr.Tool \
|
||||
-o src/antlr/java \
|
||||
src/antlr/java/java.g
|
||||
|
||||
# now build the pde stuff that extends the java classes
|
||||
#../../build/windows/work/java/bin/java \
|
||||
# -cp "..\\..\\build\\windows\\work\\lib\\antlr.jar" antlr.Tool \
|
||||
# -o src/processing/app/preproc \
|
||||
# -glib antlr/java/java.g processing/app/preproc/pde.g
|
||||
|
||||
# this is totally ugly and needs to be fixed
|
||||
# the problem is that -glib doesn't set the main path properly,
|
||||
# so it's necessary to cd into the antlr/java folder, otherwise
|
||||
# the JavaTokenTypes.txt file won't be found
|
||||
|
||||
# this is the eventual hack to make things work
|
||||
# why this is required on windows and not the others is beyond me
|
||||
cp src/antlr/java/JavaTokenTypes.txt src/processing/app/preproc/
|
||||
|
||||
# this is a total disaster...fix me soon!
|
||||
cd src/processing/app/preproc
|
||||
../../../../../build/windows/work/java/bin/java \
|
||||
-cp "..\\..\\..\\..\\..\\build\\windows\\work\\lib\\antlr.jar" antlr.Tool \
|
||||
-glib ../../../antlr/java/java.g \
|
||||
pde.g
|
||||
cd ../../../..
|
||||
|
||||
|
||||
# back to base processing dir
|
||||
cd ..
|
||||
|
||||
fi
|
||||
|
||||
|
||||
### -- BUILD PDE ------------------------------------------------
|
||||
|
||||
cd app
|
||||
|
||||
# has to be present, otherwise javac will complain of file writing errors
|
||||
rm -rf ../build/windows/work/classes
|
||||
mkdir ../build/windows/work/classes
|
||||
|
||||
../build/windows/work/java/bin/java \
|
||||
-classpath "..\\build\\windows\\work\\java\\lib\\tools.jar" \
|
||||
com.sun.tools.javac.Main \
|
||||
-source 1.5 -target 1.5 \
|
||||
-encoding UTF-8 \
|
||||
-classpath "..\\build\\windows\\work\\lib\\core.jar;..\\build\\windows\\work\\lib\antlr.jar;..\\build\\windows\\work\\lib\ant.jar;..\\build\\windows\\work\\lib\ant-launcher.jar;..\\build\\windows\\work\\lib\\ecj.jar;..\\build\\windows\\work\\lib\\jna.jar;..\\build\\windows\\work\\java\\lib\\tools.jar" \
|
||||
-d ..\\build\\windows\\work\\classes \
|
||||
src/processing/app/*.java \
|
||||
src/processing/app/debug/*.java \
|
||||
src/processing/app/syntax/*.java \
|
||||
src/processing/app/preproc/*.java \
|
||||
src/processing/app/tools/*.java \
|
||||
src/processing/app/tools/android/*.java \
|
||||
src/processing/app/windows/*.java \
|
||||
src/antlr/*.java \
|
||||
src/antlr/java/*.java
|
||||
|
||||
cd ../build/windows/work/classes
|
||||
rm -f ../lib/pde.jar
|
||||
zip -rq ../lib/pde.jar .
|
||||
cd ../..
|
||||
|
||||
|
||||
### -- BUILD LIBRARIES ------------------------------------------------
|
||||
|
||||
PLATFORM=windows
|
||||
|
||||
|
||||
#CLASSPATH="..\\build\\$PLATFORM\\work\\lib\\core.jar;..\\build\\$PLATFORM\\work\\java\\lib\\rt.jar"
|
||||
#CLASSPATH="..\\build\\$PLATFORM\\work\\lib\\core.jar"
|
||||
|
||||
JAVAC="../build/windows/work/java/bin/java -classpath ..\\build\\windows\\work\\java\\lib\\tools.jar com.sun.tools.javac.Main -source 1.5 -target 1.5 -encoding UTF-8"
|
||||
CORE="..\\build\\$PLATFORM\\work\\lib\\core.jar"
|
||||
LIBRARIES="..\\build\\$PLATFORM\\work\\libraries"
|
||||
|
||||
# move to processing/build
|
||||
cd ..
|
||||
|
||||
|
||||
# SERIAL LIBRARY
|
||||
echo Building serial library...
|
||||
cd ../serial
|
||||
mkdir -p bin
|
||||
$JAVAC \
|
||||
-classpath "library\\RXTXcomm.jar;$CORE" \
|
||||
-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 "$CORE" \
|
||||
-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...
|
||||
if test -f "${QTJAVA}"
|
||||
then
|
||||
echo "Found Quicktime 7 installation"
|
||||
else
|
||||
QTJAVA="$WINDIR\\system32\\QTJava.zip"
|
||||
if test -f "${QTJAVA}"
|
||||
then
|
||||
echo "Found Quicktime 6 at $QTJAVA"
|
||||
else
|
||||
echo "Could not find QuickTime for Java,"
|
||||
echo "you'll need to install it before building."
|
||||
exit 1;
|
||||
fi
|
||||
fi
|
||||
cd ../video
|
||||
mkdir -p bin
|
||||
$JAVAC \
|
||||
-classpath "$QTJAVA;$CORE" \
|
||||
-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;$CORE" \
|
||||
-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;$CORE" \
|
||||
-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 "$CORE" \
|
||||
-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.
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
CLASSPATH=lib\\pde.jar\;lib\\core.jar\;lib\\jna.jar\;lib\\ecj.jar\;lib\\antlr.jar\;lib\\ant.jar\;lib\\ant-launcher.jar\;java\\lib\\tools.jar
|
||||
export CLASSPATH
|
||||
|
||||
cd work && ./java/bin/java processing.app.Base
|
||||
Reference in New Issue
Block a user