mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-17 06:52:18 +01:00
Updating linux build scripts, etc for Arduino 0017.
This commit is contained in:
parent
777e7cd30d
commit
c7b70fce3a
@ -6,10 +6,10 @@ REVISION=`head -1 ../../todo.txt | awk '{print $1}'`
|
||||
if [ $1 ]
|
||||
then
|
||||
RELEASE=$1
|
||||
echo Creating Processing release $RELEASE...
|
||||
echo Creating Arduino release $RELEASE...
|
||||
else
|
||||
RELEASE=$REVISION
|
||||
echo Creating Processing distribution for revision $REVISION...
|
||||
echo Creating Arduino distribution for revision $REVISION...
|
||||
fi
|
||||
|
||||
ARCH=`uname -m`
|
||||
@ -22,67 +22,67 @@ fi
|
||||
./make.sh
|
||||
|
||||
# remove any old boogers
|
||||
rm -rf processing
|
||||
rm -rf processing-*
|
||||
rm -rf arduino
|
||||
rm -rf arduino-*
|
||||
|
||||
mkdir processing
|
||||
cp -r ../shared/lib processing/
|
||||
cp -r ../shared/libraries processing/
|
||||
cp -r ../shared/tools processing/
|
||||
cp ../../app/lib/antlr.jar processing/lib/
|
||||
cp ../../app/lib/ecj.jar processing/lib/
|
||||
cp ../../app/lib/jna.jar processing/lib/
|
||||
cp ../shared/revisions.txt processing/
|
||||
mkdir arduino
|
||||
cp -r ../shared/lib arduino/
|
||||
cp -r ../shared/libraries arduino/
|
||||
cp -r ../shared/tools arduino/
|
||||
cp ../../app/lib/antlr.jar arduino/lib/
|
||||
cp ../../app/lib/ecj.jar arduino/lib/
|
||||
cp ../../app/lib/jna.jar arduino/lib/
|
||||
cp ../../app/lib/oro.jar arduino/lib/
|
||||
cp ../../app/lib/RXTXcomm.jar arduino/lib/
|
||||
cp ../../readme.txt arduino/
|
||||
|
||||
cp -r ../../hardware arduino/
|
||||
|
||||
cp -r dist/tools arduino/hardware
|
||||
cp dist/lib/librxtxSerial.so arduino/lib
|
||||
|
||||
if [ $1 ]
|
||||
then
|
||||
# write the release version number into the output directory
|
||||
echo $1 > processing/lib/version.txt
|
||||
echo $1 > arduino/lib/version.txt
|
||||
fi
|
||||
|
||||
echo Extracting examples...
|
||||
unzip -q -d processing/ ../shared/examples.zip
|
||||
echo Copying examples...
|
||||
cp -r ../shared/examples arduino/
|
||||
|
||||
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 ../../pdf processing/libraries/
|
||||
cp -r ../../dxf processing/libraries/
|
||||
unzip -q -d arduino/ ../shared/reference.zip
|
||||
|
||||
# add java (jre) files
|
||||
tar --extract --file=jre.tgz --ungzip --directory=processing
|
||||
#tar --extract --file=jre.tgz --ungzip --directory=arduino
|
||||
|
||||
# grab pde.jar and export from the working dir
|
||||
cp work/lib/pde.jar processing/lib/
|
||||
cp work/lib/core.jar processing/lib/
|
||||
cp work/lib/pde.jar arduino/lib/
|
||||
cp work/lib/core.jar arduino/lib/
|
||||
|
||||
# get platform-specific goodies from the dist dir
|
||||
install -m 755 dist/processing processing/processing
|
||||
install -m 755 dist/arduino arduino/arduino
|
||||
|
||||
# make sure notes.txt is unix LFs
|
||||
# the 2> is because the app is a little chatty
|
||||
dos2unix processing/revisions.txt 2> /dev/null
|
||||
dos2unix processing/lib/preferences.txt 2> /dev/null
|
||||
dos2unix arduino/readme.txt 2> /dev/null
|
||||
dos2unix arduino/lib/preferences.txt 2> /dev/null
|
||||
|
||||
# remove boogers
|
||||
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 {} ';'
|
||||
find arduino -name "*~" -exec rm -f {} ';'
|
||||
find arduino -name ".DS_Store" -exec rm -f {} ';'
|
||||
find arduino -name "._*" -exec rm -f {} ';'
|
||||
find arduino -name "Thumbs.db" -exec rm -f {} ';'
|
||||
|
||||
# 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 ';'
|
||||
find arduino -name "CVS" -exec rm -rf {} ';' 2> /dev/null
|
||||
find arduino -name ".cvsignore" -exec rm -rf {} ';'
|
||||
find arduino -name ".svn" -exec rm -rf {} 2> /dev/null ';'
|
||||
|
||||
# zip it all up for release
|
||||
echo Creating tarball and finishing...
|
||||
P5=processing-$RELEASE
|
||||
mv processing $P5
|
||||
P5=arduino-$RELEASE
|
||||
mv arduino $P5
|
||||
|
||||
tar cfz $P5.tgz $P5
|
||||
# nah, keep the new directory around
|
||||
|
@ -12,6 +12,9 @@ do
|
||||
done
|
||||
export CLASSPATH
|
||||
|
||||
LD_LIBRARY_PATH=`pwd`/lib:${LD_LIBRARY_PATH}
|
||||
export LD_LIBRARY_PATH
|
||||
|
||||
export PATH="${APPDIR}/java/bin:${PATH}"
|
||||
|
||||
java processing.app.Base
|
BIN
build/linux/dist/lib/librxtxSerial.so
vendored
Executable file
BIN
build/linux/dist/lib/librxtxSerial.so
vendored
Executable file
Binary file not shown.
BIN
build/linux/dist/tools/avrdude
vendored
Executable file
BIN
build/linux/dist/tools/avrdude
vendored
Executable file
Binary file not shown.
11914
build/linux/dist/tools/avrdude.conf
vendored
Normal file
11914
build/linux/dist/tools/avrdude.conf
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -15,24 +15,24 @@ else
|
||||
cp -r ../shared/libraries work/
|
||||
cp -r ../shared/tools work/
|
||||
|
||||
cp -r ../../hardware 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/oro.jar work/lib/
|
||||
cp ../../app/lib/RXTXcomm.jar work/lib/
|
||||
|
||||
echo Extracting examples...
|
||||
unzip -q -d work/ ../shared/examples.zip
|
||||
echo Copying examples...
|
||||
cp -r ../shared/examples work/
|
||||
|
||||
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/
|
||||
cp -r dist/tools work/hardware/
|
||||
cp dist/lib/librxtxSerial.so work/lib/
|
||||
|
||||
install -m 755 dist/processing work/processing
|
||||
install -m 755 dist/arduino work/arduino
|
||||
|
||||
ARCH=`uname -m`
|
||||
if [ $ARCH = "i686" ]
|
||||
@ -84,41 +84,6 @@ cd bin && zip -rq ../../build/linux/work/lib/core.jar \
|
||||
cd ..
|
||||
|
||||
|
||||
### -- BUILD PREPROC ------------------------------------------------
|
||||
|
||||
echo Building PDE for JDK 1.5...
|
||||
|
||||
cd app
|
||||
|
||||
# long path is to avoid requiring java to be in your PATH
|
||||
echo Building antlr grammar code...
|
||||
|
||||
# first build the default java goop
|
||||
../build/linux/work/java/bin/java \
|
||||
-cp ../build/linux/work/lib/antlr.jar antlr.Tool \
|
||||
-o src/antlr/java \
|
||||
src/antlr/java/java.g
|
||||
|
||||
# hack to get around path mess
|
||||
cp src/antlr/java/JavaTokenTypes.txt src/processing/app/preproc/
|
||||
|
||||
# now build the pde stuff that extends the java classes
|
||||
# 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
|
||||
cd src/antlr/java
|
||||
../../../../build/linux/work/java/bin/java \
|
||||
-cp ../../../../build/linux/work/lib/antlr.jar antlr.Tool \
|
||||
-o ../../processing/app/preproc \
|
||||
-glib java.g \
|
||||
../../processing/app/preproc/pde.g
|
||||
cd ../../..
|
||||
|
||||
# return to the root of the p5 folder
|
||||
cd ..
|
||||
|
||||
|
||||
### -- BUILD PDE ------------------------------------------------
|
||||
|
||||
cd app
|
||||
@ -130,16 +95,14 @@ mkdir ../build/linux/work/classes
|
||||
-cp ../build/linux/work/java/lib/tools.jar \
|
||||
com.sun.tools.javac.Main \
|
||||
-source 1.5 -target 1.5 \
|
||||
-classpath ../build/linux/work/lib/core.jar:../build/linux/work/lib/antlr.jar:../build/linux/work/lib/ecj.jar:../build/linux/work/lib/jna.jar:../build/linux/work/java/lib/tools.jar \
|
||||
-classpath ../build/linux/work/lib/core.jar:../build/linux/work/lib/antlr.jar:../build/linux/work/lib/ecj.jar:../build/linux/work/lib/jna.jar:../build/linux/work/lib/oro.jar:../build/linux/work/lib/RXTXcomm.jar:../build/linux/work/java/lib/tools.jar \
|
||||
-d ../build/linux/work/classes \
|
||||
src/processing/app/*.java \
|
||||
src/processing/app/debug/*.java \
|
||||
src/processing/app/linux/*.java \
|
||||
src/processing/app/preproc/*.java \
|
||||
src/processing/app/syntax/*.java \
|
||||
src/processing/app/tools/*.java \
|
||||
src/antlr/*.java \
|
||||
src/antlr/java/*.java
|
||||
src/processing/app/tools/*.java
|
||||
|
||||
cd ../build/linux/work/classes
|
||||
rm -f ../lib/pde.jar
|
||||
@ -147,88 +110,5 @@ zip -0rq ../lib/pde.jar .
|
||||
cd ../../../..
|
||||
|
||||
|
||||
### -- BUILD LIBRARIES ------------------------------------------------
|
||||
|
||||
cd build/linux
|
||||
|
||||
PLATFORM=linux
|
||||
|
||||
JAVAC="../build/linux/work/java/bin/java -cp ../build/linux/work/java/lib/tools.jar com.sun.tools.javac.Main -source 1.5 -target 1.5"
|
||||
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/
|
||||
|
||||
|
||||
# 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,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd work && ./processing && cd ..
|
||||
cd work && ./arduino && cd ..
|
||||
|
Loading…
x
Reference in New Issue
Block a user