diff --git a/.gitignore b/.gitignore index 37b5188..2e6ffc7 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,6 @@ Notes.t2t manuskript/pycallgraph.txt ExportTest icons/Numix -.idea \ No newline at end of file +.idea +dist +build \ No newline at end of file diff --git a/makefile b/makefile index bb57cb0..f003a31 100644 --- a/makefile +++ b/makefile @@ -32,7 +32,10 @@ linguist: lrelease i18n/manuskript_fr.ts i18n: $(QMs) - + +pyinstaller: + python3 /usr/local/bin/pyinstaller manuskript.spec + %_rc.py : %.qrc pyrcc5 "$<" -o "$@" diff --git a/manuskript.spec b/manuskript.spec new file mode 100644 index 0000000..a6bb8a1 --- /dev/null +++ b/manuskript.spec @@ -0,0 +1,38 @@ +# -*- mode: python -*- + +block_cipher = None + + +a = Analysis(['bin/manuskript'], + pathex=['/home/olivier/Dropbox/Documents/Travail/Geekeries/Python/PyCharmProjects/manuskript_pyinstaller tests'], + binaries=None, + datas=[ + ("icons", "icons"), + ("libs", "libs"), + ("resources", "resources"), + ("sample-projects", "sample-projects"), + ], + hiddenimports=[], + hookspath=[], + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) +exe = EXE(pyz, + a.scripts, + exclude_binaries=True, + name='manuskript', + debug=False, + strip=False, + upx=True, + console=True ) +coll = COLLECT(exe, + a.binaries, + a.zipfiles, + a.datas, + strip=False, + upx=True, + name='manuskript') diff --git a/manuskript/main.py b/manuskript/main.py index bf525ff..7d359fe 100644 --- a/manuskript/main.py +++ b/manuskript/main.py @@ -4,8 +4,10 @@ import faulthandler import sys from PyQt5.QtCore import QLocale, QTranslator, QSettings -from PyQt5.QtWidgets import QApplication -from .functions import * +from PyQt5.QtGui import QIcon +from PyQt5.QtWidgets import QApplication, qApp + +from manuskript.functions import appPath _version = "0.1.1"