Skip to content

Commit

Permalink
Add a way to print the full command line being executed by the launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanChristopheMorinPerso committed Sep 22, 2023
1 parent 5517970 commit cae6a61
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/wheel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ jobs:
set -ex
cat .venv/Scripts/rez/rez-script.py
cat .venv/Scripts/rez/jctest-script.py
export REZ_LAUNCHER_DEBUG=1
jctest
rez --help
Expand Down
41 changes: 27 additions & 14 deletions launcher/remote-appended.patch
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.c b/launcher.c
index 727f7916..431e0339 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
@@ -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.

0 comments on commit cae6a61

Please sign in to comment.