__init__.py 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. # Copyright (c) 2015 Ultimaker B.V.
  2. # Uranium is released under the terms of the AGPLv3 or higher.
  3. 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": 2
  14. }
  15. }
  16. def register(app):
  17. if platform.system() == "Windows":
  18. from . import WindowsRemovableDrivePlugin
  19. return { "output_device": WindowsRemovableDrivePlugin.WindowsRemovableDrivePlugin() }
  20. elif platform.system() == "Darwin":
  21. from . import OSXRemovableDrivePlugin
  22. return { "output_device": OSXRemovableDrivePlugin.OSXRemovableDrivePlugin() }
  23. elif platform.system() == "Linux":
  24. from . import LinuxRemovableDrivePlugin
  25. return { "output_device": LinuxRemovableDrivePlugin.LinuxRemovableDrivePlugin() }
  26. else:
  27. Logger.log("e", "Unsupported system %s, no removable device hotplugging support available.", platform.system())
  28. return { }