From 1168b43580a17a60462b392c1b5ba99f2b6b335f Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 26 Feb 2022 13:55:14 +0100 Subject: [PATCH] Windows; use VS_DEBUGGER_WORKING_DIRECTORY to get rid of vstool if possible. Enable by passing --no-vstool to configure --- indra/CMakeLists.txt | 4 ++++ scripts/configure_firestorm.sh | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 503ddb6942..646ff1cfa2 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -163,6 +163,10 @@ endif (USE_BUGSPLAT) add_subdirectory(${VIEWER_PREFIX}newview) add_dependencies(viewer firestorm-bin) +set_target_properties( + firestorm-bin PROPERTIES + VS_DEBUGGER_WORKING_DIRECTORY "..\\..\\indra\\newview") + add_subdirectory(${VIEWER_PREFIX}doxygen EXCLUDE_FROM_ALL) if (LL_TESTS) diff --git a/scripts/configure_firestorm.sh b/scripts/configure_firestorm.sh index a8b6426ebb..b76993bd55 100755 --- a/scripts/configure_firestorm.sh +++ b/scripts/configure_firestorm.sh @@ -50,6 +50,7 @@ LL_ARGS_PASSTHRU="" JOBS="0" WANTS_NINJA=$FALSE WANTS_VSCODE=$FALSE +USE_VSTOOL=$TRUE TESTBUILD_PERIOD="0" SINGLEGRID_URI="" @@ -87,6 +88,7 @@ showUsage() echo " --ninja : Build using Ninja" echo " --vscode : Exports compile commands for VSCode (Linux only)" echo " --compiler-cache : Try to detect and use compiler cache (needs also --ninja for OSX and Windows)" + echo " --no-vstools : Do not use vstool to setup project startup properties (windows only)" echo echo "All arguments not in the above list will be passed through to LL's configure/build." echo @@ -96,7 +98,7 @@ getArgs() # $* = the options passed in from main { if [ $# -gt 0 ]; then - while getoptex "clean build config version package no-package fmodstudio openal ninja vscode compiler-cache jobs: platform: kdu opensim no-opensim singlegrid: avx avx2 tracy crashreporting testbuild: help chan: btype:" "$@" ; do + while getoptex "clean build config version package no-package fmodstudio openal ninja vscode compiler-cache no-vstools jobs: platform: kdu opensim no-opensim singlegrid: avx avx2 tracy crashreporting testbuild: help chan: btype:" "$@" ; do #ensure options are valid if [ -z "$OPTOPT" ] ; then @@ -136,6 +138,7 @@ getArgs() ninja) WANTS_NINJA=$TRUE;; vscode) WANTS_VSCODE=$TRUE;; compiler-cache) WANTS_CACHE=$TRUE;; + no-vstools) USE_VSTOOL=$FALSE;; help) showUsage && exit 0;; @@ -577,7 +580,8 @@ if [ $WANTS_CONFIG -eq $TRUE ] ; then $UNATTENDED -DLL_TESTS:BOOL=OFF -DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE -DCMAKE_BUILD_TYPE:STRING=$BTYPE $CACHE_OPT \ $CRASH_REPORTING -DVIEWER_SYMBOL_FILE:STRING="${VIEWER_SYMBOL_FILE:-}" -DROOT_PROJECT_NAME:STRING=Firestorm $LL_ARGS_PASSTHRU ${VSCODE_FLAGS:-} | tee $LOG - if [ $TARGET_PLATFORM == "windows" ] ; then + if [ $TARGET_PLATFORM == "windows" -a $USE_VSTOOL -eq $TRUE ] ; then + echo "Setting startup project via vstool" ../indra/tools/vstool/VSTool.exe --solution Firestorm.sln --startup firestorm-bin --workingdir firestorm-bin "..\\..\\indra\\newview" --config $BTYPE fi fi