Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kliment/Printrun.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authora2k-hanlon <andrewkhanlon@gmail.com>2021-01-29 23:08:00 +0300
committera2k-hanlon <andrewkhanlon@gmail.com>2021-01-29 23:08:00 +0300
commit6b26dc764af2feb8f5aa886acb40c95ef9fd18de (patch)
treeefcd75c6afba8642e24288536b20787d9d9e2c81
parent5a130c37857a30f2659cd99ad8048c8bced47bdb (diff)
Modified generation of pyinstaller spec file for build on OSX
- Enables full resolution on Retina displays - Prevents app sleep (stalled prints?)
-rw-r--r--.github/workflows/buildpackage-mac.yml11
-rw-r--r--buildinstructions.txt17
2 files changed, 22 insertions, 6 deletions
diff --git a/.github/workflows/buildpackage-mac.yml b/.github/workflows/buildpackage-mac.yml
index 804868f..fed46ad 100644
--- a/.github/workflows/buildpackage-mac.yml
+++ b/.github/workflows/buildpackage-mac.yml
@@ -34,6 +34,17 @@ jobs:
- name: Make pyinstaller spec
run: |
pyi-makespec --hidden-import="pkg_resources.py2_warn" -F --add-data images/\*:images --add-data \*.png:. --add-data \*.ico:. -w -i P-face.icns pronterface.py
+ # Edit spec file
+ sed -i '' '$ s/.$//' pronterface.spec
+ cat >> pronterface.spec <<EOL
+ ,
+ info_plist={
+ 'NSPrincipalClass': 'NSApplication',
+ 'NSAppleScriptEnabled': False,
+ 'NSAppSleepDisabled': True,
+ },
+ )
+ EOL
- name: Make pyinstaller build
run: |
pyinstaller --clean pronterface.spec -y
diff --git a/buildinstructions.txt b/buildinstructions.txt
index ff272cf..79f3fba 100644
--- a/buildinstructions.txt
+++ b/buildinstructions.txt
@@ -19,13 +19,19 @@ python pronterface.py
for packaging:
pip install pyinstaller
-pyi-makespec -F --add-data images/\*:images --add-data \*.png:. --add-data \*.ico:. -w -i P-face.icns pronterface.py
+pyi-makespec --hidden-import="pkg_resources.py2_warn" -F --add-data images/\*:images --add-data \*.png:. --add-data \*.ico:. -w -i P-face.icns pronterface.py
rm -rf dist
-pyinstaller --clean pronterface.spec -y
-(edit .plist file to add:
-<key>NSAppSleepDisabled</key>
-<true/>
+sed -i '' '$ s/.$//' pronterface.spec
+cat >> pronterface.spec <<EOL
+,
+info_plist={
+ 'NSPrincipalClass': 'NSApplication',
+ 'NSAppleScriptEnabled': False,
+ 'NSAppSleepDisabled': True,
+ },
)
+EOL
+pyinstaller --clean pronterface.spec -y
(optional) codesign -s identityname dist/pronterface.app --deep
setup on windows:
@@ -51,4 +57,3 @@ for packaging:
pip install pyinstaller
pyi-makespec -F --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i pronterface.ico pronterface.py
pyinstaller --clean pronterface.spec -y
-