diff --git a/Installer/AppDelegate.swift b/Installer/AppDelegate.swift index 6f7a18dd..e6f77ff6 100644 --- a/Installer/AppDelegate.swift +++ b/Installer/AppDelegate.swift @@ -13,6 +13,7 @@ import IMKUtils import InputMethodKit public let kTargetBin = "vChewing" +public let kTargetBinPhraseEditor = "vChewingPhraseEditor" public let kTargetType = "app" public let kTargetBundle = "vChewing.app" public let kTargetBundleWithComponents = "Library/Input%20Methods/vChewing.app" diff --git a/Installer/AppDelegate_Extension.swift b/Installer/AppDelegate_Extension.swift index dcce917a..4611d869 100644 --- a/Installer/AppDelegate_Extension.swift +++ b/Installer/AppDelegate_Extension.swift @@ -51,6 +51,12 @@ extension AppDelegate { killTask.launch() killTask.waitUntilExit() + let killTask2 = Process() + killTask2.launchPath = "/usr/bin/killall" + killTask2.arguments = ["-9", kTargetBinPhraseEditor] + killTask2.launch() + killTask2.waitUntilExit() + if shouldWaitForTranslocationRemoval { progressIndicator.startAnimation(self) window.beginSheet(progressSheet) { returnCode in diff --git a/Installer/pkgPreInstall.sh b/Installer/pkgPreInstall.sh index 72c22905..6a9ab99b 100644 --- a/Installer/pkgPreInstall.sh +++ b/Installer/pkgPreInstall.sh @@ -1,6 +1,7 @@ #!/bin/sh killall vChewing || true +killall vChewingPhraseEditor || true if [ "${login_user}" = root ]; then rm -rf /Library/Input\ Methods/vChewing.app || true