Skip to content

Commit fad57e9

Browse files
committed
build: Fix macdeployqtplus after switching to Qt 6
Homebrew’s `qt@6` package places the `translations` and `plugins` directories in the `share/qt` subdirectory. This change updates the `macdeployqtplus` script accordingly.
1 parent 938208d commit fad57e9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

contrib/macdeploy/macdeployqtplus

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,20 +157,19 @@ class DeploymentInfo(object):
157157
self.qtPath = None
158158
self.pluginPath = None
159159
self.deployedFrameworks = []
160-
160+
161161
def detectQtPath(self, frameworkDirectory: str):
162162
parentDir = os.path.dirname(frameworkDirectory)
163-
if os.path.exists(os.path.join(parentDir, "translations")):
164-
# Classic layout, e.g. "/usr/local/Trolltech/Qt-4.x.x"
163+
if os.path.exists(os.path.join(parentDir, "share", "qt", "translations")):
165164
self.qtPath = parentDir
166165
else:
167166
self.qtPath = os.getenv("QTDIR", None)
168167

169168
if self.qtPath is not None:
170-
pluginPath = os.path.join(self.qtPath, "plugins")
169+
pluginPath = os.path.join(self.qtPath, "share", "qt", "plugins")
171170
if os.path.exists(pluginPath):
172171
self.pluginPath = pluginPath
173-
172+
174173
def usesFramework(self, name: str) -> bool:
175174
for framework in self.deployedFrameworks:
176175
if framework.endswith(".framework"):

0 commit comments

Comments
 (0)