From 53016ea01e982d5bad36ccdd76de9fdac0221864 Mon Sep 17 00:00:00 2001 From: Ibrahim Najjar Date: Tue, 3 Oct 2023 01:03:17 +0200 Subject: [PATCH] add note how to unquarantine macos dmgs * aligned released binaries names * removed build link from application title --- README.md | 7 +++++-- app.go | 4 ---- magefiles/ci.go | 4 ++-- main.go | 4 +--- wails.json | 2 +- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 48d0663..f72c124 100644 --- a/README.md +++ b/README.md @@ -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 ./`. + +# 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. @@ -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: diff --git a/app.go b/app.go index a29c6af..4b29ad0 100644 --- a/app.go +++ b/app.go @@ -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 } diff --git a/magefiles/ci.go b/magefiles/ci.go index c8b31ba..d0edc45 100644 --- a/magefiles/ci.go +++ b/magefiles/ci.go @@ -48,7 +48,7 @@ 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 { @@ -56,7 +56,7 @@ func Build(appVersion, buildTimestamp, commitSha, buildLink string) error { 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 { diff --git a/main.go b/main.go index b1d1647..f597ab2 100644 --- a/main.go +++ b/main.go @@ -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{ diff --git a/wails.json b/wails.json index bead234..92dc012 100644 --- a/wails.json +++ b/wails.json @@ -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",