[otool][Adobe] HUM.dylibのバージョンを取得する
[Adobe] HUM.dylibのバージョンを取得する
https://force4u.cocolog-nifty.com/skywalker/2021/08/post-685e98.html
こちらの記事のARM対応版
RemoteUpdateManager.dmgに同封されているHUM.dylibが5.5.0.619
Creative Cloud Desktop ApplicationのHUM.dylibが5.6.0.788なので
バージョン違いでエラーになっているんじゃん?
HUMのバージョンが…より
Creative Cloud Desktop Applicationをパッケージにするときに
RemoteUpdateManagerを同封させて再度上書きインストールした方が早いと思うよ…
ちなみに
RemoteUpdateManager version is : 2.6.0.9が最新だと思います
ダウンロード - gethum.dylibver.scpt.zip
set theDylibPath to "/Library/Application Support/Adobe/Adobe Desktop Common/HDBox/HUM.dylib"
--要コマンドラインツール
try
set theCommand to ("otool -arch x86_64 -P \"" & theDylibPath & "\"") as text
set theDylibPlist to (do shell script theCommand) as text
---不要なデータを削除して
set theDylibPlist to doReplace(theDylibPlist, "" & theDylibPath & ":", "")
set theDylibPlist to doReplace(theDylibPlist, "(__TEXT,__info_plist) section", "")
set theDylibPlist to doReplace(theDylibPlist, "\r", "")
set theDylibPlist to doReplace(theDylibPlist, "\"", "\\\"")
---テキストデータにする
set theCommand to ("echo \"" & theDylibPlist & "\" > /private/tmp/Dylib.x86_64.plist") as text
do shell script theCommand
---XML形式のplistをバイナリに→この時にXMLが整形されるのでエラー避け
set theCommand to ("plutil -convert binary1 /private/tmp/Dylib.x86_64.plist") as text
on error
try
do shell script "xcode-select --install"
end try
end try
try
set theCommand to ("otool -arch arm64 -P \"" & theDylibPath & "\"") as text
set theDylibArmPlist to (do shell script theCommand) as text
set theDylibArmPlist to doReplace(theDylibArmPlist, "" & theDylibPath & ":", "")
set theDylibArmPlist to doReplace(theDylibArmPlist, "(__TEXT,__info_plist) section", "")
set theDylibArmPlist to doReplace(theDylibArmPlist, "\r", "")
set theDylibArmPlist to doReplace(theDylibArmPlist, "\"", "\\\"")
---テキストデータにする
set theCommand to ("echo \"" & theDylibArmPlist & "\" > /private/tmp/Dylib.arm64.plist") as text
do shell script theCommand
---XML形式のplistをバイナリに→この時にXMLが整形されるのでエラー避け
set theCommand to ("plutil -convert binary1 /private/tmp/Dylib.arm64.plist") as text
do shell script theCommand
on error
try
do shell script "xcode-select --install"
end try
end try
---バージョンを取得する
set theCommand to ("defaults read \"/private/tmp/Dylib.x86_64.plist\" \"CFBundleVersion\"") as text
set theDylibVerIntel to (do shell script theCommand) as text
set theCommand to ("defaults read \"/private/tmp/Dylib.arm64.plist\" \"CFBundleVersion\"") as text
set theDylibVerArm to (do shell script theCommand) as text
---ログ
log theDylibVerIntel
log theDylibVerArm
theDylibVerIntel
theDylibVerArm
return "intel:" & theDylibVerIntel & " ARM:" & theDylibVerArm & ""
#################################
to doReplace(theText, orgStr, newstr)
set oldDelim to AppleScript's text item delimiters
set AppleScript's text item delimiters to orgStr
set tmpList to every text item of theText
set AppleScript's text item delimiters to newstr
set tmpStr to tmpList as text
set AppleScript's text item delimiters to oldDelim
return tmpStr
end doReplace
| 固定リンク
「Adobe」カテゴリの記事
- XDが有料ソフトウエアになったのね(2022.04.13)
- アドビアプリケーションと、関連するフォルダの削除(2021.12.01)
- [Adobe]ACAI cai-helper.app (Adobe Content Authenticity Initiative)(2021.11.29)
- CCXProcess(2021.11.28)