Building with command line params

33 views
Skip to first unread message

Andrew Truckle

unread,
Nov 14, 2025, 4:08:25 PMNov 14
to innosetup
When using the IDE itself we can specify  parameters for when "running" the built installer.

But, there is no way to specify the parameters that we might want to pass to it for "building" the install. I have a script that builds both x64 and x86 and it determines with a command line param. I can compie by command line of course or throgugh batch. But  I would like ability to compile in demand the scenario I am interested in from inside the editor. So this needs ability to set command line params for build.

Martijn Laan

unread,
Nov 14, 2025, 4:53:59 PMNov 14
to innosetup
Just put a #define at the top of your script? Either temporarly, or permanently but commented out.

Greetings,
Martijn 

-------- Original Message --------

On Friday, 11/14/25 at 22:08 Andrew Truckle <truc...@gmail.com> wrote:
When using the IDE itself we can specify  parameters for when "running" the built installer.

But, there is no way to specify the parameters that we might want to pass to it for "building" the install. I have a script that builds both x64 and x86 and it determines with a command line param. I can compie by command line of course or throgugh batch. But  I would like ability to compile in demand the scenario I am interested in from inside the editor. So this needs ability to set command line params for build.

--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/innosetup/6a32c287-851b-4a12-bffa-f316b9dae0c8n%40googlegroups.com.

Andrew Truckle

unread,
Nov 14, 2025, 5:22:55 PMNov 14
to inno...@googlegroups.com
Ah, sure. Like #define WIN64. 

You received this message because you are subscribed to a topic in the Google Groups "innosetup" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/innosetup/OTUwzSHjlrU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to innosetup+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/innosetup/176315723365.7.6471636947133121510.1007335887%40innosetup.nl.

Gavin Lambert

unread,
Nov 16, 2025, 7:01:14 PM (12 days ago) Nov 16
to innosetup
On Saturday, November 15, 2025 at 10:53:59 AM UTC+13 Martijn Laan wrote:
Just put a #define at the top of your script? Either temporarly, or permanently but commented out.

A useful trick (if you're using an actual value and not merely #ifdef) is to use these sorts of blocks in your script:

#ifndef SOME_VALUE
#define SOME_VALUE "Default Value"
#endif

This provides a default value when compiling in the IDE while still allowing you to override it when building from the command line.

For "pure" #ifdef, you can either convert it to using literal 0/1/true/false values, or just have a define you can comment out as needed -- but this will break your command line builds if you forget to comment or delete it once you're done testing.
Reply all
Reply to author
Forward
0 new messages