Bridge Help / Install Adobe Output Module
https://helpx.adobe.com/bridge/kb/install-output-module-bridge-cc.html
以前にも記事にしました
http://force4u.cocolog-nifty.com/skywalker/2014/01/adobe-bridge-ou.html
いまさら…な感じですが…
今の現場は複数のアカウントで同じMacを利用するので
アクセス権の問題が出る
現場ではRemote Desktopのサイレントインストールで修正しているが
家で仕事している人に頼まれたのでスクリプトにした
アクセス権の問題は以下を参照ください
ユーザー以外にアクセス権が無いファイルを
『移動』で手動インストールするために
インストールした人以外が利用出来ない…って事になります。
「Install_Adobe_Output_Module.scpt.zip」をダウンロード
(*
AOM(Adobe Output Module)インストーラー
20151219 初回作成
AOM(Adobe Output Module)のMac版は
解凍時のアクセス権の影響で
複数の人が同じ機器を利用する場合
インストールした人以外が出力パネルを利用出来ない(エラーになる)
インストールからアクセス権設定までを自動化して
トラブル防止用に作成した
業務用に作成した物を可読性を配慮して作り直した
アクセス権でstaffにフルアクセス権を付けている(ここは好みの問題)
Bridge Help / Install Adobe Output Module
https://helpx.adobe.com/bridge/kb/install-output-module-bridge-cc.html
*)
---日付けと時間からテンポラリー用のフォルダ名を作成
settheNowTimeto (mydoDateAndTIme(current date)) astext
---テンポラリー用フォルダのパスを定義
settheTrashDirto ("/tmp/" & theNowTime) astext
-----テンポラリーフォルダを作成
try
settheCommandto ("mkdir -pv " & theTrashDir) astext
settheTmpPathto (do shell scripttheCommand) astext
delay 1
onerror
return"テンポラリフォルダ作成でエラーが発生しました"
endtry
-----ファイルをダウンロード
try
settheCommandto ("curl -o '" & theTmpPath& "/AOM_Mac_New.zip' 'https://helpx.adobe.com/content/help/en/bridge/kb/install-output-module-bridge-cc/_jcr_content/main-pars/download_1/file.res/AOM_Mac_New.zip'") astext
do shell scripttheCommand
delay 1
onerror
return"ダウンロードでエラーが発生しました"
endtry
-----ファイルを解凍
try
settheCommandto ("unzip '" & theTmpPath& "/AOM_Mac_New.zip' -d '" & theTmpPath& "'") astext
do shell scripttheCommand
delay 1
onerror
return"ファイルの解凍でエラーが発生しました"
endtry
-----インストール先のフォルダを確保
try
settheCommandto ("sudo mkdir -p '/Library/Application Support/Adobe/Bridge CC Extensions'") astext
do shell scripttheCommand
settheCommandto ("sudo mkdir -p '/Library/Application Support/Adobe/Bridge CC 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 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 Extensions'") astext
do shell scripttheCommandwithadministrator privileges
onerror
settheCommandto ("sudo mv -f '/Library/Application Support/Adobe/Bridge CC 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 Extensions'") astext
do shell scripttheCommandwithadministrator privileges
endtry
-----アクセス権を修正775(アクセス権は好みで)
try
settheCommandto ("sudo chown -Rf root '/Library/Application Support/Adobe/Bridge CC Extensions/Adobe Output Module'") astext
do shell scripttheCommandwithadministrator privileges
settheCommandto ("sudo chgrp -Rf staff '/Library/Application Support/Adobe/Bridge CC Extensions/Adobe Output Module'") astext
do shell scripttheCommandwithadministrator privileges
settheCommandto ("sudo chmod -Rf 775 '/Library/Application Support/Adobe/Bridge CC 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 Extensions/Workspaces/AdobeOutputModule.workspace'") astext
do shell scripttheCommandwithadministrator privileges
settheCommandto ("sudo chgrp -Rf staff '/Library/Application Support/Adobe/Bridge CC Extensions/Workspaces/AdobeOutputModule.workspace'") astext
do shell scripttheCommandwithadministrator privileges
settheCommandto ("sudo chmod -Rf 775 '/Library/Application Support/Adobe/Bridge CC Extensions/Workspaces/AdobeOutputModule.workspace'") astext
do shell scripttheCommandwithadministrator privileges
onerror
return"アクセス権修正でエラーが発生しました"
endtry
-----キャッシュクリア
try
settheUserBridgeDirtopath toapplication support folderfromuser domain
settheUserBridgeDirto (POSIX pathoftheUserBridgeDir) astext
settheCommandto ("mv -f '" & theUserBridgeDir& "Adobe/Bridge CC/Workspaces/!!-$$$AdobeOutputModule.workspace' '" & theTmpPath& "'") astext
do shell scripttheCommand
onerror
-----ここはエラー制御なし
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