mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-24 16:08:21 -04:00
Big configuration overhaul.
Module descriptors are now module.desc, no configuration allowed inside. Module config files are <modulename>.conf, installed in share/calamares/modules. settings.conf is read from /etc/calamares, then share/calamares, and if running with --debug also in the current dir. Module config files are read from /etc/calamares/modules, then share/calamares/modules, and if running with --debug also in src/modules/<modulename> relative to the current dir.
This commit is contained in:
parent
75e9fd6aa3
commit
8f10c21e5b
38 changed files with 161 additions and 135 deletions
|
@ -7,9 +7,10 @@ function( calamares_add_module_subdirectory )
|
|||
if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/CMakeLists.txt" )
|
||||
add_subdirectory( ${SUBDIRECTORY} )
|
||||
# ...otherwise, we look for a module.conf.
|
||||
elseif( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/module.conf" )
|
||||
elseif( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/module.desc" )
|
||||
set( MODULES_DIR ${CMAKE_INSTALL_LIBDIR}/calamares/modules )
|
||||
set( MODULE_DESTINATION ${MODULES_DIR}/${SUBDIRECTORY} )
|
||||
set( MODULE_CONFIG_FILE ${SUBDIRECTORY}.conf )
|
||||
|
||||
# We glob all the files inside the subdirectory, and we make sure they are
|
||||
# synced with the bindir structure and installed.
|
||||
|
@ -17,8 +18,14 @@ function( calamares_add_module_subdirectory )
|
|||
foreach( MODULE_FILE ${MODULE_FILES} )
|
||||
if( NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/${MODULE_FILE} )
|
||||
configure_file( ${SUBDIRECTORY}/${MODULE_FILE} ${SUBDIRECTORY}/${MODULE_FILE} COPYONLY )
|
||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/${MODULE_FILE}
|
||||
DESTINATION ${MODULE_DESTINATION} )
|
||||
|
||||
if( "${MODULE_FILE}" STREQUAL "${MODULE_CONFIG_FILE}" )
|
||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/${MODULE_FILE}
|
||||
DESTINATION share/calamares/modules )
|
||||
else()
|
||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/${MODULE_FILE}
|
||||
DESTINATION ${MODULE_DESTINATION} )
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue