|
16 | 16 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | # |
18 | 18 |
|
19 | | -import plistlib |
20 | 19 | import sys, re, os, shutil, stat, os.path |
21 | 20 | from argparse import ArgumentParser |
22 | 21 | from ds_store import DSStore |
@@ -53,7 +52,7 @@ class FrameworkInfo(object): |
53 | 52 | return False |
54 | 53 |
|
55 | 54 | def __str__(self): |
56 | | - return f""" Framework name: {frameworkName} |
| 55 | + return f""" Framework name: {self.frameworkName} |
57 | 56 | Framework directory: {self.frameworkDirectory} |
58 | 57 | Framework path: {self.frameworkPath} |
59 | 58 | Binary name: {self.binaryName} |
@@ -85,8 +84,8 @@ class FrameworkInfo(object): |
85 | 84 | if line == "": |
86 | 85 | return None |
87 | 86 |
|
88 | | - # Don't deploy system libraries (exception for libQtuitools and libQtlucene). |
89 | | - if line.startswith("/System/Library/") or line.startswith("@executable_path") or (line.startswith("/usr/lib/") and "libQt" not in line): |
| 87 | + # Don't deploy system libraries |
| 88 | + if line.startswith("/System/Library/") or line.startswith("@executable_path") or line.startswith("/usr/lib/"): |
90 | 89 | return None |
91 | 90 |
|
92 | 91 | m = cls.reOLine.match(line) |
@@ -287,14 +286,6 @@ def copyFramework(framework: FrameworkInfo, path: str, verbose: int) -> Optional |
287 | 286 | if verbose: |
288 | 287 | print("Copied Contents:", fromContentsDir) |
289 | 288 | print(" to:", toContentsDir) |
290 | | - elif framework.frameworkName.startswith("libQtGui"): # Copy qt_menu.nib (applies to non-framework layout) |
291 | | - qtMenuNibSourcePath = os.path.join(framework.frameworkDirectory, "Resources", "qt_menu.nib") |
292 | | - qtMenuNibDestinationPath = os.path.join(path, "Contents", "Resources", "qt_menu.nib") |
293 | | - if os.path.exists(qtMenuNibSourcePath) and not os.path.exists(qtMenuNibDestinationPath): |
294 | | - shutil.copytree(qtMenuNibSourcePath, qtMenuNibDestinationPath, symlinks=True) |
295 | | - if verbose: |
296 | | - print("Copied for libQtGui:", qtMenuNibSourcePath) |
297 | | - print(" to:", qtMenuNibDestinationPath) |
298 | 289 |
|
299 | 290 | return toPath |
300 | 291 |
|
@@ -351,115 +342,20 @@ def deployFrameworksForAppBundle(applicationBundle: ApplicationBundleInfo, strip |
351 | 342 | return deployFrameworks(frameworks, applicationBundle.path, applicationBundle.binaryPath, strip, verbose) |
352 | 343 |
|
353 | 344 | def deployPlugins(appBundleInfo: ApplicationBundleInfo, deploymentInfo: DeploymentInfo, strip: bool, verbose: int): |
354 | | - # Lookup available plugins, exclude unneeded |
355 | 345 | plugins = [] |
356 | 346 | if deploymentInfo.pluginPath is None: |
357 | 347 | return |
358 | 348 | for dirpath, dirnames, filenames in os.walk(deploymentInfo.pluginPath): |
359 | 349 | pluginDirectory = os.path.relpath(dirpath, deploymentInfo.pluginPath) |
360 | | - if pluginDirectory == "designer": |
361 | | - # Skip designer plugins |
362 | | - continue |
363 | | - elif pluginDirectory == "printsupport": |
364 | | - # Skip printsupport plugins |
365 | | - continue |
366 | | - elif pluginDirectory == "imageformats": |
367 | | - # Skip imageformats plugins |
| 350 | + |
| 351 | + if pluginDirectory not in ['styles', 'platforms']: |
368 | 352 | continue |
369 | | - elif pluginDirectory == "sqldrivers": |
370 | | - # Deploy the sql plugins only if QtSql is in use |
371 | | - if not deploymentInfo.usesFramework("QtSql"): |
372 | | - continue |
373 | | - elif pluginDirectory == "script": |
374 | | - # Deploy the script plugins only if QtScript is in use |
375 | | - if not deploymentInfo.usesFramework("QtScript"): |
376 | | - continue |
377 | | - elif pluginDirectory == "qmltooling" or pluginDirectory == "qml1tooling": |
378 | | - # Deploy the qml plugins only if QtDeclarative is in use |
379 | | - if not deploymentInfo.usesFramework("QtDeclarative"): |
380 | | - continue |
381 | | - elif pluginDirectory == "bearer": |
382 | | - # Deploy the bearer plugins only if QtNetwork is in use |
383 | | - if not deploymentInfo.usesFramework("QtNetwork"): |
384 | | - continue |
385 | | - elif pluginDirectory == "position": |
386 | | - # Deploy the position plugins only if QtPositioning is in use |
387 | | - if not deploymentInfo.usesFramework("QtPositioning"): |
388 | | - continue |
389 | | - elif pluginDirectory == "sensors" or pluginDirectory == "sensorgestures": |
390 | | - # Deploy the sensor plugins only if QtSensors is in use |
391 | | - if not deploymentInfo.usesFramework("QtSensors"): |
392 | | - continue |
393 | | - elif pluginDirectory == "audio" or pluginDirectory == "playlistformats": |
394 | | - # Deploy the audio plugins only if QtMultimedia is in use |
395 | | - if not deploymentInfo.usesFramework("QtMultimedia"): |
396 | | - continue |
397 | | - elif pluginDirectory == "mediaservice": |
398 | | - # Deploy the mediaservice plugins only if QtMultimediaWidgets is in use |
399 | | - if not deploymentInfo.usesFramework("QtMultimediaWidgets"): |
400 | | - continue |
401 | | - elif pluginDirectory == "canbus": |
402 | | - # Deploy the canbus plugins only if QtSerialBus is in use |
403 | | - if not deploymentInfo.usesFramework("QtSerialBus"): |
404 | | - continue |
405 | | - elif pluginDirectory == "webview": |
406 | | - # Deploy the webview plugins only if QtWebView is in use |
407 | | - if not deploymentInfo.usesFramework("QtWebView"): |
408 | | - continue |
409 | | - elif pluginDirectory == "gamepads": |
410 | | - # Deploy the webview plugins only if QtGamepad is in use |
411 | | - if not deploymentInfo.usesFramework("QtGamepad"): |
412 | | - continue |
413 | | - elif pluginDirectory == "geoservices": |
414 | | - # Deploy the webview plugins only if QtLocation is in use |
415 | | - if not deploymentInfo.usesFramework("QtLocation"): |
416 | | - continue |
417 | | - elif pluginDirectory == "texttospeech": |
418 | | - # Deploy the texttospeech plugins only if QtTextToSpeech is in use |
419 | | - if not deploymentInfo.usesFramework("QtTextToSpeech"): |
420 | | - continue |
421 | | - elif pluginDirectory == "virtualkeyboard": |
422 | | - # Deploy the virtualkeyboard plugins only if QtVirtualKeyboard is in use |
423 | | - if not deploymentInfo.usesFramework("QtVirtualKeyboard"): |
424 | | - continue |
425 | | - elif pluginDirectory == "sceneparsers": |
426 | | - # Deploy the virtualkeyboard plugins only if Qt3DCore is in use |
427 | | - if not deploymentInfo.usesFramework("Qt3DCore"): |
428 | | - continue |
429 | | - elif pluginDirectory == "renderplugins": |
430 | | - # Deploy the renderplugins plugins only if Qt3DCore is in use |
431 | | - if not deploymentInfo.usesFramework("Qt3DCore"): |
432 | | - continue |
433 | | - elif pluginDirectory == "geometryloaders": |
434 | | - # Deploy the geometryloaders plugins only if Qt3DCore is in use |
435 | | - if not deploymentInfo.usesFramework("Qt3DCore"): |
436 | | - continue |
437 | 353 |
|
438 | 354 | for pluginName in filenames: |
439 | 355 | pluginPath = os.path.join(pluginDirectory, pluginName) |
440 | | - if pluginName.endswith("_debug.dylib"): |
441 | | - # Skip debug plugins |
| 356 | + |
| 357 | + if pluginName.split('.')[0] not in ['libqminimal', 'libqcocoa', 'libqmacstyle']: |
442 | 358 | continue |
443 | | - elif pluginPath == "imageformats/libqsvg.dylib" or pluginPath == "iconengines/libqsvgicon.dylib": |
444 | | - # Deploy the svg plugins only if QtSvg is in use |
445 | | - if not deploymentInfo.usesFramework("QtSvg"): |
446 | | - continue |
447 | | - elif pluginPath == "accessible/libqtaccessiblecompatwidgets.dylib": |
448 | | - # Deploy accessibility for Qt3Support only if the Qt3Support is in use |
449 | | - if not deploymentInfo.usesFramework("Qt3Support"): |
450 | | - continue |
451 | | - elif pluginPath == "graphicssystems/libqglgraphicssystem.dylib": |
452 | | - # Deploy the opengl graphicssystem plugin only if QtOpenGL is in use |
453 | | - if not deploymentInfo.usesFramework("QtOpenGL"): |
454 | | - continue |
455 | | - elif pluginPath == "accessible/libqtaccessiblequick.dylib": |
456 | | - # Deploy the accessible qtquick plugin only if QtQuick is in use |
457 | | - if not deploymentInfo.usesFramework("QtQuick"): |
458 | | - continue |
459 | | - elif pluginPath == "platforminputcontexts/libqtvirtualkeyboardplugin.dylib": |
460 | | - # Deploy the virtualkeyboardplugin plugin only if QtVirtualKeyboard is in use |
461 | | - if not deploymentInfo.usesFramework("QtVirtualKeyboard"): |
462 | | - continue |
463 | 359 |
|
464 | 360 | plugins.append((pluginDirectory, pluginName)) |
465 | 361 |
|
@@ -527,6 +423,9 @@ if os.path.exists(appname + ".dmg"): |
527 | 423 | print("+ Removing existing DMG +") |
528 | 424 | os.unlink(appname + ".dmg") |
529 | 425 |
|
| 426 | +if os.path.exists(appname + ".temp.dmg"): |
| 427 | + os.unlink(appname + ".temp.dmg") |
| 428 | + |
530 | 429 | # ------------------------------------------------ |
531 | 430 |
|
532 | 431 | target = os.path.join("dist", "Bitcoin-Qt.app") |
|
0 commit comments