import error fix, and pipeline
Some checks failed
Build MuCaPy Executable / build-windows-exe (push) Failing after 2m52s

This commit is contained in:
2025-10-31 23:07:16 +01:00
parent 6354bd01e2
commit ad2d136e3f
2 changed files with 27 additions and 21 deletions

View File

@@ -1,3 +1,4 @@
name: Build MuCaPy Executable name: Build MuCaPy Executable
on: on:
@@ -7,36 +8,38 @@ on:
branches: [ main ] branches: [ main ]
jobs: jobs:
build-and-package: build-windows-exe:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Set up Python 3.10 - name: Install dependencies for Wine
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Python dependencies
run: | run: |
python -m pip install --upgrade pip sudo dpkg --add-architecture i386
pip install -r requirements.txt sudo apt update
sudo apt install -y wine64 wine32 unzip wget cabextract
- name: Install PyInstaller - name: Install Windows Python under Wine
run: pip install pyinstaller
- name: Build executable with PyInstaller
run: | run: |
pyinstaller --onefile --windowed mucapy/main.py \ wget https://www.python.org/ftp/python/3.10.13/python-3.10.13-amd64.exe -O python_installer.exe
--add-data "mucapy/styling:styling" \ wine python_installer.exe /quiet InstallAllUsers=1 PrependPath=1
--add-data "mucapy/models:models" \
--add-data "mucapy/todopackage:todopackage"
- name: Upload executable artifact - name: Upgrade pip and install PyInstaller (Windows)
run: |
wine python -m pip install --upgrade pip
wine python -m pip install pyinstaller
- name: Build Windows executable
run: |
wine pyinstaller --onefile --windowed mucapy/main.py \
--add-data "mucapy/styling;styling" \
--add-data "mucapy/models;models" \
--add-data "mucapy/todopackage;todopackage"
- name: Upload Windows executable
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: mucapy-executable name: mucapy-windows-exe
path: dist/ path: dist/

View File

@@ -1,5 +1,8 @@
import json import json
import winreg try:
import winreg
except ImportError:
pass
import os import os
import platform import platform
import subprocess import subprocess