usbloadergx/source/network/update.cpp

386 lines
9.3 KiB
C++
Raw Permalink Normal View History

/***************************************************************************
2010-09-24 02:48:03 +02:00
* Copyright (C) 2009
* by Dimok
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any
* damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any
* purpose, including commercial applications, and to alter it and
* redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you
* must not claim that you wrote the original software. If you use
* this software in a product, an acknowledgment in the product
* documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and
* must not be misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source
* distribution.
*
* update.cpp
*
* Update operations
* for Wii-Xplorer 2009
***************************************************************************/
#include <stdio.h>
#include <string.h>
#include <ogcsys.h>
#include <string>
#include "gecko.h"
#include "ZipFile.h"
#include "http.h"
#include "networkops.h"
#include "HTML_Stream.h"
#include "FileDownloader.h"
#include "settings/CSettings.h"
#include "settings/GameTitles.h"
#include "language/gettext.h"
#include "language/UpdateLanguage.h"
#include "homebrewboot/BootHomebrew.h"
#include "utils/StringTools.h"
#include "utils/ShowError.h"
#include "prompts/PromptWindows.h"
#include "FileOperations/fileops.h"
#include "xml/GameTDB.hpp"
#include "wad/nandtitle.h"
#include "wad/wad.h"
#include "sys.h"
#include "svnrev.h"
static const char * GameTDB_URL = "http://www.gametdb.com/wiitdb.zip";
/****************************************************************************
* Checking if an Update is available
***************************************************************************/
int CheckForBetaUpdate()
{
int revnumber = 0;
HTML_Stream HTML("http://code.google.com/p/usbloader-gui/downloads/list");
const char * HTML_Pos = NULL;
do
{
HTML_Pos = HTML.FindStringEnd("href='");
char * tmpLink = HTML.CopyString("'\"");
if (tmpLink)
{
char *fileext = strrchr(tmpLink, '.');
if (fileext)
{
if (strcasecmp(fileext, ".dol") == 0)
{
char revtxt[80];
char *filename = strrchr(tmpLink, '/') + 2;
u8 n = 0;
for (n = 0; n < strlen(filename) - 2; n++)
revtxt[n] = filename[n];
revtxt[n] = 0;
int fileRev = atoi(revtxt);
if (fileRev > revnumber)
{
revnumber = fileRev;
}
}
}
free(tmpLink);
}
} while (HTML_Pos != NULL);
return revnumber;
}
static bool CheckNewGameTDBVersion(const char *url)
{
u64 Version = 0;
char * HEAD_Responde = HEAD_Request(url);
if(!HEAD_Responde)
return false;
char * version_ptr = strstr(HEAD_Responde, "X-GameTDB-Timestamp: ");
if(version_ptr)
{
version_ptr += strlen("X-GameTDB-Timestamp: ");
Version = strtoull(version_ptr, NULL, 10);
}
free(HEAD_Responde);
std::string Title;
std::string Filepath = Settings.titlestxt_path;
if(Settings.titlestxt_path[Filepath.size()-1] != '/')
Filepath += '/';
Filepath += "wiitdb.xml";
GameTDB XML_DB;
if(!XML_DB.OpenFile((Filepath.c_str())))
return true; //! If no file exists we need the file
u64 ExistingVersion = XML_DB.GetGameTDBVersion();
gprintf("Existing GameTDB Version: %llu Online GameTDB Version: %llu\n", ExistingVersion, Version);
return (ExistingVersion != Version);
}
int UpdateGameTDB()
{
if(CheckNewGameTDBVersion(GameTDB_URL) == false)
{
gprintf("Not updating GameTDB: Version is the same\n");
return -1;
}
gprintf("Updating GameTDB...\n");
string ZipPath = Settings.titlestxt_path;
if(Settings.titlestxt_path[ZipPath.size()-1] != '/')
ZipPath += '/';
ZipPath += "wiitdb.zip";
int filesize = DownloadFileToPath(GameTDB_URL, ZipPath.c_str(), false);
if(filesize <= 0)
return -1;
ZipFile zFile(ZipPath.c_str());
bool result = zFile.ExtractAll(Settings.titlestxt_path);
//! The zip file is not needed anymore so we can remove it
remove(ZipPath.c_str());
//! Reload all titles and reload cached titles because the file changed now.
GameTitles.SetDefault();
GameTitles.LoadTitlesFromGameTDB(Settings.titlestxt_path);
return (result ? filesize : -1);
}
static void UpdateIconPng()
{
char iconpath[200];
struct block file = downloadfile("http://svn.code.sf.net/p/usbloadergx/code/branches/updates/icon.png");
if (file.data != NULL)
{
snprintf(iconpath, sizeof(iconpath), "%sicon.png", Settings.update_path);
FILE * pfile = fopen(iconpath, "wb");
if(pfile)
{
fwrite(file.data, 1, file.size, pfile);
fclose(pfile);
}
free(file.data);
}
}
static void UpdateMetaXml()
{
char xmlpath[200];
struct block file = downloadfile("http://svn.code.sf.net/p/usbloadergx/code/branches/updates/meta.xml");
// if not working, use this url form: http://sourceforge.net/p/usbloadergx/code/1254/tree//branches/updates/meta.xml?format=raw
if (file.data != NULL)
{
snprintf(xmlpath, sizeof(xmlpath), "%smeta.xml", Settings.update_path);
FILE *pfile = fopen(xmlpath, "wb");
if(pfile)
{
fwrite(file.data, 1, file.size, pfile);
fclose(pfile);
}
free(file.data);
}
}
int CheckUpdate()
{
if (!IsNetworkInit())
return -1;
int revnumber = 0;
int currentrev = atoi(GetRev());
#ifdef FULLCHANNEL
struct block file = downloadfile( "http://svn.code.sf.net/p/usbloadergx/code/branches/updates/update_wad.txt" );
#else
struct block file = downloadfile("http://svn.code.sf.net/p/usbloadergx/code/branches/updates/update_dol.txt");
#endif
if (file.data != NULL)
{
revnumber = atoi((char *) file.data);
free(file.data);
}
if (revnumber > currentrev)
return revnumber;
return -1;
}
static int ApplicationDownload(void)
{
USB Loader GX v3.0: Released on 2012 05 12 ATTENTION: USB Loader GX Version 3.0 introduces a new auto-update mechanism which is not compatible with old versions. (The old host is offline) If you are still using an old version of USB Loader GX, you need to update manually. Download the latest version or use our easy installer for Windows available on our website. http://code.google.com/p/usbloader-gui/downloads/list You can also check how to install or update manually here: http://code.google.com/p/usbloader-gui/wiki/Installation We are sorry for the inconvenience. New: - Added a new Layout: Channel grid mode! Channel grid displays games as channels and plays banner animations like the real Wii System Menu. Channel grid mode and banner animation requires AHBPROT flags to load resource files directly from your Wii. If you use an old HBC you should use our latest forwarder or update the HBC otherwise you wont have that support. - Added Channel launching from Emulated NAND. (big thanks to TriiForce guys and Miigotu) - Added GameCube games launching from SD Card through Dios Mios Lite (DML). (thanks to G0dLiKe, crediar, all DML devs and FIX94) Check DML website here http://code.google.com/p/dios-mios-lite-source-project/ - Added direct install/uninstall of WAD files to the Emulated NAND Channel path in the features settings menu. - Added a new icon in the toolbar to select the origin of the titles: Wii games, Channels from Wii, Channels from EmuNand, GameCube games. - Added the possibility to boot USB Loader GX without an HDD connected (It will fall back to "Channel from Wii" title's origin). - Added an option to choose which Game Window mode to use between the old "Rotating Disc" or the new "Banner Animation". - Added the favorite level setting to the game settings since it is no longer displayed when using "Banner Animation" game window mode. - Added an option to adjust the screen size for overscan TVs (Use negative values to shrink the display). - Added display of game's size from Wii disc games on the game window prompt (Rotating disc mode only). - Added a button in the search window to switch between "Beginning" and "Content" search methods. - Added auto-complete function to the search window. - Added a new GUI numpad for entering numbers. - Added setting for tooltip delay time. - Added resize of widescreen screenshots to 768px width. - Added cover download for the currently inserted disc. - Added delete of full cover on art work uninstall and game uninstall. - Added a parental control option to block priiloader override on return to system menu. - Added a prompt asking for downloading new language files when trying to update and no language files exist yet. - Added translation parsing for rating descriptors and for genres from wiitdb.xml. Requires a one time update of wiitdb.xml for cache rebuild. - Added a new option to force reading the game's titles from disc header. - Added renaming of internal TitleID of all HBC versions to JODI for GameTDB to find it. - Added a cheat update button to re-download the cheat text file. - Added a cancel button to several progress bar windows: Game installation, NAND extraction, etc. - Added separate path and setting for Emulated NAND Saves and Emulated NAND Channels. - Added per game NAND emulation path setting. - Added Mii extractor and SYSCONF file extractor to Emulated NAND. It always overwrites old files. - Added automatic Mii extraction on save game extract if the Mii file does not exist yet on Emulated NAND. - Added keep of AHBPROT flag on IOS Reload. Homebrews booted now have AHBPROT. (thanks to davebaol) - Added a new feature to force aspect ratio on games/channels. (thanks to giantpune for help with disassembler) - Added Zelda Skyward Sword Alternative dol offset (PAL and NTSC-U) for automatic dol selection. - Added detection of enabled cheat codes from an already created .gct file. - Added support for 2 USB drives for d2x cIOS (Requires d2x v9+). Changes: - Removed buggy focus system completely and added support to control screen pointer with analog sticks from respective controllers if the wiimote is not pointing to the screen. Compatible with Nunchuk, Classic Controller and GameCube controller. A speed factor is available in the GUI settings. - Restructured game's settings for different types of games (Wii/GC/Channels). - Added auto position of progress window messages in vertical direction depending of how many are used at the same time. - If "Titles from GameTDB" is not enabled the title will be read from the folder name if possible or from the game disc header. Title caching can still be used and is recommended in that case. - Settings title, keyboard text and key color can be changed by themes now. - Added optional background image for list/carousel/grid layouts (unused by default theme). - Use of old built-in font for credits window because it doesn't look good with the system menu one. - Removed the need of a cIOS to launch the loader (if anyone uses it with IOS58 for whatever reason). - Improved detection of game partition when starting the loader without configs (fresh start). - Isfs is now initiated once and deinitiated when cleaning up only, instead of the whole init/deinit every single access. - Updated file system libraries. - Removed pngu which is not needed, changed screenshot function to use libgd instead - added init of network into background thread so it is cancelable and has a timeout - changed wifi gecko to UDP socket - Converted all ogg sounds from 44.1 khz to 48 khz. - Optimized use of memory: Sizes over 30kb go to mem2 now first till it runs out ; Avoid use of mem2 area used on IOS_Reload (first 2 mb) ; Change font character texture to I4 which uses half as much memory (less cache memory). - Changed update function to get the files from googlecode website, since old update host website isn't accessible anymore. Fixes: - Fixed small scrollbar bug when having only 1 item. - Fixed reloading of cover image on game list when only 1 item is left after a change (e.g. filtering). - Improved calculation of progress speed. Now it is always the last 15 secs average instead of overall progress speed. - Fixed "new" game showing even with a parental control setting. - Fixed removing of unused cached titles on wiitdb load. - Fixed ocarina codes when using more than 255 codes (brawl+) (untested). - Fixed bug where entering "-1" (Use global) for cIOS was not possible in game settings. - Fixed playback of some BNS banner sounds. - Fixed reloading into another IOS before launch of game. - Removed buggy lz77 implementation and use the one known working. - Fixed launching of dollz compressed dol files. (thanks FIX94) - Fixed reading game's titles from disc header on fat32/ntfs/ext. - Fixed crash on missing <app> tag on meta.xml files. - Forwarder: Fixed crash on drives with physical sector size > 512 bytes. - Forwarder: Fixed endless waiting for slow HDD. (thanks to FIX94) - Forwarder: Added missing ext2 unmount. (thanks to FIX94) - Supports new WiiMotion+ controllers by using latest libraries. - Lots of string handling improvements (thanks to gerbilsoft for his patch) New Channel Grid Mode specific features: - New settings section for all banner's settings. - Use of BNR (banner animation) cache setting to load banners and icon's animation faster. (Enabled by default. Takes ~35MB/100 Banners) Wii games/Channels also accept ID3.bnr for custom-made multi-region banners. - BNR cache path setting. - Pulsing "new" icon on banner grid layout for new games. - Centering and size setting for banner's animation resources. - Channel's zooming speed setting. - Page's scrolling speed setting. New GameCube specific features: - Supports Dios Mios Lite (DML) v1.2+ - Uses of a custom banner for GameCube games which loads the game's internal opening.bnr informations (big thanks to diddy from the wiithemeteam for creating the brlyt/brlan for the banner). - DML settings editable from the loader (global and per game settings). - Supported formats for gamecubes are ISO/GCM and GCRegEx. - Custom game paths. The following paths are accepted: 1. configpath/ID6/ 2. configpath/ID6_Title/ 3. configpath/Title [ID6]/ 4. configpath/gamepath/ (slow loading speed) Accepted game's filenames: title.iso, title.gcm, GAMEID6.iso, GAMEID6.gcm - DML cheats now work the same way as for other Wii games, gct goes to "GCT Cheatcode Path" as GAMEID.gct - GameCube games copy from USB to SD on demand with choice menu to delete SD games to make space, If you want to use this feature then set the "Main GC path" to USB and the "SD GameCube path" to SD card. If duplicated games are detected on SD and USB, the games on SD will be prioritized. - Added GameCube disc dump functionality with multi-disc menu game selection, compress and align support (thanks to FIX94 and Overjoy for their disc dump sources on which this is based). - Use of the BNR cache path to load ID6.bnr or ID3.bnr if available for custom-made banners. (Loading only) - Video mode option to force interlace mode on GameCube. - Fixed force prog mode on DML 1.4
2012-05-12 11:10:37 +02:00
std::string DownloadURL;
int newrev = 0;
int currentrev = atoi(GetRev());
#ifdef FULLCHANNEL
struct block file = downloadfile( "http://svn.code.sf.net/p/usbloadergx/code/branches/updates/update_wad.txt" );
#else
struct block file = downloadfile("http://svn.code.sf.net/p/usbloadergx/code/branches/updates/update_dol.txt");
#endif
USB Loader GX v3.0: Released on 2012 05 12 ATTENTION: USB Loader GX Version 3.0 introduces a new auto-update mechanism which is not compatible with old versions. (The old host is offline) If you are still using an old version of USB Loader GX, you need to update manually. Download the latest version or use our easy installer for Windows available on our website. http://code.google.com/p/usbloader-gui/downloads/list You can also check how to install or update manually here: http://code.google.com/p/usbloader-gui/wiki/Installation We are sorry for the inconvenience. New: - Added a new Layout: Channel grid mode! Channel grid displays games as channels and plays banner animations like the real Wii System Menu. Channel grid mode and banner animation requires AHBPROT flags to load resource files directly from your Wii. If you use an old HBC you should use our latest forwarder or update the HBC otherwise you wont have that support. - Added Channel launching from Emulated NAND. (big thanks to TriiForce guys and Miigotu) - Added GameCube games launching from SD Card through Dios Mios Lite (DML). (thanks to G0dLiKe, crediar, all DML devs and FIX94) Check DML website here http://code.google.com/p/dios-mios-lite-source-project/ - Added direct install/uninstall of WAD files to the Emulated NAND Channel path in the features settings menu. - Added a new icon in the toolbar to select the origin of the titles: Wii games, Channels from Wii, Channels from EmuNand, GameCube games. - Added the possibility to boot USB Loader GX without an HDD connected (It will fall back to "Channel from Wii" title's origin). - Added an option to choose which Game Window mode to use between the old "Rotating Disc" or the new "Banner Animation". - Added the favorite level setting to the game settings since it is no longer displayed when using "Banner Animation" game window mode. - Added an option to adjust the screen size for overscan TVs (Use negative values to shrink the display). - Added display of game's size from Wii disc games on the game window prompt (Rotating disc mode only). - Added a button in the search window to switch between "Beginning" and "Content" search methods. - Added auto-complete function to the search window. - Added a new GUI numpad for entering numbers. - Added setting for tooltip delay time. - Added resize of widescreen screenshots to 768px width. - Added cover download for the currently inserted disc. - Added delete of full cover on art work uninstall and game uninstall. - Added a parental control option to block priiloader override on return to system menu. - Added a prompt asking for downloading new language files when trying to update and no language files exist yet. - Added translation parsing for rating descriptors and for genres from wiitdb.xml. Requires a one time update of wiitdb.xml for cache rebuild. - Added a new option to force reading the game's titles from disc header. - Added renaming of internal TitleID of all HBC versions to JODI for GameTDB to find it. - Added a cheat update button to re-download the cheat text file. - Added a cancel button to several progress bar windows: Game installation, NAND extraction, etc. - Added separate path and setting for Emulated NAND Saves and Emulated NAND Channels. - Added per game NAND emulation path setting. - Added Mii extractor and SYSCONF file extractor to Emulated NAND. It always overwrites old files. - Added automatic Mii extraction on save game extract if the Mii file does not exist yet on Emulated NAND. - Added keep of AHBPROT flag on IOS Reload. Homebrews booted now have AHBPROT. (thanks to davebaol) - Added a new feature to force aspect ratio on games/channels. (thanks to giantpune for help with disassembler) - Added Zelda Skyward Sword Alternative dol offset (PAL and NTSC-U) for automatic dol selection. - Added detection of enabled cheat codes from an already created .gct file. - Added support for 2 USB drives for d2x cIOS (Requires d2x v9+). Changes: - Removed buggy focus system completely and added support to control screen pointer with analog sticks from respective controllers if the wiimote is not pointing to the screen. Compatible with Nunchuk, Classic Controller and GameCube controller. A speed factor is available in the GUI settings. - Restructured game's settings for different types of games (Wii/GC/Channels). - Added auto position of progress window messages in vertical direction depending of how many are used at the same time. - If "Titles from GameTDB" is not enabled the title will be read from the folder name if possible or from the game disc header. Title caching can still be used and is recommended in that case. - Settings title, keyboard text and key color can be changed by themes now. - Added optional background image for list/carousel/grid layouts (unused by default theme). - Use of old built-in font for credits window because it doesn't look good with the system menu one. - Removed the need of a cIOS to launch the loader (if anyone uses it with IOS58 for whatever reason). - Improved detection of game partition when starting the loader without configs (fresh start). - Isfs is now initiated once and deinitiated when cleaning up only, instead of the whole init/deinit every single access. - Updated file system libraries. - Removed pngu which is not needed, changed screenshot function to use libgd instead - added init of network into background thread so it is cancelable and has a timeout - changed wifi gecko to UDP socket - Converted all ogg sounds from 44.1 khz to 48 khz. - Optimized use of memory: Sizes over 30kb go to mem2 now first till it runs out ; Avoid use of mem2 area used on IOS_Reload (first 2 mb) ; Change font character texture to I4 which uses half as much memory (less cache memory). - Changed update function to get the files from googlecode website, since old update host website isn't accessible anymore. Fixes: - Fixed small scrollbar bug when having only 1 item. - Fixed reloading of cover image on game list when only 1 item is left after a change (e.g. filtering). - Improved calculation of progress speed. Now it is always the last 15 secs average instead of overall progress speed. - Fixed "new" game showing even with a parental control setting. - Fixed removing of unused cached titles on wiitdb load. - Fixed ocarina codes when using more than 255 codes (brawl+) (untested). - Fixed bug where entering "-1" (Use global) for cIOS was not possible in game settings. - Fixed playback of some BNS banner sounds. - Fixed reloading into another IOS before launch of game. - Removed buggy lz77 implementation and use the one known working. - Fixed launching of dollz compressed dol files. (thanks FIX94) - Fixed reading game's titles from disc header on fat32/ntfs/ext. - Fixed crash on missing <app> tag on meta.xml files. - Forwarder: Fixed crash on drives with physical sector size > 512 bytes. - Forwarder: Fixed endless waiting for slow HDD. (thanks to FIX94) - Forwarder: Added missing ext2 unmount. (thanks to FIX94) - Supports new WiiMotion+ controllers by using latest libraries. - Lots of string handling improvements (thanks to gerbilsoft for his patch) New Channel Grid Mode specific features: - New settings section for all banner's settings. - Use of BNR (banner animation) cache setting to load banners and icon's animation faster. (Enabled by default. Takes ~35MB/100 Banners) Wii games/Channels also accept ID3.bnr for custom-made multi-region banners. - BNR cache path setting. - Pulsing "new" icon on banner grid layout for new games. - Centering and size setting for banner's animation resources. - Channel's zooming speed setting. - Page's scrolling speed setting. New GameCube specific features: - Supports Dios Mios Lite (DML) v1.2+ - Uses of a custom banner for GameCube games which loads the game's internal opening.bnr informations (big thanks to diddy from the wiithemeteam for creating the brlyt/brlan for the banner). - DML settings editable from the loader (global and per game settings). - Supported formats for gamecubes are ISO/GCM and GCRegEx. - Custom game paths. The following paths are accepted: 1. configpath/ID6/ 2. configpath/ID6_Title/ 3. configpath/Title [ID6]/ 4. configpath/gamepath/ (slow loading speed) Accepted game's filenames: title.iso, title.gcm, GAMEID6.iso, GAMEID6.gcm - DML cheats now work the same way as for other Wii games, gct goes to "GCT Cheatcode Path" as GAMEID.gct - GameCube games copy from USB to SD on demand with choice menu to delete SD games to make space, If you want to use this feature then set the "Main GC path" to USB and the "SD GameCube path" to SD card. If duplicated games are detected on SD and USB, the games on SD will be prioritized. - Added GameCube disc dump functionality with multi-disc menu game selection, compress and align support (thanks to FIX94 and Overjoy for their disc dump sources on which this is based). - Use of the BNR cache path to load ID6.bnr or ID3.bnr if available for custom-made banners. (Loading only) - Video mode option to force interlace mode on GameCube. - Fixed force prog mode on DML 1.4
2012-05-12 11:10:37 +02:00
if (file.data != NULL)
{
// first line of the text file is the revisionc
newrev = atoi((char *) file.data);
// 2nd line of the text file is the url
char *ptr = strchr((char *)file.data, '\n');
while(ptr && (*ptr == '\r' || *ptr == '\n' || *ptr == ' '))
ptr++;
while(ptr && *ptr != '\0' && *ptr != '\r' && *ptr != '\n')
{
DownloadURL.push_back(*ptr);
ptr++;
}
free(file.data);
}
if (newrev <= currentrev)
{
WindowPrompt(tr( "No new updates." ), 0, tr( "OK" ));
return 0;
}
bool update_error = false;
char tmppath[250];
#ifdef FULLCHANNEL
snprintf(tmppath, sizeof(tmppath), "%s/ULNR.wad", Settings.BootDevice);
#else
char realpath[250];
snprintf(realpath, sizeof(realpath), "%sboot.dol", Settings.update_path);
snprintf(tmppath, sizeof(tmppath), "%sboot.tmp", Settings.update_path);
#endif
int update_choice = WindowPrompt(fmt("Rev%i %s.", newrev, tr( "available" )), tr( "How do you want to update?" ), tr( "Update DOL" ), tr( "Update All" ), tr( "Cancel" ));
if (update_choice == 0)
return 0;
USB Loader GX v3.0: Released on 2012 05 12 ATTENTION: USB Loader GX Version 3.0 introduces a new auto-update mechanism which is not compatible with old versions. (The old host is offline) If you are still using an old version of USB Loader GX, you need to update manually. Download the latest version or use our easy installer for Windows available on our website. http://code.google.com/p/usbloader-gui/downloads/list You can also check how to install or update manually here: http://code.google.com/p/usbloader-gui/wiki/Installation We are sorry for the inconvenience. New: - Added a new Layout: Channel grid mode! Channel grid displays games as channels and plays banner animations like the real Wii System Menu. Channel grid mode and banner animation requires AHBPROT flags to load resource files directly from your Wii. If you use an old HBC you should use our latest forwarder or update the HBC otherwise you wont have that support. - Added Channel launching from Emulated NAND. (big thanks to TriiForce guys and Miigotu) - Added GameCube games launching from SD Card through Dios Mios Lite (DML). (thanks to G0dLiKe, crediar, all DML devs and FIX94) Check DML website here http://code.google.com/p/dios-mios-lite-source-project/ - Added direct install/uninstall of WAD files to the Emulated NAND Channel path in the features settings menu. - Added a new icon in the toolbar to select the origin of the titles: Wii games, Channels from Wii, Channels from EmuNand, GameCube games. - Added the possibility to boot USB Loader GX without an HDD connected (It will fall back to "Channel from Wii" title's origin). - Added an option to choose which Game Window mode to use between the old "Rotating Disc" or the new "Banner Animation". - Added the favorite level setting to the game settings since it is no longer displayed when using "Banner Animation" game window mode. - Added an option to adjust the screen size for overscan TVs (Use negative values to shrink the display). - Added display of game's size from Wii disc games on the game window prompt (Rotating disc mode only). - Added a button in the search window to switch between "Beginning" and "Content" search methods. - Added auto-complete function to the search window. - Added a new GUI numpad for entering numbers. - Added setting for tooltip delay time. - Added resize of widescreen screenshots to 768px width. - Added cover download for the currently inserted disc. - Added delete of full cover on art work uninstall and game uninstall. - Added a parental control option to block priiloader override on return to system menu. - Added a prompt asking for downloading new language files when trying to update and no language files exist yet. - Added translation parsing for rating descriptors and for genres from wiitdb.xml. Requires a one time update of wiitdb.xml for cache rebuild. - Added a new option to force reading the game's titles from disc header. - Added renaming of internal TitleID of all HBC versions to JODI for GameTDB to find it. - Added a cheat update button to re-download the cheat text file. - Added a cancel button to several progress bar windows: Game installation, NAND extraction, etc. - Added separate path and setting for Emulated NAND Saves and Emulated NAND Channels. - Added per game NAND emulation path setting. - Added Mii extractor and SYSCONF file extractor to Emulated NAND. It always overwrites old files. - Added automatic Mii extraction on save game extract if the Mii file does not exist yet on Emulated NAND. - Added keep of AHBPROT flag on IOS Reload. Homebrews booted now have AHBPROT. (thanks to davebaol) - Added a new feature to force aspect ratio on games/channels. (thanks to giantpune for help with disassembler) - Added Zelda Skyward Sword Alternative dol offset (PAL and NTSC-U) for automatic dol selection. - Added detection of enabled cheat codes from an already created .gct file. - Added support for 2 USB drives for d2x cIOS (Requires d2x v9+). Changes: - Removed buggy focus system completely and added support to control screen pointer with analog sticks from respective controllers if the wiimote is not pointing to the screen. Compatible with Nunchuk, Classic Controller and GameCube controller. A speed factor is available in the GUI settings. - Restructured game's settings for different types of games (Wii/GC/Channels). - Added auto position of progress window messages in vertical direction depending of how many are used at the same time. - If "Titles from GameTDB" is not enabled the title will be read from the folder name if possible or from the game disc header. Title caching can still be used and is recommended in that case. - Settings title, keyboard text and key color can be changed by themes now. - Added optional background image for list/carousel/grid layouts (unused by default theme). - Use of old built-in font for credits window because it doesn't look good with the system menu one. - Removed the need of a cIOS to launch the loader (if anyone uses it with IOS58 for whatever reason). - Improved detection of game partition when starting the loader without configs (fresh start). - Isfs is now initiated once and deinitiated when cleaning up only, instead of the whole init/deinit every single access. - Updated file system libraries. - Removed pngu which is not needed, changed screenshot function to use libgd instead - added init of network into background thread so it is cancelable and has a timeout - changed wifi gecko to UDP socket - Converted all ogg sounds from 44.1 khz to 48 khz. - Optimized use of memory: Sizes over 30kb go to mem2 now first till it runs out ; Avoid use of mem2 area used on IOS_Reload (first 2 mb) ; Change font character texture to I4 which uses half as much memory (less cache memory). - Changed update function to get the files from googlecode website, since old update host website isn't accessible anymore. Fixes: - Fixed small scrollbar bug when having only 1 item. - Fixed reloading of cover image on game list when only 1 item is left after a change (e.g. filtering). - Improved calculation of progress speed. Now it is always the last 15 secs average instead of overall progress speed. - Fixed "new" game showing even with a parental control setting. - Fixed removing of unused cached titles on wiitdb load. - Fixed ocarina codes when using more than 255 codes (brawl+) (untested). - Fixed bug where entering "-1" (Use global) for cIOS was not possible in game settings. - Fixed playback of some BNS banner sounds. - Fixed reloading into another IOS before launch of game. - Removed buggy lz77 implementation and use the one known working. - Fixed launching of dollz compressed dol files. (thanks FIX94) - Fixed reading game's titles from disc header on fat32/ntfs/ext. - Fixed crash on missing <app> tag on meta.xml files. - Forwarder: Fixed crash on drives with physical sector size > 512 bytes. - Forwarder: Fixed endless waiting for slow HDD. (thanks to FIX94) - Forwarder: Added missing ext2 unmount. (thanks to FIX94) - Supports new WiiMotion+ controllers by using latest libraries. - Lots of string handling improvements (thanks to gerbilsoft for his patch) New Channel Grid Mode specific features: - New settings section for all banner's settings. - Use of BNR (banner animation) cache setting to load banners and icon's animation faster. (Enabled by default. Takes ~35MB/100 Banners) Wii games/Channels also accept ID3.bnr for custom-made multi-region banners. - BNR cache path setting. - Pulsing "new" icon on banner grid layout for new games. - Centering and size setting for banner's animation resources. - Channel's zooming speed setting. - Page's scrolling speed setting. New GameCube specific features: - Supports Dios Mios Lite (DML) v1.2+ - Uses of a custom banner for GameCube games which loads the game's internal opening.bnr informations (big thanks to diddy from the wiithemeteam for creating the brlyt/brlan for the banner). - DML settings editable from the loader (global and per game settings). - Supported formats for gamecubes are ISO/GCM and GCRegEx. - Custom game paths. The following paths are accepted: 1. configpath/ID6/ 2. configpath/ID6_Title/ 3. configpath/Title [ID6]/ 4. configpath/gamepath/ (slow loading speed) Accepted game's filenames: title.iso, title.gcm, GAMEID6.iso, GAMEID6.gcm - DML cheats now work the same way as for other Wii games, gct goes to "GCT Cheatcode Path" as GAMEID.gct - GameCube games copy from USB to SD on demand with choice menu to delete SD games to make space, If you want to use this feature then set the "Main GC path" to USB and the "SD GameCube path" to SD card. If duplicated games are detected on SD and USB, the games on SD will be prioritized. - Added GameCube disc dump functionality with multi-disc menu game selection, compress and align support (thanks to FIX94 and Overjoy for their disc dump sources on which this is based). - Use of the BNR cache path to load ID6.bnr or ID3.bnr if available for custom-made banners. (Loading only) - Video mode option to force interlace mode on GameCube. - Fixed force prog mode on DML 1.4
2012-05-12 11:10:37 +02:00
int ret = DownloadFileToPath(DownloadURL.c_str(), tmppath, false);
if(ret < 1024*1024)
{
remove(tmppath);
WindowPrompt(tr("Failed updating"), tr("Error while downloding file"), tr( "OK" ));
if(update_choice == 1)
return -1;
update_error = true;
}
else
{
#ifdef FULLCHANNEL
FILE * wadFile = fopen(tmppath, "rb");
if(!wadFile)
{
update_error = true;
WindowPrompt(tr("Failed updating"), tr("Error opening downloaded file"), tr( "OK" ));
return -1;
}
int error = Wad_Install( wadFile );
if(error)
{
update_error = true;
ShowError(tr( "The wad installation failed with error %i" ), error);
}
else
WindowPrompt(tr( "Success" ), tr( "The wad file was installed" ), tr( "OK" ));
RemoveFile(tmppath);
#else
gprintf("%s\n%s\n", realpath, tmppath);
RemoveFile(realpath);
if(!RenameFile(tmppath, realpath))
update_error = true;
#endif
}
if (update_choice == 2)
{
UpdateIconPng();
UpdateMetaXml();
UpdateGameTDB();
DownloadAllLanguageFiles(newrev);
}
if(update_error)
{
ShowError(tr( "Error while updating USB Loader GX." ));
return -1;
}
if (update_choice > 0)
{
USB Loader GX v3.0: Released on 2012 05 12 ATTENTION: USB Loader GX Version 3.0 introduces a new auto-update mechanism which is not compatible with old versions. (The old host is offline) If you are still using an old version of USB Loader GX, you need to update manually. Download the latest version or use our easy installer for Windows available on our website. http://code.google.com/p/usbloader-gui/downloads/list You can also check how to install or update manually here: http://code.google.com/p/usbloader-gui/wiki/Installation We are sorry for the inconvenience. New: - Added a new Layout: Channel grid mode! Channel grid displays games as channels and plays banner animations like the real Wii System Menu. Channel grid mode and banner animation requires AHBPROT flags to load resource files directly from your Wii. If you use an old HBC you should use our latest forwarder or update the HBC otherwise you wont have that support. - Added Channel launching from Emulated NAND. (big thanks to TriiForce guys and Miigotu) - Added GameCube games launching from SD Card through Dios Mios Lite (DML). (thanks to G0dLiKe, crediar, all DML devs and FIX94) Check DML website here http://code.google.com/p/dios-mios-lite-source-project/ - Added direct install/uninstall of WAD files to the Emulated NAND Channel path in the features settings menu. - Added a new icon in the toolbar to select the origin of the titles: Wii games, Channels from Wii, Channels from EmuNand, GameCube games. - Added the possibility to boot USB Loader GX without an HDD connected (It will fall back to "Channel from Wii" title's origin). - Added an option to choose which Game Window mode to use between the old "Rotating Disc" or the new "Banner Animation". - Added the favorite level setting to the game settings since it is no longer displayed when using "Banner Animation" game window mode. - Added an option to adjust the screen size for overscan TVs (Use negative values to shrink the display). - Added display of game's size from Wii disc games on the game window prompt (Rotating disc mode only). - Added a button in the search window to switch between "Beginning" and "Content" search methods. - Added auto-complete function to the search window. - Added a new GUI numpad for entering numbers. - Added setting for tooltip delay time. - Added resize of widescreen screenshots to 768px width. - Added cover download for the currently inserted disc. - Added delete of full cover on art work uninstall and game uninstall. - Added a parental control option to block priiloader override on return to system menu. - Added a prompt asking for downloading new language files when trying to update and no language files exist yet. - Added translation parsing for rating descriptors and for genres from wiitdb.xml. Requires a one time update of wiitdb.xml for cache rebuild. - Added a new option to force reading the game's titles from disc header. - Added renaming of internal TitleID of all HBC versions to JODI for GameTDB to find it. - Added a cheat update button to re-download the cheat text file. - Added a cancel button to several progress bar windows: Game installation, NAND extraction, etc. - Added separate path and setting for Emulated NAND Saves and Emulated NAND Channels. - Added per game NAND emulation path setting. - Added Mii extractor and SYSCONF file extractor to Emulated NAND. It always overwrites old files. - Added automatic Mii extraction on save game extract if the Mii file does not exist yet on Emulated NAND. - Added keep of AHBPROT flag on IOS Reload. Homebrews booted now have AHBPROT. (thanks to davebaol) - Added a new feature to force aspect ratio on games/channels. (thanks to giantpune for help with disassembler) - Added Zelda Skyward Sword Alternative dol offset (PAL and NTSC-U) for automatic dol selection. - Added detection of enabled cheat codes from an already created .gct file. - Added support for 2 USB drives for d2x cIOS (Requires d2x v9+). Changes: - Removed buggy focus system completely and added support to control screen pointer with analog sticks from respective controllers if the wiimote is not pointing to the screen. Compatible with Nunchuk, Classic Controller and GameCube controller. A speed factor is available in the GUI settings. - Restructured game's settings for different types of games (Wii/GC/Channels). - Added auto position of progress window messages in vertical direction depending of how many are used at the same time. - If "Titles from GameTDB" is not enabled the title will be read from the folder name if possible or from the game disc header. Title caching can still be used and is recommended in that case. - Settings title, keyboard text and key color can be changed by themes now. - Added optional background image for list/carousel/grid layouts (unused by default theme). - Use of old built-in font for credits window because it doesn't look good with the system menu one. - Removed the need of a cIOS to launch the loader (if anyone uses it with IOS58 for whatever reason). - Improved detection of game partition when starting the loader without configs (fresh start). - Isfs is now initiated once and deinitiated when cleaning up only, instead of the whole init/deinit every single access. - Updated file system libraries. - Removed pngu which is not needed, changed screenshot function to use libgd instead - added init of network into background thread so it is cancelable and has a timeout - changed wifi gecko to UDP socket - Converted all ogg sounds from 44.1 khz to 48 khz. - Optimized use of memory: Sizes over 30kb go to mem2 now first till it runs out ; Avoid use of mem2 area used on IOS_Reload (first 2 mb) ; Change font character texture to I4 which uses half as much memory (less cache memory). - Changed update function to get the files from googlecode website, since old update host website isn't accessible anymore. Fixes: - Fixed small scrollbar bug when having only 1 item. - Fixed reloading of cover image on game list when only 1 item is left after a change (e.g. filtering). - Improved calculation of progress speed. Now it is always the last 15 secs average instead of overall progress speed. - Fixed "new" game showing even with a parental control setting. - Fixed removing of unused cached titles on wiitdb load. - Fixed ocarina codes when using more than 255 codes (brawl+) (untested). - Fixed bug where entering "-1" (Use global) for cIOS was not possible in game settings. - Fixed playback of some BNS banner sounds. - Fixed reloading into another IOS before launch of game. - Removed buggy lz77 implementation and use the one known working. - Fixed launching of dollz compressed dol files. (thanks FIX94) - Fixed reading game's titles from disc header on fat32/ntfs/ext. - Fixed crash on missing <app> tag on meta.xml files. - Forwarder: Fixed crash on drives with physical sector size > 512 bytes. - Forwarder: Fixed endless waiting for slow HDD. (thanks to FIX94) - Forwarder: Added missing ext2 unmount. (thanks to FIX94) - Supports new WiiMotion+ controllers by using latest libraries. - Lots of string handling improvements (thanks to gerbilsoft for his patch) New Channel Grid Mode specific features: - New settings section for all banner's settings. - Use of BNR (banner animation) cache setting to load banners and icon's animation faster. (Enabled by default. Takes ~35MB/100 Banners) Wii games/Channels also accept ID3.bnr for custom-made multi-region banners. - BNR cache path setting. - Pulsing "new" icon on banner grid layout for new games. - Centering and size setting for banner's animation resources. - Channel's zooming speed setting. - Page's scrolling speed setting. New GameCube specific features: - Supports Dios Mios Lite (DML) v1.2+ - Uses of a custom banner for GameCube games which loads the game's internal opening.bnr informations (big thanks to diddy from the wiithemeteam for creating the brlyt/brlan for the banner). - DML settings editable from the loader (global and per game settings). - Supported formats for gamecubes are ISO/GCM and GCRegEx. - Custom game paths. The following paths are accepted: 1. configpath/ID6/ 2. configpath/ID6_Title/ 3. configpath/Title [ID6]/ 4. configpath/gamepath/ (slow loading speed) Accepted game's filenames: title.iso, title.gcm, GAMEID6.iso, GAMEID6.gcm - DML cheats now work the same way as for other Wii games, gct goes to "GCT Cheatcode Path" as GAMEID.gct - GameCube games copy from USB to SD on demand with choice menu to delete SD games to make space, If you want to use this feature then set the "Main GC path" to USB and the "SD GameCube path" to SD card. If duplicated games are detected on SD and USB, the games on SD will be prioritized. - Added GameCube disc dump functionality with multi-disc menu game selection, compress and align support (thanks to FIX94 and Overjoy for their disc dump sources on which this is based). - Use of the BNR cache path to load ID6.bnr or ID3.bnr if available for custom-made banners. (Loading only) - Video mode option to force interlace mode on GameCube. - Fixed force prog mode on DML 1.4
2012-05-12 11:10:37 +02:00
WindowPrompt(tr( "Successfully updated." ), tr( "Restarting..." ), 0, 0, 0, 0, 150);
RebootApp();
}
return 0;
}
int UpdateApp()
{
if (!IsNetworkInit() && !NetworkInitPrompt())
{
WindowPrompt(tr("Error:"), tr("Could not initialize network!"), tr("OK"));
return -1;
}
if (!CreateSubfolder(Settings.update_path))
{
WindowPrompt(tr("Error:"), tr("Can't create directory"), tr("OK"));
return -1;
}
int choice = WindowPrompt(tr( "What do you want to update?" ), 0, "USB Loader GX", tr( "WiiTDB.xml" ), tr( "Language Files" ), tr( "Cancel" ));
if(choice == 0)
return 0;
if(choice == 1)
USB Loader GX v3.0: Released on 2012 05 12 ATTENTION: USB Loader GX Version 3.0 introduces a new auto-update mechanism which is not compatible with old versions. (The old host is offline) If you are still using an old version of USB Loader GX, you need to update manually. Download the latest version or use our easy installer for Windows available on our website. http://code.google.com/p/usbloader-gui/downloads/list You can also check how to install or update manually here: http://code.google.com/p/usbloader-gui/wiki/Installation We are sorry for the inconvenience. New: - Added a new Layout: Channel grid mode! Channel grid displays games as channels and plays banner animations like the real Wii System Menu. Channel grid mode and banner animation requires AHBPROT flags to load resource files directly from your Wii. If you use an old HBC you should use our latest forwarder or update the HBC otherwise you wont have that support. - Added Channel launching from Emulated NAND. (big thanks to TriiForce guys and Miigotu) - Added GameCube games launching from SD Card through Dios Mios Lite (DML). (thanks to G0dLiKe, crediar, all DML devs and FIX94) Check DML website here http://code.google.com/p/dios-mios-lite-source-project/ - Added direct install/uninstall of WAD files to the Emulated NAND Channel path in the features settings menu. - Added a new icon in the toolbar to select the origin of the titles: Wii games, Channels from Wii, Channels from EmuNand, GameCube games. - Added the possibility to boot USB Loader GX without an HDD connected (It will fall back to "Channel from Wii" title's origin). - Added an option to choose which Game Window mode to use between the old "Rotating Disc" or the new "Banner Animation". - Added the favorite level setting to the game settings since it is no longer displayed when using "Banner Animation" game window mode. - Added an option to adjust the screen size for overscan TVs (Use negative values to shrink the display). - Added display of game's size from Wii disc games on the game window prompt (Rotating disc mode only). - Added a button in the search window to switch between "Beginning" and "Content" search methods. - Added auto-complete function to the search window. - Added a new GUI numpad for entering numbers. - Added setting for tooltip delay time. - Added resize of widescreen screenshots to 768px width. - Added cover download for the currently inserted disc. - Added delete of full cover on art work uninstall and game uninstall. - Added a parental control option to block priiloader override on return to system menu. - Added a prompt asking for downloading new language files when trying to update and no language files exist yet. - Added translation parsing for rating descriptors and for genres from wiitdb.xml. Requires a one time update of wiitdb.xml for cache rebuild. - Added a new option to force reading the game's titles from disc header. - Added renaming of internal TitleID of all HBC versions to JODI for GameTDB to find it. - Added a cheat update button to re-download the cheat text file. - Added a cancel button to several progress bar windows: Game installation, NAND extraction, etc. - Added separate path and setting for Emulated NAND Saves and Emulated NAND Channels. - Added per game NAND emulation path setting. - Added Mii extractor and SYSCONF file extractor to Emulated NAND. It always overwrites old files. - Added automatic Mii extraction on save game extract if the Mii file does not exist yet on Emulated NAND. - Added keep of AHBPROT flag on IOS Reload. Homebrews booted now have AHBPROT. (thanks to davebaol) - Added a new feature to force aspect ratio on games/channels. (thanks to giantpune for help with disassembler) - Added Zelda Skyward Sword Alternative dol offset (PAL and NTSC-U) for automatic dol selection. - Added detection of enabled cheat codes from an already created .gct file. - Added support for 2 USB drives for d2x cIOS (Requires d2x v9+). Changes: - Removed buggy focus system completely and added support to control screen pointer with analog sticks from respective controllers if the wiimote is not pointing to the screen. Compatible with Nunchuk, Classic Controller and GameCube controller. A speed factor is available in the GUI settings. - Restructured game's settings for different types of games (Wii/GC/Channels). - Added auto position of progress window messages in vertical direction depending of how many are used at the same time. - If "Titles from GameTDB" is not enabled the title will be read from the folder name if possible or from the game disc header. Title caching can still be used and is recommended in that case. - Settings title, keyboard text and key color can be changed by themes now. - Added optional background image for list/carousel/grid layouts (unused by default theme). - Use of old built-in font for credits window because it doesn't look good with the system menu one. - Removed the need of a cIOS to launch the loader (if anyone uses it with IOS58 for whatever reason). - Improved detection of game partition when starting the loader without configs (fresh start). - Isfs is now initiated once and deinitiated when cleaning up only, instead of the whole init/deinit every single access. - Updated file system libraries. - Removed pngu which is not needed, changed screenshot function to use libgd instead - added init of network into background thread so it is cancelable and has a timeout - changed wifi gecko to UDP socket - Converted all ogg sounds from 44.1 khz to 48 khz. - Optimized use of memory: Sizes over 30kb go to mem2 now first till it runs out ; Avoid use of mem2 area used on IOS_Reload (first 2 mb) ; Change font character texture to I4 which uses half as much memory (less cache memory). - Changed update function to get the files from googlecode website, since old update host website isn't accessible anymore. Fixes: - Fixed small scrollbar bug when having only 1 item. - Fixed reloading of cover image on game list when only 1 item is left after a change (e.g. filtering). - Improved calculation of progress speed. Now it is always the last 15 secs average instead of overall progress speed. - Fixed "new" game showing even with a parental control setting. - Fixed removing of unused cached titles on wiitdb load. - Fixed ocarina codes when using more than 255 codes (brawl+) (untested). - Fixed bug where entering "-1" (Use global) for cIOS was not possible in game settings. - Fixed playback of some BNS banner sounds. - Fixed reloading into another IOS before launch of game. - Removed buggy lz77 implementation and use the one known working. - Fixed launching of dollz compressed dol files. (thanks FIX94) - Fixed reading game's titles from disc header on fat32/ntfs/ext. - Fixed crash on missing <app> tag on meta.xml files. - Forwarder: Fixed crash on drives with physical sector size > 512 bytes. - Forwarder: Fixed endless waiting for slow HDD. (thanks to FIX94) - Forwarder: Added missing ext2 unmount. (thanks to FIX94) - Supports new WiiMotion+ controllers by using latest libraries. - Lots of string handling improvements (thanks to gerbilsoft for his patch) New Channel Grid Mode specific features: - New settings section for all banner's settings. - Use of BNR (banner animation) cache setting to load banners and icon's animation faster. (Enabled by default. Takes ~35MB/100 Banners) Wii games/Channels also accept ID3.bnr for custom-made multi-region banners. - BNR cache path setting. - Pulsing "new" icon on banner grid layout for new games. - Centering and size setting for banner's animation resources. - Channel's zooming speed setting. - Page's scrolling speed setting. New GameCube specific features: - Supports Dios Mios Lite (DML) v1.2+ - Uses of a custom banner for GameCube games which loads the game's internal opening.bnr informations (big thanks to diddy from the wiithemeteam for creating the brlyt/brlan for the banner). - DML settings editable from the loader (global and per game settings). - Supported formats for gamecubes are ISO/GCM and GCRegEx. - Custom game paths. The following paths are accepted: 1. configpath/ID6/ 2. configpath/ID6_Title/ 3. configpath/Title [ID6]/ 4. configpath/gamepath/ (slow loading speed) Accepted game's filenames: title.iso, title.gcm, GAMEID6.iso, GAMEID6.gcm - DML cheats now work the same way as for other Wii games, gct goes to "GCT Cheatcode Path" as GAMEID.gct - GameCube games copy from USB to SD on demand with choice menu to delete SD games to make space, If you want to use this feature then set the "Main GC path" to USB and the "SD GameCube path" to SD card. If duplicated games are detected on SD and USB, the games on SD will be prioritized. - Added GameCube disc dump functionality with multi-disc menu game selection, compress and align support (thanks to FIX94 and Overjoy for their disc dump sources on which this is based). - Use of the BNR cache path to load ID6.bnr or ID3.bnr if available for custom-made banners. (Loading only) - Video mode option to force interlace mode on GameCube. - Fixed force prog mode on DML 1.4
2012-05-12 11:10:37 +02:00
{
return ApplicationDownload();
}
else if (choice == 2)
{
if(UpdateGameTDB() < 0)
{
WindowPrompt(fmt("%s", tr( "WiiTDB.xml is up to date." )), 0, tr("OK"));
return 1;
}
else
{
WindowPrompt(tr( "Successfully Updated" ), 0, tr( "OK" ));
return 1;
}
}
else if (choice == 3)
{
if(UpdateLanguageFiles() > 0)
WindowPrompt(tr( "Successfully Updated" ), 0, tr( "OK" ));
}
return 1;
}