mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-04 18:45:05 +01:00
* Updated download URLs to use sourceforge repository.
* Updated language file URL to download correct revision.
This commit is contained in:
parent
991e48c398
commit
56d1cc69ce
10
HBC/META.XML
10
HBC/META.XML
@ -2,8 +2,8 @@
|
||||
<app version="1">
|
||||
<name> USB Loader GX</name>
|
||||
<coder>USB Loader GX Team</coder>
|
||||
<version>3.0 r1255</version>
|
||||
<release_date>20150814142358</release_date>
|
||||
<version>3.0 r1256</version>
|
||||
<release_date>20150815150707</release_date>
|
||||
<!-- // remove this line to enable arguments
|
||||
<arguments>
|
||||
<arg>--ios=250</arg>
|
||||
@ -33,8 +33,10 @@ Libogc/Devkit: Shagkur and Wintermute
|
||||
FreeTypeGX: Armin Tamzarian.
|
||||
|
||||
Links:
|
||||
USB Loader GX Project Page and Support Site:
|
||||
http://code.google.com/p/usbloader-gui/
|
||||
USB Loader GX Project Page
|
||||
https://sourceforge.net/projects/usbloadergx/
|
||||
Support Site:
|
||||
http://gbatemp.net/index.php?showtopic=149922
|
||||
Help Website:
|
||||
http://usbloadergx.koureio.net/
|
||||
WiiTDB Site:
|
||||
|
@ -1,6 +1,7 @@
|
||||
/****************************************************************************
|
||||
* languagefile updater
|
||||
* for USB Loader GX *giantpune*
|
||||
* 2015 Cyan
|
||||
***************************************************************************/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -19,10 +20,11 @@
|
||||
#include "prompts/ProgressWindow.h"
|
||||
#include "utils/ShowError.h"
|
||||
#include "gecko.h"
|
||||
#include "svnrev.h"
|
||||
|
||||
static const char * LanguageFilesURL = "http://usbloader-gui.googlecode.com/svn/trunk/Languages/";
|
||||
static const char * LanguageFilesURL = "http://svn.code.sf.net/p/usbloadergx/code/trunk/Languages/";
|
||||
|
||||
int DownloadAllLanguageFiles()
|
||||
int DownloadAllLanguageFiles(int revision)
|
||||
{
|
||||
if(!CreateSubfolder(Settings.languagefiles_path))
|
||||
{
|
||||
@ -40,6 +42,11 @@ int DownloadAllLanguageFiles()
|
||||
URL_List LinkList(LanguageFilesURL);
|
||||
int listsize = LinkList.GetURLCount();
|
||||
int files_downloaded = 0;
|
||||
char target[6];
|
||||
if(revision > 0)
|
||||
snprintf(target, sizeof(target), "%d", revision);
|
||||
else
|
||||
snprintf(target, sizeof(target), "%s", GetRev());
|
||||
|
||||
ShowProgress(tr("Updating Language Files:"), 0, 0, 0, listsize, false, true);
|
||||
|
||||
@ -60,7 +67,7 @@ int DownloadAllLanguageFiles()
|
||||
|
||||
ShowProgress(tr("Updating Language Files:"), 0, filename, i, listsize, false, true);
|
||||
|
||||
snprintf(fullURL, sizeof(fullURL), "%s%s", LanguageFilesURL, filename);
|
||||
snprintf(fullURL, sizeof(fullURL), "%s%s?p=%s", LanguageFilesURL, filename, target);
|
||||
|
||||
struct block file = downloadfile(fullURL);
|
||||
if (file.data)
|
||||
@ -80,6 +87,12 @@ int DownloadAllLanguageFiles()
|
||||
|
||||
ProgressStop();
|
||||
|
||||
// reload current language file
|
||||
if(Settings.language_path[0] != 0)
|
||||
Settings.LoadLanguage(Settings.language_path, CONSOLE_DEFAULT);
|
||||
else
|
||||
Settings.LoadLanguage(NULL, CONSOLE_DEFAULT);
|
||||
|
||||
return files_downloaded;
|
||||
}
|
||||
|
||||
@ -118,7 +131,7 @@ int UpdateLanguageFiles()
|
||||
//build the URL, save path, and download each file and save it
|
||||
for(int i = 0; i < Dir.GetFilecount(); ++i)
|
||||
{
|
||||
snprintf(codeurl, sizeof(codeurl), "%s%s", LanguageFilesURL, Dir.GetFilename(i));
|
||||
snprintf(codeurl, sizeof(codeurl), "%s%s?p=%s", LanguageFilesURL, Dir.GetFilename(i), GetRev());
|
||||
snprintf(savepath, sizeof(savepath), "%s/%s", Settings.languagefiles_path, Dir.GetFilename(i));
|
||||
|
||||
struct block file = downloadfile(codeurl);
|
||||
@ -141,6 +154,12 @@ int UpdateLanguageFiles()
|
||||
|
||||
ProgressStop();
|
||||
|
||||
// reload current language file
|
||||
if(Settings.language_path[0] != 0)
|
||||
Settings.LoadLanguage(Settings.language_path, CONSOLE_DEFAULT);
|
||||
else
|
||||
Settings.LoadLanguage(NULL, CONSOLE_DEFAULT);
|
||||
|
||||
// return the number of files we updated
|
||||
return done;
|
||||
}
|
||||
|
@ -14,6 +14,6 @@
|
||||
//! returns -2 if it can't find any .lang files in the path
|
||||
//! return -1 if there is no network connection
|
||||
int UpdateLanguageFiles();
|
||||
int DownloadAllLanguageFiles();
|
||||
int DownloadAllLanguageFiles(int target = 0);
|
||||
|
||||
#endif
|
||||
|
@ -170,7 +170,7 @@ int UpdateGameTDB()
|
||||
static void UpdateIconPng()
|
||||
{
|
||||
char iconpath[200];
|
||||
struct block file = downloadfile("http://usbloader-gui.googlecode.com/svn/branches/updates/icon.png");
|
||||
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);
|
||||
@ -187,7 +187,8 @@ static void UpdateIconPng()
|
||||
static void UpdateMetaXml()
|
||||
{
|
||||
char xmlpath[200];
|
||||
struct block file = downloadfile("http://usbloader-gui.googlecode.com/svn/branches/updates/meta.xml");
|
||||
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);
|
||||
@ -210,9 +211,9 @@ int CheckUpdate()
|
||||
int currentrev = atoi(GetRev());
|
||||
|
||||
#ifdef FULLCHANNEL
|
||||
struct block file = downloadfile( "http://usbloader-gui.googlecode.com/svn/branches/updates/update_wad.txt" );
|
||||
struct block file = downloadfile( "http://svn.code.sf.net/p/usbloadergx/code/branches/updates/update_wad.txt" );
|
||||
#else
|
||||
struct block file = downloadfile("http://usbloader-gui.googlecode.com/svn/branches/updates/update_dol.txt");
|
||||
struct block file = downloadfile("http://svn.code.sf.net/p/usbloadergx/code/branches/updates/update_dol.txt");
|
||||
#endif
|
||||
|
||||
if (file.data != NULL)
|
||||
@ -234,9 +235,9 @@ static int ApplicationDownload(void)
|
||||
int currentrev = atoi(GetRev());
|
||||
|
||||
#ifdef FULLCHANNEL
|
||||
struct block file = downloadfile( "http://usbloader-gui.googlecode.com/svn/branches/updates/update_wad.txt" );
|
||||
struct block file = downloadfile( "http://svn.code.sf.net/p/usbloadergx/code/branches/updates/update_wad.txt" );
|
||||
#else
|
||||
struct block file = downloadfile("http://usbloader-gui.googlecode.com/svn/branches/updates/update_dol.txt");
|
||||
struct block file = downloadfile("http://svn.code.sf.net/p/usbloadergx/code/branches/updates/update_dol.txt");
|
||||
#endif
|
||||
|
||||
if (file.data != NULL)
|
||||
@ -321,7 +322,7 @@ static int ApplicationDownload(void)
|
||||
UpdateIconPng();
|
||||
UpdateMetaXml();
|
||||
UpdateGameTDB();
|
||||
DownloadAllLanguageFiles();
|
||||
DownloadAllLanguageFiles(newrev);
|
||||
}
|
||||
|
||||
if(update_error)
|
||||
|
@ -389,7 +389,7 @@ void WindowCredits()
|
||||
currentTxt->SetFont(creditsFont, creditsFontSize);
|
||||
txt.push_back(currentTxt);
|
||||
|
||||
currentTxt = new GuiText("http://code.google.com/p/usbloader-gui/", 20, ( GXColor ) {255, 255, 255, 255});
|
||||
currentTxt = new GuiText("http://sourceforge.net/p/usbloadergx/", 20, ( GXColor ) {255, 255, 255, 255});
|
||||
currentTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
||||
currentTxt->SetPosition(160, y);
|
||||
currentTxt->SetFont(creditsFont, creditsFontSize);
|
||||
|
@ -76,8 +76,10 @@ Libogc/Devkit: Shagkur and Wintermute
|
||||
FreeTypeGX: Armin Tamzarian.
|
||||
|
||||
Links:
|
||||
USB Loader GX Project Page and Support Site:
|
||||
http://code.google.com/p/usbloader-gui/
|
||||
USB Loader GX Project Page
|
||||
https://sourceforge.net/projects/usbloadergx/
|
||||
Support Site:
|
||||
http://gbatemp.net/index.php?showtopic=149922
|
||||
Help Website:
|
||||
http://usbloadergx.koureio.net/
|
||||
WiiTDB Site:
|
||||
|
Loading…
Reference in New Issue
Block a user