@@ -5,36 +5,25 @@ set -eux
55# It assumes that PyInstaller has already been run and the application
66# is built in the dist/efck-chat-keyboard directory.
77
8- # Navigate to the project root
9- cd " $( dirname " $0 " ) /../../"
10-
118APP_NAME=" efck-chat-keyboard"
129DIST_DIR=" dist"
13- PORTABLE_DIR_SOURCE=" $DIST_DIR /$APP_NAME " # This is the folder created by PyInstaller's COLLECT
14- TARGET_ZIP_FILE_BASENAME =" ${APP_NAME} -portable-win"
15- TARGET_ZIP_FILE= " $DIST_DIR / ${TARGET_ZIP_FILE_BASENAME} .zip "
10+ PORTABLE_DIR_SOURCE=" $DIST_DIR /$APP_NAME " # This is the folder created by PyInstaller's COLLECT
11+ TARGET_ZIP_FILE =" $DIST_DIR / $ {APP_NAME} -portable-win.zip "
12+ rm -vf " $TARGET_ZIP_FILE "
1613
1714# Check if the source directory exists
1815if [ ! -d " $PORTABLE_DIR_SOURCE " ]; then
1916 echo " Error: Source directory $PORTABLE_DIR_SOURCE does not exist."
2017 echo " Please run PyInstaller first (e.g., pyinstaller packaging/pyinstaller.spec from project root)."
2118 exit 1
22- fi
23-
24- echo " Source directory: $( pwd) /$PORTABLE_DIR_SOURCE "
25- echo " Target ZIP file: $( pwd) /$TARGET_ZIP_FILE "
26-
27- # Remove old zip file if it exists
28- rm -f " $TARGET_ZIP_FILE "
19+ fi >&2
2920
3021# Create the ZIP archive.
3122# Change directory to the parent of $APP_NAME (i.e., $DIST_DIR)
3223# so that the archive contains $APP_NAME as the root folder.
3324# This way, when the user extracts, they get a single folder.
34- (cd " $DIST_DIR " && zip -r " ${TARGET_ZIP_FILE_BASENAME} .zip" " $APP_NAME " -x " */.DS_Store" " */__MACOSX" )
35-
25+ (cd " $DIST_DIR " && zip -r " ${TARGET_ZIP_FILE} .zip" " $APP_NAME " -x " */.DS_Store" " */__MACOSX" )
3626# To create a zip where contents of $PORTABLE_DIR_SOURCE are at the root of the zip:
37- # (cd "$PORTABLE_DIR_SOURCE" && zip -r "../${TARGET_ZIP_FILE_BASENAME}.zip" . -x ".DS_Store" "__MACOSX")
38-
27+ # (cd "$PORTABLE_DIR_SOURCE" && zip -r "../$TARGET_ZIP_FILE" . -x ".DS_Store" "__MACOSX")
3928
40- echo " Successfully created portable ZIP: $TARGET_ZIP_FILE "
29+ echo " $TARGET_ZIP_FILE "
0 commit comments