Skip to content

Commit

Permalink
Add -norestart option to launcher: rework.
Browse files Browse the repository at this point in the history
- Spaces/tabs consistent with 'nosplash'.
- Removed a 'XXX' to fix a compile error.
- Define 'NORESTART' to fix a compile error.
- Mention which launcher argument disables special exit code handling.
- Launcher argument disables special exit code *handling*.
  • Loading branch information
dhendriks committed Apr 18, 2024
1 parent b7b3f4e commit 2de24d4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ public interface IApplication {
* Exit object requesting platform restart.
*
* <p>
* Note: This special exit code may be disabled by a launcher argument.
* Note: The handling of this special exit code may be disabled by launcher
* argument '-norestart'.
* </p>
*/
public static final Integer EXIT_RESTART = Integer.valueOf(23);
Expand All @@ -50,7 +51,8 @@ public interface IApplication {
* property.
*
* <p>
* Note: This special exit code may be disabled by a launcher argument.
* Note: The handling of this special exit code may be disabled by launcher
* argument '-norestart'.
* </p>
*/
public static final Integer EXIT_RELAUNCH = Integer.valueOf(24);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ home directory.");
static int needConsole = 0; /* True: user wants a console */
static int debug = 0; /* True: output debugging info */
static int noSplash = 0; /* True: do not show splash win */
static int noRestart = 0; /* True: disables the restart behavior of the launcher */
static int noRestart = 0; /* True: disables the restart behavior of the launcher */
static int suppressErrors = 0; /* True: do not display errors dialogs */
int secondThread = 0; /* True: start the VM on a second thread */
static int appendVmargs = 0; /* True: append cmdline vmargs to launcher.ini vmargs */
Expand Down Expand Up @@ -288,7 +288,7 @@ static Option options[] = {
{ CONSOLELOG, &needConsole, VALUE_IS_FLAG, 0 },
{ DEBUG_ARG, &debug, VALUE_IS_FLAG, 0 },
{ NOSPLASH, &noSplash, VALUE_IS_FLAG, 1 },
{ NORESTART, &noRestart, VALUE_IS_FLAG, 1 },
{ NORESTART, &noRestart, VALUE_IS_FLAG, 1 },
{ SUPRESSERRORS, &suppressErrors, VALUE_IS_FLAG, 1},
{ SECOND_THREAD, &secondThread, VALUE_IS_FLAG, 1 },
{ APPEND_VMARGS, &appendVmargs, VALUE_IS_FLAG, 1 },
Expand Down Expand Up @@ -652,7 +652,7 @@ static int _run(int argc, _TCHAR* argv[], _TCHAR* vmArgs[])
switch( javaResults->launchResult + javaResults->runResult ) {
case 0: /* normal exit */
break;
case RESTART_LAST_EC:XXX
case RESTART_LAST_EC:
if (!noRestart) {
/* copy for relaunch, +1 to ensure NULL terminated */
relaunchCommand = malloc((initialArgc + 1) * sizeof(_TCHAR*));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#define OS _T_ECLIPSE("-os")
#define OSARCH _T_ECLIPSE("-arch")
#define NOSPLASH _T_ECLIPSE("-nosplash")
#define NORESTART _T_ECLIPSE("-norestart")
#define LAUNCHER _T_ECLIPSE("-launcher")
#define SHOWSPLASH _T_ECLIPSE("-showsplash")
#define EXITDATA _T_ECLIPSE("-exitdata")
Expand Down

0 comments on commit 2de24d4

Please sign in to comment.