Skip to content

Commit

Permalink
Update the wrapper host display to be more accurate
Browse files Browse the repository at this point in the history
This commit does a few things

1. Makes the wrapper host author and URL the free audio locations
2. Sets the wrapper host versio properly to the WRAPPER version not
   to the PLUGIN version, when used as a subordinate cmake, by using
   PROJECT_VERSION rather than CMAKE_PROJECT_VERSION to set the ifdef
3. Reads the human readable string out of the bundle for auv2 version
   which makes the host read as "Logic Pro 11.0.1 (Clap-as-AUV2)"
   rather than "Logic Pro (6029) (Clap-as-AUv2)".
4. Ups the cmake version to 0.11.0 in anticipation of the move of
   next to main

Addresses #287
  • Loading branch information
baconpaul committed Oct 12, 2024
1 parent f898db3 commit 6d4a454
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ option(CLAP_WRAPPER_BUILD_TESTS "Build test CLAP wrappers" OFF)

project(clap-wrapper
LANGUAGES C CXX
VERSION 0.10.1
VERSION 0.11.0
DESCRIPTION "CLAP-as-X wrappers"
)
set(CLAP_WRAPPER_VERSION "${CMAKE_PROJECT_VERSION}" CACHE STRING "Version of the wrapper project")
set(CLAP_WRAPPER_VERSION "${PROJECT_VERSION}" CACHE STRING "Version of the wrapper project")
message(STATUS "clap-wrapper: CLAP_WRAPPER_VERSION is ${CLAP_WRAPPER_VERSION}")

if (APPLE)
enable_language(OBJC)
Expand Down
4 changes: 2 additions & 2 deletions src/clap_proxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ Plugin::Plugin(IHost* host)
: _host{CLAP_VERSION,
this,
host->host_get_name(),
"defiant nerd",
"https://www.defiantnerd.com",
"The CLAP Wrapper Team",
"https://github.com/free-audio/clap-wrapper",
CLAP_WRAPPER_VERSION,
Plugin::clapExtension,
Plugin::clapRequestRestart,
Expand Down
18 changes: 14 additions & 4 deletions src/detail/auv2/auv2_base_classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -452,14 +452,24 @@ class WrapAsAUV2 : public ausdk::AUBase,
_hostname = text;
}
}
CFStringRef myVersionString =
(CFStringRef)CFBundleGetValueForInfoDictionaryKey(applicationBundle, kCFBundleVersionKey);
CFStringRef myVersionString = (CFStringRef)CFBundleGetValueForInfoDictionaryKey(
applicationBundle, CFSTR("CFBundleShortVersionString"));
if (myVersionString)
{
CFStringGetCString(myVersionString, text, 64, kCFStringEncodingUTF8);
_hostname.append(" (");
_hostname.append(" ");
_hostname.append(text);
_hostname.append(")");
}
else
{
myVersionString =
(CFStringRef)CFBundleGetValueForInfoDictionaryKey(applicationBundle, kCFBundleVersionKey);
if (myVersionString)
{
CFStringGetCString(myVersionString, text, 64, kCFStringEncodingUTF8);
_hostname.append(" ");
_hostname.append(text);
}
}
_hostname.append(" (CLAP-as-AUv2)");
}
Expand Down

0 comments on commit 6d4a454

Please sign in to comment.