Add README for build-tools
This commit is contained in:
parent
d11fbb57de
commit
1889d8c88f
30
build-tools/README.md
Normal file
30
build-tools/README.md
Normal file
@ -0,0 +1,30 @@
|
||||
### Deploy to PyPI
|
||||
|
||||
```
|
||||
cd [ROOT]
|
||||
sh build-tools/build-for-pypi.sh
|
||||
```
|
||||
|
||||
|
||||
### Build for Ubuntu
|
||||
|
||||
```
|
||||
cd build-tools
|
||||
sh run-in-container.sh
|
||||
sh envsetup.sh
|
||||
sh build-ubuntu-binary.sh
|
||||
```
|
||||
|
||||
### Build for Windows
|
||||
|
||||
```
|
||||
cd build-tools
|
||||
sh run-in-container.sh
|
||||
sh envsetup.sh
|
||||
sh build-windows-binary.sh
|
||||
```
|
||||
|
||||
Note: If there are some problems, try to
|
||||
```
|
||||
sudo rm -rf virtual-wne venv_wine
|
||||
```
|
||||
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Packaging and Release
|
||||
docker run --workdir=$(pwd)/ --volume="/home/$USER:/home/$USER" tzutalin/py2qt4 /bin/sh -c 'sudo python setup.py sdist;sudo python setup.py install'
|
||||
|
||||
while true; do
|
||||
read -p "Do you wish to deploy this to PyPI?" yn
|
||||
case $yn in
|
||||
[Yy]* ) docker run -it --rm --workdir=$(pwd)/ --volume="/home/$USER:/home/$USER" tzutalin/py2qt4; break;;
|
||||
[Nn]* ) exit;;
|
||||
* ) echo "Please answer yes or no.";;
|
||||
esac
|
||||
done
|
||||
# python setup.py register
|
||||
# python setup.py sdist upload
|
||||
# Net pypi: twine upload dist/*
|
||||
@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
### Ubuntu use pyinstall v3.0
|
||||
THIS_SCRIPT_PATH=`readlink -f $0`
|
||||
THIS_SCRIPT_DIR=`dirname ${THIS_SCRIPT_PATH}`
|
||||
cd pyinstaller
|
||||
git checkout v3.2
|
||||
cd ${THIS_SCRIPT_DIR}
|
||||
|
||||
rm -r build
|
||||
rm -r dist
|
||||
rm labelImg.spec
|
||||
python pyinstaller/pyinstaller.py --hidden-import=xml \
|
||||
--hidden-import=xml.etree \
|
||||
--hidden-import=xml.etree.ElementTree \
|
||||
--hidden-import=lxml.etree \
|
||||
-D -F -n labelImg -c "../labelImg.py" -p ../libs -p ../
|
||||
|
||||
FOLDER=$(git describe --abbrev=0 --tags)
|
||||
FOLDER="linux_"$FOLDER
|
||||
rm -rf "$FOLDER"
|
||||
mkdir "$FOLDER"
|
||||
cp dist/labelImg $FOLDER
|
||||
cp -rf ../data $FOLDER/data
|
||||
zip "$FOLDER.zip" -r $FOLDER
|
||||
@ -1,32 +0,0 @@
|
||||
#!/bin/bash
|
||||
### Window requires pyinstall v2.1
|
||||
wine msiexec -i python-2.7.8.msi
|
||||
wine pywin32-218.win32-py2.7.exe
|
||||
wine PyQt4-4.11.4-gpl-Py2.7-Qt4.8.7-x32.exe
|
||||
wine lxml-3.7.3.win32-py2.7.exe
|
||||
|
||||
THIS_SCRIPT_PATH=`readlink -f $0`
|
||||
THIS_SCRIPT_DIR=`dirname ${THIS_SCRIPT_PATH}`
|
||||
cd pyinstaller
|
||||
git checkout v2.1
|
||||
cd ${THIS_SCRIPT_DIR}
|
||||
echo ${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 \
|
||||
-D -F -n labelImg -c "../labelImg.py" -p ../libs -p ../
|
||||
|
||||
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
|
||||
@ -1,3 +1,13 @@
|
||||
#!/bin/sh
|
||||
docker run -it --rm --workdir=$(pwd)/ --volume="/home/$USER:/home/$USER" tzutalin/py2qt4
|
||||
docker run -it \
|
||||
--user $(id -u) \
|
||||
-e DISPLAY=unix$DISPLAY \
|
||||
--workdir=$(pwd) \
|
||||
--volume="/home/$USER:/home/$USER" \
|
||||
--volume="/etc/group:/etc/group:ro" \
|
||||
--volume="/etc/passwd:/etc/passwd:ro" \
|
||||
--volume="/etc/shadow:/etc/shadow:ro" \
|
||||
--volume="/etc/sudoers.d:/etc/sudoers.d:ro" \
|
||||
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||
tzutalin/py2qt4
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user