Skip to content
Snippets Groups Projects
Commit e2866f1e authored by Mickael Savinaud's avatar Mickael Savinaud
Browse files

INST: add the otb applications into the win nsis installer

parent d98a2635
No related branches found
No related tags found
No related merge requests found
include(BundleUtilities)
fixup_bundle("${CMAKE_INSTALL_PREFIX}/bin/monteverdi2.exe" "" "")
\ No newline at end of file
set(APP_LIST @OTB_APPS_NAME_LIST@)
foreach(APP ${APP_LIST})
list(APPEND OTB_APPS_LIST_INSTALL ${CMAKE_INSTALL_PREFIX}/lib/otb/applications/${APP})
endforeach(APP)
include(BundleUtilities)
fixup_bundle("${CMAKE_INSTALL_PREFIX}/bin/monteverdi2.exe" "${OTB_APPS_LIST_INSTALL}" "")
\ No newline at end of file
...@@ -41,10 +41,31 @@ if(NOT GDAL_DATA) ...@@ -41,10 +41,31 @@ if(NOT GDAL_DATA)
message(FATAL_ERROR "Cannot generate installer without OSGeo4W environment : GDAL_DATA") message(FATAL_ERROR "Cannot generate installer without OSGeo4W environment : GDAL_DATA")
endif(NOT GDAL_DATA) endif(NOT GDAL_DATA)
# Search all the applications available in the OTB build dir
file(GLOB OTB_APPS_LIST ${OTB_DIR}/bin/RelWithDebInfo/otbapp_*.dll)
# Install the applications
install(FILES ${OTB_APPS_LIST}
DESTINATION lib/otb/applications
COMPONENT Runtime)
# Retrieve the name of all the applications available
foreach(APP ${OTB_APPS_LIST})
string(REPLACE ${OTB_DIR}/bin/RelWithDebInfo/ "" APP_NAME ${APP})
list(APPEND OTB_APPS_NAME_LIST ${APP_NAME})
endforeach(APP)
# configure the file to pass the list of available applications
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/BundleFixing.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/BundleFixing.cmake
@ONLY)
#Use the configured file with the list of apps
# Gather all dlls from which Monteverdi depends, and put them aside the executable # Gather all dlls from which Monteverdi depends, and put them aside the executable
# For this to work, the necessary DLL must be in PATH # For this to work, the necessary DLL must be in PATH
install(SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/BundleFixing.cmake install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/BundleFixing.cmake
COMPONENT Runtime) COMPONENT Runtime)
# For some reason, fixup_bundle won't package the msvc runtime dll # For some reason, fixup_bundle won't package the msvc runtime dll
# I guess it's because cpack already handles installing the runtime, # I guess it's because cpack already handles installing the runtime,
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
:: Set GDAL_DATA env. variable :: Set GDAL_DATA env. variable
@set GDAL_DATA=%CURRENT_SCRIPT_DIR%..\share\gdal @set GDAL_DATA=%CURRENT_SCRIPT_DIR%..\share\gdal
@set ITK_AUTOLOAD_PATH=%CURRENT_SCRIPT_DIR%..\lib\otb\applications
:: Set current dir to HOME dir because Monteverdi generates temporary files and need write access :: Set current dir to HOME dir because Monteverdi generates temporary files and need write access
@cd %HOMEDRIVE%%HOMEPATH% @cd %HOMEDRIVE%%HOMEPATH%
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment