App Updater helper for Levure

Collaborate on tools, libraries, and applications beyond the IDE

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 960
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: App Updater helper for Levure

Post by trevordevore » Fri Nov 09, 2018 11:29 pm

So the appcast.xml file points to the same DMG that you would make available to your users for download from your site. So that folder structure suggestion is correct.

As an example, here are my company urls used with the helper. The main DMG file downloaded by helper or directly from my website:

http://www.bluemangolearning.com/downlo ... nSteps.dmg.

My appcast.xml file is located in an auto_update folder however. This url is inserted into the Info.plist file:

http://www.bluemangolearning.com/downlo ... ppcast.xml

The release notes are stored under a folder in the auto_update folder in a folder with the version number:

http://www.bluemangolearning.com/downlo ... notes.html
Trevor DeVore
ScreenSteps - http://www.screensteps.com

Levure Application Framework: https://github.com/trevordevore/levure
LiveCode Resources for Developers: http://livecode.bluemangolearning.com

martyknapp
Posts: 38
Joined: Fri Mar 24, 2006 5:33 pm
Location: Blaine, Washington - USA

Re: App Updater helper for Levure

Post by martyknapp » Fri Nov 09, 2018 11:44 pm

Got it. I use the Shopify e-commerce platform and then SendOwl to distribute so my setup is a bit different.

This is a really great system. I was a bit apprehensive about switching over - I had an LC 6.x/GLX based product and finally switched over to LC 9 so I could release a 64 bit version. I thought it would be a lot harder, but it's come together more easily than I thought. I'm really pleased - thanks again.

martyknapp
Posts: 38
Joined: Fri Mar 24, 2006 5:33 pm
Location: Blaine, Washington - USA

Re: App Updater helper for Levure

Post by martyknapp » Tue Dec 18, 2018 1:51 am

Just had something odd happen. My app is at version 3.0.0 built 14. Then I built version 3.0.1 build 1 and ran it, but *before* I uploaded the new appcast.xml file. When it launched the updater said "3.0.0 is available-- you have 3.0.1" Why would it think 3.0.0 is newer than 3.0.1? This happens on Mac and Windows.

Another question, when my app opens and there is an update available, and the window opens with the release notes, is there a way to know if that window is open so I don't open other windows like I normally do?

Thanks

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 960
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: App Updater helper for Levure

Post by trevordevore » Tue Dec 18, 2018 3:30 am

When you prepared 3.0.1 did you reset the `build` number to a number lower than it was with version 3.0.0? The build number should always go up, never down:

https://github.com/trevordevore/levure/ ... nformation
Trevor DeVore
ScreenSteps - http://www.screensteps.com

Levure Application Framework: https://github.com/trevordevore/levure
LiveCode Resources for Developers: http://livecode.bluemangolearning.com

martyknapp
Posts: 38
Joined: Fri Mar 24, 2006 5:33 pm
Location: Blaine, Washington - USA

Re: App Updater helper for Levure

Post by martyknapp » Tue Dec 18, 2018 5:53 am

Ah, that was it then. I've always reset my build numbers whenever I've bumped the version number up.

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 960
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: App Updater helper for Levure

Post by trevordevore » Tue Dec 18, 2018 2:11 pm

I've updated the README with a link to the Levure docs about how to use `build`.
Trevor DeVore
ScreenSteps - http://www.screensteps.com

Levure Application Framework: https://github.com/trevordevore/levure
LiveCode Resources for Developers: http://livecode.bluemangolearning.com

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 960
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: App Updater helper for Levure

Post by trevordevore » Tue Dec 18, 2018 2:19 pm

Regarding your question about knowing if the updater window is open - Sparkle sends a message before and after the window opens. The LCB code will repost these messages using `sparkleWillShowModalAlert` and `sparkleDidShowModalAlert`. WinSparkle only sends a notification if a message is found. The LCB code will repost that message using `sparkleFoundUpdate`.

You could check to see if the modal always appears on Windows when `sparkleFoundUpdate` is posted. If it is then use that message on Windows and use `sparkleWillShowModalAlert` on macOS. If you can report your findings back here then perhaps we can incorporate a function into the appUpdater library that returns whether or not the updater window is showing.
Trevor DeVore
ScreenSteps - http://www.screensteps.com

