From c5f7f9c038ff806010644018f25224ef17cc4308 Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Thu, 18 Jan 2018 13:57:01 -0600 Subject: [PATCH] build vrclient --- build_proton.sh | 33 +++++++++++++++++++++++++++++++++ vrclient_x64/vrclient_main.c | 6 ++---- vrclient_x64/vrclient_private.h | 4 ++++ 3 files changed, 39 insertions(+), 4 deletions(-) diff --git a/build_proton.sh b/build_proton.sh index 3def3aa3..a1311942 100755 --- a/build_proton.sh +++ b/build_proton.sh @@ -72,4 +72,37 @@ cd "$TOP"/build/lsteamclient.win32/ CXXFLAGS=-Wno-attributes PATH="$TOOLS_DIR32/bin:$PATH" "$RUNTIME_PATH/shell-i386.sh" make -j1 cp -a lsteamclient.dll.so "$TOP"/dist/lib/wine/ +#build 64-bit vrclient +cd "$TOP" +rm -rf build/vrclient_x64 +cp -a vrclient_x64 build/vrclient_x64 +cd "$TOP"/build/vrclient_x64/ +"$RUNTIME_PATH/shell-amd64.sh" "$TOP"/wine/tools/winemaker/winemaker \ + --nosource-fix --nolower-include --nodlls --nomsvcrt \ + -I"$TOOLS_DIR64"/include/ \ + -I"$TOOLS_DIR64"/include/wine/ \ + -I"$TOOLS_DIR64"/include/wine/windows/ \ + -L"$TOOLS_DIR64"/lib64/ \ + -L"$TOOLS_DIR64"/lib64/wine/ \ + --dll . +CXXFLAGS="-Wno-attributes -std=c++0x" PATH="$TOOLS_DIR64/bin:$PATH" "$RUNTIME_PATH/shell-amd64.sh" make +cp -a vrclient_x64.dll.so "$TOP"/dist/lib64/wine/ + +#build 32-bit vrclient +cd "$TOP" +rm -rf build/vrclient +cp -a vrclient_x64 build/vrclient +cd "$TOP"/build/vrclient/ +mv vrclient_x64.spec vrclient.spec +"$RUNTIME_PATH/shell-i386.sh" "$TOP"/wine/tools/winemaker/winemaker \ + --nosource-fix --nolower-include --nodlls --nomsvcrt --wine32 \ + -I"$TOOLS_DIR32"/include/ \ + -I"$TOOLS_DIR32"/include/wine/ \ + -I"$TOOLS_DIR32"/include/wine/windows/ \ + -L"$TOOLS_DIR32"/lib/ \ + -L"$TOOLS_DIR32"/lib/wine/ \ + --dll . +CXXFLAGS="-Wno-attributes -std=c++0x" PATH="$TOOLS_DIR32/bin:$PATH" "$RUNTIME_PATH/shell-i386.sh" make +cp -a vrclient.dll.so "$TOP"/dist/lib/wine/ + echo "Proton ready in dist/" diff --git a/vrclient_x64/vrclient_main.c b/vrclient_x64/vrclient_main.c index dab101e2..d8bbf39b 100644 --- a/vrclient_x64/vrclient_main.c +++ b/vrclient_x64/vrclient_main.c @@ -1,5 +1,3 @@ -#include "config.h" - #include #include #include @@ -13,6 +11,8 @@ #include "wine/debug.h" #include "wine/library.h" +#include "vrclient_private.h" + WINE_DEFAULT_DEBUG_CHANNEL(vrclient); BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) @@ -21,8 +21,6 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) switch (reason) { - case DLL_WINE_PREATTACH: - return FALSE; /* prefer native version */ case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(instance); break; diff --git a/vrclient_x64/vrclient_private.h b/vrclient_x64/vrclient_private.h index d04af02e..f77a5e51 100644 --- a/vrclient_x64/vrclient_private.h +++ b/vrclient_x64/vrclient_private.h @@ -31,3 +31,7 @@ typedef struct __winX winX; void *create_win_interface(const char *name, void *linux_side); unsigned int steamclient_unix_path_to_dos_path(unsigned int api_result, char *inout, unsigned int inout_bytes); void *create_LinuxMatchmakingServerListResponse(void *win); + +#define TRACE WINE_TRACE +#define ERR WINE_ERR +#define WARN WINE_WARN