diff --git a/usr/openmv-ide.spec b/usr/openmv-ide.spec index ccc37fc91..86d37aa6d 100644 --- a/usr/openmv-ide.spec +++ b/usr/openmv-ide.spec @@ -31,7 +31,7 @@ exe = EXE(pyz, upx=True, console=False ) -import shutil +import sys, shutil # remove util dir if it exists util_dir = 'util' @@ -54,13 +54,11 @@ if platform.system() == "Linux": else: data_tree += Tree('C:/Python27/Lib/site-packages/gtk-2.0/runtime/share/gtksourceview-2.0', prefix='share/gtksourceview-2.0') - - coll = COLLECT(exe, data_tree, strip=None, upx=True, - name='openmv') + name=sys.argv[2]) # cleanup if os.path.exists(util_dir): shutil.rmtree(util_dir) diff --git a/util/mkpkg.sh b/util/mkpkg.sh index a8992882a..76289de82 100755 --- a/util/mkpkg.sh +++ b/util/mkpkg.sh @@ -3,11 +3,17 @@ # Execute in openmv/user ./mkpkg.sh DIST_DIR=dist BUILD_DIR=build -OPENMV_DIR=openmv -PACKAGE=$(python -c "import sys,platform; print('openmv_'+sys.platform+'_'+platform.machine()+'.zip'.lower())") +OPENMV_DIR=openmv_$1 +PACKAGE=$(python -c "import sys,platform; print('openmv_'+sys.platform+'_'+platform.machine()+'_$1.zip'.lower())") SPEC_FILE=openmv-ide.spec +# Check args +if [ "$#" = "0" ]; then + echo "usage mkpkg " + exit 1 +fi + rm -fr $DIST_DIR $BUILD_DIR $PACKAGE -pyinstaller $SPEC_FILE +pyinstaller $SPEC_FILE $OPENMV_DIR (cd $DIST_DIR && zip ../$PACKAGE -r $OPENMV_DIR) rm -fr $DIST_DIR $BUILD_DIR