Blame cura-lulzbot-3.2.17-system.patch

5cd332e
diff -up cura-lulzbot-3.2.17/CMakeLists.txt.system cura-lulzbot-3.2.17/CMakeLists.txt
5cd332e
--- cura-lulzbot-3.2.17/CMakeLists.txt.system	2018-04-13 10:47:37.000000000 -0400
5cd332e
+++ cura-lulzbot-3.2.17/CMakeLists.txt	2018-04-16 15:22:03.679259807 -0400
5cd332e
@@ -1,4 +1,4 @@
5cd332e
-project(cura NONE)
5cd332e
+project(cura-lulzbot NONE)
5cd332e
 cmake_minimum_required(VERSION 2.8.12)
5cd332e
 
5cd332e
 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/
5cd332e
@@ -34,7 +34,7 @@ if(NOT ${URANIUM_DIR} STREQUAL "")
5cd332e
 endif()
5cd332e
 if(NOT ${URANIUM_SCRIPTS_DIR} STREQUAL "")
5cd332e
     list(APPEND CMAKE_MODULE_PATH ${URANIUM_DIR}/cmake)
5cd332e
-    include(UraniumTranslationTools)
5cd332e
+    include(LulzbotUraniumTranslationTools)
5cd332e
     # Extract Strings
5cd332e
     add_custom_target(extract-messages ${URANIUM_SCRIPTS_DIR}/extract-messages ${CMAKE_SOURCE_DIR} cura)
5cd332e
     # Build Translations
5cd332e
@@ -53,13 +53,13 @@ if(NOT PYTHON_SITE_PACKAGES_DIR)
5cd332e
 		set(PYTHON_SITE_PACKAGES_DIR lib/python${PYTHON_VERSION_MAJOR}/dist-packages
5cd332e
 			CACHE STRING "Directory to install Python bindings to")
5cd332e
 	endif()
5cd332e
-	set(CURA_INSTALL_PLUGINS_PATH lib/cura)
5cd332e
+	set(CURA_INSTALL_PLUGINS_PATH lib/cura-lulzbot)
5cd332e
 else()
5cd332e
-	set(CURA_INSTALL_PLUGINS_PATH ${CMAKE_INSTALL_LIBDIR}/cura)
5cd332e
+	set(CURA_INSTALL_PLUGINS_PATH ${CMAKE_INSTALL_LIBDIR}/cura-lulzbot)
5cd332e
 endif()
5cd332e
 
5cd332e
 install(DIRECTORY resources
5cd332e
-        DESTINATION ${CMAKE_INSTALL_DATADIR}/cura)
5cd332e
+        DESTINATION ${CMAKE_INSTALL_DATADIR}/cura-lulzbot)
5cd332e
 install(DIRECTORY plugins
5cd332e
         DESTINATION ${CURA_INSTALL_PLUGINS_PATH})
5cd332e
 
5cd332e
@@ -80,10 +80,10 @@ if(NOT APPLE AND NOT WIN32)
5cd332e
   endif()
5cd332e
 
5cd332e
   install(DIRECTORY cura
5cd332e
-    DESTINATION ${PYTHON_SITE_PACKAGES_DIR}
5cd332e
+    DESTINATION ${PYTHON_SITE_PACKAGES_DIR}/CuraLulzbot
5cd332e
     FILES_MATCHING PATTERN *.py)
5cd332e
   install(FILES ${CMAKE_BINARY_DIR}/CuraVersion.py
5cd332e
-    DESTINATION ${PYTHON_SITE_PACKAGES_DIR}/cura)
5cd332e
+    DESTINATION ${PYTHON_SITE_PACKAGES_DIR}/CuraLulzbot/cura)
5cd332e
   install(FILES ${CMAKE_BINARY_DIR}/cura-lulzbot.desktop
5cd332e
     DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
5cd332e
   install(FILES cura.appdata.xml
5cd332e
@@ -100,10 +100,10 @@ else()
5cd332e
             DESTINATION ${CMAKE_INSTALL_BINDIR}
5cd332e
             PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
5cd332e
     install(DIRECTORY cura
5cd332e
-            DESTINATION ${PYTHON_SITE_PACKAGES_DIR}
5cd332e
+            DESTINATION ${PYTHON_SITE_PACKAGES_DIR}/CuraLulzbot
5cd332e
             FILES_MATCHING PATTERN *.py)
5cd332e
     install(FILES ${CMAKE_BINARY_DIR}/CuraVersion.py
5cd332e
-            DESTINATION ${PYTHON_SITE_PACKAGES_DIR}/cura)
5cd332e
+            DESTINATION ${PYTHON_SITE_PACKAGES_DIR}/CuraLulzbot/cura)
5cd332e
 endif()
5cd332e
 
5cd332e
 include(CPackConfig.cmake)
5cd332e
diff -up cura-lulzbot-3.2.17/cura_app.py.system cura-lulzbot-3.2.17/cura_app.py
5cd332e
--- cura-lulzbot-3.2.17/cura_app.py.system	2018-04-16 15:18:58.881412683 -0400
5cd332e
+++ cura-lulzbot-3.2.17/cura_app.py	2018-04-16 15:23:44.886985413 -0400
5cd332e
@@ -6,6 +6,9 @@
5cd332e
 import argparse
5cd332e
 import os
5cd332e
 import sys
5cd332e
+from distutils.sysconfig import get_python_lib
5cd332e
+
5cd332e
+sys.path.insert(0, os.path.join(get_python_lib(), 'CuraLulzbot'))
5cd332e
 
5cd332e
 from UM.Platform import Platform
5cd332e
 
5cd332e
diff -up cura-lulzbot-3.2.17/cura/CuraApplication.py.system cura-lulzbot-3.2.17/cura/CuraApplication.py
5cd332e
--- cura-lulzbot-3.2.17/cura/CuraApplication.py.system	2018-04-13 10:47:37.000000000 -0400
5cd332e
+++ cura-lulzbot-3.2.17/cura/CuraApplication.py	2018-04-16 15:24:50.063520730 -0400
5cd332e
@@ -148,7 +148,7 @@ class CuraApplication(QtApplication):
5cd332e
         for dir_name in ["extruders", "machine_instances", "materials", "plugins", "quality", "user", "variants"]:
5cd332e
             Resources.addExpectedDirNameInData(dir_name)
5cd332e
 
5cd332e
-        Resources.addSearchPath(os.path.join(QtApplication.getInstallPrefix(), "share", "cura", "resources"))
5cd332e
+        Resources.addSearchPath(os.path.join(QtApplication.getInstallPrefix(), "share", "cura-lulzbot", "resources"))
5cd332e
         if not hasattr(sys, "frozen"):
5cd332e
             Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "resources"))
5cd332e
 
5cd332e
@@ -594,7 +594,7 @@ class CuraApplication(QtApplication):
5cd332e
     def _loadPlugins(self):
5cd332e
         self._plugin_registry.addType("profile_reader", self._addProfileReader)
5cd332e
         self._plugin_registry.addType("profile_writer", self._addProfileWriter)
5cd332e
-        self._plugin_registry.addPluginLocation(os.path.join(QtApplication.getInstallPrefix(), "lib", "cura"))
5cd332e
+        self._plugin_registry.addPluginLocation(os.path.join(QtApplication.getInstallPrefix(), "lib", "cura-lulzbot"))
5cd332e
         if hasattr(sys, "frozen"):
5cd332e
             # This what works for MacOS currently
5cd332e
             self._plugin_registry.addPluginLocation(os.path.join(QtApplication.getInstallPrefix(), "Resources", "cura", "plugins"))