greenhouse/build-tools/build-windows-binary.sh

26 lines
713 B
Bash
Raw Normal View History

#!/bin/bash
2016-12-08 10:09:42 +08:00
### Window requires pyinstall v2.1
THIS_SCRIPT_PATH=`readlink -f $0`
THIS_SCRIPT_DIR=`dirname ${THIS_SCRIPT_PATH}`
cd pyinstaller
git checkout v2.1
cd ${THIS_SCRIPT_DIR}
. venv_wine/bin/activate
rm -r build
rm -r dist
rm labelImg.spec
wine c:/Python27/python.exe pyinstaller/pyinstaller.py --hidden-import=xml \
--hidden-import=xml.etree \
--hidden-import=xml.etree.ElementTree \
--hidden-import=lxml.etree \
2017-05-03 22:01:31 +08:00
-D -F -n labelImg -c "../labelImg.py" -p ../libs -p ../
2016-12-08 10:09:42 +08:00
FOLDER=$(git describe --abbrev=0 --tags)
FOLDER="windows_"$FOLDER
rm -rf "$FOLDER"
mkdir "$FOLDER"
cp dist/labelImg.exe $FOLDER
cp -rf ../data $FOLDER/data
zip "$FOLDER.zip" -r $FOLDER