【发布时间】:2010-11-03 15:31:53
【问题描述】:
所以我最近为 zsh 脚本制作了一个 .app 包装器,但是当我运行它时,应用程序的图标一直在 Dock 中跳跃。
该应用程序基本上是:
% find Example.app -type f
Example.app/Contents/Info.plist
Example.app/Contents/MacOS/wrapper.sh
% cat Example.app/Contents/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>
<!-- tell OSX what the name of the executable is -->
<key>CFBundleExecutable</key>
<string>wrapper.sh</string>
</dict>
</plist>
% cat Example.app/Contents/MacOS/wrapper.sh
#!/usr/bin/env zsh
# not my real script, but something else that hangs for a while
sleep 10
%
你也可以grab it from github。
有什么方法可以让应用程序图标停止跳动,像普通应用程序一样运行,然后坐在那里 旁边有一个三角形?
【问题讨论】: