From 6372c0c8b269f6b1838de304a24ff389f6f38a96 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 7 May 2019 23:33:40 +0200 Subject: [PATCH] Rename plug-in ID to SettingsGuide2 This is necessary because the original author of this plug-in has reserved the name SettingsGuide, but is unable to maintain it any more. If I want to publish this on the marketplace of Cura, I will need to have a different installation directory in Cura's configuration folder and for the contribution portal a different plug-in ID. --- CMakeLists.txt | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ceebd0f6d..81a4633ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,7 @@ cmake_minimum_required(VERSION 3.10.2) #Oldest version it's been tested with. #Project metadata. set(SETTINGSGUIDE_PLUGIN_NAME "Settings Guide" CACHE STRING "The name of the plug-in in distribution.") +set(SETTINGSGUIDE_PLUGIN_ID "SettingsGuide2" CACHE STRING "The plug-in ID of the installation in Cura.") #Needs to be '2' because the original plug-in ID was reserved by Asasin for his original version. set(SETTINGSGUIDE_VERSION_MAJOR 1 CACHE STRING "The major version number, indicating a backward compatibility break.") set(SETTINGSGUIDE_VERSION_MINOR 2 CACHE STRING "The minor version number, indicating a forward compatibility break.") set(SETTINGSGUIDE_VERSION_PATCH 0 CACHE STRING "The patch version number, indicating an incremental improvement without compatibility break.") @@ -91,24 +92,24 @@ endforeach() if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${cura_directory}/${latest_version}/plugins" CACHE PATH "Location of the Cura plug-ins folder to install this plug-in to." FORCE) endif() -install(FILES ${installed_paths} DESTINATION SettingsGuide) -install(FILES ${installed_paths_resources_icons} DESTINATION SettingsGuide/resources/icons) -install(FILES ${installed_paths_resources_qml} DESTINATION SettingsGuide/resources/qml) -install(FILES ${installed_paths_resources_qml_SidebarSettings} DESTINATION SettingsGuide/resources/qml/SidebarSettings) -install(FILES ${installed_paths_resources_qml_SidebarSettingTemplates} DESTINATION SettingsGuide/resources/qml/SidebarSettingTemplates) -install(FILES ${installed_paths_resources_descriptions} DESTINATION SettingsGuide/resources/descriptions) -install(FILES ${installed_paths_resources_images} DESTINATION SettingsGuide/resources/images) +install(FILES ${installed_paths} DESTINATION ${SETTINGSGUIDE_PLUGIN_ID}) +install(FILES ${installed_paths_resources_icons} DESTINATION ${SETTINGSGUIDE_PLUGIN_ID}/resources/icons) +install(FILES ${installed_paths_resources_qml} DESTINATION ${SETTINGSGUIDE_PLUGIN_ID}/resources/qml) +install(FILES ${installed_paths_resources_qml_SidebarSettings} DESTINATION ${SETTINGSGUIDE_PLUGIN_ID}/resources/qml/SidebarSettings) +install(FILES ${installed_paths_resources_qml_SidebarSettingTemplates} DESTINATION ${SETTINGSGUIDE_PLUGIN_ID}/resources/qml/SidebarSettingTemplates) +install(FILES ${installed_paths_resources_descriptions} DESTINATION ${SETTINGSGUIDE_PLUGIN_ID}/resources/descriptions) +install(FILES ${installed_paths_resources_images} DESTINATION ${SETTINGSGUIDE_PLUGIN_ID}/resources/images) #Packing this into a .curapackage file. add_custom_target(pack COMMAND "") #Packs for all supported SDK versions. foreach(sdk_version ${SETTINGSGUIDE_SUPPORTED_SDKS}) - file(COPY ${installed_paths} DESTINATION pack${sdk_version}/files/plugins/SettingsGuide) - file(COPY ${installed_paths_resources_icons} DESTINATION pack${sdk_version}/files/plugins/SettingsGuide/resources/icons) - file(COPY ${installed_paths_resources_qml} DESTINATION pack${sdk_version}/files/plugins/SettingsGuide/resources/qml) - file(COPY ${installed_paths_resources_qml_SidebarSettings} DESTINATION pack${sdk_version}/files/plugins/SettingsGuide/resources/qml/SidebarSettings) - file(COPY ${installed_paths_resources_qml_SidebarSettingTemplates} DESTINATION pack${sdk_version}/files/plugins/SettingsGuide/resources/qml/SidebarSettingTemplates) - file(COPY ${installed_paths_resources_descriptions} DESTINATION pack${sdk_version}/files/plugins/SettingsGuide/resources/descriptions) - file(COPY ${installed_paths_resources_images} DESTINATION pack${sdk_version}/files/plugins/SettingsGuide/resources/images) + file(COPY ${installed_paths} DESTINATION pack${sdk_version}/files/plugins/${SETTINGSGUIDE_PLUGIN_ID}) + file(COPY ${installed_paths_resources_icons} DESTINATION pack${sdk_version}/files/plugins/${SETTINGSGUIDE_PLUGIN_ID}/resources/icons) + file(COPY ${installed_paths_resources_qml} DESTINATION pack${sdk_version}/files/plugins/${SETTINGSGUIDE_PLUGIN_ID}/resources/qml) + file(COPY ${installed_paths_resources_qml_SidebarSettings} DESTINATION pack${sdk_version}/files/plugins/${SETTINGSGUIDE_PLUGIN_ID}/resources/qml/SidebarSettings) + file(COPY ${installed_paths_resources_qml_SidebarSettingTemplates} DESTINATION pack${sdk_version}/files/plugins/${SETTINGSGUIDE_PLUGIN_ID}/resources/qml/SidebarSettingTemplates) + file(COPY ${installed_paths_resources_descriptions} DESTINATION pack${sdk_version}/files/plugins/${SETTINGSGUIDE_PLUGIN_ID}/resources/descriptions) + file(COPY ${installed_paths_resources_images} DESTINATION pack${sdk_version}/files/plugins/${SETTINGSGUIDE_PLUGIN_ID}/resources/images) file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/cmake/[Content_Types].xml" DESTINATION pack${sdk_version}) file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/cmake/_rels" DESTINATION pack${sdk_version}) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/package.json.in" pack${sdk_version}/package.json) @@ -133,4 +134,4 @@ set(CPACK_PACKAGE_VERSION_PATCH ${SETTINGSGUIDE_VERSION_PATCH}) set(CPACK_PACKAGE_NAME ${SETTINGSGUIDE_PLUGIN_NAME}) set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_CURRENT_SOURCE_DIR}/README.md) set(CPACK_GENERATOR ZIP) -include(CPack) +include(CPack) \ No newline at end of file