Subversion Repositories Projects

Rev

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 ./
559 FredericG 25
 
620 FredericG 26
echo Compiled Python Code... | tee -a $LOG
559 FredericG 27
mkdir $TMP -p
28
cd $TMP
29
rm -rf
30
 
31
cp $HOME/VibrationTest/*.py  ./
32
echo  "from distutils.core import setup" > ./setup.py
33
echo  "import py2exe" >> ./setup.py
620 FredericG 34
echo  "setup(console=['VibrationTestGui.py'])" >> ./setup.py
559 FredericG 35
 
620 FredericG 36
python setup.py py2exe >> $LOG
559 FredericG 37
 
38
mkdir $DIST/VibrationTestExe -p
39
cd $DIST/VibrationTestExe
40
cp $TMP/dist/* ./ -a
626 FredericG 41
cp -a $HOME/VibrationTest/Resources ./
559 FredericG 42
 
561 FredericG 43
cp $HEXFILE ./
44
 
559 FredericG 45
echo Cleanup...
46
rm $TMP -rf
47
 
620 FredericG 48
echo Zipping... | tee -a $LOG
559 FredericG 49
cd $DIST
620 FredericG 50
atool -a VibrationTest_${VERSION}.zip VibrationTest >> $LOG
51
atool -a VibrationTestExe_${VERSION}.zip VibrationTestExe >> $LOG
559 FredericG 52
 
53
 
54
 
55
 
56
 
57
 
58
 
59
 
60