diff --git a/Mist.pkg.recipe.yaml b/Mist.pkg.recipe.yaml index 046071f..d0a1b8d 100644 --- a/Mist.pkg.recipe.yaml +++ b/Mist.pkg.recipe.yaml @@ -2,6 +2,7 @@ Identifier: com.ninxsoft.pkg.mist Input: NAME: Mist + IDENTIFIER: com.ninxsoft.pkg.mist Process: - Processor: URLDownloader Arguments: @@ -15,11 +16,69 @@ Process: - Processor: Versioner Arguments: input_plist_path: "%pathname%/Contents/Info.plist" - - Processor: AppPkgCreator + - Processor: PkgRootCreator Arguments: - app_path: "%pathname%" - pkg_path: "%RECIPE_CACHE_DIR%/%NAME%-%version%.pkg" - version: "%version%" + pkgroot: "%RECIPE_CACHE_DIR%/payload" + 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%" + 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 Arguments: pkg_path: "%RECIPE_CACHE_DIR%/%NAME%-%version%.pkg" diff --git a/Mist.xcodeproj/project.pbxproj b/Mist.xcodeproj/project.pbxproj index c8e34d3..38ae264 100644 --- a/Mist.xcodeproj/project.pbxproj +++ b/Mist.xcodeproj/project.pbxproj @@ -937,7 +937,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 10; + CURRENT_PROJECT_VERSION = 0.1; DEVELOPMENT_TEAM = 7K3HVCLV7Z; ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; @@ -967,7 +967,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 10; + CURRENT_PROJECT_VERSION = 0.1; DEVELOPMENT_TEAM = 7K3HVCLV7Z; ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; diff --git a/MistHelperTool/Info.plist b/MistHelperTool/Info.plist index 72d0c05..380ae1e 100644 --- a/MistHelperTool/Info.plist +++ b/MistHelperTool/Info.plist @@ -11,10 +11,10 @@ CFBundleShortVersionString 0.1 CFBundleVersion - 10 + 0.1 SMAuthorizedClients - anchor apple generic and identifier "com.ninxsoft.mist" and info[CFBundleVersion] >= "10" and certificate leaf[subject.OU] = "7K3HVCLV7Z" + anchor apple generic and identifier "com.ninxsoft.mist" and info[CFBundleVersion] >= "0.1" and certificate leaf[subject.OU] = "7K3HVCLV7Z" diff --git a/Scripts/postinstall b/Scripts/postinstall new file mode 100755 index 0000000..2aee71a --- /dev/null +++ b/Scripts/postinstall @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -e + +identifier="com.ninxsoft.mist.helper" + +launchctl bootstrap system "/Library/LaunchDaemons/$identifier.plist" + +exit 0 diff --git a/Scripts/preinstall b/Scripts/preinstall new file mode 100755 index 0000000..859659f --- /dev/null +++ b/Scripts/preinstall @@ -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