From 1fe92738d838b777f1ba4aac57da69e15455c0f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Wed, 11 Oct 2023 15:17:14 +0800 Subject: [PATCH] macOS: embed `Info.plist` --- CMakeLists.txt | 10 ++++++++++ src/util/apple/Info.plist.in | 14 ++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 src/util/apple/Info.plist.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b4037c19..bdecfd90c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -222,6 +222,9 @@ fastfetch_load_text(src/data/help_config.txt DATATEXT_HELP_CONFIG) configure_file(src/fastfetch_config.h.in fastfetch_config.h @ONLY) configure_file(src/fastfetch_datatext.h.in fastfetch_datatext.h @ONLY) +if(APPLE) + configure_file(src/util/apple/Info.plist.in Info.plist @ONLY) +endif() #################### # Ascii image data # @@ -957,6 +960,13 @@ if(WIN32) target_sources(flashfetch PRIVATE src/util/windows/version.rc ) +elseif(APPLE) + target_link_options(fastfetch + PRIVATE LINKER:-sectcreate,__TEXT,__info_plist,Info.plist + ) + target_link_options(flashfetch + PRIVATE LINKER:-sectcreate,__TEXT,__info_plist,Info.plist + ) endif() ################### diff --git a/src/util/apple/Info.plist.in b/src/util/apple/Info.plist.in new file mode 100644 index 000000000..4fd959cfd --- /dev/null +++ b/src/util/apple/Info.plist.in @@ -0,0 +1,14 @@ + + + + + CFBundleIdentifier + fastfetch + CFBundleName + @PROJECT_NAME@ + CFBundleShortVersionString + @PROJECT_VERSION@ + CFBundleDevelopmentRegion + English + +