summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Schuchardt <mikes@lunarg.com>2022-12-14 10:18:35 -0800
committerMike Schuchardt <mikes@lunarg.com>2022-12-14 14:54:56 -0800
commit665ae74873949707f9a6410abf2cd27ee9e86e2c (patch)
tree177e0f9944f363db5b0a3aa4e07fc807e4d462a9
parentffa89a44472a60d05705bbfb61ef8376babe9a34 (diff)
downloadVulkan-Tools-665ae74873949707f9a6410abf2cd27ee9e86e2c.tar.gz
Vulkan-Tools-665ae74873949707f9a6410abf2cd27ee9e86e2c.tar.bz2
Vulkan-Tools-665ae74873949707f9a6410abf2cd27ee9e86e2c.zip
vulkaninfo: Remove macOS application bundle
macOS Ventura broke the "shell script as a executable" method for delivering vulkaninfo as an .app bundle. Rather than find another workaround, we decided to remove the bundle version from the SDK since it is redundant. The command-line vulkaninfo is unaffected and can still be launched from Finder.
-rw-r--r--BUILD.md6
-rw-r--r--vulkaninfo/CMakeLists.txt5
-rw-r--r--vulkaninfo/macOS/Info.plist34
-rw-r--r--vulkaninfo/macOS/Resources/VulkanIcon.icnsbin157001 -> 0 bytes
-rw-r--r--vulkaninfo/macOS/vulkaninfo.cmake73
-rwxr-xr-xvulkaninfo/macOS/vulkaninfo.sh10
6 files changed, 2 insertions, 126 deletions
diff --git a/BUILD.md b/BUILD.md
index 20582205..4b5eef7c 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -748,7 +748,6 @@ You can now run the demo applications from the command line:
open cube/vkcube.app
open cube/vkcubepp.app
- open vulkaninfo/vulkaninfo.app
Or you can locate them from `Finder` and launch them from there.
@@ -788,10 +787,9 @@ run the `otool` command again from the `build/install` directory and note:
The "bundle fix-up" operation also puts a copy of the Vulkan loader into the
bundle, making the bundle completely self-contained and self-referencing.
-##### The Non-bundled vulkaninfo Application
+##### The vulkaninfo Application
-There is also a non-bundled version of the `vulkaninfo` application that you
-can run from the command line:
+There is also a `vulkaninfo` application that you can run from the command line:
vulkaninfo/vulkaninfo
diff --git a/vulkaninfo/CMakeLists.txt b/vulkaninfo/CMakeLists.txt
index 84eea956..69842ba5 100644
--- a/vulkaninfo/CMakeLists.txt
+++ b/vulkaninfo/CMakeLists.txt
@@ -104,11 +104,6 @@ endif()
target_link_libraries(vulkaninfo Vulkan::Headers)
-# Create vulkaninfo application bundle for MacOS
-if(APPLE)
- include(${CMAKE_CURRENT_SOURCE_DIR}/macOS/vulkaninfo.cmake)
-endif()
-
if(WIN32)
target_compile_definitions(vulkaninfo PUBLIC -DVK_USE_PLATFORM_WIN32_KHR -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_WARNINGS -DVK_NO_PROTOTYPES)
if(MSVC AND NOT MSVC_VERSION LESS 1900)
diff --git a/vulkaninfo/macOS/Info.plist b/vulkaninfo/macOS/Info.plist
deleted file mode 100644
index cc7b2341..00000000
--- a/vulkaninfo/macOS/Info.plist
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>vulkaninfo.sh</string>
- <key>CFBundleGetInfoString</key>
- <string>VulkanInfo</string>
- <key>CFBundleIconFile</key>
- <string>VulkanIcon.icns</string>
- <key>CFBundleIdentifier</key>
- <string>com.lunarg.vulkaninfo</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleLongVersionString</key>
- <string>1.0</string>
- <key>CFBundleName</key>
- <string>VulkanInfo</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>1.0</string>
- <key>CSResourcesFileMapped</key>
- <true/>
- <key>NSHumanReadableCopyright</key>
- <string>Copyright (c) 2018 The Khronos Group Inc. LunarG Inc. All rights reserved.</string>
-</dict>
-</plist>
diff --git a/vulkaninfo/macOS/Resources/VulkanIcon.icns b/vulkaninfo/macOS/Resources/VulkanIcon.icns
deleted file mode 100644
index fb82fb7d..00000000
--- a/vulkaninfo/macOS/Resources/VulkanIcon.icns
+++ /dev/null
Binary files differ
diff --git a/vulkaninfo/macOS/vulkaninfo.cmake b/vulkaninfo/macOS/vulkaninfo.cmake
deleted file mode 100644
index 97830d0e..00000000
--- a/vulkaninfo/macOS/vulkaninfo.cmake
+++ /dev/null
@@ -1,73 +0,0 @@
-# ~~~
-# Copyright (c) 2018-2019 Valve Corporation
-# Copyright (c) 2018-2019 LunarG, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ~~~
-
-# Vulkaninfo Application Bundle
-
-# We already have a "vulkaninfo" target, so create a new target with a different name and use the OUTPUT_NAME property to rename the
-# target to the desired name. The standalone binary is called "vulkaninfo" and the bundle is called "vulkaninfo.app". Note that the
-# executable is a script that launches Terminal to see the output.
-add_executable(vulkaninfo-bundle
- MACOSX_BUNDLE
- vulkaninfo.cpp
- ${CMAKE_BINARY_DIR}/staging-json/MoltenVK_icd.json
- ${CMAKE_CURRENT_SOURCE_DIR}/macOS/vulkaninfo.sh
- ${CMAKE_CURRENT_SOURCE_DIR}/macOS/Resources/VulkanIcon.icns
- ${CMAKE_CURRENT_SOURCE_DIR}/macOS/vulkaninfo/metal_view.mm
- ${CMAKE_CURRENT_SOURCE_DIR}/macOS/vulkaninfo/metal_view.h)
-set_target_properties(vulkaninfo-bundle
- PROPERTIES OUTPUT_NAME
- vulkaninfo
- MACOSX_BUNDLE_INFO_PLIST
- ${CMAKE_CURRENT_SOURCE_DIR}/macOS/Info.plist)
-# We do this so vulkaninfo is linked to an individual library and NOT a framework.
-target_link_libraries(vulkaninfo-bundle ${Vulkan_LIBRARY} "-framework AppKit -framework QuartzCore" Vulkan::Headers)
-target_include_directories(vulkaninfo-bundle PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/macOS/vulkaninfo ${CMAKE_CURRENT_SOURCE_DIR}/generated ${CMAKE_BINARY_DIR}/vulkaninfo)
-add_dependencies(vulkaninfo-bundle MoltenVK_icd-staging-json)
-
-set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/macOS/vulkaninfo.sh PROPERTIES MACOSX_PACKAGE_LOCATION "MacOS")
-set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/macOS/Resources/VulkanIcon.icns
- PROPERTIES
- MACOSX_PACKAGE_LOCATION
- "Resources")
-set_source_files_properties(${CMAKE_BINARY_DIR}/staging-json/MoltenVK_icd.json
- PROPERTIES
- MACOSX_PACKAGE_LOCATION
- "Resources/vulkan/icd.d")
-
-# Xcode projects need some extra help with what would be install steps.
-if(${CMAKE_GENERATOR} MATCHES "^Xcode.*")
- add_custom_command(TARGET vulkaninfo-bundle POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy "${MOLTENVK_DIR}/MoltenVK/dylib/macOS/libMoltenVK.dylib"
- ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/vulkaninfo.app/Contents/Frameworks/libMoltenVK.dylib
- DEPENDS vulkan)
-else()
- add_custom_command(TARGET vulkaninfo-bundle POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy "${MOLTENVK_DIR}/MoltenVK/dylib/macOS/libMoltenVK.dylib"
- ${CMAKE_CURRENT_BINARY_DIR}/vulkaninfo.app/Contents/Frameworks/libMoltenVK.dylib
- DEPENDS vulkan)
-endif()
-
-# Keep RPATH so fixup_bundle can use it to find libraries
-set_target_properties(vulkaninfo-bundle PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
-install(TARGETS vulkaninfo-bundle BUNDLE DESTINATION "vulkaninfo")
-# Fix up the library search path in the executable to find (loader) libraries in the bundle. When fixup_bundle() is passed a bundle
-# in the first argument, it looks at the Info.plist file to determine the BundleExecutable. In this case, the executable is a
-# script, which can't be fixed up. Instead pass it the explicit name of the executable.
-install(CODE "
- include(BundleUtilities)
- fixup_bundle(\${CMAKE_INSTALL_PREFIX}/vulkaninfo/vulkaninfo.app/Contents/MacOS/vulkaninfo \"\" \"${Vulkan_LIBRARY_DIR}\")
- ")
diff --git a/vulkaninfo/macOS/vulkaninfo.sh b/vulkaninfo/macOS/vulkaninfo.sh
deleted file mode 100755
index 0ee910e2..00000000
--- a/vulkaninfo/macOS/vulkaninfo.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-BASEDIR=`dirname $0`
-
-if [ -d /System/Applications/Utilities/Terminal.app ]
-then
- open /System/Applications/Utilities/Terminal.app $BASEDIR/vulkaninfo
-else
- open /Applications/Utilities/Terminal.app $BASEDIR/vulkaninfo
-fi
-