PDA

View Full Version : How to give user option to grab either a patch, or full install?


AppleBag
07-15-2008, 05:19 AM
I would like to make true update display that there is an update available; and then check to see if a patch IS available, and then 2 things can happen:

1) User chooses to grab the patch and run it. or ..

2) user chooses to install full instal and run it instead of the patch.


Sometimes a patch may be available for the upgrade, sometimes not, so I'd like TU to figure this out for them, making the Full install always available, and the patch only available if it is made available on the server fo rthis upgrade, and then they just choose which they prefer.


Is this posible? thanks!

Ulrich
07-15-2008, 09:16 AM
Of course this is possible.

Please post your project until the point where you got stuck, explaining how far you were able to go by yourself.

Ulrich

AppleBag
07-15-2008, 11:58 AM
Hi

Sorry, I don't mean to make it more difficult for you, but I really haven't done anything special in my project yet, to paste. I just ran the wizard and went with most of the defaults it gives, just customizing the personal things, like server location, folder location, etc.

That's where I got stuck, lol. I'm brand spanking new to True update, and even LUA.

Ulrich
07-15-2008, 02:04 PM
Ok, here is a sample updater. I just wrote the code at once, nothing was debugged yet, so expect to find some errors here and there. This is to give you the idea on the concept of how to make it work by yourself, not a full working solution.

So here is the skeleton for making it work:


Start building a new updater through the wizard. Once you come to the "Update Method" screen, choose Custom;
On the "Custom Update Method" screen, select the "Run Multiple Installer/Patch Files (HTTP)" option;
Insert a new screen in the Server Screens list, name it "Update Required 2" or something similar, and include a screen with Radio Buttons in it;
Edit the new screen, leaving only two radiobuttons, one for each installation method (full / patch only) and move it to the top;
Now get editing the Server Script code.

I commented out the g_tableFiles initialization, which I do only when I know which kind of install was requested from the user. Have a look at the code. As I said, I haven't tested it, but looking at the concept, you should be able to understand and make it work correctly in your updater without too much trouble.

Ulrich

AppleBag
07-16-2008, 05:52 AM
Thanks! I will play with this!