macOS Sierra および iOS Simulator 向けの Debugger Hotfix がリリースされました [JAPAN]

Posted by on in Programming

2017/1/11付けの David Millington 氏のブログ記事にて案内されていますとおり、macOS Sierra および iOS Simulator 向けの Debugger Hotfix がリリースされました。

Hotfix は下記URLよりダウンロードできます。
http://cc.embarcadero.com/item/30680

この Hotfix をインストールすることで、macOS Sierra や iOS Simulator 向けのデプロイやデバッグに関する問題が解消されます。

なお、readme にて説明されているインストール手順が少々冗長でしたので、これをもうちょっとシンプルに行う方法をご案内します。

 

ホットフィックスに添付の readme ではこういう手順が紹介されています。

#
# インストール対象ファイルのバックアップを取る
sudo mv /Applications/PAServer-18.0.app/Contents/MacOS/paserver  /Applications/PAServer-18.0.app/Contents/MacOS/paserver.bak
sudo mv /Applications/PAServer-18.0.app/Contents/MacOS/iosgdb  /Applications/PAServer-18.0.app/Contents/MacOS/iosgdb.bak
sudo mv /Applications/PAServer-18.0.app/Contents/MacOS/dbkosx_24_0  /Applications/PAServer-18.0.app/Contents/MacOS/dbkosx_24_0.bak
sudo mv /Applications/PAServer-18.0.app/Contents/MacOS/dbk_24_0.dylib  /Applications/PAServer-18.0.app/Contents/MacOS/dbk_24_0.dylib.bak

# ファイルをコピーする
sudo cp ~/Downloads/paserver /Applications/PAServer-18.0.app/Contents/MacOS
sudo cp ~/Downloads/iosgdb /Applications/PAServer-18.0.app/Contents/MacOS
sudo cp ~/Downloads/dbkosx_24_0 /Applications/PAServer-18.0.app/Contents/MacOS
sudo cp ~/Downloads/dbk_24_0.dylib /Applications/PAServer-18.0.app/Contents/MacOS

# ファイルの owner を root にする
sudo chown root /Applications/PAServer-18.0.app/Contents/MacOS/paserver
sudo chown root /Applications/PAServer-18.0.app/Contents/MacOS/iosgdb
sudo chown root /Applications/PAServer-18.0.app/Contents/MacOS/dbkosx_24_0
sudo chown root /Applications/PAServer-18.0.app/Contents/MacOS/dbk_24_0.dylib

# ファイルの group を wheel にする
sudo chgrp wheel /Applications/PAServer-18.0.app/Contents/MacOS/paserver
sudo chgrp wheel /Applications/PAServer-18.0.app/Contents/MacOS/iosgdb
sudo chgrp wheel /Applications/PAServer-18.0.app/Contents/MacOS/dbkosx_24_0
sudo chgrp wheel /Applications/PAServer-18.0.app/Contents/MacOS/dbk_24_0.dylib

# ファイルのパーミッションを 755 or 644 にする
sudo chmod 755 /Applications/PAServer-18.0.app/Contents/MacOS/paserver
sudo chmod 755 /Applications/PAServer-18.0.app/Contents/MacOS/iosgdb
sudo chmod 755 /Applications/PAServer-18.0.app/Contents/MacOS/dbkosx_24_0
sudo chmod 644 /Applications/PAServer-18.0.app/Contents/MacOS/dbk_24_0.dylib

うーん、ちょっと多すぎますね……。コピペするにしても数が多すぎると間違えそうです。chown root と chgrp wheel を chown root:wheel とすれば4行減らせるのですが、それでもちょいと多い……。

そこでこれをこんなふうに縮めてみます。

#
# install コマンドで一連の処理を纏める例
# -b : ファイルのバックアップを *.old という名前で作る。
# -p : コピー元ファイルの日付時刻を維持する。
# -o : owner を指定する
# -g : group を指定する
# -m : ファイルのパーミッションを指定する

sudo install -b -p -o root -g wheel -m 755 paserver iosgdb dbkosx_24_0 /Applications/PAServer-18.0.app/Contents/MacOS/
sudo install -b -p -o root -g wheel -m 644 dbk_24_0.dylib /Applications/PAServer-18.0.app/Contents/MacOS/

install コマンドは Unix 系の OS でサポートされているコマンドで、ファイルのインストールに伴うコピーや所有者変更、パーミッション変更を一括で行う機能を提供してくれます。

上記のコマンドを実行すると、対象ファイルのバックアップや新しいファイルのインストールが行えます。実際の結果は以下のようになります。

$ (cd /Applications/PAServer-18.0.app/Contents/MacOS/ ; ls -l dbk_24_0.dylib* dbkosx_24_0* iosgdb* paserver paserver.old)
-rw-r--r--  1 root  wheel  1425696  1 10 12:40 dbk_24_0.dylib
-rwxr-xr-x  1 root  wheel  1425656 11  9 17:15 dbk_24_0.dylib.old
-rwxr-xr-x  1 root  wheel   793184  1 10 12:40 dbkosx_24_0
-rwxr-xr-x  1 root  wheel   792944 11  9 17:15 dbkosx_24_0.old
-rwxr-xr-x  1 root  wheel  6052432  1 10 12:40 iosgdb
-rwxr-xr-x  1 root  wheel  6052432 11  9 17:15 iosgdb.old
-rwxr-xr-x  1 root  wheel  8267255  1 10 12:40 paserver
-rwxr-xr-x  1 root  wheel  8263159 11  9 17:15 paserver.old

これでスッキリしましたね。この HotFix をインストールする際はぜひお試しください。

 


About
Gold User, No rank,
Sales Consultant at Embarcadero Technologies, in Japan.

Comments

Check out more tips and tricks in this development video: