mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Append version to PyInstaller packages
This commit is contained in:
parent
3341c894c5
commit
9f4664c2b8
@ -31,7 +31,7 @@ exe = EXE(pyz,
|
|||||||
upx=True,
|
upx=True,
|
||||||
console=False )
|
console=False )
|
||||||
|
|
||||||
import shutil
|
import sys, shutil
|
||||||
|
|
||||||
# remove util dir if it exists
|
# remove util dir if it exists
|
||||||
util_dir = 'util'
|
util_dir = 'util'
|
||||||
@ -54,13 +54,11 @@ if platform.system() == "Linux":
|
|||||||
else:
|
else:
|
||||||
data_tree += Tree('C:/Python27/Lib/site-packages/gtk-2.0/runtime/share/gtksourceview-2.0', prefix='share/gtksourceview-2.0')
|
data_tree += Tree('C:/Python27/Lib/site-packages/gtk-2.0/runtime/share/gtksourceview-2.0', prefix='share/gtksourceview-2.0')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
coll = COLLECT(exe,
|
coll = COLLECT(exe,
|
||||||
data_tree,
|
data_tree,
|
||||||
strip=None,
|
strip=None,
|
||||||
upx=True,
|
upx=True,
|
||||||
name='openmv')
|
name=sys.argv[2])
|
||||||
# cleanup
|
# cleanup
|
||||||
if os.path.exists(util_dir):
|
if os.path.exists(util_dir):
|
||||||
shutil.rmtree(util_dir)
|
shutil.rmtree(util_dir)
|
||||||
|
|||||||
@ -3,11 +3,17 @@
|
|||||||
# Execute in openmv/user ./mkpkg.sh
|
# Execute in openmv/user ./mkpkg.sh
|
||||||
DIST_DIR=dist
|
DIST_DIR=dist
|
||||||
BUILD_DIR=build
|
BUILD_DIR=build
|
||||||
OPENMV_DIR=openmv
|
OPENMV_DIR=openmv_$1
|
||||||
PACKAGE=$(python -c "import sys,platform; print('openmv_'+sys.platform+'_'+platform.machine()+'.zip'.lower())")
|
PACKAGE=$(python -c "import sys,platform; print('openmv_'+sys.platform+'_'+platform.machine()+'_$1.zip'.lower())")
|
||||||
SPEC_FILE=openmv-ide.spec
|
SPEC_FILE=openmv-ide.spec
|
||||||
|
|
||||||
|
# Check args
|
||||||
|
if [ "$#" = "0" ]; then
|
||||||
|
echo "usage mkpkg <version>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
rm -fr $DIST_DIR $BUILD_DIR $PACKAGE
|
rm -fr $DIST_DIR $BUILD_DIR $PACKAGE
|
||||||
pyinstaller $SPEC_FILE
|
pyinstaller $SPEC_FILE $OPENMV_DIR
|
||||||
(cd $DIST_DIR && zip ../$PACKAGE -r $OPENMV_DIR)
|
(cd $DIST_DIR && zip ../$PACKAGE -r $OPENMV_DIR)
|
||||||
rm -fr $DIST_DIR $BUILD_DIR
|
rm -fr $DIST_DIR $BUILD_DIR
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user