How does RW7 compare stack-versions?


(Marc Vos) #1

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


(Doug Bennett) #2

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.


(Marc Vos) #3

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.


(Jannis from inStacks Software) #4

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


(Doug Bennett) #5

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


(Marc Vos) #6

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


(Robert Ziebol 🖖🏼) #7

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

As @isaiah will be more available to answer that.


(Marc Vos) #8

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


(Jannis from inStacks Software) #9

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


(Marc Vos) #10

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


(Jannis from inStacks Software) #11

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


(Marc Vos) #12

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.


(Isaiah Carew) #13

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.


(Simon Maddox) #14

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


(Marc Vos) #15

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

—-
Marc


(system) #16

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