> Start with emacs.exe alone, and then add *.elc files according to
> error messages you get. You will need lisp/term/w32-win.el at least,
> but other than that, I don't know.
I see you'd also need simple.elc (because we look for it at startup),
and with Emacs before 27 also mule-util.elc. Emacs will probably
complain about a missing libexec directory, so create it.
Got it to work.
Here seems to be the bare minimum structure needed for Emacs 26.3 on Windows 10:
... a lot of map files goes here ..
I could then successfully do this (from cmd.exe, a similar command also worked from Git Bash)
C:\...> bin\emacs.exe --batch -Q --eval "(princ """This is cool!""")"
This is cool!
I might write up something more detailed on EmacsWiki later. It took a bit of trial and error to get it to work and the error messages are only partly helpful (they mention looking in c:\emacs, a folder that does not exist, and which is not needed).
One thing that I noticed is the HUGE difference in size of the exe file between Emacs 24 and later versions. I listed the sizes of the folder when I keep my different Emacs versions:
Now, I can probably use an old version for the mentioned scenarios (using Emacs as a kind of scripting engine), but I am curious about the jump in sizes. I assume that later versions include something that was earlier "outside", in separate files, is that right? If I wanted to, could I reduce the size by building Emacs myself? Is this in some way related to "dumping Emacs"?