Skip to content

Commit

Permalink
installer: allow overriding defaults via command-line
Browse files Browse the repository at this point in the history
In some circumstances, different default settings are more appropriate
than the ones we set, e.g. when Git for Windows is offered as a
3rd-party add-on of a larger software suite.

With this patch, it is now possible to override the defaults via the
command-line, overriding even settings from an .inf file proveded via
the /LOADINF option. The syntax of the new family of command line
options is

	/o:<key>=<value>

where <key> and <value> are identical to the corresponding .inf
settings, i.e. <key> does not contain spaces. Example:

	<installer.exe> /o:PathOption=Cmd

This closes git-for-windows/git#575

Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
dscho committed Dec 19, 2015
1 parent 9c9502b commit 8764c72
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion installer/install.iss
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,11 @@ begin
NoSpaces:=Key;
StringChangeEx(NoSpaces,' ','',True);
if ShouldLoadInf then
// Interpret /o:PathOption=Cmd and friends
Result:=ExpandConstant('{param:o:'+NoSpaces+'| }');
if Result<>' ' then
Log('Parameter '+Key+'='+Result+' set via command-line')
else if ShouldLoadInf then
// Use settings from the user provided INF.
// .inf files do not like keys with spaces.
Result:=LoadInfString('Setup',NoSpaces,Default)
Expand Down

0 comments on commit 8764c72

Please sign in to comment.