Skip to content

Commit 38d2281

Browse files
MNT: Windows portable ZIP release (#30)
* feat: Windows portable ZIP release Fixes #20 * Update .github/workflows/ci.yml * Update .github/workflows/ci.yml * Update .github/workflows/ci.yml * Update .github/workflows/ci.yml --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
1 parent 3f06026 commit 38d2281

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,25 @@ jobs:
154154
# FIXME: /verysilent not respected? The window shows, hangs.
155155
#- run: dist/*.exe /verysilent /log=installer.log && type installer.log
156156
# shell: bash
157+
158+
- run: choco install zip
159+
- run: packaging/win/create-portable-zip.sh
160+
shell: bash
161+
157162
- uses: actions/upload-artifact@v4
158163
with:
159164
name: Windows installer
160165
path: dist/*.exe
166+
- uses: actions/upload-artifact@v4
167+
with:
168+
name: Windows portable
169+
path: dist/efck-chat-keyboard/
161170
- uses: softprops/action-gh-release@v2
162171
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
163172
with:
164-
files: dist/*.exe
173+
files: |
174+
dist/*.exe
175+
dist/*.zip
165176
166177
package-macos:
167178
timeout-minutes: 10
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/sh
2+
set -eux
3+
4+
# This script creates a portable ZIP archive for the Windows version of EFCK.
5+
# It assumes that PyInstaller has already been run and the application
6+
# is built in the dist/efck-chat-keyboard directory.
7+
8+
APP_NAME="efck-chat-keyboard"
9+
DIST_DIR="dist"
10+
TARGET_ZIP_FILE="${APP_NAME}-portable-win64.zip"
11+
12+
cd "$DIST_DIR"
13+
rm -vf "$TARGET_ZIP_FILE"
14+
15+
# Check if the source directory exists
16+
if [ ! -d "$APP_NAME" ]; then
17+
echo "Error: Source directory $DIST_DIR/$APP_NAME does not exist."
18+
echo "Please run PyInstaller first (e.g., pyinstaller packaging/pyinstaller.spec from project root)."
19+
exit 1
20+
fi >&2
21+
22+
# Create the ZIP archive.
23+
# Change directory to the parent of $APP_NAME (i.e., $DIST_DIR)
24+
# so that the archive contains $APP_NAME as the root folder.
25+
# This way, when the user extracts, they get a single folder.
26+
zip -r "$TARGET_ZIP_FILE" "$APP_NAME"
27+
28+
echo "$DIST_DIR/$TARGET_ZIP_FILE"

0 commit comments

Comments
 (0)