Skip to content

v3.0: use new C++ features, CMake changes, and deprecations

Compare
Choose a tag to compare
@github-actions github-actions released this 16 Jul 21:45
v3.0.0
38d3543

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 for std::format if it is available, otherwise it is an alias for fmt::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() and ESDUtilities::GetPluginDirectoryPath() to return an std::filesystem::path instead of an std::string
  • Removed ESDDebugf() and ESDLogf(); use the std::format-based ESDDebug() and ESDLog() functions instead
  • changes the provided StreamDeckSDK.cmake to use FetchContent instead of ExternalProject; this makes it easier to use your projects' build/link flags, e.g. macos architectures
  • Marks ESDUtilities::DoSleep() as [[deprecated]] in favor of std::this_thread::sleep_for()
  • Marks the path-manipulating functions in ESDUtilities as [[deprecated]] in favor of std::filesystem::path

Getting Help

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()tostd::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"