summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.bat121
-rw-r--r--configure.exebin1140736 -> 0 bytes
-rw-r--r--tools/configure/Makefile.mingw92
-rw-r--r--tools/configure/Makefile.win32157
-rw-r--r--tools/configure/configureapp.cpp22
5 files changed, 385 insertions, 7 deletions
diff --git a/configure.bat b/configure.bat
new file mode 100644
index 0000000000..e872de2797
--- /dev/null
+++ b/configure.bat
@@ -0,0 +1,121 @@
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::
+:: Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+:: Contact: http://www.qt-project.org/
+::
+:: This file is part of the tools applications of the Qt Toolkit.
+::
+:: $QT_BEGIN_LICENSE:LGPL$
+:: GNU Lesser General Public License Usage
+:: This file may be used under the terms of the GNU Lesser General Public
+:: License version 2.1 as published by the Free Software Foundation and
+:: appearing in the file LICENSE.LGPL included in the packaging of this
+:: file. Please review the following information to ensure the GNU Lesser
+:: General Public License version 2.1 requirements will be met:
+:: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+::
+:: In addition, as a special exception, Nokia gives you certain additional
+:: rights. These rights are described in the Nokia Qt LGPL Exception
+:: version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+::
+:: GNU General Public License Usage
+:: Alternatively, this file may be used under the terms of the GNU General
+:: Public License version 3.0 as published by the Free Software Foundation
+:: and appearing in the file LICENSE.GPL included in the packaging of this
+:: file. Please review the following information to ensure the GNU General
+:: Public License version 3.0 requirements will be met:
+:: http://www.gnu.org/copyleft/gpl.html.
+::
+:: Other Usage
+:: Alternatively, this file may be used in accordance with the terms and
+:: conditions contained in a signed written agreement between you and Nokia.
+::
+::
+::
+::
+::
+::
+:: $QT_END_LICENSE$
+::
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+@echo off
+set QTSRC=%~dp0
+set QTDIR=%CD%
+if exist configure.exe goto conf
+echo Please wait while bootstrapping configure ...
+
+for %%C in (cl.exe icl.exe g++.exe perl.exe) do set %%C=%%~$PATH:C
+
+set nosyncqt=
+if not exist include (
+ if "%perl.exe%" == "" (
+ echo Perl not found in PATH. Aborting. >&2
+ exit /b 1
+ )
+ if not exist mkspecs (
+ md mkspecs
+ if errorlevel 1 goto exit
+ )
+ perl %QTSRC%bin\syncqt -outdir %QTDIR% %QTSRC%
+ if errorlevel 1 goto exit
+ set nosyncqt=-no-syncqt
+)
+
+if not exist src\corelib\global\qconfig.h (
+ if not exist src\corelib\global (
+ md src\corelib\global
+ if errorlevel 1 goto exit
+ )
+ echo #define Q_BIG_ENDIAN 4321 > src\corelib\global\qconfig.h
+ echo #define Q_LITTLE_ENDIAN 1234 >> src\corelib\global\qconfig.h
+ echo #define Q_BYTE_ORDER Q_LITTLE_ENDIAN >> src\corelib\global\qconfig.h
+)
+
+if not exist tools\configure (
+ md tools\configure
+ if errorlevel 1 goto exit
+)
+cd tools\configure
+if errorlevel 1 goto exit
+
+echo #### Generated by configure.bat - DO NOT EDIT! ####> Makefile
+echo/>> Makefile
+for /f "tokens=3 usebackq" %%V in (`findstr QT_VERSION_STR %QTSRC%\src\corelib\global\qglobal.h`) do @echo QTVERSION = %%~V>> Makefile
+if not "%cl.exe%" == "" (
+ echo CXX = cl>>Makefile
+ echo EXTRA_CXXFLAGS =>>Makefile
+ rem This must have a trailing space.
+ echo QTSRC = %QTSRC% >> Makefile
+ set tmpl=win32
+ set make=nmake
+) else if not "%icl.exe%" == "" (
+ echo CXX = icl>>Makefile
+ echo EXTRA_CXXFLAGS = /Zc:forScope>>Makefile
+ rem This must have a trailing space.
+ echo QTSRC = %QTSRC% >> Makefile
+ set tmpl=win32
+ set make=nmake
+) else if not "%g++.exe%" == "" (
+ echo CXX = g++>>Makefile
+ echo EXTRA_CXXFLAGS =>>Makefile
+ rem This must NOT have a trailing space.
+ echo QTSRC = %QTSRC:\=/%>> Makefile
+ set tmpl=mingw
+ set make=mingw32-make
+) else (
+ echo No suitable compiler found in PATH. Aborting. >&2
+ cd ..\..
+ exit /b 1
+)
+echo/>> Makefile
+type %QTSRC%tools\configure\Makefile.%tmpl% >> Makefile
+
+%make%
+if errorlevel 1 (cd ..\.. & exit /b 1)
+
+cd ..\..
+
+:conf
+configure.exe -srcdir %QTSRC% %nosyncqt% %*
+:exit
diff --git a/configure.exe b/configure.exe
deleted file mode 100644
index 86dca34c9d..0000000000
--- a/configure.exe
+++ /dev/null
Binary files differ
diff --git a/tools/configure/Makefile.mingw b/tools/configure/Makefile.mingw
new file mode 100644
index 0000000000..5951cb4e92
--- /dev/null
+++ b/tools/configure/Makefile.mingw
@@ -0,0 +1,92 @@
+CORESRC = $(QTSRC)src/corelib
+TOOLSRC = $(QTSRC)tools
+CONFSRC = $(TOOLSRC)/configure
+
+RAW_PCH = configure_pch.h
+PCH = $(RAW_PCH).gch/c++
+CXX = g++
+DEFINES = -DUNICODE -DQT_NODLL -DQT_NO_DATASTREAM -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DCOMMERCIAL_VERSION
+INCPATH = -I"../../include" -I"../../include/QtCore" -I"../../include/QtCore/$(QTVERSION)" -I"../../include/QtCore/$(QTVERSION)/QtCore" -I"$(TOOLSRC)/shared" -I"$(QTSRC)mkspecs/win32-g++"
+CXXFLAGS_BARE = -fno-rtti -fno-exceptions -mthreads -Wall -Wextra $(DEFINES) $(INCPATH)
+CXXFLAGS = -include $(RAW_PCH) $(CXXFLAGS_BARE)
+LINK = g++
+LFLAGS = -Wl,-subsystem,console -mthreads
+LIBS = -lole32 -ladvapi32 -luuid
+
+TARGET = ../../configure.exe
+
+OBJECTS = \
+ main.o \
+ configureapp.o \
+ environment.o \
+ tools.o \
+ qbytearray.o \
+ qbytearraymatcher.o \
+ qhash.o \
+ qlist.o \
+ qlocale.o \
+ qlocale_win.o \
+ qlocale_tools.o \
+ qvector.o \
+ qutfcodec.o \
+ qtextcodec.o \
+ qglobal.o \
+ qnumeric.o \
+ qbuffer.o \
+ qdatastream.o \
+ qdir.o \
+ qdiriterator.o \
+ qfile.o \
+ qfileinfo.o \
+ qabstractfileengine.o \
+ qfilesystementry.o \
+ qfilesystemengine.o \
+ qfilesystemengine_win.o \
+ qfilesystemiterator_win.o \
+ qfsfileengine.o \
+ qfsfileengine_win.o \
+ qfsfileengine_iterator.o \
+ qiodevice.o \
+ qtextstream.o \
+ qlogging.o \
+ qtemporaryfile.o \
+ qsystemlibrary.o \
+ qbitarray.o \
+ qdatetime.o \
+ qmap.o \
+ qregexp.o \
+ qstring.o \
+ qstringlist.o \
+ qvsnprintf.o \
+ qvariant.o \
+ qsystemerror.o \
+ qurl.o \
+ qmetatype.o \
+ qmalloc.o \
+ qxmlstream.o \
+ qxmlutils.o \
+ quuid.o \
+ qcryptographichash.o \
+ registry.o
+
+$(TARGET): $(OBJECTS)
+ $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)
+
+$(OBJECTS): $(PCH)
+
+CHK_DIR_EXISTS = test -d
+MKDIR=mkdir -p
+$(PCH): $(CONFSRC)/configure_pch.h
+ @$(CHK_DIR_EXISTS) $(RAW_PCH).gch || $(MKDIR) $(RAW_PCH).gch
+ $(CXX) -x c++-header -c $(CXXFLAGS_BARE) -o $@ $<
+
+VPATH = $(CONFSRC):$(TOOLSRC)/shared/windows:$(CORESRC)/global:$(CORESRC)/kernel:$(CORESRC)/tools:$(CORESRC)/codecs:$(CORESRC)/io:$(CORESRC)/xml:$(CORESRC)/plugin
+
+main.o: $(CONFSRC)/configureapp.h
+configureapp.o: $(CONFSRC)/configureapp.h $(CONFSRC)/environment.h $(CONFSRC)/tools.h
+environment.o: $(CONFSRC)/environment.h
+tools.o: $(CONFSRC)/tools.h
+
+clean:
+ -rm -f *.o
+ -rm -rf *.gch
diff --git a/tools/configure/Makefile.win32 b/tools/configure/Makefile.win32
new file mode 100644
index 0000000000..92de55f137
--- /dev/null
+++ b/tools/configure/Makefile.win32
@@ -0,0 +1,157 @@
+CORESRC = $(QTSRC)src\corelib
+TOOLSRC = $(QTSRC)tools
+CONFSRC = $(TOOLSRC)\configure
+
+PCH = configure_pch.pch
+DEFINES = -DUNICODE -DQT_NODLL -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DCOMMERCIAL_VERSION
+INCPATH = -I"..\..\include" -I"..\..\include\QtCore" -I"..\..\include\QtCore\$(QTVERSION)" -I"..\..\include\QtCore\$(QTVERSION)\QtCore" -I"$(TOOLSRC)\shared" -I"$(QTSRC)mkspecs\win32-msvc2008"
+CXXFLAGS_BARE = -nologo -Zm200 -Zc:wchar_t -MT -W3 -GR -EHsc -w34100 -w34189 $(EXTRA_CXXFLAGS) $(DEFINES) $(INCPATH)
+CXXFLAGS = -FIconfigure_pch.h -Yuconfigure_pch.h -Fp$(PCH) -MP $(CXXFLAGS_BARE)
+LINK = link
+LFLAGS = /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST /MANIFESTFILE:"configure.intermediate.manifest"
+LIBS = ole32.lib advapi32.lib
+
+TARGET = ..\..\configure.exe
+
+OBJECTS = \
+ main.obj \
+ configureapp.obj \
+ environment.obj \
+ tools.obj \
+ qbytearray.obj \
+ qbytearraymatcher.obj \
+ qhash.obj \
+ qlist.obj \
+ qlocale.obj \
+ qlocale_win.obj \
+ qlocale_tools.obj \
+ qvector.obj \
+ qutfcodec.obj \
+ qtextcodec.obj \
+ qglobal.obj \
+ qnumeric.obj \
+ qbuffer.obj \
+ qdatastream.obj \
+ qdir.obj \
+ qdiriterator.obj \
+ qfile.obj \
+ qfileinfo.obj \
+ qabstractfileengine.obj \
+ qfilesystementry.obj \
+ qfilesystemengine.obj \
+ qfilesystemengine_win.obj \
+ qfilesystemiterator_win.obj \
+ qfsfileengine.obj \
+ qfsfileengine_win.obj \
+ qfsfileengine_iterator.obj \
+ qiodevice.obj \
+ qtextstream.obj \
+ qlogging.obj \
+ qtemporaryfile.obj \
+ qsystemlibrary.obj \
+ qbitarray.obj \
+ qdatetime.obj \
+ qmap.obj \
+ qregexp.obj \
+ qstring.obj \
+ qstringlist.obj \
+ qvsnprintf.obj \
+ qvariant.obj \
+ qsystemerror.obj \
+ qurl.obj \
+ qmetatype.obj \
+ qmalloc.obj \
+ qxmlstream.obj \
+ qxmlutils.obj \
+ quuid.obj \
+ qcryptographichash.obj \
+ registry.obj
+
+$(TARGET): $(OBJECTS)
+ $(LINK) $(LFLAGS) /OUT:$(TARGET) @<<
+ $(OBJECTS) $(LIBS)
+<<
+ mt.exe -nologo -manifest "configure.intermediate.manifest" -outputresource:$(TARGET);1
+
+clean:
+ -del *.obj
+ -del *.pch
+ -del configure.intermediate.manifest
+
+$(PCH): $(CONFSRC)\configure_pch.h
+ $(CXX) -c -Yc $(CXXFLAGS_BARE) -Fp$@ -Foconfigure_pch.obj -TP $**
+
+main.obj: $(CONFSRC)\main.cpp $(CONFSRC)\configureapp.h $(PCH)
+configureapp.obj: $(CONFSRC)\configureapp.cpp $(CONFSRC)\configureapp.h $(CONFSRC)\environment.h $(CONFSRC)\tools.h $(PCH)
+environment.obj: $(CONFSRC)\environment.cpp $(CONFSRC)\environment.h $(PCH)
+tools.obj: $(CONFSRC)\tools.cpp $(CONFSRC)\tools.h $(PCH)
+registry.obj: $(TOOLSRC)\shared\windows\registry.cpp $(PCH)
+qbytearray.obj: $(CORESRC)\tools\qbytearray.cpp $(PCH)
+qbytearraymatcher.obj: $(CORESRC)\tools\qbytearraymatcher.cpp $(PCH)
+qhash.obj: $(CORESRC)\tools\qhash.cpp $(PCH)
+qlist.obj: $(CORESRC)\tools\qlist.cpp $(PCH)
+qlocale.obj: $(CORESRC)\tools\qlocale.cpp $(PCH)
+qlocale_win.obj: $(CORESRC)\tools\qlocale_win.cpp $(PCH)
+qlocale_tools.obj: $(CORESRC)\tools\qlocale_tools.cpp $(PCH)
+qvector.obj: $(CORESRC)\tools\qvector.cpp $(PCH)
+qutfcodec.obj: $(CORESRC)\codecs\qutfcodec.cpp $(PCH)
+qtextcodec.obj: $(CORESRC)\codecs\qtextcodec.cpp $(PCH)
+qglobal.obj: $(CORESRC)\global\qglobal.cpp $(PCH)
+qnumeric.obj: $(CORESRC)\global\qnumeric.cpp $(PCH)
+qbuffer.obj: $(CORESRC)\io\qbuffer.cpp $(PCH)
+qdatastream.obj: $(CORESRC)\io\qdatastream.cpp $(PCH)
+qdir.obj: $(CORESRC)\io\qdir.cpp $(PCH)
+qdiriterator.obj: $(CORESRC)\io\qdiriterator.cpp $(PCH)
+qfile.obj: $(CORESRC)\io\qfile.cpp $(PCH)
+qfileinfo.obj: $(CORESRC)\io\qfileinfo.cpp $(PCH)
+qabstractfileengine.obj: $(CORESRC)\io\qabstractfileengine.cpp $(PCH)
+qfilesystementry.obj: $(CORESRC)\io\qfilesystementry.cpp $(PCH)
+qfilesystemengine.obj: $(CORESRC)\io\qfilesystemengine.cpp $(PCH)
+qfilesystemengine_win.obj: $(CORESRC)\io\qfilesystemengine_win.cpp $(PCH)
+qfilesystemiterator_win.obj: $(CORESRC)\io\qfilesystemiterator_win.cpp $(PCH)
+qfsfileengine.obj: $(CORESRC)\io\qfsfileengine.cpp $(PCH)
+qfsfileengine_win.obj: $(CORESRC)\io\qfsfileengine_win.cpp $(PCH)
+qfsfileengine_iterator.obj: $(CORESRC)\io\qfsfileengine_iterator.cpp $(PCH)
+qiodevice.obj: $(CORESRC)\io\qiodevice.cpp $(PCH)
+qtextstream.obj: $(CORESRC)\io\qtextstream.cpp $(PCH)
+qtemporaryfile.obj: $(CORESRC)\io\qtemporaryfile.cpp $(PCH)
+qsystemlibrary.obj: $(CORESRC)\plugin\qsystemlibrary.cpp $(PCH)
+qbitarray.obj: $(CORESRC)\tools\qbitarray.cpp $(PCH)
+qdatetime.obj: $(CORESRC)\tools\qdatetime.cpp $(PCH)
+qmap.obj: $(CORESRC)\tools\qmap.cpp $(PCH)
+qregexp.obj: $(CORESRC)\tools\qregexp.cpp $(PCH)
+qstring.obj: $(CORESRC)\tools\qstring.cpp $(PCH)
+qstringlist.obj: $(CORESRC)\tools\qstringlist.cpp $(PCH)
+qvsnprintf.obj: $(CORESRC)\tools\qvsnprintf.cpp $(PCH)
+qvariant.obj: $(CORESRC)\kernel\qvariant.cpp $(PCH)
+qsystemerror.obj: $(CORESRC)\kernel\qsystemerror.cpp $(PCH)
+qurl.obj: $(CORESRC)\io\qurl.cpp $(PCH)
+qline.obj: $(CORESRC)\tools\qline.cpp $(PCH)
+qsize.obj: $(CORESRC)\tools\qsize.cpp $(PCH)
+qpoint.obj: $(CORESRC)\tools\qpoint.cpp $(PCH)
+qrect.obj: $(CORESRC)\tools\qrect.cpp $(PCH)
+qmetatype.obj: $(CORESRC)\kernel\qmetatype.cpp $(PCH)
+qmalloc.obj: $(CORESRC)\global\qmalloc.cpp $(PCH)
+qxmlstream.obj: $(CORESRC)\xml\qxmlstream.cpp $(PCH)
+qxmlutils.obj: $(CORESRC)\xml\qxmlutils.cpp $(PCH)
+quuid.obj: $(CORESRC)\plugin\quuid.cpp $(PCH)
+qcryptographichash.obj: $(CORESRC)\tools\qcryptographichash.cpp $(PCH)
+
+{$(CONFSRC)}.cpp{}.obj::
+ $(CXX) -c $(CXXFLAGS) $<
+{$(TOOLSRC)\shared\windows}.cpp{}.obj::
+ $(CXX) -c $(CXXFLAGS) $<
+{$(CORESRC)\tools}.cpp{}.obj::
+ $(CXX) -c $(CXXFLAGS) $<
+{$(CORESRC)\codecs}.cpp{}.obj::
+ $(CXX) -c $(CXXFLAGS) $<
+{$(CORESRC)\global}.cpp{}.obj::
+ $(CXX) -c $(CXXFLAGS) $<
+{$(CORESRC)\io}.cpp{}.obj::
+ $(CXX) -c $(CXXFLAGS) $<
+{$(CORESRC)\kernel}.cpp{}.obj::
+ $(CXX) -c $(CXXFLAGS) $<
+{$(CORESRC)\plugin}.cpp{}.obj::
+ $(CXX) -c $(CXXFLAGS) $<
+{$(CORESRC)\xml}.cpp{}.obj::
+ $(CXX) -c $(CXXFLAGS) $<
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index fc82fe0702..3e291c2cd0 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -114,13 +114,18 @@ Configure::Configure(int& argc, char** argv)
for (i = 1; i < argc; i++)
configCmdLine += argv[ i ];
-
- // Get the path to the executable
- wchar_t module_name[MAX_PATH];
- GetModuleFileName(0, module_name, sizeof(module_name) / sizeof(wchar_t));
- QFileInfo sourcePathInfo = QString::fromWCharArray(module_name);
- sourcePath = sourcePathInfo.absolutePath();
- sourceDir = sourcePathInfo.dir();
+ if (configCmdLine.size() >= 2 && configCmdLine.at(0) == "-srcdir") {
+ sourcePath = QDir::cleanPath(configCmdLine.at(1));
+ sourceDir = QDir(sourcePath);
+ configCmdLine.erase(configCmdLine.begin(), configCmdLine.begin() + 2);
+ } else {
+ // Get the path to the executable
+ wchar_t module_name[MAX_PATH];
+ GetModuleFileName(0, module_name, sizeof(module_name) / sizeof(wchar_t));
+ QFileInfo sourcePathInfo = QString::fromWCharArray(module_name);
+ sourcePath = sourcePathInfo.absolutePath();
+ sourceDir = sourcePathInfo.dir();
+ }
buildPath = QDir::currentPath();
#if 0
const QString installPath = QString("C:\\Qt\\%1").arg(QT_VERSION_STR);
@@ -889,6 +894,9 @@ void Configure::parseCmdLine()
else if (configCmdLine.at(i) == "-internal")
dictionary[ "QMAKE_INTERNAL" ] = "yes";
+ else if (configCmdLine.at(i) == "-no-syncqt")
+ dictionary[ "SYNCQT" ] = "no";
+
else if (configCmdLine.at(i) == "-no-qmake")
dictionary[ "BUILD_QMAKE" ] = "no";
else if (configCmdLine.at(i) == "-qmake")