diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-04-23 12:26:07 +1000 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-04-23 12:43:38 +1000 |
| commit | ab495395492055c8c016e54ab0b1f7af2e9f164c (patch) | |
| tree | f7f86e82cb463303c5bf2e501065ea09a9b62af0 /src/test/examples/TestEngine/ExampleTestEngine.cpp | |
| parent | bd3ee565f342bc0bb015594f303d13b67285a958 (diff) | |
| download | wix-ab495395492055c8c016e54ab0b1f7af2e9f164c.tar.gz wix-ab495395492055c8c016e54ab0b1f7af2e9f164c.tar.bz2 wix-ab495395492055c8c016e54ab0b1f7af2e9f164c.zip | |
Add reload engine and test.
Diffstat (limited to 'src/test/examples/TestEngine/ExampleTestEngine.cpp')
| -rw-r--r-- | src/test/examples/TestEngine/ExampleTestEngine.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/test/examples/TestEngine/ExampleTestEngine.cpp b/src/test/examples/TestEngine/ExampleTestEngine.cpp index 848b385c..a378c9a3 100644 --- a/src/test/examples/TestEngine/ExampleTestEngine.cpp +++ b/src/test/examples/TestEngine/ExampleTestEngine.cpp | |||
| @@ -5,16 +5,30 @@ | |||
| 5 | int __cdecl wmain(int argc, LPWSTR argv[]) | 5 | int __cdecl wmain(int argc, LPWSTR argv[]) |
| 6 | { | 6 | { |
| 7 | HRESULT hr = E_INVALIDARG; | 7 | HRESULT hr = E_INVALIDARG; |
| 8 | BOOL fShowUsage = FALSE; | ||
| 8 | 9 | ||
| 9 | ConsoleInitialize(); | 10 | ConsoleInitialize(); |
| 10 | 11 | ||
| 11 | if (argc != 3) | 12 | if (argc != 4) |
| 12 | { | 13 | { |
| 13 | ConsoleWriteError(hr, CONSOLE_COLOR_RED, "Usage: Example.TestEngine.exe Bundle.exe BA.dll"); | 14 | fShowUsage = TRUE; |
| 15 | } | ||
| 16 | else if (CSTR_EQUAL == ::CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, argv[1], -1, L"reload", -1)) | ||
| 17 | { | ||
| 18 | hr = RunReloadEngine(argv[2], argv[3]); | ||
| 19 | } | ||
| 20 | else if (CSTR_EQUAL == ::CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, argv[1], -1, L"shutdown", -1)) | ||
| 21 | { | ||
| 22 | hr = RunShutdownEngine(argv[2], argv[3]); | ||
| 14 | } | 23 | } |
| 15 | else | 24 | else |
| 16 | { | 25 | { |
| 17 | hr = RunShutdownEngine(argv[1], argv[2]); | 26 | fShowUsage = TRUE; |
| 27 | } | ||
| 28 | |||
| 29 | if (fShowUsage) | ||
| 30 | { | ||
| 31 | ConsoleWriteError(hr, CONSOLE_COLOR_RED, "Usage: {reload|shutdown} Example.TestEngine.exe Bundle.exe BA.dll"); | ||
| 18 | } | 32 | } |
| 19 | 33 | ||
| 20 | ConsoleUninitialize(); | 34 | ConsoleUninitialize(); |
