mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-02 16:49:05 +00:00
Universal-Updater -> DarkStore Part 1
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+11
-11
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -57,10 +57,10 @@ static void getCurrentUsage(){
|
||||
*/
|
||||
static void InitMusic() {
|
||||
if (access("sdmc:/3ds/dspfirm.cdc", F_OK) == 0) { // Ensure dspfirm dump exist.
|
||||
if (access("sdmc:/3ds/Universal-Updater/music.wav", F_OK) == 0) { // Ensure music.wav exist.
|
||||
if (access("sdmc:/3ds/DarkStore/music.wav", F_OK) == 0) { // Ensure music.wav exist.
|
||||
dspfirmFound = true;
|
||||
ndspInit();
|
||||
Music = std::make_unique<Sound>("sdmc:/3ds/Universal-Updater/music.wav");
|
||||
Music = std::make_unique<Sound>("sdmc:/3ds/DarkStore/music.wav");
|
||||
|
||||
Music->play();
|
||||
}
|
||||
@@ -95,8 +95,8 @@ bool touching(touchPosition touch, Structs::ButtonPos button) {
|
||||
void Init::LoadFont() {
|
||||
if (config->customfont()) {
|
||||
if (!needUnloadFont) {
|
||||
if (access("sdmc:/3ds/Universal-Updater/font.bcfnt", F_OK) == 0) {
|
||||
Gui::loadFont(font, "sdmc:/3ds/Universal-Updater/font.bcfnt");
|
||||
if (access("sdmc:/3ds/DarkStore/font.bcfnt", F_OK) == 0) {
|
||||
Gui::loadFont(font, "sdmc:/3ds/DarkStore/font.bcfnt");
|
||||
needUnloadFont = true;
|
||||
}
|
||||
}
|
||||
@@ -115,7 +115,7 @@ void Init::UnloadFont() {
|
||||
}
|
||||
|
||||
/*
|
||||
Initialize Universal-Updater.
|
||||
Initialize DarkStore.
|
||||
*/
|
||||
Result Init::Initialize() {
|
||||
gfxInitDefault();
|
||||
@@ -128,9 +128,9 @@ Result Init::Initialize() {
|
||||
|
||||
/* Create Directories, if missing. */
|
||||
mkdir("sdmc:/3ds", 0777);
|
||||
mkdir("sdmc:/3ds/Universal-Updater", 0777);
|
||||
mkdir("sdmc:/3ds/Universal-Updater/stores", 0777);
|
||||
mkdir("sdmc:/3ds/Universal-Updater/shortcuts", 0777);
|
||||
mkdir("sdmc:/3ds/DarkStore", 0777);
|
||||
mkdir("sdmc:/3ds/DarkStore/stores", 0777);
|
||||
mkdir("sdmc:/3ds/DarkStore/shortcuts", 0777);
|
||||
|
||||
config = std::make_unique<Config>();
|
||||
UIThemes = std::make_unique<Theme>();
|
||||
@@ -172,7 +172,7 @@ Result Init::Initialize() {
|
||||
}
|
||||
|
||||
/*
|
||||
MainLoop of Universal-Updater.
|
||||
MainLoop of DarkStore.
|
||||
*/
|
||||
Result Init::MainLoop() {
|
||||
bool fullExit = false;
|
||||
@@ -212,7 +212,7 @@ Result Init::MainLoop() {
|
||||
}
|
||||
|
||||
/*
|
||||
Exit Universal-Updater.
|
||||
Exit DarkStore.
|
||||
*/
|
||||
Result Init::Exit() {
|
||||
Gui::exit();
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -44,9 +44,9 @@ static void InitForARG() {
|
||||
|
||||
/* Create Directories, if missing. */
|
||||
mkdir("sdmc:/3ds", 0777);
|
||||
mkdir("sdmc:/3ds/Universal-Updater", 0777);
|
||||
mkdir("sdmc:/3ds/Universal-Updater/stores", 0777);
|
||||
mkdir("sdmc:/3ds/Universal-Updater/shortcuts", 0777);
|
||||
mkdir("sdmc:/3ds/DarkStore", 0777);
|
||||
mkdir("sdmc:/3ds/DarkStore/stores", 0777);
|
||||
mkdir("sdmc:/3ds/DarkStore/shortcuts", 0777);
|
||||
|
||||
config = std::make_unique<Config>();
|
||||
UIThemes = std::make_unique<Theme>();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -71,7 +71,7 @@ void StoreUtils::ReleaseNotesLogic(int &scrollIndex, int &storeMode) {
|
||||
/*
|
||||
I place it temporarely here for now.
|
||||
|
||||
Display Release changelog for Universal-Updater.
|
||||
Display Release changelog for DarkStore.
|
||||
*/
|
||||
void DisplayChangelog() {
|
||||
if (config->changelog()) {
|
||||
@@ -93,7 +93,7 @@ void DisplayChangelog() {
|
||||
Gui::DrawString(5, 25 - scrollIndex, 0.5f, UIThemes->TextColor(), notes, 390, 0, font, C2D_WordWrap);
|
||||
Gui::Draw_Rect(0, 0, 400, 25, UIThemes->BarColor());
|
||||
Gui::Draw_Rect(0, 25, 400, 1, UIThemes->BarOutline());
|
||||
Gui::DrawStringCentered(0, 1, 0.7f, UIThemes->TextColor(), "Universal-Updater", 390, 0, font);
|
||||
Gui::DrawStringCentered(0, 1, 0.7f, UIThemes->TextColor(), "DarkStore", 390, 0, font);
|
||||
Gui::Draw_Rect(0, 215, 400, 25, UIThemes->BarColor());
|
||||
Gui::Draw_Rect(0, 214, 400, 1, UIThemes->BarOutline());
|
||||
Gui::DrawStringCentered(0, 217, 0.7f, UIThemes->TextColor(), C_V, 390, 0, font);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -210,7 +210,7 @@ static void DrawGUISettings(int selection) {
|
||||
- Access the UniStore Manage Handle.
|
||||
- Enable UniStore auto update on boot.
|
||||
- Show the Credits.
|
||||
- Exit Universal-Updater.
|
||||
- Exit DarkStore.
|
||||
|
||||
int &page: Reference to the page.
|
||||
bool &dspSettings: Reference to the display Settings.
|
||||
@@ -426,7 +426,7 @@ static void SettingsHandleDir(int &page, int &selection) {
|
||||
Here you can..
|
||||
|
||||
- Enable / Disable Automatically updating the UniStore on boot.
|
||||
- Enable / Disable Automatically check for Universal-Updater updates on boot.
|
||||
- Enable / Disable Automatically check for DarkStore updates on boot.
|
||||
|
||||
int &page: Reference to the page.
|
||||
int &selection: Reference to the Selection.
|
||||
@@ -575,8 +575,8 @@ static void LanguageLogic(int &page, int &selection, int &sPos) {
|
||||
|
||||
/* Check if language needs a custom font. */
|
||||
if (l == "uk") {
|
||||
if (access("sdmc:/3ds/Universal-Updater/font.bcfnt", F_OK) != 0) {
|
||||
ScriptUtils::downloadFile("https://github.com/Universal-Team/extras/raw/master/files/universal-updater.bcfnt", "sdmc:/3ds/Universal-Updater/font.bcfnt", Lang::get("DOWNLOADING_COMPATIBLE_FONT"), true);
|
||||
if (access("sdmc:/3ds/DarkStore/font.bcfnt", F_OK) != 0) {
|
||||
ScriptUtils::downloadFile("https://github.com/Universal-Team/extras/raw/master/files/universal-updater.bcfnt", "sdmc:/3ds/DarkStore/font.bcfnt", Lang::get("DOWNLOADING_COMPATIBLE_FONT"), true);
|
||||
Init::UnloadFont();
|
||||
}
|
||||
|
||||
@@ -609,8 +609,8 @@ static void LanguageLogic(int &page, int &selection, int &sPos) {
|
||||
|
||||
/* Check if language needs a custom font. */
|
||||
if (l == "uk") {
|
||||
if (access("sdmc:/3ds/Universal-Updater/font.bcfnt", F_OK) != 0) {
|
||||
ScriptUtils::downloadFile("https://github.com/Universal-Team/extras/raw/master/files/universal-updater.bcfnt", "sdmc:/3ds/Universal-Updater/font.bcfnt", Lang::get("DOWNLOADING_COMPATIBLE_FONT"), true);
|
||||
if (access("sdmc:/3ds/DarkStore/font.bcfnt", F_OK) != 0) {
|
||||
ScriptUtils::downloadFile("https://github.com/Universal-Team/extras/raw/master/files/universal-updater.bcfnt", "sdmc:/3ds/DarkStore/font.bcfnt", Lang::get("DOWNLOADING_COMPATIBLE_FONT"), true);
|
||||
Init::UnloadFont();
|
||||
}
|
||||
|
||||
@@ -641,7 +641,7 @@ static void LanguageLogic(int &page, int &selection, int &sPos) {
|
||||
|
||||
if (touching(touch, langButtons[6])) {
|
||||
/* Download Font. */
|
||||
ScriptUtils::downloadFile("https://github.com/Universal-Team/extras/raw/master/files/universal-updater.bcfnt", "sdmc:/3ds/Universal-Updater/font.bcfnt", Lang::get("DOWNLOADING_COMPATIBLE_FONT"), true);
|
||||
ScriptUtils::downloadFile("https://github.com/Universal-Team/extras/raw/master/files/universal-updater.bcfnt", "sdmc:/3ds/DarkStore/font.bcfnt", Lang::get("DOWNLOADING_COMPATIBLE_FONT"), true);
|
||||
config->customfont(true);
|
||||
Init::UnloadFont();
|
||||
Init::LoadFont();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -41,7 +41,7 @@ void Overlays::ShowCredits() {
|
||||
|
||||
GFX::DrawTop();
|
||||
GFX::DrawSprite(sprites_universal_updater_idx, 220, 26);
|
||||
Gui::DrawStringCentered(0, 1, 0.7f, UIThemes->TextColor(), "Universal-Updater - " + Lang::get("CREDITS"), 395, 0, font);
|
||||
Gui::DrawStringCentered(0, 1, 0.7f, UIThemes->TextColor(), "DarkStore - " + Lang::get("CREDITS"), 395, 0, font);
|
||||
|
||||
Gui::DrawString(10, 30, 0.5f, UIThemes->TextColor(), "- Universal-Team", 0, 0, font);
|
||||
Gui::DrawString(10, 50, 0.5f, UIThemes->TextColor(), "- devkitPro", 0, 0, font);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -44,52 +44,52 @@ extern void DisplayChangelog();
|
||||
|
||||
Initialized meta, store and StoreEntry class and:
|
||||
|
||||
- Downloads Universal-DB.. in case nothing exist.
|
||||
- Downloads DarkStore-HomeBrew.. in case nothing exist.
|
||||
*/
|
||||
MainScreen::MainScreen() {
|
||||
StoreUtils::meta = std::make_unique<Meta>();
|
||||
|
||||
/* Check if lastStore is accessible. */
|
||||
if (config->lastStore() != "universal-db.unistore" && config->lastStore() != "") {
|
||||
if (config->lastStore() != "darkstore-homebrew.unistore" && config->lastStore() != "") {
|
||||
if (access((_STORE_PATH + config->lastStore()).c_str(), F_OK) != 0) {
|
||||
config->lastStore("universal-db.unistore");
|
||||
config->lastStore("darkstore-homebrew.unistore");
|
||||
|
||||
} else {
|
||||
/* check version and file here. */
|
||||
const UniStoreInfo info = GetInfo((_STORE_PATH + config->lastStore()), config->lastStore());
|
||||
|
||||
if (info.Version != 3 && info.Version != _UNISTORE_VERSION) {
|
||||
config->lastStore("universal-db.unistore");
|
||||
config->lastStore("darkstore-homebrew.unistore");
|
||||
}
|
||||
|
||||
if (info.File != "") { // Ensure to check for this.
|
||||
if ((info.File.find("/") != std::string::npos)) {
|
||||
config->lastStore("universal-db.unistore"); // It does contain a '/' which is invalid.
|
||||
config->lastStore("darkstore-homebrew.unistore"); // It does contain a '/' which is invalid.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* If Universal DB --> Get! */
|
||||
if (config->lastStore() == "universal-db.unistore" || config->lastStore() == "") {
|
||||
if (access("sdmc:/3ds/Universal-Updater/stores/universal-db.unistore", F_OK) != 0) {
|
||||
if (config->lastStore() == "darkstore-homebrew.unistore" || config->lastStore() == "") {
|
||||
if (access("sdmc:/3ds/DarkStore/stores/darkstore-homebrew.unistore", F_OK) != 0) {
|
||||
if (checkWifiStatus()) {
|
||||
std::string tmp = ""; // Just a temp.
|
||||
DownloadUniStore("https://db.universal-team.net/unistore/universal-db.unistore", -1, tmp, true, true);
|
||||
DownloadSpriteSheet("https://db.universal-team.net/unistore/universal-db.t3x", "universal-db.t3x");
|
||||
DownloadUniStore("https://darkstore.ml/app/darkstore-homebrew.unistore", -1, tmp, true, true);
|
||||
DownloadSpriteSheet("https://darkstore.ml/app/darkstore-homebrew.t3x", "darkstore-homebrew.t3x");
|
||||
|
||||
} else {
|
||||
notConnectedMsg();
|
||||
}
|
||||
|
||||
} else {
|
||||
const UniStoreInfo info = GetInfo("sdmc:/3ds/Universal-Updater/stores/universal-db.unistore", "universal-db.unistore");
|
||||
const UniStoreInfo info = GetInfo("sdmc:/3ds/DarkStore/stores/darkstore-homebrew.unistore", "darkstore-homebrew.unistore");
|
||||
|
||||
if (info.Version != 3 && info.Version != _UNISTORE_VERSION) {
|
||||
if (checkWifiStatus()) {
|
||||
std::string tmp = ""; // Just a temp.
|
||||
DownloadUniStore("https://db.universal-team.net/unistore/universal-db.unistore", -1, tmp, true, true);
|
||||
DownloadSpriteSheet("https://db.universal-team.net/unistore/universal-db.t3x", "universal-db.t3x");
|
||||
DownloadUniStore("https://darkstore.ml/app/darkstore-homebrew.unistore", -1, tmp, true, true);
|
||||
DownloadSpriteSheet("https://darkstore.ml/app/darkstore-homebrew.t3x", "darkstore-homebrew.t3x");
|
||||
|
||||
} else {
|
||||
notConnectedMsg();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -57,7 +57,7 @@ Meta::Meta() {
|
||||
Import the old Metadata of the 'updates.json' file.
|
||||
*/
|
||||
void Meta::ImportMetadata() {
|
||||
if (access("sdmc:/3ds/Universal-Updater/updates.json", F_OK) != 0) {
|
||||
if (access("sdmc:/3ds/DarkStore/updates.json", F_OK) != 0) {
|
||||
config->metadata(false);
|
||||
return; // Not found.
|
||||
}
|
||||
@@ -65,7 +65,7 @@ void Meta::ImportMetadata() {
|
||||
Msg::DisplayMsg(Lang::get("FETCHING_METADATA"));
|
||||
|
||||
nlohmann::json oldJson;
|
||||
FILE *old = fopen("sdmc:/3ds/Universal-Updater/updates.json", "rt");
|
||||
FILE *old = fopen("sdmc:/3ds/DarkStore/updates.json", "rt");
|
||||
if (old) {
|
||||
oldJson = nlohmann::json::parse(old, nullptr, false);
|
||||
fclose(old);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -96,7 +96,7 @@ void Config::sysLang() {
|
||||
In case it doesn't exist.
|
||||
*/
|
||||
void Config::initialize() {
|
||||
FILE *temp = fopen("sdmc:/3ds/Universal-Updater/Config.json", "w");
|
||||
FILE *temp = fopen("sdmc:/3ds/DarkStore/Config.json", "w");
|
||||
char tmp[2] = { '{', '}' };
|
||||
fwrite(tmp, sizeof(tmp), 1, temp);
|
||||
fclose(temp);
|
||||
@@ -106,11 +106,11 @@ void Config::initialize() {
|
||||
Constructor of the config.
|
||||
*/
|
||||
Config::Config() {
|
||||
if (access("sdmc:/3ds/Universal-Updater/Config.json", F_OK) != 0) {
|
||||
if (access("sdmc:/3ds/DarkStore/Config.json", F_OK) != 0) {
|
||||
this->initialize();
|
||||
}
|
||||
|
||||
FILE *file = fopen("sdmc:/3ds/Universal-Updater/Config.json", "rt");
|
||||
FILE *file = fopen("sdmc:/3ds/DarkStore/Config.json", "rt");
|
||||
if (file) {
|
||||
this->json = nlohmann::json::parse(file, nullptr, false);
|
||||
fclose(file);
|
||||
@@ -158,7 +158,7 @@ Config::Config() {
|
||||
/* Write to config if changesMade. */
|
||||
void Config::save() {
|
||||
if (this->changesMade) {
|
||||
FILE *file = fopen("sdmc:/3ds/Universal-Updater/Config.json", "w");
|
||||
FILE *file = fopen("sdmc:/3ds/DarkStore/Config.json", "w");
|
||||
|
||||
/* Set values. */
|
||||
this->setString("Language", this->language());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -795,7 +795,7 @@ UUUpdate IsUUUpdateAvailable() {
|
||||
|
||||
CURL *hnd = curl_easy_init();
|
||||
|
||||
ret = setupContext(hnd, "https://api.github.com/repos/Universal-Team/Universal-Updater/releases/latest");
|
||||
ret = setupContext(hnd, "https://api.github.com/repos/DarkStore-3DS/DarkStore/releases/latest");
|
||||
if (ret != 0) {
|
||||
socExit();
|
||||
free(result_buf);
|
||||
@@ -877,7 +877,7 @@ void UpdateAction() {
|
||||
Gui::DrawString(5, 25 - scrollIndex, 0.5f, UIThemes->TextColor(), res.Notes, 390, 0, font, C2D_WordWrap);
|
||||
Gui::Draw_Rect(0, 0, 400, 25, UIThemes->BarColor());
|
||||
Gui::Draw_Rect(0, 25, 400, 1, UIThemes->BarOutline());
|
||||
Gui::DrawStringCentered(0, 1, 0.7f, UIThemes->TextColor(), "Universal-Updater", 390, 0, font);
|
||||
Gui::DrawStringCentered(0, 1, 0.7f, UIThemes->TextColor(), "DarkStore", 390, 0, font);
|
||||
Gui::Draw_Rect(0, 215, 400, 25, UIThemes->BarColor());
|
||||
Gui::Draw_Rect(0, 214, 400, 1, UIThemes->BarOutline());
|
||||
Gui::DrawStringCentered(0, 217, 0.7f, UIThemes->TextColor(), res.Version, 390, 0, font);
|
||||
@@ -904,8 +904,8 @@ void UpdateAction() {
|
||||
if ((down & KEY_A) || (down & KEY_B) || (down & KEY_START) || (down & KEY_TOUCH)) confirmed = true;
|
||||
}
|
||||
|
||||
if (ScriptUtils::downloadRelease("Universal-Team/Universal-Updater", (is3DSX ? "Universal-Updater.3dsx" : "Universal-Updater.cia"),
|
||||
(is3DSX ? _3dsxPath : "sdmc:/Universal-Updater.cia"),
|
||||
if (ScriptUtils::downloadRelease("DarkStore-3DS/DarkStore", (is3DSX ? "DarkStore.3dsx" : "DarkStore.cia"),
|
||||
(is3DSX ? _3dsxPath : "sdmc:/DarkStore.cia"),
|
||||
false, Lang::get("DONLOADING_UNIVERSAL_UPDATER"), true) == 0) {
|
||||
|
||||
if (is3DSX) {
|
||||
@@ -914,8 +914,8 @@ void UpdateAction() {
|
||||
return;
|
||||
}
|
||||
|
||||
ScriptUtils::installFile("sdmc:/Universal-Updater.cia", false, Lang::get("INSTALL_UNIVERSAL_UPDATER"), true);
|
||||
ScriptUtils::removeFile("sdmc:/Universal-Updater.cia", Lang::get("DELETE_UNNEEDED_FILE"), true);
|
||||
ScriptUtils::installFile("sdmc:/DarkStore.cia", false, Lang::get("INSTALL_UNIVERSAL_UPDATER"), true);
|
||||
ScriptUtils::removeFile("sdmc:/DarkStore.cia", Lang::get("DELETE_UNNEEDED_FILE"), true);
|
||||
Msg::waitMsg(Lang::get("UPDATE_DONE"));
|
||||
exiting = true;
|
||||
}
|
||||
@@ -953,7 +953,7 @@ std::vector<StoreList> FetchStores() {
|
||||
|
||||
CURL *hnd = curl_easy_init();
|
||||
|
||||
ret = setupContext(hnd, "https://github.com/Universal-Team/Universal-Updater/raw/master/resources/UniStores.json");
|
||||
ret = setupContext(hnd, "https://darkstore.ml/app/Stores.json");
|
||||
if (ret != 0) {
|
||||
socExit();
|
||||
free(result_buf);
|
||||
@@ -1082,7 +1082,7 @@ std::string GetChangelog() {
|
||||
|
||||
CURL *hnd = curl_easy_init();
|
||||
|
||||
ret = setupContext(hnd, "https://api.github.com/repos/Universal-Team/Universal-Updater/releases/latest");
|
||||
ret = setupContext(hnd, "https://api.github.com/repos/DarkStore-3DS/DarkStore/releases/latest");
|
||||
if (ret != 0) {
|
||||
socExit();
|
||||
free(result_buf);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* This file is part of DarkStore
|
||||
* Copyright (C) 2019-2021 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -71,7 +71,7 @@ nlohmann::json Theme::InitWithDefaultColors(const std::string &ThemePath) {
|
||||
{ "MarkUnselected", "#1C213A" },
|
||||
{ "DownListPrev", "#1C213A" },
|
||||
{ "SideBarIconColor", "#ADCCEF" },
|
||||
{ "Description", "Universal-Updater's default Theme.\n\nBy: Universal-Team" }
|
||||
{ "Description", "DarkStore's default Theme.\n\nBy: Universal-Team" }
|
||||
}}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user