WSL/SLF GitLab Repository

Commit fdfd0bde authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Version version of the packaging.

Don't expect it to work yet!
parent 97c63d2f
......@@ -8,6 +8,8 @@ resources/languages/*.qm
.qmake.stash
Makefile
build/
bin/
inishell_autogen/*
qrc_inishell.cpp
*.o
moc_*
......@@ -27,3 +29,16 @@ callgrind.out.*
massif.out.*
#Cmake temporary files
CMakeFiles/*
_CPack_Packages/*
CMakeCache.txt
install_manifest.txt
cmake_install.cmake
cmake_uninstall.cmake
#CPack generated files
CPackConfig.cmake
CPackSourceConfig.cmake
*.deb
*.rpm
*.tar.gz
*.exe
*.dmg
#SPDX-License-Identifier: GPL-3.0-or-later
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)
PROJECT(inishell VERSION 2.0.7)
PROJECT(inishell)
SET(VERSION_MAJOR 2 CACHE INTERNAL "")
SET(VERSION_MINOR 0 CACHE INTERNAL "")
SET(VERSION_PATCH 7 CACHE INTERNAL "")
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/src/main/config.h.in ${PROJECT_SOURCE_DIR}/src/main/config.h)
###########################################################
......@@ -48,6 +51,28 @@ SET_TARGET_PROPERTIES(${TARGET} PROPERTIES
OUTPUT_NAME ${TARGET})
INSTALL(TARGETS ${TARGET} RUNTIME DESTINATION bin COMPONENT exe)
# Retrieve the absolute path to qmake and then use that path to find
# the binaries
get_target_property(_qmake_executable Qt5::qmake IMPORTED_LOCATION)
get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY)
IF(WIN32)
FIND_PROGRAM(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${_qt_bin_dir}")
ADD_CUSTOM_COMMAND(TARGET ${TARGET} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E
env PATH="${_qt_bin_dir}" "${WINDEPLOYQT_EXECUTABLE}"
"$<TARGET_FILE:${TARGET}>"
COMMENT "Running windeployqt...")
ENDIF()
IF(APPLE)
FIND_PROGRAM(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${_qt_bin_dir}")
ADD_CUSTOM_COMMAND(TARGET ${TARGET} POST_BUILD
COMMAND "${MACDEPLOYQT_EXECUTABLE}"
"$<TARGET_FILE_DIR:${TARGET}>/../.."
-always-overwrite
COMMENT "Running macdeployqt...")
ENDIF()
###########################################################
# Custom targets
ADD_CUSTOM_TARGET(distclean make clean
......@@ -67,3 +92,132 @@ CONFIGURE_FILE(
)
ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
#for the install target
FILE(GLOB xmlfiles "inishell-apps/*.xml")
INSTALL(FILES ${xmlfiles} DESTINATION inishell-apps COMPONENT resources)
IF(WIN32)
FILE(GLOB dlls "bin/*.dll")
INSTALL(FILES ${dlls} DESTINATION bin COMPONENT exe)
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/bin/bearer DESTINATION bin COMPONENT exe)
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/bin/iconengines DESTINATION bin COMPONENT exe)
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/bin/imageformats DESTINATION bin COMPONENT exe)
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/bin/platforms DESTINATION bin COMPONENT exe)
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/bin/styles DESTINATION bin COMPONENT exe)
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/bin/translations DESTINATION bin COMPONENT exe)
ENDIF(WIN32)
###########################################################
## CPACK section
###########################################################
SET(CPACK_PACKAGE_DESCRIPTION "Inishell Graphical User Interface dynamic generator for numerical models")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "An XML description of the input fields necessary to configure a given numerical model is used to generate on the fly a Graphical User Interface that lets the user configure the numerical model and even run it if so configured")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/Welcome.txt")
SET(CPACK_PACKAGE_NAME "Inishell")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
SET(CPACK_PACKAGE_CONTACT "Mathias Bavay <Mathias.Bavay@wsl.ch>")
SET(CPACK_PACKAGE_VENDOR "WSL Institute for Snow and Avalanche Research")
SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/resources/icons\\\\inishell_192.ico")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt")
SET(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_SOURCE_DIR}/Welcome.txt")
SET(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/Readme.txt")
SET(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}")
SET(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}")
SET(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}")
SET(VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
SET(CPACK_ARCH "${CMAKE_SYSTEM_PROCESSOR}")
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${VERSION}-${CPACK_ARCH}")
#installation by components for formats that support it
#SET(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE 1)
SET(CPACK_COMPONENTS_ALL exe resources meteoio)
SET(CPACK_COMPONENT_RESOURCES_DISPLAY_NAME "Inishell resources")
SET(CPACK_COMPONENT_RESOURCES_DESCRIPTION "Additional files to use Inishell")
SET(CPACK_COMPONENT_EXE_DISPLAY_NAME "Inishell itself")
SET(CPACK_COMPONENT_EXE_DESCRIPTION "The Inishell applications")
SET(CPACK_COMPONENT_EXE_GROUP Runtime)
SET(CPACK_COMPONENT_RUNTIME_GROUP "Runtime")
SET(CPACK_COMPONENT_GROUP_RUNTIME_DESCRIPTION "What you need to run Inishell")
IF(UNIX)
IF(APPLE) #OsX packages: IMG
SET(CPACK_GENERATOR "DragNDrop")
SET(CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_NAME}")
SET(CPACK_DMG_FORMAT "UDBZ")
#SET(CPACK_GENERATOR "Bundle")
SET(CPACK_BUNDLE_PLIST "${CMAKE_SOURCE_DIR}/tools/inishell.plist")
SET(MACOSX_BUNDLE_INFO_STRING "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
SET(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/resources/icons/inishell_192.icns")
SET(MACOSX_BUNDLE_ICON_FILE "${CPACK_BUNDLE_ICON}")
SET(MACOSX_BUNDLE_GUI_IDENTIFIER "${CPACK_PACKAGE_DESCRIPTION}")
SET(MACOSX_BUNDLE_LONG_VERSION_STRING "${VERSION}")
SET(CPACK_BUNDLE_NAME "${CPACK_PACKAGE_NAME}")
SET(MACOSX_BUNDLE_BUNDLE_NAME "${CPACK_PACKAGE_NAME}")
SET(MACOSX_BUNDLE_SHORT_VERSION_STRING "${VERSION}")
SET(MACOSX_BUNDLE_BUNDLE_VERSION "0")
SET(MACOSX_BUNDLE_COPYRIGHT "${CPACK_PACKAGE_VENDOR}")
#SET(CPACK_PACKAGING_INSTALL_PREFIX "/Applications/${CPACK_PACKAGE_NAME}")
SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/resources/icons/inishell_192.icns")
SET_SOURCE_FILES_PROPERTIES(${CPACK_BUNDLE_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
ELSE(APPLE) #Linux packages: rmp, deb and tgz
SET(CPACK_GENERATOR "DEB;RPM;TGZ")
SET(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
SET(CPACK_DEBIAN_PACKAGE_NAME "inishell")
SET(CPACK_DEBIAN_PACKAGE_SECTION "devel")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libm.so,libc.so,libQt5Widgets.so,libQt5Xml.so,libQt5XmlPatterns.so,libQt5Gui.so,libQt5Network.so,libQt5Core.so,libstdc++.so,libgcc_s.so") #objdump -p lib/libmeteoio.so | grep NEEDED | tr -s ' ' | cut -d' ' -f3 | tr '\n' ','
#SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "i386") #dpkg --print-architecture
IF("${CPACK_ARCH}" STREQUAL "x86_64")
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
ELSE("${CPACK_ARCH}" STREQUAL "x86_64")
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${CPACK_ARCH}")
ENDIF("${CPACK_ARCH}" STREQUAL "x86_64")
SET(CPACK_RPM_PACKAGE_NAME "inishell")
SET(CPACK_RPM_PACKAGE_LICENSE "GPLv3")
SET(CPACK_RPM_PACKAGE_REQUIRES "libstdc++") #simply libproj for OpenSuse
SET(CPACK_RPM_PACKAGE_ARCHITECTURE "${CPACK_ARCH}")
SET(CPACK_RPM_PACKAGE_GROUP "Education/Science")
ENDIF(APPLE)
ELSE(UNIX)
IF(WIN32) #Windows packages
SET(CPACK_GENERATOR "NSIS")
SET(CPACK_NSIS_MUI_ICON "${CPACK_PACKAGE_ICON}")
SET(CPACK_PACKAGE_ICON "${CPACK_PACKAGE_ICON}")
SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}")
#Main links (they can get overwritten later)
SET(MENU_LINKS_INISHELL "https://models.slf.ch" "Inishell's home page" )
SET(MENU_LINKS_INISHELL_SRC "https://code.wsl.ch/snow-models/inishell" "Inishell's repository")
SET(CPACK_NSIS_MENU_LINKS ${MENU_LINKS_INISHELL} ${MENU_LINKS_INISHELL_SRC})
#info for the add/uninstall software administration
SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_NAME}-${VERSION}")
SET(CPACK_NSIS_INSTALLED_ICON_NAME "${CMAKE_SOURCE_DIR}/resources/icons\\\\inishell_192.ico")
SET(CPACK_NSIS_URL_INFO_ABOUT "http://www.slf.ch")
SET(CPACK_NSIS_HELP_LINK "https://models.slf.ch/p/inishell-ng")
SET(CPACK_NSIS_CONTACT "${CPACK_PACKAGE_CONTACT}")
SET(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL "ON")
ENDIF(WIN32)
ENDIF(UNIX)
#Source packages
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${VERSION}" CACHE INTERNAL "tarball basename")
SET(CPACK_SOURCE_GENERATOR TGZ)
# The following components are regex's to match anywhere (unless anchored)
# in absolute path + filename to find files or directories to be excluded
# from source tarball.
SET(CPACK_SOURCE_IGNORE_FILES
"~$"
"\\\\.svn/"
"/CMakeFiles/"
"/CMakeCache*"
"/cmake_install\\\\.cmake$"
"/cmake_uninstall\\\\.cmake$"
"^_CPack_.*/"
"/CPack*"
"\\\\.o$"
"/m4/"
)
INCLUDE(CPack)
Welcome to Inishell, a flexible Graphical User Interface (GUI) for simulation software.
Inishell is open source under the GNU GPL3 license and is shipped as the GUI for various numerical modelling software packages to configure and run the simulations intuitively.
Inishell loads XML files containing a semantic description of the models' parameters and dynamically builds a GUI upon this information.
Hence, for the end user it offers a graphical user interface for provided modeling software which is tailored to rapid development and therefore hopefully never outdated. For the developer on the other hand, it offers the possibility to very easily set up a GUI for their application and keep it synchronized with the evolving models. Deploying a new feature in the GUI is then as easy as editing an XML text file and shipping this updated version to the user.
Welcome to Inishell, a flexible Graphical User Interface (GUI) for simulation software.
Inishell is open source under the GNU GPL3 license and is shipped as the GUI for various numerical modelling software packages to configure and run the simulations intuitively.
Inishell loads XML files containing a semantic description of the models' parameters and dynamically builds a GUI upon this information.
Hence, for the end user it offers a graphical user interface for provided modeling software which is tailored to rapid development and therefore hopefully never outdated. For the developer on the other hand, it offers the possibility to very easily set up a GUI for their application and keep it synchronized with the evolving models. Deploying a new feature in the GUI is then as easy as editing an XML text file and shipping this updated version to the user.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Version</key>
<string>2.0.7</string>
<key>Editor</key>
<string>WSL/SLF</string>
<key>URL</key>
<string>https://models.slf.ch</string>
<key>Date</key>
<date>2021-12-09T10:14:26Z</date>
</dict>
</plist>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment