$ x86_64-w64-mingw32-gcc -o hello.exe hello.c
$ mix pe.dump hello.exe
Dumping file: hello.exe
=======================
NO RESOURCE TABLE
$ mix pe.checksum hello.exe
hello.exe checksum: 317689, should: 317689 ==> CORRECT!
but not setting the icon. First, this is how I created the icon:
$ curl -LO https://elixir-lang.org/images/logo/logo.png
$ magick logo.png -background none -resize 128x128 -density 128x128 logo.ico
$ mix pe.update --set-icon logo.ico hello.exe
Updating file hello.exe
** (FunctionClauseError) no function clause matching in LibPE.ResourceTable.set_resource/5
The following arguments were given to LibPE.ResourceTable.set_resource/5:
# 1
nil
# 2
3
# 3
<<0, 0, 1, 0, 1, 0, 128, 53, 0, 0, 1, 0, 32, 0, 120, 109, 0, 0, 22, 0, 0, 0, 40, 0, 0, 0, 128, 0, 0, 0, 106, 0, 0, 0, 1, 0, 32, 0, 0, 0, 0, 0, 0, 106, 0, 0, 175, 19, 0, 0, ...>>
# 4
0
# 5
1033
Attempted function clauses (showing 1 out of 1):
def set_resource(table = %LibPE.ResourceTable{entries: entries}, resource_type, data, codepage, language) when is_binary(data)
lib/libpe/resource_table.ex:114: LibPE.ResourceTable.set_resource/5
(elixir 1.14.0-dev) lib/enum.ex:2458: Enum."-reduce/3-lists^foldl/2-0-"/3
lib/mix/tasks/update.ex:58: Mix.Tasks.Pe.Update.update_resources/2
lib/mix/tasks/update.ex:39: anonymous fn/2 in Mix.Tasks.Pe.Update.run/1
(elixir 1.14.0-dev) lib/enum.ex:968: Enum."-each/2-lists^foreach/1-0-"/2
(mix 1.14.0-dev) lib/mix/task.ex:421: anonymous fn/3 in Mix.Task.run_task/4
(mix 1.14.0-dev) lib/mix/cli.ex:84: Mix.CLI.run_task/2
$ mix deps
* libpe 1.1.2 (Hex package) (mix)