mirror of https://github.com/oxen-io/lokinet
Default CODESIGN_APPEX to CODESIGN_APP
Sometimes (e.g. dev builds) these can apparently be the same; sometimes it seems they need to be different, because Apple.
This commit is contained in:
parent
3ab117a03b
commit
81d27c35c1
|
@ -1,11 +1,18 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# build the shit on mac
|
||||
# t. jeff
|
||||
# Build the shit on mac
|
||||
#
|
||||
# You will generally need to add: -DCODESIGN_APP=... to make this work, and (unless you are a
|
||||
# lokinet team member) will need to pay Apple money for your own team ID and arse around with
|
||||
# provisioning profiles. See macos/README.txt.
|
||||
#
|
||||
|
||||
set -e
|
||||
set +x
|
||||
if ! [ -f LICENSE.txt ] || ! [ -d llarp ]; then
|
||||
echo "You need to run this as ./contrib/mac.sh from the top-level lokinet project directory"
|
||||
fi
|
||||
|
||||
mkdir -p build-mac
|
||||
cd build-mac
|
||||
cmake \
|
||||
|
@ -25,4 +32,8 @@ cmake \
|
|||
-DCMAKE_BUILD_TYPE=Release \
|
||||
"$@" \
|
||||
..
|
||||
ninja install && ninja sign
|
||||
ninja sign
|
||||
|
||||
echo -e "Build complete, your app is here:\n"
|
||||
ls -lad daemon/lokinet.app
|
||||
echo ""
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
codesign --verbose=4 --force -s "@CODESIGN_DEV@" \
|
||||
codesign --verbose=4 --force -s "@CODESIGN_APPEX@" \
|
||||
--entitlements "@PROJECT_SOURCE_DIR@/contrib/macos/lokinet-extension.entitlements.plist" \
|
||||
--deep --strict --timestamp --options=runtime "@SIGN_TARGET@/Contents/PlugIns/lokinet-extension.appex"
|
||||
for file in "@SIGN_TARGET@/Contents/MacOS/lokinet" "@SIGN_TARGET@" ; do
|
||||
|
|
|
@ -70,7 +70,7 @@ endforeach()
|
|||
if(APPLE)
|
||||
|
||||
set(CODESIGN_APP "" CACHE STRING "codesign the macos app using this key identity")
|
||||
set(CODESIGN_DEV "" CACHE STRING "codesign the internal extension using this key identity")
|
||||
set(CODESIGN_APPEX "${CODESIGN_APP}" CACHE STRING "codesign the internal extension using this key identity; defaults to CODESIGN_APP if empty")
|
||||
|
||||
add_custom_target(icons ALL
|
||||
COMMAND ${PROJECT_SOURCE_DIR}/contrib/macos/mk-icns.sh ${PROJECT_SOURCE_DIR}/contrib/lokinet.svg ${CMAKE_CURRENT_BINARY_DIR}/lokinet.icns
|
||||
|
@ -96,8 +96,8 @@ if(APPLE)
|
|||
MACOSX_BUNDLE_INFO_PLIST "${PROJECT_SOURCE_DIR}/contrib/macos/Info.plist.in"
|
||||
MACOSX_BUNDLE_ICON_FILE "${CMAKE_CURRENT_BINARY_DIR}/lokinet.icns"
|
||||
MACOSX_BUNDLE_COPYRIGHT "© 2021, The Oxen Project")
|
||||
if (CODESIGN_APP AND CODESIGN_DEV)
|
||||
message(STATUS "codesigning with ${CODESIGN_APP} (app) ${CODESIGN_DEV} (appex)")
|
||||
if (CODESIGN_APP AND CODESIGN_APPEX)
|
||||
message(STATUS "codesigning with ${CODESIGN_APP} (app) ${CODESIGN_APPEX} (appex)")
|
||||
set(SIGN_TARGET "${CMAKE_CURRENT_BINARY_DIR}/lokinet.app")
|
||||
configure_file(
|
||||
"${PROJECT_SOURCE_DIR}/contrib/macos/sign.sh.in"
|
||||
|
@ -109,7 +109,7 @@ if(APPLE)
|
|||
COMMAND "${PROJECT_BINARY_DIR}/sign.sh"
|
||||
)
|
||||
else()
|
||||
message(WARNING "Not codesigning: CODESIGN_APP (=${CODESIGN_APP}) and/or CODESIGN_DEV (=${CODESIGN_DEV}) are not set")
|
||||
message(WARNING "Not codesigning: CODESIGN_APP (=${CODESIGN_APP}) and/or CODESIGN_APPEX (=${CODESIGN_APPEX}) are not set")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in New Issue