From b75f3241007e33e00fe28328f0803ad5f3978abf Mon Sep 17 00:00:00 2001 From: redpolline <11156324-redpolline@users.noreply.gitlab.com> Date: Thu, 6 Jun 2024 08:30:59 -0400 Subject: [PATCH] Fix build scripts. Fix list: - Make cmd not choke on recursive calls to build_env_x*.bat. - Create build directories and move build output there instead of polluting the root of the source tree. - Make proper debug builds with pdb output. - Make proper x64 builds of lobby_connect, and steamclient_loader. (lobby_connect_x64.exe, and steamclient_loader_x64.exe) - Rename x86 build of lobby_connect.exe to lobby_connect_x86.exe. - Rename x86 build of steamclient_loader.exe to steamclient_loader_x86.exe. - Make proper distrib directories. (I.e. ///.) --- .gitignore | 35 ++++++++++--------- build_env_x64.bat | 12 +++++++ build_env_x86.bat | 13 ++++++- build_win_debug_experimental.bat | 34 +++++++++++++----- build_win_debug_experimental_steamclient.bat | 30 ++++++++++++---- build_win_debug_lobby_connect.bat | 21 ++++++++--- build_win_find_interfaces.bat | 19 +++++++--- build_win_lobby_connect.bat | 21 +++++++---- build_win_release.bat | 34 ++++++++++++------ build_win_release_experimental.bat | 32 ++++++++++++----- ...d_win_release_experimental_steamclient.bat | 34 +++++++++++++----- 11 files changed, 211 insertions(+), 74 deletions(-) diff --git a/.gitignore b/.gitignore index 47acc83..788c645 100644 --- a/.gitignore +++ b/.gitignore @@ -1,17 +1,18 @@ -.vs/* -.vscode/* -*.bin -*.o -net.pb.* -*steam_api* -release/* -/build*/ -*.obj -/dll/net.pb.cc -/dll/net.pb.h -base.exp -base.lib -rtlgenrandom* -steamclient.exp -steamclient.lib -out/* +.vs/* +.vscode/* +*.bin +*.o +net.pb.* +*steam_api* +release/* +debug/* +/build*/ +*.obj +/dll/net.pb.cc +/dll/net.pb.h +base.exp +base.lib +rtlgenrandom* +steamclient.exp +steamclient.lib +out/* diff --git a/build_env_x64.bat b/build_env_x64.bat index 35b701b..21c181d 100755 --- a/build_env_x64.bat +++ b/build_env_x64.bat @@ -12,6 +12,8 @@ if exist "%VS_Base_Path%\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Bu if exist "%VS_Base_Path%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" goto vs2022 if exist "%VS_Base_Path%\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" goto vs2022_bt if exist ".\sdk_standalone\set_vars64.bat" goto gitlabci +if exist "vsinstallloc.txt" goto readloc +if exist "%VS_Base_Path%\Microsoft Visual Studio\Installer\vswhere.exe" goto wherevs :vs2022 call "%VS_Base_Path%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" @@ -44,4 +46,14 @@ goto batend :gitlabci call ".\sdk_standalone\set_vars64.bat" goto batend + +:wherevs +call "%VS_Base_Path%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath > vsinstallloc.txt +goto readloc + +:readloc +set /p VS_LOCAL= vsinstallloc.txt +goto readloc + +:readloc +set /p VS_LOCAL=