auto update standalone
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
auto update standalone
How hard is it to build code so a standalone would look to see if any updates are available, download and replace it?
Has anyone developed a library for this?
Any suggestions are greatly appreciated...
Thanks, Dan
Has anyone developed a library for this?
Any suggestions are greatly appreciated...
Thanks, Dan
Re: auto update standalone
Hi Dan,
I have created an installer (Installer Maker) which also contains an uninstaller. I had to find a way to make the uninstaller work independently of the main app. This involved putting a copy of the app in a different location. If you can store an updater in a different location on the hard disk and run it independently of your main app, you can delete the old app and install an update. When the updated app starts, it could check if the updater is still there and delete it.
Kind regards,
Mark
I have created an installer (Installer Maker) which also contains an uninstaller. I had to find a way to make the uninstaller work independently of the main app. This involved putting a copy of the app in a different location. If you can store an updater in a different location on the hard disk and run it independently of your main app, you can delete the old app and install an update. When the updated app starts, it could check if the updater is still there and delete it.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: auto update standalone
download the plugin and have been playing with it to see how it works, etc...
it works well but confused on a couple of things...
- uninstaller work if you set it to install in a folder under applications (OSX) but if you put a second folder, the uninstall goes into the first folder and program goes into second folder. What would happen if you installed multiple programs under the first folder? Would it have multiple un-installers and how would you know which one would work?
- You said "If you can store an updater in a different location on the hard disk and run it independently of your main app, you can delete the old app and install an update. When the updated app starts, it could check if the updater is still there and delete it"... apologize for the not being a programmer but don't understand "store an updater".. I'm want to uninstall the original program and have the new standalone installed. Can that be automated? Or would you have to instruct the user to run the uninstaller and then run the install?
Thanks, Dan
it works well but confused on a couple of things...
- uninstaller work if you set it to install in a folder under applications (OSX) but if you put a second folder, the uninstall goes into the first folder and program goes into second folder. What would happen if you installed multiple programs under the first folder? Would it have multiple un-installers and how would you know which one would work?
- You said "If you can store an updater in a different location on the hard disk and run it independently of your main app, you can delete the old app and install an update. When the updated app starts, it could check if the updater is still there and delete it"... apologize for the not being a programmer but don't understand "store an updater".. I'm want to uninstall the original program and have the new standalone installed. Can that be automated? Or would you have to instruct the user to run the uninstaller and then run the install?
Thanks, Dan
Re: auto update standalone
Hi Dan,
I mentioned Installer Maker because it proves that you can run an app completely independently from the app that is being installed/uninstalled/updated. I think I used AppleScript on Mac OS X and the "start" DOS command on Windows, but it should also work with open process for neither.
Installer Maker's uninstaller should always be installed in the Applications folder. If you install an update, the new uninstaller should be installed in the same place. The list with files is also updated and when the uninstaller run, all old and new files should be deleted. If you want to know for sure that it works with your app on your system, I can only recommend testing Installer Maker and letting me know about any issues.
Storing an updater in a different locations just means that you copy the updater app to another place on your hard disk. This should be a place that in no way affects your app and isn't affected by your app. This could be the temp folder, for example.
Yes, you can automate the whole process. When your app detects an update, it can install the updater in the temp folder for instance and start it. The updater can delete the original app and install a new one.
Why wouldn't you just install the new version over the old version? In that case, if the app detects an update, it could just download a new installer, save (store) it in the temp folder and run it. That's faster and easier.
Kind regards,
Mark
I mentioned Installer Maker because it proves that you can run an app completely independently from the app that is being installed/uninstalled/updated. I think I used AppleScript on Mac OS X and the "start" DOS command on Windows, but it should also work with open process for neither.
Installer Maker's uninstaller should always be installed in the Applications folder. If you install an update, the new uninstaller should be installed in the same place. The list with files is also updated and when the uninstaller run, all old and new files should be deleted. If you want to know for sure that it works with your app on your system, I can only recommend testing Installer Maker and letting me know about any issues.
Storing an updater in a different locations just means that you copy the updater app to another place on your hard disk. This should be a place that in no way affects your app and isn't affected by your app. This could be the temp folder, for example.
Yes, you can automate the whole process. When your app detects an update, it can install the updater in the temp folder for instance and start it. The updater can delete the original app and install a new one.
Why wouldn't you just install the new version over the old version? In that case, if the app detects an update, it could just download a new installer, save (store) it in the temp folder and run it. That's faster and easier.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: auto update standalone
Hi Dan,
I'd just use the splash screen method
http://lessons.runrev.com/s/lessons/m/4 ... pplication
Launcher never gets an update just "Main Application.livecode"
Launcher would check the current version and compare it with the local version.
So many ways to do the above I'll leave it up to you.
Splash screen is a bit odd of a name as you never actually have to show the stack.
Simon
I'd just use the splash screen method
http://lessons.runrev.com/s/lessons/m/4 ... pplication
Launcher never gets an update just "Main Application.livecode"
Launcher would check the current version and compare it with the local version.
So many ways to do the above I'll leave it up to you.
Splash screen is a bit odd of a name as you never actually have to show the stack.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: auto update standalone
Hi Simon,
I have always found it an issue that the splash app itself would not be updatable. When RunRev fixes essential bugs, you may want to update the engine of your app. I think that overwriting the app with an update could solve this.
Kind regards,
Mark
I have always found it an issue that the splash app itself would not be updatable. When RunRev fixes essential bugs, you may want to update the engine of your app. I think that overwriting the app with an update could solve this.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: auto update standalone
Would be nice if someone with the skill to do it, could build a LCB library with this:
https://developer.android.com/guide/pla ... pp-updates
Off course, I am not up to it
https://developer.android.com/guide/pla ... pp-updates
Off course, I am not up to it
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
-
- VIP Livecode Opensource Backer
- Posts: 10055
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: auto update standalone

Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: auto update standalone
lol - definitely stealing that pic 

