Skip to content

Commit

Permalink
Builder|macOS: Codesign and notarize as a post-build step
Browse files Browse the repository at this point in the history
No need to do this multiple times for the client bundle.
  • Loading branch information
skyjake committed Oct 12, 2019
1 parent d3945ac commit 4ac4752
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 23 deletions.
1 change: 1 addition & 0 deletions doomsday/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ if (NOT IOS)
endif ()
add_subdirectory (tests)
endif ()
add_subdirectory (post)
3 changes: 1 addition & 2 deletions doomsday/apps/client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ if (TARGET DirectX)
target_link_libraries (client PUBLIC DirectX)
endif ()
if (CMAKE_SYSTEM_NAME MATCHES "BSD")
target_link_libraries (client PUBLIC execinfo)
target_link_libraries (client PUBLIC execinfo)
endif()

target_link_libraries (client PUBLIC Deng::libappfw Deng::libdoomsday)
Expand Down Expand Up @@ -324,5 +324,4 @@ if (MSVC)
add_custom_command (TARGET client POST_BUILD COMMAND ${fn} ${_intDir})
endif ()

deng_codesign (client)
deng_cotire (client include/precompiled.h)
11 changes: 11 additions & 0 deletions doomsday/post/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
include (../cmake/Config.cmake)

if (APPLE)
# Code-sign and notarize the application bundles.
if (TARGET client)
deng_codesign (client)
endif ()
if (TARGET shell)
deng_codesign (shell)
endif ()
endif ()
6 changes: 0 additions & 6 deletions doomsday/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,3 @@ if (UNIX)
endif ()
add_subdirectory (texc)
add_subdirectory (wadtool)

if (APPLE AND TARGET client)
# Tools install files into the Doomsday.app bundle, so it must now be
# signed again.
deng_codesign(client)
endif ()
3 changes: 1 addition & 2 deletions doomsday/tools/shell/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ add_definitions (
)

file (GLOB SOURCES src/*.cpp src/*.h res/shell.qrc)
set (MAC_RES
set (MAC_RES
res/macx/shell.icns,Resources
res/macx/English.lproj,Resources
)
Expand All @@ -45,7 +45,6 @@ deng_target_link_qt (shell PUBLIC Widgets)
# Deployment.
deng_install_bundle_deps (shell Deng::libcore Deng::libshell)
deng_install_deployqt (shell)
deng_codesign (shell)

if (UNIX AND NOT APPLE)
configure_file (doomsday-shell.desktop.in net.dengine.Shell.desktop)
Expand Down
6 changes: 0 additions & 6 deletions doomsday/tools/texc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,3 @@ set (DOC_DIR ${DENG_INSTALL_DOC_DIR}/texc)
deng_install_tool (texc)
install (FILES doc/texc.txt DESTINATION ${DOC_DIR})
install (DIRECTORY examples DESTINATION ${DOC_DIR})

if (APPLE AND TARGET client)
# Installed to app bundle, so must be re-signed.
# TODO: Build this before client, so it can be bundled cleanly.
deng_codesign (client)
endif ()
7 changes: 0 additions & 7 deletions doomsday/tools/wadtool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,3 @@ target_link_libraries (wadtool Deng::liblegacy)

deng_target_rpath (wadtool)
deng_install_tool (wadtool)

if (APPLE AND TARGET client)
# Installed to app bundle, so must be re-signed.
# TODO: Build this before client, so it can be bundled cleanly.
deng_codesign (client)
endif ()

0 comments on commit 4ac4752

Please sign in to comment.