Skip to content

Commit

Permalink
add note how to unquarantine macos dmgs
Browse files Browse the repository at this point in the history
* aligned released binaries names
* removed build link from application title
  • Loading branch information
abjrcode committed Oct 2, 2023
1 parent 4f5d381 commit 53016ea
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

Rotate your secrets and live worry free!

# Requirements
> [!NOTE]
> When trying to run the MacOS `DMG` bundles, you might get a message that the binary is damaged. It is not. The browser or the OS is marking it for quarantine. You can make it work by running `xattr -r -d com.apple.quarantine ./<path to DMG file>`.
# Development Requirements

- [Golang 1.21.x](https://go.dev/dl/)
- [NodeJS 18.x.x](https://nodejs.org/en/) Recommended to use [nvm](https://github.com/nvm-sh/nvm#installing-and-updating) or [windows-nvm](https://github.com/coreybutler/nvm-windows#installation--upgrades) to manage NodeJS versions.
Expand All @@ -27,7 +30,7 @@ wails build

Then you can find the binary in `./build/bin/`

## Live Development
## Developing Locally

To run in live development mode:

Expand Down
4 changes: 0 additions & 4 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,14 @@ import (
"context"
)

// App struct
type App struct {
ctx context.Context
}

// NewApp creates a new App application struct
func NewApp() *App {
return &App{}
}

// startup is called when the app starts. The context is saved
// so we can call the runtime methods
func (a *App) startup(ctx context.Context) {
a.ctx = ctx
}
4 changes: 2 additions & 2 deletions magefiles/ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ func Build(appVersion, buildTimestamp, commitSha, buildLink string) error {
}

fmt.Println("Building DMG")
var amdDmgOutputPath = fmt.Sprintf("./build/bin/Swervo-amd64-%s.dmg", appVersion)
var amdDmgOutputPath = fmt.Sprintf("./build/bin/swervo-darwin-amd64-%s.dmg", appVersion)
var createAmdDmgError = sh.RunV("create-dmg", "--window-size", "800", "300", "--no-internet-enable", "--hide-extension", "Swervo-amd64.app", "--app-drop-link", "600", "40", amdDmgOutputPath, "./build/bin/Swervo-amd64.app")

if createAmdDmgError != nil {
fmt.Println("Error building DMG", createAmdDmgError)
return createAmdDmgError
}

var armDmgOutputPath = fmt.Sprintf("./build/bin/Swervo-arm64-%s.dmg", appVersion)
var armDmgOutputPath = fmt.Sprintf("./build/bin/swervo-darwin-arm64-%s.dmg", appVersion)
var createArmDmgError = sh.RunV("create-dmg", "--window-size", "800", "300", "--no-internet-enable", "--hide-extension", "Swervo-arm64.app", "--app-drop-link", "600", "40", armDmgOutputPath, "./build/bin/Swervo-arm64.app")

if createArmDmgError != nil {
Expand Down
4 changes: 1 addition & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ var CommitSha string = "HEAD"
var BuildLink string = "http://localhost"

func main() {
// Create an instance of the app structure
app := NewApp()

// Create application with options
err := wails.Run(&options.App{
Title: fmt.Sprintf("Swervo - %s - %s - %s - %s", Version, BuildTimestamp, CommitSha, BuildLink),
Title: fmt.Sprintf("Swervo - %s - %s - %s", Version, BuildTimestamp, CommitSha),
Width: 1024,
Height: 768,
AssetServer: &assetserver.Options{
Expand Down
2 changes: 1 addition & 1 deletion wails.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://wails.io/schemas/config.v2.json",
"name": "Swervo",
"outputfilename": "Swervo",
"outputfilename": "swervo",
"frontend:install": "npm install",
"frontend:build": "npm run build",
"frontend:dev:watcher": "npm run dev",
Expand Down

0 comments on commit 53016ea

Please sign in to comment.