This commit is contained in:
@@ -18,7 +18,7 @@ env:
|
|||||||
WINEPYTHON: ${{ github.workspace }}/wine-prefix/drive_c/Python312/python.exe
|
WINEPYTHON: ${{ github.workspace }}/wine-prefix/drive_c/Python312/python.exe
|
||||||
DISPLAY: :99.0
|
DISPLAY: :99.0
|
||||||
WINEDLLOVERRIDES: "mscoree,mshtml=;winemenubuilder.exe=d"
|
WINEDLLOVERRIDES: "mscoree,mshtml=;winemenubuilder.exe=d"
|
||||||
WINEARCH: win64 # ensure 64-bit prefix
|
WINEARCH: win64
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -51,22 +51,32 @@ jobs:
|
|||||||
wineboot --init --update
|
wineboot --init --update
|
||||||
winecfg -v win10
|
winecfg -v win10
|
||||||
|
|
||||||
- name: Download Python installer
|
- name: Download Python embeddable ZIP
|
||||||
run: |
|
run: |
|
||||||
wget -q \
|
wget -q \
|
||||||
https://www.python.org/ftp/python/3.12.4/python-3.12.4-amd64.exe \
|
"https://www.python.org/ftp/python/3.12.4/python-3.12.4-embed-amd64.zip" \
|
||||||
-O /tmp/python.exe
|
-O /tmp/python-embed.zip
|
||||||
|
|
||||||
- name: Install Python in Wine
|
- name: Extract Python into Wine prefix
|
||||||
run: |
|
run: |
|
||||||
# Removed InstallAllUsers=1 → installs to C:\Python312 (matches WINEPYTHON)
|
TARGET="$WINEPREFIX/drive_c/Python312"
|
||||||
wine /tmp/python.exe /quiet PrependPath=1 Include_test=0
|
mkdir -p "$TARGET"
|
||||||
rm /tmp/python.exe
|
unzip -q /tmp/python-embed.zip -d "$TARGET"
|
||||||
# Verify the installation
|
# Remove the embeddable zip to avoid confusion
|
||||||
echo "Contents of C:\\Python312:"
|
rm /tmp/python-embed.zip
|
||||||
ls -la "$WINEPREFIX/drive_c/Python312" || echo "Python folder missing!"
|
# Verify
|
||||||
echo "Checking python.exe:"
|
echo "Python executable:"
|
||||||
ls -la "$WINEPREFIX/drive_c/Python312/python.exe" || echo "python.exe missing!"
|
ls -la "$TARGET/python.exe"
|
||||||
|
|
||||||
|
- name: Bootstrap pip for embedded Python
|
||||||
|
run: |
|
||||||
|
cd "$WINEPREFIX/drive_c/Python312"
|
||||||
|
# Download get-pip.py
|
||||||
|
wget -q https://bootstrap.pypa.io/get-pip.py
|
||||||
|
wine python.exe get-pip.py --no-warn-script-location
|
||||||
|
rm get-pip.py
|
||||||
|
# Verify pip is installed
|
||||||
|
wine python.exe -m pip --version
|
||||||
|
|
||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
run: |
|
run: |
|
||||||
@@ -108,6 +118,7 @@ jobs:
|
|||||||
RELEASE_TAG: rolling-draft
|
RELEASE_TAG: rolling-draft
|
||||||
run: |
|
run: |
|
||||||
API="${{ github.api_url }}/repos/${{ github.repository }}"
|
API="${{ github.api_url }}/repos/${{ github.repository }}"
|
||||||
|
|
||||||
RESPONSE=$(curl -sS -H "Authorization: token $GITEA_TOKEN" \
|
RESPONSE=$(curl -sS -H "Authorization: token $GITEA_TOKEN" \
|
||||||
"$API/releases/tags/$RELEASE_TAG")
|
"$API/releases/tags/$RELEASE_TAG")
|
||||||
RELEASE_ID=$(echo "$RESPONSE" | jq -r '.id // empty')
|
RELEASE_ID=$(echo "$RESPONSE" | jq -r '.id // empty')
|
||||||
@@ -122,6 +133,7 @@ jobs:
|
|||||||
"body": "Latest PaperDash server build from commit '"${{ github.sha }}"'. Built on Linux via Wine + PyInstaller. Edit tag, name, and notes before publishing."
|
"body": "Latest PaperDash server build from commit '"${{ github.sha }}"'. Built on Linux via Wine + PyInstaller. Edit tag, name, and notes before publishing."
|
||||||
}' \
|
}' \
|
||||||
"$API/releases/$RELEASE_ID"
|
"$API/releases/$RELEASE_ID"
|
||||||
|
|
||||||
ASSETS=$(curl -sS -H "Authorization: token $GITEA_TOKEN" \
|
ASSETS=$(curl -sS -H "Authorization: token $GITEA_TOKEN" \
|
||||||
"$API/releases/$RELEASE_ID/assets")
|
"$API/releases/$RELEASE_ID/assets")
|
||||||
for asset_id in $(echo "$ASSETS" | jq -r '.[].id'); do
|
for asset_id in $(echo "$ASSETS" | jq -r '.[].id'); do
|
||||||
|
|||||||
Reference in New Issue
Block a user