git-svn-id: svn://db.shs.com.ru/pip@1037 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -110,7 +110,7 @@ QtDep qt_deps[] = {
|
||||
int depth = 5;
|
||||
bool fake = false, is_ldd = true, is_deps = false, need_qt = false;
|
||||
PIString ldd, readelf, objdump, otool, dpkg, nametool, out_dir, qt_dir, out_plugins_dir;
|
||||
PIStringList styles, lib_dirs, add_libs, platforms, sqldrivers;
|
||||
PIStringList styles, lib_dirs, add_libs, platforms, sqldrivers, input_files;
|
||||
PISet<PIString> all_libs, miss_libs, all_deps, frameworks, framework_libs, miss_frameworks, qt_plugins, ignore_libs;
|
||||
PIMap<PIString, PIStringList> qt_filters;
|
||||
|
||||
@@ -395,7 +395,7 @@ void patchNameTool() {
|
||||
if (!dlibs.isEmpty()) {
|
||||
execute("chmod +w \"" + local_lib + "\"");
|
||||
}
|
||||
PICout(DefaultControls) << "patch" << local_lib;
|
||||
piCout << "patch" << local_lib;
|
||||
piForeach (PIString sys_lib, dlibs) {
|
||||
sys_lib.cutRight(1).trim();
|
||||
fi.path = sys_lib;
|
||||
@@ -404,23 +404,28 @@ void patchNameTool() {
|
||||
PIString new_path;
|
||||
if (all_libs.contains(fl)) {
|
||||
new_path = "@executable_path/../Frameworks/" + libname;
|
||||
PICout(DefaultControls) << " depend on lib" << fl;
|
||||
piCout << " depend on lib" << fl;
|
||||
}
|
||||
if (frameworks.contains(fname)) {
|
||||
fl = findLib(fname);
|
||||
if (fl.isEmpty()) continue;
|
||||
new_path = "@executable_path/../Frameworks/" + fname + "/" + frameworkInternalPath(sys_lib);
|
||||
PICout(DefaultControls) << " depend on framework" << fl;
|
||||
piCout << " depend on framework" << fl;
|
||||
}
|
||||
if (!new_path.isEmpty()) {
|
||||
if (!new_path.isEmpty() && (sys_lib != new_path)) {
|
||||
cmd = nametool + " -change \"" + sys_lib + "\"";
|
||||
cmd += " \"" + new_path + "\"";
|
||||
cmd += " \"" + local_lib + "\"";
|
||||
//PICout(DefaultControls) << " " << cmd;
|
||||
//piCout << " " << cmd;
|
||||
execute(cmd);
|
||||
}
|
||||
}
|
||||
}
|
||||
piForeach (PIString bin, input_files) {
|
||||
cmd = nametool + " -add_rpath \"@executable_path/../Frameworks\"";
|
||||
cmd += " \"" + bin + "\"";
|
||||
execute(cmd);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -552,21 +557,20 @@ int main(int argc, char * argv[]) {
|
||||
if (!cli.argumentValue("depth").isEmpty())
|
||||
depth = cli.argumentValue("depth").toInt();
|
||||
|
||||
PIStringList files;
|
||||
cli.optionalArguments().forEach([&](const PIString & a){
|
||||
if (PIDir::isExists(a)) {
|
||||
PIDir(a).allEntries().forEach([&](const PIFile::FileInfo & fi){
|
||||
if (fi.isFile())
|
||||
files << fi.path;
|
||||
input_files << fi.path;
|
||||
});
|
||||
} else {
|
||||
if (PIFile::isExists(a))
|
||||
files << a;
|
||||
input_files << a;
|
||||
}
|
||||
});
|
||||
//piCout << files;
|
||||
if (depth > 0)
|
||||
files.forEach([&](const PIString & f){procLdd(f);});
|
||||
input_files.forEach([&](const PIString & f){procLdd(f);});
|
||||
piForeach (PIString & s, add_libs) {
|
||||
if (s.isEmpty()) continue;
|
||||
piCout << s << "->" << findLib(s);
|
||||
|
||||
Reference in New Issue
Block a user