Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release MacOS DMG file with compressed SecretlessBroker.app #1348

Open
infamousjoeg opened this issue Sep 29, 2020 · 0 comments
Open

Release MacOS DMG file with compressed SecretlessBroker.app #1348

infamousjoeg opened this issue Sep 29, 2020 · 0 comments

Comments

@infamousjoeg
Copy link
Member

Is your feature request related to a problem? Please describe.

It is not related to a problem.

Describe the solution you would like

Currently, every release includes a Go executable where GOOS_ARCH is set to darwin. This generates a single executable.

In addition to that, I am proposing that a MacOS compressed DMG file is also released that contains SecretlessBroker.app in agent-mode for easy install and use on MacOS.

See Additional context below for how this can be accomplished.

Describe alternatives you have considered

n/a

Additional context

╰ tree SecretlessBroker.app
SecretlessBroker.app
└── Contents
    ├── Info.plist
    ├── MacOS
    │   └── secretless-broker
    └── Resources
        └── icon.icns

3 directories, 3 files
  1. mkdir SecretlessBroker.app
  2. Within SecretlessBroker.app:
  • touch Info.plist
  • mkdir MacOS
  • mkdir Resources
  1. Within Info.plist:
<?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">
<dict>
	<key>CFBundleExecutable</key>
	<string>secretless-broker</string>
	<key>CFBundleIconFile</key>
	<string>icon.icns</string>
	<key>CFBundleIdentifier</key>
	<string>com.cyberark.secretless</string>
	<key>NSHighResolutionCapable</key>
	<true/>
	<key>LSUIElement</key>
	<true/>
</dict>
</plist>
  • CFBundleExecutable is the name of the executable under SecretlessBroker.app/MacOS.
  • CFBundleIdentifier is the identifier of the .app when it is running.
  • LSUIElement set to true sets "agent-mode" so when SecretlessBroker.app is running, it doesn't constantly bounce in the dock menu.
  1. Within the MacOS directory, add the secretless_broker executable for Darwin from go build.
  2. Within the Resources directory, add the icon set for SecretlessBroker.app icons in @1x and @2x sizes.

To create the DMG file and compress it, follow the rest of the documentation on this blog post: https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5. At the end of the blog post, there is a script that automates this entire process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant