@@ -132,6 +132,7 @@ class Injector: ObservableObject {
132
132
guard let injectDetail = injectConfiguration. injectDetail ( package : package ) else {
133
133
return
134
134
}
135
+ print ( " ---------------------------- " )
135
136
print ( " [*] Start inject \( package ) " )
136
137
self . injectDetail = injectDetail
137
138
self . appDetail = appDetail
@@ -340,11 +341,11 @@ class Injector: ObservableObject {
340
341
let destination = source. appending ( " .backup " )
341
342
342
343
if !FileManager. default. fileExists ( atPath: source) {
343
- print ( " Source file not found: \( source) " )
344
+ print ( " [*] Source file not found: \( source) " )
344
345
return [ ( " echo Source file not found: \( source. transformTo ( to: . bash) ) && exit 1 " , true ) ] // 借用一下 AppleScript 来弹窗
345
346
}
346
347
if FileManager . default. fileExists ( atPath: destination) {
347
- print ( " Destination file already exists: \( destination) " )
348
+ print ( " [*] Destination file already exists: \( destination) " )
348
349
return [ ]
349
350
}
350
351
return [
@@ -396,10 +397,13 @@ class Injector: ObservableObject {
396
397
alert. informativeText = String ( localized: " This should not happen here, please report to the developer (Area: MainInject) " )
397
398
alert. alertStyle = . warning
398
399
alert. addButton ( withTitle: String ( localized: " OK " ) )
400
+ alert. runModal ( )
401
+ print ( " [*] Inject Tools Path Not Found. " )
399
402
return [ ( " echo Inject Tools Path Not Found && exit 1 " , true ) ]
400
403
}
401
404
402
405
if self . injectDetail? . needCopyToAppDir == true {
406
+ print ( " [*] Copying 91Qiuchenly.dylib to app dir " )
403
407
// let copyedQiuchenly_URL = (self.appDetail?.path ?? "") + bridgeDir + "91Qiuchenly.dylib"
404
408
let copyedQiuchenly_URL = self . genSourcePath ( for: . none, file: " 91Qiuchenly.dylib " )
405
409
let softLink = ( " sudo ln -f -s ' \( QiuchenlyDylib_URL!) ' ' \( copyedQiuchenly_URL) ' " , true ) // 为了防止原神更新后导致的插件失效,这里使用软链接
@@ -441,17 +445,17 @@ class Injector: ObservableObject {
441
445
sign_prefix_with_deep += " --entitlements \( entitlementsPath!) "
442
446
}
443
447
444
- let dest = self . genSourcePath ( for: . bash )
448
+ let dest = self . genSourcePath ( for: . none )
445
449
446
450
if !( injectDetail? . noSignTarget ?? false ) {
447
- shells. append ( ( sign_prefix_with_deep + " ' \( dest) ' " , false ) )
451
+ shells. append ( ( sign_prefix_with_deep + " ' \( dest) ' " , true ) )
448
452
}
449
453
// shells.append((sign_prefix_with_deep + " '\(dest)'", false))
450
454
451
455
let deepSignApp = self . injectDetail? . deepSignApp // Bool
452
456
if deepSignApp == true {
453
- let deepSignAppPath = self . genSourcePath ( for: . bash , path: ( self . appDetail? . path ?? " " ) . replacingOccurrences ( of: " /Contents " , with: " " ) )
454
- shells. append ( ( sign_prefix_with_deep + " ' \( deepSignAppPath) ' " , false ) )
457
+ let deepSignAppPath = self . genSourcePath ( for: . none , path: ( self . appDetail? . path ?? " " ) . replacingOccurrences ( of: " /Contents " , with: " " ) )
458
+ shells. append ( ( sign_prefix_with_deep + " ' \( deepSignAppPath) ' " , true ) )
455
459
}
456
460
457
461
// let disableLibraryValidate = self.injectDetail?.dis
0 commit comments