__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.i18n import i18nCatalog
  5. catalog = i18nCatalog("cura")
  6. def getMetaData():
  7. return {
  8. "plugin": {
  9. "name": catalog.i18nc("@label", "Removable Drive Output Device Plugin"),
  10. "author": "Ultimaker B.V.",
  11. "description": catalog.i18nc("@info:whatsthis", "Provides removable drive hotplugging and writing support."),
  12. "version": "1.0",
  13. "api": 3
  14. }
  15. }
  16. def register(app):
  17. if Platform.isWindows():
  18. from . import WindowsRemovableDrivePlugin
  19. return { "output_device": WindowsRemovableDrivePlugin.WindowsRemovableDrivePlugin() }
  20. elif Platform.isOSX():
  21. from . import OSXRemovableDrivePlugin
  22. return { "output_device": OSXRemovableDrivePlugin.OSXRemovableDrivePlugin() }
  23. elif Platform.isLinux():
  24. from . import LinuxRemovableDrivePlugin
  25. return { "output_device": LinuxRemovableDrivePlugin.LinuxRemovableDrivePlugin() }
  26. else:
  27. Logger.log("e", "Unsupported system, thus no removable device hotplugging support available.")
  28. return { }