mandelbulber2
mandelbulber2 copied to clipboard
Quick wins for a proper macOS app
From (and not including) version 2.11.1
, mandelbulber2’s macOS app changed its bundle ID (CFBundleIdentifier
key in Info.plist) to com.yourcompany.mandelbulber2
and no longer reports any version (neither CFBundleVersion
nor CFBundleShortVersionString
).
While the bundle ID isn’t too problematic (though something like com.mandelbulber.mandelbulber2
would be more appropriate), lack of version information makes it hard to manage the app on the system or check for updates with third-party tools.
Even something like a date (easily scriptable in the build step) would already be useful.
Are you able to help me in this topic? I'm not familiar with MacOS at all. Script for building Mandelbulber for MacOS is here: https://github.com/buddhi1980/mandelbulber2/blob/master/.circleci/config.yml (there is used CircleCI service for baking builds and packages)
I’m not familiar with QT, but I searched around and it seems the solution may be to stick the information in the .pro
file:
QMAKE_FULL_VERSION = 2.2
QMAKE_SHORT_VERSION = 2.2
QMAKE_TARGET_BUNDLE_PREFIX = com.mandelbulber.mandelbulber2
I tried that, but the build failed on my machine after churning away for a while, so I wasn’t able to confirm if it worked.
It could also be done if the app were built and then packaged as a DMG (because it’s simple to alter the info.plist where the information resides), but it seems your script builds and packages in the same command.
Thanks for hint. I will try it tomorrow and paste you a link to package fro testing
Change to qmake was just commited https://github.com/buddhi1980/mandelbulber2/commit/ddf0857721689c3fa57fc8e516c122a0831e7a8b In few ours I will have fresh MacOS package and provide the link.
Download link: https://1886-33041722-gh.circle-artifacts.com/0/~/mandelbulber2/build/artifacts/mandelbulber2-macOS-d50ea1cce7e8172ca249b78e676e941c7f2c6a72.dmg
There’s progress, though we’re not there yet.
The bundle ID was set, but to com.mandelbulber.mandelbulber2.mandelbulber2
. Looking closely, the option’s name is QMAKE_TARGET_BUNDLE_PREFIX
(prefix), so it should be set to com.mandelbulber
.
The versions weren’t set.
How about this instead?
QMAKE_TARGET_BUNDLE_PREFIX = com.mandelbulber
VERSION = 2.2
In commit https://github.com/buddhi1980/mandelbulber2/commit/4624cfa692f67e850a57504aced0d9320d05ca5a I have changed configuration as you proposed
In commit 4624cfa I have changed configuration as you proposed
If you’re able to provide a build, I’ll be able to check if it’s working as expected.
https://1902-33041722-gh.circle-artifacts.com/0/~/mandelbulber2/build/artifacts/mandelbulber2-macOS-4624cfa692f67e850a57504aced0d9320d05ca5a.dmg
The Bundle ID is OK, but the versions still weren’t set. I’m unsure if we’re doing something wrong or if it’s an upstream bug (I’ve encountered some reports that suggest that might be the case).
hello @vitorgalvao i recently joined the mandelbulber2 project and will focos on CI/CD and macos stuff.
Would be happy to talk with you about the issue You can find me at https://gitter.im/buddhi1980/mandelbulber2
Unfortunately I’m unsure how I could be of further help, @networkpanic.
I can tell you is that the CFBundleVersion
and CFBundleShortVersionString
keys in Info.plist
should be set. I can also tell you how to do it once the app is built:
mandelbulber_path='/PATH/TO/MANDELBULBER2APP/HERE'
mandelbulber_version='VERSION NUMBER HERE'
/usr/libexec/PlistBuddy -c "Add :CFBundleVersion string ${mandelbulber_version}" "${mandelbulber_path}/Contents/Info.plist"
/usr/libexec/PlistBuddy -c "Add :CFBundleShortVersionString string ${mandelbulber_version}" "${mandelbulber_path}/Contents/Info.plist"
But I don’t know how to do it with QT during the build process, which is the problem here.
Technically CFBundleVersion
should be an ever increasing build number (e.g. 1450
) and CFBundleShortVersionString
a “human centered” version (e.g. 2.2.5
), but even having one of them in both places would be a huge improvement.
thanks for your help, i will try to get this fixed as soon my job grants me some spare time