Skip to content

Commit f156ac5

Browse files
committed
idk
1 parent d0492ca commit f156ac5

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

Manager/Global.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#include "Utils/DropManager.h"
44

55
namespace Global {
6+
inline bool HasUpdaterExe = false;
7+
68
inline std::pair<unsigned char*, size_t> myAvatar;
79
inline std::pair<unsigned char*, size_t> ddma;
810
inline std::pair<unsigned char*, size_t> fontRegular;

Manager/Manager.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ void Main() {
1717

1818
void RenderThread() {
1919
Settings::LoadSettings();
20+
Global::HasUpdaterExe = fs::exists("updater.exe");
2021
{ // To minimize exe size
2122
httplib::Client cli("http://decodercoder.xyz");
2223
auto res = cli.Get("/about/my_avatar.png");

Manager/Windows/MainWindow/MainWindow.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,17 +294,23 @@ bool MainWindow::Render()
294294
}
295295
ImGui::EndMenu();
296296
}
297-
if (selectedApp < 0)
297+
if (selectedApp < 0 || !Global::HasUpdaterExe)
298298
ImGui::BeginDisabled();
299299
if (ImGui::BeginMenu("App")) {
300300

301301
if (ImGui::MenuItem("Build updater")) {
302+
if (fs::exists("updater.exe") && true == false) {
303+
char* updater = nullptr;
304+
size_t size;
305+
ReadBinaryFile(L"updater.exe", &updater, size);
302306

307+
/*for(int i = 0; i <)*/
308+
}
303309
}
304310

305311
ImGui::EndMenu();
306312
}
307-
if (selectedApp < 0)
313+
if (selectedApp < 0 || !Global::HasUpdaterExe)
308314
ImGui::EndDisabled();
309315
ImGui::EndMenuBar();
310316
}

updater/updater.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
using namespace std;
1212
namespace fs = std::filesystem;
1313

14-
char Host[] = "https://decodercoder.xyz||||||||||||||||||";
15-
char AppName[] = "test_app||||||||||||||||||";
16-
char MainName[] = "core|||||||||||||";
14+
char Host[] = "decodercoder.xyz||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||";
15+
char AppName[] = "test_app||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||";
16+
char MainName[] = "core|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||";
1717

1818
fs::path GetExecutableFolder()
1919
{

updater/updater.vcxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
<ConformanceMode>true</ConformanceMode>
107107
<LanguageStandard>stdcpp20</LanguageStandard>
108108
<LanguageStandard_C>stdc17</LanguageStandard_C>
109+
<MultiProcessorCompilation>true</MultiProcessorCompilation>
109110
</ClCompile>
110111
<Link>
111112
<SubSystem>Console</SubSystem>
@@ -122,6 +123,7 @@
122123
<ConformanceMode>true</ConformanceMode>
123124
<LanguageStandard>stdcpp20</LanguageStandard>
124125
<LanguageStandard_C>stdc17</LanguageStandard_C>
126+
<MultiProcessorCompilation>true</MultiProcessorCompilation>
125127
</ClCompile>
126128
<Link>
127129
<SubSystem>Console</SubSystem>

0 commit comments

Comments
 (0)