diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 0000000..66f835f --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,50 @@ +name: Nightly Build + +on: + push: + paths-ignore: + - 'README.md' + - 'CONTRIBUTING' + - 'LICENSE' + - 'docs/**' + +env: + SOLUTION_FILE_PATH: ./src/DesktopPlus.sln + OUTPUT_PATH: ./src/x64/Release + BUILD_CONFIGURATION: Release + +permissions: + contents: read + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 + + - name: Restore NuGet Packages + working-directory: ${{env.GITHUB_WORKSPACE}} + run: nuget restore ${{env.SOLUTION_FILE_PATH}} + + - name: Build + working-directory: ${{env.GITHUB_WORKSPACE}} + run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:DPLUS_SHA='"${{github.sha}}"' ${{env.SOLUTION_FILE_PATH}} + + - name: Rename Output Folder for Archive + working-directory: ${{env.GITHUB_WORKSPACE}} + run: ren ${{env.OUTPUT_PATH}} DesktopPlus + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: DesktopPlus-NewUI-${{github.sha}} + path: | + ./src/x64 + !./**/*.h + !./**/*.lib + !./**/*.exp diff --git a/README.md b/README.md index 6a8ca33..31c9a19 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,11 @@ Install Desktop+ from its [Steam store page](https://store.steampowered.com/app/ Download and extract the latest archive from the [releases page](https://github.com/elvissteinjr/DesktopPlus/releases). Follow instructions in the included [readme file](assets/readme.txt). Make sure to also download the [Desktop+ Browser component](https://github.com/elvissteinjr/DesktopPlusBrowser/releases) if you want browser overlay support. +### Nightly Build + +An automated build based on the latest code changes can be downloaded from [here](https://nightly.link/elvissteinjr/DesktopPlus/workflows/nightly/new-ui). +Keep in mind that nightly builds are unstable and mostly untested. Prefer the latest release if possible. + ### Building from Source The Visual Studio 2019 Solution builds out of the box with no further external dependencies. diff --git a/src/DesktopPlus/DesktopPlus.vcxproj b/src/DesktopPlus/DesktopPlus.vcxproj index 676943f..48d0f89 100644 --- a/src/DesktopPlus/DesktopPlus.vcxproj +++ b/src/DesktopPlus/DesktopPlus.vcxproj @@ -51,7 +51,7 @@ - LOGURU_FILENAME_WIDTH=30;LOGURU_VERBOSE_SCOPE_ENDINGS=0;WIN32;_DEBUG;_WINDOWS;_WIN32_WINNT=_WIN32_WINNT_WIN8;%(PreprocessorDefinitions) + LOGURU_FILENAME_WIDTH=30;LOGURU_VERBOSE_SCOPE_ENDINGS=0;DPLUS_SHA=$(DPLUS_SHA);WIN32;_DEBUG;_WINDOWS;_WIN32_WINNT=_WIN32_WINNT_WIN8;%(PreprocessorDefinitions) MultiThreadedDebug EditAndContinue Disabled @@ -74,7 +74,7 @@ - LOGURU_FILENAME_WIDTH=30;LOGURU_VERBOSE_SCOPE_ENDINGS=0;WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=_WIN32_WINNT_WIN8;%(PreprocessorDefinitions) + LOGURU_FILENAME_WIDTH=30;LOGURU_VERBOSE_SCOPE_ENDINGS=0;DPLUS_SHA=$(DPLUS_SHA);WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=_WIN32_WINNT_WIN8;%(PreprocessorDefinitions) MultiThreaded None Full diff --git a/src/DesktopPlusUI/DesktopPlusUI.vcxproj b/src/DesktopPlusUI/DesktopPlusUI.vcxproj index 0f144b1..2b504ad 100644 --- a/src/DesktopPlusUI/DesktopPlusUI.vcxproj +++ b/src/DesktopPlusUI/DesktopPlusUI.vcxproj @@ -55,7 +55,7 @@ Level3 Disabled - LOGURU_FILENAME_WIDTH=30;LOGURU_VERBOSE_SCOPE_ENDINGS=0;DPLUS_UI;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + LOGURU_FILENAME_WIDTH=30;LOGURU_VERBOSE_SCOPE_ENDINGS=0;DPLUS_UI;DPLUS_SHA=$(DPLUS_SHA);_DEBUG;_WINDOWS;%(PreprocessorDefinitions) .\imgui_win32_dx11_openvr;.\imgui;.\implot;$(OutDir);..\Shared;..\DesktopPlusUI;..\DesktopPlusWinRT;%(AdditionalIncludeDirectories) MultiThreadedDebug 26812;%(DisableSpecificWarnings) @@ -76,7 +76,7 @@ Full true true - LOGURU_FILENAME_WIDTH=30;LOGURU_VERBOSE_SCOPE_ENDINGS=0;DPLUS_UI;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + LOGURU_FILENAME_WIDTH=30;LOGURU_VERBOSE_SCOPE_ENDINGS=0;DPLUS_UI;DPLUS_SHA=$(DPLUS_SHA);NDEBUG;_WINDOWS;%(PreprocessorDefinitions) .\imgui_win32_dx11_openvr;.\imgui;.\implot;$(OutDir);..\Shared;..\DesktopPlusUI;..\DesktopPlusWinRT;%(AdditionalIncludeDirectories) true MultiThreaded diff --git a/src/Shared/Logging.h b/src/Shared/Logging.h index b56c7dc..b0cb28e 100644 --- a/src/Shared/Logging.h +++ b/src/Shared/Logging.h @@ -5,7 +5,12 @@ #include "loguru.hpp" //Version string logged and displayed in the UI -static const char* const k_pch_DesktopPlusVersion = "Desktop+ NewUI Preview 14"; +//DPLUS_SHA is set externally for nightly builds to use the commit hash in version string +#ifdef DPLUS_SHA + static const char* const k_pch_DesktopPlusVersion = "Desktop+ NewUI " DPLUS_SHA; +#else + static const char* const k_pch_DesktopPlusVersion = "Desktop+ NewUI Preview 14"; +#endif void DPLog_Init(const char* name); void DPLog_SteamVR_SystemInfo();