跳到主要内容

pmake

简介

二进制归档文件的构建、加载工具

这个pkg是对gs内建的archive_builder进行的扩展

不再推荐使用pkg.pmake执行打包

请使用pkg.pmake2或者更易用的pkg.deploy,直接通过gs语言编写打包代码

组件接口

样例

require_root ./

output ./test/output

var TEST_NAME ("a test name")

outfile /@publish/output/sample.txt (
\# generated by gs at $str_sub($date(),0,3)-$str_sub($date(),4,7)-$str_sub($date(),8,-1)
content is:
$str_replace($json($file(/test/a.json),a/b),\,,**)
)

#展开字符串
message $expand_text($file(/test/a.txt))

message (lower-->$str_lower("HELLO WORLD"))
message (upper-->$str_upper("hello world"))
message $script_arg(v0)
message $env(git_commit_version)

function F0 ((int x, int y) {
return x + y;
})

message $function(F0,100,200)

var TEMPLATE_NAME include.txt

include /test/${TEMPLATE_NAME}