mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 09:59:41 +02:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 23c74f6487 | |||
| 19ea09d035 | |||
| 92359d75e5 | |||
| 315a68c000 | |||
| 4b0ef44efd | |||
| 6dc28615a0 |
+15
-15
@@ -106,7 +106,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python -c "
|
python -c "
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
img = Image.open('core/interface/assets/logo.png')
|
img = Image.open('src/core/interface/assets/logo.png')
|
||||||
img.save('app_icon.ico', format='ICO', sizes=[(256,256),(128,128),(64,64),(48,48),(32,32),(16,16)])
|
img.save('app_icon.ico', format='ICO', sizes=[(256,256),(128,128),(64,64),(48,48),(32,32),(16,16)])
|
||||||
print('Icon converted successfully')
|
print('Icon converted successfully')
|
||||||
"
|
"
|
||||||
@@ -126,12 +126,12 @@ jobs:
|
|||||||
--enable-plugin=upx \
|
--enable-plugin=upx \
|
||||||
--upx-binary="${{ env.UPX_BINARY }}" \
|
--upx-binary="${{ env.UPX_BINARY }}" \
|
||||||
--noinclude-qt-translations \
|
--noinclude-qt-translations \
|
||||||
--include-data-dir=core/interface/assets=core/interface/assets \
|
--include-data-dir=src/core/interface/assets=src/core/interface/assets \
|
||||||
--include-data-files=build_info.json=build_info.json \
|
--include-data-files=build_info.json=build_info.json \
|
||||||
--include-data-files=build_info.json=core/build_info.json \
|
--include-data-files=build_info.json=src/build_info.json \
|
||||||
--include-data-files=build_info.json=core/interface/build_info.json \
|
--include-data-files=build_info.json=src/core/interface/build_info.json \
|
||||||
--output-filename=${{ env.APP_NAME }}.exe \
|
--output-filename=${{ env.APP_NAME }}.exe \
|
||||||
main.py
|
src/main.py
|
||||||
|
|
||||||
- name: Build with PyInstaller (Linux)
|
- name: Build with PyInstaller (Linux)
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
@@ -139,10 +139,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
pyinstaller --onefile --windowed \
|
pyinstaller --onefile --windowed \
|
||||||
--add-data "build_info.json:." \
|
--add-data "build_info.json:." \
|
||||||
--add-data "build_info.json:core" \
|
--add-data "build_info.json:src/core" \
|
||||||
--add-data "build_info.json:core/interface" \
|
--add-data "build_info.json:src/core/interface" \
|
||||||
--add-data "core/interface/assets:core/interface/assets" \
|
--add-data "src/core/interface/assets:src/core/interface/assets" \
|
||||||
--icon "core/interface/assets/logo.png" \
|
--icon "src/core/interface/assets/logo.png" \
|
||||||
--exclude-module PyQt6 \
|
--exclude-module PyQt6 \
|
||||||
--exclude-module PyQt5 \
|
--exclude-module PyQt5 \
|
||||||
--hidden-import=backports.tarfile \
|
--hidden-import=backports.tarfile \
|
||||||
@@ -151,7 +151,7 @@ jobs:
|
|||||||
--hidden-import=jaraco.text \
|
--hidden-import=jaraco.text \
|
||||||
--hidden-import=jaraco.functools \
|
--hidden-import=jaraco.functools \
|
||||||
--name ${{ env.APP_NAME }} \
|
--name ${{ env.APP_NAME }} \
|
||||||
main.py
|
src/main.py
|
||||||
|
|
||||||
- name: Build with PyInstaller (macOS)
|
- name: Build with PyInstaller (macOS)
|
||||||
if: runner.os == 'macOS'
|
if: runner.os == 'macOS'
|
||||||
@@ -159,10 +159,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
pyinstaller --onefile \
|
pyinstaller --onefile \
|
||||||
--add-data "build_info.json:." \
|
--add-data "build_info.json:." \
|
||||||
--add-data "build_info.json:core" \
|
--add-data "build_info.json:src/core" \
|
||||||
--add-data "build_info.json:core/interface" \
|
--add-data "build_info.json:src/core/interface" \
|
||||||
--add-data "core/interface/assets:core/interface/assets" \
|
--add-data "src/core/interface/assets:src/core/interface/assets" \
|
||||||
--icon "core/interface/assets/logo.png" \
|
--icon "src/core/interface/assets/fr logo.png" \
|
||||||
--exclude-module PyQt6 \
|
--exclude-module PyQt6 \
|
||||||
--exclude-module PyQt5 \
|
--exclude-module PyQt5 \
|
||||||
--hidden-import=backports.tarfile \
|
--hidden-import=backports.tarfile \
|
||||||
@@ -171,7 +171,7 @@ jobs:
|
|||||||
--hidden-import=jaraco.text \
|
--hidden-import=jaraco.text \
|
||||||
--hidden-import=jaraco.functools \
|
--hidden-import=jaraco.functools \
|
||||||
--name ${{ env.APP_NAME }} \
|
--name ${{ env.APP_NAME }} \
|
||||||
main.py
|
src/main.py
|
||||||
|
|
||||||
- name: Rename artifact
|
- name: Rename artifact
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
@@ -80,11 +80,11 @@ class MainWindow(QtWidgets.QMainWindow, QWidget):
|
|||||||
return asset_path
|
return asset_path
|
||||||
|
|
||||||
if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
|
if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
|
||||||
asset_path = os.path.join(sys._MEIPASS, 'core', 'interface', 'assets', filename)
|
asset_path = os.path.join(sys._MEIPASS, 'src', 'core', 'interface', 'assets', filename)
|
||||||
if os.path.exists(asset_path):
|
if os.path.exists(asset_path):
|
||||||
return asset_path
|
return asset_path
|
||||||
|
|
||||||
return os.path.join('core', 'interface', 'assets', filename)
|
return os.path.join('src', 'core', 'interface', 'assets', filename)
|
||||||
|
|
||||||
self.setWindowIcon(QIcon(get_asset_path("logo.png")))
|
self.setWindowIcon(QIcon(get_asset_path("logo.png")))
|
||||||
|
|
||||||
Reference in New Issue
Block a user