diff --git a/Installer/pkgTextWarning-CHS.txt b/Installer/pkgTextWarning-CHS.txt index ffd3ee37..d7e993be 100644 --- a/Installer/pkgTextWarning-CHS.txt +++ b/Installer/pkgTextWarning-CHS.txt @@ -1,6 +1,6 @@ 注意事项: -一、macOS 10.x-11.x 系统有 Bug、令该安装程式无法自动将安装目标设为当前使用者资料夹。如果您在 macOS 12 Monterey 之前的系统安装该输入法的话,请务必「手动」将安装目的地设为当前使用者资料夹。否则,当您今后(在升级系统之后)升级输入法的时候,可能会出现各种混乱情况。下述 sudo 指令会将任何安装到错误位置的档案全部移除。如果不用 sudo 的话,反而会将安装到正确位置的输入法档案给移除掉,所以请认真使用: - sudo /Users/$(stat -f%Su /dev/console)/Library/Input\ Methods/vChewing.app/Contents/MacOS/vChewing uninstall +一、macOS 10.x-11.x 系统有 Bug、令该安装程式无法自动将安装目标设为当前使用者资料夹。如果您在 macOS 12 Monterey 之前的系统安装该输入法的话,请务必「手动」将安装目的地设为当前使用者资料夹。否则,当您今后(在升级系统之后)升级输入法的时候,可能会出现各种混乱情况。下述 sudo 指令会将任何安装到错误位置的档案全部移除: + sudo bash /Users/$(stat -f%Su /dev/console)/Library/Input\ Methods/vChewing.app/Contents/Resources/fixinstall.sh 二、安装完毕之后,如果输入法无法正常使用的话,请重新登入即可。 diff --git a/Installer/pkgTextWarning-CHT.txt b/Installer/pkgTextWarning-CHT.txt index 08236174..d6d26e0e 100644 --- a/Installer/pkgTextWarning-CHT.txt +++ b/Installer/pkgTextWarning-CHT.txt @@ -1,6 +1,6 @@ 注意事項: -一、macOS 10.x-11.x 系統有 Bug、令該安裝程式無法自動將安裝目標設為當前使用者資料夾。如果您在 macOS 12 Monterey 之前的系統安裝該輸入法的話,請務必「手動」將安裝目的地設為當前使用者資料夾。否則,當您今後(在升級系統之後)升級輸入法的時候,可能會出現各種混亂情況。下述 sudo 指令會將任何安裝到錯誤位置的檔案全部移除。如果不用 sudo 的話,反而會將安裝到正確位置的輸入法檔案給移除掉,所以請認真使用: - sudo /Users/$(stat -f%Su /dev/console)/Library/Input\ Methods/vChewing.app/Contents/MacOS/vChewing uninstall +一、macOS 10.x-11.x 系統有 Bug、令該安裝程式無法自動將安裝目標設為當前使用者資料夾。如果您在 macOS 12 Monterey 之前的系統安裝該輸入法的話,請務必「手動」將安裝目的地設為當前使用者資料夾。否則,當您今後(在升級系統之後)升級輸入法的時候,可能會出現各種混亂情況。下述 sudo 指令會將任何安裝到錯誤位置的檔案全部移除: + sudo bash /Users/$(stat -f%Su /dev/console)/Library/Input\ Methods/vChewing.app/Contents/Resources/fixinstall.sh 二、安裝完畢之後,如果輸入法無法正常使用的話,請重新登入即可。 diff --git a/Installer/pkgTextWarning-ENU.txt b/Installer/pkgTextWarning-ENU.txt index 42fc66ac..6244bc1e 100644 --- a/Installer/pkgTextWarning-ENU.txt +++ b/Installer/pkgTextWarning-ENU.txt @@ -1,6 +1,6 @@ Notice: -1. Due to a bug in macOS 10.x and 11.x, if you are trying to install this input method on macOS releases earlier than macOS 12 Monterey, PLEASE manually choose the install target to the user folder. Otherwise, there will be problems when you are trying to install this input method to later versions when your OS gets upgraded to macOS 12 Monterey or later. The following terminal command can solve such probelems by removing all incorrectly-installed files (must use sudo to avoid the removal of the correctly-installled files): - sudo /Users/$(stat -f%Su /dev/console)/Library/Input\ Methods/vChewing.app/Contents/MacOS/vChewing uninstall +1. Due to a bug in macOS 10.x and 11.x, if you are trying to install this input method on macOS releases earlier than macOS 12 Monterey, PLEASE manually choose the install target to the user folder. Otherwise, there will be problems when you are trying to install this input method to later versions when your OS gets upgraded to macOS 12 Monterey or later. The following terminal command can solve such probelems by removing all incorrectly-installed files (must use sudo): + sudo bash /Users/$(stat -f%Su /dev/console)/Library/Input\ Methods/vChewing.app/Contents/Resources/fixinstall.sh 2. Feel free to logout and re-login if the input method doesn't work after installation. diff --git a/Installer/pkgTextWarning-JPN.txt b/Installer/pkgTextWarning-JPN.txt index e771839b..6ccd740b 100644 --- a/Installer/pkgTextWarning-JPN.txt +++ b/Installer/pkgTextWarning-JPN.txt @@ -1,7 +1,6 @@ ご注意: ● macOS 12 Monterey 以前の OS(macOS 10.x-11.x)のバグのため、macOS 10.x-11.x でインストールする場合、この入力アプリ必ずご自分でユーザーフォルダをインストール先と設定してください。然もないと、いずれ macOS 12 にアップデートし、この入力アプリのもっと新しいバージョンをインストールする時に、予測できない支障が生ずる恐れがあります。下記のターミナル指令を(必ず下記のまま sudo で)実行すれば、この様な支障を解決することができます: - sudo /Users/$(stat -f%Su /dev/console)/Library/Input\ Methods/vChewing.app/Contents/MacOS/vChewing uninstall -⚠︎ 間違ったところへ実装したファイルだけは消されますが、もし sudo 使わずに実行すると、逆に正しく実装されたファイルは消されます。 + sudo bash /Users/$(stat -f%Su /dev/console)/Library/Input\ Methods/vChewing.app/Contents/Resources/fixinstall.sh ● そして、インストール直後、入力アプリがうまく使えない場合、再ログインすれば済ませることです。 diff --git a/fixinstall.sh b/fixinstall.sh new file mode 100644 index 00000000..c1811246 --- /dev/null +++ b/fixinstall.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# Here's how to fix this input method, removing unnecessary files outside of the user directory: + +sudo rm -rf /Library/Input\ Methods/vChewing.app +sudo rm -rf /Library/Keyboard\ Layouts/vChewingKeyLayout.bundle +sudo rm -rf /Library/Keyboard\ Layouts/vChewing\ MiTAC.keylayout +sudo rm -rf /Library/Keyboard\ Layouts/vChewing\ IBM.keylayout +sudo rm -rf /Library/Keyboard\ Layouts/vChewing\ FakeSeigyou.keylayout +sudo rm -rf /Library/Keyboard\ Layouts/vChewing\ ETen.keylayout +sudo rm -rf /Library/Keyboard\ Layouts/vChewing\ Dachen.keylayout +sudo rm -rf /Library/Receipts/org.atelierInmu.vChewing.bom +sudo rm -rf /Library/Receipts/org.atelierInmu.vChewing.plist diff --git a/vChewing.xcodeproj/project.pbxproj b/vChewing.xcodeproj/project.pbxproj index 5294da42..962f1b08 100644 --- a/vChewing.xcodeproj/project.pbxproj +++ b/vChewing.xcodeproj/project.pbxproj @@ -45,6 +45,7 @@ 5B782EC4280C243C007276DE /* KeyHandler_HandleCandidate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B782EC3280C243C007276DE /* KeyHandler_HandleCandidate.swift */; }; 5B78EE0D28A562B4009456C1 /* suiPrefPaneDevZone.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B78EE0C28A562B4009456C1 /* suiPrefPaneDevZone.swift */; }; 5B7BC4B027AFFBE800F66C24 /* frmPrefWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5B7BC4AE27AFFBE800F66C24 /* frmPrefWindow.xib */; }; + 5B7DA80328BF6BC600D7B2AD /* fixinstall.sh in Resources */ = {isa = PBXBuildFile; fileRef = 5B7DA80228BF6BBA00D7B2AD /* fixinstall.sh */; }; 5B7F225D2808501000DDD3CB /* KeyHandler_HandleInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B7F225C2808501000DDD3CB /* KeyHandler_HandleInput.swift */; }; 5B84579E2871AD2200C93B01 /* convdict.plist in Resources */ = {isa = PBXBuildFile; fileRef = 5B84579C2871AD2200C93B01 /* convdict.plist */; }; 5B84579F2871AD2200C93B01 /* HotenkaChineseConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B84579D2871AD2200C93B01 /* HotenkaChineseConverter.swift */; }; @@ -262,6 +263,7 @@ 5B78EE0C28A562B4009456C1 /* suiPrefPaneDevZone.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = suiPrefPaneDevZone.swift; sourceTree = ""; }; 5B7BC4AF27AFFBE800F66C24 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/frmPrefWindow.xib; sourceTree = ""; }; 5B7BC4B227AFFC0B00F66C24 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/frmPrefWindow.strings; sourceTree = ""; }; + 5B7DA80228BF6BBA00D7B2AD /* fixinstall.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; lineEnding = 0; path = fixinstall.sh; sourceTree = ""; }; 5B7F225C2808501000DDD3CB /* KeyHandler_HandleInput.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; indentWidth = 2; lineEnding = 0; path = KeyHandler_HandleInput.swift; sourceTree = ""; tabWidth = 2; usesTabs = 0; }; 5B84579C2871AD2200C93B01 /* convdict.plist */ = {isa = PBXFileReference; lastKnownFileType = file.bplist; path = convdict.plist; sourceTree = ""; }; 5B84579D2871AD2200C93B01 /* HotenkaChineseConverter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HotenkaChineseConverter.swift; sourceTree = ""; }; @@ -418,6 +420,7 @@ 5B18BA7527C7BF6D0056EB19 /* MiscRootFiles */ = { isa = PBXGroup; children = ( + 5B7DA80228BF6BBA00D7B2AD /* fixinstall.sh */, 5BC2652127E04B7B00700291 /* uninstall.sh */, 5BC447AB2865BEF500EDC323 /* AUTHORS */, 5BE8A8C4281EE65300197741 /* CONTRIBUTING.md */, @@ -1062,6 +1065,7 @@ 5BBBB77427AED70B0023B93A /* MenuIcon-SCVIM@2x.png in Resources */, D4E33D8A27A838CF006DB1CF /* Localizable.strings in Resources */, 5BF9DA2828840E6200DBD48E /* template-exclusions.txt in Resources */, + 5B7DA80328BF6BC600D7B2AD /* fixinstall.sh in Resources */, 5BDCBB2E27B4E67A00D0CC59 /* vChewingPhraseEditor.app in Resources */, 5BBBB76027AED54C0023B93A /* Fart.m4a in Resources */, 6A2E40F6253A69DA00D1AE1D /* Images.xcassets in Resources */,