Skip to content

Commit

Permalink
Provide nightly builds via GitHub Actions
Browse files Browse the repository at this point in the history
- Add workflow for nightly builds on repo push
- Add DPLUS_SHA constant to use in version string when passed by nightly build process
- Update readme with link to latest nightly build
  • Loading branch information
elvissteinjr committed Mar 18, 2024
1 parent d4bddf0 commit bfd0ef0
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 5 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/DesktopPlus/DesktopPlus.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PreprocessorDefinitions>LOGURU_FILENAME_WIDTH=30;LOGURU_VERBOSE_SCOPE_ENDINGS=0;WIN32;_DEBUG;_WINDOWS;_WIN32_WINNT=_WIN32_WINNT_WIN8;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>LOGURU_FILENAME_WIDTH=30;LOGURU_VERBOSE_SCOPE_ENDINGS=0;DPLUS_SHA=$(DPLUS_SHA);WIN32;_DEBUG;_WINDOWS;_WIN32_WINNT=_WIN32_WINNT_WIN8;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<Optimization>Disabled</Optimization>
Expand All @@ -74,7 +74,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>LOGURU_FILENAME_WIDTH=30;LOGURU_VERBOSE_SCOPE_ENDINGS=0;WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=_WIN32_WINNT_WIN8;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>LOGURU_FILENAME_WIDTH=30;LOGURU_VERBOSE_SCOPE_ENDINGS=0;DPLUS_SHA=$(DPLUS_SHA);WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=_WIN32_WINNT_WIN8;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<DebugInformationFormat>None</DebugInformationFormat>
<Optimization>Full</Optimization>
Expand Down
4 changes: 2 additions & 2 deletions src/DesktopPlusUI/DesktopPlusUI.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>LOGURU_FILENAME_WIDTH=30;LOGURU_VERBOSE_SCOPE_ENDINGS=0;DPLUS_UI;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>LOGURU_FILENAME_WIDTH=30;LOGURU_VERBOSE_SCOPE_ENDINGS=0;DPLUS_UI;DPLUS_SHA=$(DPLUS_SHA);_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\imgui_win32_dx11_openvr;.\imgui;.\implot;$(OutDir);..\Shared;..\DesktopPlusUI;..\DesktopPlusWinRT;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<DisableSpecificWarnings>26812;%(DisableSpecificWarnings)</DisableSpecificWarnings>
Expand All @@ -76,7 +76,7 @@
<Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>LOGURU_FILENAME_WIDTH=30;LOGURU_VERBOSE_SCOPE_ENDINGS=0;DPLUS_UI;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>LOGURU_FILENAME_WIDTH=30;LOGURU_VERBOSE_SCOPE_ENDINGS=0;DPLUS_UI;DPLUS_SHA=$(DPLUS_SHA);NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\imgui_win32_dx11_openvr;.\imgui;.\implot;$(OutDir);..\Shared;..\DesktopPlusUI;..\DesktopPlusWinRT;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OmitFramePointers>true</OmitFramePointers>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
Expand Down
7 changes: 6 additions & 1 deletion src/Shared/Logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit bfd0ef0

Please sign in to comment.