Changeset 561 for trunk/tools/macdeployqt/macdeployqt/main.cpp
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/tools/macdeployqt/macdeployqt/main.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the tools applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 52 52 qDebug() << ""; 53 53 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)"; 57 59 qDebug() << ""; 58 60 qDebug() << "macdeployqt takes an application bundle as input and makes it"; … … 69 71 return 0; 70 72 } 71 73 72 74 if (appBundlePath.endsWith("/")) 73 75 appBundlePath.chop(1); 74 76 75 77 if (QDir().exists(appBundlePath) == false) { 76 78 qDebug() << "Error: Could not find app bundle" << appBundlePath; … … 80 82 bool plugins = true; 81 83 bool dmg = false; 84 bool useDebugLibs = false; 82 85 extern bool runStripEnabled; 83 86 … … 85 88 QByteArray argument = QByteArray(argv[i]); 86 89 if (argument == QByteArray("-no-plugins")) { 90 LogDebug() << "Argument found:" << argument; 87 91 plugins = false; 88 92 } else if (argument == QByteArray("-dmg")) { 93 LogDebug() << "Argument found:" << argument; 89 94 dmg = true; 90 95 } else if (argument == QByteArray("-no-strip")) { 96 LogDebug() << "Argument found:" << argument; 91 97 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; 92 111 } else if (argument.startsWith("-")) { 93 qDebug() << "Error: Unknown option" << argument << "\n";112 LogError() << "Unknown argument" << argument << "\n"; 94 113 return 0; 95 114 } 96 115 } 97 116 98 DeploymentInfo deploymentInfo = deployQtFrameworks(appBundlePath );117 DeploymentInfo deploymentInfo = deployQtFrameworks(appBundlePath, useDebugLibs); 99 118 100 119 if (plugins) { … … 104 123 deploymentInfo.pluginPath = deploymentInfo.qtPath + "/plugins"; 105 124 106 qDebug() << ""; 107 qDebug() << "Deploying plugins from" << deploymentInfo.pluginPath; 108 deployPlugins(appBundlePath, deploymentInfo); 125 LogNormal(); 126 deployPlugins(appBundlePath, deploymentInfo, useDebugLibs); 109 127 createQtConf(appBundlePath); 110 128 } 111 129 112 130 if (dmg) { 131 LogNormal(); 113 132 createDiskImage(appBundlePath); 114 133 }
Note:
See TracChangeset
for help on using the changeset viewer.