build 1.42 per mac, crea correttamente file .app
This commit is contained in:
@@ -7,13 +7,13 @@ pyinstaller --add-data="../.venv/lib/python3.7/site-packages/text_unidecode/data
|
|||||||
--noconfirm \
|
--noconfirm \
|
||||||
--paths ./libbananasplit --paths ./UserInterface/compiledUI \
|
--paths ./libbananasplit --paths ./UserInterface/compiledUI \
|
||||||
--name=SPEx \
|
--name=SPEx \
|
||||||
--onefile \
|
|
||||||
--windowed \
|
--windowed \
|
||||||
|
--strip \
|
||||||
--osx-bundle-identifier="12parsec.software.SPEx" \
|
--osx-bundle-identifier="12parsec.software.SPEx" \
|
||||||
../spex/guimain.py
|
../spex/guimain.py
|
||||||
|
|
||||||
echo "Copio configurazione"
|
echo "Copio configurazione"
|
||||||
cp -r ../conf ./dist/SPEx.app/Contents/MacOS/conf/
|
cp -r ../conf ./dist/SPEx.app/Contents/Resources/
|
||||||
cp -r ../conf ./dist/
|
cp -r ../conf ./dist/
|
||||||
echo "Copio file binari"
|
echo "Copio file binari"
|
||||||
mv ./dist/ ../bin/
|
mv ./dist/ ../bin/
|
||||||
@@ -21,5 +21,5 @@ echo "Rinuovo cartella build"
|
|||||||
rm -rf ./build
|
rm -rf ./build
|
||||||
echo "Firmo il codice"
|
echo "Firmo il codice"
|
||||||
cd ../bin/dist
|
cd ../bin/dist
|
||||||
#codesign --deep -s "12Parsec" SPEx.app
|
codesign --deep -s "12Parsec" SPEx.app
|
||||||
#codesign --deep -s "12Parsec" SPEx
|
codesign --deep -s "12Parsec" SPEx
|
||||||
@@ -10,6 +10,7 @@ import sys
|
|||||||
import copy
|
import copy
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
import platform
|
||||||
|
|
||||||
from mainwindow import Ui_mainwin
|
from mainwindow import Ui_mainwin
|
||||||
from selezout import Ui_selezout
|
from selezout import Ui_selezout
|
||||||
@@ -624,9 +625,12 @@ if __name__ == '__main__':
|
|||||||
try:
|
try:
|
||||||
#print(f"Running directory {os.environ['WORKSPACELOC']}")
|
#print(f"Running directory {os.environ['WORKSPACELOC']}")
|
||||||
#print(f"Pythonpath: {os.environ['PYTHONPATH']}")
|
#print(f"Pythonpath: {os.environ['PYTHONPATH']}")
|
||||||
print("LAUNCHDIR:", os.getcwd())
|
if platform.system() == 'Darwin':
|
||||||
LOGGER = fancyLogger(filepath=r"./conf/loggerconf.json", fileLog=False)
|
basePath = '/'+'/'.join(sys.executable.split('/')[1:-2])+'/Resources'
|
||||||
conf = bananaCONF(workdir=r"./conf", logger=LOGGER)
|
else:
|
||||||
|
basePath = './'
|
||||||
|
LOGGER = fancyLogger(filepath=f"{basePath}/conf/loggerconf.json", fileLog=False)
|
||||||
|
conf = bananaCONF(workdir=f"{basePath}/conf", logger=LOGGER)
|
||||||
conf.open()
|
conf.open()
|
||||||
conf.use("defaults.json")
|
conf.use("defaults.json")
|
||||||
conf.use(conf.getParam('paths', 'lastUsed'))
|
conf.use(conf.getParam('paths', 'lastUsed'))
|
||||||
|
|||||||
Reference in New Issue
Block a user