Compare commits
3 Commits
841af0566f
...
eb6ca7b665
Author | SHA1 | Date |
---|---|---|
Nemirtingas | eb6ca7b665 | |
Nemirtingas | e66a97c012 | |
Nemirtingas | 34ecb5648a |
|
@ -11,22 +11,13 @@ static:linux:deps:
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- apt update && apt -y install libgl1-mesa-dev libgl1-mesa-dev:i386
|
- apt update && apt -y install libgl1-mesa-dev libgl1-mesa-dev:i386
|
||||||
|
- dependencies=("glew" "protobuf[zlib]" "curl[core,openssl]" "nlohmann-json" "nlohmann-fifo-map" "stb")
|
||||||
- cp -f vcpkg_triplets/*.cmake /vcpkg/triplets/
|
- cp -f vcpkg_triplets/*.cmake /vcpkg/triplets/
|
||||||
- VCPKG_PATH=$(pwd)/vcpkg
|
- VCPKG_PATH=$(pwd)/vcpkg
|
||||||
- TRIPLET=x86-linux-goldberg
|
- TRIPLET=x86-linux-goldberg
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install protobuf[zlib]:${TRIPLET} || exit 1
|
- vcpkg "--x-install-root=${VCPKG_PATH}" install --triplet=${TRIPLET} "${dependencies[@]}" || exit 1
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install curl[core,openssl]:${TRIPLET} || exit 1
|
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install stb:${TRIPLET} || exit 1
|
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install glew:${TRIPLET} || exit 1
|
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install nlohmann-json:${TRIPLET} || exit 1
|
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install nlohmann-fifo-map:${TRIPLET} || exit 1
|
|
||||||
- TRIPLET=x64-linux-goldberg
|
- TRIPLET=x64-linux-goldberg
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install protobuf[zlib]:${TRIPLET} || exit 1
|
- vcpkg "--x-install-root=${VCPKG_PATH}" install --triplet=${TRIPLET} "${dependencies[@]}" || exit 1
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install curl[core,openssl]:${TRIPLET} || exit 1
|
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install stb:${TRIPLET} || exit 1
|
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install glew:${TRIPLET} || exit 1
|
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install nlohmann-json:${TRIPLET} || exit 1
|
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install nlohmann-fifo-map:${TRIPLET} || exit 1
|
|
||||||
- exit 0
|
- exit 0
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
|
@ -44,24 +35,15 @@ static:windows:deps:
|
||||||
#when: manual
|
#when: manual
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- VCPKG_PATH=$(pwd)/vcpkg
|
- dependencies=("glew" "protobuf[zlib]" "curl[core,winssl]" "nlohmann-json" "nlohmann-fifo-map" "stb")
|
||||||
- cp -f vcpkg_triplets/*.cmake /vcpkg/triplets/
|
- cp -f vcpkg_triplets/*.cmake /vcpkg/triplets/
|
||||||
|
- VCPKG_PATH=$(pwd)/vcpkg
|
||||||
- TRIPLET=x64-linux
|
- TRIPLET=x64-linux
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install protobuf:${TRIPLET} || exit 1
|
- vcpkg "--x-install-root=${VCPKG_PATH}" install protobuf:${TRIPLET} || exit 1
|
||||||
- TRIPLET=x86-windows-goldberg
|
- TRIPLET=x86-windows-goldberg
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install protobuf[zlib]:${TRIPLET} || exit 1
|
- vcpkg "--x-install-root=${VCPKG_PATH}" install --triplet=${TRIPLET} "${dependencies[@]}" || exit 1
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install curl[core,winssl]:${TRIPLET} || exit 1
|
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install stb:${TRIPLET} || exit 1
|
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install glew:${TRIPLET} || exit 1
|
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install nlohmann-json:${TRIPLET} || exit 1
|
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install nlohmann-fifo-map:${TRIPLET} || exit 1
|
|
||||||
- TRIPLET=x64-windows-goldberg
|
- TRIPLET=x64-windows-goldberg
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install protobuf[zlib]:${TRIPLET} || exit 1
|
- vcpkg "--x-install-root=${VCPKG_PATH}" install --triplet=${TRIPLET} "${dependencies[@]}" || exit 1
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install curl[core,winssl]:${TRIPLET} || exit 1
|
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install stb:${TRIPLET} || exit 1
|
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install glew:${TRIPLET} || exit 1
|
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install nlohmann-json:${TRIPLET} || exit 1
|
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install nlohmann-fifo-map:${TRIPLET} || exit 1
|
|
||||||
- exit 0
|
- exit 0
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
|
@ -79,22 +61,15 @@ static:macosx:deps:
|
||||||
#when: manual
|
#when: manual
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- VCPKG_PATH=$(pwd)/vcpkg
|
- dependencies=("protobuf[zlib]" "curl[core,openssl]" "nlohmann-json" "nlohmann-fifo-map" "stb")
|
||||||
- cp -f vcpkg_triplets/*.cmake /vcpkg/triplets/
|
- cp -f vcpkg_triplets/*.cmake /vcpkg/triplets/
|
||||||
|
- VCPKG_PATH=$(pwd)/vcpkg
|
||||||
- TRIPLET=x64-linux
|
- TRIPLET=x64-linux
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install protobuf:${TRIPLET} || exit 1
|
- vcpkg "--x-install-root=${VCPKG_PATH}" install protobuf:${TRIPLET} || exit 1
|
||||||
- TRIPLET=x86-macosx-goldberg
|
- TRIPLET=x86-macosx-goldberg
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install protobuf[zlib]:${TRIPLET} || exit 1
|
- vcpkg "--x-install-root=${VCPKG_PATH}" install --triplet=${TRIPLET} "${dependencies[@]}" || exit 1
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install curl[core,openssl]:${TRIPLET} || exit 1
|
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install stb:${TRIPLET} || exit 1
|
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install nlohmann-json:${TRIPLET} || exit 1
|
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install nlohmann-fifo-map:${TRIPLET} || exit 1
|
|
||||||
- TRIPLET=x64-macosx-goldberg
|
- TRIPLET=x64-macosx-goldberg
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install protobuf[zlib]:${TRIPLET} || exit 1
|
- vcpkg "--x-install-root=${VCPKG_PATH}" install --triplet=${TRIPLET} "${dependencies[@]}" || exit 1
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install curl[core,openssl]:${TRIPLET} || exit 1
|
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install stb:${TRIPLET} || exit 1
|
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install nlohmann-json:${TRIPLET} || exit 1
|
|
||||||
- vcpkg "--x-install-root=${VCPKG_PATH}" install nlohmann-fifo-map:${TRIPLET} || exit 1
|
|
||||||
- exit 0
|
- exit 0
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
|
@ -206,6 +181,7 @@ build:macosx:
|
||||||
protobuf_static_steamos:
|
protobuf_static_steamos:
|
||||||
stage: dependencies
|
stage: dependencies
|
||||||
image: tianon/steamos
|
image: tianon/steamos
|
||||||
|
when: manual
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# don't rebuild every time
|
# don't rebuild every time
|
||||||
|
@ -299,21 +275,19 @@ build_windows:
|
||||||
|
|
||||||
deploy_all:
|
deploy_all:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
image: fedora
|
image: alpine
|
||||||
dependencies:
|
dependencies:
|
||||||
- build_windows
|
- build:windows
|
||||||
- build_steamos
|
- build:linux
|
||||||
|
- build:macosx
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
- apk --no-cache add git tree
|
||||||
- ls -lah
|
- ls -lah
|
||||||
- dnf -y install git tree
|
|
||||||
- mkdir -p release/source_code
|
- mkdir -p release/source_code
|
||||||
- git bundle create release/source_code/source_code.bundle --all
|
- git bundle create release/source_code/source_code.bundle --all
|
||||||
- "echo \"This is a git bundle of the full repo, to use: git clone source_code.bundle --branch master\" > release/source_code/Readme.txt"
|
- "echo \"This is a git bundle of the full repo, to use: git clone source_code.bundle --branch master\" > release/source_code/Readme.txt"
|
||||||
- mv linux release/
|
- find . -mindepth 1 -maxdepth 1 ! -name release -exec rm -rf '{}' \;
|
||||||
- shopt -s extglob
|
|
||||||
- rm -rf .g*
|
|
||||||
- rm -rf !(release)
|
|
||||||
- mv release/* ./
|
- mv release/* ./
|
||||||
- rm -rf release
|
- rm -rf release
|
||||||
- echo $CI_JOB_ID > job_id
|
- echo $CI_JOB_ID > job_id
|
||||||
|
|
196
CMakeLists.txt
196
CMakeLists.txt
|
@ -1,8 +1,6 @@
|
||||||
# Based on: https://github.com/ttroy50/cmake-examples/blob/master/03-code-generation/protobuf/CMakeLists.txt
|
|
||||||
cmake_minimum_required(VERSION 3.6)
|
|
||||||
|
|
||||||
# Set the project name
|
|
||||||
project(goldberg_emulator)
|
project(goldberg_emulator)
|
||||||
|
cmake_minimum_required(VERSION 3.0)
|
||||||
|
|
||||||
# Workaround because cross-compiling with CMake + vcpkg fucks up this variable
|
# Workaround because cross-compiling with CMake + vcpkg fucks up this variable
|
||||||
# making the 'find_*' functions/macros somehow fail to find the right arch.
|
# making the 'find_*' functions/macros somehow fail to find the right arch.
|
||||||
|
@ -41,7 +39,7 @@ if(WIN32) # Setup some variables for Windows build
|
||||||
|
|
||||||
if(X64)
|
if(X64)
|
||||||
set(LIB_STEAM_API steam_api64)
|
set(LIB_STEAM_API steam_api64)
|
||||||
set(LIB_STEAMCLIENT steamclient64)
|
set(LIB_STEAMCLIENT steamclient64)
|
||||||
set(OUT_DIR win64)
|
set(OUT_DIR win64)
|
||||||
elseif(X86)
|
elseif(X86)
|
||||||
set(LIB_STEAM_API steam_api)
|
set(LIB_STEAM_API steam_api)
|
||||||
|
@ -51,19 +49,21 @@ if(WIN32) # Setup some variables for Windows build
|
||||||
message(FATAL_ERROR "Arch unknown")
|
message(FATAL_ERROR "Arch unknown")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
file(
|
file(
|
||||||
GLOB
|
GLOB
|
||||||
OVERLAY_EXPERIMENTAL_SRC_SHARED
|
overlay_sources
|
||||||
overlay_experimental/*.cpp
|
overlay_experimental/*.cpp
|
||||||
overlay_experimental/windows/*.cpp
|
overlay_experimental/windows/*.cpp
|
||||||
ImGui/*.cpp
|
ImGui/*.cpp
|
||||||
ImGui/impls/*.cpp
|
ImGui/impls/*.cpp
|
||||||
ImGui/impls/windows/*.cpp
|
ImGui/impls/windows/*.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(overlay_includes
|
set(overlay_includes
|
||||||
overlay/
|
overlay_experimental/
|
||||||
overlay/windows/
|
overlay_experimental/windows/
|
||||||
|
ImGui/
|
||||||
)
|
)
|
||||||
|
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
|
@ -86,19 +86,22 @@ elseif(APPLE)
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Arch unknown")
|
message(FATAL_ERROR "Arch unknown")
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
|
||||||
|
|
||||||
set(LIB_STEAM_API steam_api)
|
set(LIB_STEAM_API steam_api)
|
||||||
set(LIB_STEAMCLIENT steamclient)
|
set(LIB_STEAMCLIENT steamclient)
|
||||||
|
|
||||||
file(
|
file(
|
||||||
GLOB
|
GLOB
|
||||||
OVERLAY_EXPERIMENTAL_SRC_SHARED
|
overlay_sources
|
||||||
overlay/*.cpp
|
overlay_experimental/Renderer_Detector.cpp
|
||||||
|
overlay_experimental/macosx/*.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(overlay_includes
|
set(overlay_includes
|
||||||
overlay/
|
overlay_experimental/
|
||||||
|
overlay_experimental/macosx/
|
||||||
|
ImGui/
|
||||||
)
|
)
|
||||||
|
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
|
@ -126,17 +129,18 @@ elseif(UNIX)
|
||||||
|
|
||||||
file(
|
file(
|
||||||
GLOB
|
GLOB
|
||||||
OVERLAY_EXPERIMENTAL_SRC_SHARED
|
overlay_sources
|
||||||
overlay_experimental/*.cpp
|
overlay_experimental/*.cpp
|
||||||
overlay_experimental/linux/*.cpp
|
overlay_experimental/linux/*.cpp
|
||||||
ImGui/*.cpp
|
ImGui/*.cpp
|
||||||
ImGui/impls/*.cpp
|
ImGui/impls/*.cpp
|
||||||
ImGui/impls/linux/*.cpp
|
ImGui/impls/linux/*.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(overlay_includes
|
set(overlay_includes
|
||||||
overlay/
|
overlay_experimental/
|
||||||
overlay/linux/
|
overlay_experimental/linux/
|
||||||
|
ImGui/
|
||||||
)
|
)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
|
@ -152,7 +156,6 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
|
|
||||||
# Add option to enable experimental build
|
|
||||||
option(EMU_EXPERIMENTAL_BUILD "Enable experimental build" OFF)
|
option(EMU_EXPERIMENTAL_BUILD "Enable experimental build" OFF)
|
||||||
if(EMU_EXPERIMENTAL_BUILD)
|
if(EMU_EXPERIMENTAL_BUILD)
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
@ -164,6 +167,9 @@ else()
|
||||||
set(EMU_OVERLAY OFF)
|
set(EMU_OVERLAY OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
#set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Debug or Release")
|
||||||
|
|
||||||
set(Protobuf_USE_STATIC_LIBS ON)
|
set(Protobuf_USE_STATIC_LIBS ON)
|
||||||
include(FindProtobuf)
|
include(FindProtobuf)
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
|
@ -174,42 +180,46 @@ find_package(nlohmann-fifo-map CONFIG REQUIRED)
|
||||||
find_path(STB_INCLUDE_DIRS "stb.h")
|
find_path(STB_INCLUDE_DIRS "stb.h")
|
||||||
|
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
find_package(OpenSSL REQUIRED)
|
find_package(OpenSSL REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT APPLE)
|
if(NOT APPLE AND EMU_OVERLAY)
|
||||||
find_package(GLEW REQUIRED)
|
find_package(GLEW REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Generate the .h and .cxx files for dll/net.proto
|
########################################
|
||||||
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS dll/net.proto)
|
## net.h net.cc
|
||||||
|
file(
|
||||||
|
GLOB
|
||||||
|
protobuf_sources
|
||||||
|
dll/*.proto
|
||||||
|
)
|
||||||
|
protobuf_generate_cpp(net_PROTO_SRCS net_PROTO_HDRS ${protobuf_sources})
|
||||||
|
|
||||||
# Print path to generated files
|
########################################
|
||||||
message(STATUS "PROTO_SRCS = ${PROTO_SRCS}")
|
## steamclient[64].dll
|
||||||
message(STATUS "PROTO_HDRS = ${PROTO_HDRS}")
|
file(
|
||||||
|
GLOB
|
||||||
# Gather the files that are shared between multiple targets
|
emu_sources
|
||||||
file(GLOB DLL_SRC_SHARED
|
dll/*.cpp
|
||||||
dll/*.h
|
|
||||||
dll/*.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
file(GLOB DETOURS_SRC_SHARED
|
file(GLOB detour_sources
|
||||||
detours/*.cpp
|
detours/*.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
###################################################
|
###################################################
|
||||||
# Setup for the steam_api(64).dll / libsteam_api.so
|
# Setup for the steam_api
|
||||||
###################################################
|
###################################################
|
||||||
|
|
||||||
# Setup the target
|
# Setup the target
|
||||||
add_library(${LIB_STEAM_API}
|
add_library(${LIB_STEAM_API}
|
||||||
SHARED
|
SHARED
|
||||||
$<$<BOOL:${EMU_EXPERIMENTAL_BUILD}>:${DETOURS_SRC_SHARED}>
|
$<$<BOOL:${EMU_EXPERIMENTAL_BUILD}>:${detour_sources}>
|
||||||
$<$<AND:$<BOOL:${EMU_EXPERIMENTAL_BUILD}>,$<BOOL:${EMU_OVERLAY}>>:${OVERLAY_EXPERIMENTAL_SRC_SHARED}>
|
$<$<AND:$<BOOL:${EMU_EXPERIMENTAL_BUILD}>,$<BOOL:${EMU_OVERLAY}>>:${overlay_sources}>
|
||||||
${DLL_SRC_SHARED}
|
${emu_sources}
|
||||||
${PROTO_SRCS}
|
${net_PROTO_SRCS}
|
||||||
${PROTO_HDRS}
|
${net_PROTO_HDRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
# Include the required directories
|
# Include the required directories
|
||||||
|
@ -219,7 +229,7 @@ target_include_directories(
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
${STB_INCLUDE_DIRS}
|
${STB_INCLUDE_DIRS}
|
||||||
|
|
||||||
overlay_experimental
|
${overlay_includes}
|
||||||
)
|
)
|
||||||
|
|
||||||
# Link the required libraries
|
# Link the required libraries
|
||||||
|
@ -227,10 +237,11 @@ target_link_libraries(${LIB_STEAM_API}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
Threads::Threads
|
Threads::Threads
|
||||||
protobuf::libprotobuf-lite
|
protobuf::libprotobuf-lite
|
||||||
#nlohmann_json::nlohmann_json doesn't work
|
nlohmann_json::nlohmann_json
|
||||||
nlohmann-fifo-map::nlohmann-fifo-map
|
nlohmann-fifo-map::nlohmann-fifo-map
|
||||||
|
|
||||||
$<$<NOT:$<BOOL:${APPLE}>>:GLEW::GLEW>
|
|
||||||
|
$<$<AND:$<NOT:$<BOOL:${APPLE}>>,$<BOOL:${EMU_OVERLAY}>>:GLEW::GLEW>
|
||||||
|
|
||||||
$<$<BOOL:${WIN32}>:comdlg32>
|
$<$<BOOL:${WIN32}>:comdlg32>
|
||||||
$<$<BOOL:${WIN32}>:advapi32>
|
$<$<BOOL:${WIN32}>:advapi32>
|
||||||
|
@ -244,7 +255,7 @@ target_link_libraries(${LIB_STEAM_API}
|
||||||
# For library UNIX loading
|
# For library UNIX loading
|
||||||
$<$<NOT:$<BOOL:${WIN32}>>:dl>
|
$<$<NOT:$<BOOL:${WIN32}>>:dl>
|
||||||
# For overlay opengl
|
# For overlay opengl
|
||||||
$<$<AND:$<BOOL:${UNIX}>,$<NOT:$<BOOL:${APPLE}>>>:GL>
|
$<$<AND:$<BOOL:${UNIX}>,$<NOT:$<BOOL:${APPLE}>>,$<BOOL:${EMU_OVERLAY}>>:GL>
|
||||||
)
|
)
|
||||||
|
|
||||||
# Add target compile definitions
|
# Add target compile definitions
|
||||||
|
@ -262,17 +273,17 @@ target_compile_definitions(${LIB_STEAM_API}
|
||||||
)
|
)
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
# Setup for the steamclient(64).dll / libsteamclient.so?
|
# Setup for the steamclient
|
||||||
########################################################
|
########################################################
|
||||||
|
|
||||||
# Setup the target
|
# Setup the target
|
||||||
add_library(${LIB_STEAMCLIENT}
|
add_library(${LIB_STEAMCLIENT}
|
||||||
SHARED
|
SHARED
|
||||||
$<$<BOOL:${EMU_EXPERIMENTAL_BUILD}>:${DETOURS_SRC_SHARED}>
|
$<$<BOOL:${EMU_EXPERIMENTAL_BUILD}>:${detour_sources}>
|
||||||
$<$<AND:$<BOOL:${EMU_EXPERIMENTAL_BUILD}>,$<BOOL:${EMU_OVERLAY}>>:${OVERLAY_EXPERIMENTAL_SRC_SHARED}>
|
$<$<AND:$<BOOL:${EMU_EXPERIMENTAL_BUILD}>,$<BOOL:${EMU_OVERLAY}>>:${overlay_sources}>
|
||||||
${DLL_SRC_SHARED}
|
${emu_sources}
|
||||||
${PROTO_SRCS}
|
${net_PROTO_SRCS}
|
||||||
${PROTO_HDRS}
|
${net_PROTO_HDRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
|
@ -286,7 +297,7 @@ target_include_directories(
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
${STB_INCLUDE_DIRS}
|
${STB_INCLUDE_DIRS}
|
||||||
|
|
||||||
overlay_experimental
|
${overlay_includes}
|
||||||
)
|
)
|
||||||
|
|
||||||
# Link the required libraries
|
# Link the required libraries
|
||||||
|
@ -294,10 +305,10 @@ target_link_libraries(${LIB_STEAMCLIENT}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
Threads::Threads
|
Threads::Threads
|
||||||
protobuf::libprotobuf-lite
|
protobuf::libprotobuf-lite
|
||||||
#nlohmann_json::nlohmann_json doesn't work
|
nlohmann_json::nlohmann_json
|
||||||
nlohmann-fifo-map::nlohmann-fifo-map
|
nlohmann-fifo-map::nlohmann-fifo-map
|
||||||
|
|
||||||
$<$<NOT:$<BOOL:${APPLE}>>:GLEW::GLEW>
|
$<$<AND:$<NOT:$<BOOL:${APPLE}>>,$<BOOL:${EMU_OVERLAY}>>:GLEW::GLEW>
|
||||||
|
|
||||||
$<$<BOOL:${WIN32}>:comdlg32>
|
$<$<BOOL:${WIN32}>:comdlg32>
|
||||||
$<$<BOOL:${WIN32}>:advapi32>
|
$<$<BOOL:${WIN32}>:advapi32>
|
||||||
|
@ -311,7 +322,7 @@ target_link_libraries(${LIB_STEAMCLIENT}
|
||||||
# For library UNIX loading
|
# For library UNIX loading
|
||||||
$<$<NOT:$<BOOL:${WIN32}>>:dl>
|
$<$<NOT:$<BOOL:${WIN32}>>:dl>
|
||||||
# For overlay opengl
|
# For overlay opengl
|
||||||
$<$<AND:$<BOOL:${UNIX}>,$<NOT:$<BOOL:${APPLE}>>>:GL>
|
$<$<AND:$<BOOL:${UNIX}>,$<NOT:$<BOOL:${APPLE}>>,$<BOOL:${EMU_OVERLAY}>>:GL>
|
||||||
)
|
)
|
||||||
|
|
||||||
# Add target compile definitions
|
# Add target compile definitions
|
||||||
|
@ -329,44 +340,24 @@ target_compile_definitions(${LIB_STEAMCLIENT}
|
||||||
$<$<BOOL:${EMU_OVERLAY}>:EMU_OVERLAY>
|
$<$<BOOL:${EMU_OVERLAY}>:EMU_OVERLAY>
|
||||||
)
|
)
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
# Setup for the steamnetworkingsockets(64).dll / libsteamnetworkingsockets.so?
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
# Setup the target
|
|
||||||
add_library(steamnetworkingsockets
|
|
||||||
SHARED
|
|
||||||
steamnetworkingsockets.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
# Add target compile definitions
|
|
||||||
target_compile_definitions(steamnetworkingsockets
|
|
||||||
PRIVATE
|
|
||||||
$<$<CONFIG:>:EMU_RELEASE_BUILD>
|
|
||||||
$<$<CONFIG:Release>:EMU_RELEASE_BUILD>
|
|
||||||
$<$<CONFIG:RelWithDebInfo>:EMU_RELEASE_BUILD>
|
|
||||||
$<$<CONFIG:MinSizeRel>:EMU_RELEASE_BUILD>
|
|
||||||
$<$<BOOL:${EMU_EXPERIMENTAL_BUILD}>:EMU_EXPERIMENTAL_BUILD>
|
|
||||||
)
|
|
||||||
|
|
||||||
set_target_properties(steamnetworkingsockets PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1)
|
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# Setup for the lobby_connect(64).exe / lobby_connect
|
# Setup for the lobby_connect
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
# Setup the target
|
# Setup the target
|
||||||
add_executable(lobby_connect
|
add_executable(lobby_connect
|
||||||
lobby_connect.cpp
|
lobby_connect.cpp
|
||||||
$<$<BOOL:${EMU_EXPERIMENTAL_BUILD}>:${DETOURS_SRC_SHARED}>
|
${emu_sources}
|
||||||
${DLL_SRC_SHARED}
|
${net_PROTO_SRCS}
|
||||||
${PROTO_SRCS}
|
${net_PROTO_HDRS}
|
||||||
${PROTO_HDRS}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(lobby_connect
|
# Include the required directories
|
||||||
|
target_include_directories(
|
||||||
|
lobby_connect
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
${STB_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
# Link the required libraries
|
# Link the required libraries
|
||||||
|
@ -374,8 +365,8 @@ target_link_libraries(lobby_connect
|
||||||
PRIVATE
|
PRIVATE
|
||||||
Threads::Threads
|
Threads::Threads
|
||||||
protobuf::libprotobuf-lite
|
protobuf::libprotobuf-lite
|
||||||
#nlohmann_json::nlohmann_json doesn't work
|
nlohmann_json::nlohmann_json
|
||||||
nlohmann-fifo-map::nlohmann-fifo-map
|
nlohmann-fifo-map::nlohmann-fifo-map
|
||||||
|
|
||||||
$<$<BOOL:${WIN32}>:comdlg32>
|
$<$<BOOL:${WIN32}>:comdlg32>
|
||||||
$<$<BOOL:${WIN32}>:advapi32>
|
$<$<BOOL:${WIN32}>:advapi32>
|
||||||
|
@ -386,8 +377,6 @@ target_link_libraries(lobby_connect
|
||||||
|
|
||||||
# For library UNIX loading
|
# For library UNIX loading
|
||||||
$<$<NOT:$<BOOL:${WIN32}>>:dl>
|
$<$<NOT:$<BOOL:${WIN32}>>:dl>
|
||||||
|
|
||||||
-debug:none
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Add target compile definitions
|
# Add target compile definitions
|
||||||
|
@ -395,15 +384,15 @@ target_compile_definitions(lobby_connect
|
||||||
PRIVATE
|
PRIVATE
|
||||||
NO_DISK_WRITES
|
NO_DISK_WRITES
|
||||||
LOBBY_CONNECT
|
LOBBY_CONNECT
|
||||||
|
|
||||||
$<$<CONFIG:>:EMU_RELEASE_BUILD>
|
$<$<CONFIG:>:EMU_RELEASE_BUILD>
|
||||||
$<$<CONFIG:Release>:EMU_RELEASE_BUILD>
|
$<$<CONFIG:Release>:EMU_RELEASE_BUILD>
|
||||||
$<$<CONFIG:RelWithDebInfo>:EMU_RELEASE_BUILD>
|
$<$<CONFIG:RelWithDebInfo>:EMU_RELEASE_BUILD>
|
||||||
$<$<CONFIG:MinSizeRel>:EMU_RELEASE_BUILD>
|
$<$<CONFIG:MinSizeRel>:EMU_RELEASE_BUILD>
|
||||||
$<$<BOOL:${EMU_EXPERIMENTAL_BUILD}>:EMU_EXPERIMENTAL_BUILD>
|
|
||||||
)
|
)
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# Setup for the generate_interfaces_file(64).exe / generate_interfaces_file
|
# Setup for the generate_interfaces_file
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
# Setup the target
|
# Setup the target
|
||||||
|
@ -419,6 +408,25 @@ target_link_libraries(
|
||||||
-debug:none
|
-debug:none
|
||||||
)
|
)
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# Setup for the generate_game_infos
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
# Setup the target
|
||||||
|
add_executable(
|
||||||
|
generate_game_infos
|
||||||
|
generate_game_infos/generate_game_infos.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
# Link the required libraries
|
||||||
|
target_link_libraries(
|
||||||
|
generate_game_infos
|
||||||
|
PRIVATE
|
||||||
|
nlohmann_json::nlohmann_json
|
||||||
|
nlohmann-fifo-map::nlohmann-fifo-map
|
||||||
|
CURL::libcurl
|
||||||
|
-debug:none
|
||||||
|
)
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# Installation setup
|
# Installation setup
|
||||||
|
@ -451,6 +459,12 @@ install(FILES
|
||||||
DESTINATION ${OUT_DIR}/tools/generate_interfaces
|
DESTINATION ${OUT_DIR}/tools/generate_interfaces
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# generate_game_infos
|
||||||
|
install(TARGETS
|
||||||
|
generate_game_infos
|
||||||
|
RUNTIME DESTINATION ${OUT_DIR}/tools/generate_game_infos
|
||||||
|
)
|
||||||
|
|
||||||
# lobby_connect
|
# lobby_connect
|
||||||
install(TARGETS
|
install(TARGETS
|
||||||
lobby_connect
|
lobby_connect
|
||||||
|
|
|
@ -1,520 +0,0 @@
|
||||||
{
|
|
||||||
"configurations": [
|
|
||||||
{
|
|
||||||
"name": "Windows-x64-Release",
|
|
||||||
"generator": "Ninja",
|
|
||||||
"configurationType": "RelWithDebInfo",
|
|
||||||
"inheritEnvironments": [ "msvc_x64_x64" ],
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "-v",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"variables": [
|
|
||||||
{
|
|
||||||
"name": "VCPKG_TARGET_TRIPLET",
|
|
||||||
"value": "x64-windows-static",
|
|
||||||
"type": "STRING"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"cmakeToolchain": "../vcpkg/scripts/buildsystems/vcpkg.cmake"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Windows-x64-Debug",
|
|
||||||
"generator": "Ninja",
|
|
||||||
"configurationType": "Debug",
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "-v",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"inheritEnvironments": [ "msvc_x64_x64" ],
|
|
||||||
"variables": [
|
|
||||||
{
|
|
||||||
"name": "VCPKG_TARGET_TRIPLET",
|
|
||||||
"value": "x64-windows-static",
|
|
||||||
"type": "STRING"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"cmakeToolchain": "../vcpkg/scripts/buildsystems/vcpkg.cmake"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Windows-x86-Release",
|
|
||||||
"generator": "Ninja",
|
|
||||||
"configurationType": "RelWithDebInfo",
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "-v",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"inheritEnvironments": [ "msvc_x86" ],
|
|
||||||
"variables": [
|
|
||||||
{
|
|
||||||
"name": "VCPKG_TARGET_TRIPLET",
|
|
||||||
"value": "x86-windows-static",
|
|
||||||
"type": "STRING"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"cmakeToolchain": "../vcpkg/scripts/buildsystems/vcpkg.cmake"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Windows-x86-Debug",
|
|
||||||
"generator": "Ninja",
|
|
||||||
"configurationType": "Debug",
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "-v",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"inheritEnvironments": [ "msvc_x86" ],
|
|
||||||
"variables": [
|
|
||||||
{
|
|
||||||
"name": "VCPKG_TARGET_TRIPLET",
|
|
||||||
"value": "x86-windows-static",
|
|
||||||
"type": "STRING"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"cmakeToolchain": "../vcpkg/scripts/buildsystems/vcpkg.cmake"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Linux-x64-Release",
|
|
||||||
"generator": "Unix Makefiles",
|
|
||||||
"configurationType": "RelWithDebInfo",
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeExecutable": "/usr/local/bin/cmake",
|
|
||||||
"remoteCopySourcesExclusionList": [ ".vs", ".git" ],
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"inheritEnvironments": [ "linux_x64" ],
|
|
||||||
"remoteMachineName": "${defaultRemoteMachineName}",
|
|
||||||
"remoteCMakeListsRoot": "/var/tmp/src/${workspaceHash}/${name}",
|
|
||||||
"remoteBuildRoot": "/var/tmp/build/${workspaceHash}/build/${name}",
|
|
||||||
"remoteInstallRoot": "/var/tmp/build/${workspaceHash}/install/${name}",
|
|
||||||
"remoteCopySources": true,
|
|
||||||
"rsyncCommandArgs": "-t --delete --delete-excluded",
|
|
||||||
"remoteCopyBuildOutput": true,
|
|
||||||
"remoteCopySourcesMethod": "rsync",
|
|
||||||
"variables": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Linux-x64-Debug",
|
|
||||||
"generator": "Unix Makefiles",
|
|
||||||
"configurationType": "Debug",
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeExecutable": "/usr/local/bin/cmake",
|
|
||||||
"remoteCopySourcesExclusionList": [ ".vs", ".git" ],
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"inheritEnvironments": [ "linux_x64" ],
|
|
||||||
"remoteMachineName": "${defaultRemoteMachineName}",
|
|
||||||
"remoteCMakeListsRoot": "/var/tmp/src/${workspaceHash}/${name}",
|
|
||||||
"remoteBuildRoot": "/var/tmp/build/${workspaceHash}/build/${name}",
|
|
||||||
"remoteInstallRoot": "/var/tmp/build/${workspaceHash}/install/${name}",
|
|
||||||
"remoteCopySources": true,
|
|
||||||
"rsyncCommandArgs": "-t --delete --delete-excluded",
|
|
||||||
"remoteCopyBuildOutput": true,
|
|
||||||
"remoteCopySourcesMethod": "rsync",
|
|
||||||
"variables": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Linux-x86-Release",
|
|
||||||
"generator": "Unix Makefiles",
|
|
||||||
"configurationType": "RelWithDebInfo",
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeExecutable": "/usr/local/bin/cmake",
|
|
||||||
"remoteCopySourcesExclusionList": [ ".vs", ".git" ],
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"inheritEnvironments": [ "linux_x86" ],
|
|
||||||
"remoteMachineName": "${defaultRemoteMachineName}",
|
|
||||||
"remoteCMakeListsRoot": "/var/tmp/src/${workspaceHash}/${name}",
|
|
||||||
"remoteBuildRoot": "/var/tmp/build/${workspaceHash}/build/${name}",
|
|
||||||
"remoteInstallRoot": "/var/tmp/build/${workspaceHash}/install/${name}",
|
|
||||||
"remoteCopySources": true,
|
|
||||||
"rsyncCommandArgs": "-t --delete --delete-excluded",
|
|
||||||
"remoteCopyBuildOutput": true,
|
|
||||||
"remoteCopySourcesMethod": "rsync",
|
|
||||||
"variables": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Linux-x86-Debug",
|
|
||||||
"generator": "Unix Makefiles",
|
|
||||||
"configurationType": "Debug",
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeExecutable": "/usr/local/bin/cmake",
|
|
||||||
"remoteCopySourcesExclusionList": [ ".vs", ".git" ],
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"inheritEnvironments": [ "linux_x86" ],
|
|
||||||
"remoteMachineName": "${defaultRemoteMachineName}",
|
|
||||||
"remoteCMakeListsRoot": "/var/tmp/src/${workspaceHash}/${name}",
|
|
||||||
"remoteBuildRoot": "/var/tmp/build/${workspaceHash}/build/${name}",
|
|
||||||
"remoteInstallRoot": "/var/tmp/build/${workspaceHash}/install/${name}",
|
|
||||||
"remoteCopySources": true,
|
|
||||||
"rsyncCommandArgs": "-t --delete --delete-excluded",
|
|
||||||
"remoteCopyBuildOutput": true,
|
|
||||||
"remoteCopySourcesMethod": "rsync",
|
|
||||||
"variables": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Windows-x64-ExperimentalRelease",
|
|
||||||
"generator": "Ninja",
|
|
||||||
"configurationType": "RelWithDebInfo",
|
|
||||||
"inheritEnvironments": [ "msvc_x64_x64" ],
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "-v",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"variables": [
|
|
||||||
{
|
|
||||||
"name": "VCPKG_TARGET_TRIPLET",
|
|
||||||
"value": "x64-windows-static",
|
|
||||||
"type": "STRING"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "EMU_EXPERIMENTAL_BUILD",
|
|
||||||
"value": "true",
|
|
||||||
"type": "STRING"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"cmakeToolchain": "../vcpkg/scripts/buildsystems/vcpkg.cmake"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Windows-x64-ExperimentalDebug",
|
|
||||||
"generator": "Ninja",
|
|
||||||
"configurationType": "Debug",
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "-v",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"cmakeToolchain": "../vcpkg/scripts/buildsystems/vcpkg.cmake",
|
|
||||||
"inheritEnvironments": [ "msvc_x64_x64" ],
|
|
||||||
"variables": [
|
|
||||||
{
|
|
||||||
"name": "VCPKG_TARGET_TRIPLET",
|
|
||||||
"value": "x64-windows-static",
|
|
||||||
"type": "STRING"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "EMU_EXPERIMENTAL_BUILD",
|
|
||||||
"value": "true",
|
|
||||||
"type": "STRING"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Windows-x86-ExperimentalRelease",
|
|
||||||
"generator": "Ninja",
|
|
||||||
"configurationType": "RelWithDebInfo",
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "-v",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"cmakeToolchain": "../vcpkg/scripts/buildsystems/vcpkg.cmake",
|
|
||||||
"inheritEnvironments": [ "msvc_x86" ],
|
|
||||||
"variables": [
|
|
||||||
{
|
|
||||||
"name": "VCPKG_TARGET_TRIPLET",
|
|
||||||
"value": "x86-windows-static",
|
|
||||||
"type": "STRING"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "EMU_EXPERIMENTAL_BUILD",
|
|
||||||
"value": "true",
|
|
||||||
"type": "STRING"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Windows-x86-ExperimentalDebug",
|
|
||||||
"generator": "Ninja",
|
|
||||||
"configurationType": "Debug",
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "-v",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"cmakeToolchain": "../vcpkg/scripts/buildsystems/vcpkg.cmake",
|
|
||||||
"inheritEnvironments": [ "msvc_x86" ],
|
|
||||||
"variables": [
|
|
||||||
{
|
|
||||||
"name": "VCPKG_TARGET_TRIPLET",
|
|
||||||
"value": "x86-windows-static",
|
|
||||||
"type": "STRING"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "EMU_EXPERIMENTAL_BUILD",
|
|
||||||
"value": "true",
|
|
||||||
"type": "STRING"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Linux-x64-ExperimentalRelease",
|
|
||||||
"generator": "Unix Makefiles",
|
|
||||||
"configurationType": "RelWithDebInfo",
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeExecutable": "/usr/local/bin/cmake",
|
|
||||||
"remoteCopySourcesExclusionList": [ ".vs", ".git" ],
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"inheritEnvironments": [ "linux_x64" ],
|
|
||||||
"variables": [
|
|
||||||
{
|
|
||||||
"name": "EMU_EXPERIMENTAL_BUILD",
|
|
||||||
"value": "true",
|
|
||||||
"type": "STRING"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"remoteMachineName": "${defaultRemoteMachineName}",
|
|
||||||
"remoteCMakeListsRoot": "/var/tmp/src/${workspaceHash}/${name}",
|
|
||||||
"remoteBuildRoot": "/var/tmp/build/${workspaceHash}/build/${name}",
|
|
||||||
"remoteInstallRoot": "/var/tmp/build/${workspaceHash}/install/${name}",
|
|
||||||
"remoteCopySources": true,
|
|
||||||
"rsyncCommandArgs": "-t --delete --delete-excluded",
|
|
||||||
"remoteCopyBuildOutput": true,
|
|
||||||
"remoteCopySourcesMethod": "rsync"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Linux-x64-ExperimentalDebug",
|
|
||||||
"generator": "Unix Makefiles",
|
|
||||||
"configurationType": "Debug",
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeExecutable": "/usr/local/bin/cmake",
|
|
||||||
"remoteCopySourcesExclusionList": [ ".vs", ".git" ],
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"inheritEnvironments": [ "linux_x64" ],
|
|
||||||
"variables": [
|
|
||||||
{
|
|
||||||
"name": "EMU_EXPERIMENTAL_BUILD",
|
|
||||||
"value": "true",
|
|
||||||
"type": "STRING"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"remoteMachineName": "${defaultRemoteMachineName}",
|
|
||||||
"remoteCMakeListsRoot": "/var/tmp/src/${workspaceHash}/${name}",
|
|
||||||
"remoteBuildRoot": "/var/tmp/build/${workspaceHash}/build/${name}",
|
|
||||||
"remoteInstallRoot": "/var/tmp/build/${workspaceHash}/install/${name}",
|
|
||||||
"remoteCopySources": true,
|
|
||||||
"rsyncCommandArgs": "-t --delete --delete-excluded",
|
|
||||||
"remoteCopyBuildOutput": true,
|
|
||||||
"remoteCopySourcesMethod": "rsync"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Linux-x86-ExperimentalRelease",
|
|
||||||
"generator": "Unix Makefiles",
|
|
||||||
"configurationType": "RelWithDebInfo",
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeExecutable": "/usr/local/bin/cmake",
|
|
||||||
"remoteCopySourcesExclusionList": [ ".vs", ".git" ],
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"inheritEnvironments": [ "linux_x86" ],
|
|
||||||
"variables": [
|
|
||||||
{
|
|
||||||
"name": "EMU_EXPERIMENTAL_BUILD",
|
|
||||||
"value": "true",
|
|
||||||
"type": "STRING"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"remoteMachineName": "${defaultRemoteMachineName}",
|
|
||||||
"remoteCMakeListsRoot": "/var/tmp/src/${workspaceHash}/${name}",
|
|
||||||
"remoteBuildRoot": "/var/tmp/build/${workspaceHash}/build/${name}",
|
|
||||||
"remoteInstallRoot": "/var/tmp/build/${workspaceHash}/install/${name}",
|
|
||||||
"remoteCopySources": true,
|
|
||||||
"rsyncCommandArgs": "-t --delete --delete-excluded",
|
|
||||||
"remoteCopyBuildOutput": true,
|
|
||||||
"remoteCopySourcesMethod": "rsync"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Linux-x86-ExperimentalDebug",
|
|
||||||
"generator": "Unix Makefiles",
|
|
||||||
"configurationType": "Debug",
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeExecutable": "/usr/local/bin/cmake",
|
|
||||||
"remoteCopySourcesExclusionList": [ ".vs", ".git" ],
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"inheritEnvironments": [ "linux_x86" ],
|
|
||||||
"variables": [
|
|
||||||
{
|
|
||||||
"name": "EMU_EXPERIMENTAL_BUILD",
|
|
||||||
"value": "true",
|
|
||||||
"type": "STRING"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"remoteMachineName": "${defaultRemoteMachineName}",
|
|
||||||
"remoteCMakeListsRoot": "/var/tmp/src/${workspaceHash}/${name}",
|
|
||||||
"remoteBuildRoot": "/var/tmp/build/${workspaceHash}/build/${name}",
|
|
||||||
"remoteInstallRoot": "/var/tmp/build/${workspaceHash}/install/${name}",
|
|
||||||
"remoteCopySources": true,
|
|
||||||
"rsyncCommandArgs": "-t --delete --delete-excluded",
|
|
||||||
"remoteCopyBuildOutput": true,
|
|
||||||
"remoteCopySourcesMethod": "rsync"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "WSL-x64-Release",
|
|
||||||
"generator": "Unix Makefiles",
|
|
||||||
"configurationType": "RelWithDebInfo",
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeExecutable": "/usr/bin/cmake",
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"inheritEnvironments": [ "linux_x64" ],
|
|
||||||
"wslPath": "${defaultWSLPath}",
|
|
||||||
"addressSanitizerRuntimeFlags": "detect_leaks=0",
|
|
||||||
"variables": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "WSL-x64-Debug",
|
|
||||||
"generator": "Unix Makefiles",
|
|
||||||
"configurationType": "Debug",
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeExecutable": "/usr/bin/cmake",
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"inheritEnvironments": [ "linux_x64" ],
|
|
||||||
"wslPath": "${defaultWSLPath}",
|
|
||||||
"addressSanitizerRuntimeFlags": "detect_leaks=0",
|
|
||||||
"variables": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "WSL-x86-Release",
|
|
||||||
"generator": "Unix Makefiles",
|
|
||||||
"configurationType": "RelWithDebInfo",
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeExecutable": "/usr/bin/cmake",
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"inheritEnvironments": [ "linux_x86" ],
|
|
||||||
"wslPath": "${defaultWSLPath}",
|
|
||||||
"addressSanitizerRuntimeFlags": "detect_leaks=0",
|
|
||||||
"variables": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "WSL-x86-Debug",
|
|
||||||
"generator": "Unix Makefiles",
|
|
||||||
"configurationType": "Debug",
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeExecutable": "/usr/bin/cmake",
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"inheritEnvironments": [ "linux_x86" ],
|
|
||||||
"wslPath": "${defaultWSLPath}",
|
|
||||||
"addressSanitizerRuntimeFlags": "detect_leaks=0",
|
|
||||||
"variables": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "WSL-x64-ExperimentalRelease",
|
|
||||||
"generator": "Unix Makefiles",
|
|
||||||
"configurationType": "RelWithDebInfo",
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeExecutable": "/usr/bin/cmake",
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"inheritEnvironments": [ "linux_x64" ],
|
|
||||||
"wslPath": "${defaultWSLPath}",
|
|
||||||
"addressSanitizerRuntimeFlags": "detect_leaks=0",
|
|
||||||
"variables": [
|
|
||||||
{
|
|
||||||
"name": "EMU_EXPERIMENTAL_BUILD",
|
|
||||||
"value": "True",
|
|
||||||
"type": "BOOL"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "WSL-x64-ExperimentalDebug",
|
|
||||||
"generator": "Unix Makefiles",
|
|
||||||
"configurationType": "Debug",
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeExecutable": "/usr/bin/cmake",
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"inheritEnvironments": [ "linux_x64" ],
|
|
||||||
"wslPath": "${defaultWSLPath}",
|
|
||||||
"addressSanitizerRuntimeFlags": "detect_leaks=0",
|
|
||||||
"variables": [
|
|
||||||
{
|
|
||||||
"name": "EMU_EXPERIMENTAL_BUILD",
|
|
||||||
"value": "True",
|
|
||||||
"type": "BOOL"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "WSL-x86-ExperimentalRelease",
|
|
||||||
"generator": "Unix Makefiles",
|
|
||||||
"configurationType": "RelWithDebInfo",
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeExecutable": "/usr/bin/cmake",
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"inheritEnvironments": [ "linux_x86" ],
|
|
||||||
"wslPath": "${defaultWSLPath}",
|
|
||||||
"addressSanitizerRuntimeFlags": "detect_leaks=0",
|
|
||||||
"variables": [
|
|
||||||
{
|
|
||||||
"name": "EMU_EXPERIMENTAL_BUILD",
|
|
||||||
"value": "True",
|
|
||||||
"type": "BOOL"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "WSL-x86-ExperimentalDebug",
|
|
||||||
"generator": "Unix Makefiles",
|
|
||||||
"configurationType": "Debug",
|
|
||||||
"buildRoot": "${projectDir}\\out\\${workspaceHash}\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeExecutable": "/usr/bin/cmake",
|
|
||||||
"cmakeCommandArgs": "",
|
|
||||||
"buildCommandArgs": "",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"inheritEnvironments": [ "linux_x86" ],
|
|
||||||
"wslPath": "${defaultWSLPath}",
|
|
||||||
"addressSanitizerRuntimeFlags": "detect_leaks=0",
|
|
||||||
"variables": [
|
|
||||||
{
|
|
||||||
"name": "EMU_EXPERIMENTAL_BUILD",
|
|
||||||
"value": "True",
|
|
||||||
"type": "BOOL"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -24,11 +24,11 @@
|
||||||
#if defined(__WINDOWS__)
|
#if defined(__WINDOWS__)
|
||||||
#define STBI_WINDOWS_UTF8
|
#define STBI_WINDOWS_UTF8
|
||||||
#endif
|
#endif
|
||||||
#include "../stb/stb_image.h"
|
#include <stb_image.h>
|
||||||
|
|
||||||
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
||||||
#define STB_IMAGE_WRITE_STATIC
|
#define STB_IMAGE_WRITE_STATIC
|
||||||
#include "../stb/stb_image_write.h"
|
#include <stb_image_write.h>
|
||||||
|
|
||||||
struct File_Data {
|
struct File_Data {
|
||||||
std::string name;
|
std::string name;
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
#include <json/json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
#include <json/fifo_map.hpp>
|
#include <nlohmann/fifo_map.hpp>
|
||||||
|
|
||||||
class CurlGlobal
|
class CurlGlobal
|
||||||
{
|
{
|
||||||
|
@ -246,7 +246,7 @@ static bool create_directory(std::string const& strPath)
|
||||||
|
|
||||||
return CreateDirectoryA(strPath.c_str(), NULL);
|
return CreateDirectoryA(strPath.c_str(), NULL);
|
||||||
}
|
}
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__) || defined(__APPLE__)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
28581
glew/glew.c
28581
glew/glew.c
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
23686
glew/include/GL/glew.h
23686
glew/include/GL/glew.h
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,547 +0,0 @@
|
||||||
/*
|
|
||||||
The code is licensed under the MIT License <http://opensource.org/licenses/MIT>:
|
|
||||||
|
|
||||||
Copyright (c) 2015-2017 Niels Lohmann.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
|
||||||
the Software without restriction, including without limitation the rights to
|
|
||||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef NLOHMANN_FIFO_MAP_HPP
|
|
||||||
#define NLOHMANN_FIFO_MAP_HPP
|
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include <cstdlib>
|
|
||||||
#include <functional>
|
|
||||||
#include <iostream>
|
|
||||||
#include <limits>
|
|
||||||
#include <map>
|
|
||||||
#include <memory>
|
|
||||||
#include <unordered_map>
|
|
||||||
#include <utility>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
/*!
|
|
||||||
@brief namespace for Niels Lohmann
|
|
||||||
@see https://github.com/nlohmann
|
|
||||||
*/
|
|
||||||
namespace nlohmann
|
|
||||||
{
|
|
||||||
|
|
||||||
template<class Key>
|
|
||||||
class fifo_map_compare
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
/// constructor given a pointer to a key storage
|
|
||||||
fifo_map_compare(
|
|
||||||
std::unordered_map<Key, std::size_t>* keys,
|
|
||||||
std::size_t timestamp = 1)
|
|
||||||
:
|
|
||||||
m_timestamp(timestamp),
|
|
||||||
m_keys(keys)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
This function compares two keys with respect to the order in which they
|
|
||||||
were added to the container. For this, the mapping keys is used.
|
|
||||||
*/
|
|
||||||
bool operator()(const Key& lhs, const Key& rhs) const
|
|
||||||
{
|
|
||||||
// look up timestamps for both keys
|
|
||||||
const auto timestamp_lhs = m_keys->find(lhs);
|
|
||||||
const auto timestamp_rhs = m_keys->find(rhs);
|
|
||||||
|
|
||||||
if (timestamp_lhs == m_keys->end())
|
|
||||||
{
|
|
||||||
// timestamp for lhs not found - cannot be smaller than for rhs
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (timestamp_rhs == m_keys->end())
|
|
||||||
{
|
|
||||||
// timestamp for rhs not found - timestamp for lhs is smaller
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// compare timestamps
|
|
||||||
return timestamp_lhs->second < timestamp_rhs->second;
|
|
||||||
}
|
|
||||||
|
|
||||||
void add_key(const Key& key)
|
|
||||||
{
|
|
||||||
m_keys->insert({key, m_timestamp++});
|
|
||||||
}
|
|
||||||
|
|
||||||
void remove_key(const Key& key)
|
|
||||||
{
|
|
||||||
m_keys->erase(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
/// helper to access m_timestamp from fifo_map copy ctor,
|
|
||||||
/// must have same number of template args as fifo_map
|
|
||||||
template <
|
|
||||||
class MapKey,
|
|
||||||
class MapT,
|
|
||||||
class MapCompare,
|
|
||||||
class MapAllocator
|
|
||||||
> friend class fifo_map;
|
|
||||||
|
|
||||||
private:
|
|
||||||
/// the next valid insertion timestamp
|
|
||||||
std::size_t m_timestamp = 1;
|
|
||||||
|
|
||||||
/// pointer to a mapping from keys to insertion timestamps
|
|
||||||
std::unordered_map<Key, std::size_t>* m_keys = nullptr;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
template <
|
|
||||||
class Key,
|
|
||||||
class T,
|
|
||||||
class Compare = fifo_map_compare<Key>,
|
|
||||||
class Allocator = std::allocator<std::pair<const Key, T>>
|
|
||||||
> class fifo_map
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
using key_type = Key;
|
|
||||||
using mapped_type = T;
|
|
||||||
using value_type = std::pair<const Key, T>;
|
|
||||||
using size_type = std::size_t;
|
|
||||||
using difference_type = std::ptrdiff_t;
|
|
||||||
using key_compare = Compare;
|
|
||||||
using allocator_type = Allocator;
|
|
||||||
using reference = value_type&;
|
|
||||||
using const_reference = const value_type&;
|
|
||||||
using pointer = typename std::allocator_traits<Allocator>::pointer;
|
|
||||||
using const_pointer = typename std::allocator_traits<Allocator>::const_pointer;
|
|
||||||
|
|
||||||
using internal_map_type = std::map<Key, T, Compare, Allocator>;
|
|
||||||
|
|
||||||
using iterator = typename internal_map_type::iterator;
|
|
||||||
using const_iterator = typename internal_map_type::const_iterator;
|
|
||||||
using reverse_iterator = typename internal_map_type::reverse_iterator;
|
|
||||||
using const_reverse_iterator = typename internal_map_type::const_reverse_iterator;
|
|
||||||
|
|
||||||
public:
|
|
||||||
/// default constructor
|
|
||||||
fifo_map() : m_keys(), m_compare(&m_keys), m_map(m_compare) {}
|
|
||||||
|
|
||||||
/// copy constructor
|
|
||||||
fifo_map(const fifo_map &f) : m_keys(f.m_keys), m_compare(&m_keys, f.m_compare.m_timestamp), m_map(f.m_map.begin(), f.m_map.end(), m_compare) {}
|
|
||||||
|
|
||||||
/// constructor for a range of elements
|
|
||||||
template<class InputIterator>
|
|
||||||
fifo_map(InputIterator first, InputIterator last)
|
|
||||||
: m_keys(), m_compare(&m_keys), m_map(m_compare)
|
|
||||||
{
|
|
||||||
for (auto it = first; it != last; ++it)
|
|
||||||
{
|
|
||||||
insert(*it);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// constructor for a list of elements
|
|
||||||
fifo_map(std::initializer_list<value_type> init) : fifo_map()
|
|
||||||
{
|
|
||||||
for (auto x : init)
|
|
||||||
{
|
|
||||||
insert(x);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Element access
|
|
||||||
*/
|
|
||||||
|
|
||||||
/// access specified element with bounds checking
|
|
||||||
T& at(const Key& key)
|
|
||||||
{
|
|
||||||
return m_map.at(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// access specified element with bounds checking
|
|
||||||
const T& at(const Key& key) const
|
|
||||||
{
|
|
||||||
return m_map.at(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// access specified element
|
|
||||||
T& operator[](const Key& key)
|
|
||||||
{
|
|
||||||
m_compare.add_key(key);
|
|
||||||
return m_map[key];
|
|
||||||
}
|
|
||||||
|
|
||||||
/// access specified element
|
|
||||||
T& operator[](Key&& key)
|
|
||||||
{
|
|
||||||
m_compare.add_key(key);
|
|
||||||
return m_map[key];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Iterators
|
|
||||||
*/
|
|
||||||
|
|
||||||
/// returns an iterator to the beginning
|
|
||||||
iterator begin() noexcept
|
|
||||||
{
|
|
||||||
return m_map.begin();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// returns an iterator to the end
|
|
||||||
iterator end() noexcept
|
|
||||||
{
|
|
||||||
return m_map.end();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// returns an iterator to the beginning
|
|
||||||
const_iterator begin() const noexcept
|
|
||||||
{
|
|
||||||
return m_map.begin();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// returns an iterator to the end
|
|
||||||
const_iterator end() const noexcept
|
|
||||||
{
|
|
||||||
return m_map.end();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// returns an iterator to the beginning
|
|
||||||
const_iterator cbegin() const noexcept
|
|
||||||
{
|
|
||||||
return m_map.cbegin();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// returns an iterator to the end
|
|
||||||
const_iterator cend() const noexcept
|
|
||||||
{
|
|
||||||
return m_map.cend();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// returns a reverse iterator to the beginning
|
|
||||||
reverse_iterator rbegin() noexcept
|
|
||||||
{
|
|
||||||
return m_map.rbegin();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// returns a reverse iterator to the end
|
|
||||||
reverse_iterator rend() noexcept
|
|
||||||
{
|
|
||||||
return m_map.rend();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// returns a reverse iterator to the beginning
|
|
||||||
const_reverse_iterator rbegin() const noexcept
|
|
||||||
{
|
|
||||||
return m_map.rbegin();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// returns a reverse iterator to the end
|
|
||||||
const_reverse_iterator rend() const noexcept
|
|
||||||
{
|
|
||||||
return m_map.rend();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// returns a reverse iterator to the beginning
|
|
||||||
const_reverse_iterator crbegin() const noexcept
|
|
||||||
{
|
|
||||||
return m_map.crbegin();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// returns a reverse iterator to the end
|
|
||||||
const_reverse_iterator crend() const noexcept
|
|
||||||
{
|
|
||||||
return m_map.crend();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Capacity
|
|
||||||
*/
|
|
||||||
|
|
||||||
/// checks whether the container is empty
|
|
||||||
bool empty() const noexcept
|
|
||||||
{
|
|
||||||
return m_map.empty();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// returns the number of elements
|
|
||||||
size_type size() const noexcept
|
|
||||||
{
|
|
||||||
return m_map.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// returns the maximum possible number of elements
|
|
||||||
size_type max_size() const noexcept
|
|
||||||
{
|
|
||||||
return m_map.max_size();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Modifiers
|
|
||||||
*/
|
|
||||||
|
|
||||||
/// clears the contents
|
|
||||||
void clear() noexcept
|
|
||||||
{
|
|
||||||
m_map.clear();
|
|
||||||
m_keys.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// insert value
|
|
||||||
std::pair<iterator, bool> insert(const value_type& value)
|
|
||||||
{
|
|
||||||
m_compare.add_key(value.first);
|
|
||||||
return m_map.insert(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// insert value
|
|
||||||
template<class P>
|
|
||||||
std::pair<iterator, bool> insert( P&& value )
|
|
||||||
{
|
|
||||||
m_compare.add_key(value.first);
|
|
||||||
return m_map.insert(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// insert value with hint
|
|
||||||
iterator insert(const_iterator hint, const value_type& value)
|
|
||||||
{
|
|
||||||
m_compare.add_key(value.first);
|
|
||||||
return m_map.insert(hint, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// insert value with hint
|
|
||||||
iterator insert(const_iterator hint, value_type&& value)
|
|
||||||
{
|
|
||||||
m_compare.add_key(value.first);
|
|
||||||
return m_map.insert(hint, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// insert value range
|
|
||||||
template<class InputIt>
|
|
||||||
void insert(InputIt first, InputIt last)
|
|
||||||
{
|
|
||||||
for (const_iterator it = first; it != last; ++it)
|
|
||||||
{
|
|
||||||
m_compare.add_key(it->first);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_map.insert(first, last);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// insert value list
|
|
||||||
void insert(std::initializer_list<value_type> ilist)
|
|
||||||
{
|
|
||||||
for (auto value : ilist)
|
|
||||||
{
|
|
||||||
m_compare.add_key(value.first);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_map.insert(ilist);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// constructs element in-place
|
|
||||||
template<class... Args>
|
|
||||||
std::pair<iterator, bool> emplace(Args&& ... args)
|
|
||||||
{
|
|
||||||
typename fifo_map::value_type value(std::forward<Args>(args)...);
|
|
||||||
m_compare.add_key(value.first);
|
|
||||||
return m_map.emplace(std::move(value));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// constructs element in-place with hint
|
|
||||||
template<class... Args>
|
|
||||||
iterator emplace_hint(const_iterator hint, Args&& ... args)
|
|
||||||
{
|
|
||||||
typename fifo_map::value_type value(std::forward<Args>(args)...);
|
|
||||||
m_compare.add_key(value.first);
|
|
||||||
return m_map.emplace_hint(hint, std::move(value));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// remove element at position
|
|
||||||
iterator erase(const_iterator pos)
|
|
||||||
{
|
|
||||||
m_compare.remove_key(pos->first);
|
|
||||||
return m_map.erase(pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// remove elements in range
|
|
||||||
iterator erase(const_iterator first, const_iterator last)
|
|
||||||
{
|
|
||||||
for (const_iterator it = first; it != last; ++it)
|
|
||||||
{
|
|
||||||
m_compare.remove_key(it->first);
|
|
||||||
}
|
|
||||||
|
|
||||||
return m_map.erase(first, last);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// remove elements with key
|
|
||||||
size_type erase(const key_type& key)
|
|
||||||
{
|
|
||||||
size_type res = m_map.erase(key);
|
|
||||||
|
|
||||||
if (res > 0)
|
|
||||||
{
|
|
||||||
m_compare.remove_key(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// swaps the contents
|
|
||||||
void swap(fifo_map& other)
|
|
||||||
{
|
|
||||||
std::swap(m_map, other.m_map);
|
|
||||||
std::swap(m_compare, other.m_compare);
|
|
||||||
std::swap(m_keys, other.m_keys);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Lookup
|
|
||||||
*/
|
|
||||||
|
|
||||||
/// returns the number of elements matching specific key
|
|
||||||
size_type count(const Key& key) const
|
|
||||||
{
|
|
||||||
return m_map.count(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// finds element with specific key
|
|
||||||
iterator find(const Key& key)
|
|
||||||
{
|
|
||||||
return m_map.find(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// finds element with specific key
|
|
||||||
const_iterator find(const Key& key) const
|
|
||||||
{
|
|
||||||
return m_map.find(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// returns range of elements matching a specific key
|
|
||||||
std::pair<iterator, iterator> equal_range(const Key& key)
|
|
||||||
{
|
|
||||||
return m_map.equal_range(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// returns range of elements matching a specific key
|
|
||||||
std::pair<const_iterator, const_iterator> equal_range(const Key& key) const
|
|
||||||
{
|
|
||||||
return m_map.equal_range(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// returns an iterator to the first element not less than the given key
|
|
||||||
iterator lower_bound(const Key& key)
|
|
||||||
{
|
|
||||||
return m_map.lower_bound(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// returns an iterator to the first element not less than the given key
|
|
||||||
const_iterator lower_bound(const Key& key) const
|
|
||||||
{
|
|
||||||
return m_map.lower_bound(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// returns an iterator to the first element greater than the given key
|
|
||||||
iterator upper_bound(const Key& key)
|
|
||||||
{
|
|
||||||
return m_map.upper_bound(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// returns an iterator to the first element greater than the given key
|
|
||||||
const_iterator upper_bound(const Key& key) const
|
|
||||||
{
|
|
||||||
return m_map.upper_bound(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Observers
|
|
||||||
*/
|
|
||||||
|
|
||||||
/// returns the function that compares keys
|
|
||||||
key_compare key_comp() const
|
|
||||||
{
|
|
||||||
return m_compare;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Non-member functions
|
|
||||||
*/
|
|
||||||
|
|
||||||
friend bool operator==(const fifo_map& lhs, const fifo_map& rhs)
|
|
||||||
{
|
|
||||||
return lhs.m_map == rhs.m_map;
|
|
||||||
}
|
|
||||||
|
|
||||||
friend bool operator!=(const fifo_map& lhs, const fifo_map& rhs)
|
|
||||||
{
|
|
||||||
return lhs.m_map != rhs.m_map;
|
|
||||||
}
|
|
||||||
|
|
||||||
friend bool operator<(const fifo_map& lhs, const fifo_map& rhs)
|
|
||||||
{
|
|
||||||
return lhs.m_map < rhs.m_map;
|
|
||||||
}
|
|
||||||
|
|
||||||
friend bool operator<=(const fifo_map& lhs, const fifo_map& rhs)
|
|
||||||
{
|
|
||||||
return lhs.m_map <= rhs.m_map;
|
|
||||||
}
|
|
||||||
|
|
||||||
friend bool operator>(const fifo_map& lhs, const fifo_map& rhs)
|
|
||||||
{
|
|
||||||
return lhs.m_map > rhs.m_map;
|
|
||||||
}
|
|
||||||
|
|
||||||
friend bool operator>=(const fifo_map& lhs, const fifo_map& rhs)
|
|
||||||
{
|
|
||||||
return lhs.m_map >= rhs.m_map;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
/// the keys
|
|
||||||
std::unordered_map<Key, std::size_t> m_keys;
|
|
||||||
/// the comparison object
|
|
||||||
Compare m_compare;
|
|
||||||
/// the internal data structure
|
|
||||||
internal_map_type m_map;
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// specialization of std::swap
|
|
||||||
namespace std
|
|
||||||
{
|
|
||||||
template <class Key, class T, class Compare, class Allocator>
|
|
||||||
inline void swap(nlohmann::fifo_map<Key, T, Compare, Allocator>& m1,
|
|
||||||
nlohmann::fifo_map<Key, T, Compare, Allocator>& m2)
|
|
||||||
{
|
|
||||||
m1.swap(m2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
20842
nlohmann/json.hpp
20842
nlohmann/json.hpp
File diff suppressed because it is too large
Load Diff
|
@ -182,7 +182,7 @@ public:
|
||||||
void OpenOverlayInvite(CSteamID lobbyId) {}
|
void OpenOverlayInvite(CSteamID lobbyId) {}
|
||||||
void OpenOverlay(const char* pchDialog) {}
|
void OpenOverlay(const char* pchDialog) {}
|
||||||
|
|
||||||
bool ShowOverlay() const {}
|
bool ShowOverlay() const { return false; }
|
||||||
void ShowOverlay(bool state) {}
|
void ShowOverlay(bool state) {}
|
||||||
|
|
||||||
void SetLobbyInvite(Friend friendId, uint64 lobbyId) {}
|
void SetLobbyInvite(Friend friendId, uint64 lobbyId) {}
|
||||||
|
|
37
stb/LICENCE
37
stb/LICENCE
|
@ -1,37 +0,0 @@
|
||||||
This software is available under 2 licenses -- choose whichever you prefer.
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
ALTERNATIVE A - MIT License
|
|
||||||
Copyright (c) 2017 Sean Barrett
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
|
||||||
the Software without restriction, including without limitation the rights to
|
|
||||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
so, subject to the following conditions:
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
ALTERNATIVE B - Public Domain (www.unlicense.org)
|
|
||||||
This is free and unencumbered software released into the public domain.
|
|
||||||
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
|
|
||||||
software, either in source code form or as a compiled binary, for any purpose,
|
|
||||||
commercial or non-commercial, and by any means.
|
|
||||||
In jurisdictions that recognize copyright laws, the author or authors of this
|
|
||||||
software dedicate any and all copyright interest in the software to the public
|
|
||||||
domain. We make this dedication for the benefit of the public at large and to
|
|
||||||
the detriment of our heirs and successors. We intend this dedication to be an
|
|
||||||
overt act of relinquishment in perpetuity of all present and future rights to
|
|
||||||
this software under copyright law.
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
||||||
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
7762
stb/stb_image.h
7762
stb/stb_image.h
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue