src/jdk.jpackage/windows/native/msiwrapper/MsiWrapper.cpp
branchJDK-8200758-branch
changeset 57909 c7de06ed4b54
parent 57444 91e9d4691e5e
--- a/src/jdk.jpackage/windows/native/msiwrapper/MsiWrapper.cpp	Wed Aug 28 07:32:23 2019 -0400
+++ b/src/jdk.jpackage/windows/native/msiwrapper/MsiWrapper.cpp	Wed Aug 28 11:30:40 2019 -0400
@@ -1,41 +1,42 @@
-#include <algorithm>
-#include <windows.h>
-
-#include "SysInfo.h"
-#include "FileUtils.h"
-#include "Executor.h"
-#include "Resources.h"
-#include "WinErrorHandling.h"
-
-
-int __stdcall WinMain(HINSTANCE, HINSTANCE, LPSTR lpCmdLine, int nShowCmd)
-{
-    JP_TRY;
-
-    // Create temporary directory where to extract msi file.
-    const auto tempMsiDir = FileUtils::createTempDirectory();
-
-    // Schedule temporary directory for deletion.
-    FileUtils::Deleter cleaner;
-    cleaner.appendRecursiveDirectory(tempMsiDir);
-
-    const auto msiPath = FileUtils::mkpath() << tempMsiDir << L"main.msi";
-
-    // Extract msi file.
-    Resource(L"msi", RT_RCDATA).saveToFile(msiPath);
-
-    // Setup executor to run msiexec
-    Executor msiExecutor(SysInfo::getWIPath());
-    msiExecutor.arg(L"/i").arg(msiPath);
-    const auto args = SysInfo::getCommandArgs();
-    std::for_each(args.begin(), args.end(), [&msiExecutor] (const tstring& arg) {
-        msiExecutor.arg(arg);
-    });
-
-    // Install msi file.
-    return msiExecutor.execAndWaitForExit();
-
-    JP_CATCH_ALL;
-
-    return -1;
-}
+#include <algorithm>
+#include <windows.h>
+
+#include "SysInfo.h"
+#include "FileUtils.h"
+#include "Executor.h"
+#include "Resources.h"
+#include "WinErrorHandling.h"
+
+
+int __stdcall WinMain(HINSTANCE, HINSTANCE, LPSTR lpCmdLine, int nShowCmd)
+{
+    JP_TRY;
+
+    // Create temporary directory where to extract msi file.
+    const auto tempMsiDir = FileUtils::createTempDirectory();
+
+    // Schedule temporary directory for deletion.
+    FileUtils::Deleter cleaner;
+    cleaner.appendRecursiveDirectory(tempMsiDir);
+
+    const auto msiPath = FileUtils::mkpath() << tempMsiDir << L"main.msi";
+
+    // Extract msi file.
+    Resource(L"msi", RT_RCDATA).saveToFile(msiPath);
+
+    // Setup executor to run msiexec
+    Executor msiExecutor(SysInfo::getWIPath());
+    msiExecutor.arg(L"/i").arg(msiPath);
+    const auto args = SysInfo::getCommandArgs();
+    std::for_each(args.begin(), args.end(),
+            [&msiExecutor] (const tstring& arg) {
+        msiExecutor.arg(arg);
+    });
+
+    // Install msi file.
+    return msiExecutor.execAndWaitForExit();
+
+    JP_CATCH_ALL;
+
+    return -1;
+}