mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2025-08-17 00:35:55 +00:00
remove old stuff
This commit is contained in:
parent
2b02475fd4
commit
b9d252fd8a
@ -19,25 +19,14 @@ find_package(nlohmann_json CONFIG REQUIRED)
|
|||||||
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")
|
||||||
|
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
find_package(OpenSSL REQUIRED)
|
find_package(OpenSSL REQUIRED)
|
||||||
#-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static
|
|
||||||
set(VcpkgRoot ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET})
|
|
||||||
include_directories(${VcpkgRoot}/include)
|
|
||||||
link_directories(${VcpkgRoot}/lib)
|
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE
|
target_link_libraries(${PROJECT_NAME} PRIVATE
|
||||||
ZLIB::ZLIB OpenSSL::SSL OpenSSL::Crypto ws2_32 httplib::httplib nlohmann_json::nlohmann_json)
|
ZLIB::ZLIB OpenSSL::SSL OpenSSL::Crypto ws2_32 httplib::httplib nlohmann_json::nlohmann_json)
|
||||||
|
|
||||||
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE ${VcpkgRoot}/lib/discord-rpc.lib)
|
|
||||||
else ()
|
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE ${VcpkgRoot}/debug/lib/discord-rpc.lib)
|
|
||||||
endif()
|
|
||||||
else(WIN32) #MINGW
|
else(WIN32) #MINGW
|
||||||
add_definitions("-D_WIN32_WINNT=0x0600")
|
add_definitions("-D_WIN32_WINNT=0x0600")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Os -s --static")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Os -s --static")
|
||||||
target_link_libraries(${PROJECT_NAME} discord-rpc ssl crypto ws2_32 ssp crypt32 z)
|
target_link_libraries(${PROJECT_NAME} ssl crypto ws2_32 ssp crypt32 z)
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
target_include_directories(${PROJECT_NAME} PRIVATE "include")
|
target_include_directories(${PROJECT_NAME} PRIVATE "include")
|
@ -1,15 +0,0 @@
|
|||||||
// Copyright (c) 2019-present Anonymous275.
|
|
||||||
// BeamMP Launcher code is not in the public domain and is not free software.
|
|
||||||
// One must be granted explicit permission by the copyright holder in order to modify or distribute any part of the source or binaries.
|
|
||||||
// Anything else is prohibited. Modified works may not be published and have be upstreamed to the official repository.
|
|
||||||
///
|
|
||||||
/// Created by Anonymous275 on 7/16/2020
|
|
||||||
///
|
|
||||||
#pragma once
|
|
||||||
#include <string>
|
|
||||||
void Discord_Main();
|
|
||||||
std::string GetDName();
|
|
||||||
std::string GetDTag();
|
|
||||||
std::string GetDID();
|
|
||||||
void DAboard();
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#if defined(DISCORD_DYNAMIC_LIB)
|
|
||||||
#if defined(_WIN32)
|
|
||||||
#if defined(DISCORD_BUILDING_SDK)
|
|
||||||
#define DISCORD_EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define DISCORD_EXPORT __declspec(dllimport)
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#define DISCORD_EXPORT __attribute__((visibility("default")))
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#define DISCORD_EXPORT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
DISCORD_EXPORT void Discord_Register(const char* applicationId, const char* command);
|
|
||||||
DISCORD_EXPORT void Discord_RegisterSteamGame(const char* applicationId, const char* steamId);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
@ -1,87 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
// clang-format off
|
|
||||||
|
|
||||||
#if defined(DISCORD_DYNAMIC_LIB)
|
|
||||||
# if defined(_WIN32)
|
|
||||||
# if defined(DISCORD_BUILDING_SDK)
|
|
||||||
# define DISCORD_EXPORT __declspec(dllexport)
|
|
||||||
# else
|
|
||||||
# define DISCORD_EXPORT __declspec(dllimport)
|
|
||||||
# endif
|
|
||||||
# else
|
|
||||||
# define DISCORD_EXPORT __attribute__((visibility("default")))
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
# define DISCORD_EXPORT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct DiscordRichPresence {
|
|
||||||
const char* state; /* max 128 bytes */
|
|
||||||
const char* details; /* max 128 bytes */
|
|
||||||
int64_t startTimestamp;
|
|
||||||
int64_t endTimestamp;
|
|
||||||
const char* largeImageKey; /* max 32 bytes */
|
|
||||||
const char* largeImageText; /* max 128 bytes */
|
|
||||||
const char* smallImageKey; /* max 32 bytes */
|
|
||||||
const char* smallImageText; /* max 128 bytes */
|
|
||||||
const char* partyId; /* max 128 bytes */
|
|
||||||
int partySize;
|
|
||||||
int partyMax;
|
|
||||||
const char* matchSecret; /* max 128 bytes */
|
|
||||||
const char* joinSecret; /* max 128 bytes */
|
|
||||||
const char* spectateSecret; /* max 128 bytes */
|
|
||||||
int8_t instance;
|
|
||||||
} DiscordRichPresence;
|
|
||||||
|
|
||||||
typedef struct DiscordUser {
|
|
||||||
const char* userId;
|
|
||||||
const char* username;
|
|
||||||
const char* discriminator;
|
|
||||||
const char* avatar;
|
|
||||||
} DiscordUser;
|
|
||||||
|
|
||||||
typedef struct DiscordEventHandlers {
|
|
||||||
void (*ready)(const DiscordUser* request);
|
|
||||||
void (*disconnected)(int errorCode, const char* message);
|
|
||||||
void (*errored)(int errorCode, const char* message);
|
|
||||||
void (*joinGame)(const char* joinSecret);
|
|
||||||
void (*spectateGame)(const char* spectateSecret);
|
|
||||||
void (*joinRequest)(const DiscordUser* request);
|
|
||||||
} DiscordEventHandlers;
|
|
||||||
|
|
||||||
#define DISCORD_REPLY_NO 0
|
|
||||||
#define DISCORD_REPLY_YES 1
|
|
||||||
#define DISCORD_REPLY_IGNORE 2
|
|
||||||
|
|
||||||
DISCORD_EXPORT void Discord_Initialize(const char* applicationId,
|
|
||||||
DiscordEventHandlers* handlers,
|
|
||||||
int autoRegister,
|
|
||||||
const char* optionalSteamId);
|
|
||||||
DISCORD_EXPORT void Discord_Shutdown(void);
|
|
||||||
|
|
||||||
/* checks for incoming messages, dispatches callbacks */
|
|
||||||
DISCORD_EXPORT void Discord_RunCallbacks(void);
|
|
||||||
|
|
||||||
/* If you disable the lib starting its own io thread, you'll need to call this from your own */
|
|
||||||
#ifdef DISCORD_DISABLE_IO_THREAD
|
|
||||||
DISCORD_EXPORT void Discord_UpdateConnection(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
DISCORD_EXPORT void Discord_UpdatePresence(const DiscordRichPresence* presence);
|
|
||||||
DISCORD_EXPORT void Discord_ClearPresence(void);
|
|
||||||
|
|
||||||
DISCORD_EXPORT void Discord_Respond(const char* userid, /* DISCORD_REPLY_ */ int reply);
|
|
||||||
|
|
||||||
DISCORD_EXPORT void Discord_UpdateHandlers(DiscordEventHandlers* handlers);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
} /* extern "C" */
|
|
||||||
#endif
|
|
@ -10,7 +10,6 @@
|
|||||||
#include <httplib.h>
|
#include <httplib.h>
|
||||||
#include "zip_file.h"
|
#include "zip_file.h"
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "Discord/discord_info.h"
|
|
||||||
#include "Network/network.h"
|
#include "Network/network.h"
|
||||||
#include "Security/Init.h"
|
#include "Security/Init.h"
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
@ -178,7 +177,6 @@ void InitLauncher(int argc, char* argv[]) {
|
|||||||
CheckLocalKey();
|
CheckLocalKey();
|
||||||
ConfigInit();
|
ConfigInit();
|
||||||
CustomPort(argc, argv);
|
CustomPort(argc, argv);
|
||||||
Discord_Main();
|
|
||||||
CheckForUpdates(argc, argv, std::string(GetVer()) + GetPatch());
|
CheckForUpdates(argc, argv, std::string(GetVer()) + GetPatch());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user