Skip to content

Commit

Permalink
feat: add manifest, icon and disable win UPX
Browse files Browse the repository at this point in the history
  • Loading branch information
WoozyMasta committed Dec 7, 2024
1 parent e84aeb3 commit 34f74aa
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ dev.env
*.mmdb
*.psd
config.yaml
*.syso
3 changes: 2 additions & 1 deletion tools/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ build() {
go build -ldflags="-s -w -X '$version' -X '$commit' -X '$date'" \
-o "./build/$bin" "$WORK_DIR"/*.go

[[ $GOOS == "darwin" || ($GOOS == "windows" && $GOARCH =~ "arm") ]] && return
[ "$GOOS" = "windows" ] && GOARCH="$GOARCH" go-winres patch --no-backup "./build/$bin"
[ "$GOOS" = "darwin" ] || [ "$GOOS" = "windows" ] && return

if command -v xz &>/dev/null; then
upx --lzma --best "./build/$bin"
Expand Down
2 changes: 2 additions & 0 deletions tools/dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ curl -#Lo upx.tar.xz \
tar -xvf upx.tar.xz --strip-components=1 "upx-$UPX_VERSION-amd64_linux/upx"
chmod +x upx
sudo mv upx /usr/local/bin/

go install github.com/tc-hib/go-winres@latest
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.
61 changes: 61 additions & 0 deletions winres/winres.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"RT_GROUP_ICON": {
"APP": {
"0000": [
"icon.png",
"icon16.png"
]
}
},
"RT_MANIFEST": {
"#1": {
"0409": {
"identity": {
"name": "DayZ Prometheus Metrics Exporter",
"version": ""
},
"description": "Get metrics from BeRCON and Steam A2S for DayZ server",
"minimum-os": "win7",
"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": "0.0.0",
"product_version": "0.0.0"
},
"info": {
"0409": {
"Comments": "",
"CompanyName": "",
"FileDescription": "Get metrics from BeRCON and Steam A2S for DayZ server",
"FileVersion": "",
"InternalName": "DayZ Prometheus Metrics Exporter",
"LegalCopyright": "WoozyMasta",
"LegalTrademarks": "",
"OriginalFilename": "dayz-exporter.exe",
"PrivateBuild": "",
"ProductName": "DayZ Prometheus Metrics Exporter",
"ProductVersion": "",
"SpecialBuild": ""
}
}
}
}
}
}

0 comments on commit 34f74aa

Please sign in to comment.