Vincent Rabeux avatar Vincent Rabeux committed d709eee

Packaging rules.

Comments (0)

Files changed (3)

documentImageCreator/src/gui/AncientDocumentEditor/CMakeLists.txt

 #SET( CMAKE_VERBOSE_MAKEFILE ON )
 
 
+project(AncientDocumentEditor)
+
+set(AncientDocumentEditor_DESCRIPTION "GUI to create synthetics documents. Developped for the ANR-Digidoc project")
+
+set(AncientDocumentEditor_AUTHOR "Vincent Rabeux <rabeux@labri.fr>")
+set(AncientDocumentEditor_VENDOR "labri")
+
+set(AncientDocumentEditor_MAJOR_VERSION 0)
+set(AncientDocumentEditorr_MINOR_VERSION 1)
+set(AncientDocumentEditor_PATCH_VERSION 0)
+
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
 
 find_package(Qt4 4.4.3  REQUIRED )
                ${CMAKE_CURRENT_SOURCE_DIR}/src/application.ini
                @ONLY)
 
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/application.ini DESTINATION share/AncientDocumentEditor/)
+set(APPLICATION_INI_PATH ${CMAKE_INSTALL_PREFIX}/share/AncientDocumentEditor/application.ini)
+
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/src/appconstants.h.in
+               ${CMAKE_CURRENT_SOURCE_DIR}/src/appconstants.h
+               @ONLY)
 
 file(
         GLOB_RECURSE
 fixup_bundle(\"${APPS}\" \"\${PLUGINS}\" \"${DIRS}\")
 " COMPONENT Runtime)
 
-endif(APPLE)
-
 # on utilise cpack : "cpack -G DragNDrop CPackConfig.cmake" sur mac os x
 # le CPackConfig.cmake est créer par un premier cmake
 # Command osx /Applications/CMake\ 2.8-1.app/Contents/bin/cpack -G DragNDrop CPackConfig.cmake
 SET(CPACK_GENERATOR "DragNDrop")
 #set(CPACK_BINARY_DRAGNDROP ON)
+
+endif(APPLE)
+
+
+
+set(CPACK_PACKAGE_NAME AncientDocumentEditor)
+
+set(CPACK_PACKAGE_VENDOR ${AncientDocumentEditor_VENDOR})
+set(AncientDocumentEditor_VERSION ${AncientDocumentEditor_MAJOR_VERSION}.${AncientDocumentEditor_MINOR_VERSION}.${AncientDocumentEditor_PATCH_VERSION})
+SET(CPACK_PACKAGE_VERSION "${AncientDocumentEditor_VERSION}")
+SET(CPACK_PACKAGE_VERSION_MAJOR "${AncientDocumentEditor_MAJOR_VERSION}")
+SET(CPACK_PACKAGE_VERSION_MINOR "${AncientDocumentEditor_MINOR_VERSION}")
+SET(CPACK_PACKAGE_VERSION_PATCH "${AncientDocumentEditor_PATCH_VERSION}")
+set(CPACK_PACKAGE_INSTALL_DIRECTORY AncientDocumentEditor)
+SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${AncientDocumentEditor_DESCRIPTION})
+
+IF(UNIX AND NOT APPLE)
+        SET(CPACK_GENERATOR "DEB")
+        SET(CPACK_DEBIAN_PACKAGE_NAME "AncientDocumentEditor")
+        SET(CPACK_DEBIAN_PACKAGE_MAINTAINER ${AncientDocumentEditor_AUTHOR})
+        SET(CPACK_PACKAGE_CONTACT "digidoc@gmail.com")
+        Set(CPACK_PACKAGING_INSTALL_PREFIX /usr/local)
+        SET(DEB_DEPENDENCIES "libc6 (>= 2.3.1-6), libgcc1 (>= 1:3.4.2-12), libqt4-core (>=4.8.0), libqt4-gui (>=4.8.0), libopencv-dev, libdocumentcreator-dev")
+        IF(NOT DEFINED AncientDocumentEditor_DEB_DEPENDS)
+                SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${DEB_DEPENDENCIES}")
+        ENDIF(NOT DEFINED AncientDocumentEditor_DEB_DEPENDS)
+        IF(DEFINED AncientDocumentEditor_DEB_DEPENDS)
+                SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${DEB_DEPENDENCIES},${AncientDocumentEditor_DEB_DEPENDS}")
+        ENDIF(DEFINED AncientDocumentEditor_DEB_DEPENDS)
+
+        SET(CPACK_DEBIAN_PACKAGE_SECTION "devel")
+ENDIF(UNIX AND NOT APPLE)
+
+
+
+
 include(CPack)
 
 

documentImageCreator/src/gui/AncientDocumentEditor/src/ancientdocumenteditor.qrc

         <file alias="appicon">images/appicon.png</file>
         <file>images/imageblock.png</file>
         <file>images/textblock.png</file>
-        <file>application.ini</file>
     </qresource>
 </RCC>

documentImageCreator/src/gui/AncientDocumentEditor/src/appconstants.h

-#ifndef APPCONSTANTS_H
-#define APPCONSTANTS_H
-
-const QString AppConfigFile = ":/application.ini";
-
-
-/* Groups config */
-const QString AppConfigMainGroup = "mainapp" ;
-const QString AppConfigKeyBoardGroup = "keyboard";
-const QString AppConfigFontGroup = "fonteditor" ;
-const QString AppConfigDocGroup = "doceditor";
-
-/* keys */
-const QString AppConfigFontFolderKey = "fontfolder" ;
-const QString AppConfigDefaultFontKey = "defaultfont" ;
-const QString AppConfigFontExtKey = "defaultfontextension" ;
-const QString AppConfigKbFolderKey = "formatsfolder" ;
-const QString AppConfigKbDefautlFormatKey = "defaultformat";
-const QString AppConfigPageSizeX="pagesizex";
-const QString AppConfigPageSizeY="pagesizey";
-const QString AppConfigBackgdFolderKey="backgroundfolder";
-const QString AppConfigDefaultBackbg="defaultbackground";
-const QString AppConfigXmlCheckerFolderKey="xmlcheckerfolder";
-const QString AppConfigDocumentXSDCheckerKey="documentxsdchecker";
-
-/* Some app displays */
-const static QString AppTitle = "Ancient Document Editor - ";
-const static QString DefaultPath = "New old document";
-const static QString ModifiedStr = "*";
-
-#endif // APPCONSTANTS_H
+#ifndef APPCONSTANTS_H
+#define APPCONSTANTS_H
+
+const QString AppConfigFile = "/usr/local/share/AncientDocumentEditor/application.ini";
+
+
+/* Groups config */
+const QString AppConfigMainGroup = "mainapp" ;
+const QString AppConfigKeyBoardGroup = "keyboard";
+const QString AppConfigFontGroup = "fonteditor" ;
+const QString AppConfigDocGroup = "doceditor";
+
+/* keys */
+const QString AppConfigFontFolderKey = "fontfolder" ;
+const QString AppConfigDefaultFontKey = "defaultfont" ;
+const QString AppConfigFontExtKey = "defaultfontextension" ;
+const QString AppConfigKbFolderKey = "formatsfolder" ;
+const QString AppConfigKbDefautlFormatKey = "defaultformat";
+const QString AppConfigPageSizeX="pagesizex";
+const QString AppConfigPageSizeY="pagesizey";
+const QString AppConfigBackgdFolderKey="backgroundfolder";
+const QString AppConfigDefaultBackbg="defaultbackground";
+const QString AppConfigXmlCheckerFolderKey="xmlcheckerfolder";
+const QString AppConfigDocumentXSDCheckerKey="documentxsdchecker";
+
+/* Some app displays */
+const static QString AppTitle = "Ancient Document Editor - ";
+const static QString DefaultPath = "New old document";
+const static QString ModifiedStr = "*";
+
+#endif // APPCONSTANTS_H
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.