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

macOS app bundle #181

Open
magnusviri opened this issue Jan 4, 2021 · 1 comment
Open

macOS app bundle #181

magnusviri opened this issue Jan 4, 2021 · 1 comment
Labels
enhancement New feature or request PR welcome The given topic has already been analyzed and you can safely create a PR implementing this functiona

Comments

@magnusviri
Copy link

magnusviri commented Jan 4, 2021

I created a macOS double clickable app bundle for Czkawka. It doesn't support keyboard shortcuts like command-q, but it at least is double clickable. The app bundle (a folder that ends in ".app") structure should look like this.

Czkawka.app/
Czkawka.app/Contents
Czkawka.app/Contents/Info.plist
Czkawka.app/Contents/MacOS
Czkawka.app/Contents/MacOS/czkawka
Czkawka.app/Contents/MacOS/czkawka_gui (the real binary, not included...)
Czkawka.app/Contents/Resources
Czkawka.app/Contents/Resources/app.icns

I can't figure out how to include the text files so here they are.

Czkawka.app/Contents/MacOS/czkawka

#!/bin/sh

${0}_gui

Czkawka.app/Contents/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>CFBundleDevelopmentRegion</key>
	<string>en</string>
	<key>CFBundleExecutable</key>
	<string>czkawka</string>
	<key>CFBundleDisplayName</key>
	<string>Czkawka</string>
	<key>CFBundleIconFile</key>
	<string>app</string>
	<key>CFBundleIdentifier</key>
	<string>com.github</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>czkawka</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>2.0</string>
	<key>CFBundleSupportedPlatforms</key>
	<array>
		<string>MacOSX</string>
	</array>
	<key>CFBundleVersion</key>
	<string>2.0.0</string>
	<key>LSMinimumSystemVersion</key>
	<string>10.9</string>
	<key>NSHumanReadableCopyright</key>
	<string>Copyright © 2020 qarmin. All rights reserved.</string>
	<key>NSMainNibFile</key>
	<string>MainMenu</string>
	<key>NSPrincipalClass</key>
	<string>NSApplication</string>
	<key>NSSupportsAutomaticTermination</key>
	<true/>
	<key>NSSupportsSuddenTermination</key>
	<true/>
</dict>
</plist>

And Czkawka.app/Contents/Resources/app.icns image

@qarmin qarmin added the enhancement New feature or request label Jan 4, 2021
@CyrosX
Copy link

CyrosX commented Oct 4, 2021

Hey there,
did you also include the necessary libraries (gtk+3 adwaita-icon-theme)?
I've found these projects, which aim to make bundling easier:

https://reposhub.com/rust/macos-apis/mrmekon-fruitbasket.html
https://github.com/burtonageo/cargo-bundle

@qarmin qarmin added the PR welcome The given topic has already been analyzed and you can safely create a PR implementing this functiona label May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PR welcome The given topic has already been analyzed and you can safely create a PR implementing this functiona
Projects
None yet
Development

No branches or pull requests

3 participants