Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
559 | FredericG | 1 | #! /usr/bin/bash |
2 | |||
561 | FredericG | 3 | |
4 | VERSION=$(cat CurrVersion.txt) |
||
5 | echo "Vesrion = "$VERSION |
||
6 | |||
559 | FredericG | 7 | HOME=$(pwd) |
8 | DIST=$HOME/dist |
||
9 | TMP=$DIST/tmp |
||
620 | FredericG | 10 | LOG=$HOME/build.log |
571 | FredericG | 11 | HEXFILE=$HOME/Executables/FlightCtrl/Flight-Ctrl_MEGA644p_VibrationTest.hex |
559 | FredericG | 12 | |
620 | FredericG | 13 | date > $LOG |
14 | |||
15 | echo Remove dist... |
||
16 | rm $DIST -rf |
||
17 | |||
559 | FredericG | 18 | echo Python Code... |
19 | mkdir $DIST/VibrationTest -p |
||
20 | cd $DIST/VibrationTest |
||
626 | FredericG | 21 | cp $HOME/VibrationTest/VibrationTestGui.py ./ |
22 | cp $HOME/VibrationTest/mkProto.py ./ |
||
23 | cp -a $HOME/VibrationTest/Resources ./ |
||
561 | FredericG | 24 | cp $HEXFILE ./ |
635 | FredericG | 25 | mkdir ./Data |
559 | FredericG | 26 | |
620 | FredericG | 27 | echo Compiled Python Code... | tee -a $LOG |
559 | FredericG | 28 | mkdir $TMP -p |
29 | cd $TMP |
||
30 | rm -rf |
||
31 | |||
32 | cp $HOME/VibrationTest/*.py ./ |
||
33 | echo "from distutils.core import setup" > ./setup.py |
||
34 | echo "import py2exe" >> ./setup.py |
||
620 | FredericG | 35 | echo "setup(console=['VibrationTestGui.py'])" >> ./setup.py |
559 | FredericG | 36 | |
620 | FredericG | 37 | python setup.py py2exe >> $LOG |
559 | FredericG | 38 | |
39 | mkdir $DIST/VibrationTestExe -p |
||
40 | cd $DIST/VibrationTestExe |
||
41 | cp $TMP/dist/* ./ -a |
||
626 | FredericG | 42 | cp -a $HOME/VibrationTest/Resources ./ |
635 | FredericG | 43 | mkdir ./Data |
559 | FredericG | 44 | |
561 | FredericG | 45 | cp $HEXFILE ./ |
46 | |||
559 | FredericG | 47 | echo Cleanup... |
48 | rm $TMP -rf |
||
49 | |||
620 | FredericG | 50 | echo Zipping... | tee -a $LOG |
559 | FredericG | 51 | cd $DIST |
620 | FredericG | 52 | atool -a VibrationTest_${VERSION}.zip VibrationTest >> $LOG |
53 | atool -a VibrationTestExe_${VERSION}.zip VibrationTestExe >> $LOG |
||
559 | FredericG | 54 | |
55 | |||
56 | |||
57 | |||
58 | |||
59 | |||
60 | |||
61 | |||
62 |