Rev 626 |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
#! /usr/bin/bash
VERSION=$(cat CurrVersion.txt)
echo "Vesrion = "$VERSION
HOME=$(pwd)
DIST=$HOME/dist
TMP=$DIST/tmp
LOG=$HOME/build.log
HEXFILE=$HOME/Executables/FlightCtrl/Flight-Ctrl_MEGA644p_VibrationTest.hex
date > $LOG
echo Remove dist...
rm $DIST -rf
echo Python Code...
mkdir $DIST/VibrationTest -p
cd $DIST/VibrationTest
cp $HOME/VibrationTest/VibrationTestGui.py ./
cp $HOME/VibrationTest/mkProto.py ./
cp -a $HOME/VibrationTest/Resources ./
cp $HEXFILE ./
mkdir ./Data
echo Compiled Python Code... | tee -a $LOG
mkdir $TMP -p
cd $TMP
rm -rf
cp $HOME/VibrationTest/*.py ./
echo "from distutils.core import setup" > ./setup.py
echo "import py2exe" >> ./setup.py
echo "setup(console=['VibrationTestGui.py'])" >> ./setup.py
python setup.py py2exe >> $LOG
mkdir $DIST/VibrationTestExe -p
cd $DIST/VibrationTestExe
cp $TMP/dist/* ./ -a
cp -a $HOME/VibrationTest/Resources ./
mkdir ./Data
cp $HEXFILE ./
echo Cleanup...
rm $TMP -rf
echo Zipping... | tee -a $LOG
cd $DIST
atool -a VibrationTest_${VERSION}.zip VibrationTest >> $LOG
atool -a VibrationTestExe_${VERSION}.zip VibrationTestExe >> $LOG