Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add file to build exe version #242

Merged
merged 3 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions ClashRoyaleBuildABot.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
a = Analysis(
['main.py'],
binaries=[],
datas=[
('clashroyalebuildabot', 'clashroyalebuildabot'),
('clashroyalebuildabot/images/cards', 'clashroyalebuildabot/images/cards'),
('clashroyalebuildabot/images/screen', 'clashroyalebuildabot/images/screen'),
('clashroyalebuildabot/debug/labels', 'clashroyalebuildabot/debug/labels'),
('clashroyalebuildabot/debug/screenshots', 'clashroyalebuildabot/debug/screenshots'),
('clashroyalebuildabot/emulator/platform-tools', 'clashroyalebuildabot/emulator/platform-tools'),
('clashroyalebuildabot/gui', 'clashroyalebuildabot/gui'),
('clashroyalebuildabot/models', 'clashroyalebuildabot/models'),
('clashroyalebuildabot/namespaces', 'clashroyalebuildabot/namespaces'),
('clashroyalebuildabot/utils', 'clashroyalebuildabot/utils')
],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)

pyz = PYZ(a.pure)

exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='ClashRoyaleBot',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon=['clashroyalebuildabot\\images\\icon.ico'],
)
6 changes: 5 additions & 1 deletion clashroyalebuildabot/gui/layout_setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

from PyQt6.QtCore import Qt
from PyQt6.QtGui import QFont
from PyQt6.QtGui import QPixmap
Expand All @@ -17,6 +19,7 @@
from PyQt6.QtWidgets import QVBoxLayout
from PyQt6.QtWidgets import QWidget

from clashroyalebuildabot.constants import IMAGES_DIR
from clashroyalebuildabot.gui.gameplay_widget import ImageStreamWindow
from clashroyalebuildabot.gui.utils import save_config

Expand All @@ -29,7 +32,8 @@ def setup_top_bar(main_window):
logo_text_layout = QHBoxLayout()

logo_label = QLabel()
logo_pixmap = QPixmap("logo.png").scaled(

logo_pixmap = QPixmap(os.path.join(IMAGES_DIR, "logo.png")).scaled(
120,
120,
Qt.AspectRatioMode.KeepAspectRatio,
Expand Down
Binary file added clashroyalebuildabot/images/icon.ico
Binary file not shown.
File renamed without changes