Skip to content

Commit

Permalink
codesign differently
Browse files Browse the repository at this point in the history
  • Loading branch information
DBraun committed Apr 4, 2024
1 parent b9a9868 commit be1ebfb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 21 deletions.
10 changes: 0 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,3 @@ if(MSVC)
${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:TD-Faust>" ${CMAKE_SOURCE_DIR}/Plugins
)
endif()

# Ensure that we only attempt to sign on macOS.
if(APPLE)
if(NOT "${CMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM}" STREQUAL "")
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "Developer ID Application")
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_STYLE "Manual")
else()
message(WARNING "CMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM is not set. The plugin will not be signed.")
endif()
endif()
1 change: 1 addition & 0 deletions build_tdfaust.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def build_macos(pythonver: str, touchdesigner_app: str, arch: str=None):
run_command(cmake_command)
run_command(["cmake", "--build", "build", "--config", "Release"])
os.system('mv build/Release/TD-Faust.plugin Plugins')
os.system('codesign --verify --deep --strict --verbose=2 build/Release/TD-Faust.plugin')

if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Build TD-Faust plugin for Windows or macOS.")
Expand Down
5 changes: 4 additions & 1 deletion faust2td.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import re
import math
import argparse
import os
from os.path import isfile, isdir, abspath
import subprocess
import shlex
Expand Down Expand Up @@ -304,6 +305,8 @@ def add_toggle(item) -> str:
subprocess.call(shlex.split(f'cmake --build {build_dir} --config Release'))

if platform.system() == 'Darwin':
subprocess.call(shlex.split(f'cp -r {build_dir}/Release/{op_type}.plugin Plugins'))
file_dest = f'"{build_dir}/Release/{op_type}.plugin"'
subprocess.call(shlex.split(f'cp -r {file_dest} Plugins'))
os.system(f'codesign --verify --deep --strict --verbose=2 {file_dest}')

print('All done!')
10 changes: 0 additions & 10 deletions faust2touchdesigner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,3 @@ if(MSVC)
${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:${PROJECT_NAME}>" ${CMAKE_SOURCE_DIR}/../Plugins
)
endif()

# Ensure that we only attempt to sign on macOS.
if(APPLE)
if(NOT "${CMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM}" STREQUAL "")
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "Developer ID Application")
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_STYLE "Manual")
else()
message(WARNING "CMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM is not set. The plugin will not be signed.")
endif()
endif()

0 comments on commit be1ebfb

Please sign in to comment.