Changeset View
Changeset View
Standalone View
Standalone View
bin/Packager/MacDMGPackager.py
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Line(s) | 73 | if not dylibbundler.fixupAndBundleLibsRecursively("Contents/PlugIns"): | |||
---|---|---|---|---|---|
74 | return False | 74 | return False | ||
75 | 75 | | |||
76 | if not utils.system(["macdeployqt", appPath, "-always-overwrite", "-verbose=1"]): | 76 | if not utils.system(["macdeployqt", appPath, "-always-overwrite", "-verbose=1"]): | ||
77 | return False | 77 | return False | ||
78 | 78 | | |||
79 | # macdeployqt might just have added some explicitly blacklisted files | 79 | # macdeployqt might just have added some explicitly blacklisted files | ||
80 | blackList = Path(self.packageDir(), "mac_blacklist.txt") | 80 | blackList = Path(self.packageDir(), "mac_blacklist.txt") | ||
81 | if blackList.exists(): | 81 | if blackList.exists(): | ||
82 | blackList = [self.read_blacklist(str(blackList))] | 82 | pattern = [self.read_blacklist(str(blackList))] | ||
83 | # use it as whitelist as we want only matches, ignore all others | 83 | # use it as whitelist as we want only matches, ignore all others | ||
84 | matches = utils.filterDirectoryContent(appPath, whitelist=lambda x, root:self.blacklisted(x, blackList), blacklist=lambda x, root:True) | 84 | matches = utils.filterDirectoryContent(appPath, whitelist=lambda x, root: utils.regexFileFilter(x, root, pattern), blacklist=lambda x, root:True) | ||
85 | for f in matches: | 85 | for f in matches: | ||
86 | CraftCore.log.info(f"Remove blacklisted file: {f}") | 86 | CraftCore.log.info(f"Remove blacklisted file: {f}") | ||
87 | utils.deleteFile(f) | 87 | utils.deleteFile(f) | ||
88 | 88 | | |||
89 | # macdeployqt adds some more plugins so we fix the plugins after calling macdeployqt | 89 | # macdeployqt adds some more plugins so we fix the plugins after calling macdeployqt | ||
90 | dylibbundler.checkedLibs = set() # ensure we check all libs again (but | 90 | dylibbundler.checkedLibs = set() # ensure we check all libs again (but | ||
91 | # we should not need to make any changes) | 91 | # we should not need to make any changes) | ||
92 | CraftCore.log.info("Fixing plugin dependencies after macdeployqt...") | 92 | CraftCore.log.info("Fixing plugin dependencies after macdeployqt...") | ||
▲ Show 20 Lines • Show All 301 Lines • Show Last 20 Lines |