Skip to content

Commit e6d195e

Browse files
committed
[[ Installer ]] Add 'installer command line' environment and use in installer stack
The installer stack was explicitly handing the 'noui' command line option. This patch adds an 'installer command line' environment value which is true if -ui is passed as an argument to the executable, so that faceless install depends on the environment, for consistency with development mode.
1 parent 5b565c1 commit e6d195e

4 files changed

Lines changed: 8 additions & 2 deletions

File tree

builder/installer.rev

-111 Bytes
Binary file not shown.

engine/src/mcstring.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ MCNameRef MCN_development;
218218
MCNameRef MCN_development_cmdline;
219219
MCNameRef MCN_helper_application;
220220
MCNameRef MCN_installer;
221+
MCNameRef MCN_installer_cmdline;
221222
MCNameRef MCN_mobile;
222223
MCNameRef MCN_player;
223224
MCNameRef MCN_server;
@@ -689,6 +690,7 @@ void MCU_initialize_names(void)
689690
/* UNCHECKED */ MCNameCreateWithCString("development command line", MCN_development_cmdline);
690691
/* UNCHECKED */ MCNameCreateWithCString("helper application", MCN_helper_application);
691692
/* UNCHECKED */ MCNameCreateWithCString("installer", MCN_installer);
693+
/* UNCHECKED */ MCNameCreateWithCString("installer command line", MCN_installer_cmdline);
692694
/* UNCHECKED */ MCNameCreateWithCString("mobile", MCN_mobile);
693695
/* UNCHECKED */ MCNameCreateWithCString("player", MCN_player);
694696
/* UNCHECKED */ MCNameCreateWithCString("server", MCN_server);
@@ -1155,6 +1157,7 @@ void MCU_finalize_names(void)
11551157
MCNameDelete(MCN_development_cmdline);
11561158
MCNameDelete(MCN_helper_application);
11571159
MCNameDelete(MCN_installer);
1160+
MCNameDelete(MCN_installer_cmdline);
11581161
MCNameDelete(MCN_mobile);
11591162
MCNameDelete(MCN_player);
11601163
MCNameDelete(MCN_server);

engine/src/mcstring.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ extern MCNameRef MCN_development;
169169
extern MCNameRef MCN_development_cmdline;
170170
extern MCNameRef MCN_helper_application;
171171
extern MCNameRef MCN_installer;
172+
extern MCNameRef MCN_installer_cmdline;
172173
extern MCNameRef MCN_mobile;
173174
extern MCNameRef MCN_player;
174175
extern MCNameRef MCN_server;

engine/src/mode_installer.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,10 +1472,12 @@ IO_stat MCModeCheckSaveStack(MCStack *sptr, const MCStringRef filename)
14721472
return IO_NORMAL;
14731473
}
14741474

1475-
// In standalone mode, the environment depends on various command-line/runtime
1476-
// globals.
1475+
// In installer mode, the environment depends on the command line args
14771476
MCNameRef MCModeGetEnvironment(void)
14781477
{
1478+
if (MCnoui)
1479+
return MCN_installer_cmdline;
1480+
14791481
return MCN_installer;
14801482
}
14811483

0 commit comments

Comments
 (0)