How does RW7 compare stack-versions?

Hi,

I have a question: does someone know how RapidWeaver 7 compares stack-versions?
It does not compare version numbers, that’s for sure.

So, how?
The macOS creation date? Of what exactly? The PLIST?


Thanks,
Marc

Not sure what you’re asking. Compared to what? Are you talking about stacks needing update, the version number being displayed?
The update process is done with a sparkle app cast.

What I mean is if you, for example, download a new version of a stack, and double-click it.
RW7 may say: “the same version is already installed”, although the version number of the downloaded one is higher.

You have to be very specific here. What version number in the plist you are referring to?

Don’t know, but there’s two different version numbers in the stacks plist.
Version number
Build number
http://api.yourhead.com/plist/

How can I be specific if the question is about how RW checks for version differences?

This is probably a discussion for the Yourhead Slack channel:
https://yourhead.slack.com/

As @isaiah will be more available to answer that.

I already did. He said it’s a RapidWeaver thing - not a Stacks thing.

Tell us what you changed in the 2 different bundle identifiers, and we can tell you.

These two:

<key>CFBundleShortVersionString</key>
<string>1.1.7</string>
<key>CFBundleVersion</key>
<string>1.1.7</string>

I changed 1.1.0 to 1.1.1, then to 1.1.2 etc. up to 1.1.7

Well, that looks good to me. I am out. I guess @simon might know…

I hope so.

I signed up for the Realmac Support website hours ago, to ask this question there.
But I’m still waiting for that confirmation e-mail.

That’s why I started asking the question here.

Here’s what I’d recommend when you’re trying to locate a RW installer issue:

  1. Make sure there are ZERO other stacks installed. This eliminates the possibility of the installer being thrown off by something weird.

  2. When testing the installer, the updater, or looking for strange behaviors there, disable the Custom Add-ons Folder Location in the prefs.

For developers these first two items might be less common than for novices – but still I see that about 90% of the problems with installers, version numbers, updaters, etc… come from these two things. Garbage in the add-ons folder and strangeness having to do with custom add-on location. So TRIPPLE CHECK that stuff before doing anything else.

  1. I would recommend following the Apple guidelines loosely.
    Apple specifies that CFBundleVersion is a build-number (I think they say Build Iteration Version) and the CFBundleShortVersionString is the user-centric version number.

  2. I would probably recommend you follow RW’s lead closely. RW has a user-facing build number in the CFBunldeShortVersionString (e.g. 7.5.5) and an integer value (sometimes with a b tagged at the end for betas) for the CFBundleVersion (e.g. 1295 followed by 1296). This is what I’ve done with my plugins and mostly seems to work pretty well.

Most macOS updaters will first compare CFBundleVersion. First as integer values, then if that fails as a Semantic Version. Stacks has lots of logic built in for comparing versions like this – not just for the Stacks updater but also for testing versions of dependency libraries (like jQuery). Comparing those version tipples is non-trivial – there are lots of little gotchas that can lead to issues. So my recommendation is just use a plain integer value in CFBundleVersion because integers are a lot easier to compare.

If you do all that – and you still find that two versions are not updating properly, then I’d pack those two stacks up as minimally as possible and send them over to @simon.

Hey,

@isaiah’s advice is spot on. Most of the time, this issue is because you’ve got multiple versions of an addon with the same bundle identifier installed.

This code only compares CFBundleVersion - it doesn’t nothing with CFBundleShortVersionString. That should only ever be used for displaying a version in the UI.

If you’re still having issues after following Isaiah’s advice, please email me the current and new versions of your addons and I’ll take a look:

simon@realmacsoftware.com

1 Like

Ok, thanks everyone!
I’ll give it all a try and let you know.

—-
Marc

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.