1
0
Fork 0

Add write permission before install_name_tool when doing osx-bundle

Fix wangqr/Aegisub#39
This commit is contained in:
wangqr 2020-04-14 10:28:15 -04:00
parent b92a2593cb
commit 5dd58aca8b
1 changed files with 7 additions and 1 deletions

View File

@ -105,8 +105,14 @@ if __name__ == '__main__':
else:
print("%s -> @executable_path/%s" % (lib, libbase))
targetlib = targetdir + '/' + libbase
orig_permission = os.stat(targetlib).st_mode
if not(orig_permission & stat.S_IWUSR):
os.chmod(targetlib, orig_permission | stat.S_IWUSR)
subprocess.run(in_tool_cmdline + ['-id', '@executable_path/' + libbase,
targetdir + '/' + libbase])
targetlib])
if not(orig_permission & stat.S_IWUSR):
os.chmod(targetlib, orig_permission)
if badlist:
print()