Drawterm.app

以前、DrawtermをApple Script経由で実行する方法を書いたけど、.app化する方がよさそうだ。

方法は次のページを見れば、すぐわかる。

一応やり方を書いておくと、/Applications/Drawterm.app以下のディレクトリ構成は次のようなる。

$ find Drawterm.app          
Drawterm.app
Drawterm.app/Contents
Drawterm.app/Contents/Info.plist
Drawterm.app/Contents/MacOS
Drawterm.app/Contents/MacOS/core.sh
Drawterm.app/Contents/MacOS/drawterm
Drawterm.app/Contents/Resources
Drawterm.app/Contents/Resources/icon.icns

core.shはdrawterm起動用のシェルスクリプト。Info.plistを変更すればファイル名はなんでもよいはず。

#!/bin/sh
/Applications/Drawterm.app/Contents/MacOS/drawterm -a auth.example.com -c cpu.example.com -u oraccha

icon.icnsはアイコンファイル。

Info.plistは次の通り。

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>CFBundleExecutable</key>
    <string>core.sh</string>
    <key>CFBundleIconFile</key>
    <string>icon.icns</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleSignature</key>
    <string>????</string>
  </dict>
</plist>