import error fix, and pipeline
Some checks failed
Build MuCaPy Executable / build-windows-exe (push) Failing after 2m52s
Some checks failed
Build MuCaPy Executable / build-windows-exe (push) Failing after 2m52s
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
|
||||
name: Build MuCaPy Executable
|
||||
|
||||
on:
|
||||
@@ -7,36 +8,38 @@ on:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build-and-package:
|
||||
build-windows-exe:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install Python dependencies
|
||||
- name: Install dependencies for Wine
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt update
|
||||
sudo apt install -y wine64 wine32 unzip wget cabextract
|
||||
|
||||
- name: Install PyInstaller
|
||||
run: pip install pyinstaller
|
||||
|
||||
- name: Build executable with PyInstaller
|
||||
- name: Install Windows Python under Wine
|
||||
run: |
|
||||
pyinstaller --onefile --windowed mucapy/main.py \
|
||||
--add-data "mucapy/styling:styling" \
|
||||
--add-data "mucapy/models:models" \
|
||||
--add-data "mucapy/todopackage:todopackage"
|
||||
wget https://www.python.org/ftp/python/3.10.13/python-3.10.13-amd64.exe -O python_installer.exe
|
||||
wine python_installer.exe /quiet InstallAllUsers=1 PrependPath=1
|
||||
|
||||
- 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
|
||||
with:
|
||||
name: mucapy-executable
|
||||
name: mucapy-windows-exe
|
||||
path: dist/
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import json
|
||||
import winreg
|
||||
try:
|
||||
import winreg
|
||||
except ImportError:
|
||||
pass
|
||||
import os
|
||||
import platform
|
||||
import subprocess
|
||||
|
||||
Reference in New Issue
Block a user