Fix Windows icon build error and improve build logs
This commit is contained in:
parent
0b5f18b69a
commit
26df339555
2 changed files with 19 additions and 2 deletions
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
|
|
@ -45,7 +45,10 @@ jobs:
|
||||||
img.save('fluxer-reaper-icon.ico', format='ICO', sizes=[(256, 256)])
|
img.save('fluxer-reaper-icon.ico', format='ICO', sizes=[(256, 256)])
|
||||||
|
|
||||||
- name: Build with PyInstaller
|
- name: Build with PyInstaller
|
||||||
run: pyinstaller fluxer-reaper.spec
|
run: |
|
||||||
|
echo "Listing directory contents:"
|
||||||
|
ls -R || dir /s
|
||||||
|
pyinstaller fluxer-reaper.spec
|
||||||
|
|
||||||
- name: Prepare Release Asset (Linux)
|
- name: Prepare Release Asset (Linux)
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,24 @@
|
||||||
# -*- mode: python ; coding: utf-8 -*-
|
# -*- mode: python ; coding: utf-8 -*-
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
from PyInstaller.utils.hooks import collect_submodules
|
from PyInstaller.utils.hooks import collect_submodules
|
||||||
|
|
||||||
|
print(f"DEBUG: os.name = {os.name}")
|
||||||
|
print(f"DEBUG: sys.platform = {sys.platform}")
|
||||||
|
print(f"DEBUG: Current directory = {os.getcwd()}")
|
||||||
|
print(f"DEBUG: Files in current directory = {os.listdir('.')}")
|
||||||
|
|
||||||
hiddenimports = []
|
hiddenimports = []
|
||||||
hiddenimports += collect_submodules('rich._unicode_data')
|
hiddenimports += collect_submodules('rich._unicode_data')
|
||||||
|
|
||||||
|
# Determine the best icon to use
|
||||||
|
icon_file = None
|
||||||
|
if os.path.exists('fluxer-reaper-icon.ico'):
|
||||||
|
icon_file = 'fluxer-reaper-icon.ico'
|
||||||
|
elif os.path.exists('fluxer-reaper-icon.png'):
|
||||||
|
icon_file = 'fluxer-reaper-icon.png'
|
||||||
|
|
||||||
|
print(f"DEBUG: Selected icon_file = {icon_file}")
|
||||||
|
|
||||||
a = Analysis(
|
a = Analysis(
|
||||||
['fluxer-reaper.py'],
|
['fluxer-reaper.py'],
|
||||||
|
|
@ -41,5 +55,5 @@ exe = EXE(
|
||||||
target_arch=None,
|
target_arch=None,
|
||||||
codesign_identity=None,
|
codesign_identity=None,
|
||||||
entitlements_file=None,
|
entitlements_file=None,
|
||||||
icon='fluxer-reaper-icon.ico' if os.name == 'nt' else 'fluxer-reaper-icon.png',
|
icon=icon_file,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue