Installer // Kill vChewingPhraseEditor before installation.

This commit is contained in:
ShikiSuen 2022-11-19 19:43:23 +08:00
parent c7ab8d310c
commit 125d79e551
3 changed files with 8 additions and 0 deletions

View File

@ -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"

View File

@ -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

View File

@ -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