mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2025-07-04 00:47:23 +00:00
debug fix
This commit is contained in:
parent
b92675e0bf
commit
e3529ca48f
@ -1,6 +1,7 @@
|
|||||||
cmake_minimum_required(VERSION 3.10)
|
cmake_minimum_required(VERSION 3.10)
|
||||||
project(Launcher)
|
project(Launcher)
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
|
||||||
file(GLOB source_files "src/*.cpp" "src/*/*.cpp" "src/*/*.hpp" "include/*.h" "include/*/*.h")
|
file(GLOB source_files "src/*.cpp" "src/*/*.cpp" "src/*/*.hpp" "include/*.h" "include/*/*.h")
|
||||||
add_executable(${PROJECT_NAME} ${source_files})
|
add_executable(${PROJECT_NAME} ${source_files})
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "BeamMP-Launcher")
|
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "BeamMP-Launcher")
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <Psapi.h>
|
#include <Psapi.h>
|
||||||
void DAS(){
|
void DAS(){
|
||||||
|
#ifndef DEBUG
|
||||||
int i = 0;
|
int i = 0;
|
||||||
std::ifstream f(GetEN(), std::ios::binary);
|
std::ifstream f(GetEN(), std::ios::binary);
|
||||||
f.seekg(0, std::ios_base::end);
|
f.seekg(0, std::ios_base::end);
|
||||||
@ -20,8 +21,10 @@ void DAS(){
|
|||||||
}
|
}
|
||||||
if(i)DAboard();
|
if(i)DAboard();
|
||||||
f.close();
|
f.close();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
void DASM(){ //A mirror to have 2 independent checks
|
void DASM(){ //A mirror to have 2 independent checks
|
||||||
|
#ifndef DEBUG
|
||||||
int i = 0;
|
int i = 0;
|
||||||
std::ifstream f(GetEN(), std::ios::binary);
|
std::ifstream f(GetEN(), std::ios::binary);
|
||||||
f.seekg(0, std::ios_base::end);
|
f.seekg(0, std::ios_base::end);
|
||||||
@ -32,6 +35,7 @@ void DASM(){ //A mirror to have 2 independent checks
|
|||||||
}
|
}
|
||||||
if(i)DAboard();
|
if(i)DAboard();
|
||||||
f.close();
|
f.close();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
DWORD getParentPID(DWORD pid){
|
DWORD getParentPID(DWORD pid){
|
||||||
HANDLE h = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
|
HANDLE h = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
|
||||||
|
@ -23,7 +23,7 @@ std::string GetVer(){
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
std::string GetPatch(){
|
std::string GetPatch(){
|
||||||
static std::string r = Sec(".5");
|
static std::string r = Sec(".7");
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
void ReLaunch(int argc,char*args[]){
|
void ReLaunch(int argc,char*args[]){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user