mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-06-22 08:31:07 +00:00
added json header and fixed static linking
This commit is contained in:
+12
-9
@@ -3,22 +3,25 @@
|
||||
/// Copyright (c) 2021-present Anonymous275 read the LICENSE file for more info.
|
||||
///
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include "Launcher.h"
|
||||
#include <Logger.h>
|
||||
#include "Logger.h"
|
||||
#include <windows.h>
|
||||
#include <shellapi.h>
|
||||
|
||||
Launcher::Launcher(int argc, char **argv) : DirPath(argv[0]) {
|
||||
Launcher::Launcher(int argc, char* argv[]) : DirPath(argv[0]) {
|
||||
DirPath = DirPath.substr(0, DirPath.find_last_of("\\/") + 1);
|
||||
Log::Init();
|
||||
WindowsInit();
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
void Launcher::launchGame() {
|
||||
ShellExecuteA(nullptr, nullptr, "steam://rungameid/284160", nullptr, nullptr, SW_SHOWNORMAL);
|
||||
ShowWindow(GetConsoleWindow(), HIDE_WINDOW);
|
||||
LOG(INFO) << "Sus";
|
||||
}
|
||||
|
||||
void Launcher::WindowsInit() {
|
||||
system("cls");
|
||||
SetConsoleTitleA(("BeamMP Launcher v" + FullVersion).c_str());
|
||||
}
|
||||
#else //WIN32
|
||||
void Launcher::WindowsInit() {}
|
||||
#endif //WIN32
|
||||
}
|
||||
@@ -3,9 +3,8 @@
|
||||
/// Copyright (c) 2021-present Anonymous275 read the LICENSE file for more info.
|
||||
///
|
||||
|
||||
#include <iostream>
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#include <set>
|
||||
|
||||
#include <wx/wxprec.h>
|
||||
#ifndef WX_PRECOMP
|
||||
#include <wx/wx.h>
|
||||
@@ -85,7 +84,7 @@ void MyFrame::OnHello(wxCommandEvent& event) {
|
||||
}
|
||||
|
||||
|
||||
int Entry (int argc, char *argv[]) {
|
||||
int GUIEntry (int argc, char *argv[]) {
|
||||
new MyApp();
|
||||
return wxEntry(argc, argv);
|
||||
}
|
||||
+3
-4
@@ -4,10 +4,9 @@
|
||||
///
|
||||
|
||||
#include "Launcher.h"
|
||||
|
||||
int Entry (int argc, char *argv[]);
|
||||
|
||||
#include "Logger.h"
|
||||
int main(int argc, char* argv[]) {
|
||||
Launcher launcher(argc, argv);
|
||||
return Entry(argc, argv);
|
||||
launcher.launchGame();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user