Skip to content

Commit

Permalink
Provide nightly builds via GitHub Actions
Browse files Browse the repository at this point in the history
- Add DPLUS_SHA constant to use in version string when passed by nightly build process
- Add workflow for nightly builds on repo push
- Update readme with link to latest nightly build
  • Loading branch information
elvissteinjr committed Mar 18, 2024
1 parent 866ca7b commit f58af7f
Show file tree
Hide file tree
Showing 4 changed files with 66 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-${{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 @@ -30,6 +30,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).

### Nightly Build

An automated build based on the latest code changes can be downloaded from [here](https://nightly.link/elvissteinjr/DesktopPlus/workflows/nightly/master).
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
8 changes: 4 additions & 4 deletions src/DesktopPlusUI/DesktopPlusUI.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;DPLUS_UI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;DPLUS_UI;DPLUS_SHA=$(DPLUS_SHA);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\imgui_win32_dx11_openvr;.\imgui;.\implot;$(OutDir);..\Shared;..\DesktopPlusUI;..\DesktopPlusWinRT;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<DisableSpecificWarnings>26812;%(DisableSpecificWarnings)</DisableSpecificWarnings>
Expand All @@ -109,7 +109,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_WINDOWS;DPLUS_UI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_WINDOWS;DPLUS_UI;DPLUS_SHA=$(DPLUS_SHA);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\imgui_win32_dx11_openvr;.\imgui;.\implot;$(OutDir);..\Shared;..\DesktopPlusUI;..\DesktopPlusWinRT;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<DisableSpecificWarnings>26812;%(DisableSpecificWarnings)</DisableSpecificWarnings>
Expand All @@ -130,7 +130,7 @@
<Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;DPLUS_UI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;DPLUS_UI;DPLUS_SHA=$(DPLUS_SHA);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\imgui_win32_dx11_openvr;.\imgui;.\implot;$(OutDir);..\Shared;..\DesktopPlusUI;..\DesktopPlusWinRT;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OmitFramePointers>true</OmitFramePointers>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
Expand All @@ -156,7 +156,7 @@
<Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;DPLUS_UI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;DPLUS_UI;DPLUS_SHA=$(DPLUS_SHA);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\imgui_win32_dx11_openvr;.\imgui;.\implot;$(OutDir);..\Shared;..\DesktopPlusUI;..\DesktopPlusWinRT;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OmitFramePointers>true</OmitFramePointers>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
Expand Down
8 changes: 7 additions & 1 deletion src/DesktopPlusUI/WindowSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3087,7 +3087,13 @@ void WindowSettings::UpdateCatMisc()
ImGui::Columns(2, "ColumnVersionInfo", false);
ImGui::SetColumnWidth(0, column_width_0 * 2.0f);

ImGui::Text("Desktop+ Version 2.8.6");
//DPLUS_SHA is set externally for nightly builds to use the commit hash in version string
#ifdef DPLUS_SHA
const char* str_version = "Desktop+ " DPLUS_SHA;
#else
const char* str_version = "Desktop+ Version 2.8.6";
#endif
ImGui::TextUnformatted(str_version);

ImGui::Columns(1);
}
Expand Down

0 comments on commit f58af7f

Please sign in to comment.