mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 05:30:07 +08:00
add winres
This commit is contained in:
parent
1c274d6eb8
commit
d68223f63d
87
winres/gen/json.go
Normal file
87
winres/gen/json.go
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
// Package main generates winres.json
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/FloatTech/ZeroBot-Plugin/kanban/banner"
|
||||||
|
)
|
||||||
|
|
||||||
|
const js = `{
|
||||||
|
"RT_GROUP_ICON": {
|
||||||
|
"APP": {
|
||||||
|
"0000": [
|
||||||
|
"icon.png",
|
||||||
|
"icon16.png"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"RT_MANIFEST": {
|
||||||
|
"#1": {
|
||||||
|
"0409": {
|
||||||
|
"identity": {
|
||||||
|
"name": "",
|
||||||
|
"version": ""
|
||||||
|
},
|
||||||
|
"description": "",
|
||||||
|
"minimum-os": "vista",
|
||||||
|
"execution-level": "as invoker",
|
||||||
|
"ui-access": false,
|
||||||
|
"auto-elevate": false,
|
||||||
|
"dpi-awareness": "system",
|
||||||
|
"disable-theming": false,
|
||||||
|
"disable-window-filtering": false,
|
||||||
|
"high-resolution-scrolling-aware": false,
|
||||||
|
"ultra-high-resolution-scrolling-aware": false,
|
||||||
|
"long-path-aware": false,
|
||||||
|
"printer-driver-isolation": false,
|
||||||
|
"gdi-scaling": false,
|
||||||
|
"segment-heap": false,
|
||||||
|
"use-common-controls-v6": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"RT_VERSION": {
|
||||||
|
"#1": {
|
||||||
|
"0000": {
|
||||||
|
"fixed": {
|
||||||
|
"file_version": "%s",
|
||||||
|
"product_version": "%s",
|
||||||
|
"timestamp": "%s"
|
||||||
|
},
|
||||||
|
"info": {
|
||||||
|
"0409": {
|
||||||
|
"Comments": "OneBot plugins based on ZeroBot",
|
||||||
|
"CompanyName": "FloatTech",
|
||||||
|
"FileDescription": "Project: https://github.com/FloatTech/ZeroBot-Plugin",
|
||||||
|
"FileVersion": "%s",
|
||||||
|
"InternalName": "",
|
||||||
|
"LegalCopyright": "%s",
|
||||||
|
"LegalTrademarks": "",
|
||||||
|
"OriginalFilename": "ZBP.EXE",
|
||||||
|
"PrivateBuild": "",
|
||||||
|
"ProductName": "",
|
||||||
|
"ProductVersion": "%s",
|
||||||
|
"SpecialBuild": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}`
|
||||||
|
|
||||||
|
const timeformat = `2006-01-02T15:04:05+08:00`
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
f, err := os.Create("winres.json")
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
defer f.Close()
|
||||||
|
_, err = fmt.Fprintf(f, js, banner.Version, banner.Version, time.Now().Format(timeformat), banner.Version, banner.Copyright, banner.Version)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
winres/icon.png
Normal file
BIN
winres/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
BIN
winres/icon16.png
Normal file
BIN
winres/icon16.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
4
winres/init.go
Normal file
4
winres/init.go
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
// Package winres 生成windows资源
|
||||||
|
package winres
|
||||||
|
|
||||||
|
//go:generate go run github.com/FloatTech/ZeroBot-Plugin/winres/gen
|
||||||
62
winres/winres.json
Normal file
62
winres/winres.json
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
{
|
||||||
|
"RT_GROUP_ICON": {
|
||||||
|
"APP": {
|
||||||
|
"0000": [
|
||||||
|
"icon.png",
|
||||||
|
"icon16.png"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"RT_MANIFEST": {
|
||||||
|
"#1": {
|
||||||
|
"0409": {
|
||||||
|
"identity": {
|
||||||
|
"name": "",
|
||||||
|
"version": ""
|
||||||
|
},
|
||||||
|
"description": "",
|
||||||
|
"minimum-os": "vista",
|
||||||
|
"execution-level": "as invoker",
|
||||||
|
"ui-access": false,
|
||||||
|
"auto-elevate": false,
|
||||||
|
"dpi-awareness": "system",
|
||||||
|
"disable-theming": false,
|
||||||
|
"disable-window-filtering": false,
|
||||||
|
"high-resolution-scrolling-aware": false,
|
||||||
|
"ultra-high-resolution-scrolling-aware": false,
|
||||||
|
"long-path-aware": false,
|
||||||
|
"printer-driver-isolation": false,
|
||||||
|
"gdi-scaling": false,
|
||||||
|
"segment-heap": false,
|
||||||
|
"use-common-controls-v6": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"RT_VERSION": {
|
||||||
|
"#1": {
|
||||||
|
"0000": {
|
||||||
|
"fixed": {
|
||||||
|
"file_version": "v1.6.2",
|
||||||
|
"product_version": "v1.6.2",
|
||||||
|
"timestamp": "2023-03-01T12:44:11+08:00"
|
||||||
|
},
|
||||||
|
"info": {
|
||||||
|
"0409": {
|
||||||
|
"Comments": "OneBot plugins based on ZeroBot",
|
||||||
|
"CompanyName": "FloatTech",
|
||||||
|
"FileDescription": "Project: https://github.com/FloatTech/ZeroBot-Plugin",
|
||||||
|
"FileVersion": "v1.6.2",
|
||||||
|
"InternalName": "",
|
||||||
|
"LegalCopyright": "© 2020 - 2023 FloatTech",
|
||||||
|
"LegalTrademarks": "",
|
||||||
|
"OriginalFilename": "ZBP.EXE",
|
||||||
|
"PrivateBuild": "",
|
||||||
|
"ProductName": "",
|
||||||
|
"ProductVersion": "v1.6.2",
|
||||||
|
"SpecialBuild": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user