Browse Source

初始化应用图标相关问题

master
VIVIMAN 3 years ago
parent
commit
f789d3b03d
  1. 4
      golang_learn/data_func/go_to_windows/build.bat
  2. 4
      golang_learn/data_func/go_to_windows/main.go
  3. BIN
      golang_learn/data_func/go_to_windows/main.ico
  4. BIN
      golang_learn/data_func/go_to_windows/main.syso
  5. BIN
      golang_learn/data_func/go_to_windows/rsrc.syso
  6. BIN
      golang_learn/data_func/go_to_windows/serviceMonitor.ico

4
golang_learn/data_func/go_to_windows/build.bat

@ -1,5 +1,5 @@
set GO111MODULE=on
set GOARCH=386
rsrc -manifest main.manifest -ico serviceMonitor.ico -o rsrc.syso
go build -ldflags="-s -w -H=windowsgui"
rsrc -manifest main.manifest -ico main.ico -o main.syso
go build -ldflags="-s -w -H=windowsgui -X 'main.Version=v1.0.0'"
upx -9 ./go_to_windows.exe

4
golang_learn/data_func/go_to_windows/main.go

@ -1,5 +1,5 @@
// + build windows
// + build 386
// +build windows
//go:generate rsrc -ico main.ico -manifest main.manifest -o main.syso
package main

BIN
golang_learn/data_func/go_to_windows/main.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
golang_learn/data_func/go_to_windows/main.syso

Binary file not shown.

BIN
golang_learn/data_func/go_to_windows/rsrc.syso

Binary file not shown.

BIN
golang_learn/data_func/go_to_windows/serviceMonitor.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Loading…
Cancel
Save