CC版はこちら
http://force4u.cocolog-nifty.com/skywalker/2016/08/install-the-ado.html
AOL出力パネルのダウンロードURLが変わったので
スクリプトを変更した。
(*
AOM(Adobe Output Module)インストーラー
20160723 Install_Adobe_Output_Module_CC2015 初回作成
20160831ダウンロードファイルの新URLに対応しました。
################################
【重要】2015がインストールされているのが前提です
################################
AOM(Adobe Output Module)のMac版は
解凍時のアクセス権の影響で
複数の人が同じ機器を利用する場合
インストールした人以外が出力パネルを利用出来ない(エラーになる)
インストールからアクセス権設定までを自動化して
トラブル防止用に作成した
業務用に作成した物を可読性を配慮して作り直した
アクセス権でstaffにフルアクセス権を付けている(ここは好みの問題)
Bridge Help / Install Adobe Output Module
https://helpx.adobe.com/bridge/kb/install-output-module-bridge-cc.html
詳しくはこちら
http://force4u.cocolog-nifty.com/skywalker/2015/12/aomadobe-output.html
*)
----ログを表示
tellapplication"AppleScript Editor"
activate
try
tellapplication"System Events" tokeystroke"3" using {command down}
endtry
try
tellapplication"System Events" tokeystroke"l" using {option down, command down}
endtry
endtell
-----Bridge CC 2015 のインストール判定
try
settheLocalSuppDirto (path toapplication support folderfromlocal domain) astext
settheLocalSuppBrCCdirto (theLocalSuppDir& "Adobe:Bridge CC 2015 Extensions:") astext
setaliasLocalSuppBrCCdirtotheLocalSuppBrCCdirasalias
onerror
return"BridgeCC2015が未インストールです"
endtry
---日付けと時間からテンポラリー用のフォルダ名を作成
settheNowTimeto (mydoDateAndTIme(current date)) astext
---テンポラリー用フォルダのパスを定義
settheTrashDirto ("/tmp/" & theNowTime) astext
-----テンポラリーフォルダを作成
try
settheCommandto ("mkdir -pv " & theTrashDir) astext
do shell scripttheCommand
settheTmpPathtotheTrashDirastext
delay 1
onerror
return"テンポラリフォルダ作成でエラーが発生しました"
endtry
-----ファイルをダウンロード
try
---旧URL
---set theCommand to ("curl -L -o '" & theTmpPath & "/AOM_Package_Mac.zip' 'https://helpx.adobe.com/content/help/en/bridge/kb/install-output-module-bridge-cc/_jcr_content/main-pars/download_1/file.res/AOM_Package_Mac.zip'") as text
---20160831新URL
settheCommandto ("curl -L -o '" & theTmpPath& "/AOM_Package_Mac.zip' 'https://helpx.adobe.com/content/help/en/bridge/kb/install-output-module-bridge-cc/_jcr_content/main-pars/download_section/download-3/file.res/AOM_Package_Mac.zip'") astext
do shell scripttheCommand
delay 1
onerror
return"ダウンロードでエラーが発生しました"
endtry
-----ファイルを解凍
try
settheCommandto ("unzip '" & theTmpPath& "/AOM_Package_Mac.zip' -d '" & theTmpPath& "'") astext
do shell scripttheCommand
delay 1
onerror
return"ファイルの解凍でエラーが発生しました"
endtry
-----インストール先のフォルダを確保
try
settheCommandto ("sudo mkdir -p '/Library/Application Support/Adobe/Bridge CC 2015 Extensions'") astext
do shell scripttheCommandwithadministrator privileges
settheCommandto ("sudo mkdir -p '/Library/Application Support/Adobe/Bridge CC 2015 Extensions/Workspaces'") astext
do shell scripttheCommandwithadministrator privileges
onerror
----ここはエラー制御無しで
endtry
-----ワークススペースファイルを移動(おきかえ)
try
settheCommandto ("sudo mv -f '" & theTmpPath& "/AOM_Mac/AdobeOutputModule.workspace' '/Library/Application Support/Adobe/Bridge CC 2015 Extensions/Workspaces'") astext
do shell scripttheCommandwithadministrator privileges
onerror
---ここはエラー制御無しでOKかな
endtry
-----モジュールを移動(エラーしたら削除してから新しいファイルを移動)
try
settheCommandto ("sudo mv -f '" & theTmpPath& "/AOM_Mac/Adobe Output Module' '/Library/Application Support/Adobe/Bridge CC 2015 Extensions'") astext
do shell scripttheCommandwithadministrator privileges
onerror
settheCommandto ("sudo mv -f '/Library/Application Support/Adobe/Bridge CC 2015 Extensions/Adobe Output Module' '" & theTmpPath& "'") astext
do shell scripttheCommandwithadministrator privileges
settheCommandto ("sudo mv -f '" & theTmpPath& "/AOM_Mac/Adobe Output Module' '/Library/Application Support/Adobe/Bridge CC 2015 Extensions'") astext
do shell scripttheCommandwithadministrator privileges
endtry
-----アクセス権を修正775(アクセス権は好みで)
try
settheCommandto ("sudo chown -Rf root '/Library/Application Support/Adobe/Bridge CC 2015 Extensions/Adobe Output Module'") astext
do shell scripttheCommandwithadministrator privileges
settheCommandto ("sudo chgrp -Rf staff '/Library/Application Support/Adobe/Bridge CC 2015 Extensions/Adobe Output Module'") astext
do shell scripttheCommandwithadministrator privileges
settheCommandto ("sudo chmod -Rf 775 '/Library/Application Support/Adobe/Bridge CC 2015 Extensions/Adobe Output Module'") astext
do shell scripttheCommandwithadministrator privileges
onerror
return"アクセス権修正でエラーが発生しました"
endtry
-----アクセス権を修正775(アクセス権は好みで)
try
settheCommandto ("sudo chown -Rf root '/Library/Application Support/Adobe/Bridge CC 2015 Extensions/Workspaces/AdobeOutputModule.workspace'") astext
do shell scripttheCommandwithadministrator privileges
settheCommandto ("sudo chgrp -Rf staff '/Library/Application Support/Adobe/Bridge CC 2015 Extensions/Workspaces/AdobeOutputModule.workspace'") astext
do shell scripttheCommandwithadministrator privileges
settheCommandto ("sudo chmod -Rf 775 '/Library/Application Support/Adobe/Bridge CC 2015 Extensions/Workspaces/AdobeOutputModule.workspace'") astext
do shell scripttheCommandwithadministrator privileges
onerror
return"アクセス権修正でエラーが発生しました"
endtry
-----Workspacesキャッシュクリア
try
settheUserBridgeDirtopath toapplication support folderfromuser domain
settheUserBridgeDirto (POSIX pathoftheUserBridgeDir) astext
settheCommandto ("mkdir -p '" & theTmpPath& "/Support'") astext
do shell scripttheCommandwithadministrator privileges
settheCommandto ("mv -f '" & theUserBridgeDir& "Adobe/Bridge CC 2015' '" & theTmpPath& "/Support'") astext
do shell scripttheCommandwithadministrator privileges
onerror
log"Workspacesキャッシュがありませんでした"
endtry
-----Commonクリア
try
settheUserBridgeDirtopath toapplication support folderfromuser domain
settheUserBridgeDirto (POSIX pathoftheUserBridgeDir) astext
settheCommandto ("mkdir -p '" & theTmpPath& "/Common'") astext
do shell scripttheCommandwithadministrator privileges
settheCommandto ("mv -f '" & theUserBridgeDir& "Adobe/Common' '" & theTmpPath& "/Common'") astext
do shell scripttheCommandwithadministrator privileges
onerror
log"Commonキャッシュがありませんでした"
endtry
-----Preferencesクリア
try
settheUserBridgeDirtopath topreferences folderfromuser domain
settheUserBridgeDirto (POSIX pathoftheUserBridgeDir) astext
settheCommandto ("mkdir -p '" & theTmpPath& "/Preferences'") astext
do shell scripttheCommandwithadministrator privileges
settheCommandto ("mv -f '" & theUserBridgeDir& "Adobe/Bridge' '" & theTmpPath& "/Preferences'") astext
do shell scripttheCommandwithadministrator privileges
onerror
log"Preferencesディレクトリがありませんでした"
endtry
-----plistクリア
try
settheUserBridgeDirtopath topreferences folderfromuser domain
settheUserBridgeDirto (POSIX pathoftheUserBridgeDir) astext
settheCommandto ("mkdir -p '" & theTmpPath& "/Preferences'") astext
do shell scripttheCommandwithadministrator privileges
settheCommandto ("mv -f '" & theUserBridgeDir& "com.adobe.bridge6.3.plist' '" & theTmpPath& "/Preferences'") astext
do shell scripttheCommandwithadministrator privileges
onerror
log"plistがありませんでした"
endtry
-----Cachesクリア
try
settheUserBridgeDirtopath tolibrary folderfromuser domain
settheUserBridgeDirto (POSIX pathoftheUserBridgeDir) astext
settheCommandto ("mkdir -p '" & theTmpPath& "/Caches'") astext
do shell scripttheCommandwithadministrator privileges
settheCommandto ("mv -f '" & theUserBridgeDir& "Caches/Adobe' '" & theTmpPath& "/Caches'") astext
do shell scripttheCommandwithadministrator privileges
onerror
log"Caches Adobeがありませんでした"
endtry
-----Cachesクリア Bridge CC 2015 version 6.3
try
settheUserBridgeDirtopath tolibrary folderfromuser domain
settheUserBridgeDirto (POSIX pathoftheUserBridgeDir) astext
settheCommandto ("mkdir -p '" & theTmpPath2015& "/Caches'") astext
do shell scripttheCommandwithadministrator privileges
settheCommandto ("mv -f '" & theUserBridgeDir& "Caches/com.adobe.bridge6.3' '" & theTmpPath2015& "/Caches'") astext
do shell scripttheCommandwithadministrator privileges
onerror
log"Caches Bridgeがありませんでした"
endtry
-----temporary itemsクリア
try
settheUserBridgeDirtopath totemporary items
settheUserBridgeDirto (POSIX pathoftheUserBridgeDir) astext
settheCommandto ("mkdir -p '" & theTmpPath& "/TemporaryItems'") astext
do shell scripttheCommandwithadministrator privileges
settheCommandto ("mv -f '" & theUserBridgeDir& "Adobe' '" & theTmpPath& "/TemporaryItems'") astext
do shell scripttheCommandwithadministrator privileges
onerror
log"temporary Adobeがありませんでした"
endtry
-----temporary itemsクリア
try
settheUserBridgeDirtopath totemporary items
settheUserBridgeDirto (POSIX pathoftheUserBridgeDir) astext
settheCommandto ("mkdir -p '" & theTmpPath& "/TemporaryItems'") astext
do shell scripttheCommandwithadministrator privileges
settheCommandto ("mv -f '" & theUserBridgeDir& "Adobe Output Module' '" & theTmpPath& "/TemporaryItems'") astext
do shell scripttheCommandwithadministrator privileges
onerror
log"temporary Adobe Output Moduleがありませんでした"
endtry
return"AOM(Adobe Output Module)のインストールが終了しました\rブリッジを起動させて出力パネルを確認してください\rテンポラリフォルダの中身は次回起動時に消去されます"
--------------------------------------------------#ここからサブルーチン
todoDateAndTIme(theDate)
setyto (yearoftheDate)
setmtomymonthNumStr(monthoftheDate)
setdtodayoftheDate
sethmstotimeoftheDate
sethhtohofsec2hms(hms)
setmmtomofsec2hms(hms)
setsstosofsec2hms(hms)
return (yastext) & myzero1(m) & myzero1(d) & "_" & zero1(hh) & zero1(mm) & zero1(ss)
return (yastext) & myzero1(m) & myzero1(d)
enddoDateAndTIme
------------------------------
tomonthNumStr(theMonth)
setmonListto {January, February, March, April, May, June, July, August, September, October, November, December}
repeatwithifrom 1 to 12
ifitemiofmonLististheMonththenexitrepeat
endrepeat
returni
endmonthNumStr
------------------------------
tosec2hms(sec)
setretto {h:0, m:0, s:0}
sethofrettosecdivhours
setmofretto (sec - (hofret) * hours) divminutes
setsofrettosecmodminutes
returnret
endsec2hms
------------------------------
tozero1(n)
ifn< 10 then
return"0" & n
else
returnnastext
endif
endzero1
「Install_Adobe_Output_Module_CC2015.20160831.zip」をダウンロード