__init__.py 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. # Copyright (c) 2015 Ultimaker B.V.
  2. # Cura is released under the terms of the AGPLv3 or higher.
  3. from UM.Platform import Platform
  4. from UM.Logger import Logger
  5. from UM.i18n import i18nCatalog
  6. catalog = i18nCatalog("cura")
  7. def getMetaData():
  8. return {
  9. "plugin": {
  10. "name": catalog.i18nc("@label", "Removable Drive Output Device Plugin"),
  11. "author": "Ultimaker B.V.",
  12. "description": catalog.i18nc("@info:whatsthis", "Provides removable drive hotplugging and writing support."),
  13. "version": "1.0",
  14. "api": 3
  15. }
  16. }
  17. def register(app):
  18. if Platform.isWindows():
  19. from . import WindowsRemovableDrivePlugin
  20. return { "output_device": WindowsRemovableDrivePlugin.WindowsRemovableDrivePlugin() }
  21. elif Platform.isOSX():
  22. from . import OSXRemovableDrivePlugin
  23. return { "output_device": OSXRemovableDrivePlugin.OSXRemovableDrivePlugin() }
  24. elif Platform.isLinux():
  25. from . import LinuxRemovableDrivePlugin
  26. return { "output_device": LinuxRemovableDrivePlugin.LinuxRemovableDrivePlugin() }
  27. else:
  28. Logger.log("e", "Unsupported system, thus no removable device hotplugging support available.")
  29. return { }