Skip to content

Commit

Permalink
updater
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvita committed Oct 15, 2020
1 parent cf71e2a commit dd3424b
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 33 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ include $(DEVKITPRO)/libnx/switch_rules
# - icon.jpg
# - <libnx folder>/default_icon.jpg
#---------------------------------------------------------------------------------
VERSION_MAJOR := 3
VERSION_MINOR := 7
VERSION_MICRO := 12
VERSION_MAJOR := 1
VERSION_MINOR := 0
VERSION_MICRO := 0
NIGHTLY :=

APP_TITLE := EdiZon SE
APP_TITLE := SE updater
APP_AUTHOR := Tomvita

ifeq ($(NIGHTLY), 1)
Expand Down Expand Up @@ -176,7 +176,7 @@ $(BUILD):
#--------------------------------------------------------------------------------
run: $(BUILD)
@echo Starting nxlink
@nxlink $(OUTPUT).nro -s -p "EdiZon/EdiZon.nro"
@nxlink $(OUTPUT).nro -s -p "EdiZon/updater.nro"

#---------------------------------------------------------------------------------
clean:
Expand Down
28 changes: 14 additions & 14 deletions source/guis/gui_about.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ void GuiAbout::draw() {
Gui::drawTextAligned(fontTitle, 70, 60, currTheme.textColor, "\uE017", ALIGNED_LEFT);
Gui::drawTextAligned(font24, 70, 23, currTheme.textColor, " About", ALIGNED_LEFT);

// if (updateAvailable)
// Gui::drawTextAligned(font20, Gui::g_framebuffer_width - 50, Gui::g_framebuffer_height - 51, currTheme.textColor, "\uE0F0 Install update \uE0E1 Back \uE0E0 OK", ALIGNED_RIGHT);
// else
Gui::drawTextAligned(font20, Gui::g_framebuffer_width - 50, Gui::g_framebuffer_height - 51, currTheme.textColor, "\uE0E1 Back \uE0E0 OK", ALIGNED_RIGHT);
if (updateAvailable)
Gui::drawTextAligned(font20, Gui::g_framebuffer_width - 50, Gui::g_framebuffer_height - 51, currTheme.textColor, "\uE0F0 Install update \uE0E1 Exit \uE0E0 OK", ALIGNED_RIGHT);
else
Gui::drawTextAligned(font20, Gui::g_framebuffer_width - 50, Gui::g_framebuffer_height - 51, currTheme.textColor, "\uE0E1 Exit \uE0E0 OK", ALIGNED_RIGHT);

Gui::drawTextAligned(fontHuge, 100, 180, Gui::makeColor(0xFB, 0xA6, 0x15, 0xFF), "EdiZon SE v" VERSION_STRING, ALIGNED_LEFT);
Gui::drawTextAligned(fontHuge, 100, 180, Gui::makeColor(0xFB, 0xA6, 0x15, 0xFF), "SE Updater v" VERSION_STRING, ALIGNED_LEFT);
Gui::drawTextAligned(font20, 130, 190, currTheme.separatorColor, "by Tomvita", ALIGNED_LEFT);

Gui::drawTextAligned(font14, 120, 250, currTheme.textColor, "Special thank to WerWolv who made the original EdiZon and the help and advise he gave.", ALIGNED_LEFT);
Expand Down Expand Up @@ -93,14 +93,14 @@ void GuiAbout::onInput(u32 kdown) {
threadClose(&networkThread);
threadRunning = false;
}
Debugger *l_debugger = new Debugger();
if (l_debugger->getRunningApplicationPID() != 0)
Gui::g_nextGui = GUI_CHOOSE_MISSION;
else
Gui::g_nextGui = GUI_MAIN;
// Debugger *l_debugger = new Debugger();
// if (l_debugger->getRunningApplicationPID() != 0)
// Gui::g_nextGui = GUI_CHOOSE_MISSION;
// else
Gui::g_requestExit = true;
}

if (kdown & KEY_MINUS && updateAvailable && false) {
if (kdown & KEY_MINUS && updateAvailable) {

(new MessageBox("Updating EdiZon.\n \nThis may take a while...", MessageBox::NONE))->show();
requestDraw();
Expand Down Expand Up @@ -132,7 +132,6 @@ void GuiAbout::onInput(u32 kdown) {
fclose(fp);
curl_easy_cleanup(curl);
}

}
}

Expand Down Expand Up @@ -178,8 +177,9 @@ static void getVersionInfoAsync(void* args) {
remoteVersion = "";
if (curl_easy_perform(curl) != CURLE_OK)
remoteVersion = "???";

if (remoteVersion.compare(0, sizeof(VERSION_STRING), VERSION_STRING) == 0 || strcmp(remoteCommitSha.c_str(), "???") == 0)
Config::readConfig();
// std::string version = Config::getConfig()->version;
if (remoteVersion.compare(0, 6, VERSION_STRING) == 0 || strcmp(remoteCommitSha.c_str(), "???") == 0)
{
updateAvailable = false;
}
Expand Down
28 changes: 14 additions & 14 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,20 +224,20 @@ int main(int argc, char **argv)
setsysGetColorSetId(&colorSetId);
setTheme(colorSetId);

Debugger *l_debugger = new Debugger(); //Debugger *m_debugger;
if (l_debugger->getRunningApplicationPID() != 0)
{
Gui::g_splashDisplayed = true;
Config::readConfig();
m_edizon_dir = Config::getConfig()->edizon_dir;
if (m_edizon_dir.compare(0, sizeof(EDIZON_DIR)-1, EDIZON_DIR) != 0)
m_edizon_dir = EDIZON_DIR;
if (multimissioncheck())
Gui::g_nextGui = GUI_CHOOSE_MISSION;
else
Gui::g_nextGui = GUI_CHEATS;
}

// Debugger *l_debugger = new Debugger(); //Debugger *m_debugger;
// if (l_debugger->getRunningApplicationPID() != 0)
// {
// Gui::g_splashDisplayed = true;
// Config::readConfig();
// m_edizon_dir = Config::getConfig()->edizon_dir;
// if (m_edizon_dir.compare(0, sizeof(EDIZON_DIR)-1, EDIZON_DIR) != 0)
// m_edizon_dir = EDIZON_DIR;
// if (multimissioncheck())
// Gui::g_nextGui = GUI_CHOOSE_MISSION;
// else
// Gui::g_nextGui = GUI_CHEATS;
// }
Gui::g_nextGui = GUI_ABOUT;
if (!Gui::g_splashDisplayed)
{
currGui = new GuiMain();
Expand Down

0 comments on commit dd3424b

Please sign in to comment.