Skip to content

Commit

Permalink
Merge pull request #30 from noir-neo/fix-install-path
Browse files Browse the repository at this point in the history
Modify install path mac
  • Loading branch information
noir-neo authored Nov 19, 2023
2 parents 2dcf04d + 2545c51 commit 9897973
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pkg-info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>BundleOverwriteAction</key>
<string></string>
<key>RootRelativeBundlePath</key>
<string>Applications/hatbor.app/Contents/PlugIns/StandaloneFileBrowser.bundle</string>
<string>hatbor.app/Contents/PlugIns/StandaloneFileBrowser.bundle</string>
</dict>
</array>
<key>RootRelativeBundlePath</key>
<string>Applications/hatbor.app</string>
<string>hatbor.app</string>
</dict>
</array>
</plist>
11 changes: 6 additions & 5 deletions post-process-build-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ codesign \
--entitlements "${PROJECT_NAME}.entitlements" \
--sign "Developer ID Application: ${APPLE_TEAM_NAME} (${APPLE_TEAM_ID})" "${MAC_BUILD_PATH}/${PROJECT_NAME}.app"

mkdir -p "pkgroot/Applications"
cp -R "${MAC_BUILD_PATH}/${PROJECT_NAME}.app" "pkgroot/Applications/${PROJECT_NAME}.app"
rm -rf "pkgroot"
mkdir -p "pkgroot"
cp -R "${MAC_BUILD_PATH}/${PROJECT_NAME}.app" "pkgroot/${PROJECT_NAME}.app"

pkgbuild --root "pkgroot" --component-plist "pkg-info.plist" --identifier ${BUNDLE_IDENTIFIER} --version ${VERSION} --install-location "/Applications" "${PROJECT_NAME}.pkg"

productbuild --synthesize --package "${PROJECT_NAME}.pkg" "Distribution.xml"
productbuild --distribution "Distribution.xml" --package-path . "distribution.pkg"

productsign --sign "Developer ID Installer: ${APPLE_TEAM_NAME} (${APPLE_TEAM_ID})" "distribution.pkg" "signed.pkg"
rm -rf "dmg-resources"
mkdir "dmg-resources"
productsign --sign "Developer ID Installer: ${APPLE_TEAM_NAME} (${APPLE_TEAM_ID})" "distribution.pkg" "dmg-resources/${PROJECT_NAME}.pkg"

mkdir dmg-resources
cp "signed.pkg" "dmg-resources/${PROJECT_NAME}.pkg"
hdiutil create -srcfolder "dmg-resources" -fs HFS+ -format UDZO -volname "${PROJECT_NAME}" "${PROJECT_NAME}.dmg"

xcrun notarytool store-credentials "APP_PASSWORD_NOTARIZATION" --apple-id "${APPLE_ID}" --team-id "${APPLE_TEAM_ID}" --password "${APPLE_PASSWORD}"
Expand Down

0 comments on commit 9897973

Please sign in to comment.