Skip to content

Commit

Permalink
Rename plug-in ID to SettingsGuide2
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Ghostkeeper committed May 7, 2019
1 parent 90a4699 commit 6372c0c
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down Expand Up @@ -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)
Expand All @@ -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)

0 comments on commit 6372c0c

Please sign in to comment.