Add entitlements

Add entitlements.plist to app bundle for use in codesign later.

Add .app extension to viewer app name used with 'open' command.

It didn't use to matter, but on my machine "open -a FAHViewer" fails, while "open -a FAHViewer.app" works.
Thev 'open' man page examples use the extension.
This commit is contained in:
Kevin Bernhagen 2020-12-01 21:34:41 -08:00
parent 5813269396
commit 924d24c723
3 changed files with 11 additions and 1 deletions

View File

@ -1333,6 +1333,7 @@ class FAHControl(SingleAppServer):
if not (len(cmd) and len(cmd[0])): cmd = ['FAHViewer']
if sys.platform == 'darwin':
if not cmd[0].endswith('.app'): cmd[0] += '.app'
cmd = ['/usr/bin/open', '-a', cmd[0], '--args'] + cmd[1:]
if fullscreen: cmd.append('--fullscreen')

9
osx/entitlements.plist Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
</dict>
</plist>

View File

@ -50,7 +50,7 @@ if sys.platform == 'darwin':
argv_emulation = False,
includes = 'cairo, pango, pangocairo, atk, gobject, gio',
iconfile = 'images/FAHControl.icns',
resources = ['/opt/local/share/themes'],
resources = ['/opt/local/share/themes', 'osx/entitlements.plist'],
plist = plist,
)