Re-run macdeployqt6 to copy missing Qt 6 dependencies (#7382)
* Remove bundle on build and back out install_name_tool * Add hack to fix Qt bundle bug * Improve comment * Update ChangeLog
This commit is contained in:
parent
a6ac8a1946
commit
a4e1beb79d
3 changed files with 14 additions and 9 deletions
|
|
@ -49,6 +49,7 @@ Enhancements:
|
||||||
- #7379 Resolve Qt framework path with `install_name_tool`
|
- #7379 Resolve Qt framework path with `install_name_tool`
|
||||||
- #7380 Add `qt6-qpa-plugins` Qt dependency for Debian
|
- #7380 Add `qt6-qpa-plugins` Qt dependency for Debian
|
||||||
- #7381 Set macOS min version to macOS 12.0
|
- #7381 Set macOS min version to macOS 12.0
|
||||||
|
- #7382 Re-run `macdeployqt6` to copy missing Qt 6 dependencies
|
||||||
|
|
||||||
# 1.14.6
|
# 1.14.6
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import dmgbuild # type: ignore
|
import dmgbuild # type: ignore
|
||||||
import os, time, json
|
import os, time, json, shutil
|
||||||
import lib.cmd_utils as cmd_utils
|
import lib.cmd_utils as cmd_utils
|
||||||
import lib.env as env
|
import lib.env as env
|
||||||
from lib.certificate import Certificate
|
from lib.certificate import Certificate
|
||||||
|
|
@ -101,18 +101,16 @@ def package_env_vars():
|
||||||
|
|
||||||
|
|
||||||
def build_bundle():
|
def build_bundle():
|
||||||
|
# it's important to build a new bundle every time, so that we catch bugs with fresh builds.
|
||||||
|
if os.path.exists(app_path):
|
||||||
|
print(f"Bundle already exists, deleting: {app_path}")
|
||||||
|
shutil.rmtree(app_path)
|
||||||
|
|
||||||
print("Building bundle...")
|
print("Building bundle...")
|
||||||
|
|
||||||
# cmake build install target should run macdeployqt
|
# cmake build install target should run macdeployqt
|
||||||
cmd_utils.run("cmake --build build --target install", shell=True, print_cmd=True)
|
cmd_utils.run("cmake --build build --target install", shell=True, print_cmd=True)
|
||||||
|
|
||||||
bundle_bin_path = "Contents/MacOS/synergy"
|
|
||||||
cmd_utils.run(
|
|
||||||
'install_name_tool -add_rpath "@executable_path/../Frameworks" '
|
|
||||||
f"{app_path}/{bundle_bin_path}",
|
|
||||||
shell=True,
|
|
||||||
print_cmd=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def sign_bundle(codesign_id):
|
def sign_bundle(codesign_id):
|
||||||
print(f"Signing bundle {app_path}...")
|
print(f"Signing bundle {app_path}...")
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,12 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
install(CODE "MESSAGE (\"Running: ${MACDEPLOYQT_CMD}\")")
|
install(CODE "MESSAGE (\"Running: ${MACDEPLOYQT_CMD}\")")
|
||||||
install(CODE "execute_process(COMMAND ${MACDEPLOYQT_CMD})")
|
install(CODE "execute_process(COMMAND ${MACDEPLOYQT_CMD})")
|
||||||
|
|
||||||
|
# HACK: Bundle again to fix missing deps. Since Qt 6, it seems that the first
|
||||||
|
# pass misses out many dependencies from the Framework dir (it also finishes
|
||||||
|
# quickly with a bunch of warnings), and after the 2nd pass (which takes much
|
||||||
|
# longer), all of the dependencies are copied to the bundle.
|
||||||
|
install(CODE "execute_process(COMMAND ${MACDEPLOYQT_CMD})")
|
||||||
|
|
||||||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
|
|
||||||
install(TARGETS synergy DESTINATION bin)
|
install(TARGETS synergy DESTINATION bin)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue