prepare gui env
This commit is contained in:
parent
02e7221149
commit
d2bcf3bdd8
25 changed files with 291 additions and 198 deletions
24
Makefile
Normal file
24
Makefile
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
ress:
|
||||
pyrcc5 .\src\wargame_campaign\view\resources\ui_ressources.qrc -o .\src\wargame_campaign\view\resources\ui_ressources_rc.py
|
||||
|
||||
installer :
|
||||
python -m PyInstaller .\main.spec
|
||||
|
||||
ui:
|
||||
UI_DIR := ./view/ui
|
||||
UI_FILES := $(wildcard $(UI_DIR)/*.ui)
|
||||
PY_FILES := $(UI_FILES:.ui=.py)
|
||||
|
||||
# Generate all .py UI modules from .ui files
|
||||
ui: $(PY_FILES)
|
||||
|
||||
# Pattern rule: .ui -> .py using pyuic5
|
||||
$(UI_DIR)/%.py: $(UI_DIR)/%.ui
|
||||
pyuic5 -x $< -o $@ --import-from wargame_campaign.view.resources
|
||||
|
||||
# Function to generate UI file from given name
|
||||
_ui_generate:
|
||||
pyuic6 -x .\src\wargame_campaign\view\ui\$(UI_NAME).ui -o .\src\wargame_campaign\view\ui\$(UI_NAME).py --import-from wargame_campaign.view.resources
|
||||
|
||||
# Set default UI_NAME if not provided
|
||||
UI_NAME ?= ui_main_window
|
||||
Loading…
Add table
Add a link
Reference in a new issue