v3.0: use new C++ features, CMake changes, and deprecations
This release:
- targets C++20; this means that MacOS plugins must target MacOS 10.15 or above
- Removes the
kESDSDKVersion
constant - Adds
ESD::format()
- this is an alias forstd::format
if it is available, otherwise it is an alias forfmt::format
. This adds support for compile-time verification of wchar-based format strings when building with MSVC 2022 - fmtlib is no longer included if
std::format
is available - Changes
ESDUtilities::GetPluginExecutablePath()
andESDUtilities::GetPluginDirectoryPath()
to return anstd::filesystem::path
instead of anstd::string
- Removed
ESDDebugf()
andESDLogf()
; use thestd::format
-basedESDDebug()
andESDLog()
functions instead - changes the provided
StreamDeckSDK.cmake
to useFetchContent
instead ofExternalProject
; this makes it easier to use your projects' build/link flags, e.g. macos architectures - Marks
ESDUtilities::DoSleep()
as[[deprecated]]
in favor ofstd::this_thread::sleep_for()
- Marks the path-manipulating functions in
ESDUtilities
as[[deprecated]]
in favor ofstd::filesystem::path
Windows note
StreamDeck-CPPSDK must build in C++20, including /await:strict
instead of /await
; older versions of the Windows SDK may raise errors saying that /await
is needed - in this case, a newer Windows SDK must be used.
If you use GitHub Actions, one way to do this is to specify CMAKE_SYSTEM_VERSION=10.0.22621.0
ESDUtilities::GetParentDirectoryPath()to
std::filesystem::path::parent_path()` migration note
GetParentDirectoryPath()
will automatically remove trailing slashes, however std::filesystem::path
will not; for example, GetParentDirectoryPath("/foo/bar/")
is /foo
, but std::filesystem::path("/foo/bar/").parent_path()
is "/foo/bar"