Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup-macos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ endmacro(ADD_GH_GROUP)
ExternalProject_Add(libpng
URL "https://github.com/glennrp/libpng/archive/refs/tags/v1.6.54.tar.gz"
URL_HASH SHA256=ba7efce137409079989df4667706c339bebfbb10e9f413474718012a13c8cd4c
CMAKE_ARGS ${CMAKE_ARGS}
CMAKE_ARGS ${CMAKE_ARGS} -DPNG_FRAMEWORK=OFF
)
ADD_GH_GROUP(libpng)

Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,13 @@ jobs:
id: package
uses: ./.github/actions/package-macos

- name: Check signature
run: |
mkdir -p ${{ runner.temp }}/pkg
hdiutil attach -mountpoint ${{ runner.temp }}/pkg ${{ steps.package.outputs.file }}
codesign --verify --verbose=4 ${{ runner.temp }}/pkg/TeXworks.app
hdiutil detach ${{ runner.temp }}/pkg

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
Expand Down
13 changes: 13 additions & 0 deletions CMake/packaging/mac/MacPackagingTasks.in.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,16 @@ IF ( ${CMAKE_INSTALL_PREFIX} MATCHES .*/_CPack_Packages/.* )

ENDIF ()

# Do adhoc code signing (required on arm platforms)
# FIXME: use a proper DeveloperID instead of adhoc signing if this ever becomes
# feasible
file(GLOB_RECURSE SharedModules "${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}.app/Contents/*.so")
file(GLOB_RECURSE SharedLibraries "${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}.app/Contents/*.dylib")
file(GLOB_RECURSE Frameworks LIST_DIRECTORIES TRUE "${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}.app/Contents/*.framework")
foreach(LIB IN LISTS SharedLibraries Frameworks SharedModules)
message(STATUS "Signing ${LIB} (ad hoc)")
execute_process(COMMAND codesign --sign - ${LIB})
endforeach()

message(STATUS "Signing ${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}.app (ad hoc)")
execute_process(COMMAND codesign --sign - ${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}.app)