feat(build): 更新构建脚本添加资源打包和proto编译

更新build.bat脚本,添加proto文件编译和资源打包功能,调整资源打包顺序。

BREAKING CHANGE: 构建流程发生变化,需要重新生成proto文件和打包资源。

---

refactor(xmlres): 使用gres替换gfile读取资源文件

将xmlres模块中文件读取方式从gfile.GetBytes改为gres.GetContent,
使
This commit is contained in:
2026-01-01 19:57:39 +08:00
parent d88a2d19ea
commit dd28d48ca4
23 changed files with 270 additions and 138 deletions

View File

@@ -3,6 +3,7 @@ package xmlres
import (
"blazing/common/utils"
_ "blazing/common/data/xmlres/packed"
"encoding/json"
"os"
@@ -11,6 +12,7 @@ import (
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/os/gfsnotify"
"github.com/gogf/gf/v2/os/glog"
"github.com/gogf/gf/v2/os/gres"
"github.com/gogf/gf/v2/util/gconv"
)
@@ -20,7 +22,8 @@ func getXml[T any](path string) T {
// 解析XML到结构体
var xmls T
t1 := gfile.GetBytes(path)
t1 := gres.GetContent(path)
xml.Unmarshal(t1, &xmls)
return xmls
@@ -29,7 +32,7 @@ func getJson[T any](path string) T {
// 解析XML到结构体
var xmls T
t1 := gfile.GetBytes(path)
t1 := gres.GetContent(path)
json.Unmarshal(t1, &xmls)
return xmls
@@ -58,8 +61,10 @@ var (
)
func Initfile() {
//gres.Dump()
path1, _ := os.Getwd()
path = path1 + "/public/config/"
path = "config/"
MapConfig = getXml[Maps](path + "210.xml")
EffectArgs = make(map[int]int)

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
E:/newcode/sun/public