Skip to content

Commit

Permalink
Merge pull request #129 from enertial/git_repo_update_to_windows_msbu…
Browse files Browse the repository at this point in the history
…ild_2022

Git repo update to windows msbuild 2022
  • Loading branch information
charlestytler authored Dec 27, 2023
2 parents c051e39 + 826ef38 commit acf91f5
Show file tree
Hide file tree
Showing 737 changed files with 214 additions and 102,838 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cpp-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ env:

jobs:
build:
runs-on: windows-2019
runs-on: windows-latest

steps:
- name: Checkout repository
Expand Down
20 changes: 18 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
settingsUI/
*.exe
*.pdb
*.log
.vs
.vs/
.vscode
.vcxproj.*
*.user

# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,14 @@ Sources

A build script is included which will build both the C++ executable which handles the communcation with DCS as well as the package for the Stream Deck plugin: `Tools/build_plugin.bat`

You will need Visual Studio installed, and may need to edit the location of the Visual Studio install location inside the batch file if it does not match for your machine. Running the batch script will build the Streamdeck plugin and run all unit tests, generating the plugin file at `Release/com.ctytler.dcs.streamDeckPlugin`.
Before running the .bat file you will need to:
- Install MSBuild to compile C++ (comes with Microsoft Visual Studio or Build Tools)
- Install npm for Windows
- Add your install location of MSBuild.exe to your PATH environment variable:
- Click start button to search and select "Edit environment variables for your account"
- Under "User variables for ..." select the "Path" row and choose "Edit"
- Add a New path of your MSBuild.exe install location, such as "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin"

Current version was built with Visual Studio Community 2019.
Running the batch script will build the Streamdeck plugin and run all unit tests, generating the plugin file at `Release/com.ctytler.dcs.streamDeckPlugin`.

Additional convenient one-liner to build if using Windows Subsystem for Linux (WSL):
```
cmd.exe /C """C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" \& devenv D:\\code\\DCS\\streamdeck-dcs-interface\\Sources\\Windows\\com.ctytler.dcs.sdPlugin.sln /build "Release^|x64"""
```
Current version was built with Visual Studio Community 2022.
Binary file modified Release/com.ctytler.dcs.streamDeckPlugin
Binary file not shown.
2 changes: 1 addition & 1 deletion Sources/backend-cpp/ElgatoSD/EPLJSONUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// Includes
//------------------------------------------------------------------------------

#include "Vendor/json/src/json.hpp"
#include "nlohmann/json.hpp"
using json = nlohmann::json;

class EPLJSONUtils
Expand Down
2 changes: 1 addition & 1 deletion Sources/backend-cpp/ElgatoSD/ESDBasePlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#pragma once

#include "Vendor/json/src/json.hpp"
#include "nlohmann/json.hpp"
using json = nlohmann::json;

class ESDConnectionManager;
Expand Down
23 changes: 17 additions & 6 deletions Sources/backend-cpp/ElgatoSD/ElgatoSD.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down Expand Up @@ -164,8 +164,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<Target Name="AddWildCardItems"
AfterTargets="BuildGenerateSources">
<Target Name="AddWildCardItems" AfterTargets="BuildGenerateSources">
<ItemGroup>
<ClCompile Include="@(_WildCardClCompile)" />
</ItemGroup>
Expand All @@ -182,7 +181,19 @@
<ItemGroup>
<_WildCardClInclude Include="*.h" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\Windows\packages\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.1.8.1.7\build\native\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.targets" Condition="Exists('..\Windows\packages\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.1.8.1.7\build\native\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.targets')" />
<Import Project="..\Windows\packages\nlohmann.json.3.11.2\build\native\nlohmann.json.targets" Condition="Exists('..\Windows\packages\nlohmann.json.3.11.2\build\native\nlohmann.json.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\Windows\packages\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.1.8.1.7\build\native\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\Windows\packages\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.1.8.1.7\build\native\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.targets'))" />
<Error Condition="!Exists('..\Windows\packages\nlohmann.json.3.11.2\build\native\nlohmann.json.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\Windows\packages\nlohmann.json.3.11.2\build\native\nlohmann.json.targets'))" />
</Target>
</Project>
5 changes: 5 additions & 0 deletions Sources/backend-cpp/ElgatoSD/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn" version="1.8.1.7" targetFramework="native" />
<package id="nlohmann.json" version="3.11.2" targetFramework="native" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "Utilities/Decimal.h"
#include "Utilities/UdpSocket.h"
#include "Vendor/json/src/json.hpp"
#include "nlohmann/json.hpp"
using json = nlohmann::json;

