Skip to content

abemedia/go-sparkle

Repository files navigation

Go Sparkle

go.dev reference

This package provides (incomplete) go bindings for Sparkle created by Andy Matuschak.

Sparkle is a secure and reliable software update framework for Cocoa developers.

See https://sparkle-project.org/ for more information about Sparkle.

Documentation

See the GoDoc and Sparkle's documentation (you can ignore point 1 & 2 in the docs).

Getting started

Download the Sparkle framework from https://github.com/sparkle-project/Sparkle/releases/2.5.1 and move the Sparkle.framework directory from the archive into your bundle's Frameworks directory (e.g. YourBundle.app/Contents/Frameworks/).

Configure Sparkle's defaults using your bundle's Info.plist (see https://sparkle-project.org/documentation/customization/). Only use the functions this package exposes to allow your users to change the defaults.

Ensure your binary is built with CGO_LDFLAGS set to -Wl,-rpath,@loader_path/../Frameworks e.g.

CGO_LDFLAGS='-Wl,-rpath,@loader_path/../Frameworks' go build .

Publish your updates as an appcast. See https://sparkle-project.org/documentation/publishing/.

See the example for more details.

Caveats

Sparkle requires a Cocoa run loop to work and as such can only be used by Go apps with a Cocoa UI such as webview/webview or therecipe/qt.

Migrating to v0.1.0

The Get prefix was removed from all function names to make them match C functions in the Sparkle framework e.g. GetFeedURL is now FeedURL etc.