release: improve macos docs after macos tests
- build macos dmg - however, do not upload macos dmg to assets as it cannot be executed since the app and installer are not signed and notarized - upload artifacts - tested executable on macOSpull/61/head
parent
75e5d2671f
commit
eb8ea3330f
@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Create a folder (named dmg) to prepare our DMG in (if it doesn't already exist).
|
||||
|
||||
# https://www.pythonguis.com/tutorials/packaging-pyqt5-applications-pyinstaller-macos-dmg/
|
||||
|
||||
mkdir -p dist/dmg
|
||||
# Empty the dmg folder.
|
||||
rm -r dist/dmg/*
|
||||
# Copy the app bundle to the dmg folder.
|
||||
cp -r "dist/extract_otp_secrets.app" dist/dmg
|
||||
# If the DMG already exists, delete it.
|
||||
test -f "dist/extract_otp_secrets.dmg" && rm "dist/extract_otp_secrets.dmg"
|
||||
create-dmg \
|
||||
--volname "Extract OTP Secrets" \
|
||||
--window-pos 200 120 \
|
||||
--window-size 600 300 \
|
||||
--icon-size 100 \
|
||||
--hide-extension "extract_otp_secrets.app" \
|
||||
--app-drop-link 425 120 \
|
||||
"dist/extract_otp_secrets.dmg" \
|
||||
"dist/dmg/"
|
@ -0,0 +1,111 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
|
||||
# https://www.pythonguis.com/tutorials/packaging-pyqt5-applications-pyinstaller-macos-dmg/
|
||||
# https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html
|
||||
|
||||
block_cipher = None
|
||||
|
||||
a = Analysis(
|
||||
['src/extract_otp_secrets.py'],
|
||||
pathex=[],
|
||||
binaries=[],
|
||||
datas=[('$macos_python_path/__yolo_v3_qr_detector/', '__yolo_v3_qr_detector/')],
|
||||
hiddenimports=[],
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
runtime_hooks=[],
|
||||
excludes=[],
|
||||
win_no_prefer_redirects=False,
|
||||
win_private_assemblies=False,
|
||||
cipher=block_cipher,
|
||||
noarchive=False,
|
||||
)
|
||||
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
|
||||
|
||||
exe = EXE(
|
||||
pyz,
|
||||
a.scripts,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
[],
|
||||
name='extract_otp_secrets',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
runtime_tmpdir=None,
|
||||
console=True,
|
||||
disable_windowed_traceback=False,
|
||||
argv_emulation=True,
|
||||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None,
|
||||
)
|
||||
app = BUNDLE(
|
||||
exe,
|
||||
name='extract_otp_secrets.app',
|
||||
icon=None,
|
||||
bundle_identifier='ch.scito.tools.extract_otp_secrets',
|
||||
version='$VERSION_STR',
|
||||
info_plist={
|
||||
'NSPrincipalClass': 'NSApplication',
|
||||
'NSAppleScriptEnabled': False,
|
||||
'NSHumanReadableCopyright': 'Copyright © $COPYRIGHT_YEARS Scito.',
|
||||
'CFBundleDocumentTypes': [
|
||||
# Reference: https://chromium.googlesource.com/chromium/src/+/lkgr/chrome/app/app-Info.plist
|
||||
# https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_conc/understand_utis_conc.html#//apple_ref/doc/uid/TP40001319-CH202-SW6
|
||||
# https://developer.apple.com/documentation/uniformtypeidentifiers/system-declared_uniform_type_identifiers
|
||||
{
|
||||
'CFBundleTypeName': 'GIF image',
|
||||
'CFBundleTypeIconFile': 'document.icns',
|
||||
'LSItemContentTypes': ['com.compuserve.gif'],
|
||||
'LSHandlerRank': 'Alternate',
|
||||
'NSExportableTypes': ['public.json','public.comma-separated-values-text','public.plain-text'],
|
||||
},
|
||||
{
|
||||
'CFBundleTypeName': 'JPEG image',
|
||||
'CFBundleTypeIconFile': 'document.icns',
|
||||
'LSItemContentTypes': ['public.jpeg'],
|
||||
'LSHandlerRank': 'Alternate',
|
||||
'NSExportableTypes': ['public.json','public.comma-separated-values-text','public.plain-text'],
|
||||
},
|
||||
{
|
||||
'CFBundleTypeName': 'PNG image',
|
||||
'CFBundleTypeIconFile': 'document.icns',
|
||||
'LSItemContentTypes': ['public.png'],
|
||||
'LSHandlerRank': 'Alternate',
|
||||
'NSExportableTypes': ['public.json','public.comma-separated-values-text','public.plain-text'],
|
||||
},
|
||||
{
|
||||
'CFBundleTypeName': 'WebP image',
|
||||
'CFBundleTypeIconFile': 'document.icns',
|
||||
'LSItemContentTypes': ['org.webmproject.webp'],
|
||||
'LSHandlerRank': 'Alternate',
|
||||
'NSExportableTypes': ['public.json','public.comma-separated-values-text','public.plain-text'],
|
||||
},
|
||||
{
|
||||
'CFBundleTypeName': 'Tiff image',
|
||||
'CFBundleTypeIconFile': 'document.icns',
|
||||
'LSItemContentTypes': ['public.tiff'],
|
||||
'LSHandlerRank': 'Alternate',
|
||||
'NSExportableTypes': ['public.json','public.comma-separated-values-text','public.plain-text'],
|
||||
},
|
||||
{
|
||||
'CFBundleTypeName': 'Bmp image',
|
||||
'CFBundleTypeIconFile': 'document.icns',
|
||||
'LSItemContentTypes': ['com.microsoft.bmp'],
|
||||
'LSHandlerRank': 'Alternate',
|
||||
'NSExportableTypes': ['public.json','public.comma-separated-values-text','public.plain-text'],
|
||||
},
|
||||
{
|
||||
'CFBundleTypeName': 'Plain text document',
|
||||
'CFBundleTypeIconFile': 'document.icns',
|
||||
'LSItemContentTypes': ['public.plain-text'],
|
||||
'LSHandlerRank': 'Alternate',
|
||||
'NSExportableTypes': ['public.json','public.comma-separated-values-text','public.plain-text'],
|
||||
},
|
||||
],
|
||||
},
|
||||
)
|
Loading…
Reference in New Issue