是否可以关闭 + 更新 Mac?当我只想单击更新并回家时,等待它重新启动很烦人。
我曾经在 MacBook 上见过这个,但我不知道怎么做。
Mac OS X 10.6
我创建了一个非常简单的应用程序,它只是一个 shell 脚本的包装器(这样我就可以在应用程序选择器中选择这个脚本,比如启动应用程序)。我尝试启动它,昨天它起作用了,但是今天我更改了可执行脚本的内容和名称(在终端中启动的 shell 脚本中使用完美的东西),它只会显示一个带有 Finder 图标的对话框,说
无法打开该应用程序,因为此类 Mac 不支持该应用程序。
我恢复了以前的脚本(内容/名称),但仍然出现错误!从头开始重新捆绑应用程序或完全更改捆绑标识符时相同......
如果我尝试使用在终端中打开它open My.app,我会得到
无法打开该应用程序,因为它的可执行格式不正确。
但是当我直接执行 时Contents/MacOS/Script,它始终有效(同时包含两个内容)。此外,它在 Finder 中显示正确的图标和元信息(所以我猜 Info.plist 被理解)。
该应用程序的文件树是:
Contents/
Info.plist
MacOS/
Script (executable bit set, works when launched directly)
PkgInfo
Resources/
AppIcon.icns
Run Code Online (Sandbox Code Playgroud)
以下是Info.plist内容:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>Script</string>
<key>CFBundleIconFile</key>
<string>AppIcon</string>
<key>CFBundleIdentifier</key>
<string>asdf.ScriptApp</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>My script</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>10.4</string> …Run Code Online (Sandbox Code Playgroud)