1# 用户指南 2 3## 用户程序配置文件模版 4在dadk-config/templates/config/目录下,可以找到用户程序的配置文件模版`userapp_config.toml` 5```toml 6# 用户程序名称 7name = "userapp_config" 8 9# 版本号 10version = "0.2.0" 11 12# 用户程序描述信息 13description = "" 14 15# (可选)默认: false 是否只构建一次,如果为true,DADK会在构建成功后,将构建结果缓存起来,下次构建时,直接使用缓存的构建结果 16build-once = false 17 18# (可选) 默认: false 是否只安装一次,如果为true,DADK会在安装成功后,不再重复安装 19install-once = false 20 21# 目标架构 22# 可选值:"x86_64", "aarch64", "riscv64" 23target-arch = ["x86_64"] 24 25# 任务源 26[task-source] 27 28# 构建类型 29# 可选值:"build-from_source", "install-from-prebuilt" 30type = "build-from-source" 31 32# 构建来源 33# "build_from_source" 可选值:"git", "local", "archive" 34# "install_from_prebuilt" 可选值:"local", "archive" 35source = "git" 36 37# 路径或URL 38source-path = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/test_git.git" 39 40# git标签或分支 41# 注意: branch和revision只能二选一,且source要设置为"git" 42revision = "01cdc56863" 43# branch = "test" 44 45# 构建相关信息 46[build] 47 48# (可选)构建命令 49build-command = "make install" 50 51# (可选)预构建脚本路径 52pre-build = "config/pre_build.sh" 53 54# (可选)构建后脚本路径 55post-build = "config/post_build.sh" 56 57# 安装相关信息 58[install] 59 60# (可选)安装到DragonOS的路径 61in-dragonos-path = "/bin" 62 63# 清除相关信息 64[clean] 65 66# (可选)清除命令 67clean-command = "make clean" 68 69# (可选)依赖项 70# 注意:如果没有依赖项,忽略此项,不允许只留一个[[depends]] 71[[depends]] 72name = "depend1" 73version = "0.1.1" 74 75[[depends]] 76name = "depend2" 77version = "0.1.2" 78 79# (可选)环境变量 80[[envs]] 81key = "PATH" 82value = "/usr/bin" 83 84[[envs]] 85key = "LD_LIBRARY_PATH" 86value = "/usr/lib" 87 88``` 89 90TODO 91