mirror of
https://github.com/acidicoala/SmokeAPI.git
synced 2025-12-05 21:15:39 -05:00
Generate proxy exports on demand
This commit is contained in:
7
.idea/runConfigurations/linux_exports_generator__32_.xml
generated
Normal file
7
.idea/runConfigurations/linux_exports_generator__32_.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="linux_exports_generator [32]" type="CMakeRunConfiguration" factoryName="Application" PROGRAM_PARAMS="--input_libs_glob $ProjectFileDir$/res/steamworks/*/binaries/linux32/libsteam_api.so --output_path $ProjectFileDir$/src/generated/32/proxy_exports" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="SmokeAPI" TARGET_NAME="linux_exports_generator" CONFIG_NAME="Debug [32]" RUN_TARGET_PROJECT_NAME="SmokeAPI" RUN_TARGET_NAME="linux_exports_generator">
|
||||||
|
<method v="2">
|
||||||
|
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="linux_exports_generator [64]" type="CMakeRunConfiguration" factoryName="Application" PROGRAM_PARAMS="--input_libs_glob $ProjectFileDir$/res/steamworks/*/binaries/linux64/libsteam_api.so --output_path $CMakeCurrentGenerationDir$/generated/proxy_exports" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="SmokeAPI" TARGET_NAME="linux_exports_generator" CONFIG_NAME="Debug [32]" RUN_TARGET_PROJECT_NAME="SmokeAPI" RUN_TARGET_NAME="linux_exports_generator">
|
<configuration default="false" name="linux_exports_generator [64]" type="CMakeRunConfiguration" factoryName="Application" PROGRAM_PARAMS="--input_libs_glob $ProjectFileDir$/res/steamworks/*/binaries/linux64/libsteam_api.so --output_path $ProjectFileDir$/src/generated/64/proxy_exports" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="SmokeAPI" TARGET_NAME="linux_exports_generator" CONFIG_NAME="Debug [32]" RUN_TARGET_PROJECT_NAME="SmokeAPI" RUN_TARGET_NAME="linux_exports_generator">
|
||||||
<method v="2">
|
<method v="2">
|
||||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||||
</method>
|
</method>
|
||||||
|
|||||||
@@ -26,8 +26,20 @@ set(SMOKE_API_STATIC_SOURCES
|
|||||||
static/smoke_api/steamclient/steamclient.hpp
|
static/smoke_api/steamclient/steamclient.hpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(GENERATED_SOURCES_DIR src/generated/${BITNESS})
|
||||||
|
file(MAKE_DIRECTORY ${GENERATED_SOURCES_DIR})
|
||||||
|
set(GENERATED_SOURCES
|
||||||
|
${GENERATED_SOURCES_DIR}/proxy_exports.hpp
|
||||||
|
${GENERATED_SOURCES_DIR}/proxy_exports.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
foreach(SRC IN LISTS GENERATED_SOURCES)
|
||||||
|
file(TOUCH ${SRC})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
set(SMOKE_API_SOURCES
|
set(SMOKE_API_SOURCES
|
||||||
${SMOKE_API_STATIC_SOURCES}
|
${SMOKE_API_STATIC_SOURCES}
|
||||||
|
${GENERATED_SOURCES}
|
||||||
src/smoke_api/smoke_api.cpp
|
src/smoke_api/smoke_api.cpp
|
||||||
src/smoke_api/smoke_api.hpp
|
src/smoke_api/smoke_api.hpp
|
||||||
src/steam_api/virtuals/isteamapps.cpp
|
src/steam_api/virtuals/isteamapps.cpp
|
||||||
@@ -127,11 +139,4 @@ if(WIN32)
|
|||||||
|
|
||||||
# Ignore linker warnings regarding COM-related private exports
|
# Ignore linker warnings regarding COM-related private exports
|
||||||
set_target_properties(SmokeAPI PROPERTIES LINK_FLAGS "/ignore:4104")
|
set_target_properties(SmokeAPI PROPERTIES LINK_FLAGS "/ignore:4104")
|
||||||
else()
|
|
||||||
set_32_and_64(LINUX_DIR linux32 linux64)
|
|
||||||
configure_proxy_exports(
|
|
||||||
TARGET SmokeAPI
|
|
||||||
INPUT_LIBS_GLOB "${CMAKE_SOURCE_DIR}/res/steamworks/*/binaries/${LINUX_DIR}/libsteam_api.so"
|
|
||||||
OUTPUT_NAME "proxy_exports"
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
2
KoalaBox
2
KoalaBox
Submodule KoalaBox updated: cc62fec6f1...67703a72fd
14844
src/generated/32/proxy_exports.cpp
Normal file
14844
src/generated/32/proxy_exports.cpp
Normal file
File diff suppressed because it is too large
Load Diff
6
src/generated/32/proxy_exports.hpp
Normal file
6
src/generated/32/proxy_exports.hpp
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
// Auto-generated header file
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace proxy_exports {
|
||||||
|
void init(void* self_lib_handle, void* original_lib_handle);
|
||||||
|
}
|
||||||
14454
src/generated/64/proxy_exports.cpp
Normal file
14454
src/generated/64/proxy_exports.cpp
Normal file
File diff suppressed because it is too large
Load Diff
6
src/generated/64/proxy_exports.hpp
Normal file
6
src/generated/64/proxy_exports.hpp
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
// Auto-generated header file
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace proxy_exports {
|
||||||
|
void init(void* self_lib_handle, void* original_lib_handle);
|
||||||
|
}
|
||||||
@@ -28,7 +28,11 @@
|
|||||||
#if defined(KB_WIN)
|
#if defined(KB_WIN)
|
||||||
#include "koalabox/win.hpp"
|
#include "koalabox/win.hpp"
|
||||||
#elif defined(KB_LINUX)
|
#elif defined(KB_LINUX)
|
||||||
#include "proxy_exports.hpp"
|
#if defined(KB_32)
|
||||||
|
#include "generated/32/proxy_exports.hpp"
|
||||||
|
#else
|
||||||
|
#include "generated/64/proxy_exports.hpp"
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Hooking steam_api has shown itself to be less desirable than steamclient
|
// Hooking steam_api has shown itself to be less desirable than steamclient
|
||||||
|
|||||||
Reference in New Issue
Block a user