I've got the start of the updates code for the PAM ready. It's still a long way from being finished (doesn't even check yet), but at least it's a start. Rather than being a generic solution for many servers, ala AMP, it only handles the PA site, which reduces the complexity.
Et, viola.
procedure TfrmMenu.GetUpdatesINI(); // Download the updates INI from the PortableApps.com server // Acknowledgement: http://delphi.about.com/od/internetintranet/a/get_file_net.htm for the function var remoteUpdates: TINIFile; remoteUpdatesPath: TString; localUpdatesPath: TString; begin remoteUpdatesPath := ExtractFileDir(Application.ExeName) + '\Data\remote_updates.ini'; localUpdatesPath := ExtractFileDir(Application.ExeName) + '\Data\local_updates.ini'; if GetInetFile('http://external.portableapps.com/updates.ini', remoteUpdatesPath) then if FileExists(localUpdatesPath) then remoteUpdates:=TINIFile.Create(remoteUpdatesPath); // Stuff DeleteFile(localUpdatesPath); RenameFile(remoteUpdatesPath, localUpdatesPath); else if Not RenameFile(remoteUpdatesPath, localUpdatesPath) then ShowMessage('Unable to rename updates file. Please make sure the Data directory is writable'); else ShowMessage('Unable to download updates file. Please try again in 5 minutes and if the problem persists, report it to the forums'); end;
And of course, add procedure GetUpdatesINI();
with all the rest of the procedure definitions.
I'll add as much more as I can tonight to get it functional.
This is the final bit I can get done, someone (like John) can take over from here.Famous last words, eh? This is the
secondthirdfourthfifthsixth time I've updated this comment. Watch this space.Note: I haven't compiled this, so I've got no idea if it works, but it should
Note 2:
You'll also need GetInetFile for downloading part.Edit 5: Well, the previous code only worked out if the server's version had been updated, which is useless. Updated with the proper code and now has a corresponding "getAvailableApps" which retrieves all the apps which the user doesn't have.
Edit 6: GetInetFile function now included
----
Ryan McCue.
Blog.
So all that Airbus-delay trouble over here in Europe is because of YOU!
Simeon.
"If you're not part of the solution, you're part of the precipitate."
Anyone care to comment? Maybe read this John?
----
Ryan McCue.
Blog.
So all that Airbus-delay trouble over here in Europe is because of YOU!
Simeon.
"If you're not part of the solution, you're part of the precipitate."
Was that a bump?
Tsk, tsk. Mr McCue.
--
Life is about the journey not the destination!
My site * My Blog
The Kazoo Spartan
Life is about the journey not the destination!
The Kazoo Spartan
Worked though, didn't it
----
Ryan McCue.
Blog.
So all that Airbus-delay trouble over here in Europe is because of YOU!
Simeon.
"If you're not part of the solution, you're part of the precipitate."
But could you make it so it can handle other sites?
--
As all of ya should know Micro$oft is the Evil Empire, and Windows (a.k.a. Winblows or Windoze) is their greatest general, so please make a difference and install Linux or FreeBSD on yer Windows comp.
It will add about 20 lines of complexity. It is the PortableApps Menu, so the path is hard-coded.
Also, the (suggested) INI format:
If you use the download code from that site on the above URL, it will download the actual app, not the HTML page.
----
Ryan McCue.
Blog.
So all that Airbus-delay trouble over here in Europe is because of YOU!
Simeon.
"If you're not part of the solution, you're part of the precipitate."
How hard will it be to implement compatibility with other sites? Cause I would like to modify the source code, to fit it to my tastes.
--
As all of ya should know Micro$oft is the Evil Empire, and Windows (a.k.a. Winblows or Windoze) is their greatest general, so please make a difference and install Linux or FreeBSD on yer Windows comp.
You'd have to adapt it from the files at http://am-portable.svn.sourceforge.net/
----
Ryan McCue.
Blog.
So all that Airbus-delay trouble over here in Europe is because of YOU!
Simeon.
"If you're not part of the solution, you're part of the precipitate."
Is that based in my repositories idea?
You know I had an idea for some repositories with a similar kind of files to allow direct download.
You stole that from me!!! *cries at the same time it is happy for his idea being used*
(I know that the repositories were already an idea before I posted my idea)
____________________
The Blogger of Portimão or O Blogger de Portimão. Free your mind...
Blue is everything.
Actually this was in production for some time but lack of work the project was pretty dead and Ryan is trying to bring it up again
-----------------------------
"I don't fear Computers. I fear the lack of them" Isaac Asimov
My Personal Blog in the making at a new address thibeaz.com
your friendly neighbourhood moderator Zach Thibeau
This time officially
----
Ryan McCue.
Blog.
So all that Airbus-delay trouble over here in Europe is because of YOU!
Simeon.
"If you're not part of the solution, you're part of the precipitate."
Updated, now should look like this:
This more closely mirrors the
AppInfo.ini
s----
Ryan McCue.
Blog.
So all that Airbus-delay trouble over here in Europe is because of YOU!
Simeon.
"If you're not part of the solution, you're part of the precipitate."