git-svn-id: svn://db.shs.com.ru/pip@1011 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -43,8 +43,8 @@ void usage() {
|
||||
piCout << "\"*=\" disable optional plugins.";
|
||||
piCout << "";
|
||||
piCout << Green << Bold << "Usage:" << Default << "\"deploy_tool [-hvfC] [--dependencies [--prefix <text>]] "
|
||||
"[-p <qt_plugins>] [-s <search_path>] [-S <styles>] [-l <ldd>] "
|
||||
"[-D <dpkg>] [-L <readelf> | -W <objdump> | -M <otool>] "
|
||||
"[-p <qt_plugins>] [-s <search_path>] [--ignore <libs>] [-S <styles>] "
|
||||
"[-l <ldd>] [-D <dpkg>] [-L <readelf> | -W <objdump> | -M <otool>] "
|
||||
"[-d <depth>] [-q <qtdir>] [-a <add_libs>] [-S <styles>] "
|
||||
"[-P <platforms>] [--qt-plugins <d>] -o <out_path> <file> [<file2> ...]\"" << NewLine;
|
||||
piCout << Green << Bold << "Details:";
|
||||
@@ -55,6 +55,7 @@ void usage() {
|
||||
piCout << Bold << "Processing control";
|
||||
piCout << "-f, --fake " << Green << "- don`t copy, only print";
|
||||
piCout << "-s <search_path> " << Green << "- set search pathes for system libraries, may be separated by \";\", default \"/usr/lib\"";
|
||||
piCout << "--ignore <libs> " << Green << "- ignore libraries names, may be separated by \":\", default \"\"";
|
||||
piCout << "-l <ldd> " << Green << "- \"ldd\" path, default \"/usr/bin/ldd\"";
|
||||
piCout << "-L <readelf> " << Green << "- \"readelf\" path, overrides \"ldd\"";
|
||||
piCout << "-W <objdump> " << Green << "- \"objdump\" path, overrides \"ldd\"";
|
||||
@@ -107,7 +108,7 @@ int depth = 5;
|
||||
bool fake = false, is_ldd = true, is_deps = false, need_qt = false;
|
||||
PIString ldd, readelf, objdump, otool, dpkg, out_dir, qt_dir, out_plugins_dir;
|
||||
PIStringList styles, lib_dirs, add_libs, platforms, sqldrivers;
|
||||
PISet<PIString> all_libs, miss_libs, all_deps, frameworks, miss_frameworks, qt_plugins;
|
||||
PISet<PIString> all_libs, miss_libs, all_deps, frameworks, miss_frameworks, qt_plugins, ignore_libs;
|
||||
PIMap<PIString, PIStringList> qt_filters;
|
||||
|
||||
|
||||
@@ -247,6 +248,12 @@ void procLdd(PIString file, bool ext_lib = false, int cur_depth = 0) {
|
||||
if (all_libs[l]) continue;
|
||||
PIFile::FileInfo fi;
|
||||
fi.path = l;
|
||||
PIString lname = fi.baseName();
|
||||
if (lname.startsWith("lib")) lname.cutLeft(3);
|
||||
//piCout << "check ignore" << lname << ignore_libs;
|
||||
if (ignore_libs.contains(lname)) {
|
||||
continue;
|
||||
}
|
||||
checkQtLib(fi.name().toLowerCase());
|
||||
cur_libs << l;
|
||||
all_libs << l;
|
||||
@@ -354,6 +361,7 @@ int main(int argc, char * argv[]) {
|
||||
cli.addArgument("output", true);
|
||||
cli.addArgument("pqt_out_plugins", true);
|
||||
cli.addArgument("search_path", true);
|
||||
cli.addArgument("ignore", PIChar('\0'), true);
|
||||
cli.addArgument("Styles", true);
|
||||
cli.addArgument("Platforms", true);
|
||||
cli.addArgument("qt-plugins", PIChar('\0'), true);
|
||||
@@ -377,12 +385,19 @@ int main(int argc, char * argv[]) {
|
||||
out_dir = cli.argumentValue("output");
|
||||
lib_dirs = cli.argumentValue("search_path").split(";");
|
||||
add_libs = cli.argumentValue("add_libs").split(";");
|
||||
ignore_libs = cli.argumentValue("ignore").split(":");
|
||||
qt_dir = cli.argumentValue("qtdir");
|
||||
ldd = cli.argumentValue("ldd");
|
||||
readelf = cli.argumentValue("Lreadelf");
|
||||
objdump = cli.argumentValue("Wobjdump");
|
||||
otool = cli.argumentValue("Motool");
|
||||
dpkg = cli.argumentValue("Dpkg");
|
||||
#ifdef WINDOWS
|
||||
readelf.replaceAll("/", "\\");
|
||||
objdump.replaceAll("/", "\\");
|
||||
otool.replaceAll("/", "\\");
|
||||
dpkg.replaceAll("/", "\\");
|
||||
#endif
|
||||
if (dpkg.isEmpty())
|
||||
dpkg = "/usr/bin/dpkg";
|
||||
out_plugins_dir = out_dir;
|
||||
@@ -407,6 +422,7 @@ int main(int argc, char * argv[]) {
|
||||
lib_dirs << (qbin + "bin");
|
||||
}
|
||||
piForeach (PIString & s, lib_dirs) {
|
||||
s.trim();
|
||||
if (!s.endsWith("/")) s += "/";
|
||||
}
|
||||
if (out_dir.isEmpty()) out_dir = ".";
|
||||
|
||||
Reference in New Issue
Block a user