Skip to content

Commit 8a47b86

Browse files
committed
fixup! MNT: Windows portable ZIP release (#30)
1 parent be66ae4 commit 8a47b86

File tree

2 files changed

+11
-18
lines changed

2 files changed

+11
-18
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,11 @@ jobs:
155155
#- run: dist/*.exe /verysilent /log=installer.log && type installer.log
156156
# shell: bash
157157

158+
- run: apt-get install zip
159+
shell: bash
158160
- run: packaging/win/create-portable-zip.sh
161+
shell: bash
162+
159163
- uses: actions/upload-artifact@v4
160164
with:
161165
name: Windows installer

packaging/win/create-portable-zip.sh

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
118
APP_NAME="efck-chat-keyboard"
129
DIST_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
1815
if [ ! -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

Comments
 (0)