mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 21:54:15 +01:00
-made internal update feature working again, wiiflow
needs to be in "apps/wiiflow" for it to work
This commit is contained in:
parent
21e3012ca1
commit
f2355ba238
@ -258,6 +258,7 @@ void CMenu::init(void)
|
|||||||
|
|
||||||
_load_installed_cioses();
|
_load_installed_cioses();
|
||||||
|
|
||||||
|
snprintf(m_app_update_drive, sizeof(m_app_update_drive), "%s:/", drive);
|
||||||
m_dataDir = sfmt("%s:/%s", drive, APPDATA_DIR);
|
m_dataDir = sfmt("%s:/%s", drive, APPDATA_DIR);
|
||||||
gprintf("Data Directory: %s\n", m_dataDir.c_str());
|
gprintf("Data Directory: %s\n", m_dataDir.c_str());
|
||||||
|
|
||||||
|
@ -103,6 +103,7 @@ private:
|
|||||||
std::string m_listCacheDir;
|
std::string m_listCacheDir;
|
||||||
std::string m_DMLgameDir;
|
std::string m_DMLgameDir;
|
||||||
/* Updates */
|
/* Updates */
|
||||||
|
char m_app_update_drive[6];
|
||||||
const char* m_app_update_url;
|
const char* m_app_update_url;
|
||||||
const char* m_data_update_url;
|
const char* m_data_update_url;
|
||||||
std::string m_dol;
|
std::string m_dol;
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#define TAG_LOC "{loc}"
|
#define TAG_LOC "{loc}"
|
||||||
#define TITLES_URL "http://www.gametdb.com/titles.txt?LANG=%s"
|
#define TITLES_URL "http://www.gametdb.com/titles.txt?LANG=%s"
|
||||||
#define GAMETDB_URL "http://www.gametdb.com/wiitdb.zip?LANG=%s&FALLBACK=TRUE&WIIWARE=TRUE&GAMECUBE=TRUE"
|
#define GAMETDB_URL "http://www.gametdb.com/wiitdb.zip?LANG=%s&FALLBACK=TRUE&WIIWARE=TRUE&GAMECUBE=TRUE"
|
||||||
#define UPDATE_URL_VERSION "http://update.wiiflow.org/txt/versions.txt"
|
#define UPDATE_URL_VERSION "http://dl.dropbox.com/u/25620767/WiiflowMod/versions.txt"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@ -1820,7 +1820,7 @@ s8 CMenu::_versionDownloader() // code to download new version
|
|||||||
m_thrdStep = 0.2f;
|
m_thrdStep = 0.2f;
|
||||||
m_thrdStepLen = 0.9f - 0.2f;
|
m_thrdStepLen = 0.9f - 0.2f;
|
||||||
gprintf("App Update URL: %s\n", m_app_update_url);
|
gprintf("App Update URL: %s\n", m_app_update_url);
|
||||||
gprintf("Data Update URL: %s\n", m_app_update_url);
|
gprintf("Data Update URL: %s\n", m_data_update_url);
|
||||||
|
|
||||||
download = downloadfile(buffer.get(), bufferSize, m_app_update_url, CMenu::_downloadProgress, this);
|
download = downloadfile(buffer.get(), bufferSize, m_app_update_url, CMenu::_downloadProgress, this);
|
||||||
if (download.data == 0 || download.size < m_app_update_size)
|
if (download.data == 0 || download.size < m_app_update_size)
|
||||||
@ -1854,7 +1854,7 @@ s8 CMenu::_versionDownloader() // code to download new version
|
|||||||
LWP_MutexUnlock(m_mutex);
|
LWP_MutexUnlock(m_mutex);
|
||||||
|
|
||||||
ZipFile zFile(m_app_update_zip.c_str());
|
ZipFile zFile(m_app_update_zip.c_str());
|
||||||
bool result = zFile.ExtractAll(m_appDir.c_str());
|
bool result = zFile.ExtractAll(m_app_update_drive);
|
||||||
remove(m_app_update_zip.c_str());
|
remove(m_app_update_zip.c_str());
|
||||||
|
|
||||||
if (!result) goto fail;
|
if (!result) goto fail;
|
||||||
|
@ -78,13 +78,14 @@ void CMenu::_system()
|
|||||||
m_btnMgr.setProgress(m_downloadPBar, 0.f);
|
m_btnMgr.setProgress(m_downloadPBar, 0.f);
|
||||||
m_thrdStop = false;
|
m_thrdStop = false;
|
||||||
m_thrdWorking = true;
|
m_thrdWorking = true;
|
||||||
gprintf("\nVersion to DL: %i\n", newIOS);
|
gprintf("\nVersion to DL: %i\n", newVer);
|
||||||
|
|
||||||
m_app_update_size = m_version.getInt("GENERAL", "app_zip_size", 0);
|
if(m_version.getInt("GENERAL", "version", 0) == newVer)
|
||||||
|
m_app_update_size = m_version.getInt("GENERAL", "app_zip_size", 0);
|
||||||
m_data_update_size = m_version.getInt("GENERAL", "data_zip_size", 0);
|
m_data_update_size = m_version.getInt("GENERAL", "data_zip_size", 0);
|
||||||
|
|
||||||
m_app_update_url = fmt("%s/r%i/%i.zip", m_version.getString("GENERAL", "update_url", "http://update.wiiflow.org").c_str(), newVer, newIOS);
|
m_app_update_url = fmt("%s/Wiiflow_Mod_svn_r%i.zip", m_version.getString("GENERAL", "update_url", "http://open-wiiflow-mod.googlecode.com/files").c_str(), newVer);
|
||||||
m_data_update_url = fmt("%s/r%i/data.zip", m_version.getString("GENERAL", "update_url", "http://update.wiiflow.org").c_str(), newVer);
|
m_data_update_url = fmt("%s/r%i/data.zip", m_version.getString("GENERAL", "update_url", "http://open-wiiflow-mod.googlecode.com/files").c_str(), newVer);
|
||||||
|
|
||||||
m_showtimer = 120;
|
m_showtimer = 120;
|
||||||
LWP_CreateThread(&thread, (void *(*)(void *))CMenu::_versionDownloaderInit, (void *)this, 0, 8192, 40);
|
LWP_CreateThread(&thread, (void *(*)(void *))CMenu::_versionDownloaderInit, (void *)this, 0, 8192, 40);
|
||||||
@ -111,6 +112,7 @@ void CMenu::_system()
|
|||||||
{
|
{
|
||||||
m_btnMgr.setText(m_systemLblVerSelectVal, wstringEx(sfmt("%i", CMenu::_version[i])));
|
m_btnMgr.setText(m_systemLblVerSelectVal, wstringEx(sfmt("%i", CMenu::_version[i])));
|
||||||
newVer = CMenu::_version[i];
|
newVer = CMenu::_version[i];
|
||||||
|
m_app_update_size = m_version.getInt(sfmt("VERSION%i", i - 1u), "app_zip_size", 0);
|
||||||
if (i > 1 && i != num_versions)
|
if (i > 1 && i != num_versions)
|
||||||
m_btnMgr.setText(m_systemLblInfo, m_version.getWString(sfmt("VERSION%i", i - 1u), "changes"));
|
m_btnMgr.setText(m_systemLblInfo, m_version.getWString(sfmt("VERSION%i", i - 1u), "changes"));
|
||||||
else
|
else
|
||||||
@ -130,6 +132,7 @@ void CMenu::_system()
|
|||||||
{
|
{
|
||||||
m_btnMgr.setText(m_systemLblVerSelectVal, wstringEx(sfmt("%i", CMenu::_version[i])));
|
m_btnMgr.setText(m_systemLblVerSelectVal, wstringEx(sfmt("%i", CMenu::_version[i])));
|
||||||
newVer = CMenu::_version[i];
|
newVer = CMenu::_version[i];
|
||||||
|
m_app_update_size = m_version.getInt(sfmt("VERSION%i", i - 1u), "app_zip_size", 0);
|
||||||
if (i > 1 && i != num_versions)
|
if (i > 1 && i != num_versions)
|
||||||
m_btnMgr.setText(m_systemLblInfo, m_version.getWString(sfmt("VERSION%i", i - 1u), "changes"));
|
m_btnMgr.setText(m_systemLblInfo, m_version.getWString(sfmt("VERSION%i", i - 1u), "changes"));
|
||||||
else
|
else
|
||||||
@ -249,7 +252,7 @@ void CMenu::_textSystem(void)
|
|||||||
{
|
{
|
||||||
m_btnMgr.setText(m_systemLblTitle, _t("sys1", L"Update WiiFlow"));
|
m_btnMgr.setText(m_systemLblTitle, _t("sys1", L"Update WiiFlow"));
|
||||||
m_btnMgr.setText(m_systemLblVersionTxt, _t("sys2", L"WiiFlow Version:"));
|
m_btnMgr.setText(m_systemLblVersionTxt, _t("sys2", L"WiiFlow Version:"));
|
||||||
m_btnMgr.setText(m_systemLblVersion, wfmt(L"(%s-r%s)", APP_VERSION, SVN_REV).c_str());
|
m_btnMgr.setText(m_systemLblVersion, wfmt(L"r%s", SVN_REV).c_str());
|
||||||
m_btnMgr.setText(m_systemBtnBack, _t("sys3", L"Cancel"));
|
m_btnMgr.setText(m_systemBtnBack, _t("sys3", L"Cancel"));
|
||||||
m_btnMgr.setText(m_systemBtnDownload, _t("sys4", L"Upgrade"));
|
m_btnMgr.setText(m_systemBtnDownload, _t("sys4", L"Upgrade"));
|
||||||
i = min((u32)version_num, ARRAY_SIZE(CMenu::_version) -1u);
|
i = min((u32)version_num, ARRAY_SIZE(CMenu::_version) -1u);
|
||||||
|
Loading…
Reference in New Issue
Block a user