From d5bf2f33145c8a9e2ef8558dac26cb7136fc6816 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 10 Oct 2011 15:57:27 +0200 Subject: QtBase: Move idc to Active Qt. Remove include path to Active Qt from qt.prf. Change-Id: I476152ce56e47b573f5c835ec1347e772c4e9c3e Reviewed-on: http://codereview.qt-project.org/6355 Reviewed-by: Friedemann Kleint Sanity-Review: Qt Sanity Bot --- src/src.pro | 7 +- src/tools/idc/idc.pro | 16 --- src/tools/idc/main.cpp | 335 ------------------------------------------------- src/tools/tools.pro | 4 +- 4 files changed, 2 insertions(+), 360 deletions(-) delete mode 100644 src/tools/idc/idc.pro delete mode 100644 src/tools/idc/main.cpp (limited to 'src') diff --git a/src/src.pro b/src/src.pro index a0e504a39e..a32802d947 100644 --- a/src/src.pro +++ b/src/src.pro @@ -6,10 +6,6 @@ win32:SRC_SUBDIRS += src_winmain symbian:SRC_SUBDIRS += src_s60main !wince*:!symbian-abld:!symbian-sbsv2:include(tools/tools.pro) SRC_SUBDIRS += src_corelib -# TODO: Move idc to ActiveQt -!cross_compile { - win32:!wince*: SRC_SUBDIRS += src_tools_idc -} SRC_SUBDIRS += src_network src_sql src_gui src_xml src_widgets src_printsupport src_testlib src_platformsupport nacl: SRC_SUBDIRS -= src_network src_testlib !symbian:contains(QT_CONFIG, dbus):SRC_SUBDIRS += src_dbus @@ -71,7 +67,6 @@ src_platformsupport.target = sub-platformsupport src_opengl.depends = src_gui src_widgets src_sql.depends = src_corelib src_testlib.depends = src_corelib src_gui src_widgets - src_tools_idc.depends = src_corelib # target defined in tools.pro src_plugins.depends = src_gui src_sql src_xml qpa: src_plugins.depends = src_platformsupport src_s60installs.depends = $$TOOLS_SUBDIRS $$SRC_SUBDIRS @@ -103,7 +98,7 @@ for(subname, SRC_SUBDIRS) { subdir = $$replace(subdir, /, $$QMAKE_DIR_SEP) subdir = $$replace(subdir, \\\\, $$QMAKE_DIR_SEP) SUB_TEMPLATE = $$list($$fromfile($$subpro, TEMPLATE)) - !isEqual(subname, src_tools_bootstrap):if(isEqual($$SUB_TEMPLATE, lib) | isEqual($$SUB_TEMPLATE, subdirs) | isEqual(subname, src_tools_idc) | isEqual(subname, src_tools_uic3)):!separate_debug_info { + !isEqual(subname, src_tools_bootstrap):if(isEqual($$SUB_TEMPLATE, lib) | isEqual($$SUB_TEMPLATE, subdirs)):!separate_debug_info { #debug debug-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) debug) diff --git a/src/tools/idc/idc.pro b/src/tools/idc/idc.pro deleted file mode 100644 index 5338ffb832..0000000000 --- a/src/tools/idc/idc.pro +++ /dev/null @@ -1,16 +0,0 @@ -TEMPLATE = app -CONFIG += console -CONFIG -= app_bundle -build_all:!build_pass { - CONFIG -= build_all - CONFIG += release -} - -QT -= gui - -DESTDIR = ../../../bin - -SOURCES = main.cpp - -target.path=$$[QT_INSTALL_BINS] -INSTALLS += target diff --git a/src/tools/idc/main.cpp b/src/tools/idc/main.cpp deleted file mode 100644 index b6b00cad37..0000000000 --- a/src/tools/idc/main.cpp +++ /dev/null @@ -1,335 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** 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$ -** -****************************************************************************/ - -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -static QString quotePath(const QString &s) -{ - if (!s.startsWith(QLatin1Char('\"')) && s.contains(QLatin1Char(' '))) - return QLatin1Char('\"') + s + QLatin1Char('\"'); - return s; -} - - -static bool runWithQtInEnvironment(const QString &cmd) -{ - QProcess proc; - - // prepend the qt binary directory to the path - QStringList env = QProcess::systemEnvironment(); - for (int i=0; i argc) { - error = QLatin1String("Missing name for interface definition file!"); - break; - } - idlfile = QLatin1String(argv[i]); - idlfile = idlfile.trimmed().toLower(); - } else if (p == QLatin1String("/version") || p == QLatin1String("-version")) { - ++i; - if (i > argc) - version = QLatin1String("1.0"); - else - version = QLatin1String(argv[i]); - } else if (p == QLatin1String("/tlb") || p == QLatin1String("-tlb")) { - ++i; - if (i > argc) { - error = QLatin1String("Missing name for type library file!"); - break; - } - tlbfile = QLatin1String(argv[i]); - tlbfile = tlbfile.trimmed().toLower(); - } else if (p == QLatin1String("/v") || p == QLatin1String("-v")) { - fprintf(stdout, "Qt Interface Definition Compiler version 1.0\n"); - return 0; - } else if (p == QLatin1String("/regserver") || p == QLatin1String("-regserver")) { - if (!registerServer(input)) { - fprintf(stderr, "Failed to register server!\n"); - return 1; - } - fprintf(stderr, "Server registered successfully!\n"); - return 0; - } else if (p == QLatin1String("/unregserver") || p == QLatin1String("-unregserver")) { - if (!unregisterServer(input)) { - fprintf(stderr, "Failed to unregister server!\n"); - return 1; - } - fprintf(stderr, "Server unregistered successfully!\n"); - return 0; - } else if (p[0] == QLatin1Char('/') || p[0] == QLatin1Char('-')) { - error = QLatin1String("Unknown option \"") + p + QLatin1Char('\"'); - break; - } else { - input = QLatin1String(argv[i]); - input = input.trimmed().toLower(); - } - i++; - } - if (!error.isEmpty()) { - fprintf(stderr, "%s", error.toLatin1().data()); - fprintf(stderr, "\n"); - return 5; - } - if (input.isEmpty()) { - fprintf(stderr, "No input file specified!\n"); - return 1; - } - if (input.endsWith(QLatin1String(".exe")) && tlbfile.isEmpty() && idlfile.isEmpty()) { - fprintf(stderr, "No type output file specified!\n"); - return 2; - } - if (input.endsWith(QLatin1String(".dll")) && idlfile.isEmpty() && tlbfile.isEmpty()) { - fprintf(stderr, "No interface definition file and no type library file specified!\n"); - return 3; - } - slashify(input); - if (!tlbfile.isEmpty()) { - slashify(tlbfile); - QFile file(tlbfile); - if (!file.open(QIODevice::ReadOnly)) { - fprintf(stderr, "Couldn't open %s for read\n", (const char*)tlbfile.toLocal8Bit().data()); - return 4; - } - QByteArray data = file.readAll(); - QString error; - bool ok = attachTypeLibrary(input, 1, data, &error); - fprintf(stderr, "%s", error.toLatin1().data()); - fprintf(stderr, "\n"); - return ok ? 0 : 4; - } else if (!idlfile.isEmpty()) { - slashify(idlfile); - idlfile = quotePath(idlfile); - fprintf(stderr, "\n\n%s\n\n", (const char*)idlfile.toLocal8Bit().data()); - quotePath(input); - HRESULT res = dumpIdl(input, idlfile, version); - - switch(res) { - case S_OK: - break; - case E_FAIL: - fprintf(stderr, "IDL generation failed trying to run program %s!\n", (const char*)input.toLocal8Bit().data()); - return res; - case -1: - fprintf(stderr, "Couldn't open %s for writing!\n", (const char*)idlfile.toLocal8Bit().data()); - return res; - case 1: - fprintf(stderr, "Malformed appID value in %s!\n", (const char*)input.toLocal8Bit().data()); - return res; - case 2: - fprintf(stderr, "Malformed typeLibID value in %s!\n", (const char*)input.toLocal8Bit().data()); - return res; - case 3: - fprintf(stderr, "Class has no metaobject information (error in %s)!\n", (const char*)input.toLocal8Bit().data()); - return res; - case 4: - fprintf(stderr, "Malformed classID value in %s!\n", (const char*)input.toLocal8Bit().data()); - return res; - case 5: - fprintf(stderr, "Malformed interfaceID value in %s!\n", (const char*)input.toLocal8Bit().data()); - return res; - case 6: - fprintf(stderr, "Malformed eventsID value in %s!\n", (const char*)input.toLocal8Bit().data()); - return res; - - default: - fprintf(stderr, "Unknown error writing IDL from %s\n", (const char*)input.toLocal8Bit().data()); - return 7; - } - } - return 0; -} - -QT_END_NAMESPACE - -int main(int argc, char **argv) -{ - return QT_PREPEND_NAMESPACE(runIdc)(argc, argv); -} diff --git a/src/tools/tools.pro b/src/tools/tools.pro index 47e216efc9..5cbe92309e 100644 --- a/src/tools/tools.pro +++ b/src/tools/tools.pro @@ -11,8 +11,6 @@ src_tools_rcc.subdir = $$QT_SOURCE_TREE/src/tools/rcc src_tools_rcc.target = sub-rcc src_tools_uic.subdir = $$QT_SOURCE_TREE/src/tools/uic src_tools_uic.target = sub-uic -src_tools_idc.subdir = $$QT_SOURCE_TREE/src/tools/idc -src_tools_idc.target = sub-idc !wince*:!ordered { # Set dependencies for each subdir @@ -36,7 +34,7 @@ EXTRA_RELEASE_TARGETS = subdir = $$replace(subdir, /, $$QMAKE_DIR_SEP) subdir = $$replace(subdir, \\\\, $$QMAKE_DIR_SEP) SUB_TEMPLATE = $$list($$fromfile($$subpro, TEMPLATE)) - !isEqual(subname, src_tools_bootstrap):if(isEqual($$SUB_TEMPLATE, lib) | isEqual($$SUB_TEMPLATE, subdirs) | isEqual(subname, src_tools_idc)):!separate_debug_info { + !isEqual(subname, src_tools_bootstrap):if(isEqual($$SUB_TEMPLATE, lib) | isEqual($$SUB_TEMPLATE, subdirs)):!separate_debug_info { #debug debug-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) debug) -- cgit v1.2.3