2011-12-13 14:45:38 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2011-12-15 09:22:34 +00:00
|
|
|
7z > /dev/null 2>&1
|
|
|
|
if [ $? != 0 ]; then
|
|
|
|
echo $0 requires 7zip to run.
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2011-12-13 14:45:38 +00:00
|
|
|
#Get portable python and extract it.
|
|
|
|
if [ ! -f "PortablePython_2.7.2.1.exe" ]; then
|
|
|
|
wget http://ftp.nluug.nl/languages/python/portablepython/v2.7/PortablePython_2.7.2.1.exe
|
|
|
|
fi
|
2011-12-15 09:58:10 +00:00
|
|
|
if [ ! -f pyserial.exe ]; then
|
|
|
|
wget http://sourceforge.net/projects/pyserial/files/pyserial/2.5/pyserial-2.5.win32.exe/download
|
|
|
|
mv download pyserial.exe
|
|
|
|
fi
|
2011-12-13 14:45:38 +00:00
|
|
|
if [ ! -d target/python ]; then
|
|
|
|
7z x PortablePython_2.7.2.1.exe \$_OUTDIR/App
|
2011-12-15 09:58:10 +00:00
|
|
|
7z x PortablePython_2.7.2.1.exe \$_OUTDIR/Lib/site-packages
|
|
|
|
7z x pyserial.exe PURELIB
|
2011-12-13 14:45:38 +00:00
|
|
|
mkdir -p target/python
|
|
|
|
mv \$_OUTDIR/App/* target/python
|
2011-12-15 09:58:10 +00:00
|
|
|
mv \$_OUTDIR/Lib/site-packages/wx* target/python/Lib/site-packages/
|
|
|
|
mv PURELIB/serial target/python/Lib
|
2011-12-13 14:45:38 +00:00
|
|
|
rm -rf \$_OUTDIR
|
2011-12-15 09:58:10 +00:00
|
|
|
rm -rf PURELIB
|
2011-12-13 14:45:38 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
#Get pypy and extract it
|
|
|
|
if [ ! -f "pypy-1.7-win32.zip" ]; then
|
|
|
|
wget https://bitbucket.org/pypy/pypy/downloads/pypy-1.7-win32.zip
|
|
|
|
fi
|
|
|
|
if [ ! -d target/pypy-1.7 ]; then
|
|
|
|
mkdir -p target/pypy-1.7
|
|
|
|
cd target
|
|
|
|
7z x ../pypy-1.7-win32.zip
|
|
|
|
cd ..
|
|
|
|
fi
|
|
|
|
|
|
|
|
for NR in `ls patches`; do
|
|
|
|
if [ ! -f "${NR}_reprap_python_beanshell.zip" ]; then
|
|
|
|
wget http://fabmetheus.crsndoo.com/files/${NR}_reprap_python_beanshell.zip
|
|
|
|
fi
|
|
|
|
if [ ! -d "ori/${NR}" ]; then
|
|
|
|
mkdir -p ori/${NR}
|
|
|
|
cd ori/${NR}
|
|
|
|
7z x ../../${NR}_reprap_python_beanshell.zip
|
|
|
|
cd ../..
|
|
|
|
fi
|
|
|
|
rm -rf target/SF${NR}
|
|
|
|
cp -a ori/${NR} target/SF${NR}
|
|
|
|
cd target/SF${NR}
|
|
|
|
patch -p 2 < ../../patches/${NR}
|
|
|
|
cd ../..
|
2011-12-16 17:43:13 +00:00
|
|
|
echo "python\\python.exe SF${NR}\\skeinforge_application\\skeinforge.py" > target/SF${NR}.bat
|
2011-12-13 14:45:38 +00:00
|
|
|
echo $NR
|
|
|
|
done
|
|
|
|
|
2011-12-13 15:41:02 +00:00
|
|
|
cd target
|
|
|
|
7z a ../Skeinforge_PyPy.zip *
|
|
|
|
cd ..
|
|
|
|
|