Skip to content

Commit

Permalink
Start work for macOS packager, this gets the format right
Browse files Browse the repository at this point in the history
Transporter now recognises the package and can match it to pending releases
  • Loading branch information
andydotxyz committed Nov 26, 2020
1 parent 97ad77d commit cb33972
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 19 deletions.
9 changes: 9 additions & 0 deletions cmd/fyne/commands/release.go
Expand Up @@ -80,6 +80,9 @@ func (r *releaser) afterPackage() error {
}
return r.signAndroid(apk)
}
if r.os == "darwin" {
return r.packageMacOSRelease()
}
if r.os == "ios" {
return r.packageIOSRelease()
}
Expand Down Expand Up @@ -156,6 +159,12 @@ func (r *releaser) packageIOSRelease() error {
return exec.Command("zip", "-r", appName[:len(appName)-4]+".ipa", "Payload/").Run()
}

func (r *releaser) packageMacOSRelease() error {
cmd := exec.Command("productbuild", "--component", r.name+".app", "/Applications/",
"--product", r.name+".app/Contents/Info.plist", r.name+".pkg")
return cmd.Run()
}

func (r *releaser) packageWindowsRelease(outFile string) error {
payload := filepath.Join(r.dir, "Payload")
os.Mkdir(payload, 0750)
Expand Down
2 changes: 1 addition & 1 deletion cmd/fyne/internal/templates/bundled.go
Expand Up @@ -7,7 +7,7 @@ import "fyne.io/fyne"
var resourceInfoPlist = &fyne.StaticResource{
StaticName: "Info.plist",
StaticContent: []byte{
60, 63, 120, 109, 108, 32, 118, 101, 114, 115, 105, 111, 110, 61, 34, 49, 46, 48, 34, 32, 101, 110, 99, 111, 100, 105, 110, 103, 61, 34, 85, 84, 70, 45, 56, 34, 63, 62, 10, 60, 33, 68, 79, 67, 84, 89, 80, 69, 32, 112, 108, 105, 115, 116, 32, 80, 85, 66, 76, 73, 67, 32, 34, 45, 47, 47, 65, 112, 112, 108, 101, 32, 67, 111, 109, 112, 117, 116, 101, 114, 47, 47, 68, 84, 68, 32, 80, 76, 73, 83, 84, 32, 49, 46, 48, 47, 47, 69, 78, 34, 32, 34, 104, 116, 116, 112, 58, 47, 47, 119, 119, 119, 46, 97, 112, 112, 108, 101, 46, 99, 111, 109, 47, 68, 84, 68, 115, 47, 80, 114, 111, 112, 101, 114, 116, 121, 76, 105, 115, 116, 45, 49, 46, 48, 46, 100, 116, 100, 34, 62, 10, 60, 112, 108, 105, 115, 116, 32, 118, 101, 114, 115, 105, 111, 110, 61, 34, 49, 46, 48, 34, 62, 10, 60, 100, 105, 99, 116, 62, 10, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 78, 97, 109, 101, 60, 47, 107, 101, 121, 62, 10, 60, 115, 116, 114, 105, 110, 103, 62, 123, 123, 46, 78, 97, 109, 101, 125, 125, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 69, 120, 101, 99, 117, 116, 97, 98, 108, 101, 60, 47, 107, 101, 121, 62, 10, 60, 115, 116, 114, 105, 110, 103, 62, 123, 123, 46, 69, 120, 101, 78, 97, 109, 101, 125, 125, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 60, 47, 107, 101, 121, 62, 10, 60, 115, 116, 114, 105, 110, 103, 62, 123, 123, 46, 65, 112, 112, 73, 68, 125, 125, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 73, 99, 111, 110, 70, 105, 108, 101, 60, 47, 107, 101, 121, 62, 10, 60, 115, 116, 114, 105, 110, 103, 62, 105, 99, 111, 110, 46, 105, 99, 110, 115, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 83, 104, 111, 114, 116, 86, 101, 114, 115, 105, 111, 110, 83, 116, 114, 105, 110, 103, 60, 47, 107, 101, 121, 62, 10, 60, 115, 116, 114, 105, 110, 103, 62, 123, 123, 46, 86, 101, 114, 115, 105, 111, 110, 125, 125, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 86, 101, 114, 115, 105, 111, 110, 60, 47, 107, 101, 121, 62, 10, 60, 115, 116, 114, 105, 110, 103, 62, 123, 123, 46, 66, 117, 105, 108, 100, 125, 125, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 60, 107, 101, 121, 62, 78, 83, 72, 105, 103, 104, 82, 101, 115, 111, 108, 117, 116, 105, 111, 110, 67, 97, 112, 97, 98, 108, 101, 60, 47, 107, 101, 121, 62, 10, 60, 116, 114, 117, 101, 47, 62, 10, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 73, 110, 102, 111, 68, 105, 99, 116, 105, 111, 110, 97, 114, 121, 86, 101, 114, 115, 105, 111, 110, 60, 47, 107, 101, 121, 62, 10, 60, 115, 116, 114, 105, 110, 103, 62, 54, 46, 48, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 80, 97, 99, 107, 97, 103, 101, 84, 121, 112, 101, 60, 47, 107, 101, 121, 62, 10, 60, 115, 116, 114, 105, 110, 103, 62, 65, 80, 80, 76, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 60, 47, 100, 105, 99, 116, 62, 10, 60, 47, 112, 108, 105, 115, 116, 62}}
60, 63, 120, 109, 108, 32, 118, 101, 114, 115, 105, 111, 110, 61, 34, 49, 46, 48, 34, 32, 101, 110, 99, 111, 100, 105, 110, 103, 61, 34, 85, 84, 70, 45, 56, 34, 63, 62, 10, 60, 33, 68, 79, 67, 84, 89, 80, 69, 32, 112, 108, 105, 115, 116, 32, 80, 85, 66, 76, 73, 67, 32, 34, 45, 47, 47, 65, 112, 112, 108, 101, 32, 67, 111, 109, 112, 117, 116, 101, 114, 47, 47, 68, 84, 68, 32, 80, 76, 73, 83, 84, 32, 49, 46, 48, 47, 47, 69, 78, 34, 32, 34, 104, 116, 116, 112, 58, 47, 47, 119, 119, 119, 46, 97, 112, 112, 108, 101, 46, 99, 111, 109, 47, 68, 84, 68, 115, 47, 80, 114, 111, 112, 101, 114, 116, 121, 76, 105, 115, 116, 45, 49, 46, 48, 46, 100, 116, 100, 34, 62, 10, 60, 112, 108, 105, 115, 116, 32, 118, 101, 114, 115, 105, 111, 110, 61, 34, 49, 46, 48, 34, 62, 10, 60, 100, 105, 99, 116, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 78, 97, 109, 101, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 123, 123, 46, 78, 97, 109, 101, 125, 125, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 69, 120, 101, 99, 117, 116, 97, 98, 108, 101, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 123, 123, 46, 69, 120, 101, 78, 97, 109, 101, 125, 125, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 73, 100, 101, 110, 116, 105, 102, 105, 101, 114, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 123, 123, 46, 65, 112, 112, 73, 68, 125, 125, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 73, 99, 111, 110, 70, 105, 108, 101, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 105, 99, 111, 110, 46, 105, 99, 110, 115, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 83, 104, 111, 114, 116, 86, 101, 114, 115, 105, 111, 110, 83, 116, 114, 105, 110, 103, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 123, 123, 46, 86, 101, 114, 115, 105, 111, 110, 125, 125, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 83, 117, 112, 112, 111, 114, 116, 101, 100, 80, 108, 97, 116, 102, 111, 114, 109, 115, 60, 47, 107, 101, 121, 62, 10, 9, 60, 97, 114, 114, 97, 121, 62, 10, 9, 9, 60, 115, 116, 114, 105, 110, 103, 62, 77, 97, 99, 79, 83, 88, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 47, 97, 114, 114, 97, 121, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 86, 101, 114, 115, 105, 111, 110, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 123, 123, 46, 66, 117, 105, 108, 100, 125, 125, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 107, 101, 121, 62, 78, 83, 72, 105, 103, 104, 82, 101, 115, 111, 108, 117, 116, 105, 111, 110, 67, 97, 112, 97, 98, 108, 101, 60, 47, 107, 101, 121, 62, 10, 9, 60, 116, 114, 117, 101, 47, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 73, 110, 102, 111, 68, 105, 99, 116, 105, 111, 110, 97, 114, 121, 86, 101, 114, 115, 105, 111, 110, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 54, 46, 48, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 9, 60, 107, 101, 121, 62, 67, 70, 66, 117, 110, 100, 108, 101, 80, 97, 99, 107, 97, 103, 101, 84, 121, 112, 101, 60, 47, 107, 101, 121, 62, 10, 9, 60, 115, 116, 114, 105, 110, 103, 62, 65, 80, 80, 76, 60, 47, 115, 116, 114, 105, 110, 103, 62, 10, 60, 47, 100, 105, 99, 116, 62, 10, 60, 47, 112, 108, 105, 115, 116, 62}}

var resourceMakefile = &fyne.StaticResource{
StaticName: "Makefile",
Expand Down
40 changes: 22 additions & 18 deletions cmd/fyne/internal/templates/data/Info.plist
Expand Up @@ -2,23 +2,27 @@
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>{{.Name}}</string>
<key>CFBundleExecutable</key>
<string>{{.ExeName}}</string>
<key>CFBundleIdentifier</key>
<string>{{.AppID}}</string>
<key>CFBundleIconFile</key>
<string>icon.icns</string>
<key>CFBundleShortVersionString</key>
<string>{{.Version}}</string>
<key>CFBundleVersion</key>
<string>{{.Build}}</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleName</key>
<string>{{.Name}}</string>
<key>CFBundleExecutable</key>
<string>{{.ExeName}}</string>
<key>CFBundleIdentifier</key>
<string>{{.AppID}}</string>
<key>CFBundleIconFile</key>
<string>icon.icns</string>
<key>CFBundleShortVersionString</key>
<string>{{.Version}}</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>{{.Build}}</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
</dict>
</plist>

0 comments on commit cb33972

Please sign in to comment.