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

@@ -10,10 +10,17 @@ const TableNameServerList = "server_list"
// ServerList mapped from table <server_list>
type ServerList struct {
*cool.Model
OnlineID uint16 `gorm:"column:online_id;comment:'在线ID';uniqueIndex" json:"online_id"`
//IP string `gorm:"type:varchar(16);comment:'服务器IP'" json:"ip"`
Port uint16 `gorm:"comment:'端口号,通常是小整数'" json:"port"`
//IsOpen bool `gorm:"default:true;not null;comment:'服务器是否开启,默认为开启状态'" json:"is_open"`
OnlineID uint16 `gorm:"column:online_id;comment:'在线ID';uniqueIndex" json:"online_id"`
IP string `gorm:"type:string;comment:'服务器IP'" json:"ip"`
Port uint16 `gorm:"comment:'端口号,通常是小整数'" json:"port"`
IsOpen bool `gorm:"default:true;not null;comment:'服务器是否开启,默认为开启状态'" json:"is_open"`
CanPort []uint32 `gorm:"type:jsonb;comment:'可连接端口'" json:"can_port"`
IsVip uint32 `gorm:"default:0;not null;comment:'是否为VIP服务器'" json:"is_vip"`
//服务器异色概率设定ServerList
ShinyRate uint8 `gorm:"default:0;comment:'异色概率'" json:"shiny_rate"`
//服务器天气设定ServerList
WeatherRate uint8 `gorm:"default:0;comment:'天气概率'" json:"weather_rate"`
Desc string `gorm:"comment:'服务器描述'" json:"desc"`
}
// TableName ServerList's table name