I'm trying to make an installer that is a single executable file. I thought I was almost done, but I encountered a problem.
Here is my build script:
windres app.rc -O coff -o app.res
nim c --passL:"-static" --threads:on --opt:size -d:release installer.nim
Here is dumpbin
D:\projects\ahoge\installer>dumpbin /dependents installer.exe
Microsoft (R) COFF/PE Dumper Version 14.35.32217.1
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file installer.exe
File Type: EXECUTABLE IMAGE
Image has the following dependencies:
KERNEL32.dll
msvcrt.dll
...
So I thought it only depended on KERNEL32.dll, and msvcrt.dll. But when I try to test it on a different machine, or with cleared PATH, I get this:
D:\projects\ahoge\installer>.\installer.exe
could not load: pcre64.dll
Here are my imports in installer.nim
import net, strutils, os, json, strformat
import threadpool, browsers, terminal, sequtils
import tables
My "Hello World" test worked fine on all machines I tried. However, not having a single executable is a dealbreaker for me in this scenario.pure nim regex library that does not depend on PCRE
There is tinyre: small, static, fast for small inputs.