Bootstrap trick

A simple way around the script.c problem, unless you already do something like this. I expect you do.

Exclude scripts.c in premake4.lua

Inside this existing #if
#if defined(NODEBUG)
#include "scripts.c"

Most compilers will accept missing externals which are not referenced.

Therefore use the normal make debug, scripts.c is not required.

An exe now exists which can embed and off we go, we are booted without a binary.

It would be neat if premake could include scripts.c in release build only. Is this possible?

It doesn't look like the 'files' function and 'excludes' function works at the configuration level. Otherwise you'd be able to just modify the premake4.lua to include scripts.c in the release config and exclude that file from debug config.

I wonder if it makes sense to add support for this.

Another use comes to mind.

exclude myresource.rc

and maybe
includ dummy.rc

Yup, per-config file/exclude lists is something my current refactoring is should enable. We first need to standardized the source code file handling, and then we can start building the support for each of the toolsets from there.