mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2025-04-21 21:52:06 +02:00
remove unused build scripts
This commit is contained in:
parent
a0b8881c99
commit
ac439f6ec4
4 changed files with 0 additions and 1028 deletions
331
CMakeLists.txt
331
CMakeLists.txt
|
@ -1,331 +0,0 @@
|
|||
# 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)
|
||||
|
||||
if(MSVC)
|
||||
# Set static environment (results in static compile flags) if Visual Studio is used (dynamic by default)
|
||||
# Officially recommended solution: https://gitlab.kitware.com/cmake/community/wikis/FAQ#how-can-i-build-my-msvc-application-with-a-static-runtime
|
||||
# Should be replaced by a better solution in the future: https://gitlab.kitware.com/cmake/cmake/merge_requests/3211
|
||||
foreach(flag_var
|
||||
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
|
||||
if(${flag_var} MATCHES "/MD")
|
||||
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
|
||||
endif(${flag_var} MATCHES "/MD")
|
||||
endforeach(flag_var)
|
||||
|
||||
# Disable MSVC++ warning C4996: 'may be unsafe/disable deprecation'
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
# Add option to enable experimental build
|
||||
option(EMU_EXPERIMENTAL_BUILD "Enable experimental build" OFF)
|
||||
|
||||
# Set CXX standard
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
# Find the protobuf compiler and libraries
|
||||
include(FindProtobuf)
|
||||
find_package(Protobuf 3.1.0 REQUIRED)
|
||||
|
||||
# Generate the .h and .cxx files for dll/net.proto
|
||||
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS dll/net.proto)
|
||||
|
||||
# Print path to generated files
|
||||
message(STATUS "PROTO_SRCS = ${PROTO_SRCS}")
|
||||
message(STATUS "PROTO_HDRS = ${PROTO_HDRS}")
|
||||
message(STATUS "PROTOBUF_INCLUDE_DIRS = ${PROTOBUF_INCLUDE_DIRS}")
|
||||
message(STATUS "PROTOBUF_LIBRARIES = ${PROTOBUF_LIBRARIES}")
|
||||
message(STATUS "PROTOBUF_PROTOC_EXECUTABLE = ${PROTOBUF_PROTOC_EXECUTABLE}")
|
||||
|
||||
# Setup the lib/exe names for the targets
|
||||
if(WIN32)
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(LIB_STEAM_API steam_api64)
|
||||
set(LIB_STEAMCLIENT steamclient64)
|
||||
set(LIB_STEAMNETWORKINGSOCKETS steamnetworkingsockets64)
|
||||
set(BIN_LOBBY_CONNECT lobby_connect64)
|
||||
set(BIN_GENERATE_INTERFACES_FILE generate_interfaces_file64)
|
||||
else()
|
||||
set(LIB_STEAM_API steam_api)
|
||||
set(LIB_STEAMCLIENT steamclient)
|
||||
set(LIB_STEAMNETWORKINGSOCKETS steamnetworkingsockets)
|
||||
set(BIN_LOBBY_CONNECT lobby_connect)
|
||||
set(BIN_GENERATE_INTERFACES_FILE generate_interfaces_file)
|
||||
endif()
|
||||
elseif(UNIX AND NOT APPLE)
|
||||
set(LIB_STEAM_API steam_api)
|
||||
set(LIB_STEAMCLIENT steamclient)
|
||||
set(LIB_STEAMNETWORKINGSOCKETS steamnetworkingsockets)
|
||||
set(BIN_LOBBY_CONNECT lobby_connect)
|
||||
set(BIN_GENERATE_INTERFACES_FILE generate_interfaces_file)
|
||||
else()
|
||||
message(FATAL_ERROR "Other platforms not supported...")
|
||||
endif()
|
||||
|
||||
# Gather the files that are shared between multiple targets
|
||||
file(GLOB DLL_SRC_SHARED
|
||||
dll/*.h
|
||||
dll/*.cpp
|
||||
)
|
||||
|
||||
file(GLOB DETOURS_SRC_SHARED
|
||||
detours/*.cpp
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
file(GLOB OVERLAY_EXPERIMENTAL_SRC_SHARED
|
||||
overlay_experimental/*.cpp
|
||||
overlay_experimental/windows/*.cpp
|
||||
ImGui/*.cpp
|
||||
ImGui/impls/*.cpp
|
||||
ImGui/impls/windows/*.cpp
|
||||
glew/glew.c
|
||||
)
|
||||
elseif(UNIX)
|
||||
file(GLOB OVERLAY_EXPERIMENTAL_SRC_SHARED
|
||||
overlay_experimental/*.cpp
|
||||
overlay_experimental/linux/*.cpp
|
||||
ImGui/*.cpp
|
||||
ImGui/impls/*.cpp
|
||||
ImGui/impls/linux/*.cpp
|
||||
glew/glew.c
|
||||
)
|
||||
endif()
|
||||
|
||||
###################################################
|
||||
# Setup for the steam_api(64).dll / libsteam_api.so
|
||||
###################################################
|
||||
|
||||
# Setup the target
|
||||
add_library(${LIB_STEAM_API}
|
||||
SHARED
|
||||
$<$<BOOL:${EMU_EXPERIMENTAL_BUILD}>:${DETOURS_SRC_SHARED}>
|
||||
$<$<AND:$<BOOL:${EMU_EXPERIMENTAL_BUILD}>,$<BOOL:${EMU_OVERLAY}>>:${OVERLAY_EXPERIMENTAL_SRC_SHARED}>
|
||||
${DLL_SRC_SHARED}
|
||||
${PROTO_SRCS}
|
||||
${PROTO_HDRS}
|
||||
)
|
||||
|
||||
# Include the required directories
|
||||
target_include_directories(${LIB_STEAM_API}
|
||||
PRIVATE
|
||||
${PROTOBUF_INCLUDE_DIRS}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ImGui
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/glew/include
|
||||
)
|
||||
|
||||
# Link the required libraries
|
||||
target_link_libraries(${LIB_STEAM_API}
|
||||
PRIVATE
|
||||
protobuf::libprotobuf
|
||||
$<$<BOOL:${WIN32}>:ws2_32>
|
||||
$<$<BOOL:${WIN32}>:iphlpapi>
|
||||
$<$<AND:$<BOOL:${WIN32}>,$<BOOL:${EMU_EXPERIMENTAL_BUILD}>,$<BOOL:${EMU_OVERLAY}>>:opengl32.lib>
|
||||
$<$<AND:$<BOOL:${WIN32}>,$<BOOL:${EMU_EXPERIMENTAL_BUILD}>,$<BOOL:${EMU_OVERLAY}>>:Winmm.lib>
|
||||
)
|
||||
|
||||
# Add target compile definitions
|
||||
target_compile_definitions(${LIB_STEAM_API}
|
||||
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>
|
||||
$<$<BOOL:${EMU_OVERLAY}>:EMU_OVERLAY>
|
||||
$<$<AND:$<BOOL:${WIN32}>,$<BOOL:${EMU_EXPERIMENTAL_BUILD}>,$<BOOL:${EMU_OVERLAY}>>:GLEW_STATIC>
|
||||
)
|
||||
|
||||
# Install the target
|
||||
if(WIN32)
|
||||
install(TARGETS
|
||||
${LIB_STEAM_API}
|
||||
RUNTIME DESTINATION ./
|
||||
)
|
||||
else()
|
||||
install(TARGETS
|
||||
${LIB_STEAM_API}
|
||||
LIBRARY DESTINATION ./
|
||||
)
|
||||
endif()
|
||||
|
||||
########################################################
|
||||
# Setup for the steamclient(64).dll / libsteamclient.so?
|
||||
########################################################
|
||||
|
||||
# Setup the target
|
||||
add_library(${LIB_STEAMCLIENT}
|
||||
SHARED
|
||||
steamclient.cpp
|
||||
)
|
||||
|
||||
# Add target compile definitions
|
||||
target_compile_definitions(${LIB_STEAMCLIENT}
|
||||
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>
|
||||
)
|
||||
|
||||
# Install the target
|
||||
if(WIN32)
|
||||
install(TARGETS
|
||||
${LIB_STEAMCLIENT}
|
||||
RUNTIME DESTINATION ./
|
||||
)
|
||||
else()
|
||||
install(TARGETS
|
||||
${LIB_STEAMCLIENT}
|
||||
LIBRARY DESTINATION ./
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT WIN32)
|
||||
message(STATUS "Target library 'steamclient' is only suported for windows at this time... Disabling Build ALL inclusion for this target")
|
||||
set_target_properties(${LIB_STEAMCLIENT} PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1)
|
||||
endif()
|
||||
|
||||
##############################################################################
|
||||
# Setup for the steamnetworkingsockets(64).dll / libsteamnetworkingsockets.so?
|
||||
##############################################################################
|
||||
|
||||
# Setup the target
|
||||
add_library(${LIB_STEAMNETWORKINGSOCKETS}
|
||||
SHARED
|
||||
steamnetworkingsockets.cpp
|
||||
)
|
||||
|
||||
# Add target compile definitions
|
||||
target_compile_definitions(${LIB_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>
|
||||
)
|
||||
|
||||
# Setup install rules for the target
|
||||
if(WIN32)
|
||||
install(TARGETS
|
||||
${LIB_STEAMNETWORKINGSOCKETS}
|
||||
RUNTIME DESTINATION ./
|
||||
)
|
||||
else()
|
||||
install(TARGETS
|
||||
${LIB_STEAMNETWORKINGSOCKETS}
|
||||
LIBRARY DESTINATION ./
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT WIN32)
|
||||
message(STATUS "Target library 'steamnetworkingsockets' is only supported for windows at this time... Disabling Build ALL inclusion for this target")
|
||||
set_target_properties(${LIB_STEAMNETWORKINGSOCKETS} PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1)
|
||||
endif()
|
||||
|
||||
###########################################################################
|
||||
# Setup for the lobby_connect(64).exe / lobby_connect
|
||||
###########################################################################
|
||||
|
||||
# Setup the target
|
||||
add_executable(${BIN_LOBBY_CONNECT}
|
||||
lobby_connect.cpp
|
||||
$<$<BOOL:${EMU_EXPERIMENTAL_BUILD}>:${DETOURS_SRC_SHARED}>
|
||||
${DLL_SRC_SHARED}
|
||||
${PROTO_SRCS}
|
||||
${PROTO_HDRS}
|
||||
)
|
||||
|
||||
target_include_directories(${BIN_LOBBY_CONNECT}
|
||||
PRIVATE
|
||||
${PROTOBUF_INCLUDE_DIRS}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
# Link the required libraries
|
||||
target_link_libraries(${BIN_LOBBY_CONNECT}
|
||||
PRIVATE
|
||||
protobuf::libprotobuf
|
||||
$<$<BOOL:${WIN32}>:ws2_32>
|
||||
$<$<BOOL:${WIN32}>:iphlpapi>
|
||||
$<$<BOOL:${WIN32}>:comdlg32>
|
||||
${CMAKE_DL_LIBS}
|
||||
-debug:none
|
||||
)
|
||||
|
||||
# Add target compile definitions
|
||||
target_compile_definitions(${BIN_LOBBY_CONNECT}
|
||||
PRIVATE
|
||||
NO_DISK_WRITES
|
||||
LOBBY_CONNECT
|
||||
$<$<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>
|
||||
)
|
||||
|
||||
# Setup install rules for the target
|
||||
install(TARGETS
|
||||
${BIN_LOBBY_CONNECT}
|
||||
RUNTIME DESTINATION lobby_connect/
|
||||
)
|
||||
|
||||
###########################################################################
|
||||
# Setup for the generate_interfaces_file(64).exe / generate_interfaces_file
|
||||
###########################################################################
|
||||
|
||||
# Setup the target
|
||||
add_executable(${BIN_GENERATE_INTERFACES_FILE}
|
||||
generate_interfaces_file.cpp
|
||||
)
|
||||
|
||||
# Link the required libraries
|
||||
target_link_libraries(${BIN_GENERATE_INTERFACES_FILE}
|
||||
PRIVATE
|
||||
-debug:none
|
||||
)
|
||||
|
||||
# Setup install rules for the target
|
||||
install(TARGETS
|
||||
${BIN_GENERATE_INTERFACES_FILE}
|
||||
RUNTIME DESTINATION tools/
|
||||
)
|
||||
|
||||
###########################################################################
|
||||
# Installation setup for non target files and directories
|
||||
###########################################################################
|
||||
|
||||
install(FILES
|
||||
Readme_lobby_connect.txt
|
||||
DESTINATION lobby_connect/
|
||||
)
|
||||
|
||||
install(FILES
|
||||
scripts/find_interfaces.sh
|
||||
scripts/find_interfaces.ps1
|
||||
Readme_generate_interfaces.txt
|
||||
DESTINATION tools/
|
||||
)
|
||||
|
||||
install(FILES
|
||||
Readme_release.txt
|
||||
files_example/steam_appid.EDIT_AND_RENAME.txt
|
||||
files_example/steam_interfaces.EXAMPLE.txt
|
||||
$<$<BOOL:${EMU_EXPERIMENTAL_BUILD}>:${PROJECT_SOURCE_DIR}/Readme_experimental.txt>
|
||||
$<$<CONFIG:Debug>:${PROJECT_SOURCE_DIR}/Readme_debug.txt>
|
||||
DESTINATION ./
|
||||
)
|
||||
|
||||
install(DIRECTORY
|
||||
files_example/steam_settings.EXAMPLE
|
||||
DESTINATION ./
|
||||
)
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
50
Makefile
50
Makefile
|
@ -1,50 +0,0 @@
|
|||
.DEFAULT_GOAL := all
|
||||
|
||||
CXX=clang++
|
||||
CXX_FLAGS += -fPIC -std=c++14
|
||||
LD_FLAGS += -shared -lprotobuf-lite -ldl -Wl,--no-undefined
|
||||
LIBRARY_NAME=libsteam_api.so
|
||||
RM = rm -f
|
||||
|
||||
PROTOS := $(wildcard dll/*.proto)
|
||||
PROTO_CC := $(PROTOS:.proto=.pb.cc)
|
||||
PROTO_OBJ := $(PROTOS:.proto=.pb.o)
|
||||
PROTO_HEADERS := $(PROTOS:.proto=.pb.h)
|
||||
HEADERS := $(wildcard dll/*.h) $(PROTO_HEADERS)
|
||||
SRC_NOPROTO := $(wildcard dll/*.cpp)
|
||||
SRC := $(SRC_NOPROTO) $(PROTO_CC)
|
||||
OBJ_NOPROTO := $(SRC_NOPROTO:.cpp=.o)
|
||||
OBJ := $(OBJ_NOPROTO) $(PROTO_OBJ)
|
||||
|
||||
$(PROTO_CC) : $(PROTOS)
|
||||
$(PROTO_HEADERS) : $(PROTO_CC)
|
||||
$(OBJ_NOPROTO) : $(PROTO_CC) $(PROTO_HEADERS)
|
||||
$(OBJ) : $(HEADERS)
|
||||
|
||||
release: CXX_FLAGS += -DNDEBUG -DEMU_RELEASE_BUILD -Ofast
|
||||
release: LD_FLAGS += -lpthread
|
||||
release32: CXX_FLAGS += -m32
|
||||
release32: LD_FLAGS += -m32
|
||||
debug: CXX_FLAGS += -g3 -fsanitize=address
|
||||
debug: LD_FLAGS += -lasan
|
||||
release: library
|
||||
release32: release
|
||||
debug: library
|
||||
all: release
|
||||
|
||||
library: $(LIBRARY_NAME)
|
||||
|
||||
$(PROTO_CC) :
|
||||
protoc -I./dll/ --cpp_out=./dll/ ./dll/*.proto
|
||||
|
||||
$(PROTO_OBJ) : %.o : %.cc
|
||||
$(CXX) $(CXX_FLAGS) -c -o $@ $<
|
||||
|
||||
$(OBJ_NOPROTO) : %.o : %.cpp
|
||||
$(CXX) $(CXX_FLAGS) -c -o $@ $<
|
||||
|
||||
$(LIBRARY_NAME): $(OBJ)
|
||||
$(CXX) $(CXX_FLAGS) -o $@ $^ $(LD_FLAGS)
|
||||
|
||||
clean:
|
||||
$(RM) $(OBJ) $(LIBRARY_NAME) $(PROTO_CC) $(PROTOS:.proto=.pb.h)
|
|
@ -1,127 +0,0 @@
|
|||
import os
|
||||
|
||||
def files_from_dir(dir, extension, filter=[]):
|
||||
out = []
|
||||
for f in os.listdir(dir):
|
||||
if f.endswith(extension) and f not in filter:
|
||||
out.append(os.path.join(dir, f))
|
||||
return out
|
||||
|
||||
def convert_to_obj(files, obj_dir):
|
||||
out = []
|
||||
for f in files:
|
||||
out.append(os.path.join(obj_dir, os.path.splitext(os.path.basename(f))[0] + ".obj"))
|
||||
return out
|
||||
|
||||
def cl_line_obj(arguments, out_dir):
|
||||
return "rmdir /S /Q {0}\nmkdir {0}\ncl /Fo:{0}/ /c {1}\n".format(out_dir, ' '.join(arguments))
|
||||
|
||||
def cl_line_link(arguments, linker_arguments):
|
||||
return "cl /LD {} /link {}\n".format(' '.join(arguments), ' '.join(linker_arguments))
|
||||
|
||||
def cl_line_exe(arguments, linker_arguments):
|
||||
return "cl {} /link {}\n".format(' '.join(arguments), ' '.join(linker_arguments))
|
||||
|
||||
jobs = 4
|
||||
normal_build_args = ["/EHsc", "/Ox", "/MP{}".format(jobs)]
|
||||
|
||||
includes = ["ImGui", "overlay_experimental"]
|
||||
includes_32 = list(map(lambda a: '/I{}'.format(a), ["%PROTOBUF_X86_DIRECTORY%\\include\\"] + includes))
|
||||
includes_64 = list(map(lambda a: '/I{}'.format(a), ["%PROTOBUF_X64_DIRECTORY%\\include\\"] + includes))
|
||||
|
||||
debug_build_args = []
|
||||
release_build_args = ["/DEMU_RELEASE_BUILD", "/DNDEBUG"]
|
||||
steamclient_build_args = ["/DSTEAMCLIENT_DLL"]
|
||||
|
||||
experimental_build_args = ["/DEMU_EXPERIMENTAL_BUILD", "/DCONTROLLER_SUPPORT", "/DEMU_OVERLAY"]
|
||||
steamclient_experimental_build_args = experimental_build_args + steamclient_build_args
|
||||
|
||||
normal_linker_libs = ["Iphlpapi.lib", "Ws2_32.lib", "rtlgenrandom.lib", "Shell32.lib"]
|
||||
experimental_linker_libs = ["opengl32.lib", "Winmm.lib"] + normal_linker_libs
|
||||
linker_32 = ['"%PROTOBUF_X86_LIBRARY%"']
|
||||
linker_64 = ['"%PROTOBUF_X64_LIBRARY%"']
|
||||
|
||||
controller_deps = ["controller/gamepad.c"]
|
||||
imgui_deps = files_from_dir("ImGui", ".cpp") + ["ImGui/backends/imgui_impl_dx9.cpp", "ImGui/backends/imgui_impl_dx10.cpp", "ImGui/backends/imgui_impl_dx11.cpp", "ImGui/backends/imgui_impl_dx12.cpp", "ImGui/backends/imgui_impl_win32.cpp", "ImGui/backends/imgui_impl_vulkan.cpp", "ImGui/backends/imgui_impl_opengl3.cpp", "ImGui/backends/imgui_win_shader_blobs.cpp"]
|
||||
proto_deps = list(map(lambda a: a.replace(".proto", ".pb.cc"), files_from_dir("dll", ".proto")))
|
||||
all_deps = proto_deps + files_from_dir("detours", ".cpp") + controller_deps + imgui_deps + files_from_dir("overlay_experimental/System", ".cpp")
|
||||
|
||||
sc_different_deps = ["flat.cpp", "dll.cpp"]
|
||||
steam_deps = files_from_dir("dll", ".cpp", sc_different_deps)
|
||||
overlay_deps = files_from_dir("overlay_experimental", ".cpp") + files_from_dir("overlay_experimental/windows", ".cpp")
|
||||
experimental_steam_deps = steam_deps + overlay_deps
|
||||
sc_different_deps = list(map(lambda a: "dll/" + a, sc_different_deps))
|
||||
|
||||
regular_files = []
|
||||
|
||||
head = """@echo off
|
||||
cd /d "%~dp0"
|
||||
rmdir /S /Q release
|
||||
mkdir release
|
||||
mkdir release\experimental
|
||||
mkdir release\experimental_steamclient
|
||||
mkdir release\debug_experimental
|
||||
mkdir release\debug_experimental_steamclient
|
||||
call build_set_protobuf_directories.bat
|
||||
"""
|
||||
|
||||
head_32bit = """"%PROTOC_X86_EXE%" -I.\dll\ --cpp_out=.\dll\ .\dll\\net.proto
|
||||
call build_env_x86.bat
|
||||
cl dll/rtlgenrandom.c dll/rtlgenrandom.def
|
||||
"""
|
||||
|
||||
head_64bit = """"%PROTOC_X64_EXE%" -I.\dll\ --cpp_out=.\dll\ .\dll\\net.proto
|
||||
call build_env_x64.bat
|
||||
cl dll/rtlgenrandom.c dll/rtlgenrandom.def
|
||||
"""
|
||||
|
||||
footer = """
|
||||
copy Readme_release.txt release\Readme.txt
|
||||
xcopy /s files_example\* release\\
|
||||
copy Readme_experimental.txt release\experimental\Readme.txt
|
||||
copy Readme_debug.txt release\debug_experimental\Readme.txt
|
||||
copy steamclient_loader\ColdClientLoader.ini release\experimental_steamclient\\
|
||||
call build_win_lobby_connect.bat
|
||||
call build_win_find_interfaces.bat
|
||||
"""
|
||||
|
||||
out = head
|
||||
out += head_32bit
|
||||
|
||||
deps_folder = "deps"
|
||||
sc_deps_folder = "deps_sc"
|
||||
|
||||
def generate_common(include_arch, linker_arch, steam_api_name, steamclient_name):
|
||||
out = ""
|
||||
out += cl_line_obj(normal_build_args + release_build_args + include_arch + all_deps, deps_folder)
|
||||
out += cl_line_link(normal_build_args + release_build_args + include_arch + steam_deps + sc_different_deps + ["deps/net.pb.obj"] + linker_arch + normal_linker_libs, ["/debug:none", "/OUT:release\\{}".format(steam_api_name)])
|
||||
|
||||
debug_full_args = normal_build_args + debug_build_args + experimental_build_args + include_arch
|
||||
out += cl_line_obj(debug_full_args + experimental_steam_deps, sc_deps_folder)
|
||||
|
||||
debug_full_dll_args = debug_full_args + sc_different_deps + convert_to_obj(all_deps, deps_folder) + convert_to_obj(experimental_steam_deps, sc_deps_folder) + linker_arch + experimental_linker_libs
|
||||
out += cl_line_link(debug_full_dll_args, ["/OUT:release\debug_experimental\\{}".format(steam_api_name)])
|
||||
out += cl_line_link(steamclient_build_args + debug_full_dll_args, ["/OUT:release\debug_experimental_steamclient\\{}".format(steamclient_name)])
|
||||
|
||||
release_full_args = normal_build_args + release_build_args + experimental_build_args + include_arch
|
||||
out += cl_line_obj(release_full_args + experimental_steam_deps, sc_deps_folder)
|
||||
|
||||
release_full_dll_args = release_full_args + sc_different_deps + convert_to_obj(all_deps, deps_folder) + convert_to_obj(experimental_steam_deps, sc_deps_folder) + linker_arch + experimental_linker_libs
|
||||
out += cl_line_link(release_full_dll_args, ["/debug:none", "/OUT:release\experimental\\{}".format(steam_api_name)])
|
||||
out += cl_line_link(steamclient_build_args + release_full_dll_args, ["/debug:none", "/OUT:release\experimental_steamclient\\{}".format(steamclient_name)])
|
||||
out += cl_line_link(release_build_args + experimental_build_args + ["steamclient.cpp"] + normal_build_args, ["/debug:none", "/OUT:release\experimental\\{}".format(steamclient_name)])
|
||||
return out
|
||||
|
||||
out += generate_common(includes_32, linker_32, "steam_api.dll", "steamclient.dll")
|
||||
|
||||
out += cl_line_exe(files_from_dir("steamclient_loader", ".cpp") + ["advapi32.lib", "user32.lib"] + normal_build_args, ["/debug:none", "/OUT:release\experimental_steamclient\steamclient_loader.exe"])
|
||||
|
||||
out += head_64bit
|
||||
out += generate_common(includes_64, linker_64, "steam_api64.dll", "steamclient64.dll")
|
||||
|
||||
|
||||
out += footer
|
||||
|
||||
|
||||
with open("build_win_release_test.bat", "w") as f:
|
||||
f.write(out)
|
Loading…
Add table
Reference in a new issue