Skip to content

Commit 46ffa59

Browse files
authored
Merge pull request #746 from openstudiocoalition/744_fixup_icon
Fix #744 Fix #745 - fixup icon and Can't see QtWebEngine pages on macOS
2 parents 44f381f + 665e77b commit 46ffa59

File tree

4 files changed

+27
-2
lines changed

4 files changed

+27
-2
lines changed

CMake/CodeSigning.cmake

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ This module defines functions to codesign, notarize and staple macOS files.
1414
[IDENTIFIER <identifier>]
1515
[PREFIX <prefix>]
1616
[OPTIONS <options>...]
17+
[ENTITLEMENTS <entitlements_file>]
1718
FILES <files>...
1819
)
1920
@@ -46,6 +47,8 @@ This module defines functions to codesign, notarize and staple macOS files.
4647
``PREFIX``
4748
What to pass to ``--prefix``. eg 'com.domain.MyApp.' with a **trailing dot**. Ignored if ``IDENTIFIER`` is passed
4849
50+
``ENTITLEMENTS entitlements_file``
51+
The entitlements xml file to use
4952
5053
.. cmake:command:: notarize_files_macos
5154
@@ -146,7 +149,7 @@ endfunction()
146149
function(codesign_files_macos)
147150
set(prefix "")
148151
set(valueLessKeywords FORCE VERBOSE DEEP)
149-
set(singleValueKeywords SIGNING_IDENTITY IDENTIFIER PREFIX)
152+
set(singleValueKeywords SIGNING_IDENTITY IDENTIFIER PREFIX ENTITLEMENTS)
150153
set(multiValueKeywords FILES OPTIONS)
151154
cmake_parse_arguments(
152155
PARSE_ARGV 0 # Start at one with NAME is the first param
@@ -205,6 +208,14 @@ function(codesign_files_macos)
205208
list(APPEND cmd "--prefix" "${_PREFIX}")
206209
endif()
207210

211+
if (_ENTITLEMENTS)
212+
if (NOT EXISTS "${_ENTITLEMENTS}")
213+
message(FATAL_ERROR "Can't sign with entitlements ${_ENTITLEMENTS}, no file exists at that path.")
214+
endif ()
215+
216+
list(APPEND cmd "--entitlements" "${_ENTITLEMENTS}")
217+
endif()
218+
208219
foreach(path ${_FILES})
209220
print_cmd_if_verbose("${cmd};${path}" _VERBOSE)
210221

icons/os.icns

-529 KB
Binary file not shown.

src/openstudio_app/CMakeLists.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,4 +547,18 @@ endif()
547547
if(APPLE AND CPACK_CODESIGNING_DEVELOPPER_ID_APPLICATION)
548548
include("${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/CodeSigning.cmake")
549549
register_install_codesign_target(${target_name} "." "OpenStudioApp")
550+
551+
install(
552+
CODE "
553+
include(\"${CMAKE_CURRENT_FUNCTION_LIST_FILE}\")
554+
codesign_files_macos(
555+
FILES \"\${CMAKE_INSTALL_PREFIX}/$<TARGET_BUNDLE_DIR_NAME:${target_name}>/Contents/Frameworks/QtWebEngineCore.framework/Versions/A/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess\"
556+
SIGNING_IDENTITY \"${CPACK_CODESIGNING_DEVELOPPER_ID_APPLICATION}\"
557+
IDENTIFIER \"${CPACK_CODESIGNING_MACOS_IDENTIFIER}.QtWebEngineProcess\"
558+
ENTITLEMENTS \"${QtWebEngineProcess}/Contents/Resources/QtWebEngineProcess.entitlements\"
559+
FORCE VERBOSE
560+
)
561+
"
562+
COMPONENT OpenStudioApp
563+
)
550564
endif()

src/openstudio_app/OpenStudioApp.rc.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ BEGIN
1515
VALUE "FileDescription", "OpenStudio Application for Energy Modeling\0"
1616
VALUE "FileVersion", "${OPENSTUDIOAPPLICATION_VERSION}\0"
1717
VALUE "InternalName", "OpenStudioApp\0"
18-
VALUE "LegalCopyright", "Copyright (c) 2020-2022, OpenStudio Coalition and other contributors. All rights reserved..\0"
18+
VALUE "LegalCopyright", "Copyright (c) 2020-${CURRENT_YEAR}, OpenStudio Coalition and other contributors. All rights reserved..\0"
1919
VALUE "LegalTrademarks", "OpenStudio (TM) is a trademark of NREL\0"
2020
VALUE "OriginalFilename", "OpenStudioApp.exe\0"
2121
VALUE "ProductName", "OpenStudioApplication\0"

0 commit comments

Comments
 (0)