diff --git a/cmake/LinuxPackage.cmake b/cmake/LinuxPackage.cmake index 700c530f..6091ec7d 100644 --- a/cmake/LinuxPackage.cmake +++ b/cmake/LinuxPackage.cmake @@ -4,45 +4,40 @@ # ) INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/bin/app/data - DESTINATION share/coati/.config/coati + DESTINATION coati/data PATTERN "log/*" EXCLUDE - PATTERN "projects" EXCLUDE + PATTERN "projects/ingored" EXCLUDE PATTERN "src" EXCLUDE PATTERN "ApplicationSettings.xml" EXCLUDE - PATTERN "ApplicationSettings_distr.xml" EXCLUDE + PATTERN "ApplicationSettings_for_package.xml" EXCLUDE PATTERN "ProjectSettings_template.xml" EXCLUDE PATTERN "ApplicationSettings_template.xml" EXCLUDE ) -INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/bin/app/data/src/tictactoe - DESTINATION share/coati/.config/coati/data/projects - ) - -INSTALL(FILES ${CMAKE_SOURCE_DIR}/bin/app/data/projects/tictactoe.xml - DESTINATION share/coati/.config/coati/data/projects/tictactoe - ) - -INSTALL(FILES ${CMAKE_SOURCE_DIR}/bin/app/data/ApplicationSettings_distr.xml - DESTINATION share/coati/.config/coati/data +INSTALL(FILES ${CMAKE_SOURCE_DIR}/bin/app/data/ApplicationSettings_for_package.xml + DESTINATION coati/data RENAME ApplicationSettings.xml) INSTALL(FILES ${CMAKE_SOURCE_DIR}/setup/Linux/coati.desktop - DESTINATION share/applications + DESTINATION applications ) INSTALL(FILES ${CMAKE_SOURCE_DIR}/bin/app/data/gui/icon/logo_1024_1024.png - DESTINATION share/icons + DESTINATION icons RENAME coati.png) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/web/coati_manual.pdf + DESTINATION coati) + INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/setup/Linux/lib - DESTINATION share/coati + DESTINATION coati ) INSTALL(FILES ${CMAKE_SOURCE_DIR}/setup/Linux/libqxcb.so - DESTINATION share/coati/platforms + DESTINATION coati/platforms ) INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/setup/Linux/Coati.sh - DESTINATION share/coati + DESTINATION coati ) INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/setup/Linux/coati DESTINATION bin/ @@ -52,21 +47,23 @@ INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/setup/Linux/coati SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) INSTALL(TARGETS ${APP_PROJECT_NAME} - DESTINATION share/coati + DESTINATION coati ) -SET(CPACK_GENERATOR "DEB;TGZ") +# SET(CPACK_GENERATOR "DEB;TGZ") +SET(CPACK_GENERATOR "TGZ") SET(CPACK_ARCHIVE_COMPONENT_INSTALL "ON") # DEBIAN PACKAGE -SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Andreas Stallinger ") -SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64") +# SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Andreas Stallinger ") +# SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64") +# SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://coati.io") +# SET(CPACK_DEBIAN_PACKAGE_SECTION "devel") + SET(CPACK_PACKAGE_NAME "Coati") -SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://coati.io") -SET(CPACK_DEBIAN_PACKAGE_SECTION "devel") -SET(CPACK_PACKAGING_INSTALL_PREFIX "/usr/local") +SET(CPACK_PACKAGING_INSTALL_PREFIX "") SET(CPACK_PACKAGE_VERSION ${GIT_VERSION_NUMBER}) SET(CPACK_PACKAGE_EXECUTABLES "Coati") -SET(CPACK_STRIP_FILES "share/coati/Coati") +SET(CPACK_STRIP_FILES "coati/Coati") INCLUDE(CPack) diff --git a/script/build.sh b/script/build.sh index 7fa535d5..d70fa195 100755 --- a/script/build.sh +++ b/script/build.sh @@ -30,7 +30,7 @@ then elif [ "$1" = "package" ] || [ "$1" = "p" ] then ninja package -C build/Release Coati - mkdir -p distr && cp build/Release/Coati*.deb distr && cp build/Release/Coati*.tar.gz distr + mkdir -p distr && cp build/Release/Coati*.tar.gz distr #&& cp build/Release/Coati*.deb distr echo "Packages copied into the distr folder" else echo "no arguments: first argument 'release' or 'debug', second argument 'test' for tests" diff --git a/setup/Linux/Coati.sh b/setup/Linux/Coati.sh index f6a9b2d6..f0c15fd2 100755 --- a/setup/Linux/Coati.sh +++ b/setup/Linux/Coati.sh @@ -1,9 +1,11 @@ #!/bin/sh +COATI_PATH=`dirname "$0"` + if [ ! -d "${HOME}/.config/coati" ]; then # Control will enter here if $DIRECTORY doesn't exist. - cp -r /usr/local/share/coati/.config/coati ${HOME}/.config/coati + cp -r $COATI_PATH/coati/data ${HOME}/.config/coati echo "First start of Coati from this user, copy default configfiles to ~/.config/coati" fi -export LD_LIBRARY_PATH=/usr/local/share/coati/lib -cd ~/.config/coati && exec /usr/local/share/coati/Coati +export LD_LIBRARY_PATH=$COATI_PATH/coati/lib +cd ~/.config/coati && exec $COATI_PAT/coati/Coati diff --git a/src/lib/settings/ApplicationSettings.cpp b/src/lib/settings/ApplicationSettings.cpp index 81f885bb..439986a6 100644 --- a/src/lib/settings/ApplicationSettings.cpp +++ b/src/lib/settings/ApplicationSettings.cpp @@ -113,13 +113,13 @@ ApplicationSettings::ApplicationSettings() std::vector ApplicationSettings::getRecentProjects() const { - std::vector recentProjects = getPathValues("user/recent_projects/recent_project"); - std::vector::iterator iter = recentProjects.end(); - for( ; iter != recentProjects.begin(); iter--) + std::vector loadedRecentProjects = getPathValues("user/recent_projects/recent_project"); + std::vector recentProjects; + for(FilePath project : loadedRecentProjects) { - if(!(*iter).exists()) + if(project.exists()) { - recentProjects.erase(iter); + recentProjects.push_back(project); } } return recentProjects;