mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
DojoDave - 20050905
Modified to compile and run the excutables in win32 from the originals by Mellis and Banzi
This commit is contained in:
@ -1,157 +1,168 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
|
||||||
### -- SETUP WORK DIR -------------------------------------------
|
### -- SETUP WORK DIR -------------------------------------------
|
||||||
|
|
||||||
if test -d work
|
if test -d work
|
||||||
then
|
then
|
||||||
BUILD_PREPROC=false
|
BUILD_PREPROC=false
|
||||||
else
|
else
|
||||||
echo Setting up directories to build arduino...
|
echo Setting up directories to build arduino...
|
||||||
BUILD_PREPROC=true
|
BUILD_PREPROC=true
|
||||||
cp -r ../shared work
|
cp -r ../shared work
|
||||||
rm -rf work/CVS
|
rm -rf work/CVS
|
||||||
rm -f work/.DS_Store
|
rm -f work/.DS_Store
|
||||||
|
|
||||||
# needs to make the dir because of packaging goofiness
|
# needs to make the dir because of packaging goofiness
|
||||||
mkdir -p work/classes/arduino/app/preproc
|
mkdir -p work/classes/arduino/app/preproc
|
||||||
mkdir -p work/classes/arduino/app/syntax
|
mkdir -p work/classes/arduino/app/syntax
|
||||||
mkdir -p work/classes/arduino/app/tools
|
mkdir -p work/classes/arduino/app/tools
|
||||||
|
|
||||||
|
|
||||||
# echo Extracting examples...
|
# echo Extracting examples...
|
||||||
# cd work
|
# cd work
|
||||||
#unzip -q examples.zip
|
#unzip -q examples.zip
|
||||||
# rm examples.zip
|
# rm examples.zip
|
||||||
# cd ..
|
# cd ..
|
||||||
|
|
||||||
echo Extracting reference...
|
echo Extracting reference...
|
||||||
# cd work
|
# cd work
|
||||||
# unzip -q reference.zip
|
# unzip -q reference.zip
|
||||||
# necessary for launching reference from shell/command prompt
|
# necessary for launching reference from shell/command prompt
|
||||||
# which is done internally to view reference
|
# which is done internally to view reference
|
||||||
#chmod +x reference/*.html
|
#chmod +x reference/*.html
|
||||||
# needed by 'help' menu
|
# needed by 'help' menu
|
||||||
#chmod +x reference/environment/*.html
|
#chmod +x reference/environment/*.html
|
||||||
# chmod -R +x *.html doesn't seem to work
|
# chmod -R +x *.html doesn't seem to work
|
||||||
|
|
||||||
# rm reference.zip
|
# rm reference.zip
|
||||||
# cd ..
|
# cd ..
|
||||||
|
|
||||||
echo Extracting enormous JRE...
|
echo Extracting enormous JRE...
|
||||||
unzip -q -d work jre.zip
|
unzip -q -d work jre.zip
|
||||||
# cygwin requires this because of unknown weirdness
|
# cygwin requires this because of unknown weirdness
|
||||||
# it was not formerly this anal retentive
|
# it was not formerly this anal retentive
|
||||||
cd work/java/bin/
|
cd work/java/bin/
|
||||||
#chmod +x *.exe *.dll
|
#chmod +x *.exe *.dll
|
||||||
#chmod +x client/*.dll
|
#chmod +x client/*.dll
|
||||||
cd ../../..
|
cd ../../..
|
||||||
|
|
||||||
mkdir work/lib/build
|
mkdir work/lib/build
|
||||||
#mkdir work/classes
|
#mkdir work/classes
|
||||||
|
|
||||||
echo Compiling arduino.exe
|
echo Compiling arduino.exe
|
||||||
cd launcher
|
cd launcher
|
||||||
make && cp arduino.exe ../work/
|
make && cp arduino.exe ../work/
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# get jikes and depedencies
|
# get jikes and depedencies
|
||||||
cp dist/jikes.exe work/
|
cp dist/jikes.exe work/
|
||||||
#chmod +x work/jikes.exe
|
#chmod +x work/jikes.exe
|
||||||
|
|
||||||
cp dist/ICE_JNIRegistry.dll work/
|
cp dist/ICE_JNIRegistry.dll work/
|
||||||
|
cp dist/serial/*.* work/lib/
|
||||||
# chmod +x the crew
|
mkdir work/tools
|
||||||
find work -name "*.dll" -exec chmod +x {} ';'
|
cp dist/avr_tools.zip .
|
||||||
find work -name "*.exe" -exec chmod +x {} ';'
|
echo Extracting avr tools ...
|
||||||
find work -name "*.html" -exec chmod +x {} ';'
|
unzip -q -d work avr.zip
|
||||||
fi
|
rm -f avr_tools.zip
|
||||||
|
cp dist/tools/*.* work/tools
|
||||||
cd ../..
|
cp dist/lib/makefile.win work/Makefile
|
||||||
|
mkdir work/core
|
||||||
|
cp ../../../core/*.* work/core
|
||||||
### -- BUILD PREPROC ---------------------------------------------
|
cp dist/core/makefile.win work/core/Makefile
|
||||||
|
|
||||||
# i suck at shell scripting
|
# chmod +x the crew
|
||||||
#if [ $1 = "preproc" ]
|
find work -name "*.dll" -exec chmod +x {} ';'
|
||||||
#then
|
find work -name "*.exe" -exec chmod +x {} ';'
|
||||||
#BUILD_PREPROC=true
|
find work -name "*.html" -exec chmod +x {} ';'
|
||||||
#fi
|
fi
|
||||||
|
|
||||||
if $BUILD_PREPROC
|
cd ../..
|
||||||
then
|
|
||||||
|
|
||||||
echo Building PDE for JDK 1.4
|
### -- BUILD PREPROC ---------------------------------------------
|
||||||
|
|
||||||
cd app/preproc
|
# i suck at shell scripting
|
||||||
|
#if [ $1 = "preproc" ]
|
||||||
# first build the default java goop
|
#then
|
||||||
../../build/windows/work/java/bin/java \
|
#BUILD_PREPROC=true
|
||||||
-cp "..\\..\\build\\windows\\work\\lib\\antlr.jar" antlr.Tool java.g
|
#fi
|
||||||
|
|
||||||
# now build the pde stuff that extends the java classes
|
if $BUILD_PREPROC
|
||||||
../../build/windows/work/java/bin/java \
|
then
|
||||||
-cp "..\\..\\build\\windows\\work\\lib\\antlr.jar" antlr.Tool \
|
|
||||||
-glib java.g pde.g
|
echo Building PDE for JDK 1.4
|
||||||
|
|
||||||
# back to base arduino dir
|
cd app/preproc
|
||||||
cd ../..
|
|
||||||
|
# first build the default java goop
|
||||||
fi
|
../../build/windows/work/java/bin/java \
|
||||||
|
-cp "..\\..\\build\\windows\\work\\lib\\antlr.jar" antlr.Tool java.g
|
||||||
|
|
||||||
### -- BUILD PDE ------------------------------------------------
|
# now build the pde stuff that extends the java classes
|
||||||
|
../../build/windows/work/java/bin/java \
|
||||||
cd app
|
-cp "..\\..\\build\\windows\\work\\lib\\antlr.jar" antlr.Tool \
|
||||||
|
-glib java.g pde.g
|
||||||
CLASSPATH="..\\build\\windows\\work\\lib\\core.jar;..\\build\\windows\\work\\lib\\mrj.jar;..\\build\\windows\\work\\lib\antlr.jar;..\\build\\windows\\work\\lib\\oro.jar;..\\build\\windows\\work\\lib\\registry.jar;..\\build\\windows\\work\\java\\lib\\rt.jar"
|
|
||||||
|
# back to base arduino dir
|
||||||
# compile the code as java 1.3, so that the application will run and
|
cd ../..
|
||||||
# show the user an error, rather than crapping out with some strange
|
|
||||||
# "class not found" crap
|
fi
|
||||||
../build/windows/work/jikes -target 1.3 +D -classpath "$CLASSPATH;..\\build\\windows\\work/classes" -d ..\\build\\windows\\work/classes *.java preproc/*.java syntax/*.java tools/*.java
|
|
||||||
#/cygdrive/c/jdk-1.4.2_05/bin/javac.exe -classpath $CLASSPATH -d ..\\build\\windows\\work/classes *.java jeditsyntax/*.java preprocessor/*.java
|
|
||||||
|
### -- BUILD PDE ------------------------------------------------
|
||||||
cd ../build/windows/work/classes
|
|
||||||
rm -f ../lib/pde.jar
|
cd app
|
||||||
zip -0rq ../lib/pde.jar .
|
|
||||||
|
CLASSPATH="..\\build\\windows\\work\\lib\\RXTXcomm.jar;..\\build\\windows\\work\\lib\\core.jar;..\\build\\windows\\work\\lib\\mrj.jar;..\\build\\windows\\work\\lib\antlr.jar;..\\build\\windows\\work\\lib\\oro.jar;..\\build\\windows\\work\\lib\\registry.jar;..\\build\\windows\\work\\java\\lib\\rt.jar"
|
||||||
# back to build/windows
|
|
||||||
cd ../..
|
# compile the code as java 1.3, so that the application will run and
|
||||||
|
# show the user an error, rather than crapping out with some strange
|
||||||
|
# "class not found" crap
|
||||||
### -- BUILD LIBRARIES ------------------------------------------------
|
../build/windows/work/jikes -target 1.3 +D -classpath "$CLASSPATH;..\\build\\windows\\work\\classes" -d ..\\build\\windows\\work\\classes *.java preproc/*.java syntax/*.java tools/*.java
|
||||||
|
#/cygdrive/c/jdk-1.4.2_05/bin/javac.exe -classpath $CLASSPATH -d ..\\build\\windows\\work\\classes *.java jeditsyntax/*.java preprocessor/*.java
|
||||||
|
|
||||||
PLATFORM=windows
|
cd ../build/windows/work/classes
|
||||||
|
rm -f ../lib/pde.jar
|
||||||
|
zip -0rq ../lib/pde.jar .
|
||||||
CLASSPATH="..\\build\\$PLATFORM\\work\\lib\\core.jar;..\\build\\$PLATFORM\\work\\java\\lib\\rt.jar"
|
|
||||||
JIKES=../build/$PLATFORM/work/jikes
|
# back to build/windows
|
||||||
CORE="..\\build\\$PLATFORM\\work\\lib\\core.jar"
|
cd ../..
|
||||||
LIBRARIES="..\\build\\$PLATFORM\\work\\libraries"
|
|
||||||
|
|
||||||
# move to arduino/build
|
### -- BUILD LIBRARIES ------------------------------------------------
|
||||||
cd ..
|
|
||||||
|
|
||||||
|
PLATFORM=windows
|
||||||
|
|
||||||
CLASSPATH="..\\..\\build\\$PLATFORM\\work\\lib\\core.jar;..\\..\\build\\$PLATFORM\\work\\java\\lib\\rt.jar"
|
|
||||||
JIKES=../../build/$PLATFORM/work/jikes
|
CLASSPATH="..\\build\\$PLATFORM\\work\\lib\\core.jar;..\\build\\$PLATFORM\\work\\java\\lib\\rt.jar"
|
||||||
CORE=..\\..\\build\\$PLATFORM\\work\\lib\\core.jar
|
JIKES=../build/$PLATFORM/work/jikes
|
||||||
LIBRARIES=..\\..\\build\\$PLATFORM\\work\\libraries
|
CORE="..\\build\\$PLATFORM\\work\\lib\\core.jar"
|
||||||
|
LIBRARIES="..\\build\\$PLATFORM\\work\\libraries"
|
||||||
|
|
||||||
# PARTICLES LIBRARY
|
# move to arduino/build
|
||||||
#echo Build particles library...
|
cd ..
|
||||||
#cd ../lib/particles
|
|
||||||
#$JIKES -target 1.1 +D -d . *.java
|
|
||||||
#rm -f library/particles.jar
|
|
||||||
#zip -r0q library/particles.jar simong
|
CLASSPATH="..\\..\\build\\$PLATFORM\\work\\lib\\core.jar;..\\..\\build\\$PLATFORM\\work\\java\\lib\\rt.jar"
|
||||||
#rm -rf simong
|
JIKES=../../build/$PLATFORM/work/jikes
|
||||||
#mkdir -p $LIBRARIES/particles/library/
|
CORE=..\\..\\build\\$PLATFORM\\work\\lib\\core.jar
|
||||||
#cp library/particles.jar $LIBRARIES/particles/library/
|
LIBRARIES=..\\..\\build\\$PLATFORM\\work\\libraries
|
||||||
|
|
||||||
echo
|
|
||||||
echo Done.
|
# PARTICLES LIBRARY
|
||||||
|
#echo Build particles library...
|
||||||
|
#cd ../lib/particles
|
||||||
|
#$JIKES -target 1.1 +D -d . *.java
|
||||||
|
#rm -f library/particles.jar
|
||||||
|
#zip -r0q library/particles.jar simong
|
||||||
|
#rm -rf simong
|
||||||
|
#mkdir -p $LIBRARIES/particles/library/
|
||||||
|
#cp library/particles.jar $LIBRARIES/particles/library/
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo Done.
|
||||||
|
|
||||||
|
@ -1,36 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
QT_JAVA_PATH="$WINDIR\\system32\\QTJava.zip"
|
PATH=lib:$PATH
|
||||||
if test -f "${QT_JAVA_PATH}"
|
CLASSPATH=\"java\\lib\\rt.jar\;lib\\RXTXcomm.jar\;lib\;lib\\build\;lib\\pde.jar\;lib\\mrj.jar\;lib\\antlr.jar\;lib\\oro.jar\;lib\\registry.jar\"
|
||||||
then
|
export PATH
|
||||||
#echo "Found Quicktime at $QT_JAVA_PATH"
|
|
||||||
else
|
|
||||||
QT_JAVA_PATH="$WINDIR\\system\\QTJava.zip"
|
|
||||||
if test -f "${QT_JAVA_PATH}"
|
|
||||||
echo "could not find qtjava.zip in either"
|
|
||||||
echo "${WINDIR}\\system32\\qtjava.zip or"
|
|
||||||
echo "${WINDIR}\\system\\qtjava.zip"
|
|
||||||
echo "quicktime for java must be installed before building."
|
|
||||||
exit 1;
|
|
||||||
then
|
|
||||||
#echo "Found Quicktime at $QT_JAVA_PATH"
|
|
||||||
else
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# rxtx testing
|
|
||||||
#CLASSPATH=java\\lib\\rt.jar\;lib\;lib\\build\;lib\\pde.jar\;lib\\kjc.jar\;lib\\oro.jar\;lib\\RXTXcomm.jar\;${QT_JAVA_PATH}
|
|
||||||
|
|
||||||
# will this one work? or do the quotes have to be chopped?
|
|
||||||
#CLASSPATH=java\\lib\\rt.jar\;lib\;lib\\build\;lib\\pde.jar\;lib\\kjc.jar\;lib\\antlr.jar\;lib\\oro.jar\;lib\\comm.jar\;lib\\RXTXcomm.jar\;${QTJAVA}
|
|
||||||
|
|
||||||
# version for javac/1.1 testing
|
|
||||||
#CLASSPATH=java\\lib\\rt.jar\;lib\;lib\\build\;lib\\pde.jar\;lib\\kjc.jar\;lib\\oro.jar\;java\\lib\\ext\\comm.jar\;${QT_JAVA_PATH}\;..\\..\\macos9\\JDKClasses.zip\;..\\..\\macos9\\JDKToolsClasses.zip
|
|
||||||
|
|
||||||
# includes jaws.jar
|
|
||||||
#CLASSPATH=\"java\\lib\\rt.jar\;java\\lib\\jaws.jar\;lib\;lib\\build\;lib\\pde.jar\;lib\\kjc.jar\;lib\\antlr.jar\;lib\\oro.jar\;lib\\comm.jar\;lib\\RXTXcomm.jar\;${QT_JAVA_PATH}\"
|
|
||||||
|
|
||||||
CLASSPATH=\"java\\lib\\rt.jar\;lib\;lib\\build\;lib\\pde.jar\;lib\\core.jar\;lib\\mrj.jar\;lib\\antlr.jar\;lib\\oro.jar\;lib\\registry.jar\;${QT_JAVA_PATH}\"
|
|
||||||
export CLASSPATH
|
export CLASSPATH
|
||||||
|
|
||||||
#cd work && ./java/bin/java -Xint PdeBase
|
#cd work && ./java/bin/java -Xint PdeBase
|
||||||
|
Reference in New Issue
Block a user