Commit 66098b70 authored by Tao Zhong's avatar Tao Zhong
Browse files

Version 0.8.5

parent 0594cbe8
Pipeline #14198 passed with stages
in 48 seconds
build/
backup*
......@@ -23,7 +23,7 @@ configure-linux:
script:
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Debug ..
- cmake -DCMAKE_BUILD_TYPE=Debug -DDESIRED_QT_VERSION=4 ..
- echo "configure | ${CI_PROJECT_DIR}"
stage: configure
tags:
......
# Change Log
All notable changes to this project will be documented in this file.
## v0.8.5 [02.11.2018]
## Added
- Add Auto Saving function #67
- Better Panning Mode #100
## Changed
- Update Shortcuts #92
- Design new origin and axis #99
## Bugs fixed
- Esc doesn't work while drawing #98
- SegFault: Delete all Rooms #91
## v0.8.4 [05.10.2018]
## Added
- In menu bar, under "Edit" you will find "Clear Rooms and Doors button" to clear all defined rooms and doors. #54
......
......@@ -9,27 +9,29 @@
# 2. DESIRED_QT_VERSION=5 (default 4)
# example: >> cmake -DDESIRED_QT_VERSION=5 -DCMAKE_PREFIX_PATH=~/Qt/5.5/clang_64 ..
# Flags for VS: -G "Visual Studio ..." -DCMAKE_PREFIX_PATH=... -DCMAKE_C_FLAGS="-mwindows"
cmake_minimum_required(VERSION 2.8.9)
IF (POLICY CMP0048) # in CMake 3.0.0+
CMAKE_POLICY (SET CMP0048 OLD) # keep PROJECT() from clearing VERSION variables
ENDIF (POLICY CMP0048)
IF (POLICY CMP0043) # in CMake 3.0.0+
CMAKE_POLICY (SET CMP0043 OLD) # keep PROJECT() from clearing VERSION variables
ENDIF (POLICY CMP0043)
IF (POLICY CMP0020)
CMAKE_POLICY (SET CMP0020 OLD) # keep old POLICY (2.8.10 and lower) The OLD behavior for this policy is not to link executables to
ENDIF (POLICY CMP0020) #qtmain.lib automatically when they link to the QtCore IMPORTEDtarget
IF (POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) #fixes error No known features for CXX compiler (on mac)
ENDIF (POLICY CMP0025)
project(JPSeditor)
# Qt5_DIR:PATH
cmake_minimum_required(VERSION 3.2)
# IF (POLICY CMP0048) # in CMake 3.0.0+
# CMAKE_POLICY (SET CMP0048 OLD) # keep PROJECT() from clearing VERSION variables
# ENDIF (POLICY CMP0048)
# IF (POLICY CMP0043) # in CMake 3.0.0+
# CMAKE_POLICY (SET CMP0043 OLD) # keep PROJECT() from clearing VERSION variables
# ENDIF (POLICY CMP0043)
# IF (POLICY CMP0020)
# CMAKE_POLICY (SET CMP0020 OLD) # keep old POLICY (2.8.10 and lower) The OLD behavior for this policy is not to link executables to
# ENDIF (POLICY CMP0020) #qtmain.lib automatically when they link to the QtCore IMPORTEDtarget
# IF (POLICY CMP0025)
# cmake_policy(SET CMP0025 NEW) #fixes error No known features for CXX compiler (on mac)
# ENDIF (POLICY CMP0025)
project(JPSeditor LANGUAGES CXX)
set (CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
MESSAGE( STATUS "System ........................................ ${CMAKE_SYSTEM_NAME} (${CMAKE_SYSTEM_VERSION}, ${CMAKE_SYSTEM_PROCESSOR})" )
set(README_FILE "${CMAKE_SOURCE_DIR}/README.md")
set(CMAKE_COLOR_MAKEFILE ON)
set(JPSEDITOR_MAJOR_VERSION 0)
......@@ -43,6 +45,10 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "")
endif()
message( STATUS "Generating ................................... ${PROJECT_NAME} (${JPSEDITOR_VERSION}) -- ${CMAKE_BUILD_TYPE}")
if(APPLE )
set(CMAKE_INSTALL_PREFIX "/Applications")
endif()
message(STATUS "${PROJECT_NAME} will be installed to ${CMAKE_INSTALL_PREFIX}")
# ------------------------- Begin Generic CMake Variable Logging ------------------
......@@ -74,13 +80,6 @@ message( STATUS "EXECUTABLE_OUTPUT_PATH ........................ " ${EXECUTABLE_
include_directories( ${CMAKE_BINARY_DIR} )
include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
if(APPLE AND CMAKE_INSTALL_PREFIX MATCHES "/usr/local")
set(CMAKE_INSTALL_PREFIX "/Applications")
endif()
message(STATUS "${PROJECT_NAME} will be installed to ${CMAKE_INSTALL_PREFIX}")
#--------------------
if (NOT MSVC)
include(CheckCXXCompilerFlag)
......@@ -121,6 +120,7 @@ set( SRCS
src/UndoFramework/lineaction.cpp
src/AutomaticRoomIdentification/roomdefinition.cpp
src/AutomaticRoomIdentification/roomidentification.cpp
src/settingdialog.cpp
)
# all header files that should be treated with moc
set( HDR
......@@ -158,6 +158,7 @@ set( HDR
src/AutomaticRoomIdentification/roomdefinition.h
src/AutomaticRoomIdentification/roomidentification.h
src/dtrace.h
src/settingdialog.h
)
......@@ -167,6 +168,7 @@ set( UIS
forms/roomwidget.ui
forms/widgetlandmark.ui
forms/widgetsettings.ui
forms/settingdialog.ui
)
# and finally a resource file
......@@ -185,53 +187,39 @@ IF (WIN32)
ENDIF (WIN32)
#--------------- here comes QT. Version problem (4 or 5?)
# cmake does not provide findqt5-modules
if("${QT_QMAKE_EXECUTABLE}" STREQUAL "")
FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake)
if ("${QT_QMAKE_EXECUTABLE}" STREQUAL "")
message(FATTAL_ERROR "QT not found - abort.")
endif()
endif()
message(STATUS "QT_Qmake_executable ........................... " ${QT_QMAKE_EXECUTABLE})
execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_VERSION OUTPUT_VARIABLE QT_VERSION)
message(STATUS "QT_VERSION .................................... " ${QT_VERSION})
# qt version > 5 or qt version < 3 are not supported
if( ${QT_VERSION} VERSION_GREATER 6 OR ${QT_VERSION} VERSION_LESS 3)
message(FATAL_ERROR "QT version " ${DESIRED_QT_VERSION} " not supported. Try 4 or 5")
endif()
if("${DESIRED_QT_VERSION}" STREQUAL "")
if( ${QT_VERSION} VERSION_GREATER 4.99 AND ${QT_VERSION} VERSION_LESS 6)
set(DESIRED_QT_VERSION 5)
endif()
if( ${QT_VERSION} VERSION_GREATER 3.99 AND ${QT_VERSION} VERSION_LESS 5)
else()
set(DESIRED_QT_VERSION 4)
endif()
endif()
message(STATUS "Searching for Qt version ...................... " ${DESIRED_QT_VERSION})
# find packages according to qt version
if("${DESIRED_QT_VERSION}" STREQUAL "5")
find_package(Qt5Widgets REQUIRED)
# - these find_packages are not necessary? -----------
# - these find_packages are not necessary? -----------
FIND_PACKAGE(Qt5Core REQUIRED)
FIND_PACKAGE(Qt5Gui REQUIRED)
FIND_PACKAGE(Qt5Network REQUIRED)
FIND_PACKAGE(Qt5Xml REQUIRED)
#-----------------------------------------------------
#-----------------------------------------------------
set(QT5_INSTALLED TRUE)
# MESSAGE(STATUS "Found Qt version: ${Qt5Core_VERSION_STRING}")
elseif("${DESIRED_QT_VERSION}" STREQUAL "4")
set(QTVERSION 5)
MESSAGE(STATUS "Found Qt version .............................. ${Qt5Core_VERSION_STRING}")
# QT4_INSTALLED is set to TRUE if qt4 is found and
# QT3_INSTALLED is set to TRUE if qt3 is found.
FIND_PACKAGE(Qt COMPONENTS QtXml QT_USE_QTNETWORK QtXmlPatterns REQUIRED)
elseif("${DESIRED_QT_VERSION}" STREQUAL "4")
find_package(Qt COMPONENTS QtXml QT_USE_QTNETWORK QtXmlPatterns REQUIRED)
set(QT4_INSTALLED TRUE)
set(QTVERSION 4)
endif()
message(STATUS "DESIRED_QT_VERSION ............................ " ${DESIRED_QT_VERSION})
execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_VERSION OUTPUT_VARIABLE QT_VERSION)
# qt version > 5 or qt version < 3 are not supported
if( ${QTVERSION} VERSION_GREATER 6 OR ${QTVERSION} VERSION_LESS 3)
message(FATAL_ERROR "QT version " ${QTVERSION} " not supported. Try 4 or 5")
endif()
# if(QT5_INSTALLED)
# message(STATUS "QT5_INSTALLED: " ${QT5_INSTALLED})
# elseif(QT4_INSTALLED )
......@@ -246,7 +234,7 @@ message(STATUS "DESIRED_QT_VERSION ............................ " ${DESIRED_QT_V
if(APPLE)
ADD_DEFINITIONS(-DQT_NO_CAST_TO_ASCII)
# include the icns file in the target
SET(SRCS ${SRCS} ${CMAKE_CURRENT_SOURCE_DIR}/icons/jupedsim.icns)
SET(SRCS ${SRCS} ${CMAKE_CURRENT_SOURCE_DIR}/Resources/jpseditor.icns)
endif()
# this command will generate rules that will run rcc on all files from RCS
......@@ -259,13 +247,13 @@ if(${QT4_INSTALLED})
QT4_WRAP_UI( UI_HDRS ${UIS} )
QT4_ADD_RESOURCES( RCS ${RCS} )
include( ${QT_USE_FILE} )
ADD_EXECUTABLE( jpseditor MACOSX_BUNDLE WIN32
ADD_EXECUTABLE( ${PROJECT_NAME} MACOSX_BUNDLE WIN32
${SRCS}
${MOC_HDRS}
${UI_HDRS}
${RCS}
)
TARGET_LINK_LIBRARIES( jpseditor ${QT_LIBRARIES})
TARGET_LINK_LIBRARIES( ${PROJECT_NAME} ${QT_LIBRARIES})
elseif( ${QT5_INSTALLED})
message(STATUS "Working with Qt5")
# http://www.kdab.com/using-cmake-with-qt-5/
......@@ -275,16 +263,16 @@ elseif( ${QT5_INSTALLED})
qt5_add_resources( RCS ${RCS} )
#qt5_use_package(JPSeditor Widgets)
ADD_EXECUTABLE( jpseditor MACOSX_BUNDLE WIN32
ADD_EXECUTABLE( ${PROJECT_NAME} MACOSX_BUNDLE WIN32
${SRCS}
${MOC_HDRS}
${UI_HDRS}
${RCS}
)
qt5_use_modules(jpseditor Widgets)
target_link_libraries(jpseditor ${Qt5Widgets_LIBRARIES})
qt5_use_modules(${PROJECT_NAME} Widgets)
target_link_libraries(${PROJECT_NAME} ${Qt5Widgets_LIBRARIES})
else()
message(FATAL_ERROR "QT NOT BE FOUND - ABORT")
message(FATAL_ERROR "QT NOT FOUND - ABORT")
endif()
IF(APPLE)
......@@ -293,7 +281,7 @@ IF(APPLE)
ENDIF(APPLE)
SET_TARGET_PROPERTIES( jpseditor PROPERTIES MACOSX_BUNDLE TRUE)
SET_TARGET_PROPERTIES( ${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE TRUE)
#----------------------------------------------------------------------
# enable as many warnings as possible
set(warning_flags "-Wall -Wextra")
......@@ -333,52 +321,35 @@ endif()
#--------------------------------------------------------------------------------
# Now the installation stuff below
#--------------------------------------------------------------------------------
SET(plugin_dest_dir bin)
SET(qtconf_dest_dir bin)
SET(APPS "\${CMAKE_INSTALL_PREFIX}/bin/jpseditor")
IF(APPLE)
SET(plugin_dest_dir jpseditor.app/Contents/MacOS)
SET(qtconf_dest_dir jpseditor.app/Contents/Resources)
SET(APPS "\${CMAKE_INSTALL_PREFIX}/jpseditor.app")
ENDIF(APPLE)
IF(WIN32)
SET(APPS "\${CMAKE_INSTALL_PREFIX}/bin/jpseditor.exe")
ENDIF(WIN32)
INSTALL(TARGETS jpseditor
BUNDLE DESTINATION . COMPONENT Runtime
INSTALL(TARGETS ${PROJECT_NAME}
BUNDLE DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT Runtime
RUNTIME DESTINATION bin COMPONENT Runtime
# PERMISSIONS OWNER_EXECUTE 600
)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION "${BIN_INSTALL_DIR}")
include(InstallRequiredSystemLibraries)
#--------------------------------------------------------------------------------
# Install needed Qt plugins by copying directories from the qt installation
# One can cull what gets copied by using 'REGEX "..." EXCLUDE'
# todo should we check qt version here?
if(APPLE)
INSTALL(DIRECTORY "${QT_PLUGINS_DIR}/imageformats" DESTINATION ${plugin_dest_dir}/plugins
# DIRECTORY_PERMISSIONS
# OWNER_WRITE OWNER_READ OWNER_EXECUTE
# GROUP_WRITE GROUP_READ GROUP_EXECUTE
# WORLD_WRITE WORLD_READ WORLD_EXECUTE
COMPONENT Runtime)
endif()
#--------------------------------------------------------------------------------
# install a qt.conf file
# this inserts some cmake code into the install script to write the file
if(APPLE)
INSTALL(CODE "
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"\")
" COMPONENT Runtime)
set(EXECUTABLE "${PROJECT_NAME}.app")
elseif(WIN32)
set(EXECUTABLE "${PROJECT_NAME}${CMAKE_EXECUTABLE_SUFFIX}")
else()
set(EXECUTABLE "${BIN_INSTALL_DIR}/${PROJECT_NAME}${CMAKE_EXECUTABLE_SUFFIX}")
endif()
#--------------------------------------------------------------------------------
# Use BundleUtilities to get all other dependencies for the application to work.
# It takes a bundle or executable along with possible plugins and inspects it
# for dependencies. If they are not system dependencies, they are copied.
# directories to look for dependencies
SET(plugin_dest_dir bin)
SET(qtconf_dest_dir bin)
SET(APPS "\${CMAKE_INSTALL_PREFIX}/bin/${PROJECT_NAME}")
IF(APPLE)
SET(plugin_dest_dir ${PROJECT_NAME}.app/Contents/MacOS)
SET(qtconf_dest_dir ${PROJECT_NAME}/Contents/Resources)
SET(APPS "\${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}")
ENDIF(APPLE)
IF(WIN32)
SET(APPS "\${CMAKE_INSTALL_PREFIX}/bin/${PROJECT_NAME}.exe")
ENDIF(WIN32)
if( ${QT5_INSTALLED})
SET(DIRS ${QT_LIBRARIES})
......@@ -386,37 +357,20 @@ elseif( ${QT5_INSTALLED})
SET(DIRS ${QT_LIBRARY_DIRS})
endif()
# Now the work of copying dependencies into the bundle/package
# The quotes are escaped and variables to use at install time have their $ escaped
# An alternative is the do a configure_file() on a script and use install(SCRIPT ...).
# Note that the image plugins depend on QtSvg and QtXml, and it got those copied
# over.
#
if(APPLE)
INSTALL(CODE "
file(GLOB_RECURSE QTPLUGINS
\"\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/plugins/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
image
fixup_bundle(\"${APPS}\" \"\${QTPLUGINS}\" \"${DIRS}\")
" COMPONENT Runtime)
endif()
#================================================ APPLE Stuff ======================
IF(APPLE)
# set how it shows up in the Info.plist file
SET(MACOSX_EDIT_ICON jupedsim.icns)
set_target_properties(jpseditor PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Resources/Info.plist.in)
SET(MACOSX_BUNDLE_COPYRIGHT "Copyright (c) 2015 Forschungszentrum Juelich. All rights reserved.")
SET(MACOSX_BUNDLE_BUNDLE_NAME "jpseditor")
SET(MACOSX_BUNDLE_COPYRIGHT "Copyright (c) 2015-2018 Forschungszentrum Juelich. All rights reserved.")
SET(MACOSX_BUNDLE_BUNDLE_NAME "${PROJECT_NAME}")
SET(MACOSX_BUNDLE_BUNDLE_VERSION "${JPSEDITOR_VERSION}")
SET(MACOSX_BUNDLE_LONG_VERSION_STRING "version ${JPSEDITOR_VERSION}")
SET(MACOSX_BUNDLE_SHORT_VERSION_STRING "${JPSEDITOR_VERSION}")
SET(MACOSX_EDIT_COPYRIGHT "Copyright (c) 2015 Forschungszentrum Juelich. All rights reserved.")
SET(MACOSX_BUNDLE_EDIT_IDENTIFIER "www.jupedsim.org")
SET(MACOSX_BUNDLE_EDIT_IDENTIFIER "https://www.jupedsim.org")
# set where in the bundle to put the icns file
# set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Resources/Info.plist.in)
ENDIF(APPLE)
......@@ -426,82 +380,54 @@ ENDIF(APPLE)
# https://github.com/mikemcquaid/Fabula
set(CPACK_BINARY_DRAGNDROP ON)
set(CPACK_GENERATOR "TBZ2")
set(CPACK_PACKAGE_VERSION_MAJOR "${JPSEDITOR_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${JPSEDITOR_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${JPSEDITOR_version_patch}")
set(CPACK_PACKAGE_VERSION_MAJOR "${JPSEDITOR_MAJOR_VERSION}")
set(CPACK_PACKAGE_VERSION_MINOR "${JPSEDITOR_MINOR_VERSION}")
set(CPACK_PACKAGE_VERSION_PATCH "${JPSEDITOR_PATCH_VERSION}")
set(CPACK_PACKAGE_VERSION "${JPSEDITOR_VERSION}")
set(CPACK_PACKAGE_VENDOR "${JPSEDITOR_VENDOR}")
set(CPACK_RESOURCE_FILE_README "${README_FILE}")
if(WIN32) # todo test this for windows
set(CPACK_GENERATOR "NSIS")
set(CPACK_PACKAGE_EXECUTABLES "${PROJECT_NAME}" "${PROJECT_NAME}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}")
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME} ${JPSEDITOR_VERSION}")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/${LICENSE_FILE}")
set(CPACK_NSIS_EXECUTABLES_DIRECTORY "${BIN_INSTALL_DIR}")
#set(CPACK_NSIS_MUI_ICON "${PROJECT_ICONS_DIRECTORY}/NSIS.ico")
#set(CPACK_PACKAGE_ICON "${PROJECT_ICONS_DIRECTORY}\\\\NSISHeader.bmp")
set(CPACK_NSIS_INSTALLED_ICON_NAME "${PROJECT_NAME}${CMAKE_EXECUTABLE_SUFFIX}")
# set(CPACK_NSIS_MENU_LINKS "${LICENSE_FILE}" "License" "${README_FILE}" "Readme")
# set(CPACK_NSIS_MUI_FINISHPAGE_RUN "${CPACK_NSIS_INSTALLED_ICON_NAME}")
set(CPACK_GENERATOR "NSIS")
set(CPACK_PACKAGE_EXECUTABLES "${PROJECT_NAME}" "${PROJECT_NAME}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}")
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME} ${JPSEDITOR_VERSION}")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/${LICENSE_FILE}")
set(CPACK_NSIS_EXECUTABLES_DIRECTORY "${BIN_INSTALL_DIR}")
#set(CPACK_NSIS_MUI_ICON "${PROJECT_ICONS_DIRECTORY}/NSIS.ico")
#set(CPACK_PACKAGE_ICON "${PROJECT_ICONS_DIRECTORY}\\\\NSISHeader.bmp")
set(CPACK_NSIS_INSTALLED_ICON_NAME "${PROJECT_NAME}${CMAKE_EXECUTABLE_SUFFIX}")
# set(CPACK_NSIS_MENU_LINKS "${LICENSE_FILE}" "License" "${README_FILE}" "Readme")
# set(CPACK_NSIS_MUI_FINISHPAGE_RUN "${CPACK_NSIS_INSTALLED_ICON_NAME}")
elseif(APPLE) # todo test this for apple
set(CMAKE_INSTALL_PREFIX "/Applications/")
set(CPACK_GENERATOR "DragNDrop")
set(CPACK_DMG_FORMAT "UDBZ")
set(CPACK_DMG_VOLUME_NAME "${PROJECT_NAME}")
set(CPACK_SYSTEM_NAME "OSX")
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${JPSEDITOR_VERSION}")
#set(CPACK_PACKAGE_ICON "${ICONS_DIR}/DMG.icns")
#set(CPACK_DMG_DS_STORE "${ICONS_DIR}/DMGDSStore")
#set(CPACK_DMG_BACKGROUND_IMAGE "${ICONS_DIR}/DMGBackground.png")
elseif(UNIX)
# tested with success in
# Linux dhcppc5 3.2.0-4-686-pae #1 SMP Debian 3.2.68-1+deb7u2 i686 GNU/Linux
set(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
SET(CPACK_GENERATOR "DEB")
SET(CPACK_PACKAGE_DESCRIPTION "simulation core of JuPedSim")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Geometry editor of JuPedSim, a framework for simulation and analysis of pedestrian dynamics")
#SET(CPACK_PACKAGE_VENDOR "nowardev")
SET(CPACK_PACKAGE_CONTACT "m.chraibi@fz-juelich.de")
SET(CPACK_PACKAGE_VERSION_MAJOR "${JPSEDITOR_MAJOR_VERSION}")
SET(CPACK_PACKAGE_VERSION_MINOR "${JPSEDITOR_MINOR_VERSION}")
SET(CPACK_PACKAGE_VERSION_PATCH "${JPSEDITOR_PATCH_VERSION}")
SET(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${JPSEDITOR_VERSION}")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${JPSEDITOR_VERSION}")
#SET(CPACK_DEBIAN_PACKAGE_DEPENDS " Boost (>= 1.59) ")
SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
SET( CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://jupedsim.org")
SET(CPACK_DEBIAN_PACKAGE_SUGGESTS, "jpsvis, jpsreport, jpscor")
SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
SET(CPACK_DEBIAN_PACKAGE_SECTION "science")
SET(CPACK_DEBIAN_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
endif()
include(CPack)
# message (STATUS "bin ins" ${BIN_INSTALL_DIR})
set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION "${BIN_INSTALL_DIR}")
include(InstallRequiredSystemLibraries)
if(APPLE)
set(EXECUTABLE "${PROJECT_NAME}.app")
elseif(WIN32)
set(EXECUTABLE "${PROJECT_NAME}${CMAKE_EXECUTABLE_SUFFIX}")
else()
set(EXECUTABLE "${BIN_INSTALL_DIR}/${PROJECT_NAME}${CMAKE_EXECUTABLE_SUFFIX}")
set(CPACK_GENERATOR "DragNDrop")
set(CPACK_DMG_FORMAT "UDBZ")
set(CPACK_DMG_VOLUME_NAME "${PROJECT_NAME}")
set(CPACK_SYSTEM_NAME "OSX")
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${JPSEDITOR_VERSION}")
#set(CPACK_PACKAGE_ICON "${ICONS_DIR}/DMG.icns")
#set(CPACK_DMG_DS_STORE "${ICONS_DIR}/DMGDSStore")
#set(CPACK_DMG_BACKGROUND_IMAGE "${ICONS_DIR}/DMGBackground.png")
elseif(UNIX)
# tested with success in
# Linux dhcppc5 3.2.0-4-686-pae #1 SMP Debian 3.2.68-1+deb7u2 i686 GNU/Linux
set(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
SET(CPACK_GENERATOR "DEB")
SET(CPACK_PACKAGE_DESCRIPTION "simulation core of JuPedSim")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Geometry editor of JuPedSim, a framework for simulation and analysis of pedestrian dynamics")
#SET(CPACK_PACKAGE_VENDOR "nowardev")
SET(CPACK_PACKAGE_CONTACT "m.chraibi@fz-juelich.de")
SET(CPACK_PACKAGE_VERSION_MAJOR "${JPSEDITOR_MAJOR_VERSION}")
SET(CPACK_PACKAGE_VERSION_MINOR "${JPSEDITOR_MINOR_VERSION}")
SET(CPACK_PACKAGE_VERSION_PATCH "${JPSEDITOR_PATCH_VERSION}")
SET(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${JPSEDITOR_VERSION}")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${JPSEDITOR_VERSION}")
#SET(CPACK_DEBIAN_PACKAGE_DEPENDS " Boost (>= 1.59) ")
SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
SET( CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://jupedsim.org")
SET(CPACK_DEBIAN_PACKAGE_SUGGESTS, "jpsvis, jpsreport, jpscore")
SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
SET(CPACK_DEBIAN_PACKAGE_SECTION "science")
SET(CPACK_DEBIAN_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
endif()
# if(APPLE OR WIN32)
# if(${QT4_INSTALLED})
# include(DeployQt4)
# install_qt4_executable("${EXECUTABLE}" "qsqlite")
# elseif(${QT5_INSTALLED})
# include(DeployQt5)
# install_qt5_executable("${EXECUTABLE}" "qsqlite")
# endif()
# endif()
include(CPack)
<?xml version="1.0" ?><svg height="32px" version="1.1" viewBox="0 0 32 32" width="32px" xmlns="http://www.w3.org/2000/svg" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" xmlns:xlink="http://www.w3.org/1999/xlink"><title/><desc/><defs/><g fill="none" fill-rule="evenodd" id="Page-1" stroke="none" stroke-width="1"><g fill="#000000" id="icon-44-one-finger-swipe"><path d="M20.9719734,14 L27.049999,14 L23.799999,10.75 L24.549999,10 L29.049999,14.5 L24.549999,19 L23.799999,18.25 L27.049999,15 L27.049999,15 L21,15 L21,31 L12,31 L12,15 L5.950001,15 L5.950001,15 L9.200001,18.25 L8.450001,19 L3.950001,14.5 L8.450001,10 L9.200001,10.75 L5.950001,14 L12.0278925,14 C12.2600811,11.9115065 13.9154776,10.2577821 16,10.0274511 L16,3.950001 L16,3.950001 L12.75,7.200001 L12,6.450001 L16.5,1.950001 L21,6.450001 L20.25,7.200001 L17,3.950001 L17,10.0275945 C19.0806613,10.2586377 20.7390274,11.9142645 20.9719734,14 L20.9719734,14 L20.9719734,14 Z M16.5,11 C14.5670034,11 13,12.5710144 13,14.5070349 L13,30 L20,30 L20,14.5070349 C20,12.570153 18.4290634,11 16.5,11 L16.5,11 Z M16.5,12 C15.1192881,12 14,13.1285541 14,14.5097752 L14,18 L19,18 L19,14.5097752 C19,13.1236646 17.8903379,12 16.5,12 L16.5,12 Z M16.5,13 C15.6715729,13 15,13.6785455 15,14.5008327 L15,17 L18,17 L18,14.5008327 C18,13.6719457 17.3342028,13 16.5,13 L16.5,13 Z M14,21 L14,22 L19,22 L19,21 L14,21 L14,21 Z M14,23 L14,24 L19,24 L19,23 L14,23 L14,23 Z" id="one-finger-swipe"/></g></g></svg>
\ No newline at end of file
......@@ -57,5 +57,6 @@
<file>Icons/rotate.png</file>
<file>Icons/plus.svg</file>
<file>Icons/landmark.svg</file>
<file>Icons/moved_hand.svg</file>
</qresource>
</RCC>
......@@ -4,10 +4,12 @@ RED='\033[0;31m'
NC='\033[0m' # No Color
#Version=0.8.4
CMD=jpseditor
#Change Build folder before running script
release=Repos/jpseditor/qmake-build-release
#echo "INFO: running dynlibbundler .."
#dylibbundler -od -b -x ../bin/${CMD}.app/Contents/MacOS/${CMD} -d ../bin/${CMD}.app/Contents/libs/
echo "INFO: running macdeployqt .."
macdeployqt ./qmake-build-release//${CMD}.app -dmg
macdeployqt ${release}/JPSeditor.app -dmg
......@@ -65,6 +65,7 @@
<addaction name="actiongridmode"/>
<addaction name="actionShow_Point_of_Origin"/>
<addaction name="actionRotate_90_deg_clockwise"/>
<addaction name="actionPanning_Mode"/>
<addaction name="separator"/>
<addaction name="actionanglesnap"/>
<addaction name="actionObjectsnap"/>
......@@ -123,6 +124,7 @@
<addaction name="separator"/>
<addaction name="actiongridmode"/>
<addaction name="actionObjectsnap"/>
<addaction name="actionPanning_Mode"/>
<addaction name="separator"/>
<addaction name="actionRoom"/>
</widget>
......@@ -370,6 +372,9 @@
<property name="toolTip">
<string>Select Mode</string>
</property>
<property name="shortcut">
<string>Meta+S</string>
</property>
<property name="iconVisibleInMenu">
<bool>true</bool>
</property>
......@@ -484,7 +489,7 @@
<string>Orthomode</string>
</property>
<property name="shortcut">
<string>Meta+S</string>
<string>Meta+A</string>
</property>
<property name="iconVisibleInMenu">
<bool>true</bool>
......@@ -684,6 +689,21 @@
<string>Online Help</string>
</property>
</action>
<action name="actionPanning_Mode">
<property name="icon">
<iconset resource="../Resources/resources.qrc">
<normaloff>:/inAppIcons/Icons/moved_hand.svg</normaloff>:/inAppIcons/Icons/moved_hand.svg</iconset>
</property>
<property name="text">
<string>Panning Mode</string>
</property>
<property name="shortcut">
<string>Ctrl+Shift+P</string>
</property>
<property name="iconVisibleInMenu">
<bool>true</bool>
</property>
</action>
</widget>
<resources>
<include location="../Resources/resources.qrc"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SettingDialog</class>
<widget class="QDialog" name="SettingDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>318</width>
<height>480</height>
</rect>
</property>
<property name="windowTitle">
<string>Setting</string>
</property>
<widget class="QTabWidget" name="tabWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>301</width>
<height>461</height>
</rect>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="backupTab">
<attribute name="title">
<string>Backup</string>
</attribute>
<widget class="QWidget" name="horizontalLayoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>0</y>
<width>271</width>
<height>31</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">