]> git.lyx.org Git - features.git/commitdiff
Scons: add support for msvc qt3
authorBo Peng <bpeng@lyx.org>
Wed, 16 Aug 2006 21:34:24 +0000 (21:34 +0000)
committerBo Peng <bpeng@lyx.org>
Wed, 16 Aug 2006 21:34:24 +0000 (21:34 +0000)
* src/support/package.C.in: use PATH_MAX instead of MAX_PATH
* INSTALL.scons: add instruction for building qt3 2ith msvc
* development/scons/SConstruct: use the right lib (qt-mt3) and manifest file

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14709 a592a061-630c-0410-9148-cb99ea01b6c8

INSTALL.scons
development/scons/SConstruct
src/support/package.C.in

index 3f5056feda8ce52411141e8db3bb6aaa5a54478f..f8d1d7b375f5fd19a80f585f396af3f9706b40c7 100644 (file)
@@ -292,7 +292,12 @@ To build lyx with msvc, you should
     directories in VCProjectEngine.dll.express.config, as suggested in
     http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/.
 
-  * build qt4
+  * build qt3 
+    - download qt3 source from Q../Free sourceforge.net website (not from 
+      trolltech).
+    - compile qt3 as instructed
+
+    or qt4
     - download qt4 source from trolltech (not the binary version, which
       only works with mingw)
     - get q../free patch for qt4
index 5ac2f53f8f63200c372277548e9b9363cbc221f8..88cfb31adbdb567e52e8c1d1d6d7d0172dc922b4 100644 (file)
@@ -680,7 +680,9 @@ if not fast_start:
     #
     # qt3 does not use pkg_config
     if frontend == 'qt3':
-        if not conf.CheckLibWithHeader('qt-mt', 'qapp.h', 'c++', 'QApplication qapp();'):
+        # windows lib name is qt-mt3
+        if not conf.CheckLibWithHeader('qt-mt', 'qapp.h', 'c++', 'QApplication qapp();') \
+            and not conf.CheckLibWithHeader('qt-mt3', 'qapp.h', 'c++', 'QApplication qapp();'):
             print 'Did not find qt libraries, exiting!'
             Exit(1)
     elif frontend == 'qt4':
@@ -714,10 +716,13 @@ if not fast_start:
 
 # now, if msvc2005 is used, we will need that QT_LIB_PATH/QT_LIB.manifest file
 if use_vc:
-    if mode == 'debug':
-        manifest = os.path.join(qt_lib_path, 'QtGuid4.dll.manifest')
-    else:
-        manifest = os.path.join(qt_lib_path, 'QtGui4.dll.manifest')
+    if frontend == 'qt3':
+        manifest = os.path.join(qt_lib_path, 'qt-mt3.dll.manifest')
+    elif frontend == 'qt4':
+        if mode == 'debug':
+            manifest = os.path.join(qt_lib_path, 'QtGuid4.dll.manifest')
+        else:
+            manifest = os.path.join(qt_lib_path, 'QtGui4.dll.manifest')
     if os.path.isfile(manifest):
         env['LINKCOM'] = [env['LINKCOM'], 'mt.exe /MANIFEST %s /outputresource:$TARGET;1' % manifest]
 
@@ -903,7 +908,6 @@ if not fast_start or not os.path.isfile(boost_config_h) \
 #define BOOST_ENABLE_ASSERT_HANDLER 1
 
 #define BOOST_DISABLE_THREADS 1
-#define BOOST_NO_WREGEX 1
 #define BOOST_NO_WSTRING 1
 
 #ifdef __CYGWIN__
@@ -1300,8 +1304,11 @@ env = conf.Finish()
 # in their respective directory and specialized env.
 if frontend == 'qt3':
     # note: env.Tool('qt') my set QT_LIB to qt
-    qt_libs = ['qt-mt']
-    frontend_libs = ['qt-mt']
+    if platform_name == 'win32':
+        qt_libs = ['qt-mt']
+    else:
+        qt_libs = ['qt-mt3']
+    frontend_libs = qt_libs
 elif frontend == 'qt4':
     qt_libs = ['QtCore', 'QtGui']
     # set the right lib names
index dd35c5d969834eb2c29f2657a88816b58570591a..a81f33dc0c04501033a2163ae89e5441b265a4db 100644 (file)
 # include <CoreServices/CoreServices.h> // FSFindFolder, FSRefMakePath
 #endif
 
-#ifndef PATH_MAX
-# define PATH_MAX 256
-#endif
-
 using std::string;
 
 namespace fs = boost::filesystem;
@@ -361,8 +357,8 @@ string const get_temp_dir()
 {
 #if defined (USE_WINDOWS_PACKAGING)
        // Typical example: C:/TEMP/.
-       char path[PATH_MAX];
-       GetTempPath(PATH_MAX, path);
+       char path[MAX_PATH];
+       GetTempPath(MAX_PATH, path);
        return os::internal_path(path);
 #else // Posix-like.
        return "/tmp";