@@ -5,36 +5,24 @@ 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+ TARGET_ZIP_FILE=" ${APP_NAME} -portable-win64.zip"
11+
12+ cd " $DIST_DIR "
13+ rm -vf " $TARGET_ZIP_FILE "
1614
1715# Check if the source directory exists
18- if [ ! -d " $PORTABLE_DIR_SOURCE " ]; then
19- echo " Error: Source directory $PORTABLE_DIR_SOURCE does not exist."
16+ if [ ! -d " $APP_NAME " ]; then
17+ echo " Error: Source directory $DIST_DIR / $APP_NAME does not exist."
2018 echo " Please run PyInstaller first (e.g., pyinstaller packaging/pyinstaller.spec from project root)."
2119 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 "
20+ fi >&2
2921
3022# Create the ZIP archive.
3123# Change directory to the parent of $APP_NAME (i.e., $DIST_DIR)
3224# so that the archive contains $APP_NAME as the root folder.
3325# 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-
36- # 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-
26+ zip -r " $TARGET_ZIP_FILE " " $APP_NAME "
3927
40- echo " Successfully created portable ZIP: $TARGET_ZIP_FILE "
28+ echo " $DIST_DIR / $TARGET_ZIP_FILE "
0 commit comments