Skip to content

Commit

Permalink
switch to pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
ensan-hcl committed Mar 24, 2024
1 parent 4cd7cc0 commit 48f0e69
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 255 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.dmg
*.pkg
.DS_Store
*.swiftmodule
*.app
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,8 @@ xcodebuild -project azooKeyMac.xcodeproj -scheme azooKeyMac -configuration Relea

コントリビュート歓迎です!!

### dmgファイルの作成
`dmgbuild`によって配布用のdmgファイルを作成できます。`dmgbuild.sh`を参考にコマンドを入力してください。`dmgbuild`は次のコマンドでインストールできます。

```bash
pip install dmgbuild
```
### pkgファイルの作成
`pkgbuild.sh`によって配布用のdmgファイルを作成できます。`build/azooKeyMac.app` としてDeveloper IDで署名済みの.appを配置してください。

### TODO

Expand Down
16 changes: 16 additions & 0 deletions distribution.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<installer-gui-script minSpecVersion="1">
<pkg-ref id="dev.ensan.inputmethod.azooKeyMac"/>
<title>azooKey</title>
<options customize="never" require-scripts="false" hostArchitectures="x86_64,arm64"/>
<choices-outline>
<line choice="default">
<line choice="dev.ensan.inputmethod.azooKeyMac"/>
</line>
</choices-outline>
<choice id="default"/>
<choice id="dev.ensan.inputmethod.azooKeyMac" visible="false">
<pkg-ref id="dev.ensan.inputmethod.azooKeyMac"/>
</choice>
<pkg-ref id="dev.ensan.inputmethod.azooKeyMac" version="0" onConclusion="none">azooKey-tmp.pkg</pkg-ref>
</installer-gui-script>
3 changes: 0 additions & 3 deletions dmgbuild.sh

This file was deleted.

246 changes: 0 additions & 246 deletions dmgbuildsettings.py

This file was deleted.

27 changes: 27 additions & 0 deletions pkg.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?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">
<array>
<dict>
<key>BundleHasStrictIdentifier</key>
<true/>
<key>BundleIsRelocatable</key>
<false/>
<key>BundleIsVersionChecked</key>
<true/>
<key>BundleOverwriteAction</key>
<string>upgrade</string>
<key>ChildBundles</key>
<array>
<dict>
<key>BundleOverwriteAction</key>
<string></string>
<key>RootRelativeBundlePath</key>
<string>azooKeyMac.app/Contents/Resources/AzooKeyKanakanjiConverter_KanaKanjiConverterModuleWithDefaultDictionary.bundle</string>
</dict>
</array>
<key>RootRelativeBundlePath</key>
<string>azooKeyMac.app</string>
</dict>
</array>
</plist>
22 changes: 22 additions & 0 deletions pkgbuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
set -e


# Suppose we have build/azooKeyMac.app
# Use this script to create a plist package for distribution
# pkgbuild --analyze --root ./build/ pkg.plist

# Create a temporary package
pkgbuild --root ./build/ \
--component-plist pkg.plist --identifier dev.ensan.inputmethod.azooKeyMac \
--version 0 \
--install-location /Library/Input\ Methods \
azooKey-tmp.pkg

# Create a distribution file
# productbuild --synthesize --package azooKey-tmp.pkg distribution.xml

# Build the final package
productbuild --distribution distribution.xml --package-path . azooKey-release.pkg

# Clean up
rm azooKey-tmp.pkg

0 comments on commit 48f0e69

Please sign in to comment.