Quasar CLI with Webpack - @quasar/app-webpack
就图标而言,Capacitor 是所有构建目标中最复杂的一个,因为不仅需要将图标放在特定的文件夹中,还需要在两个平台(Android、iOS)的配置文件中注册它们。
如果您发现有新增的或遗漏的文件,请提交一个 issue。
Icon Genie CLI
提示
我们强烈推荐使用 Icon Genie CLI,只需提供一个资源图标,它就能自动克隆、缩放、压缩图标,并将其放置到正确的目录中。需要时它还会提醒您将哪些标签添加到 /index.html 文件中。
通过 Icon Genie CLI 快速生成所需的图标,关于完整的命令列表和配置参数请移步 Icon Genie CLI 页面。
$ icongenie generate -m capacitor -i /path/to/source/icon.png [-b /path/to/background.png]content_paste
根据您使用的打包器(@electron/packager 或 electron-builder),请参阅它们的文档了解如何关联图标。
手动配置
如果您没有使用 Icon Genie 应用扩展,以下是需要替换的文件:
./
android/
app/
src/
main/
res/
drawable/
splash.png
drawable-land-hdpi/
splash.png
drawable-land-mdpi/
splash.png
drawable-land-xhdpi/
splash.png
drawable-land-xxhdpi/
splash.png
drawable-land-xxxhdpi/
splash.png
drawable-port-hdpi/
splash.png
drawable-port-mdpi/
splash.png
drawable-port-xhdpi/
splash.png
drawable-port-xxhdpi/
splash.png
drawable-port-xxxhdpi/
splash.png
mipmap-hdpi/
ic_launcher.png
ic_launcher_foreground.png
ic_launcher_round.png
mipmap-mdpi/
ic_launcher.png
ic_launcher_foreground.png
ic_launcher_round.png
mipmap-xhdpi/
ic_launcher.png
ic_launcher_foreground.png
ic_launcher_round.png
mipmap-xxhdpi/
ic_launcher.png
ic_launcher_foreground.png
ic_launcher_round.png
mipmap-xxhdpi/
ic_launcher.png
ic_launcher_foreground.png
ic_launcher_round.png
ios/
App/
App/
Assets.xcassets/
AppIcon.appiconset/
AppIcon-20x20@1x.png
AppIcon-20x20@2x-1.png
AppIcon-20x20@2x.png
AppIcon-20x20@3x.png
AppIcon-29x29@1x.png
AppIcon-29x29@2x-1.png
AppIcon-29x29@2x.png
AppIcon-29x29@3x.png
AppIcon-40x40@1x.png
AppIcon-40x40@2x-1.png
AppIcon-40x40@2x.png
AppIcon-40x40@3x.png
AppIcon-512@2x.png
AppIcon-60x60@2x.png
AppIcon-60x60@3x.png
AppIcon-76x76@1x.png
AppIcon-76x76@2x.png
AppIcon-83.5x83.5@2x.png
Splash.imageset/
splash-2732x2732-1.png
splash-2732x2732-2.png
splash-2732x2732.png