Skip to content

Commit

Permalink
add winres
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Mar 1, 2023
1 parent 1c274d6 commit d68223f
Show file tree
Hide file tree
Showing 5 changed files with 153 additions and 0 deletions.
87 changes: 87 additions & 0 deletions winres/gen/json.go
Original file line number Diff line number Diff line change
@@ -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)
}
}
Binary file added winres/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added winres/icon16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions winres/init.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Package winres 生成windows资源
package winres

//go:generate go run github.com/FloatTech/ZeroBot-Plugin/winres/gen
62 changes: 62 additions & 0 deletions winres/winres.json
Original file line number Diff line number Diff line change
@@ -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": ""
}
}
}
}
}
}

0 comments on commit d68223f

Please sign in to comment.