23
21

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

goで作るexeファイルにアイコンを埋め込んでみる (Windows)

Last updated at Posted at 2014-06-28

(2025-06-12:更新版の記事を作成しました → Goで作るexeファイルにアイコンとかライセンス情報とか git の tag から得たバージョンなどを埋め込んでみる #Go - Qiita

参考サイト

やってみた

go get github.com/akavel/rsrc
cd %GOPATH%/src/github.com/akavel/rsrc
go build
copy rsrc.exe %HOME%\bin\.

cd (自分のソースディレクトリ)
rsrc -ico nyagos.ico -o nyagos.syso

作成された「nyagos.syso」は、組み込まれる go ソースのあるのと同じフォルダに置いておけば「go build」で自動的に組み込まれるとある。

注意すべきこと

go build だと組み込まれるが、go build nyagos.go など、具体的なソース名を引数に指定してしまうとアウトらしい。

余談

アイコンは DotWorkというツールで作りました。

23
21
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
23
21

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?