Commits

Vincent Rabeux committed 63cd7b2

Compilation on windows 7 with VS2008

Comments (0)

Files changed (13)

documentImageCreator/src/framework/DocumentCreator/context/CurrentRandomDocumentContext.h

 
 namespace Context {
 
-    class FRAMEWORK_EXPORT CurrentRandomDocumentContext : public Patterns::Singleton<CurrentRandomDocumentContext>
+    class CurrentRandomDocumentContext : public Patterns::Singleton<CurrentRandomDocumentContext>
     {
     public:
         CurrentRandomDocumentContext(){}

documentImageCreator/src/framework/DocumentCreator/iomanager/cmdlineparser.h

 #include <QMap>
 #include <QString>
 
+#include <DocumentCreator/framework_global.h>
+
 namespace IOManager
 {
-    class CmdLineParser
+	class FRAMEWORK_EXPORT CmdLineParser
     {
     public:
         CmdLineParser(QString input);

documentImageCreator/src/framework/DocumentCreator/models/doc/node.h

 namespace Doc
 {
     template< class T >
-    class FRAMEWORK_EXPORT Node : public Element
+    class Node : public Element
     {
     public:
         Node(Document* document);

documentImageCreator/src/framework/DocumentCreator/models/doc/nodeofleafs.h

 namespace Doc
 {
     template< class T >
-    class FRAMEWORK_EXPORT NodeOfLeafs : public Node< T >
+    class NodeOfLeafs : public Node< T >
     {
     public:
         NodeOfLeafs(Document* document);

documentImageCreator/src/framework/DocumentCreator/models/doc/nodeofnodes.h

 namespace Doc
 {
     template< class T >
-    class FRAMEWORK_EXPORT NodeOfNodes : public Node< T >
+    class NodeOfNodes : public Node< T >
     {
     public:
         NodeOfNodes(Document* document);

documentImageCreator/src/framework/DocumentCreator/mvc/iview.h

 #include "icontroller.h"
 
 namespace Mvc {
-    class FRAMEWORK_EXPORT IView
+    class IView
     {
     public:
         virtual void keyPressEvent(QKeyEvent * event) = 0;

documentImageCreator/src/framework/DocumentCreator/patterns/singleton.h

 
 namespace Patterns {
     template<class T>
-    class FRAMEWORK_EXPORT Singleton  {
+    class Singleton  {
     public :
             static T* instance()
             {

documentImageCreator/src/gui/AncientDocumentEditor/CMakeLists.txt

 SET( QT_USE_QTNETWORK TRUE )
   
 
-FIND_LIBRARY(Lipsum4Qt_LIBRARIES Lipsum4Qt)
+FIND_PACKAGE(Lipsum4Qt REQUIRED)
+include_directories(${Lipsum4Qt_INCLUDE_DIRS})
 
-FIND_LIBRARY(DocumentCreator_LIBRARIES DocumentCreator REQUIRED)
-include_directories(/usr/local/include/DocumentCreator REQUIRED)
+FIND_PACKAGE(DocumentCreator REQUIRED)
+include_directories(${DocumentCreator_INCLUDE_DIRS})
 
 INCLUDE( ${QT_USE_FILE} )
 

documentImageCreator/src/gui/AncientDocumentEditor/cmake/Modules/FindDocumentCreator.cmake

 
 include(LibFindMacros)
 
+if (DocumentCreator_INCLUDE_DIR AND DocumentCreator_LIBRARY)
 
-# Use pkg-config to get hints about paths
-libfind_pkg_check_modules(DocumentCreator_PKGCONF DocumentCreator)
+  # Already in cache
+  set (DocumentCreator_FOUND TRUE)
 
-# Include dir
-find_path(DocumentCreator_INCLUDE_DIR DocumentCreator
-  PATHS ${DocumentCreator_PKGCONF_INCLUDE_DIRS}
-)
+else (DocumentCreator_INCLUDE_DIR AND DocumentCreator_LIBRARY)
 
-# Finally the library itself
-find_library(DocumentCreator_LIBRARY DocumentCreator
-  PATHS ${DocumentCreator_PKGCONF_LIBRARY_DIRS}
-)
+	if(NOT WIN32)
+		# Use pkg-config to get hints about paths
+		libfind_pkg_check_modules(DocumentCreator_PKGCONF DocumentCreator)
+    endif()
+	
+	if(WIN32)
+		# the hints
+		SET(DocumentCreator_POSSIBLE_ROOT_DIRS
+			"$ENV{DOQUBOOK_ROOT_DIR}"
+			"$ENV{SystemDrive}/DocumentCreator"                    
+			"$ENV{SystemDrive}/Program Files/DocumentCreator"       
+			"$ENV{SystemDrive}/Program Files (x86)/DocumentCreator"
+        )
+		# find the right and only path
+		FIND_PATH(DocumentCreator_ROOT_DIR
+          NAMES include/DocumentCreator/core.h
+          PATHS ${DocumentCreator_POSSIBLE_ROOT_DIRS}
+        )
+	
+		# libs and includes
+		SET(DocumentCreator_LIB_SEARCH_PATH 
+				"${DocumentCreator_ROOT_DIR}/bin"
+				"${DocumentCreator_ROOT_DIR}/lib"
+		)
+		SET(DocumentCreator_INCLUDE_SEARCH_PATH "${DocumentCreator_ROOT_DIR}/include")
+	endif()
+	
+	message(Looking lib in  ${DocumentCreator_LIB_SEARCH_PATH})
+	find_library (DocumentCreator_LIBRARIES
+		NAMES
+		DocumentCreator
+		PATHS
+		${PC_DocumentCreator_LIBRARY_DIRS}
+		${DocumentCreator_FRAMEWORKS}
+		${LIB_INSTALL_DIR}  
+		${DocumentCreator_LIB_SEARCH_PATH}
+		${DocumentCreator_PKGCONF_LIBRARY_DIRS}
+	)
+
+
+	find_path (DocumentCreator_INCLUDE_DIR
+		NAMES
+		DocumentCreator/core.h
+		PATHS
+		${PC_DocumentCreator_INCLUDE_DIRS}
+		${INCLUDE_INSTALL_DIR}
+		${DocumentCreator_FRAMEWORKS}
+		${DocumentCreator_INCLUDE_SEARCH_PATH}
+		${DocumentCreator_PKGCONF_INCLUDE_DIRS}
+	)
+	
+	include(FindPackageHandleStandardArgs)
+	find_package_handle_standard_args(DocumentCreator DEFAULT_MSG DocumentCreator_LIBRARIES DocumentCreator_INCLUDE_DIR)
+
+
+endif(DocumentCreator_INCLUDE_DIR AND DocumentCreator_LIBRARY)
+
+set(DocumentCreator_INCLUDE_DIRS ${DocumentCreator_INCLUDE_DIRS} ${DocumentCreator_INCLUDE_DIR})
+set(DocumentCreator_LIBRARIES ${DocumentCreator_LIBRARIES} ${DocumentCreator_LIBRARIES})
 
 # Set the include dir variables and the libraries and let libfind_process do the rest.
 # NOTE: Singular variables for this library, plural for libraries this this lib depends on.
-set(DocumentCreator_PROCESS_INCLUDES DocumentCreator_INCLUDE_DIR DocumentCreator_INCLUDE_DIRS)
-set(DocumentCreator_PROCESS_LIBS DocumentCreator_LIBRARY DocumentCreator_LIBRARIES)
-libfind_process(DocumentCreator)
+#set(DocumentCreator_PROCESS_INCLUDES DocumentCreator_INCLUDE_DIR DocumentCreator_INCLUDE_DIRS)
+#set(DocumentCreator_PROCESS_LIBS DocumentCreator_LIBRARY DocumentCreator_LIBRARIES)
+#libfind_process(DocumentCreator)
+
+MARK_AS_ADVANCED(DocumentCreator_INCLUDE_DIRS DocumentCreator_LIBRARIES)

documentImageCreator/src/gui/AncientDocumentEditor/src/Utils/RandomElement.hpp

 #define RANDOMELEMENT_HPP
 
 #include <QObject>
-#include <cstdlib>
+#include <stdlib.h>
+#include <time.h>
 
 class RandomElement : public QObject
 {

documentImageCreator/src/gui/AncientDocumentEditor/src/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
+#ifndef APPCONSTANTS_H
+#define APPCONSTANTS_H
+
+const QString AppConfigFile = "C:/Program Files/AncientDocumentEditor/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

documentImageCreator/src/gui/AncientDocumentEditor/src/application.ini

-[mainapp]
-
-fontfolder=/usr/local/share/AncientDocumentEditor/font/
-backgroundfolder=/usr/local/share/AncientDocumentEditor/background/
-xmlcheckerfolder=/usr/local/share/AncientDocumentEditor/xmlchecker/
-documentxsdchecker=document.xsd
-defaultfont=vesale 
-defaultfontextension=.of
-defaultbackground=vesale_0002.jpg
-pagesizex=1260
-pagesizey=1782
-
-[keyboard]
-formatsfolder=/usr/local/share/AncientDocumentEditor/keyboard/
-defaultformat=fr_alternative.kb
+[mainapp]
+
+fontfolder=C:/Program Files/AncientDocumentEditor/share/AncientDocumentEditor/font/
+backgroundfolder=C:/Program Files/AncientDocumentEditor/share/AncientDocumentEditor/background/
+xmlcheckerfolder=C:/Program Files/AncientDocumentEditor/share/AncientDocumentEditor/xmlchecker/
+documentxsdchecker=document.xsd
+defaultfont=vesale 
+defaultfontextension=.of
+defaultbackground=vesale_0002.jpg
+pagesizex=1260
+pagesizey=1782
+
+[keyboard]
+formatsfolder=C:/Program Files/AncientDocumentEditor/share/AncientDocumentEditor/keyboard/
+defaultformat=fr_alternative.kb

libs/Lipsum4Qt/CMakeLists.txt

         GLOB_RECURSE
         Lipsum4Qt_headers
         src/*.h
+
 )
 
 file(
 
 
 ######## INSTALLATION
+INSTALL(FILES ${Lipsum4Qt_moc_headers} DESTINATION include/Lipsum4Qt)
 INSTALL(FILES ${Lipsum4Qt_headers} DESTINATION include/Lipsum4Qt)
 
 INSTALL(TARGETS ${LIB_NAME}
         ARCHIVE DESTINATION lib
 
   #      PRIVATE_HEADER DESTINATION share/foo-${foo_ver}/PrivateHeaders
-   #     PUBLIC_HEADER DESTINATION include/foo-${foo_ver}
+		PUBLIC_HEADER DESTINATION include/Lipsum4Qt
     #    RESOURCE DESTINATION share/foo-${foo_ver}/Resources
 )