Packaging tweaks

This commit is contained in:
Nindi Gill 2022-07-01 17:46:37 +10:00
parent 2ed311a818
commit 1e902f1d3b
5 changed files with 87 additions and 8 deletions

View file

@ -2,6 +2,7 @@
Identifier: com.ninxsoft.pkg.mist Identifier: com.ninxsoft.pkg.mist
Input: Input:
NAME: Mist NAME: Mist
IDENTIFIER: com.ninxsoft.pkg.mist
Process: Process:
- Processor: URLDownloader - Processor: URLDownloader
Arguments: Arguments:
@ -15,11 +16,69 @@ Process:
- Processor: Versioner - Processor: Versioner
Arguments: Arguments:
input_plist_path: "%pathname%/Contents/Info.plist" input_plist_path: "%pathname%/Contents/Info.plist"
- Processor: AppPkgCreator - Processor: PkgRootCreator
Arguments: Arguments:
app_path: "%pathname%" pkgroot: "%RECIPE_CACHE_DIR%/payload"
pkg_path: "%RECIPE_CACHE_DIR%/%NAME%-%version%.pkg" pkgdirs:
"Applications": "0755"
"Library": "0755"
"Library/LaunchDaemons": "0755"
"Library/PrivilegedHelperTools": "0755"
- Processor: Copier
Arguments:
source_path: "/Applications/Mist.app"
destination_path: "%RECIPE_CACHE_DIR%/payload/Applications/Mist.app"
- Processor: Copier
Arguments:
source_path: "/Library/LaunchDaemons/com.ninxsoft.mist.helper.plist"
destination_path: "%RECIPE_CACHE_DIR%/payload/Library/LaunchDaemons/com.ninxsoft.mist.helper.plist"
- Processor: Copier
Arguments:
source_path: "/Applications/Mist.app/Contents/Library/LaunchServices/com.ninxsoft.mist.helper"
destination_path: "%RECIPE_CACHE_DIR%/payload/Library/PrivilegedHelperTools/com.ninxsoft.mist.helper"
- Processor: Copier
Arguments:
source_path: "%MIST_RECIPE_DIR%/Scripts"
destination_path: "%RECIPE_CACHE_DIR%/scripts"
- Processor: PkgCreator
Arguments:
pkg_request:
id: "%IDENTIFIER%"
version: "%version%" version: "%version%"
pkgtype: flat
pkgroot: "%RECIPE_CACHE_DIR%/payload"
pkgdir: "%RECIPE_CACHE_DIR%"
pkgname: "%NAME%-%version%"
chown:
- path: /Applications
user: root
group: wheel
mode: "0755"
- path: /Applications/Mist.app
user: root
group: wheel
mode: "0755"
- path: /Library
user: root
group: wheel
mode: "0755"
- path: /Library/LaunchDaemons
user: root
group: wheel
mode: "0755"
- path: /Library/LaunchDaemons/com.ninxsoft.mist.helper.plist
user: root
group: wheel
mode: "0644"
- path: /Library/PrivilegedHelperTools
user: root
group: wheel
mode: "0755"
- path: /Library/PrivilegedHelperTools/com.ninxsoft.mist.helper
user: root
group: wheel
mode: "0544"
scripts: "%RECIPE_CACHE_DIR%/scripts"
- Processor: PkgSigner - Processor: PkgSigner
Arguments: Arguments:
pkg_path: "%RECIPE_CACHE_DIR%/%NAME%-%version%.pkg" pkg_path: "%RECIPE_CACHE_DIR%/%NAME%-%version%.pkg"

View file

@ -937,7 +937,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 10; CURRENT_PROJECT_VERSION = 0.1;
DEVELOPMENT_TEAM = 7K3HVCLV7Z; DEVELOPMENT_TEAM = 7K3HVCLV7Z;
ENABLE_HARDENED_RUNTIME = YES; ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES; ENABLE_PREVIEWS = YES;
@ -967,7 +967,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 10; CURRENT_PROJECT_VERSION = 0.1;
DEVELOPMENT_TEAM = 7K3HVCLV7Z; DEVELOPMENT_TEAM = 7K3HVCLV7Z;
ENABLE_HARDENED_RUNTIME = YES; ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES; ENABLE_PREVIEWS = YES;

View file

@ -11,10 +11,10 @@
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>0.1</string> <string>0.1</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>10</string> <string>0.1</string>
<key>SMAuthorizedClients</key> <key>SMAuthorizedClients</key>
<array> <array>
<string>anchor apple generic and identifier "com.ninxsoft.mist" and info[CFBundleVersion] &gt;= "10" and certificate leaf[subject.OU] = "7K3HVCLV7Z"</string> <string>anchor apple generic and identifier "com.ninxsoft.mist" and info[CFBundleVersion] &gt;= "0.1" and certificate leaf[subject.OU] = "7K3HVCLV7Z"</string>
</array> </array>
</dict> </dict>
</plist> </plist>

9
Scripts/postinstall Executable file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -e
identifier="com.ninxsoft.mist.helper"
launchctl bootstrap system "/Library/LaunchDaemons/$identifier.plist"
exit 0

11
Scripts/preinstall Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -e
identifier="system/com.ninxsoft.mist.helper"
if launchtl print "system/$identifier" ; then
launchctl bootout "system/$identifier"
fi
exit 0