X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=scripts%2Fbuild%2Fmacosx_DeployApp.py;h=4ca72b49f65e823bf1fb98fc2313a0cbf724a536;hp=e6cfc1d189ac29f4acc49fbf8133789fb40c81b2;hb=236ad337e4f2bb4227547efe590942fe2b6c6052;hpb=d98cc721477645abcb5387313f3ad2c96a580ad6 diff --git a/scripts/build/macosx_DeployApp.py b/scripts/build/macosx_DeployApp.py index e6cfc1d1..4ca72b49 100755 --- a/scripts/build/macosx_DeployApp.py +++ b/scripts/build/macosx_DeployApp.py @@ -33,7 +33,7 @@ QT_CONFIG_NOBUNDLE = """[Paths] class InstallQt(object): - def __init__(self, appdir, bundle=True, requestedPlugins=[]): + def __init__(self, appdir, bundle=True, requestedPlugins=[], skipInstallQtConf=False): self.appDir = appdir self.bundle = bundle self.frameworkDir = self.appDir + "/Frameworks" @@ -52,7 +52,8 @@ class InstallQt(object): self.findPluginsPath() self.installPlugins(requestedPlugins) - self.installQtConf() + if not skipInstallQtConf: + self.installQtConf() def qtProperty(self, qtProperty): """ @@ -153,6 +154,12 @@ class InstallQt(object): self.installedFrameworks.add(framework) + # if the Framework-Folder is a Symlink we are in a Helper-Process ".app" (e.g. in QtWebEngine), + # in this case skip copying/installing on existing folders + skipExisting = False; + if os.path.islink(self.frameworkDir): + skipExisting = True; + # ensure that the framework directory exists try: os.mkdir(self.frameworkDir) @@ -162,12 +169,16 @@ class InstallQt(object): if not framework.startswith('/'): framework = "%s/%s" % (self.sourceFrameworkPath, framework) - # Copy Framework - os.system('cp -R "%s" "%s"' % (framework, self.frameworkDir)) - frameworkname = framework.split('/')[-1] localframework = self.frameworkDir + "/" + frameworkname + # Framework already installed in previous run ... see above + if skipExisting and os.path.isdir(localframework): + return + + # Copy Framework + os.system('cp -R "%s" "%s"' % (framework, self.frameworkDir)) + # De-Myllify os.system('find "%s" -name *debug* -exec rm -f {} \;' % localframework) os.system('find "%s" -name Headers -exec rm -rf {} \; 2>/dev/null' % localframework) @@ -189,6 +200,7 @@ class InstallQt(object): else: newlibname = "@executable_path/%s%s" % (frameworkname, libpath) # print 'install_name_tool -id "%s" "%s"' % (newlibname, lib) + os.system('chmod +w "%s"' % (lib)) os.system('install_name_tool -id "%s" "%s"' % (newlibname, lib)) self.resolveDependancies(lib) @@ -210,6 +222,8 @@ class InstallQt(object): newlibname = "@executable_path/Frameworks/%s" % newlibname # print 'install_name_tool -change "%s" "%s" "%s"' % (lib, newlibname, obj) + os.system('chmod +w "%s"' % (lib)) + os.system('chmod +w "%s"' % (obj)) os.system('install_name_tool -change "%s" "%s" "%s"' % (lib, newlibname, obj)) if __name__ == "__main__": @@ -235,3 +249,10 @@ if __name__ == "__main__": targetDir += "/Contents" InstallQt(targetDir, bundle, plugins) + + if bundle: + webenginetarget = targetDir + '/Frameworks/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents' + + if os.path.isdir(webenginetarget): + os.system('ln -s ../../../../../../ "%s"/Frameworks' % webenginetarget) + InstallQt(webenginetarget, bundle, [], True)