foobar
foobar

Reputation: 2941

Compiling and executing an nsi file from another nsi file using nsis code

Suppose I have two nsi files demo.nsi (compiles to demo.exe) and setup.nsi. (compiles to setup.exe). I want to use demo.nsi inside setup.nsi in such a way that when setup.exe is executed, it compiles the demo.nsi, and then executes the demo.exe. Just want to know if that is possible to do in nsis ? Thanks.

Upvotes: 1

Views: 1017

Answers (1)

Seki
Seki

Reputation: 11465

Sure, it could be possible like from e.g. any batch file:

  • you need to call ExecWait to call makensis.exe for the compilation part
  • and you can call the final executable with either ExecWait or Exec depending on you need to wait for the result or not.

Beware that if you want to do that in any host, and not only the one where you prepare your setup, you will have to embed the NSIS distribution in your setup to be able to call makensis.exe and all the included files that could be necessary (included files, plugins, and other resources).

Upvotes: 1

Related Questions