Skip to content

Commit 7ea102b

Browse files
authored
Fix build issues (#210)
* fix: win and macos builds In this commit i fix the pillow transformation adding the files that each one of the builds asks for. * fix: missed from the last PR format after bump versions
1 parent c448bc5 commit 7ea102b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+257
-150
lines changed

.ci/create-spec.py

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,14 @@
5151
ICON = join(ASSETS, "icon.png")
5252
I18NS = str(ROOT_PATH / "src" / "i18n")
5353

54-
BUILDER_ARGS = [ ]
54+
if SYSTEM == "Darwin":
55+
ICON = join(ASSETS, "icon.icns")
56+
elif SYSTEM == "Windows":
57+
ICON = join(ASSETS, "icon.ico")
58+
else:
59+
ICON = join(ASSETS, "icon.png")
60+
61+
BUILDER_ARGS = []
5562

5663
# The app name
5764
BUILDER_ARGS.append(f"--name={PYNAME}")
@@ -67,20 +74,20 @@
6774
if SYSTEM == "Linux":
6875
# Tha application is a GUI
6976
BUILDER_ARGS.append("--onefile")
70-
77+
7178
elif SYSTEM == "Windows":
7279
# Tha application is a GUI with a hidden console
7380
# to keep `sys` module enabled (necessary for Kboot)
7481
BUILDER_ARGS.append("--onefile")
7582
BUILDER_ARGS.append("--console")
7683
BUILDER_ARGS.append("--hidden-import=win32timezone")
7784
BUILDER_ARGS.append("--hide-console=minimize-early")
78-
85+
7986
elif SYSTEM == "Darwin":
8087
# Tha application is a GUI in a bundled .app
8188
BUILDER_ARGS.append("--onefile")
8289
BUILDER_ARGS.append("--noconsole")
83-
90+
8491
# For darwin system, will be necessary
8592
# to add a hidden import for ssl
8693
# (necessary for request module)
@@ -90,14 +97,14 @@
9097
# Necessary for get version and
9198
# another infos in application
9299
BUILDER_ARGS.append("--add-data=pyproject.toml:.")
93-
94-
# some assets
100+
101+
# some assets
95102
for f in listdir(ASSETS):
96103
asset = join(ASSETS, f)
97104
if isfile(asset):
98105
if asset.endswith("png") or asset.endswith("gif") or asset.endswith("ttf"):
99-
BUILDER_ARGS.append(f"--add-data={asset}:assets")
100-
106+
BUILDER_ARGS.append(f"--add-data={asset}:assets")
107+
101108
# Add i18n translations
102109
for f in listdir(I18NS):
103110
i18n_abs = join(I18NS, f)
@@ -106,7 +113,6 @@
106113
if findall(r"^[a-z]+\_[A-Z]+\.UTF-8\.json$", f):
107114
BUILDER_ARGS.append(f"--add-data={i18n_abs}:{i18n_rel}")
108115

109-
110116
args = p.parse_args(BUILDER_ARGS)
111117

112118
# Now generate spec

.github/workflows/build.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
name: Build
22

33
on:
4-
workflow_run:
5-
workflows: Tests
6-
types: completed
4+
push:
75
branches:
86
- main
9-
- '!develop'
7+
- develop
8+
pull_request:
9+
branches:
10+
- main
11+
workflow_dispatch:
1012

1113
jobs:
1214

@@ -25,7 +27,6 @@ jobs:
2527
arch: arm64
2628

2729
runs-on: ${{ matrix.os }}
28-
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' }}
2930

3031
steps:
3132

assets/icon.icns

3.02 KB
Binary file not shown.

assets/icon.ico

-1.63 KB
Binary file not shown.

assets/logo.ico

99.1 KB
Binary file not shown.

assets/logo.png

-592 Bytes

poetry.lock

Lines changed: 183 additions & 129 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"""
2222
__init__.py
2323
"""
24+
2425
import sys
2526
from kivy.core.window import Window
2627
from src.app.config_krux_installer import ConfigKruxInstaller

src/app/base_krux_installer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"""
2222
krux_installer.py
2323
"""
24+
2425
import os
2526
import typing
2627
import tempfile

src/app/config_krux_installer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"""
2222
config_krux_installer.py
2323
"""
24+
2425
import os
2526
import sys
2627
import json

0 commit comments

Comments
 (0)