diff --git a/deploy_tool/main.cpp b/deploy_tool/main.cpp index 4966d73..fb3d0c0 100644 --- a/deploy_tool/main.cpp +++ b/deploy_tool/main.cpp @@ -33,7 +33,7 @@ void usage() { piCout << "If depend on QtCore library, then copy all basic Qt plugins, "; piCout << " and "; piCout << ""; - piCout << Green << Bold << "Usage:" << Default << "\"deploy_tool [-hvfC] [--dependencies] -o [-p ] [-s ] [-S ] [-l ] [-D ] [-L | -W | -M ] [-d ] [-q ] [-a ] [-S ] [-P ] \"" << NewLine; + piCout << Green << Bold << "Usage:" << Default << "\"deploy_tool [-hvfC] <-o | --dependencies > [-p ] [-s ] [-S ] [-l ] [-D ] [-L | -W | -M ] [-d ] [-q ] [-a ] [-S ] [-P ] \"" << NewLine; piCout << Green << Bold << "Details:"; piCout << Bold << "Debug control"; piCout << "-h " << Green << "- display this message and exit"; @@ -205,7 +205,7 @@ void procLdd(PIString file, bool ext_lib = false, int cur_depth = 0) { void copyWildcard(const PIString & from, const PIString & to) { piCout << "copy" << from; - if (fake) return; + if (fake || is_deps) return; PIDir(to).make(); #ifdef WINDOWS PIFile::FileInfo fi; fi.path = from; @@ -237,7 +237,7 @@ void procQt() { PIStringList vsl = vs.split("\n"); PIStringList pdirs; pdirs << "imageformats" << "sqldrivers"; - if (!fake) + if (!fake && !is_deps) PIDir(out_plugins_dir).make(true); piForeach (PIString l, vsl) { if (l.trim().contains("Qt version")) { @@ -324,15 +324,15 @@ int main(int argc, char * argv[]) { cli.addArgument("depth", true); cli.addArgument("qtdir", true); cli.addArgument("add_libs", true); - if (cli.hasArgument("help") || cli.argumentValue("output").isEmpty() || (cli.optionalArguments().size_s() != 1)) { + piDebug = cli.hasArgument("verbose"); + fake = cli.hasArgument("fake"); + is_deps = cli.hasArgument("dependencies"); + if (cli.hasArgument("help") || (cli.argumentValue("output").isEmpty() && !is_deps) || (cli.optionalArguments().size_s() != 1)) { usage(); return 0; } setCommands(); - piDebug = cli.hasArgument("verbose"); - fake = cli.hasArgument("fake"); - is_deps = cli.hasArgument("dependencies"); PIString bin = cli.optionalArguments()[0]; out_dir = cli.argumentValue("output"); lib_dirs = cli.argumentValue("search_path").split(";"); @@ -370,7 +370,7 @@ int main(int argc, char * argv[]) { if (!out_dir.endsWith("/")) out_dir += "/"; if (ldd.isEmpty()) ldd = "/usr/bin/ldd"; styles = cli.argumentValue("Styles").split(","); - if (!fake) + if (!fake && !is_deps) PIDir(out_dir).make(); if (!cli.argumentValue("depth").isEmpty()) depth = cli.argumentValue("depth").toInt();