Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/tools/macdeployqt/macdeployqt/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the tools applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5252        qDebug() << "";
    5353        qDebug() << "Options:";
    54         qDebug() << "   -no-plugins: Skip plugin deployment";
    55         qDebug() << "   -dmg       : Create a .dmg disk image";
    56         qDebug() << "   -no-strip  : Don't run 'strip' on the binaries";
     54        qDebug() << "   -verbose=<0-3>  : 0 = no output, 1 = error/warning (default), 2 = normal, 3 = debug";
     55        qDebug() << "   -no-plugins     : Skip plugin deployment";
     56        qDebug() << "   -dmg            : Create a .dmg disk image";
     57        qDebug() << "   -no-strip       : Don't run 'strip' on the binaries";
     58        qDebug() << "   -use-debug-libs : Deploy with debug versions of frameworks and plugins (implies -no-strip)";
    5759        qDebug() << "";
    5860        qDebug() << "macdeployqt takes an application bundle as input and makes it";
     
    6971        return 0;
    7072    }
    71    
     73
    7274    if (appBundlePath.endsWith("/"))
    7375        appBundlePath.chop(1);
    74    
     76
    7577    if (QDir().exists(appBundlePath) == false) {
    7678        qDebug() << "Error: Could not find app bundle" << appBundlePath;
     
    8082    bool plugins = true;
    8183    bool dmg = false;
     84    bool useDebugLibs = false;
    8285    extern bool runStripEnabled;
    8386
     
    8588        QByteArray argument = QByteArray(argv[i]);
    8689        if (argument == QByteArray("-no-plugins")) {
     90            LogDebug() << "Argument found:" << argument;
    8791            plugins = false;
    8892        } else if (argument == QByteArray("-dmg")) {
     93            LogDebug() << "Argument found:" << argument;
    8994            dmg = true;
    9095        } else if (argument == QByteArray("-no-strip")) {
     96            LogDebug() << "Argument found:" << argument;
    9197            runStripEnabled = false;
     98        } else if (argument == QByteArray("-use-debug-libs")) {
     99            LogDebug() << "Argument found:" << argument;
     100            useDebugLibs = true;
     101            runStripEnabled = false;
     102        } else if (argument.startsWith(QByteArray("-verbose"))) {
     103            LogDebug() << "Argument found:" << argument;
     104            int index = argument.indexOf("=");
     105            bool ok = false;
     106            int number = argument.mid(index+1).toInt(&ok);
     107            if (!ok)
     108                LogError() << "Could not parse verbose level";
     109            else
     110                logLevel = number;
    92111        } else if (argument.startsWith("-")) {
    93             qDebug() << "Error: Unknown option" << argument << "\n";
     112            LogError() << "Unknown argument" << argument << "\n";
    94113            return 0;
    95114        }
    96115     }
    97116
    98     DeploymentInfo deploymentInfo  = deployQtFrameworks(appBundlePath);
     117    DeploymentInfo deploymentInfo  = deployQtFrameworks(appBundlePath, useDebugLibs);
    99118
    100119    if (plugins) {
     
    104123            deploymentInfo.pluginPath = deploymentInfo.qtPath + "/plugins";
    105124
    106         qDebug() << "";
    107         qDebug() << "Deploying plugins from" << deploymentInfo.pluginPath;
    108         deployPlugins(appBundlePath, deploymentInfo);
     125        LogNormal();
     126        deployPlugins(appBundlePath, deploymentInfo, useDebugLibs);
    109127        createQtConf(appBundlePath);
    110128    }
    111129
    112130    if (dmg) {
     131        LogNormal();
    113132        createDiskImage(appBundlePath);
    114133    }
Note: See TracChangeset for help on using the changeset viewer.