You can, of course, call external code from Premake scripts. But remember: Premake scripts are used to create build files: Make files, C ++ projects, etc. Before creating the project, a Premake script is executed.
If you want this preprocess to run outside of the actual build files (rather than make, VC ++, Code :: Blocks, etc.), then this is easy. Lua os.execute will execute the command line.
Premake scripts are still Lua scripts. All Premake commands are just Lua calls for the functions that Premake defines. Premake runs the scripts and then uses the data from them to generate assembly files. This way, all of your Lua code is run at runtime. If you put this command in your script, it does not matter; wherever it is, it will run until build files are created.
source share