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

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -7,13 +7,13 @@ pyinstaller --add-data="../.venv/lib/python3.7/site-packages/text_unidecode/data
--noconfirm \
--paths ./libbananasplit --paths ./UserInterface/compiledUI \
--name=SPEx \
--onefile \
--windowed \
--strip \
--osx-bundle-identifier="12parsec.software.SPEx" \
../spex/guimain.py
echo "Copio configurazione"
cp -r ../conf ./dist/SPEx.app/Contents/MacOS/conf/
cp -r ../conf ./dist/SPEx.app/Contents/Resources/
cp -r ../conf ./dist/
echo "Copio file binari"
mv ./dist/ ../bin/
@@ -21,5 +21,5 @@ echo "Rinuovo cartella build"
rm -rf ./build
echo "Firmo il codice"
cd ../bin/dist
#codesign --deep -s "12Parsec" SPEx.app
#codesign --deep -s "12Parsec" SPEx
codesign --deep -s "12Parsec" SPEx.app
codesign --deep -s "12Parsec" SPEx

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'))