From cfcf6b76676b069ff142e45314a6a887239c571a Mon Sep 17 00:00:00 2001 From: Jim Derry Date: Wed, 28 Apr 2021 14:47:50 -0400 Subject: [PATCH 1/2] Add support for the required Info.plist to the Tidy console application, thus enabling notarization support that's now required on macOS. Unlike the similar pull request on the master branch, this one ensures that the proper version is always used, via the same mechanism that CMakeLists uses to set the version. --- CMakeLists.txt | 8 ++++++++ build/cmake/.gitignore | 1 + console/Info.plist.in | 18 ++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 console/Info.plist.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 6acfd72..49f9f9a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -441,6 +441,14 @@ if (SUPPORT_CONSOLE_APP) if (MSVC) set_target_properties( ${name} PROPERTIES DEBUG_POSTFIX d ) endif () + if (APPLE) + string(TIMESTAMP CURRENT_YEAR "%Y") + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/console/Info.plist.in + ${CMAKE_CURRENT_BINARY_DIR}/Info.plist + ) + target_link_options(${name} PRIVATE LINKER:-sectcreate,__TEXT,__info_plist,Info.plist) + endif () if (NOT TIDY_CONSOLE_SHARED) set_target_properties( ${name} PROPERTIES COMPILE_FLAGS "-DTIDY_STATIC" ) diff --git a/build/cmake/.gitignore b/build/cmake/.gitignore index 23b5a7b..5a1fecb 100644 --- a/build/cmake/.gitignore +++ b/build/cmake/.gitignore @@ -33,3 +33,4 @@ tidy1.xsl tidy.pc *.vcproj .pkg +Info.plist diff --git a/console/Info.plist.in b/console/Info.plist.in new file mode 100644 index 0000000..b2395d4 --- /dev/null +++ b/console/Info.plist.in @@ -0,0 +1,18 @@ + + + + + CFBundleDisplayName + HTML Tidy + CFBundleIdentifier + org.htacg.html-tidy.tidy5 + CFBundleInfoDictionaryVersion + 6.0 + CFBundleShortVersionString + @LIBTIDY_VERSION@ + CFBundleVersion + @LIBTIDY_DATE@ + NSHumanReadableCopyright + ©@CURRENT_YEAR@ HATCG and Contributors + + From c044ab323e35fecedb5522ed5df72418c5b36d82 Mon Sep 17 00:00:00 2001 From: Jim Derry Date: Fri, 21 May 2021 08:23:10 -0400 Subject: [PATCH 2/2] Update Info.plist.in --- console/Info.plist.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/console/Info.plist.in b/console/Info.plist.in index b2395d4..06bf3f7 100644 --- a/console/Info.plist.in +++ b/console/Info.plist.in @@ -13,6 +13,6 @@ CFBundleVersion @LIBTIDY_DATE@ NSHumanReadableCopyright - ©@CURRENT_YEAR@ HATCG and Contributors + ©@CURRENT_YEAR@ HTACG and Contributors