1 个不稳定版本
0.4.0 | 2021年11月14日 |
---|
#554 in 构建工具
57KB
1K SLoC
库米泰鲁
库米泰鲁是用于 Garmin ConnectIQ 的构建系统,用 Rust 编写。
它是 Alpha 软件,请注意
项目结构
基本目录结构如下
├── id_rsa_garmin.der
├── kumitateru
├── package.toml
├── resources
│ ├── drawables
│ │ ├── drawables.xml
│ │ └── launcher_icon.png
│ ├── fonts
│ │ └── fenix5
│ ├── layouts
│ ├── menus
│ ├── settings
│ └── strings
│ └── main
│ └── strings.xml
└── src
构建配置
构建配置位于项目根目录,命名为 package.toml
。它看起来是这样的
[package]
name_res = "@Strings.AppName"
icon_resource = "@Drawables.LauncherIcon"
main_class = "MyApp"
# Currently here for the future, exactly for supporting libraries(barrels) as projects, not only apps.
package_type = "app"
app_type = "watch-app"
min_sdk = "1.2.0"
# This property is for setting the SDK, which will be used to build the app
target_sdk = "4.0.4"
[package_meta]
name = "MyApp"
id = "app-id"
version = "1.0.0"
devices = ["fenix6xpro"]
permissions = ["Background"]
languages = ["eng"]
[build]
signing_key = "id_garmin_sign.der"
# This will be, again, for future. Will be used for code analysis, like possible places of crash, bad design, and much more
code_analysis_on_build = false
type_check_level = 0 # Type checking, which was introduced in CIQ 4.0.0. Levels: 0: disable, 1: gradual, 2: informative, 3: strict
compiler_args = "" # If you want some custom parameters, place them here
[dependencies]
"simple-barrel" = ["0.1.0", "simple-barrel-0.1.0.barrel"] # The second entry is a path to the barrel inside of dependencies folder.
目前库米泰鲁不支持外部依赖(或 Garmin 所称的桶),但我以后会想出如何添加它们,特别是当我学习完 Connect IQ 清单和 monkey.jungle 的完整结构后。
使用构建系统
基本构建命令是 ./kumitateru build
,它编译应用程序为 .iq 格式。要为特定设备构建,运行 ./kumitateru build --target <device>
。要为所有设备构建为 .prg,您运行 ./kumitateru build --target all
。
依赖项
~7–16MB
~206K SLoC