From 9e19e6712b60dc8d14e971ffd725861d35f5d9ab Mon Sep 17 00:00:00 2001 From: Beq Date: Sat, 17 Sep 2022 22:26:27 +0100 Subject: [PATCH 1/2] updates for GHA to get windows to work. also requires python hackery pushed as separate commit pending a better solution. --- .github/workflows/build_viewer.yml | 12 ++++++++++-- scripts/configure_firestorm.sh | 17 +++++++++++++---- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_viewer.yml b/.github/workflows/build_viewer.yml index dce5d85f28..8bc2ae7010 100644 --- a/.github/workflows/build_viewer.yml +++ b/.github/workflows/build_viewer.yml @@ -37,6 +37,11 @@ jobs: with: repository: FirestormViewer/fs-build-variables path: build-variables + + - name: set VSVER for Windows builds + if: runner.os == 'Windows' + run: echo "AUTOBUILD_VSVER=170" >> $GITHUB_ENV + shell: bash - name: Install required Ubuntu packages if: runner.os == 'Linux' @@ -45,6 +50,9 @@ jobs: - name: install autobuild run: pip3 install git+https://github.com/Nicky-D/autobuild@main_nd + - name: install autobuild + run: pip3 install llbase + - name: Configure run: autobuild configure -c ReleaseFS -A${{matrix.addrsize}} -- --package --chan ${{github.ref_name}} ${{env.EXTRA_ARGS}} ${{env.FS_GRID}} shell: bash @@ -59,8 +67,8 @@ jobs: with: name: ${{ matrix.os }}-${{matrix.addrsize}}-${{matrix.grid}}-artifacts.zip path: | - build-vc150-*/newview/Release/*Setup.exe - build-vc150-*/newview/Release/*.xz + build-*/newview/Release/*Setup.exe + build-*/newview/Release/*.xz - name: publish ${{ matrix.os }} artifacts if: runner.os == 'Linux' diff --git a/scripts/configure_firestorm.sh b/scripts/configure_firestorm.sh index 353c760f9e..a568eb33e6 100755 --- a/scripts/configure_firestorm.sh +++ b/scripts/configure_firestorm.sh @@ -359,7 +359,10 @@ then if [ "$OSTYPE" = "cygwin" ] ; then export AUTOBUILD_EXEC="$(cygpath -u $AUTOBUILD)" fi - + if [ -z "$AUTOBUILD_EXEC" ] + then + export AUTOBUILD_EXEC=`which autobuild` + fi # load autobuild provided shell functions and variables eval "$("$AUTOBUILD_EXEC" source_environment)" # vsvars is needed for determing path to VS runtime redist files in Copy3rdPartyLibs.cmake @@ -605,9 +608,15 @@ if [ $WANTS_BUILD -eq $TRUE ] ; then make -j $JOBS | tee -a $LOG fi elif [ $TARGET_PLATFORM == "windows" ] ; then - msbuild.exe Firestorm.sln /p:Configuration=${BTYPE} /flp:LogFile="logs\\FirestormBuild_win-${AUTOBUILD_ADDRSIZE}.log" \ - /flp1:"errorsonly;LogFile=logs\\FirestormBuild_win-${AUTOBUILD_ADDRSIZE}.err" /p:Platform=${AUTOBUILD_WIN_VSPLATFORM} /t:Build /p:useenv=true \ - /verbosity:normal /toolsversion:15.0 /p:"VCBuildAdditionalOptions= /incremental" + if [ "${AUTOBUILD_VSVER}" -ge 170 ] ; then + msbuild.exe Firestorm.sln -p:Configuration=${BTYPE} -flp:LogFile="logs\\FirestormBuild_win-${AUTOBUILD_ADDRSIZE}.log" \ + -flp1:"errorsonly;LogFile=logs\\FirestormBuild_win-${AUTOBUILD_ADDRSIZE}.err" -p:Platform=${AUTOBUILD_WIN_VSPLATFORM} -t:Build -p:useenv=true \ + -verbosity:normal -toolsversion:Current -p:"VCBuildAdditionalOptions= /incremental" + else + msbuild.exe Firestorm.sln -p:Configuration=${BTYPE} -flp:LogFile="logs\\FirestormBuild_win-${AUTOBUILD_ADDRSIZE}.log" \ + -flp1:"errorsonly;LogFile=logs\\FirestormBuild_win-${AUTOBUILD_ADDRSIZE}.err" -p:Platform=${AUTOBUILD_WIN_VSPLATFORM} -t:Build -p:useenv=true \ + -verbosity:normal -toolsversion:15.0 -p:"VCBuildAdditionalOptions= /incremental" + fi fi fi From 6924ce21a0e1e5f5cad7e2e008171d2427f39a47 Mon Sep 17 00:00:00 2001 From: Beq Date: Sat, 17 Sep 2022 22:28:05 +0100 Subject: [PATCH 2/2] Python cmake hack for GHA (you will need python >3.9 now) this is to get around the issue of windows on github finding the wrong python in cmake due to our existing hacks for cygwin. --- indra/cmake/Python.cmake | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/indra/cmake/Python.cmake b/indra/cmake/Python.cmake index 162eaf6a6c..caa73172ca 100644 --- a/indra/cmake/Python.cmake +++ b/indra/cmake/Python.cmake @@ -13,17 +13,14 @@ if (WINDOWS) NO_DEFAULT_PATH ) else() + set(Python3_FIND_REGISTRY "LAST") find_program(PYTHON_EXECUTABLE NAMES python.exe NO_DEFAULT_PATH # added so that cmake does not find cygwin python PATHS - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\3.7\\InstallPath] - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\3.8\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\3.9\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\3.10\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\3.11\\InstallPath] - [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.7\\InstallPath] - [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.8\\InstallPath] [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.9\\InstallPath] [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.10\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\3.11\\InstallPath]