我正在尝试为应用程序创建一个iconset,但是当我创建它时继续出错: Hexchat.iconset:error: Failed to generate ICNS.
我尝试从Illustrator单独导出.png文件,以及使用脚本.使用1024x1024 png文件的当前脚本Hexchat_8.png:
mkdir Hexchat.iconset
sips -z 16 16 Hexchat_8.png --out Hexchat.iconset/hexchat_16x16.png
sips -z 32 32 Hexchat_8.png --out Hexchat.iconset/hexchat_16x16@2x.png
sips -z 32 32 Hexchat_8.png --out Hexchat.iconset/hexchat_32x32.png
sips -z 64 64 Hexchat_8.png --out Hexchat.iconset/hexchat_32x32@2x.png
sips -z 128 128 Hexchat_8.png --out Hexchat.iconset/hexchat_128x128.png
sips -z 256 256 Hexchat_8.png --out Hexchat.iconset/hexchat_128x128@2x.png
sips -z 256 256 Hexchat_8.png --out Hexchat.iconset/hexchat_256x256.png
sips -z 512 512 Hexchat_8.png --out Hexchat.iconset/hexchat_256x256@2x.png
sips -z 512 512 Hexchat_8.png --out Hexchat.iconset/hexchat_512x512.png
cp Hexchat_8.png Hexchat.iconset/hexchat_512x512@2x.png
iconutil -c …Run Code Online (Sandbox Code Playgroud) 使用Application Loader工具提交我的应用程序时,出现以下错误:
ERROR ITMS-90236: "Missing required icons. The application bundle does not contain an icon in ICNS format, containing both a 512x512 and a 512x512@2x image. For further assistance, see the Apple Human Interface Guidelines."
Run Code Online (Sandbox Code Playgroud)
我的图标(由Info.plist文件引用)包含两个文件,因为它是使用以下命令创建的:
iconutil -c icns icon.iconset
Run Code Online (Sandbox Code Playgroud)
凡icon.iconset文件夹包含以下项目:
-rw-r--r-- 1 martin staff 11K 18 mai 11:24 icon_128x128.png
-rw-r--r-- 1 martin staff 23K 18 mai 11:24 icon_128x128@2x.png
-rw-r--r-- 1 martin staff 3,3K 18 mai 11:24 icon_16x16.png
-rw-r--r-- 1 martin staff …Run Code Online (Sandbox Code Playgroud) 我刚刚安装了macOS High Sierra(10.13)并且我正在尝试更新我编写的教程,该教程展示了如何将Java Swing应用程序(可执行JAR)打包到macOS安装程序中.
该教程的步骤在macOS Serra(10.12)上运行良好.
现在javapackager命令崩溃了:
错误:找不到文件.(-43)存档:/var/folders/c1/hkb.../images/ShowTime/.VolumeIcon.icns
系统信息:
Darwin Comet.local 17.0.0 Darwin Kernel Version 17.0.0: Thu Aug 24 21:48:19 PDT 2017; root:xnu-4570.1.46~2/RELEASE_X86_64 x86_64
java version "9"
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)
Run Code Online (Sandbox Code Playgroud)
重现的简化步骤:
curl --remote-name https://centerkey.com/mac/java/ShowTime.java
javac ShowTime.java
echo "Main-Class: ShowTime" > MainClass.txt
jar cmf MainClass.txt ShowTime.jar *.class
jdk=$(/usr/libexec/java_home)
$jdk/bin/javapackager -deploy -native dmg -name ShowTime \
-srcdir . -srcfiles ShowTime.jar -appclass ShowTime \
-outdir …Run Code Online (Sandbox Code Playgroud) 我在我的 mac 上运行了以下命令并创建了一个 .app 文件。
pyinstaller --icon icon.icns --noconsole -n testApp main.py
Run Code Online (Sandbox Code Playgroud)
但是,生成的 .app 文件不显示图标。
icon.icns 被指定为 info.plist 中的图标文件。
Content/Resouces 文件夹包含 icon.icns。
当我运行 .app 文件时,我在 Dock 上看到一个图标。
但是,该图标不会反映在 .app 文件本身中。为什么是这样?