Welcome! Log In Create A New Profile

Advanced

help to make an "Auto_Updater"

Posted by filfat 
help to make an "Auto_Updater"
July 18, 2013 11:29PM
Hello, iv working on a auto updater for my WiiCraft prohect but im kinda stuck. so to start of i need to know how to download files... shouldent be that hard right? and then i need to move the .dol... but how do i replace it with the running one?

summary:
Here is what i wanna know:
1. How to download files
2. How to move files
3. How to replace .dol files when they are running

Thanks --Filiph Sandström AKA filfat

"And As Always Have A Nice Day"


My Email: filfat@hotmail.se



Edited 1 time(s). Last edit at 07/18/2013 11:41PM by filfat.
Re: help to make an "Auto_Updater"
July 18, 2013 11:40PM
I don't have the answer to your questions however I'm pretty sure that when a .dol is running it is loaded into memory so you could delete/change a dol file while it's running.
Re: help to make an "Auto_Updater"
July 18, 2013 11:41PM
allright =)
Re: help to make an "Auto_Updater"
July 19, 2013 02:08AM
here is the HTTP Download Example by tek; [www.wiibrew.org]

here is the Netsend Example Source; [www.wiibrew.org]

both examples where found at the bottom of this page; [www.wiibrew.org]

both should work. I have an alternate version that I hacked together that I use for my asteroids game but you can try those first.

Basically what you do is download the file call it boot2.dol. delete the current boot.dol. then rename the downloaded boot2.dol file to boot.dol. then you tell the user to quit and re-launch the app again (which will be the new updated dol ). This seems to be how WiiMC does it.
Re: help to make an "Auto_Updater"
July 19, 2013 02:22AM
For other files you will either have to download them one at a time or download a zip file and then figure out how to unzip it. try a simple file first before attempting a whole directory.
Re: help to make an "Auto_Updater"
July 19, 2013 02:23AM
So how do i delete files and rename files? I havent worked eith files in C++ before :)
Re: help to make an "Auto_Updater"
July 19, 2013 02:30AM
search on the internet for; "delete files in c" or "file management in c" or "directory listing in c" or "rename file in c". try using; [duckduckgo.com]

Most of the file stuff on works the same on the wii as it does on a pc.

Also note that when you use wiiload call this function;

chdir("/apps/wiicraft/");

so that the current directory points to the right place.



Edited 1 time(s). Last edit at 07/19/2013 02:33AM by owen.
Re: help to make an "Auto_Updater"
July 19, 2013 10:15AM
The download exemple shows a txt file. Do you think it will work in the same way with a dol file?
Re: help to make an "Auto_Updater"
July 19, 2013 03:09PM
just test it and see what happens. it should work. though testing network stuff takes a lot of time.
Sorry, only registered users may post in this forum.

Click here to login