@@ -350,115 +350,20 @@ def deployFrameworksForAppBundle(applicationBundle: ApplicationBundleInfo, strip
350
350
return deployFrameworks (frameworks , applicationBundle .path , applicationBundle .binaryPath , strip , verbose )
351
351
352
352
def deployPlugins (appBundleInfo : ApplicationBundleInfo , deploymentInfo : DeploymentInfo , strip : bool , verbose : int ):
353
- # Lookup available plugins, exclude unneeded
354
353
plugins = []
355
354
if deploymentInfo .pluginPath is None :
356
355
return
357
356
for dirpath , dirnames , filenames in os .walk (deploymentInfo .pluginPath ):
358
357
pluginDirectory = os .path .relpath (dirpath , deploymentInfo .pluginPath )
359
- if pluginDirectory == "designer" :
360
- # Skip designer plugins
361
- continue
362
- elif pluginDirectory == "printsupport" :
363
- # Skip printsupport plugins
364
- continue
365
- elif pluginDirectory == "imageformats" :
366
- # Skip imageformats plugins
358
+
359
+ if pluginDirectory not in ['styles' , 'platforms' ]:
367
360
continue
368
- elif pluginDirectory == "sqldrivers" :
369
- # Deploy the sql plugins only if QtSql is in use
370
- if not deploymentInfo .usesFramework ("QtSql" ):
371
- continue
372
- elif pluginDirectory == "script" :
373
- # Deploy the script plugins only if QtScript is in use
374
- if not deploymentInfo .usesFramework ("QtScript" ):
375
- continue
376
- elif pluginDirectory == "qmltooling" or pluginDirectory == "qml1tooling" :
377
- # Deploy the qml plugins only if QtDeclarative is in use
378
- if not deploymentInfo .usesFramework ("QtDeclarative" ):
379
- continue
380
- elif pluginDirectory == "bearer" :
381
- # Deploy the bearer plugins only if QtNetwork is in use
382
- if not deploymentInfo .usesFramework ("QtNetwork" ):
383
- continue
384
- elif pluginDirectory == "position" :
385
- # Deploy the position plugins only if QtPositioning is in use
386
- if not deploymentInfo .usesFramework ("QtPositioning" ):
387
- continue
388
- elif pluginDirectory == "sensors" or pluginDirectory == "sensorgestures" :
389
- # Deploy the sensor plugins only if QtSensors is in use
390
- if not deploymentInfo .usesFramework ("QtSensors" ):
391
- continue
392
- elif pluginDirectory == "audio" or pluginDirectory == "playlistformats" :
393
- # Deploy the audio plugins only if QtMultimedia is in use
394
- if not deploymentInfo .usesFramework ("QtMultimedia" ):
395
- continue
396
- elif pluginDirectory == "mediaservice" :
397
- # Deploy the mediaservice plugins only if QtMultimediaWidgets is in use
398
- if not deploymentInfo .usesFramework ("QtMultimediaWidgets" ):
399
- continue
400
- elif pluginDirectory == "canbus" :
401
- # Deploy the canbus plugins only if QtSerialBus is in use
402
- if not deploymentInfo .usesFramework ("QtSerialBus" ):
403
- continue
404
- elif pluginDirectory == "webview" :
405
- # Deploy the webview plugins only if QtWebView is in use
406
- if not deploymentInfo .usesFramework ("QtWebView" ):
407
- continue
408
- elif pluginDirectory == "gamepads" :
409
- # Deploy the webview plugins only if QtGamepad is in use
410
- if not deploymentInfo .usesFramework ("QtGamepad" ):
411
- continue
412
- elif pluginDirectory == "geoservices" :
413
- # Deploy the webview plugins only if QtLocation is in use
414
- if not deploymentInfo .usesFramework ("QtLocation" ):
415
- continue
416
- elif pluginDirectory == "texttospeech" :
417
- # Deploy the texttospeech plugins only if QtTextToSpeech is in use
418
- if not deploymentInfo .usesFramework ("QtTextToSpeech" ):
419
- continue
420
- elif pluginDirectory == "virtualkeyboard" :
421
- # Deploy the virtualkeyboard plugins only if QtVirtualKeyboard is in use
422
- if not deploymentInfo .usesFramework ("QtVirtualKeyboard" ):
423
- continue
424
- elif pluginDirectory == "sceneparsers" :
425
- # Deploy the virtualkeyboard plugins only if Qt3DCore is in use
426
- if not deploymentInfo .usesFramework ("Qt3DCore" ):
427
- continue
428
- elif pluginDirectory == "renderplugins" :
429
- # Deploy the renderplugins plugins only if Qt3DCore is in use
430
- if not deploymentInfo .usesFramework ("Qt3DCore" ):
431
- continue
432
- elif pluginDirectory == "geometryloaders" :
433
- # Deploy the geometryloaders plugins only if Qt3DCore is in use
434
- if not deploymentInfo .usesFramework ("Qt3DCore" ):
435
- continue
436
361
437
362
for pluginName in filenames :
438
363
pluginPath = os .path .join (pluginDirectory , pluginName )
439
- if pluginName . endswith ( "_debug.dylib" ):
440
- # Skip debug plugins
364
+
365
+ if pluginName . split ( '.' )[ 0 ] not in [ 'libqminimal' , 'libqcocoa' , 'libqmacstyle' ]:
441
366
continue
442
- elif pluginPath == "imageformats/libqsvg.dylib" or pluginPath == "iconengines/libqsvgicon.dylib" :
443
- # Deploy the svg plugins only if QtSvg is in use
444
- if not deploymentInfo .usesFramework ("QtSvg" ):
445
- continue
446
- elif pluginPath == "accessible/libqtaccessiblecompatwidgets.dylib" :
447
- # Deploy accessibility for Qt3Support only if the Qt3Support is in use
448
- if not deploymentInfo .usesFramework ("Qt3Support" ):
449
- continue
450
- elif pluginPath == "graphicssystems/libqglgraphicssystem.dylib" :
451
- # Deploy the opengl graphicssystem plugin only if QtOpenGL is in use
452
- if not deploymentInfo .usesFramework ("QtOpenGL" ):
453
- continue
454
- elif pluginPath == "accessible/libqtaccessiblequick.dylib" :
455
- # Deploy the accessible qtquick plugin only if QtQuick is in use
456
- if not deploymentInfo .usesFramework ("QtQuick" ):
457
- continue
458
- elif pluginPath == "platforminputcontexts/libqtvirtualkeyboardplugin.dylib" :
459
- # Deploy the virtualkeyboardplugin plugin only if QtVirtualKeyboard is in use
460
- if not deploymentInfo .usesFramework ("QtVirtualKeyboard" ):
461
- continue
462
367
463
368
plugins .append ((pluginDirectory , pluginName ))
464
369
0 commit comments