3 Commits

Author SHA1 Message Date
Emanuele
79e5a78537 Merge branch 'code-gui-devel' of https://git.etss.it/12Parsec/bananaSPLIT into code-gui-devel 2020-10-27 12:42:40 +01:00
Emanuele
889c73c9b1 build 1.42 per mac, crea correttamente file .app 2020-10-27 12:38:03 +01:00
db26e6350d modifiche gitignore 2020-10-26 16:14:43 +01:00
5 changed files with 13 additions and 7 deletions

BIN
.DS_Store vendored

Binary file not shown.

1
.gitignore vendored
View File

@@ -5,3 +5,4 @@ TestFiles
__pycache__
.vscode
.venv
*.zip

1
MacBuild/README.txt Normal file
View File

@@ -0,0 +1 @@
Prima di aprire il programma copiare la cartella conf nella home del proprio utente.

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