Skip to content

Commit 2c32e1c

Browse files
committed
Reduce verboseness in mac build script (related to install-name-tool
1 parent ede1fbc commit 2c32e1c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

installer/fix_qt5_rpath.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def fix_rpath(PATH):
2525
relative_path = os.path.relpath(root, PATH)
2626

2727
# Skip common file extensions (speed things up)
28-
if os.path.splitext(file_path)[-1] in non_executables or basename.startswith("."):
28+
if os.path.splitext(file_path)[-1] in non_executables or basename.startswith(".") or "profiles" in file_path:
2929
continue
3030

3131
# Build exe path (relative from the app dir)
@@ -35,15 +35,14 @@ def fix_rpath(PATH):
3535

3636
# Change ID path of library files
3737
# Sometimes, the ID has an absolute path or invalid @rpath embedded in it, which breaks our frozen exe
38-
print ("ID: %s: install_name_tool %s -id %s" % (basename, file_path, executable_path))
39-
call(["install_name_tool", file_path, "-id", executable_path])
38+
call(["install_name_tool", file_path, "-id", executable_path],
39+
stdout=subprocess.STDOUT, stderr=subprocess.DEVNUL)
4040

4141
# Loop through all dependencies of each library/executable
4242
raw_output = subprocess.Popen(["oTool", "-L", file_path], stdout=subprocess.PIPE).communicate()[0].decode('utf-8')
4343
for output in raw_output.split("\n")[1:-1]:
4444
if output and "is not an object file" not in output and ".o):" not in output:
4545
dependency_path = output.split('\t')[1].split(' ')[0]
46-
dependency_version = output.split('\t')[1].split(' (')[1].replace(')', '')
4746
dependency_base_path, dependency_name = os.path.split(dependency_path)
4847

4948
# If @rpath or /usr/local found in dependency path, update with @executable_path instead
@@ -52,8 +51,8 @@ def fix_rpath(PATH):
5251
if not os.path.exists(os.path.join(PATH, dependency_name)):
5352
print("ERROR: /usr/local PATH not found in EXE folder: %s" % dependency_path)
5453
else:
55-
print('-- Dependency: %s: install_name_tool "%s" -change "%s" "%s"' % (dependency_name, file_path, dependency_path, dependency_exe_path))
56-
call(["install_name_tool", file_path, "-change", dependency_path, dependency_exe_path])
54+
call(["install_name_tool", file_path, "-change", dependency_path, dependency_exe_path],
55+
stdout=subprocess.STDOUT, stderr=subprocess.DEVNUL)
5756

5857

5958
def print_min_versions(PATH):

0 commit comments

Comments
 (0)