Re: auto update standalone
Very funny
My problem is that I need an auto-update running on a Android 10 TV Box, without any user intervention (I cannot force the user to set its Google play account to auto-update App's)
I wish the LC standalone could update itself at any hardware restart, if a new version is available.
I was thinking of 2 solutions:
1) as from https://www.androidauthority.com/how-to ... pks-31494/ I read:
I am just wondering if all of this would happens without the user intervention, like "do you want to install..." dialogs.
2) Using a variation of the "Splash screen" stack method (remember, on a TvBox, that is similar to an android mobile): that is, having the standalone stack do just 3 things:
a) version control
b) launch of the real standalone (which at compile time would be copied to the Splash standalone engine folder, if it is possbile to launch a standalone that is inside another standalone)
c) optional downloading a new versions and replacing the old one (inside the engine folder)
Any suggestions?

My problem is that I need an auto-update running on a Android 10 TV Box, without any user intervention (I cannot force the user to set its Google play account to auto-update App's)
I wish the LC standalone could update itself at any hardware restart, if a new version is available.
I was thinking of 2 solutions:
1) as from https://www.androidauthority.com/how-to ... pks-31494/ I read:
I could use the browser widget of LC to install the update, previously loaded to my web server.- Download the APK you want to install.
- You can either navigate to your Download folder using a file browser app or simply begin the install by clicking on the completed download in your mobile browser.
-Android will ask you to grant permission to either the file browser or your web browser to install the app. Grant the permission and it should bounce you back to the installation screen. If not, navigate back to your Download folder after granting the permission to try again.
- The app should safely install.
I am just wondering if all of this would happens without the user intervention, like "do you want to install..." dialogs.
2) Using a variation of the "Splash screen" stack method (remember, on a TvBox, that is similar to an android mobile): that is, having the standalone stack do just 3 things:
a) version control
b) launch of the real standalone (which at compile time would be copied to the Splash standalone engine folder, if it is possbile to launch a standalone that is inside another standalone)
c) optional downloading a new versions and replacing the old one (inside the engine folder)
Any suggestions?
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
Re: auto update standalone
You're trying to overcome an Android security measure that prevents malware from auto-installing without user interaction. I'm not sure you can do that.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: auto update standalone
You probably stand correct.
Still, I have seen android Apps (on the TvBox) that, when you click in the dialog that tells the user of an available update (I have a similar dialog in my App) it does not direct you to Google Play, but directly downloads an Apk and install.
Beside the fact that, from the developer point of view, there is not that much difference of having the user click on a update button or doing it for him with a script, the simple fact that you can download and install an App on android (there are tons of Apps that do that), from your google drive, web host or else, doesn't it shows that this is possible and that, at least on Android, Google does not object?
I am confused and, before starting to write code I would like to be sure that it is possible.
Still, I have seen android Apps (on the TvBox) that, when you click in the dialog that tells the user of an available update (I have a similar dialog in my App) it does not direct you to Google Play, but directly downloads an Apk and install.
Beside the fact that, from the developer point of view, there is not that much difference of having the user click on a update button or doing it for him with a script, the simple fact that you can download and install an App on android (there are tons of Apps that do that), from your google drive, web host or else, doesn't it shows that this is possible and that, at least on Android, Google does not object?
I am confused and, before starting to write code I would like to be sure that it is possible.
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
Re: auto update standalone
Updates can be delivered without going to the Playstore.
For a normal Android device,,,
If a user has turned on automatic updates for your app, the update will be downloaded and installed automatically. If automatic updates was not selected, then users will be sent to the app listing to download the update.
Note that the updates always come from the Playstore.
So it's up to the user to decide.
I suspect that the nature of Android TV probably has automatic updates turned on as standard..but that's just an assumption.
Hope this helps to clarify the situation a little.
For a normal Android device,,,
If a user has turned on automatic updates for your app, the update will be downloaded and installed automatically. If automatic updates was not selected, then users will be sent to the app listing to download the update.
Note that the updates always come from the Playstore.
So it's up to the user to decide.
I suspect that the nature of Android TV probably has automatic updates turned on as standard..but that's just an assumption.
Hope this helps to clarify the situation a little.
Andy .... LC CLASSIC ROCKS!
Re: auto update standalone
It's true a user can sideload apps from anywhere but they do need to do that manually and also need to turn on "unknown sources" in settings, so it's still a user-driven choice.
There's a workaround that I've used successfully though. Create your app as a splash screen and download the actual content stack from a server. Because it isn't an app, Android allows that. Updating your app would just mean replacing the server copy of the stack. The splash app would need to check with the server to see if a newer version is available before downloading.
Edit: It's best to compress or zip the stack on the server and have the splash app expand the file after download.
There's a workaround that I've used successfully though. Create your app as a splash screen and download the actual content stack from a server. Because it isn't an app, Android allows that. Updating your app would just mean replacing the server copy of the stack. The splash app would need to check with the server to see if a newer version is available before downloading.
Edit: It's best to compress or zip the stack on the server and have the splash app expand the file after download.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: auto update standalone
I'm amazed that Google allow that. But it's good to know that they dojacque wrote: ↑Sun Nov 14, 2021 6:24 pm
There's a workaround that I've used successfully though. Create your app as a splash screen and download the actual content stack from a server. Because it isn't an app, Android allows that. Updating your app would just mean replacing the server copy of the stack. The splash app would need to check with the server to see if a newer version is available before downloading.
Andy .... LC CLASSIC ROCKS!