mirror of
https://github.com/hax4dazy/TinWoo.git
synced 2025-02-09 19:25:05 +01:00
php options added to config page
This commit is contained in:
parent
4183712e75
commit
addf739e96
@ -21,6 +21,7 @@ namespace inst::config {
|
||||
extern bool usbAck;
|
||||
extern bool gayMode;
|
||||
extern bool useSound;
|
||||
extern bool useoldphp;
|
||||
|
||||
void setConfig();
|
||||
void parseConfig();
|
||||
|
@ -172,6 +172,7 @@
|
||||
"auto_update": "Suche automatisch nach Updates für TinWoo",
|
||||
"gay_option": "Design verwenden",
|
||||
"useSound": "Nutzen von Benachrichtungstönen während Installation",
|
||||
"useoldphp": "Use old php files for http server installs",
|
||||
"sig_url": "Signatur Patches URL: ",
|
||||
"language": "Sprache: ",
|
||||
"check_update": "Suche nach Updates für TinWoo Installer",
|
||||
|
@ -172,6 +172,7 @@
|
||||
"auto_update": "Check for updates to TinWoo Installer automatically",
|
||||
"gay_option": "Use Theme",
|
||||
"useSound": "Use sound notifications during installs",
|
||||
"useoldphp": "Use old php files for http server installs",
|
||||
"sig_url": "Signature patches source URL: ",
|
||||
"language": "Language: ",
|
||||
"check_update": "Check for updates to TinWoo Installer",
|
||||
|
@ -172,6 +172,7 @@
|
||||
"auto_update": "Vérifier les mises à jour de l'installateur TinWoo automatiquement",
|
||||
"gay_option": "Utiliser le thème",
|
||||
"useSound": "Use sound notifications during installs",
|
||||
"useoldphp": "Use old php files for http server installs",
|
||||
"sig_url": "Patchs de signatures URL: ",
|
||||
"language": "Langage: ",
|
||||
"check_update": "Vérifiez les mises à jour de l'installateur TinWoo",
|
||||
|
@ -172,6 +172,7 @@
|
||||
"auto_update": "Controlla aggiornamenti di TinWoo Installer automaticamente",
|
||||
"gay_option": "Usa tema",
|
||||
"useSound": "Use sound notifications during installs",
|
||||
"useoldphp": "Use old php files for http server installs",
|
||||
"sig_url": "Fonte URL SigPatches: ",
|
||||
"language": "Lingua: ",
|
||||
"check_update": "Controlla aggiornamenti di TinWoo Installer ora",
|
||||
|
@ -172,6 +172,7 @@
|
||||
"auto_update": "TinWooのアップデートを自動的に確認する",
|
||||
"gay_option": "テーマを使用する",
|
||||
"useSound": "インストール時にサウンドで通知する",
|
||||
"useoldphp": "Use old php files for http server installs",
|
||||
"sig_url": "署名パッチのソースURL: ",
|
||||
"language": "言語: ",
|
||||
"check_update": "TinWoo Installerのアップデートを確認",
|
||||
|
@ -172,6 +172,7 @@
|
||||
"auto_update": "Автоматически проверять наличие обновлений",
|
||||
"gay_option": "Использовать тему",
|
||||
"useSound": "Use sound notifications during installs",
|
||||
"useoldphp": "Use old php files for http server installs",
|
||||
"sig_url": "URL для скачивания Signature patches: ",
|
||||
"language": "Язык: ",
|
||||
"check_update": "Проверить наличие обновлений TinWoo Installer",
|
||||
|
@ -170,8 +170,9 @@
|
||||
"boost_mode": "在進行安裝時啟用\"超頻\"模式",
|
||||
"ask_delete": "在安裝完成後,詢問是否刪除原始檔案",
|
||||
"auto_update": "自動檢查Tinwoo Installer的更新版本",
|
||||
"gay_option": "套用主題",
|
||||
"useSound": "在安裝過程中使用音效提醒進度",
|
||||
"gay_option": "套用主題",
|
||||
"useSound": "在安裝過程中使用音效提醒進度",
|
||||
"useoldphp": "Use old php files for http server installs",
|
||||
"sig_url": "簽名修補程式來源URL: ",
|
||||
"language": "介面語系: ",
|
||||
"check_update": "檢查Tinwoo Installer的更新版本",
|
||||
|
@ -334,8 +334,14 @@ namespace netInstStuff{
|
||||
while (index < response.size()) {
|
||||
if (response[index] == '"') {
|
||||
if (link.find("../") == std::string::npos)
|
||||
if (link.find(".nsp") != std::string::npos || link.find(".nsz") != std::string::npos || link.find(".xci") != std::string::npos || link.find(".xcz") != std::string::npos)
|
||||
urls.push_back(link);
|
||||
if (link.find(".nsp") != std::string::npos || link.find(".nsz") != std::string::npos || link.find(".xci") != std::string::npos || link.find(".xcz") != std::string::npos){
|
||||
if (inst::config::useoldphp) {
|
||||
urls.push_back(url + link);
|
||||
}
|
||||
else {
|
||||
urls.push_back(link);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
link += response[index++];
|
||||
|
@ -143,6 +143,11 @@ namespace inst::ui {
|
||||
useSoundOption->SetIcon(this->getMenuOptionIcon(inst::config::useSound));
|
||||
this->menu->AddItem(useSoundOption);
|
||||
|
||||
auto useoldphp = pu::ui::elm::MenuItem::New("options.menu_items.useoldphp"_lang);
|
||||
useoldphp->SetColor(COLOR("#FFFFFFFF"));
|
||||
useoldphp->SetIcon(this->getMenuOptionIcon(inst::config::useoldphp));
|
||||
this->menu->AddItem(useoldphp);
|
||||
|
||||
auto SigPatch = pu::ui::elm::MenuItem::New("main.menu.sig"_lang);
|
||||
SigPatch->SetColor(COLOR("#FFFFFFFF"));
|
||||
this->menu->AddItem(SigPatch);
|
||||
@ -250,11 +255,24 @@ namespace inst::ui {
|
||||
this->menu->SetSelectedIndex(index);
|
||||
inst::config::setConfig();
|
||||
break;
|
||||
|
||||
case 7:
|
||||
if (inst::config::useoldphp) {
|
||||
inst::config::useoldphp = false;
|
||||
}
|
||||
else {
|
||||
inst::config::useoldphp = true;
|
||||
}
|
||||
this->setMenuText();
|
||||
this->menu->SetSelectedIndex(index);
|
||||
inst::config::setConfig();
|
||||
break;
|
||||
|
||||
case 7:
|
||||
case 8:
|
||||
sigPatchesMenuItem_Click();
|
||||
break;
|
||||
case 8:
|
||||
|
||||
case 9:
|
||||
keyboardResult = inst::util::softwareKeyboard("options.sig_hint"_lang, inst::config::sigPatchesUrl.c_str(), 500);
|
||||
if (keyboardResult.size() > 0) {
|
||||
inst::config::sigPatchesUrl = keyboardResult;
|
||||
@ -263,7 +281,7 @@ namespace inst::ui {
|
||||
this->menu->SetSelectedIndex(index);
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
case 10:
|
||||
languageList = languageStrings;
|
||||
languageList.push_back("options.language.system_language"_lang);
|
||||
rc = inst::ui::mainApp->CreateShowDialog("options.language.title"_lang, "options.language.desc"_lang, languageList, false);
|
||||
@ -297,7 +315,7 @@ namespace inst::ui {
|
||||
mainApp->FadeOut();
|
||||
mainApp->Close();
|
||||
break;
|
||||
case 10:
|
||||
case 11:
|
||||
if (inst::util::getIPAddress() == "1.0.0.127") {
|
||||
inst::ui::mainApp->CreateShowDialog("main.net.title"_lang, "main.net.desc"_lang, {"common.ok"_lang}, true);
|
||||
break;
|
||||
@ -309,7 +327,7 @@ namespace inst::ui {
|
||||
}
|
||||
this->askToUpdate(downloadUrl);
|
||||
break;
|
||||
case 11:
|
||||
case 12:
|
||||
inst::ui::mainApp->CreateShowDialog("options.credits.title"_lang, "options.credits.desc"_lang, {"common.close"_lang}, true);
|
||||
break;
|
||||
default:
|
||||
|
@ -18,6 +18,7 @@ namespace inst::config {
|
||||
bool useSound;
|
||||
bool usbAck;
|
||||
bool validateNCAs;
|
||||
bool useoldphp;
|
||||
|
||||
void setConfig() {
|
||||
nlohmann::json j = {
|
||||
@ -33,7 +34,8 @@ namespace inst::config {
|
||||
{"usbAck", usbAck},
|
||||
{"validateNCAs", validateNCAs},
|
||||
{"httpIndexUrl", httpIndexUrl},
|
||||
{"httplastUrl", httplastUrl}
|
||||
{"httplastUrl", httplastUrl},
|
||||
{"httpoldphp", useoldphp}
|
||||
};
|
||||
std::ofstream file(inst::config::configPath);
|
||||
file << std::setw(4) << j << std::endl;
|
||||
@ -45,6 +47,7 @@ namespace inst::config {
|
||||
nlohmann::json j;
|
||||
file >> j;
|
||||
autoUpdate = j["autoUpdate"].get<bool>();
|
||||
useoldphp = j["httpoldphp"].get<bool>();
|
||||
deletePrompt = j["deletePrompt"].get<bool>();
|
||||
gAuthKey = j["gAuthKey"].get<std::string>();
|
||||
gayMode = j["gayMode"].get<bool>();
|
||||
@ -69,6 +72,7 @@ namespace inst::config {
|
||||
deletePrompt = true;
|
||||
gayMode = false;
|
||||
useSound = false;
|
||||
useoldphp = false;
|
||||
ignoreReqVers = true;
|
||||
overClock = false;
|
||||
usbAck = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user