configurator: fix configurator building
This commit is contained in:
46
Source/Configurator/Configurator.spec
Normal file
46
Source/Configurator/Configurator.spec
Normal file
@@ -0,0 +1,46 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
from PyInstaller.utils.hooks import collect_all
|
||||
|
||||
datas = [('C:/Users/sould/Documents/GitHub/Switch-OC-Mansion/Source/Configurator/assets', 'assets')]
|
||||
binaries = []
|
||||
hiddenimports = []
|
||||
tmp_ret = collect_all('psutil')
|
||||
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
|
||||
|
||||
|
||||
a = Analysis(
|
||||
['C:/Users/sould/Documents/GitHub/Switch-OC-Mansion/Source/Configurator/src/main.py'],
|
||||
pathex=[],
|
||||
binaries=binaries,
|
||||
datas=datas,
|
||||
hiddenimports=hiddenimports,
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
runtime_hooks=[],
|
||||
excludes=[],
|
||||
noarchive=False,
|
||||
optimize=0,
|
||||
)
|
||||
pyz = PYZ(a.pure)
|
||||
|
||||
exe = EXE(
|
||||
pyz,
|
||||
a.scripts,
|
||||
a.binaries,
|
||||
a.datas,
|
||||
[],
|
||||
name='Configurator',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
runtime_tmpdir=None,
|
||||
console=False,
|
||||
disable_windowed_traceback=False,
|
||||
argv_emulation=False,
|
||||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None,
|
||||
icon=['C:\\Users\\sould\\Documents\\GitHub\\Switch-OC-Mansion\\Source\\Configurator\\assets\\icon.ico'],
|
||||
)
|
||||
@@ -1,3 +1,2 @@
|
||||
python -m PyInstaller --onefile --add-data "assets;assets" --icon=assets/icon.ico --noconsole src/main.py
|
||||
python -m PyInstaller --onefile --add-data "assets;assets" --icon=assets/icon.ico --noconsole src/main.py --hidden-import=pillow --hidden-import=psutil --hidden-import=dearpygui --hidden-import=numpy --hidden-import=pathlib
|
||||
move "dist\main.exe" "dist\hocconfig.exe"
|
||||
del src/__pycache__
|
||||
@@ -1,5 +1,5 @@
|
||||
pip install pyinstaller
|
||||
pip install dearpygui
|
||||
pip install dearpygui==2.0.0
|
||||
pip install numpy
|
||||
pip install psutil
|
||||
pip install pil
|
||||
|
||||
BIN
Source/Configurator/dist/hocconfig.exe
vendored
BIN
Source/Configurator/dist/hocconfig.exe
vendored
Binary file not shown.
@@ -6,7 +6,7 @@ a = Analysis(
|
||||
pathex=[],
|
||||
binaries=[],
|
||||
datas=[('assets', 'assets')],
|
||||
hiddenimports=[],
|
||||
hiddenimports=['pillow', 'psutil', 'dearpygui', 'numpy', 'pathlib'],
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
runtime_hooks=[],
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -30,6 +30,7 @@ import common as c
|
||||
import sys
|
||||
import os
|
||||
import webbrowser
|
||||
import ctypes
|
||||
|
||||
import kip as k
|
||||
import gpu
|
||||
@@ -43,10 +44,10 @@ import misc
|
||||
true = True
|
||||
false = False
|
||||
|
||||
if getattr(sys, 'frozen', False):
|
||||
assets_path = os.path.join(sys._MEIPASS, 'assets/')
|
||||
else:
|
||||
assets_path = os.path.join(os.path.dirname(__file__), '../assets/')
|
||||
# if getattr(sys, 'frozen', False):
|
||||
assets_path = os.path.join(sys._MEIPASS, 'assets/')
|
||||
# else:
|
||||
# assets_path = os.path.join(os.path.dirname(__file__), '../assets/')
|
||||
|
||||
cooler_image_path = assets_path + "coolerhd.png" # coolerHD Emoji from OC server
|
||||
cooler_image = Image.open(cooler_image_path).convert("RGBA")
|
||||
|
||||
Reference in New Issue
Block a user