Hi, everyone,
I'm looking for a way to programmatically check for newer application versions. I'm using a menu program, an FTP server, and a deployment tool. Currently, I use the syncapp() function in the menu to update the applications (I have three questionnaires in my menu). I thought the syncapp() function would return 0 if there were no newer applications on the server.
Does anyone have suggestions on how to proceed with this?
cheers,
Hafiz
Method to check for newer application versions
-
- Posts: 6
- Joined: October 27th, 2021, 10:34 pm
-
- Posts: 215
- Joined: November 21st, 2022, 4:41 pm
Re: Method to check for newer application versions
Hello,
The code I have used previously to handle newer application versions is that whenever the user syncs with the server, they record diagnostic("md5","file.pff") and diagnostic("md5","file.pen") for their current files. Then they use syncfile to GET the .pff/.pen files for all of the applications they want to update. They check the saved diagnostics against the current diagnostics to see if there has been a change in the current menu's files, restarting the menu with execpff("file.pff", "stop") if so. If the files have not changed, then syncing duplicates from the server will change nothing. If the files have changed, the only thing you need to do is detect the difference in diagnostics and warn the user or restart the current affected application. You should be able to use SyncApp rather than SyncFile, as it will also GET any changes to the .pff/.pen files.
Hope this helps,
Justin
The code I have used previously to handle newer application versions is that whenever the user syncs with the server, they record diagnostic("md5","file.pff") and diagnostic("md5","file.pen") for their current files. Then they use syncfile to GET the .pff/.pen files for all of the applications they want to update. They check the saved diagnostics against the current diagnostics to see if there has been a change in the current menu's files, restarting the menu with execpff("file.pff", "stop") if so. If the files have not changed, then syncing duplicates from the server will change nothing. If the files have changed, the only thing you need to do is detect the difference in diagnostics and warn the user or restart the current affected application. You should be able to use SyncApp rather than SyncFile, as it will also GET any changes to the .pff/.pen files.
Hope this helps,
Justin
-
- Posts: 6
- Joined: October 27th, 2021, 10:34 pm
Re: Method to check for newer application versions
Ah I seejustinlakier wrote: ↑September 11th, 2024, 10:38 am Hello,
The code I have used previously to handle newer application versions is that whenever the user syncs with the server, they record diagnostic("md5","file.pff") and diagnostic("md5","file.pen") for their current files. Then they use syncfile to GET the .pff/.pen files for all of the applications they want to update. They check the saved diagnostics against the current diagnostics to see if there has been a change in the current menu's files, restarting the menu with execpff("file.pff", "stop") if so. If the files have not changed, then syncing duplicates from the server will change nothing. If the files have changed, the only thing you need to do is detect the difference in diagnostics and warn the user or restart the current affected application. You should be able to use SyncApp rather than SyncFile, as it will also GET any changes to the .pff/.pen files.
Hope this helps,
Justin
What an interesting idea. I'll try it
Thank you very much
Best,
Hafiz