Subversion Repositories Projects

Rev

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