mirror of
https://git-qiuchenly.yltfspace.com/QiuChenly/corepatch
synced 2025-11-26 06:36:14 +08:00
修复一个检查逻辑错误。
This commit is contained in:
24
main.py
24
main.py
@@ -269,17 +269,13 @@ def main():
|
||||
sh = f"chmod +x {current.parent}/tool/insert_dylib && chmod +x {current.parent}/tool/optool"
|
||||
subprocess.run(sh, shell=True)
|
||||
|
||||
sh = (
|
||||
f"sudo {current.parent}/tool/optool install -p '{current.parent}/tool/91QiuChenly.dylib' -t '{dest}'"
|
||||
if useOptool is None or useOptool is True
|
||||
else f"sudo {current.parent}/tool/insert_dylib '{current.parent}/tool/91QiuChenly.dylib' '{backup}' '{dest}'"
|
||||
)
|
||||
sh = f"sudo {current.parent}/tool/optool install -p '{current.parent}/tool/91QiuChenly.dylib' -t '{dest}'"
|
||||
if useOptool is False:
|
||||
sh = f"sudo {current.parent}/tool/insert_dylib '{current.parent}/tool/91QiuChenly.dylib' '{backup}' '{dest}'"
|
||||
|
||||
if need_copy_to_app_dir:
|
||||
source_dylib = f"{current.parent}/tool/91QiuChenly.dylib"
|
||||
isDevHome = os.getenv("InjectLibDev")
|
||||
# 打印isDevHome
|
||||
print(isDevHome, "isDevHome")
|
||||
if isDevHome is not None:
|
||||
# 开发者自己的prebuild库路径 直接在.zshrc设置环境变量这里就可以读取到。
|
||||
# export InjectLibDev="自己的路径/91QiuChenly.dylib"
|
||||
@@ -293,20 +289,20 @@ def main():
|
||||
)
|
||||
|
||||
sh = []
|
||||
desireApp = [dest]
|
||||
if componentApp:
|
||||
desireApp = [dest]
|
||||
desireApp.extend(
|
||||
[
|
||||
f"{app_base_locate}{i}/Contents/MacOS/{getAppMainExecutable(app_base_locate+i)}"
|
||||
for i in componentApp
|
||||
]
|
||||
)
|
||||
for it in desireApp:
|
||||
if useOptool is None or useOptool is True:
|
||||
bsh = rf"sudo cp '{it}' /tmp/app && sudo {current.parent}/tool/optool install -p {destination_dylib} -t /tmp/app --resign && sudo cp /tmp/app '{it}'"
|
||||
else:
|
||||
bsh = rf"sudo {current.parent}/tool/insert_dylib {destination_dylib} '{backup}' '{it}'"
|
||||
sh.append(bsh)
|
||||
for it in desireApp:
|
||||
if useOptool is None or useOptool is True:
|
||||
bsh = rf"sudo cp '{it}' /tmp/app && sudo {current.parent}/tool/optool install -p {destination_dylib} -t /tmp/app --resign && sudo cp /tmp/app '{it}'"
|
||||
else:
|
||||
bsh = rf"sudo {current.parent}/tool/insert_dylib {destination_dylib} '{backup}' '{it}'"
|
||||
sh.append(bsh)
|
||||
|
||||
for shs in sh:
|
||||
subprocess.run(shs, shell=True)
|
||||
|
||||
Reference in New Issue
Block a user