Open brosasaki opened 5 months ago
That's very nice. To be able to bundle it, I think we need to find a way to turn this into an actual .app. That way we could also distribute this as a prebuilt cask. But I haven't really looked into how to do that.
i found a way to turn it into a .app file.
if you just follow this to install zathura and get it working on macos, turning it into a .app is actually pretty easy.
mkdir -p MyApp.app/Contents/MacOS
mkdir -p MyApp.app/Contents/Resources
cp /path/to/your/executable MyApp.app/Contents/MacOS/zathura
Info.plist
.nano MyApp.app/Contents/Info.plist
Info.plist
File:<?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>CFBundleName</key>
<string>MyApp</string>
<key>CFBundleDisplayName</key>
<string>MyApp</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.myapp</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundleExecutable</key>
<string>zathura</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleIconFile</key>
<string>AppIcon</string>
</dict>
</plist>
cp /path/to/your/icon.icns MyApp.app/Contents/Resources/AppIcon.icns
chmod +x MyApp.app/Contents/MacOS/zathura
mv MyApp.app /Applications/
Now you have a .app bundle that runs your Unix executable and can be launched like any other macOS application.
So thats how i got the zathura executable working as a .app on macos. i could upload the .app if you want.
I took the icon svg from Zathura's original repository and made a MacOS style icon for it. If you right-click -> info on the 'zathura' executable, copy the .icns file in the zip, click the icon in the info pan, then paste, it will change the icon that shows up in the dock. I'm not sure how to integrate this into the actual distribution, though.
icons.zip I release this work to the public domain.