Levure Application Framework: https://github.com/trevordevore/levure
LiveCode Resources for Developers: http://livecode.bluemangolearning.com

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 960
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: App Updater helper for Levure

Post by trevordevore » Wed Jan 16, 2019 1:33 pm

@martyknapp - did you ever get a chance to test when the updater window appears in relation to when the messages are posted?
Trevor DeVore
ScreenSteps - http://www.screensteps.com

Levure Application Framework: https://github.com/trevordevore/levure
LiveCode Resources for Developers: http://livecode.bluemangolearning.com

martyknapp
Posts: 38
Joined: Fri Mar 24, 2006 5:33 pm
Location: Blaine, Washington - USA

Re: App Updater helper for Levure

Post by martyknapp » Wed Jan 16, 2019 5:26 pm

No, sorry - I've been buried with other issues/projects.

martyknapp
Posts: 38
Joined: Fri Mar 24, 2006 5:33 pm
Location: Blaine, Washington - USA

Re: App Updater helper for Levure

Post by martyknapp » Wed Feb 06, 2019 8:27 pm

I'm finally getting back to this. I have the update working pretty well for Mac but on Windows I'm running into an issue with the version.

The current update available on my server is for version 3.0.2 build 20. When I build version 3.0.2 build 21 (only bumped the build #) and launch the Mac version, it tells me I have the latest and there's not an update (as expected). On the Windows version it tells me an update is available:

"3.0.2 is now available (you have 3.0.2.21)"

But the version on my server is 3.0.2 build 20 - why would it think that is newer?

In my app.yml file for my latest build I have:
version: 3.0.2
build: 21

And in the appcast.xml file on my server I have:
sparkle:version="20"
sparkle:shortVersionString="3.0.2"

Again works fine on Mac. What have I missed?

Thanks,
Marty

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 960
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: App Updater helper for Levure

Post by trevordevore » Wed Feb 06, 2019 8:43 pm

Update your appcast.xml template and use `[[VERSION]].[[BUILD]]` instead of just `[[BUILD]]` for the Windows `sparkle:version` setting. WinSparkle uses the full version from the exe file rather than the build number like Sparkle does. I just updated the app_updater helper with this change a little over a week ago when I realized the issue.

https://github.com/trevordevore/levureh ... r/releases
Trevor DeVore
ScreenSteps - http://www.screensteps.com

Levure Application Framework: https://github.com/trevordevore/levure
LiveCode Resources for Developers: http://livecode.bluemangolearning.com

martyknapp
Posts: 38
Joined: Fri Mar 24, 2006 5:33 pm
Location: Blaine, Washington - USA

Re: App Updater helper for Levure

Post by martyknapp » Wed Feb 06, 2019 8:45 pm

I just spotted that and am updating now! Thanks Trevore.

martyknapp
Posts: 38
Joined: Fri Mar 24, 2006 5:33 pm
Location: Blaine, Washington - USA

Re: App Updater helper for Levure

Post by martyknapp » Wed Feb 06, 2019 8:53 pm

That did the trick. So now on to the actual update file - what is Sparkle looking for, a zip file of the exe and other files and folders? Or should I upload an installer (built with Inno Setup)?

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 960
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: App Updater helper for Levure

Post by trevordevore » Wed Feb 06, 2019 8:55 pm

For Sparkle I just use the DMG file that users download. WinSparkle expects an installer. I pass it one made with Inno Setup. Just make sure you set the proper command line arguments for Inno Setup in the appcast.xml file.
Trevor DeVore
ScreenSteps - http://www.screensteps.com

Levure Application Framework: https://github.com/trevordevore/levure
LiveCode Resources for Developers: http://livecode.bluemangolearning.com

martyknapp
Posts: 38
Joined: Fri Mar 24, 2006 5:33 pm
Location: Blaine, Washington - USA

Re: App Updater helper for Levure

Post by martyknapp » Wed Feb 06, 2019 8:57 pm

I have this for WinSparkle in my appcast file:

sparkle:os="windows"
sparkle:installerArguments="/SILENT /SP-"

Post Reply

Return to “Community Projects”