#include <optional>
Expand Down
23 changes: 17 additions & 6 deletions Sources/backend-cpp/SimulatorInterface/SimulatorInterface.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down Expand Up @@ -152,8 +152,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<Target Name="AddWildCardItems"
AfterTargets="BuildGenerateSources">
<Target Name="AddWildCardItems" AfterTargets="BuildGenerateSources">
<ItemGroup>
<ClCompile Include="@(_WildCardClCompile)" />
</ItemGroup>
Expand All @@ -172,7 +171,19 @@
<_WildCardClInclude Include="Protocols/*.h" />
<_WildCardClInclude Include="*.h" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\Windows\packages\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.1.8.1.7\build\native\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.targets" Condition="Exists('..\Windows\packages\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.1.8.1.7\build\native\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.targets')" />
<Import Project="..\Windows\packages\nlohmann.json.3.11.2\build\native\nlohmann.json.targets" Condition="Exists('..\Windows\packages\nlohmann.json.3.11.2\build\native\nlohmann.json.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\Windows\packages\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.1.8.1.7\build\native\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\Windows\packages\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.1.8.1.7\build\native\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.targets'))" />
<Error Condition="!Exists('..\Windows\packages\nlohmann.json.3.11.2\build\native\nlohmann.json.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\Windows\packages\nlohmann.json.3.11.2\build\native\nlohmann.json.targets'))" />
</Target>
</Project>
5 changes: 5 additions & 0 deletions Sources/backend-cpp/SimulatorInterface/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn" version="1.8.1.7" targetFramework="native" />
<package id="nlohmann.json" version="3.11.2" targetFramework="native" />
</packages>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2022 Charles Tytler

#include "Vendor/json/src/json.hpp"
#include "nlohmann/json.hpp"
using json = nlohmann::json;

json backwardsCompatibilityHandler(const json &prevVersionPayload);
23 changes: 17 additions & 6 deletions Sources/backend-cpp/StreamdeckContext/StreamdeckContext.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down Expand Up @@ -154,8 +154,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<Target Name="AddWildCardItems"
AfterTargets="BuildGenerateSources">
<Target Name="AddWildCardItems" AfterTargets="BuildGenerateSources">
<ItemGroup>
<ClCompile Include="@(_WildCardClCompile)" />
</ItemGroup>
Expand All @@ -176,7 +175,19 @@
<_WildCardClInclude Include="SendActions\*.h" />
<_WildCardClInclude Include="*.h" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\Windows\packages\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.1.8.1.7\build\native\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.targets" Condition="Exists('..\Windows\packages\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.1.8.1.7\build\native\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.targets')" />
<Import Project="..\Windows\packages\nlohmann.json.3.11.2\build\native\nlohmann.json.targets" Condition="Exists('..\Windows\packages\nlohmann.json.3.11.2\build\native\nlohmann.json.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\Windows\packages\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.1.8.1.7\build\native\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\Windows\packages\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.1.8.1.7\build\native\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.targets'))" />
<Error Condition="!Exists('..\Windows\packages\nlohmann.json.3.11.2\build\native\nlohmann.json.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\Windows\packages\nlohmann.json.3.11.2\build\native\nlohmann.json.targets'))" />
</Target>
</Project>
5 changes: 5 additions & 0 deletions Sources/backend-cpp/StreamdeckContext/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn" version="1.8.1.7" targetFramework="native" />
<package id="nlohmann.json" version="3.11.2" targetFramework="native" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "Utilities/JsonReader.h"
#include "Utilities/LuaReader.h"

#include "Vendor/json/src/json.hpp"
#include "nlohmann/json.hpp"
using json = nlohmann::json;

class CallBackTimer
Expand Down
Loading

0 comments on commit acf91f5

Please sign in to comment.