-
Notifications
You must be signed in to change notification settings - Fork 341
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a way to print the full command line being executed by the launcher
- Loading branch information
1 parent
5517970
commit 19f62e9
Showing
2 changed files
with
29 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,27 @@ | ||
diff --git a/launcher.c b/launcher.c | ||
index 727f7916..2447d378 100644 | ||
--- a/launcher.c | ||
+++ b/launcher.c | ||
@@ -35,8 +35,6 @@ | ||
|
||
#pragma comment (lib, "Shlwapi.lib") | ||
|
||
-#define APPENDED_ARCHIVE | ||
-#define USE_ENVIRONMENT | ||
#define SUPPORT_RELATIVE_PATH | ||
|
||
#define MSGSIZE 1024 | ||
|
||
diff --git a/launcher/launcher.c b/launcher/launcher.c | ||
index 727f7916..431e0339 100644 | ||
--- a/launcher/launcher.c | ||
+++ b/launcher/launcher.c | ||
@@ -35,8 +35,6 @@ | ||
|
||
#pragma comment (lib, "Shlwapi.lib") | ||
|
||
-#define APPENDED_ARCHIVE | ||
-#define USE_ENVIRONMENT | ||
#define SUPPORT_RELATIVE_PATH | ||
|
||
#define MSGSIZE 1024 | ||
@@ -822,6 +820,13 @@ run_child(wchar_t * cmdline) | ||
#endif | ||
si.dwFlags |= STARTF_USESTDHANDLES; | ||
} | ||
+ | ||
+ size_t rez_envvar_size = 0; | ||
+ getenv_s(&rez_envvar_size, NULL, 0, "REZ_LAUNCHER_DEBUG"); | ||
+ if (rez_envvar_size > 0) { | ||
+ printf("Launching: %ls\n", cmdline); | ||
+ } | ||
+ | ||
ok = CreateProcessW(NULL, cmdline, NULL, NULL, TRUE, 0, NULL, NULL, &si, &child_process_info); | ||
if (!ok) { | ||
// Failed to create process. See if we can find out why. |