Changeset View
Changeset View
Standalone View
Standalone View
contrib/macdeploy/macdeployqtplus
Show First 20 Lines • Show All 166 Lines • ▼ Show 20 Lines | def __init__(self): | ||||
self.pluginPath = None | self.pluginPath = None | ||||
self.deployedFrameworks = [] | self.deployedFrameworks = [] | ||||
def detectQtPath(self, frameworkDirectory: str): | def detectQtPath(self, frameworkDirectory: str): | ||||
parentDir = os.path.dirname(frameworkDirectory) | parentDir = os.path.dirname(frameworkDirectory) | ||||
if os.path.exists(os.path.join(parentDir, "translations")): | if os.path.exists(os.path.join(parentDir, "translations")): | ||||
# Classic layout, e.g. "/usr/local/Trolltech/Qt-4.x.x" | # Classic layout, e.g. "/usr/local/Trolltech/Qt-4.x.x" | ||||
self.qtPath = parentDir | self.qtPath = parentDir | ||||
elif os.path.exists(os.path.join(parentDir, "share", "qt4", "translations")): | |||||
# MacPorts layout, e.g. "/opt/local/share/qt4" | |||||
self.qtPath = os.path.join(parentDir, "share", "qt4") | |||||
elif os.path.exists(os.path.join(os.path.dirname(parentDir), "share", "qt4", "translations")): | |||||
# Newer Macports layout | |||||
self.qtPath = os.path.join(os.path.dirname(parentDir), "share", "qt4") | |||||
else: | else: | ||||
self.qtPath = os.getenv("QTDIR", None) | self.qtPath = os.getenv("QTDIR", None) | ||||
if self.qtPath is not None: | if self.qtPath is not None: | ||||
pluginPath = os.path.join(self.qtPath, "plugins") | pluginPath = os.path.join(self.qtPath, "plugins") | ||||
if os.path.exists(pluginPath): | if os.path.exists(pluginPath): | ||||
self.pluginPath = pluginPath | self.pluginPath = pluginPath | ||||
▲ Show 20 Lines • Show All 726 Lines • Show Last 20 Lines |