build 1.42 per mac, crea correttamente file .app

This commit is contained in:
Emanuele
2020-10-27 12:38:03 +01:00
parent 977feb6722
commit 889c73c9b1
3 changed files with 11 additions and 7 deletions

View File

@@ -10,6 +10,7 @@ import sys
import copy
import json
import os
import platform
from mainwindow import Ui_mainwin
from selezout import Ui_selezout
@@ -624,9 +625,12 @@ if __name__ == '__main__':
try:
#print(f"Running directory {os.environ['WORKSPACELOC']}")
#print(f"Pythonpath: {os.environ['PYTHONPATH']}")
print("LAUNCHDIR:", os.getcwd())
LOGGER = fancyLogger(filepath=r"./conf/loggerconf.json", fileLog=False)
conf = bananaCONF(workdir=r"./conf", logger=LOGGER)
if platform.system() == 'Darwin':
basePath = '/'+'/'.join(sys.executable.split('/')[1:-2])+'/Resources'
else:
basePath = './'
LOGGER = fancyLogger(filepath=f"{basePath}/conf/loggerconf.json", fileLog=False)
conf = bananaCONF(workdir=f"{basePath}/conf", logger=LOGGER)
conf.open()
conf.use("defaults.json")
conf.use(conf.getParam('paths', 'lastUsed'))