Open jcfr opened 3 years ago
the install rules for the data files are implemented here:
That said the problem is related to the install rule of the scripted modules.
Indeed, the content of the D:\D\P\CL-0-build\Slicer-build\E\Modules\Scripted\Home\cmake_install.cmake
file generated is the following. Despite of selectively listing the data files, the parent folder is systematically copied.
[...]
if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xRuntimeLibrariesx" OR NOT CMAKE_INSTALL_COMPONENT)
file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/./lib/CellLocator-4.13/qt-scripted-modules" TYPE DIRECTORY FILES "D:/D/P/CL-0-build/Slicer-build/lib/CellLocator-4.13/qt-scripted-modules/" USE_SOURCE_PERMISSIONS)
endif()
if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xRuntimeLibrariesx" OR NOT CMAKE_INSTALL_COMPONENT)
file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/./lib/CellLocator-4.13/qt-scripted-modules" TYPE FILE FILES
"D:/D/P/CL-0-build/Slicer-build/lib/CellLocator-4.13/qt-scripted-modules/CellLocatorData/ccf_average_template_25.nrrd"
"D:/D/P/CL-0-build/Slicer-build/lib/CellLocator-4.13/qt-scripted-modules/CellLocatorData/ccf_annotation_25_contiguous.nrrd"
"D:/D/P/CL-0-build/Slicer-build/lib/CellLocator-4.13/qt-scripted-modules/CellLocatorData/ccf_annotation_color_table.txt"
"D:/D/P/CL-0-build/Slicer-build/lib/CellLocator-4.13/qt-scripted-modules/CellLocatorData/ccf_annotation_color_allen2slicer_mapping.json"
"D:/D/P/CL-0-build/Slicer-build/lib/CellLocator-4.13/qt-scripted-modules/CellLocatorData/ccf_annotation_color_slicer2allen_mapping.json"
"D:/D/P/CL-0-build/Slicer-build/lib/CellLocator-4.13/qt-scripted-modules/CellLocatorData/ccf-ontology-formatted.json"
)
endif()
if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xRuntimeLibrariesx" OR NOT CMAKE_INSTALL_COMPONENT)
file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/./lib/CellLocator-4.13/qt-scripted-modules" TYPE FILE FILES
"D:/D/P/CL-0-build/Slicer-build/lib/CellLocator-4.13/qt-scripted-modules/CellLocatorData/mni_icbm152_t1_tal_nlin_sym_09b_hires.nii"
"D:/D/P/CL-0-build/Slicer-build/lib/CellLocator-4.13/qt-scripted-modules/CellLocatorData/mni_annotation_contiguous.nrrd"
"D:/D/P/CL-0-build/Slicer-build/lib/CellLocator-4.13/qt-scripted-modules/CellLocatorData/mni_annotation_color_table.txt"
"D:/D/P/CL-0-build/Slicer-build/lib/CellLocator-4.13/qt-scripted-modules/CellLocatorData/mni_annotation_color_allen2slicer_mapping.json"
"D:/D/P/CL-0-build/Slicer-build/lib/CellLocator-4.13/qt-scripted-modules/CellLocatorData/mni_annotation_color_slicer2allen_mapping.json"
"D:/D/P/CL-0-build/Slicer-build/lib/CellLocator-4.13/qt-scripted-modules/CellLocatorData/mni-ontology-formatted.json"
)
endif()
if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xRuntimeLibrariesx" OR NOT CMAKE_INSTALL_COMPONENT)
file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/./lib/CellLocator-4.13/qt-scripted-modules" TYPE FILE FILES
"D:/D/P/CL-0-build/Slicer-build/lib/CellLocator-4.13/qt-scripted-modules/CellLocatorData/ccf_annotation_layer_color_table.txt"
"D:/D/P/CL-0-build/Slicer-build/lib/CellLocator-4.13/qt-scripted-modules/CellLocatorData/ccf-layer-ontology-formatted.json"
)
endif()
The macro responsible for installing the module is slicerMacroBuildScriptedModule
:
and looking at the implementation, we can observe that the directory is always installed:
Fixing ctkMacroCompilePythonScript
used in slicerMacroBuildScriptedModule
to explicitly install each files would be ideal.
But since this may be a more involved change, we could look into few approaches:
Check why the sub directory are installed ... this is seems to be a "bug" because we do not pass the WITH_SUBDIR
to slicerMacroBuildScriptedModule
Update slicerMacroBuildScriptedModule
to add a NO_INSTALL
to fully skip the install of script and instead explicitly install relevant scripts.
References:
Description
The size of the installer (843MB vs 215MB) is partially explained by the fact the MNI atlas is now shipped with the application. We noticed that the install rules were installing the complete download folders instead of selectively installing the relevant MNI files.
See https://github.com/BICCN/cell-locator/releases
Screenshots