Import code from old v4 repo
Sean Hall committed
Dec 31, 2018 at 23:52 UTC
2c568de11510b453f499827919964badef22304e
76 files changed
+8504
src/Samples/bafunctions/Readme.txt
new
+85
@@ -0,0 +1,85 @@
1
+
2
+This is a sample project showing how to create a BA function assembly.
3
+
4
+The four interfaces are in the WixSampleBAFunctions.cpp file.
5
+
6
+
7
+Example code:
8
+~~~~~~~~~~~~~
9
+
10
+
11
+ HRESULT hr = S_OK;
12
+ HKEY hkKey = NULL;
13
+ LPWSTR sczValue = NULL;
14
+ LPWSTR sczFormatedValue = NULL;
15
+
16
+
17
+ //---------------------------------------------------------------------------------------------
18
+ // Example of BA function failure
19
+ hr = E_NOTIMPL;
20
+ BalExitOnFailure(hr, "Test failure.");
21
+ //---------------------------------------------------------------------------------------------
22
+
23
+ //---------------------------------------------------------------------------------------------
24
+ // Example of setting a variables
25
+ hr = m_pEngine->SetVariableString(L"Variable1", L"String value");
26
+ BalExitOnFailure(hr, "Failed to set variable.");
27
+ hr = m_pEngine->SetVariableNumeric(L"Variable2", 1234);
28
+ BalExitOnFailure(hr, "Failed to set variable.");
29
+ //---------------------------------------------------------------------------------------------
30
+
31
+ //---------------------------------------------------------------------------------------------
32
+ // Example of reading burn variable.
33
+ BalGetStringVariable(L"WixBundleName", &sczValue);
34
+ BalExitOnFailure(hr, "Failed to get variable.");
35
+
36
+ hr = m_pEngine->SetVariableString(L"Variable4", sczValue);
37
+ BalExitOnFailure(hr, "Failed to set variable.");
38
+ //---------------------------------------------------------------------------------------------
39
+
40
+ ReleaseNullStr(sczValue); // Release string so it can be re-used
41
+
42
+ //---------------------------------------------------------------------------------------------
43
+ // Examples of reading burn variable and formatting it.
44
+ BalGetStringVariable(L"InstallFolder", &sczValue);
45
+ BalExitOnFailure(hr, "Failed to get variable.");
46
+
47
+ hr = m_pEngine->SetVariableString(L"Variable5", sczValue);
48
+ BalExitOnFailure(hr, "Failed to set variable.");
49
+
50
+ BalFormatString(sczValue, &sczFormatedValue);
51
+ BalExitOnFailure(hr, "Failed to format variable.");
52
+
53
+ hr = m_pEngine->SetVariableString(L"Variable6", sczFormatedValue);
54
+ BalExitOnFailure(hr, "Failed to set variable.");
55
+ //---------------------------------------------------------------------------------------------
56
+
57
+ ReleaseNullStr(sczValue); // Release string so it can be re-used
58
+
59
+ //---------------------------------------------------------------------------------------------
60
+ // Example of reading 64 bit registry and setting the InstallFolder variable to the value read.
61
+ hr = RegOpen(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v3.5", KEY_READ | KEY_WOW64_64KEY, &hkKey);
62
+ BalExitOnFailure(hr, "Failed to open registry key.");
63
+
64
+ hr = RegReadString(hkKey, L"InstallPath", &sczValue);
65
+ BalExitOnFailure(hr, "Failed to read registry value.");
66
+
67
+ // Example of function call
68
+ PathBackslashTerminate(&sczValue);
69
+
70
+ hr = m_pEngine->SetVariableString(L"InstallFolder", sczValue);
71
+ BalExitOnFailure(hr, "Failed to set variable.");
72
+ //---------------------------------------------------------------------------------------------
73
+
74
+ ReleaseNullStr(sczValue); // Release string so it can be re-used
75
+
76
+ //---------------------------------------------------------------------------------------------
77
+ // Example of calling a function that return HRESULT
78
+ hr = GetFileVersion();
79
+ BalExitOnFailure(hr, "Failed to get version.");
80
+ //---------------------------------------------------------------------------------------------
81
+
82
+ LExit:
83
+ ReleaseRegKey(hkKey);
84
+ ReleaseStr(sczValue);
85
+ ReleaseStr(sczFormatedValue);
src/Samples/bafunctions/WixSampleBAFunctions.cpp
new
+95
@@ -0,0 +1,95 @@
1
+// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
+
3
+#include "precomp.h"
4
+#include "BalBaseBAFunctions.h"
5
+#include "BalBaseBAFunctionsProc.h"
6
+
7
+class CWixSampleBAFunctions : public CBalBaseBAFunctions
8
+{
9
+public: // IBootstrapperApplication
10
+ virtual STDMETHODIMP OnDetectBegin(
11
+ __in BOOL fInstalled,
12
+ __in DWORD cPackages,
13
+ __inout BOOL* pfCancel
14
+ )
15
+ {
16
+ HRESULT hr = S_OK;
17
+
18
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Running detect begin BA function. fInstalled=%d, cPackages=%u, fCancel=%d", fInstalled, cPackages, *pfCancel);
19
+
20
+ //-------------------------------------------------------------------------------------------------
21
+ // YOUR CODE GOES HERE
22
+ BalExitOnFailure(hr, "Change this message to represent real error handling.");
23
+ //-------------------------------------------------------------------------------------------------
24
+
25
+ LExit:
26
+ return hr;
27
+ }
28
+
29
+public: // IBAFunctions
30
+ virtual STDMETHODIMP OnPlanBegin(
31
+ __in DWORD cPackages,
32
+ __inout BOOL* pfCancel
33
+ )
34
+ {
35
+ HRESULT hr = S_OK;
36
+
37
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Running plan begin BA function. cPackages=%u, fCancel=%d", cPackages, *pfCancel);
38
+
39
+ //-------------------------------------------------------------------------------------------------
40
+ // YOUR CODE GOES HERE
41
+ BalExitOnFailure(hr, "Change this message to represent real error handling.");
42
+ //-------------------------------------------------------------------------------------------------
43
+
44
+ LExit:
45
+ return hr;
46
+ }
47
+
48
+public:
49
+ //
50
+ // Constructor - initialize member variables.
51
+ //
52
+ CWixSampleBAFunctions(
53
+ __in HMODULE hModule,
54
+ __in IBootstrapperEngine* pEngine,
55
+ __in const BA_FUNCTIONS_CREATE_ARGS* pArgs
56
+ ) : CBalBaseBAFunctions(hModule, pEngine, pArgs)
57
+ {
58
+ }
59
+
60
+ //
61
+ // Destructor - release member variables.
62
+ //
63
+ ~CWixSampleBAFunctions()
64
+ {
65
+ }
66
+};
67
+
68
+
69
+HRESULT WINAPI CreateBAFunctions(
70
+ __in HMODULE hModule,
71
+ __in const BA_FUNCTIONS_CREATE_ARGS* pArgs,
72
+ __inout BA_FUNCTIONS_CREATE_RESULTS* pResults
73
+ )
74
+{
75
+ HRESULT hr = S_OK;
76
+ CWixSampleBAFunctions* pBAFunctions = NULL;
77
+ IBootstrapperEngine* pEngine = NULL;
78
+
79
+ // This is required to enable logging functions.
80
+ hr = BalInitializeFromCreateArgs(pArgs->pBootstrapperCreateArgs, &pEngine);
81
+ ExitOnFailure(hr, "Failed to initialize Bal.");
82
+
83
+ pBAFunctions = new CWixSampleBAFunctions(hModule, pEngine, pArgs);
84
+ ExitOnNull(pBAFunctions, hr, E_OUTOFMEMORY, "Failed to create new CWixSampleBAFunctions object.");
85
+
86
+ pResults->pfnBAFunctionsProc = BalBaseBAFunctionsProc;
87
+ pResults->pvBAFunctionsProcContext = pBAFunctions;
88
+ pBAFunctions = NULL;
89
+
90
+LExit:
91
+ ReleaseObject(pBAFunctions);
92
+ ReleaseObject(pEngine);
93
+
94
+ return hr;
95
+}
src/Samples/bafunctions/bafunctions.cpp
new
+46
@@ -0,0 +1,46 @@
1
+// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
+
3
+#include "precomp.h"
4
+
5
+static HINSTANCE vhInstance = NULL;
6
+
7
+extern "C" BOOL WINAPI DllMain(
8
+ IN HINSTANCE hInstance,
9
+ IN DWORD dwReason,
10
+ IN LPVOID /* pvReserved */
11
+ )
12
+{
13
+ switch (dwReason)
14
+ {
15
+ case DLL_PROCESS_ATTACH:
16
+ ::DisableThreadLibraryCalls(hInstance);
17
+ vhInstance = hInstance;
18
+ break;
19
+
20
+ case DLL_PROCESS_DETACH:
21
+ vhInstance = NULL;
22
+ break;
23
+ }
24
+
25
+ return TRUE;
26
+}
27
+
28
+extern "C" HRESULT WINAPI BAFunctionsCreate(
29
+ __in const BA_FUNCTIONS_CREATE_ARGS* pArgs,
30
+ __inout BA_FUNCTIONS_CREATE_RESULTS* pResults
31
+ )
32
+{
33
+ HRESULT hr = S_OK;
34
+
35
+ hr = CreateBAFunctions(vhInstance, pArgs, pResults);
36
+ BalExitOnFailure(hr, "Failed to create BAFunctions interface.");
37
+
38
+LExit:
39
+ return hr;
40
+}
41
+
42
+extern "C" void WINAPI BAFunctionsDestroy(
43
+ )
44
+{
45
+ BalUninitialize();
46
+}
src/Samples/bafunctions/bafunctions.def
new
+6
@@ -0,0 +1,6 @@
1
+; Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
+
3
+
4
+EXPORTS
5
+ BAFunctionsCreate
6
+ BAFunctionsDestroy
src/Samples/bafunctions/bafunctions.rc
new
+118
@@ -0,0 +1,118 @@
1
+// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
+
3
+#include <winver.h>
4
+#include <windows.h>
5
+#include "bafunctionsver.h"
6
+
7
+#define VER_APP
8
+#define VER_ORIGINAL_FILENAME "bafunctions.dll"
9
+#define VER_INTERNAL_NAME "bafunctions"
10
+#define VER_PRODUCT_NAME "WiX Sample BAFunctions"
11
+#define VER_FILE_DESCRIPTION "WiX Sample BAFunctions"
12
+
13
+#ifdef DEBUG
14
+ #define VER_DEBUG VS_FF_DEBUG
15
+ #define VER_PRIVATE_BUILD VS_FF_PRIVATEBUILD
16
+ #define VER_PRE_RELEASE (VS_FF_PRERELEASE | VS_FF_SPECIALBUILD)
17
+#else
18
+ #define VER_DEBUG 0
19
+ #define VER_PRIVATE_BUILD 0
20
+ #define VER_PRE_RELEASE 0
21
+#endif
22
+
23
+#if defined(VER_APP)
24
+ #define VER_FILE_TYPE VFT_APP
25
+#elif defined(VER_DLL)
26
+ #define VER_FILE_TYPE VFT_DLL
27
+#elif defined(VER_TYPELIB)
28
+ #define VER_FILE_TYPE VFT_UNKNOWN
29
+#else
30
+ #define VER_FILE_TYPE VFT_UNKNOWN
31
+#endif
32
+
33
+#if defined(VER_LANG_NEUTRAL)
34
+ #ifndef VER_LANG
35
+ #define VER_LANG 0x0000
36
+ #endif
37
+ #ifndef VER_CP
38
+ #define VER_CP 0x04E4
39
+ #endif
40
+ #ifndef VER_BLOCK
41
+ #define VER_BLOCK "000004E4"
42
+ #endif
43
+#else
44
+ #ifndef VER_LANG
45
+ #define VER_LANG 0x0409
46
+ #endif
47
+ #ifndef VER_CP
48
+ #define VER_CP 0x04E4
49
+ #endif
50
+ #ifndef VER_BLOCK
51
+ #define VER_BLOCK "040904E4"
52
+ #endif
53
+#endif
54
+
55
+#define VER_FILE_VERSION rmj, rmm, rbd, rev
56
+#define VER_PRODUCT_VERSION rmj, rmm, rbd, rev
57
+#define VER_FILE_VERSION_STRING szVerMajorMinorBuildRev
58
+#define VER_PRODUCT_VERSION_STRING VER_FILE_VERSION_STRING
59
+#define VER_FILE_FLAGS_MASK VS_FFI_FILEFLAGSMASK
60
+#define VER_FILE_FLAGS (VER_DEBUG | VER_PRIVATE_BUILD | VER_PRE_RELEASE)
61
+
62
+#define VER_FILE_OS VOS__WINDOWS32
63
+
64
+#define VER_COMPANY_NAME ".NET Foundation"
65
+#ifndef VER_PRODUCT_NAME
66
+ #define VER_PRODUCT_NAME "Windows Installer XML (WiX)"
67
+#endif
68
+#ifndef VER_FILE_DESCRIPTION
69
+ #define VER_FILE_DESCRIPTION "Windows Installer XML (WiX) component"
70
+#endif
71
+
72
+#if defined(VER_LEGAL_COPYRIGHT)
73
+ #error
74
+#endif
75
+#define VER_LEGAL_COPYRIGHT "Copyright (c) .NET Foundation and contributors.\240 All rights reserved."
76
+
77
+#if !defined(VER_FILE_SUBTYPE)
78
+ #define VER_FILE_SUBTYPE 0
79
+#endif
80
+
81
+#ifdef RC_INVOKED
82
+
83
+VS_VERSION_INFO VERSIONINFO
84
+FILEVERSION VER_FILE_VERSION
85
+PRODUCTVERSION VER_PRODUCT_VERSION
86
+FILEFLAGSMASK VER_FILE_FLAGS_MASK
87
+FILEFLAGS VER_FILE_FLAGS
88
+FILEOS VER_FILE_OS
89
+FILETYPE VER_FILE_TYPE
90
+FILESUBTYPE VER_FILE_SUBTYPE
91
+BEGIN
92
+BLOCK "StringFileInfo"
93
+ BEGIN
94
+ BLOCK VER_BLOCK
95
+ BEGIN
96
+ VALUE "CompanyName", VER_COMPANY_NAME
97
+ VALUE "FileDescription", VER_FILE_DESCRIPTION
98
+ VALUE "FileVersion", VER_FILE_VERSION_STRING
99
+ VALUE "InternalName", VER_INTERNAL_NAME
100
+
101
+ VALUE "LegalCopyright", VER_LEGAL_COPYRIGHT
102
+
103
+ VALUE "OriginalFilename", VER_ORIGINAL_FILENAME
104
+ VALUE "ProductName", VER_PRODUCT_NAME
105
+ VALUE "ProductVersion", VER_FILE_VERSION_STRING
106
+#if defined(DEBUG)
107
+ VALUE "WiX Common Resource Format", "Debug Only"
108
+#endif
109
+ END
110
+ END
111
+
112
+BLOCK "VarFileInfo"
113
+ BEGIN
114
+ VALUE "Translation", VER_LANG, VER_CP
115
+ END
116
+END
117
+
118
+#endif
src/Samples/bafunctions/bafunctions.vcxproj
new
+54
@@ -0,0 +1,54 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6
+ <ItemGroup Label="ProjectConfigurations">
7
+ <ProjectConfiguration Include="Debug|Win32">
8
+ <Configuration>Debug</Configuration>
9
+ <Platform>Win32</Platform>
10
+ </ProjectConfiguration>
11
+ <ProjectConfiguration Include="Release|Win32">
12
+ <Configuration>Release</Configuration>
13
+ <Platform>Win32</Platform>
14
+ </ProjectConfiguration>
15
+ </ItemGroup>
16
+ <ItemGroup Label="ProjectConfigurations">
17
+ <ProjectConfiguration Include="Debug|ARM">
18
+ <Configuration>Debug</Configuration>
19
+ <Platform>ARM</Platform>
20
+ </ProjectConfiguration>
21
+ <ProjectConfiguration Include="Release|ARM">
22
+ <Configuration>Release</Configuration>
23
+ <Platform>ARM</Platform>
24
+ </ProjectConfiguration>
25
+ </ItemGroup>
26
+ <PropertyGroup Label="Globals">
27
+ <ProjectGuid>{EB0A7D51-2133-4EE7-B6CA-87DBEAC67E02}</ProjectGuid>
28
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
29
+ <CharacterSet>Unicode</CharacterSet>
30
+ <TargetName>BAFunctions</TargetName>
31
+ <ProjectModuleDefinitionFile>bafunctions.def</ProjectModuleDefinitionFile>
32
+ </PropertyGroup>
33
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.props" />
34
+ <PropertyGroup>
35
+ <ProjectAdditionalIncludeDirectories>$(WixRoot)src\libs\dutil\inc;$(WixRoot)src\burn\inc;$(WixRoot)src\libs\balutil\inc</ProjectAdditionalIncludeDirectories>
36
+ <ProjectAdditionalLinkLibraries>comctl32.lib;gdiplus.lib;msimg32.lib;shlwapi.lib;wininet.lib;dutil.lib;balutil.lib;version.lib</ProjectAdditionalLinkLibraries>
37
+ </PropertyGroup>
38
+ <ItemGroup>
39
+ <ClCompile Include="WixSampleBAFunctions.cpp" />
40
+ <ClCompile Include="bafunctions.cpp" />
41
+ </ItemGroup>
42
+ <ItemGroup>
43
+ <ClInclude Include="precomp.h" />
44
+ <ClInclude Include="resource.h" />
45
+ </ItemGroup>
46
+ <ItemGroup>
47
+ <None Include="bafunctions.def" />
48
+ <None Include="Readme.txt" />
49
+ </ItemGroup>
50
+ <ItemGroup>
51
+ <ResourceCompile Include="bafunctions.rc" />
52
+ </ItemGroup>
53
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
54
+</Project>
src/Samples/bafunctions/bafunctionsver.h
new
+13
@@ -0,0 +1,13 @@
1
+// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
+
3
+#ifndef _VERSION_FILE_H_
4
+#define _VERSION_FILE_H_
5
+
6
+#define szVerMajorMinor "1.0"
7
+#define szVerMajorMinorBuildRev "1.0.0.0"
8
+#define rmj 1
9
+#define rmm 0
10
+#define rbd 0
11
+#define rev 0
12
+
13
+#endif
src/Samples/bafunctions/precomp.h
new
+47
@@ -0,0 +1,47 @@
1
+#pragma once
2
+// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
3
+
4
+
5
+#include <windows.h>
6
+#include <gdiplus.h>
7
+#include <msiquery.h>
8
+#include <objbase.h>
9
+#include <shlobj.h>
10
+#include <shlwapi.h>
11
+#include <stdlib.h>
12
+#include <strsafe.h>
13
+#include <CommCtrl.h>
14
+
15
+// Standard WiX header files, include as required
16
+#include "dutil.h"
17
+//#include "memutil.h"
18
+//#include "dictutil.h"
19
+//#include "dirutil.h"
20
+#include "fileutil.h"
21
+#include "locutil.h"
22
+//#include "logutil.h"
23
+#include "pathutil.h"
24
+//#include "resrutil.h"
25
+//#include "shelutil.h"
26
+#include "strutil.h"
27
+#include "thmutil.h"
28
+//#include "uriutil.h"
29
+//#include "xmlutil.h"
30
+#include "regutil.h"
31
+
32
+//#include "IBootstrapperEngine.h"
33
+//#include "IBootstrapperApplication.h"
34
+
35
+#include "BalBaseBootstrapperApplication.h"
36
+//#include "balinfo.h"
37
+//#include "balcondition.h"
38
+#include "balutil.h"
39
+
40
+#include "BAFunctions.h"
41
+#include "IBAFunctions.h"
42
+
43
+HRESULT WINAPI CreateBAFunctions(
44
+ __in HMODULE hModule,
45
+ __in const BA_FUNCTIONS_CREATE_ARGS* pArgs,
46
+ __inout BA_FUNCTIONS_CREATE_RESULTS* pResults
47
+ );
src/Samples/bafunctions/resource.h
new
+15
@@ -0,0 +1,15 @@
1
+// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
+
3
+#define IDC_STATIC -1
4
+
5
+
6
+// Next default values for new objects
7
+//
8
+#ifdef APSTUDIO_INVOKED
9
+#ifndef APSTUDIO_READONLY_SYMBOLS
10
+#define _APS_NEXT_RESOURCE_VALUE 102
11
+#define _APS_NEXT_COMMAND_VALUE 40001
12
+#define _APS_NEXT_CONTROL_VALUE 1003
13
+#define _APS_NEXT_SYMED_VALUE 101
14
+#endif
15
+#endif
src/mbahost/host.cpp
new
+656
@@ -0,0 +1,656 @@
1
+// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
+
3
+#include "precomp.h"
4
+#include <BootstrapperCore.h> // includes the generated assembly name macros.
5
+#include "BalBaseBootstrapperApplicationProc.h"
6
+
7
+static const DWORD NET452_RELEASE = 379893;
8
+
9
+using namespace mscorlib;
10
+
11
+extern "C" typedef HRESULT (WINAPI *PFN_CORBINDTOCURRENTRUNTIME)(
12
+ __in LPCWSTR pwszFileName,
13
+ __in REFCLSID rclsid,
14
+ __in REFIID riid,
15
+ __out LPVOID *ppv
16
+ );
17
+
18
+extern "C" typedef HRESULT(WINAPI *PFN_MBAPREQ_BOOTSTRAPPER_APPLICATION_CREATE)(
19
+ __in HRESULT hrHostInitialization,
20
+ __in IBootstrapperEngine* pEngine,
21
+ __in const BOOTSTRAPPER_CREATE_ARGS* pArgs,
22
+ __inout BOOTSTRAPPER_CREATE_RESULTS* pResults
23
+ );
24
+
25
+static HINSTANCE vhInstance = NULL;
26
+static ICorRuntimeHost *vpCLRHost = NULL;
27
+static _AppDomain *vpAppDomain = NULL;
28
+static HMODULE vhMbapreqModule = NULL;
29
+
30
+
31
+// internal function declarations
32
+
33
+static HRESULT GetAppDomain(
34
+ __out _AppDomain** ppAppDomain
35
+ );
36
+static HRESULT GetAppBase(
37
+ __out LPWSTR* psczAppBase
38
+ );
39
+static HRESULT CheckSupportedFrameworks(
40
+ __in LPCWSTR wzConfigPath
41
+ );
42
+static HRESULT UpdateSupportedRuntime(
43
+ __in IXMLDOMDocument* pixdManifest,
44
+ __in IXMLDOMNode* pixnSupportedFramework,
45
+ __out BOOL* pfUpdatedManifest
46
+ );
47
+static HRESULT GetCLRHost(
48
+ __in LPCWSTR wzConfigPath,
49
+ __out ICorRuntimeHost** ppCLRHost
50
+ );
51
+static HRESULT CreateManagedBootstrapperApplication(
52
+ __in _AppDomain* pAppDomain,
53
+ __in IBootstrapperEngine* pEngine,
54
+ __in const BOOTSTRAPPER_CREATE_ARGS* pArgs,
55
+ __inout BOOTSTRAPPER_CREATE_RESULTS* pResults
56
+ );
57
+static HRESULT CreateManagedBootstrapperApplicationFactory(
58
+ __in _AppDomain* pAppDomain,
59
+ __out IBootstrapperApplicationFactory** ppAppFactory
60
+ );
61
+static HRESULT CreatePrerequisiteBA(
62
+ __in HRESULT hrHostInitialization,
63
+ __in IBootstrapperEngine* pEngine,
64
+ __in const BOOTSTRAPPER_CREATE_ARGS* pArgs,
65
+ __inout BOOTSTRAPPER_CREATE_RESULTS* pResults
66
+ );
67
+static HRESULT VerifyNET4RuntimeIsSupported(
68
+ );
69
+
70
+
71
+// function definitions
72
+
73
+extern "C" BOOL WINAPI DllMain(
74
+ IN HINSTANCE hInstance,
75
+ IN DWORD dwReason,
76
+ IN LPVOID /* pvReserved */
77
+ )
78
+{
79
+ switch (dwReason)
80
+ {
81
+ case DLL_PROCESS_ATTACH:
82
+ ::DisableThreadLibraryCalls(hInstance);
83
+ vhInstance = hInstance;
84
+ break;
85
+
86
+ case DLL_PROCESS_DETACH:
87
+ vhInstance = NULL;
88
+ break;
89
+ }
90
+
91
+ return TRUE;
92
+}
93
+
94
+// Note: This function assumes that COM was already initialized on the thread.
95
+extern "C" HRESULT WINAPI BootstrapperApplicationCreate(
96
+ __in const BOOTSTRAPPER_CREATE_ARGS* pArgs,
97
+ __inout BOOTSTRAPPER_CREATE_RESULTS* pResults
98
+ )
99
+{
100
+ HRESULT hr = S_OK;
101
+ HRESULT hrHostInitialization = S_OK;
102
+ IBootstrapperEngine* pEngine = NULL;
103
+
104
+ hr = BalInitializeFromCreateArgs(pArgs, &pEngine);
105
+ ExitOnFailure(hr, "Failed to initialize Bal.");
106
+
107
+ hr = GetAppDomain(&vpAppDomain);
108
+ if (SUCCEEDED(hr))
109
+ {
110
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Loading managed bootstrapper application.");
111
+
112
+ hr = CreateManagedBootstrapperApplication(vpAppDomain, pEngine, pArgs, pResults);
113
+ BalExitOnFailure(hr, "Failed to create the managed bootstrapper application.");
114
+ }
115
+ else // fallback to the prerequisite BA.
116
+ {
117
+ if (E_MBAHOST_NET452_ON_WIN7RTM == hr)
118
+ {
119
+ BalLogError(hr, "The Burn engine cannot run with an MBA under the .NET 4 CLR on Windows 7 RTM with .NET 4.5.2 (or greater) installed.");
120
+ hrHostInitialization = hr;
121
+ }
122
+ else
123
+ {
124
+ hrHostInitialization = S_OK;
125
+ }
126
+
127
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Loading prerequisite bootstrapper application because managed host could not be loaded, error: 0x%08x.", hr);
128
+
129
+ hr = CreatePrerequisiteBA(hrHostInitialization, pEngine, pArgs, pResults);
130
+ BalExitOnFailure(hr, "Failed to create the pre-requisite bootstrapper application.");
131
+ }
132
+
133
+LExit:
134
+ return hr;
135
+}
136
+
137
+extern "C" void WINAPI BootstrapperApplicationDestroy()
138
+{
139
+ if (vpAppDomain)
140
+ {
141
+ HRESULT hr = vpCLRHost->UnloadDomain(vpAppDomain);
142
+ if (FAILED(hr))
143
+ {
144
+ BalLogError(hr, "Failed to unload app domain.");
145
+ }
146
+
147
+ vpAppDomain->Release();
148
+ }
149
+
150
+ if (vpCLRHost)
151
+ {
152
+ vpCLRHost->Stop();
153
+ vpCLRHost->Release();
154
+ }
155
+
156
+ if (vhMbapreqModule)
157
+ {
158
+ PFN_BOOTSTRAPPER_APPLICATION_DESTROY pfnDestroy = reinterpret_cast<PFN_BOOTSTRAPPER_APPLICATION_DESTROY>(::GetProcAddress(vhMbapreqModule, "MbaPrereqBootstrapperApplicationDestroy"));
159
+ if (pfnDestroy)
160
+ {
161
+ (*pfnDestroy)();
162
+ }
163
+
164
+ ::FreeLibrary(vhMbapreqModule);
165
+ vhMbapreqModule = NULL;
166
+ }
167
+
168
+ BalUninitialize();
169
+}
170
+
171
+// Gets the custom AppDomain for loading managed BA.
172
+static HRESULT GetAppDomain(
173
+ __out _AppDomain **ppAppDomain
174
+ )
175
+{
176
+ HRESULT hr = S_OK;
177
+ ICorRuntimeHost *pCLRHost = NULL;
178
+ IUnknown *pUnk = NULL;
179
+ LPWSTR sczAppBase = NULL;
180
+ LPWSTR sczConfigPath = NULL;
181
+ IAppDomainSetup *pAppDomainSetup;
182
+ BSTR bstrAppBase = NULL;
183
+ BSTR bstrConfigPath = NULL;
184
+
185
+ hr = GetAppBase(&sczAppBase);
186
+ ExitOnFailure(hr, "Failed to get the host base path.");
187
+
188
+ hr = PathConcat(sczAppBase, L"BootstrapperCore.config", &sczConfigPath);
189
+ ExitOnFailure(hr, "Failed to get the full path to the application configuration file.");
190
+
191
+ // Check that the supported framework is installed.
192
+ hr = CheckSupportedFrameworks(sczConfigPath);
193
+ ExitOnFailure(hr, "Failed to find supported framework.");
194
+
195
+ // Load the CLR.
196
+ hr = GetCLRHost(sczConfigPath, &pCLRHost);
197
+ ExitOnFailure(hr, "Failed to create the CLR host.");
198
+
199
+ hr = pCLRHost->Start();
200
+ ExitOnRootFailure(hr, "Failed to start the CLR host.");
201
+
202
+ // Create the setup information for a new AppDomain to set the app base and config.
203
+ hr = pCLRHost->CreateDomainSetup(&pUnk);
204
+ ExitOnRootFailure(hr, "Failed to create the AppDomainSetup object.");
205
+
206
+ hr = pUnk->QueryInterface(__uuidof(IAppDomainSetup), reinterpret_cast<LPVOID*>(&pAppDomainSetup));
207
+ ExitOnRootFailure(hr, "Failed to query for the IAppDomainSetup interface.");
208
+ ReleaseNullObject(pUnk);
209
+
210
+ // Set properties on the AppDomainSetup object.
211
+ bstrAppBase = ::SysAllocString(sczAppBase);
212
+ ExitOnNull(bstrAppBase, hr, E_OUTOFMEMORY, "Failed to allocate the application base path for the AppDomainSetup.");
213
+
214
+ hr = pAppDomainSetup->put_ApplicationBase(bstrAppBase);
215
+ ExitOnRootFailure(hr, "Failed to set the application base path for the AppDomainSetup.");
216
+
217
+ bstrConfigPath = ::SysAllocString(sczConfigPath);
218
+ ExitOnNull(bstrConfigPath, hr, E_OUTOFMEMORY, "Failed to allocate the application configuration file for the AppDomainSetup.");
219
+
220
+ hr = pAppDomainSetup->put_ConfigurationFile(bstrConfigPath);
221
+ ExitOnRootFailure(hr, "Failed to set the configuration file path for the AppDomainSetup.");
222
+
223
+ // Create the AppDomain to load the factory type.
224
+ hr = pCLRHost->CreateDomainEx(L"MBA", pAppDomainSetup, NULL, &pUnk);
225
+ ExitOnRootFailure(hr, "Failed to create the MBA AppDomain.");
226
+
227
+ hr = pUnk->QueryInterface(__uuidof(_AppDomain), reinterpret_cast<LPVOID*>(ppAppDomain));
228
+ ExitOnRootFailure(hr, "Failed to query for the _AppDomain interface.");
229
+
230
+LExit:
231
+ ReleaseBSTR(bstrConfigPath);
232
+ ReleaseBSTR(bstrAppBase);
233
+ ReleaseStr(sczConfigPath);
234
+ ReleaseStr(sczAppBase);
235
+ ReleaseNullObject(pUnk);
236
+ ReleaseNullObject(pCLRHost);
237
+
238
+ return hr;
239
+}
240
+
241
+static HRESULT GetAppBase(
242
+ __out LPWSTR *psczAppBase
243
+ )
244
+{
245
+ HRESULT hr = S_OK;
246
+ LPWSTR sczFullPath = NULL;
247
+
248
+ hr = PathForCurrentProcess(&sczFullPath, vhInstance);
249
+ ExitOnFailure(hr, "Failed to get the full host path.");
250
+
251
+ hr = PathGetDirectory(sczFullPath, psczAppBase);
252
+ ExitOnFailure(hr, "Failed to get the directory of the full process path.");
253
+
254
+LExit:
255
+ ReleaseStr(sczFullPath);
256
+
257
+ return hr;
258
+}
259
+
260
+// Checks whether at least one of required supported frameworks is installed via the NETFX registry keys.
261
+static HRESULT CheckSupportedFrameworks(
262
+ __in LPCWSTR wzConfigPath
263
+ )
264
+{
265
+ HRESULT hr = S_OK;
266
+ IXMLDOMDocument* pixdManifest = NULL;
267
+ IXMLDOMNodeList* pNodeList = NULL;
268
+ IXMLDOMNode* pNode = NULL;
269
+ DWORD cSupportedFrameworks = 0;
270
+ LPWSTR sczSupportedFrameworkVersion = NULL;
271
+ LPWSTR sczFrameworkRegistryKey = NULL;
272
+ HKEY hkFramework = NULL;
273
+ DWORD dwFrameworkInstalled = 0;
274
+ BOOL fUpdatedManifest = FALSE;
275
+
276
+ hr = XmlInitialize();
277
+ ExitOnFailure(hr, "Failed to initialize XML.");
278
+
279
+ hr = XmlLoadDocumentFromFile(wzConfigPath, &pixdManifest);
280
+ ExitOnFailure(hr, "Failed to load bootstrapper config file from path: %ls", wzConfigPath);
281
+
282
+ hr = XmlSelectNodes(pixdManifest, L"/configuration/wix.bootstrapper/host/supportedFramework", &pNodeList);
283
+ ExitOnFailure(hr, "Failed to select all supportedFramework elements.");
284
+
285
+ hr = pNodeList->get_length(reinterpret_cast<long*>(&cSupportedFrameworks));
286
+ ExitOnFailure(hr, "Failed to get the supported framework count.");
287
+
288
+ if (cSupportedFrameworks)
289
+ {
290
+ while (S_OK == (hr = XmlNextElement(pNodeList, &pNode, NULL)))
291
+ {
292
+ hr = XmlGetAttributeEx(pNode, L"version", &sczSupportedFrameworkVersion);
293
+ ExitOnFailure(hr, "Failed to get supportedFramework/@version.");
294
+
295
+ hr = StrAllocFormatted(&sczFrameworkRegistryKey, L"SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\%ls", sczSupportedFrameworkVersion);
296
+ ExitOnFailure(hr, "Failed to allocate path to supported framework Install registry key.");
297
+
298
+ hr = RegOpen(HKEY_LOCAL_MACHINE, sczFrameworkRegistryKey, KEY_READ, &hkFramework);
299
+ if (SUCCEEDED(hr))
300
+ {
301
+ hr = RegReadNumber(hkFramework, L"Install", &dwFrameworkInstalled);
302
+ if (dwFrameworkInstalled)
303
+ {
304
+ hr = S_OK;
305
+ break;
306
+ }
307
+ }
308
+
309
+ ReleaseNullObject(pNode);
310
+ }
311
+
312
+ // If we looped through all the supported frameworks but didn't find anything, ensure we return a failure.
313
+ if (S_FALSE == hr)
314
+ {
315
+ hr = E_NOTFOUND;
316
+ ExitOnRootFailure(hr, "Failed to find a supported framework.");
317
+ }
318
+
319
+ hr = UpdateSupportedRuntime(pixdManifest, pNode, &fUpdatedManifest);
320
+ ExitOnFailure(hr, "Failed to update supportedRuntime.");
321
+ }
322
+ // else no supported frameworks specified, so the startup/supportedRuntime must be enough.
323
+
324
+ if (fUpdatedManifest)
325
+ {
326
+ hr = XmlSaveDocument(pixdManifest, wzConfigPath);
327
+ ExitOnFailure(hr, "Failed to save updated manifest over config file: %ls", wzConfigPath);
328
+ }
329
+
330
+LExit:
331
+ ReleaseRegKey(hkFramework);
332
+ ReleaseStr(sczFrameworkRegistryKey);
333
+ ReleaseStr(sczSupportedFrameworkVersion);
334
+ ReleaseObject(pNode);
335
+ ReleaseObject(pNodeList);
336
+ ReleaseObject(pixdManifest);
337
+
338
+ XmlUninitialize();
339
+
340
+ return hr;
341
+}
342
+
343
+// Fixes the supportedRuntime element if necessary.
344
+static HRESULT UpdateSupportedRuntime(
345
+ __in IXMLDOMDocument* pixdManifest,
346
+ __in IXMLDOMNode* pixnSupportedFramework,
347
+ __out BOOL* pfUpdatedManifest
348
+ )
349
+{
350
+ HRESULT hr = S_OK;
351
+ LPWSTR sczSupportedRuntimeVersion = NULL;
352
+ IXMLDOMNode* pixnStartup = NULL;
353
+ IXMLDOMNode* pixnSupportedRuntime = NULL;
354
+
355
+ *pfUpdatedManifest = FALSE;
356
+
357
+ // If the runtime version attribute is not specified, don't update the manifest.
358
+ hr = XmlGetAttributeEx(pixnSupportedFramework, L"runtimeVersion", &sczSupportedRuntimeVersion);
359
+ if (E_NOTFOUND == hr)
360
+ {
361
+ ExitFunction1(hr = S_OK);
362
+ }
363
+ ExitOnFailure(hr, "Failed to get supportedFramework/@runtimeVersion.");
364
+
365
+ // Get the startup element. Fail if we can't find it since it'll be necessary to load the
366
+ // correct runtime.
367
+ hr = XmlSelectSingleNode(pixdManifest, L"/configuration/startup", &pixnStartup);
368
+ ExitOnFailure(hr, "Failed to get startup element.");
369
+
370
+ if (S_FALSE == hr)
371
+ {
372
+ hr = E_NOTFOUND;
373
+ ExitOnRootFailure(hr, "Failed to find startup element in bootstrapper application config.");
374
+ }
375
+
376
+ // Remove any pre-existing supported runtimes because they'll just get in the way and create our new one.
377
+ hr = XmlRemoveChildren(pixnStartup, L"supportedRuntime");
378
+ ExitOnFailure(hr, "Failed to remove pre-existing supportedRuntime elements.");
379
+
380
+ hr = XmlCreateChild(pixnStartup, L"supportedRuntime", &pixnSupportedRuntime);
381
+ ExitOnFailure(hr, "Failed to create supportedRuntime element.");
382
+
383
+ hr = XmlSetAttribute(pixnSupportedRuntime, L"version", sczSupportedRuntimeVersion);
384
+ ExitOnFailure(hr, "Failed to set supportedRuntime/@version to '%ls'.", sczSupportedRuntimeVersion);
385
+
386
+ *pfUpdatedManifest = TRUE;
387
+
388
+LExit:
389
+ ReleaseObject(pixnSupportedRuntime);
390
+ ReleaseObject(pixnStartup);
391
+ ReleaseStr(sczSupportedRuntimeVersion);
392
+
393
+ return hr;
394
+}
395
+
396
+// Gets the CLR host and caches it.
397
+static HRESULT GetCLRHost(
398
+ __in LPCWSTR wzConfigPath,
399
+ __out ICorRuntimeHost **ppCLRHost
400
+ )
401
+{
402
+ HRESULT hr = S_OK;
403
+ UINT uiMode = 0;
404
+ HMODULE hModule = NULL;
405
+ BOOL fFallbackToCorBindToCurrentRuntime = TRUE;
406
+ CLRCreateInstanceFnPtr pfnCLRCreateInstance = NULL;
407
+ ICLRMetaHostPolicy* pCLRMetaHostPolicy = NULL;
408
+ IStream* pCfgStream = NULL;
409
+ LPWSTR pwzVersion = NULL;
410
+ DWORD cchVersion = 0;
411
+ DWORD dwConfigFlags = 0;
412
+ ICLRRuntimeInfo* pCLRRuntimeInfo = NULL;
413
+ PFN_CORBINDTOCURRENTRUNTIME pfnCorBindToCurrentRuntime = NULL;
414
+
415
+ // Always set the error mode because we will always restore it below.
416
+ uiMode = ::SetErrorMode(0);
417
+
418
+ // Cache the CLR host to be shutdown later. This can occur on a different thread.
419
+ if (!vpCLRHost)
420
+ {
421
+ // Disable message boxes from being displayed on error and blocking execution.
422
+ ::SetErrorMode(uiMode | SEM_FAILCRITICALERRORS);
423
+
424
+ hr = LoadSystemLibrary(L"mscoree.dll", &hModule);
425
+ ExitOnFailure(hr, "Failed to load mscoree.dll");
426
+
427
+ pfnCLRCreateInstance = reinterpret_cast<CLRCreateInstanceFnPtr>(::GetProcAddress(hModule, "CLRCreateInstance"));
428
+
429
+ if (pfnCLRCreateInstance)
430
+ {
431
+ hr = pfnCLRCreateInstance(CLSID_CLRMetaHostPolicy, IID_ICLRMetaHostPolicy, reinterpret_cast<LPVOID*>(&pCLRMetaHostPolicy));
432
+ if (E_NOTIMPL != hr)
433
+ {
434
+ ExitOnRootFailure(hr, "Failed to create instance of ICLRMetaHostPolicy.");
435
+
436
+ fFallbackToCorBindToCurrentRuntime = FALSE;
437
+ }
438
+ }
439
+
440
+ if (fFallbackToCorBindToCurrentRuntime)
441
+ {
442
+ pfnCorBindToCurrentRuntime = reinterpret_cast<PFN_CORBINDTOCURRENTRUNTIME>(::GetProcAddress(hModule, "CorBindToCurrentRuntime"));
443
+ ExitOnNullWithLastError(pfnCorBindToCurrentRuntime, hr, "Failed to get procedure address for CorBindToCurrentRuntime.");
444
+
445
+ hr = pfnCorBindToCurrentRuntime(wzConfigPath, CLSID_CorRuntimeHost, IID_ICorRuntimeHost, reinterpret_cast<LPVOID*>(&vpCLRHost));
446
+ ExitOnRootFailure(hr, "Failed to create the CLR host using the application configuration file path.");
447
+ }
448
+ else
449
+ {
450
+
451
+ hr = SHCreateStreamOnFileEx(wzConfigPath, STGM_READ | STGM_SHARE_DENY_WRITE, 0, FALSE, NULL, &pCfgStream);
452
+ ExitOnFailure(hr, "Failed to load bootstrapper config file from path: %ls", wzConfigPath);
453
+
454
+ hr = pCLRMetaHostPolicy->GetRequestedRuntime(METAHOST_POLICY_HIGHCOMPAT, NULL, pCfgStream, NULL, &cchVersion, NULL, NULL, &dwConfigFlags, IID_ICLRRuntimeInfo, reinterpret_cast<LPVOID*>(&pCLRRuntimeInfo));
455
+ ExitOnRootFailure(hr, "Failed to get the CLR runtime info using the application configuration file path.");
456
+
457
+ // .NET 4 RTM had a bug where it wouldn't set pcchVersion if pwzVersion was NULL.
458
+ if (!cchVersion)
459
+ {
460
+ hr = pCLRRuntimeInfo->GetVersionString(NULL, &cchVersion);
461
+ if (HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) != hr)
462
+ {
463
+ ExitOnFailure(hr, "Failed to get the length of the CLR version string.");
464
+ }
465
+ }
466
+
467
+ hr = StrAlloc(&pwzVersion, cchVersion);
468
+ ExitOnFailure(hr, "Failed to allocate the CLR version string.");
469
+
470
+ hr = pCLRRuntimeInfo->GetVersionString(pwzVersion, &cchVersion);
471
+ ExitOnFailure(hr, "Failed to get the CLR version string.");
472
+
473
+ if (CSTR_EQUAL == CompareString(LOCALE_NEUTRAL, 0, L"v4.0.30319", -1, pwzVersion, cchVersion))
474
+ {
475
+ hr = VerifyNET4RuntimeIsSupported();
476
+ ExitOnFailure(hr, "Found unsupported .NET 4 Runtime.");
477
+ }
478
+
479
+ if (METAHOST_CONFIG_FLAGS_LEGACY_V2_ACTIVATION_POLICY_TRUE == (METAHOST_CONFIG_FLAGS_LEGACY_V2_ACTIVATION_POLICY_MASK & dwConfigFlags))
480
+ {
481
+ hr = pCLRRuntimeInfo->BindAsLegacyV2Runtime();
482
+ ExitOnRootFailure(hr, "Failed to bind as legacy V2 runtime.");
483
+ }
484
+
485
+ hr = pCLRRuntimeInfo->GetInterface(CLSID_CorRuntimeHost, IID_ICorRuntimeHost, reinterpret_cast<LPVOID*>(&vpCLRHost));
486
+ ExitOnRootFailure(hr, "Failed to get instance of ICorRuntimeHost.");
487
+
488
+ // TODO: use ICLRRuntimeHost instead of ICorRuntimeHost on .NET 4 since the former is faster and the latter is deprecated
489
+ //hr = pCLRRuntimeInfo->GetInterface(CLSID_CLRRuntimeHost, IID_ICLRRuntimeHost, reinterpret_cast<LPVOID*>(&pCLRRuntimeHost));
490
+ //ExitOnRootFailure(hr, "Failed to get instance of ICLRRuntimeHost.");
491
+ }
492
+ }
493
+
494
+ vpCLRHost->AddRef();
495
+ *ppCLRHost = vpCLRHost;
496
+
497
+LExit:
498
+ ReleaseStr(pwzVersion);
499
+ ReleaseNullObject(pCLRRuntimeInfo);
500
+ ReleaseNullObject(pCfgStream);
501
+ ReleaseNullObject(pCLRMetaHostPolicy);
502
+
503
+ // Unload the module so it's not in use when we install .NET.
504
+ if (FAILED(hr))
505
+ {
506
+ ::FreeLibrary(hModule);
507
+ }
508
+
509
+ ::SetErrorMode(uiMode); // restore the previous error mode.
510
+
511
+ return hr;
512
+}
513
+
514
+// Creates the bootstrapper app and returns it for the engine.
515
+static HRESULT CreateManagedBootstrapperApplication(
516
+ __in _AppDomain* pAppDomain,
517
+ __in IBootstrapperEngine* pEngine,
518
+ __in const BOOTSTRAPPER_CREATE_ARGS* pArgs,
519
+ __inout BOOTSTRAPPER_CREATE_RESULTS* pResults
520
+ )
521
+{
522
+ HRESULT hr = S_OK;
523
+ IBootstrapperApplicationFactory* pAppFactory = NULL;
524
+ IBootstrapperApplication* pApp = NULL;
525
+
526
+ hr = CreateManagedBootstrapperApplicationFactory(pAppDomain, &pAppFactory);
527
+ ExitOnFailure(hr, "Failed to create the factory to create the bootstrapper application.");
528
+
529
+ hr = pAppFactory->Create(pEngine, pArgs->pCommand, &pApp);
530
+ ExitOnFailure(hr, "Failed to create the bootstrapper application.");
531
+
532
+ pResults->pfnBootstrapperApplicationProc = BalBaseBootstrapperApplicationProc;
533
+ pResults->pvBootstrapperApplicationProcContext = pApp;
534
+ pApp = NULL;
535
+
536
+LExit:
537
+ ReleaseNullObject(pApp);
538
+ ReleaseNullObject(pAppFactory);
539
+
540
+ return hr;
541
+}
542
+
543
+// Creates the app factory to create the managed app in the default AppDomain.
544
+static HRESULT CreateManagedBootstrapperApplicationFactory(
545
+ __in _AppDomain* pAppDomain,
546
+ __out IBootstrapperApplicationFactory** ppAppFactory
547
+ )
548
+{
549
+ HRESULT hr = S_OK;
550
+ BSTR bstrAssemblyName = NULL;
551
+ BSTR bstrTypeName = NULL;
552
+ _ObjectHandle* pObj = NULL;
553
+ VARIANT vtBAFactory;
554
+
555
+ ::VariantInit(&vtBAFactory);
556
+
557
+ bstrAssemblyName = ::SysAllocString(MUX_ASSEMBLY_FULL_NAME);
558
+ ExitOnNull(bstrAssemblyName, hr, E_OUTOFMEMORY, "Failed to allocate the full assembly name for the bootstrapper application factory.");
559
+
560
+ bstrTypeName = ::SysAllocString(L"WixToolset.Bootstrapper.BootstrapperApplicationFactory");
561
+ ExitOnNull(bstrTypeName, hr, E_OUTOFMEMORY, "Failed to allocate the full type name for the BA factory.");
562
+
563
+ hr = pAppDomain->CreateInstance(bstrAssemblyName, bstrTypeName, &pObj);
564
+ ExitOnRootFailure(hr, "Failed to create the BA factory object.");
565
+
566
+ hr = pObj->Unwrap(&vtBAFactory);
567
+ ExitOnRootFailure(hr, "Failed to unwrap the BA factory object into the host domain.");
568
+ ExitOnNull(vtBAFactory.punkVal, hr, E_UNEXPECTED, "The variant did not contain the expected IUnknown pointer.");
569
+
570
+ hr = vtBAFactory.punkVal->QueryInterface(__uuidof(IBootstrapperApplicationFactory), reinterpret_cast<LPVOID*>(ppAppFactory));
571
+ ExitOnRootFailure(hr, "Failed to query for the bootstrapper app factory interface.");
572
+
573
+LExit:
574
+ ReleaseVariant(vtBAFactory);
575
+ ReleaseNullObject(pObj);
576
+ ReleaseBSTR(bstrTypeName);
577
+ ReleaseBSTR(bstrAssemblyName);
578
+
579
+ return hr;
580
+}
581
+
582
+static HRESULT CreatePrerequisiteBA(
583
+ __in HRESULT hrHostInitialization,
584
+ __in IBootstrapperEngine* pEngine,
585
+ __in const BOOTSTRAPPER_CREATE_ARGS* pArgs,
586
+ __inout BOOTSTRAPPER_CREATE_RESULTS* pResults
587
+ )
588
+{
589
+ HRESULT hr = S_OK;
590
+ LPWSTR sczMbapreqPath = NULL;
591
+ HMODULE hModule = NULL;
592
+
593
+ hr = PathRelativeToModule(&sczMbapreqPath, L"mbapreq.dll", vhInstance);
594
+ ExitOnFailure(hr, "Failed to get path to pre-requisite BA.");
595
+
596
+ hModule = ::LoadLibraryW(sczMbapreqPath);
597
+ ExitOnNullWithLastError(hModule, hr, "Failed to load pre-requisite BA DLL.");
598
+
599
+ PFN_MBAPREQ_BOOTSTRAPPER_APPLICATION_CREATE pfnCreate = reinterpret_cast<PFN_MBAPREQ_BOOTSTRAPPER_APPLICATION_CREATE>(::GetProcAddress(hModule, "MbaPrereqBootstrapperApplicationCreate"));
600
+ ExitOnNullWithLastError(pfnCreate, hr, "Failed to get MbaPrereqBootstrapperApplicationCreate entry-point from: %ls", sczMbapreqPath);
601
+
602
+ hr = pfnCreate(hrHostInitialization, pEngine, pArgs, pResults);
603
+ ExitOnFailure(hr, "Failed to create prequisite bootstrapper app.");
604
+
605
+ vhMbapreqModule = hModule;
606
+ hModule = NULL;
607
+
608
+LExit:
609
+ if (hModule)
610
+ {
611
+ ::FreeLibrary(hModule);
612
+ }
613
+ ReleaseStr(sczMbapreqPath);
614
+
615
+ return hr;
616
+}
617
+
618
+static HRESULT VerifyNET4RuntimeIsSupported(
619
+ )
620
+{
621
+ HRESULT hr = S_OK;
622
+ OS_VERSION osv = OS_VERSION_UNKNOWN;
623
+ DWORD dwServicePack = 0;
624
+ HKEY hKey = NULL;
625
+ DWORD er = ERROR_SUCCESS;
626
+ DWORD dwRelease = 0;
627
+ DWORD cchRelease = sizeof(dwRelease);
628
+
629
+ OsGetVersion(&osv, &dwServicePack);
630
+ if (OS_VERSION_WIN7 == osv && 0 == dwServicePack)
631
+ {
632
+ hr = RegOpen(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full", KEY_QUERY_VALUE, &hKey);
633
+ if (E_FILENOTFOUND == hr)
634
+ {
635
+ ExitFunction1(hr = S_OK);
636
+ }
637
+ ExitOnFailure(hr, "Failed to open registry key for .NET 4.");
638
+
639
+ er = ::RegQueryValueExW(hKey, L"Release", NULL, NULL, reinterpret_cast<LPBYTE>(&dwRelease), &cchRelease);
640
+ if (ERROR_FILE_NOT_FOUND == er)
641
+ {
642
+ ExitFunction1(hr = S_OK);
643
+ }
644
+ ExitOnWin32Error(er, hr, "Failed to get Release value.");
645
+
646
+ if (NET452_RELEASE <= dwRelease)
647
+ {
648
+ hr = E_MBAHOST_NET452_ON_WIN7RTM;
649
+ }
650
+ }
651
+
652
+LExit:
653
+ ReleaseRegKey(hKey);
654
+
655
+ return hr;
656
+}
src/mbahost/host.def
new
+6
@@ -0,0 +1,6 @@
1
+; Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
+
3
+
4
+EXPORTS
5
+ BootstrapperApplicationCreate
6
+ BootstrapperApplicationDestroy
src/mbahost/host.vcxproj
new
+51
@@ -0,0 +1,51 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6
+ <ItemGroup Label="ProjectConfigurations">
7
+ <ProjectConfiguration Include="Debug|Win32">
8
+ <Configuration>Debug</Configuration>
9
+ <Platform>Win32</Platform>
10
+ </ProjectConfiguration>
11
+ <ProjectConfiguration Include="Release|Win32">
12
+ <Configuration>Release</Configuration>
13
+ <Platform>Win32</Platform>
14
+ </ProjectConfiguration>
15
+ </ItemGroup>
16
+
17
+ <PropertyGroup Label="Globals">
18
+ <ProjectGuid>{12C87C77-3547-44F8-8134-29BC915CB19D}</ProjectGuid>
19
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
20
+ <CharacterSet>Unicode</CharacterSet>
21
+ <TargetName>mbahost</TargetName>
22
+ <ProjectModuleDefinitionFile>host.def</ProjectModuleDefinitionFile>
23
+ </PropertyGroup>
24
+
25
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.props" />
26
+
27
+ <PropertyGroup>
28
+ <ProjectAdditionalIncludeDirectories>$(WixRoot)src\libs\dutil\inc;$(WixRoot)src\burn\inc;$(WixRoot)src\libs\balutil\inc;$(BaseIntermediateOutputPath)\core</ProjectAdditionalIncludeDirectories>
29
+ <ProjectAdditionalLinkLibraries>dutil.lib;balutil.lib;shlwapi.lib</ProjectAdditionalLinkLibraries>
30
+ </PropertyGroup>
31
+
32
+ <ItemGroup>
33
+ <ClCompile Include="host.cpp" />
34
+ </ItemGroup>
35
+ <ItemGroup>
36
+ <ClInclude Include="IBootstrapperApplicationFactory.h" />
37
+ <ClInclude Include="precomp.h" />
38
+ </ItemGroup>
39
+ <ItemGroup>
40
+ <None Include="host.def" />
41
+ </ItemGroup>
42
+ <ItemGroup>
43
+ <ResourceCompile Include="host.rc" />
44
+ </ItemGroup>
45
+
46
+ <ItemGroup>
47
+ <ProjectReference Include="..\core\core.csproj" />
48
+ </ItemGroup>
49
+
50
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
51
+</Project>
src/mbahost/precomp.h
new
+25
@@ -0,0 +1,25 @@
1
+#pragma once
2
+// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
3
+
4
+
5
+#include <windows.h>
6
+#include <msiquery.h>
7
+#include <metahost.h>
8
+#include <shlwapi.h>
9
+
10
+#import <mscorlib.tlb> raw_interfaces_only rename("ReportEvent", "mscorlib_ReportEvent")
11
+
12
+#include <dutil.h>
13
+#include <osutil.h>
14
+#include <pathutil.h>
15
+#include <regutil.h>
16
+#include <strutil.h>
17
+#include <xmlutil.h>
18
+
19
+#include "BootstrapperEngine.h"
20
+#include "BootstrapperApplication.h"
21
+#include "IBootstrapperEngine.h"
22
+#include "IBootstrapperApplication.h"
23
+#include "IBootstrapperApplicationFactory.h"
24
+
25
+#include "balutil.h"
src/wixext/BalBinder.cs
new
+125
@@ -0,0 +1,125 @@
1
+// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
+
3
+namespace WixToolset.Extensions
4
+{
5
+ using System;
6
+ using System.Collections.Generic;
7
+ using System.Linq;
8
+ using System.Text;
9
+ using WixToolset;
10
+ using WixToolset.Data;
11
+ using WixToolset.Data.Rows;
12
+ using WixToolset.Extensibility;
13
+
14
+ public class BalBinder : BinderExtension
15
+ {
16
+ public override void Finish(Output output)
17
+ {
18
+ // Only process Bundles.
19
+ if (OutputType.Bundle != output.Type)
20
+ {
21
+ return;
22
+ }
23
+
24
+ Table baTable = output.Tables["WixBootstrapperApplication"];
25
+ Row baRow = baTable.Rows[0];
26
+ string baId = (string)baRow[0];
27
+ if (null == baId)
28
+ {
29
+ return;
30
+ }
31
+
32
+ bool isStdBA = baId.StartsWith("WixStandardBootstrapperApplication");
33
+ bool isMBA = baId.StartsWith("ManagedBootstrapperApplicationHost");
34
+
35
+ if (isStdBA || isMBA)
36
+ {
37
+ VerifyBAFunctions(output);
38
+ }
39
+
40
+ if (isMBA)
41
+ {
42
+ VerifyPrereqPackages(output);
43
+ }
44
+ }
45
+
46
+ private void VerifyBAFunctions(Output output)
47
+ {
48
+ Row baFunctionsRow = null;
49
+ Table baFunctionsTable = output.Tables["WixBalBAFunctions"];
50
+ foreach (Row row in baFunctionsTable.RowsAs<Row>())
51
+ {
52
+ if (null == baFunctionsRow)
53
+ {
54
+ baFunctionsRow = row;
55
+ }
56
+ else
57
+ {
58
+ this.Core.OnMessage(BalErrors.MultipleBAFunctions(row.SourceLineNumbers));
59
+ }
60
+ }
61
+
62
+ Table payloadPropertiesTable = output.Tables["WixPayloadProperties"];
63
+ IEnumerable<WixPayloadPropertiesRow> payloadPropertiesRows = payloadPropertiesTable.RowsAs<WixPayloadPropertiesRow>();
64
+ if (null == baFunctionsRow)
65
+ {
66
+ foreach (WixPayloadPropertiesRow payloadPropertiesRow in payloadPropertiesRows)
67
+ {
68
+ // TODO: Make core WiX canonicalize Name (this won't catch '.\bafunctions.dll').
69
+ if (String.Equals(payloadPropertiesRow.Name, "bafunctions.dll", StringComparison.OrdinalIgnoreCase))
70
+ {
71
+ this.Core.OnMessage(BalWarnings.UnmarkedBAFunctionsDLL(payloadPropertiesRow.SourceLineNumbers));
72
+ }
73
+ }
74
+ }
75
+ else
76
+ {
77
+ // TODO: May need to revisit this depending on the outcome of #5273.
78
+ string payloadId = (string)baFunctionsRow[0];
79
+ WixPayloadPropertiesRow bundlePayloadRow = payloadPropertiesRows.Single(x => payloadId == x.Id);
80
+ if (Compiler.BurnUXContainerId != bundlePayloadRow.Container)
81
+ {
82
+ this.Core.OnMessage(BalErrors.BAFunctionsPayloadRequiredInUXContainer(baFunctionsRow.SourceLineNumbers));
83
+ }
84
+ }
85
+ }
86
+
87
+ private void VerifyPrereqPackages(Output output)
88
+ {
89
+ Table prereqInfoTable = output.Tables["WixMbaPrereqInformation"];
90
+ if (null == prereqInfoTable || prereqInfoTable.Rows.Count == 0)
91
+ {
92
+ this.Core.OnMessage(BalErrors.MissingPrereq());
93
+ return;
94
+ }
95
+
96
+ bool foundLicenseFile = false;
97
+ bool foundLicenseUrl = false;
98
+
99
+ foreach (Row prereqInfoRow in prereqInfoTable.Rows)
100
+ {
101
+ if (null != prereqInfoRow[1])
102
+ {
103
+ if (foundLicenseFile || foundLicenseUrl)
104
+ {
105
+ this.Core.OnMessage(BalErrors.MultiplePrereqLicenses(prereqInfoRow.SourceLineNumbers));
106
+ return;
107
+ }
108
+
109
+ foundLicenseFile = true;
110
+ }
111
+
112
+ if (null != prereqInfoRow[2])
113
+ {
114
+ if (foundLicenseFile || foundLicenseUrl)
115
+ {
116
+ this.Core.OnMessage(BalErrors.MultiplePrereqLicenses(prereqInfoRow.SourceLineNumbers));
117
+ return;
118
+ }
119
+
120
+ foundLicenseUrl = true;
121
+ }
122
+ }
123
+ }
124
+ }
125
+}
src/wixext/BalCompiler.cs
new
+562
@@ -0,0 +1,562 @@
1
+// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
+
3
+namespace WixToolset.Extensions
4
+{
5
+ using System;
6
+ using System.Collections.Generic;
7
+ using System.Xml.Linq;
8
+ using WixToolset.Data;
9
+ using WixToolset.Data.Rows;
10
+ using WixToolset.Extensibility;
11
+
12
+ /// <summary>
13
+ /// The compiler for the WiX Toolset Bal Extension.
14
+ /// </summary>
15
+ public sealed class BalCompiler : CompilerExtension
16
+ {
17
+ private SourceLineNumber addedConditionLineNumber;
18
+ private Dictionary<string, Row> prereqInfoRows;
19
+
20
+ /// <summary>
21
+ /// Instantiate a new BalCompiler.
22
+ /// </summary>
23
+ public BalCompiler()
24
+ {
25
+ this.addedConditionLineNumber = null;
26
+ prereqInfoRows = new Dictionary<string, Row>();
27
+ this.Namespace = "http://wixtoolset.org/schemas/v4/wxs/bal";
28
+ }
29
+
30
+ /// <summary>
31
+ /// Processes an element for the Compiler.
32
+ /// </summary>
33
+ /// <param name="parentElement">Parent element of element to process.</param>
34
+ /// <param name="element">Element to process.</param>
35
+ /// <param name="contextValues">Extra information about the context in which this element is being parsed.</param>
36
+ public override void ParseElement(XElement parentElement, XElement element, IDictionary<string, string> context)
37
+ {
38
+ switch (parentElement.Name.LocalName)
39
+ {
40
+ case "Bundle":
41
+ case "Fragment":
42
+ switch (element.Name.LocalName)
43
+ {
44
+ case "Condition":
45
+ this.ParseConditionElement(element);
46
+ break;
47
+ default:
48
+ this.Core.UnexpectedElement(parentElement, element);
49
+ break;
50
+ }
51
+ break;
52
+ case "BootstrapperApplicationRef":
53
+ switch (element.Name.LocalName)
54
+ {
55
+ case "WixStandardBootstrapperApplication":
56
+ this.ParseWixStandardBootstrapperApplicationElement(element);
57
+ break;
58
+ case "WixManagedBootstrapperApplicationHost":
59
+ this.ParseWixManagedBootstrapperApplicationHostElement(element);
60
+ break;
61
+ default:
62
+ this.Core.UnexpectedElement(parentElement, element);
63
+ break;
64
+ }
65
+ break;
66
+ default:
67
+ this.Core.UnexpectedElement(parentElement, element);
68
+ break;
69
+ }
70
+ }
71
+
72
+ /// <summary>
73
+ /// Processes an attribute for the Compiler.
74
+ /// </summary>
75
+ /// <param name="sourceLineNumbers">Source line number for the parent element.</param>
76
+ /// <param name="parentElement">Parent element of element to process.</param>
77
+ /// <param name="attribute">Attribute to process.</param>
78
+ /// <param name="context">Extra information about the context in which this element is being parsed.</param>
79
+ public override void ParseAttribute(XElement parentElement, XAttribute attribute, IDictionary<string, string> context)
80
+ {
81
+ SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(parentElement);
82
+ Row row;
83
+
84
+ switch (parentElement.Name.LocalName)
85
+ {
86
+ case "ExePackage":
87
+ case "MsiPackage":
88
+ case "MspPackage":
89
+ case "MsuPackage":
90
+ string packageId;
91
+ if (!context.TryGetValue("PackageId", out packageId) || String.IsNullOrEmpty(packageId))
92
+ {
93
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, parentElement.Name.LocalName, "Id", attribute.Name.LocalName));
94
+ }
95
+ else
96
+ {
97
+ switch (attribute.Name.LocalName)
98
+ {
99
+ case "PrereqLicenseFile":
100
+
101
+ if (!prereqInfoRows.TryGetValue(packageId, out row))
102
+ {
103
+ // at the time the extension attribute is parsed, the compiler might not yet have
104
+ // parsed the PrereqPackage attribute, so we need to get it directly from the parent element.
105
+ XAttribute prereqPackage = parentElement.Attribute(this.Namespace + "PrereqPackage");
106
+
107
+ if (null != prereqPackage && YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, prereqPackage))
108
+ {
109
+ row = this.Core.CreateRow(sourceLineNumbers, "WixMbaPrereqInformation");
110
+ row[0] = packageId;
111
+
112
+ prereqInfoRows.Add(packageId, row);
113
+ }
114
+ else
115
+ {
116
+ this.Core.OnMessage(BalErrors.AttributeRequiresPrereqPackage(sourceLineNumbers, parentElement.Name.LocalName, "PrereqLicenseFile"));
117
+ break;
118
+ }
119
+ }
120
+
121
+ if (null != row[2])
122
+ {
123
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, parentElement.Name.LocalName, "PrereqLicenseFile", "PrereqLicenseUrl"));
124
+ }
125
+ else
126
+ {
127
+ row[1] = this.Core.GetAttributeValue(sourceLineNumbers, attribute);
128
+ }
129
+ break;
130
+ case "PrereqLicenseUrl":
131
+
132
+ if (!prereqInfoRows.TryGetValue(packageId, out row))
133
+ {
134
+ // at the time the extension attribute is parsed, the compiler might not yet have
135
+ // parsed the PrereqPackage attribute, so we need to get it directly from the parent element.
136
+ XAttribute prereqPackage = parentElement.Attribute(this.Namespace + "PrereqPackage");
137
+
138
+ if (null != prereqPackage && YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, prereqPackage))
139
+ {
140
+ row = this.Core.CreateRow(sourceLineNumbers, "WixMbaPrereqInformation");
141
+ row[0] = packageId;
142
+
143
+ prereqInfoRows.Add(packageId, row);
144
+ }
145
+ else
146
+ {
147
+ this.Core.OnMessage(BalErrors.AttributeRequiresPrereqPackage(sourceLineNumbers, parentElement.Name.LocalName, "PrereqLicenseUrl"));
148
+ break;
149
+ }
150
+ }
151
+
152
+ if (null != row[1])
153
+ {
154
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, parentElement.Name.LocalName, "PrereqLicenseUrl", "PrereqLicenseFile"));
155
+ }
156
+ else
157
+ {
158
+ row[2] = this.Core.GetAttributeValue(sourceLineNumbers, attribute);
159
+ }
160
+ break;
161
+ case "PrereqPackage":
162
+ if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attribute))
163
+ {
164
+ if (!prereqInfoRows.TryGetValue(packageId, out row))
165
+ {
166
+ row = this.Core.CreateRow(sourceLineNumbers, "WixMbaPrereqInformation");
167
+ row[0] = packageId;
168
+
169
+ prereqInfoRows.Add(packageId, row);
170
+ }
171
+ }
172
+ break;
173
+ default:
174
+ this.Core.UnexpectedAttribute(parentElement, attribute);
175
+ break;
176
+ }
177
+ }
178
+ break;
179
+ case "Payload":
180
+ string payloadId;
181
+ if (!context.TryGetValue("Id", out payloadId) || String.IsNullOrEmpty(payloadId))
182
+ {
183
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, parentElement.Name.LocalName, "Id", attribute.Name.LocalName));
184
+ }
185
+ else
186
+ {
187
+ switch (attribute.Name.LocalName)
188
+ {
189
+ case "BAFunctions":
190
+ if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attribute))
191
+ {
192
+ row = this.Core.CreateRow(sourceLineNumbers, "WixBalBAFunctions");
193
+ row[0] = payloadId;
194
+ }
195
+ break;
196
+ default:
197
+ this.Core.UnexpectedAttribute(parentElement, attribute);
198
+ break;
199
+ }
200
+ }
201
+ break;
202
+ case "Variable":
203
+ // at the time the extension attribute is parsed, the compiler might not yet have
204
+ // parsed the Name attribute, so we need to get it directly from the parent element.
205
+ XAttribute variableName = parentElement.Attribute("Name");
206
+ if (null == variableName)
207
+ {
208
+ this.Core.OnMessage(WixErrors.ExpectedParentWithAttribute(sourceLineNumbers, "Variable", "Overridable", "Name"));
209
+ }
210
+ else
211
+ {
212
+ switch (attribute.Name.LocalName)
213
+ {
214
+ case "Overridable":
215
+ if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attribute))
216
+ {
217
+ row = this.Core.CreateRow(sourceLineNumbers, "WixStdbaOverridableVariable");
218
+ row[0] = variableName;
219
+ }
220
+ break;
221
+ default:
222
+ this.Core.UnexpectedAttribute(parentElement, attribute);
223
+ break;
224
+ }
225
+ }
226
+ break;
227
+ }
228
+ }
229
+
230
+ /// <summary>
231
+ /// Parses a Condition element for Bundles.
232
+ /// </summary>
233
+ /// <param name="node">The element to parse.</param>
234
+ private void ParseConditionElement(XElement node)
235
+ {
236
+ SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
237
+ string condition = this.Core.GetConditionInnerText(node); // condition is the inner text of the element.
238
+ string message = null;
239
+
240
+ foreach (XAttribute attrib in node.Attributes())
241
+ {
242
+ if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
243
+ {
244
+ switch (attrib.Name.LocalName)
245
+ {
246
+ case "Message":
247
+ message = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
248
+ break;
249
+ default:
250
+ this.Core.UnexpectedAttribute(node, attrib);
251
+ break;
252
+ }
253
+ }
254
+ else
255
+ {
256
+ this.Core.ParseExtensionAttribute(node, attrib);
257
+ }
258
+ }
259
+
260
+ this.Core.ParseForExtensionElements(node);
261
+
262
+ // Error check the values.
263
+ if (String.IsNullOrEmpty(condition))
264
+ {
265
+ this.Core.OnMessage(WixErrors.ConditionExpected(sourceLineNumbers, node.Name.LocalName));
266
+ }
267
+
268
+ if (null == message)
269
+ {
270
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Message"));
271
+ }
272
+
273
+ if (!this.Core.EncounteredError)
274
+ {
275
+ Row row = this.Core.CreateRow(sourceLineNumbers, "WixBalCondition");
276
+ row[0] = condition;
277
+ row[1] = message;
278
+
279
+ if (null == this.addedConditionLineNumber)
280
+ {
281
+ this.addedConditionLineNumber = sourceLineNumbers;
282
+ }
283
+ }
284
+ }
285
+
286
+ /// <summary>
287
+ /// Parses a WixStandardBootstrapperApplication element for Bundles.
288
+ /// </summary>
289
+ /// <param name="node">The element to parse.</param>
290
+ private void ParseWixStandardBootstrapperApplicationElement(XElement node)
291
+ {
292
+ SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
293
+ string launchTarget = null;
294
+ string launchTargetElevatedId = null;
295
+ string launchArguments = null;
296
+ YesNoType launchHidden = YesNoType.NotSet;
297
+ string launchWorkingDir = null;
298
+ string licenseFile = null;
299
+ string licenseUrl = null;
300
+ string logoFile = null;
301
+ string logoSideFile = null;
302
+ string themeFile = null;
303
+ string localizationFile = null;
304
+ YesNoType suppressOptionsUI = YesNoType.NotSet;
305
+ YesNoType suppressDowngradeFailure = YesNoType.NotSet;
306
+ YesNoType suppressRepair = YesNoType.NotSet;
307
+ YesNoType showVersion = YesNoType.NotSet;
308
+ YesNoType supportCacheOnly = YesNoType.NotSet;
309
+
310
+ foreach (XAttribute attrib in node.Attributes())
311
+ {
312
+ if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
313
+ {
314
+ switch (attrib.Name.LocalName)
315
+ {
316
+ case "LaunchTarget":
317
+ launchTarget = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
318
+ break;
319
+ case "LaunchTargetElevatedId":
320
+ launchTargetElevatedId = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
321
+ break;
322
+ case "LaunchArguments":
323
+ launchArguments = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
324
+ break;
325
+ case "LaunchHidden":
326
+ launchHidden = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
327
+ break;
328
+ case "LaunchWorkingFolder":
329
+ launchWorkingDir = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
330
+ break;
331
+ case "LicenseFile":
332
+ licenseFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
333
+ break;
334
+ case "LicenseUrl":
335
+ licenseUrl = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty);
336
+ break;
337
+ case "LogoFile":
338
+ logoFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
339
+ break;
340
+ case "LogoSideFile":
341
+ logoSideFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
342
+ break;
343
+ case "ThemeFile":
344
+ themeFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
345
+ break;
346
+ case "LocalizationFile":
347
+ localizationFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
348
+ break;
349
+ case "SuppressOptionsUI":
350
+ suppressOptionsUI = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
351
+ break;
352
+ case "SuppressDowngradeFailure":
353
+ suppressDowngradeFailure = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
354
+ break;
355
+ case "SuppressRepair":
356
+ suppressRepair = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
357
+ break;
358
+ case "ShowVersion":
359
+ showVersion = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
360
+ break;
361
+ case "SupportCacheOnly":
362
+ supportCacheOnly = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
363
+ break;
364
+ default:
365
+ this.Core.UnexpectedAttribute(node, attrib);
366
+ break;
367
+ }
368
+ }
369
+ else
370
+ {
371
+ this.Core.ParseExtensionAttribute(node, attrib);
372
+ }
373
+ }
374
+
375
+ this.Core.ParseForExtensionElements(node);
376
+
377
+ if (String.IsNullOrEmpty(licenseFile) && null == licenseUrl)
378
+ {
379
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "LicenseFile", "LicenseUrl", true));
380
+ }
381
+
382
+ if (!this.Core.EncounteredError)
383
+ {
384
+ if (!String.IsNullOrEmpty(launchTarget))
385
+ {
386
+ WixBundleVariableRow row = (WixBundleVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixBundleVariable");
387
+ row.Id = "LaunchTarget";
388
+ row.Value = launchTarget;
389
+ row.Type = "string";
390
+ }
391
+
392
+ if (!String.IsNullOrEmpty(launchTargetElevatedId))
393
+ {
394
+ WixBundleVariableRow row = (WixBundleVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixBundleVariable");
395
+ row.Id = "LaunchTargetElevatedId";
396
+ row.Value = launchTargetElevatedId;
397
+ row.Type = "string";
398
+ }
399
+
400
+ if (!String.IsNullOrEmpty(launchArguments))
401
+ {
402
+ WixBundleVariableRow row = (WixBundleVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixBundleVariable");
403
+ row.Id = "LaunchArguments";
404
+ row.Value = launchArguments;
405
+ row.Type = "string";
406
+ }
407
+
408
+ if (YesNoType.Yes == launchHidden)
409
+ {
410
+ WixBundleVariableRow row = (WixBundleVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixBundleVariable");
411
+ row.Id = "LaunchHidden";
412
+ row.Value = "yes";
413
+ row.Type = "string";
414
+ }
415
+
416
+
417
+ if (!String.IsNullOrEmpty(launchWorkingDir))
418
+ {
419
+ WixBundleVariableRow row = (WixBundleVariableRow)this.Core.CreateRow(sourceLineNumbers, "Variable");
420
+ row.Id = "LaunchWorkingFolder";
421
+ row.Value = launchWorkingDir;
422
+ row.Type = "string";
423
+ }
424
+
425
+ if (!String.IsNullOrEmpty(licenseFile))
426
+ {
427
+ WixVariableRow wixVariableRow = (WixVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixVariable");
428
+ wixVariableRow.Id = "WixStdbaLicenseRtf";
429
+ wixVariableRow.Value = licenseFile;
430
+ }
431
+
432
+ if (null != licenseUrl)
433
+ {
434
+ WixVariableRow wixVariableRow = (WixVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixVariable");
435
+ wixVariableRow.Id = "WixStdbaLicenseUrl";
436
+ wixVariableRow.Value = licenseUrl;
437
+ }
438
+
439
+ if (!String.IsNullOrEmpty(logoFile))
440
+ {
441
+ WixVariableRow wixVariableRow = (WixVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixVariable");
442
+ wixVariableRow.Id = "WixStdbaLogo";
443
+ wixVariableRow.Value = logoFile;
444
+ }
445
+
446
+ if (!String.IsNullOrEmpty(logoSideFile))
447
+ {
448
+ WixVariableRow wixVariableRow = (WixVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixVariable");
449
+ wixVariableRow.Id = "WixStdbaLogoSide";
450
+ wixVariableRow.Value = logoSideFile;
451
+ }
452
+
453
+ if (!String.IsNullOrEmpty(themeFile))
454
+ {
455
+ WixVariableRow wixVariableRow = (WixVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixVariable");
456
+ wixVariableRow.Id = "WixStdbaThemeXml";
457
+ wixVariableRow.Value = themeFile;
458
+ }
459
+
460
+ if (!String.IsNullOrEmpty(localizationFile))
461
+ {
462
+ WixVariableRow wixVariableRow = (WixVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixVariable");
463
+ wixVariableRow.Id = "WixStdbaThemeWxl";
464
+ wixVariableRow.Value = localizationFile;
465
+ }
466
+
467
+ if (YesNoType.Yes == suppressOptionsUI || YesNoType.Yes == suppressDowngradeFailure || YesNoType.Yes == suppressRepair || YesNoType.Yes == showVersion || YesNoType.Yes == supportCacheOnly)
468
+ {
469
+ Row row = this.Core.CreateRow(sourceLineNumbers, "WixStdbaOptions");
470
+ if (YesNoType.Yes == suppressOptionsUI)
471
+ {
472
+ row[0] = 1;
473
+ }
474
+
475
+ if (YesNoType.Yes == suppressDowngradeFailure)
476
+ {
477
+ row[1] = 1;
478
+ }
479
+
480
+ if (YesNoType.Yes == suppressRepair)
481
+ {
482
+ row[2] = 1;
483
+ }
484
+
485
+ if (YesNoType.Yes == showVersion)
486
+ {
487
+ row[3] = 1;
488
+ }
489
+
490
+ if (YesNoType.Yes == supportCacheOnly)
491
+ {
492
+ row[4] = 1;
493
+ }
494
+ }
495
+ }
496
+ }
497
+
498
+ /// <summary>
499
+ /// Parses a WixManagedBootstrapperApplicationHost element for Bundles.
500
+ /// </summary>
501
+ /// <param name="node">The element to parse.</param>
502
+ private void ParseWixManagedBootstrapperApplicationHostElement(XElement node)
503
+ {
504
+ SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
505
+ string logoFile = null;
506
+ string themeFile = null;
507
+ string localizationFile = null;
508
+
509
+ foreach (XAttribute attrib in node.Attributes())
510
+ {
511
+ if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
512
+ {
513
+ switch (attrib.Name.LocalName)
514
+ {
515
+ case "LogoFile":
516
+ logoFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
517
+ break;
518
+ case "ThemeFile":
519
+ themeFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
520
+ break;
521
+ case "LocalizationFile":
522
+ localizationFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
523
+ break;
524
+ default:
525
+ this.Core.UnexpectedAttribute(node, attrib);
526
+ break;
527
+ }
528
+ }
529
+ else
530
+ {
531
+ this.Core.ParseExtensionAttribute(node, attrib);
532
+ }
533
+ }
534
+
535
+ this.Core.ParseForExtensionElements(node);
536
+
537
+ if (!this.Core.EncounteredError)
538
+ {
539
+ if (!String.IsNullOrEmpty(logoFile))
540
+ {
541
+ WixVariableRow wixVariableRow = (WixVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixVariable");
542
+ wixVariableRow.Id = "PreqbaLogo";
543
+ wixVariableRow.Value = logoFile;
544
+ }
545
+
546
+ if (!String.IsNullOrEmpty(themeFile))
547
+ {
548
+ WixVariableRow wixVariableRow = (WixVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixVariable");
549
+ wixVariableRow.Id = "PreqbaThemeXml";
550
+ wixVariableRow.Value = themeFile;
551
+ }
552
+
553
+ if (!String.IsNullOrEmpty(localizationFile))
554
+ {
555
+ WixVariableRow wixVariableRow = (WixVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixVariable");
556
+ wixVariableRow.Id = "PreqbaThemeWxl";
557
+ wixVariableRow.Value = localizationFile;
558
+ }
559
+ }
560
+ }
561
+ }
562
+}
src/wixext/BalExtensionData.cs
new
+55
@@ -0,0 +1,55 @@
1
+// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
+
3
+namespace WixToolset.Extensions
4
+{
5
+ using System;
6
+ using System.Reflection;
7
+ using WixToolset.Data;
8
+ using WixToolset.Extensibility;
9
+
10
+ /// <summary>
11
+ /// The WiX Toolset Bal Extension.
12
+ /// </summary>
13
+ public sealed class BalExtensionData : ExtensionData
14
+ {
15
+ /// <summary>
16
+ /// Gets the optional table definitions for this extension.
17
+ /// </summary>
18
+ /// <value>The optional table definitions for this extension.</value>
19
+ public override TableDefinitionCollection TableDefinitions
20
+ {
21
+ get
22
+ {
23
+ return BalExtensionData.GetExtensionTableDefinitions();
24
+ }
25
+ }
26
+
27
+ /// <summary>
28
+ /// Gets the library associated with this extension.
29
+ /// </summary>
30
+ /// <param name="tableDefinitions">The table definitions to use while loading the library.</param>
31
+ /// <returns>The loaded library.</returns>
32
+ public override Library GetLibrary(TableDefinitionCollection tableDefinitions)
33
+ {
34
+ return BalExtensionData.GetExtensionLibrary(tableDefinitions);
35
+ }
36
+
37
+ /// <summary>
38
+ /// Internal mechanism to access the extension's table definitions.
39
+ /// </summary>
40
+ /// <returns>Extension's table definitions.</returns>
41
+ internal static TableDefinitionCollection GetExtensionTableDefinitions()
42
+ {
43
+ return ExtensionData.LoadTableDefinitionHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.tables.xml");
44
+ }
45
+
46
+ /// <summary>
47
+ /// Internal mechanism to access the extension's library.
48
+ /// </summary>
49
+ /// <returns>Extension's library.</returns>
50
+ internal static Library GetExtensionLibrary(TableDefinitionCollection tableDefinitions)
51
+ {
52
+ return ExtensionData.LoadLibraryHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.bal.wixlib", tableDefinitions);
53
+ }
54
+ }
55
+}
src/wixext/WixBalExtension.csproj
new
+47
@@ -0,0 +1,47 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
6
+ <PropertyGroup>
7
+ <ProjectGuid>{BF720A63-9D7B-456E-B60C-8122852D9FED}</ProjectGuid>
8
+ <AssemblyName>WixBalExtension</AssemblyName>
9
+ <OutputType>Library</OutputType>
10
+ <RootNamespace>WixToolset.Extensions</RootNamespace>
11
+ </PropertyGroup>
12
+ <ItemGroup>
13
+ <Compile Include="AssemblyInfo.cs" />
14
+ <Compile Include="BalBinder.cs" />
15
+ <Compile Include="BalCompiler.cs" />
16
+ <Compile Include="BalExtensionData.cs" />
17
+ <MsgGenSource Include="Data\messages.xml">
18
+ <ResourcesLogicalName>$(RootNamespace).Data.Messages.resources</ResourcesLogicalName>
19
+ </MsgGenSource>
20
+ <EmbeddedFlattenedResource Include="Data\tables.xml">
21
+ <LogicalName>$(RootNamespace).Data.tables.xml</LogicalName>
22
+ </EmbeddedFlattenedResource>
23
+ <EmbeddedFlattenedResource Include="Xsd\bal.xsd">
24
+ <LogicalName>$(RootNamespace).Xsd.bal.xsd</LogicalName>
25
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
26
+ </EmbeddedFlattenedResource>
27
+ <XsdGenSource Include="Xsd\bal.xsd">
28
+ <CommonNamespace>WixToolset.Data.Serialize</CommonNamespace>
29
+ <Namespace>WixToolset.Extensions.Serialize.Bal</Namespace>
30
+ </XsdGenSource>
31
+ <EmbeddedResource Include="$(OutputPath)\bal.wixlib">
32
+ <Link>Data\bal.wixlib</Link>
33
+ </EmbeddedResource>
34
+ </ItemGroup>
35
+ <ItemGroup>
36
+ <Reference Include="System" />
37
+ <Reference Include="System.Xml" />
38
+ <Reference Include="System.Xml.Linq" />
39
+ <ProjectReference Include="..\..\..\libs\WixToolset.Data\WixToolset.Data.csproj" />
40
+ <ProjectReference Include="..\..\..\libs\WixToolset.Extensibility\WixToolset.Extensibility.csproj" />
41
+ <ProjectReference Include="..\..\..\tools\wix\Wix.csproj" />
42
+ <ProjectReference Include="..\wixlib\BalExtension.wixproj">
43
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
44
+ </ProjectReference>
45
+ </ItemGroup>
46
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
47
+</Project>
src/wixext/bal.xsd
new
+266
@@ -0,0 +1,266 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
6
+ xmlns:xse=" http://wixtoolset.org/schemas/XmlSchemaExtension"
7
+ xmlns:html="http://www.w3.org/1999/xhtml"
8
+ targetNamespace="http://wixtoolset.org/schemas/v4/wxs/bal"
9
+ xmlns="http://wixtoolset.org/schemas/v4/wxs/bal">
10
+ <xs:annotation>
11
+ <xs:documentation>
12
+ The source code schema for the WiX Toolset Burn User Experience Extension.
13
+ </xs:documentation>
14
+ </xs:annotation>
15
+
16
+ <xs:import namespace="http://wixtoolset.org/schemas/v4/wxs" />
17
+
18
+ <xs:element name="Condition">
19
+ <xs:annotation>
20
+ <xs:documentation>
21
+ Conditions for a bundle. The condition is specified in the inner text of the element.
22
+ </xs:documentation>
23
+ <xs:appinfo>
24
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Bundle" />
25
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
26
+ </xs:appinfo>
27
+ </xs:annotation>
28
+ <xs:complexType>
29
+ <xs:simpleContent>
30
+ <xs:extension base="xs:string">
31
+ <xs:annotation>
32
+ <xs:documentation>
33
+ The condition that must evaluate to true for the installation to continue.
34
+ </xs:documentation>
35
+ </xs:annotation>
36
+ <xs:attribute name="Message" type="xs:string" use="required">
37
+ <xs:annotation>
38
+ <xs:documentation>
39
+ Set the value to the text to display when the condition fails and the installation must be terminated.
40
+ </xs:documentation>
41
+ </xs:annotation>
42
+ </xs:attribute>
43
+ </xs:extension>
44
+ </xs:simpleContent>
45
+ </xs:complexType>
46
+ </xs:element>
47
+
48
+ <xs:element name="WixStandardBootstrapperApplication">
49
+ <xs:annotation>
50
+ <xs:documentation>
51
+ Configures WixStandardBootstrapperApplication for a Bundle.
52
+ </xs:documentation>
53
+ <xs:appinfo>
54
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="BootstrapperApplicationRef" />
55
+ </xs:appinfo>
56
+ </xs:annotation>
57
+ <xs:complexType>
58
+ <xs:attribute name="LaunchTarget" type="xs:string">
59
+ <xs:annotation>
60
+ <xs:documentation>
61
+ If set, the success page will show a Launch button the user can use to launch the application being installed.
62
+ The string value can be formatted using Burn variables enclosed in brackets,
63
+ to refer to installation directories and so forth.
64
+ </xs:documentation>
65
+ </xs:annotation>
66
+ </xs:attribute>
67
+ <xs:attribute name="LaunchTargetElevatedId" type="xs:string">
68
+ <xs:annotation>
69
+ <xs:documentation>
70
+ Id of the target ApprovedExeForElevation element.
71
+ If set with LaunchTarget, WixStdBA will launch the application through the Engine's LaunchApprovedExe method instead of through ShellExecute.
72
+ </xs:documentation>
73
+ </xs:annotation>
74
+ </xs:attribute>
75
+ <xs:attribute name="LaunchArguments" type="xs:string">
76
+ <xs:annotation>
77
+ <xs:documentation>
78
+ If set, WixStdBA will supply these arguments when launching the application specified by the LaunchTarget attribute.
79
+ The string value can be formatted using Burn variables enclosed in brackets,
80
+ to refer to installation directories and so forth.
81
+ </xs:documentation>
82
+ </xs:annotation>
83
+ </xs:attribute>
84
+ <xs:attribute name="LaunchHidden" type="YesNoType">
85
+ <xs:annotation>
86
+ <xs:documentation>
87
+ If set to "yes", WixStdBA will launch the application specified by the LaunchTarget attribute with the SW_HIDE flag.
88
+ This attribute is ignored when the LaunchTargetElevatedId attribute is specified.
89
+ </xs:documentation>
90
+ </xs:annotation>
91
+ </xs:attribute>
92
+ <xs:attribute name="LaunchWorkingFolder" type="xs:string">
93
+ <xs:annotation>
94
+ <xs:documentation>
95
+ WixStdBA will use this working folder when launching the specified application.
96
+ The string value can be formatted using Burn variables enclosed in brackets,
97
+ to refer to installation directories and so forth.
98
+ This attribute is ignored when the LaunchTargetElevatedId attribute is specified.
99
+ </xs:documentation>
100
+ </xs:annotation>
101
+ </xs:attribute>
102
+ <xs:attribute name="LicenseFile" type="xs:string">
103
+ <xs:annotation>
104
+ <xs:documentation>Source file of the RTF license file. Cannot be used simultaneously with LicenseUrl.</xs:documentation>
105
+ </xs:annotation>
106
+ </xs:attribute>
107
+ <xs:attribute name="LicenseUrl" type="xs:string">
108
+ <xs:annotation>
109
+ <xs:documentation>URL target of the license link. Cannot be used simultaneously with LicenseFile. This attribute can be empty to hide the license link completely.</xs:documentation>
110
+ </xs:annotation>
111
+ </xs:attribute>
112
+ <xs:attribute name="LogoFile" type="xs:string">
113
+ <xs:annotation>
114
+ <xs:documentation>Source file of the logo graphic.</xs:documentation>
115
+ </xs:annotation>
116
+ </xs:attribute>
117
+ <xs:attribute name="LogoSideFile" type="xs:string">
118
+ <xs:annotation>
119
+ <xs:documentation>Source file of the side logo graphic.</xs:documentation>
120
+ </xs:annotation>
121
+ </xs:attribute>
122
+ <xs:attribute name="ThemeFile" type="xs:string">
123
+ <xs:annotation>
124
+ <xs:documentation>Source file of the theme XML.</xs:documentation>
125
+ </xs:annotation>
126
+ </xs:attribute>
127
+ <xs:attribute name="LocalizationFile" type="xs:string">
128
+ <xs:annotation>
129
+ <xs:documentation>Source file of the theme localization .wxl file.</xs:documentation>
130
+ </xs:annotation>
131
+ </xs:attribute>
132
+ <xs:attribute name="SuppressOptionsUI" type="YesNoType">
133
+ <xs:annotation>
134
+ <xs:documentation>If set to "yes", the Options button will not be shown and the user will not be able to choose an installation directory.</xs:documentation>
135
+ </xs:annotation>
136
+ </xs:attribute>
137
+ <xs:attribute name="SuppressDowngradeFailure" type="YesNoType">
138
+ <xs:annotation>
139
+ <xs:documentation>If set to "yes", attempting to installer a downgraded version of a bundle will be treated as a successful do-nothing operation.
140
+ The default behavior (or when explicitly set to "no") is to treat downgrade attempts as failures. </xs:documentation>
141
+ </xs:annotation>
142
+ </xs:attribute>
143
+ <xs:attribute name="SuppressRepair" type="YesNoType">
144
+ <xs:annotation>
145
+ <xs:documentation>If set to "yes", the Repair button will not be shown in the maintenance-mode UI.</xs:documentation>
146
+ </xs:annotation>
147
+ </xs:attribute>
148
+ <xs:attribute name="ShowVersion" type="YesNoType">
149
+ <xs:annotation>
150
+ <xs:documentation>If set to "yes", the application version will be displayed on the UI.</xs:documentation>
151
+ </xs:annotation>
152
+ </xs:attribute>
153
+ <xs:attribute name="SupportCacheOnly" type="YesNoType">
154
+ <xs:annotation>
155
+ <xs:documentation>If set to "yes", the bundle can be pre-cached using the /cache command line argument.</xs:documentation>
156
+ </xs:annotation>
157
+ </xs:attribute>
158
+ </xs:complexType>
159
+ </xs:element>
160
+
161
+ <xs:element name="WixManagedBootstrapperApplicationHost">
162
+ <xs:annotation>
163
+ <xs:documentation>
164
+ Configures the ManagedBootstrapperApplicationHost for a Bundle.
165
+ </xs:documentation>
166
+ <xs:appinfo>
167
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="BootstrapperApplicationRef" />
168
+ </xs:appinfo>
169
+ </xs:annotation>
170
+ <xs:complexType>
171
+ <xs:attribute name="LogoFile" type="xs:string">
172
+ <xs:annotation>
173
+ <xs:documentation>Source file of the logo graphic.</xs:documentation>
174
+ </xs:annotation>
175
+ </xs:attribute>
176
+ <xs:attribute name="ThemeFile" type="xs:string">
177
+ <xs:annotation>
178
+ <xs:documentation>Source file of the theme XML.</xs:documentation>
179
+ </xs:annotation>
180
+ </xs:attribute>
181
+ <xs:attribute name="LocalizationFile" type="xs:string">
182
+ <xs:annotation>
183
+ <xs:documentation>Source file of the theme localization .wxl file.</xs:documentation>
184
+ </xs:annotation>
185
+ </xs:attribute>
186
+ </xs:complexType>
187
+ </xs:element>
188
+
189
+ <xs:attribute name="BAFunctions" type="YesNoType">
190
+ <xs:annotation>
191
+ <xs:documentation>
192
+ When set to "yes", WixStdBA will load the DLL and work with it to handle BA messages.
193
+ </xs:documentation>
194
+ <xs:appinfo>
195
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Payload" />
196
+ </xs:appinfo>
197
+ </xs:annotation>
198
+ </xs:attribute>
199
+
200
+ <xs:attribute name="Overridable" type="YesNoType">
201
+ <xs:annotation>
202
+ <xs:documentation>
203
+ When set to "yes", lets the user override the variable's default value by specifying another value on the command line,
204
+ in the form Variable=Value. Otherwise, WixStdBA won't overwrite the default value and will log
205
+ "Ignoring attempt to set non-overridable variable: 'BAR'."
206
+ </xs:documentation>
207
+ <xs:appinfo>
208
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Variable" />
209
+ </xs:appinfo>
210
+ </xs:annotation>
211
+ </xs:attribute>
212
+
213
+ <xs:attribute name="PrereqLicenseFile" type="xs:string">
214
+ <xs:annotation>
215
+ <xs:documentation>
216
+ Source file of the RTF license file.
217
+ There may only be one package in the bundle that has either the PrereqLicenseFile attribute or the PrereqLicenseUrl attribute.
218
+ </xs:documentation>
219
+ <xs:appinfo>
220
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="ExePackage" />
221
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="MsiPackage" />
222
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="MspPackage" />
223
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="MsuPackage" />
224
+ </xs:appinfo>
225
+ </xs:annotation>
226
+ </xs:attribute>
227
+
228
+ <xs:attribute name="PrereqLicenseUrl" type="xs:string">
229
+ <xs:annotation>
230
+ <xs:documentation>
231
+ URL target of the license link.
232
+ There may only be one package in the bundle that has either the PrereqLicenseFile attribute or the PrereqLicenseUrl attribute.
233
+ </xs:documentation>
234
+ <xs:appinfo>
235
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="ExePackage" />
236
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="MsiPackage" />
237
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="MspPackage" />
238
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="MsuPackage" />
239
+ </xs:appinfo>
240
+ </xs:annotation>
241
+ </xs:attribute>
242
+
243
+ <xs:attribute name="PrereqPackage" type="YesNoType">
244
+ <xs:annotation>
245
+ <xs:documentation>
246
+ When set to "yes", the Prereq BA will plan the package to be installed if its InstallCondition is "true" or empty.
247
+ </xs:documentation>
248
+ <xs:appinfo>
249
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="ExePackage" />
250
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="MsiPackage" />
251
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="MspPackage" />
252
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="MsuPackage" />
253
+ </xs:appinfo>
254
+ </xs:annotation>
255
+ </xs:attribute>
256
+
257
+ <xs:simpleType name="YesNoType">
258
+ <xs:annotation>
259
+ <xs:documentation>Values of this type will either be "yes" or "no".</xs:documentation>
260
+ </xs:annotation>
261
+ <xs:restriction base="xs:NMTOKEN">
262
+ <xs:enumeration value="no"/>
263
+ <xs:enumeration value="yes"/>
264
+ </xs:restriction>
265
+ </xs:simpleType>
266
+</xs:schema>
src/wixext/messages.xml
new
+43
@@ -0,0 +1,43 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<Messages Namespace="WixToolset.Extensions" Resources="Data.Messages" xmlns="http://schemas.microsoft.com/genmsgs/2004/07/messages">
6
+ <Class Name="BalErrors" ContainerName="BalErrorEventArgs" BaseContainerName="MessageEventArgs" Level="Error">
7
+ <Message Id="AttributeRequiresPrereqPackage" Number="6801">
8
+ <Instance>
9
+ When the {0}/@{1} attribute is specified, the {0}/@PrereqPackage attribute must be set to "yes".
10
+ <Parameter Type="System.String" Name="elementName" />
11
+ <Parameter Type="System.String" Name="attributeName" />
12
+ </Instance>
13
+ </Message>
14
+ <Message Id="MissingPrereq" Number="6802" SourceLineNumbers="no">
15
+ <Instance>
16
+ There must be at least one PrereqPackage when using the ManagedBootstrapperApplicationHost.
17
+ This is typically done by using the WixNetFxExtension and referencing one of the NetFxAsPrereq package groups.
18
+ </Instance>
19
+ </Message>
20
+ <Message Id="MultiplePrereqLicenses" Number="6803">
21
+ <Instance>
22
+ There may only be one package in the bundle that has either the PrereqLicenseFile attribute or the PrereqLicenseUrl attribute.
23
+ </Instance>
24
+ </Message>
25
+ <Message Id="MultipleBAFunctions" Number="6804">
26
+ <Instance>
27
+ WixStandardBootstrapperApplication doesn't support multiple BAFunctions DLLs.
28
+ </Instance>
29
+ </Message>
30
+ <Message Id="BAFunctionsPayloadRequiredInUXContainer" Number="6805">
31
+ <Instance>
32
+ The BAFunctions DLL Payload element must be located inside the BootstrapperApplication container.
33
+ </Instance>
34
+ </Message>
35
+ </Class>
36
+ <Class Name="BalWarnings" ContainerName="BalWarningEventArgs" BaseContainerName="MessageEventArgs" Level="Warning">
37
+ <Message Id="UnmarkedBAFunctionsDLL" Number="6501">
38
+ <Instance>
39
+ WixStandardBootstrapperApplication doesn't automatically load BAFunctions.dll. Use the bal:BAFunctions attribute to indicate that it should be loaded.
40
+ </Instance>
41
+ </Message>
42
+ </Class>
43
+</Messages>
src/wixext/tables.xml
new
+41
@@ -0,0 +1,41 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<tableDefinitions xmlns="http://wixtoolset.org/schemas/v4/wi/tables">
6
+ <tableDefinition name="WixBalBAFunctions" bootstrapperApplicationData="yes">
7
+ <columnDefinition name="PayloadId" type="string" length="0" nullable="yes" category="identifier" primaryKey="yes"
8
+ keyTable="WixPayloadProperties" keyColumn="1" description="Reference to a payload entry in the WixPayloadProperties table." />
9
+ </tableDefinition>
10
+ <tableDefinition name="WixBalCondition" bootstrapperApplicationData="yes">
11
+ <columnDefinition name="Condition" type="string" length="255" primaryKey="yes" localizable="yes"
12
+ category="condition" description="Expression which must evaluate to TRUE in order for install to commence." />
13
+ <columnDefinition name="Message" type="localized" length="255" escapeIdtCharacters="yes"
14
+ category="formatted" description="Localizable text to display when condition fails and install must abort." />
15
+ </tableDefinition>
16
+
17
+ <tableDefinition name="WixMbaPrereqInformation" bootstrapperApplicationData="yes">
18
+ <columnDefinition name="PackageId" type="string" length="72" primaryKey="yes"
19
+ category="identifier" description="PackageId for the Prereq BA to conditionally install." />
20
+ <columnDefinition name="LicenseFile" type="string" length="0" category="formatted" />
21
+ <columnDefinition name="LicenseUrl" type="string" length="0" category="formatted" />
22
+ </tableDefinition>
23
+
24
+ <tableDefinition name="WixStdbaOptions" bootstrapperApplicationData="yes">
25
+ <columnDefinition name="SuppressOptionsUI" type="number" length="2" nullable="yes"
26
+ maxValue="1" description="If 1, don't show Options button during install." />
27
+ <columnDefinition name="SuppressDowngradeFailure" type="number" length="2" nullable="yes"
28
+ maxValue="1" description="If 1, attempts to downgrade are treated as a successful no-op." />
29
+ <columnDefinition name="SuppressRepair" type="number" length="2" nullable="yes"
30
+ maxValue="1" description="If 1, don't show Repair button during maintenance." />
31
+ <columnDefinition name="ShowVersion" type="number" length="2" nullable="yes"
32
+ maxValue="1" description="If 1, show the version number on the UI." />
33
+ <columnDefinition name="SupportCacheOnly" type="number" length="2" nullable="yes"
34
+ maxValue="1" description="If 1, the bundle can be pre-cached using the /cache command line argument."/>
35
+ </tableDefinition>
36
+
37
+ <tableDefinition name="WixStdbaOverridableVariable" bootstrapperApplicationData="yes">
38
+ <columnDefinition name="Name" type="string" length="255" primaryKey="yes"
39
+ category="identifier" description="Variable name user can override." />
40
+ </tableDefinition>
41
+</tableDefinitions>
src/wixlib/BalExtension.wixproj
new
+39
@@ -0,0 +1,39 @@
1
+<?xml version="1.0" encoding="utf-8" ?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
6
+ <PropertyGroup>
7
+ <ProjectGuid>{3444D952-F21C-496F-AB6B-56435BFD0787}</ProjectGuid>
8
+ <OutputName>bal</OutputName>
9
+ <OutputType>Library</OutputType>
10
+ <BindFiles>true</BindFiles>
11
+ <Pedantic>true</Pedantic>
12
+ <Cultures>en-us</Cultures>
13
+ </PropertyGroup>
14
+
15
+ <ItemGroup>
16
+ <Compile Include="BalExtension.wxs" />
17
+ <Compile Include="Mba.wxs" />
18
+ <Compile Include="NetFx4AsPrereq.wxs" />
19
+ <Compile Include="NetFx45AsPrereq.wxs" />
20
+ <Compile Include="NetFx451AsPrereq.wxs" />
21
+ <Compile Include="NetFx452AsPrereq.wxs" />
22
+ <Compile Include="NetFx46AsPrereq.wxs" />
23
+ <Compile Include="NetFx461AsPrereq.wxs" />
24
+ <Compile Include="NetFx462AsPrereq.wxs" />
25
+ <Compile Include="wixstdba.wxs" />
26
+ <Compile Include="wixstdba_x86.wxs" />
27
+ </ItemGroup>
28
+
29
+ <ItemGroup>
30
+ <BindInputPaths Include="$(OutputPath)WixstdbaResources\" />
31
+ </ItemGroup>
32
+
33
+ <ItemGroup>
34
+ <ProjectReference Include="..\mba\host\host.vcxproj" />
35
+ <ProjectReference Include="..\wixstdba\wixstdba.vcxproj" />
36
+ </ItemGroup>
37
+
38
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
39
+</Project>
src/wixlib/BalExtension.wxs
new
+8
@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
6
+ <Fragment>
7
+ </Fragment>
8
+</Wix>
src/wixlib/Mba.wxs
new
+78
@@ -0,0 +1,78 @@
1
+<?xml version='1.0' encoding='utf-8'?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>
6
+ <!--
7
+ Mba.wxs - Managed UX resources.
8
+ -->
9
+ <Fragment>
10
+ <BootstrapperApplication Id='ManagedBootstrapperApplicationHost' SourceFile='mbahost.dll'>
11
+ <PayloadGroupRef Id='Mba' />
12
+ <PayloadGroupRef Id='MbaPreqStandard' />
13
+ </BootstrapperApplication>
14
+ </Fragment>
15
+
16
+ <Fragment>
17
+ <BootstrapperApplication Id='ManagedBootstrapperApplicationHost.RtfLicense' SourceFile='mbahost.dll'>
18
+ <PayloadGroupRef Id='Mba' />
19
+ <PayloadGroupRef Id='MbaPreqStandard' />
20
+ </BootstrapperApplication>
21
+ </Fragment>
22
+
23
+ <Fragment>
24
+ <BootstrapperApplication Id='ManagedBootstrapperApplicationHost.Minimal' SourceFile='mbahost.dll'>
25
+ <PayloadGroupRef Id='Mba' />
26
+ </BootstrapperApplication>
27
+ </Fragment>
28
+
29
+ <Fragment>
30
+ <BootstrapperApplication Id='ManagedBootstrapperApplicationHost.RtfLicense.Minimal' SourceFile='mbahost.dll'>
31
+ <PayloadGroupRef Id='Mba' />
32
+ </BootstrapperApplication>
33
+ </Fragment>
34
+
35
+ <Fragment>
36
+ <BootstrapperApplication Id='ManagedBootstrapperApplicationHost.Foundation' SourceFile='mbahost.dll'>
37
+ <PayloadGroupRef Id='Mba' />
38
+ </BootstrapperApplication>
39
+ </Fragment>
40
+
41
+ <Fragment>
42
+ <PayloadGroup Id='Mba'>
43
+ <Payload Compressed='yes' SourceFile='BootstrapperCore.dll' />
44
+ <Payload Compressed='yes' SourceFile='wixstdba.dll' Name='mbapreq.dll' />
45
+ </PayloadGroup>
46
+ </Fragment>
47
+
48
+ <Fragment>
49
+ <PayloadGroup Id='MbaPreqStandard'>
50
+ <Payload Name='mbapreq.thm' Compressed='yes' SourceFile='!(wix.PreqbaThemeXml=SourceDir\WixstdbaResources\mbapreq.thm)' />
51
+ <Payload Name='mbapreq.png' Compressed='yes' SourceFile='!(wix.PreqbaLogo=SourceDir\WixstdbaResources\mbapreq.png)' />
52
+ <Payload Name='mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl=SourceDir\WixstdbaResources\mbapreq.wxl)' />
53
+ <Payload Name='1028\mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl1028=SourceDir\WixstdbaResources\1028\mbapreq.wxl)' />
54
+ <Payload Name='1029\mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl1029=SourceDir\WixstdbaResources\1029\mbapreq.wxl)' />
55
+ <Payload Name='1030\mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl1030=SourceDir\WixstdbaResources\1030\mbapreq.wxl)' />
56
+ <Payload Name='1031\mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl1031=SourceDir\WixstdbaResources\1031\mbapreq.wxl)' />
57
+ <Payload Name='1032\mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl1032=SourceDir\WixstdbaResources\1032\mbapreq.wxl)' />
58
+ <Payload Name='1035\mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl1035=SourceDir\WixstdbaResources\1035\mbapreq.wxl)' />
59
+ <Payload Name='1036\mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl1036=SourceDir\WixstdbaResources\1036\mbapreq.wxl)' />
60
+ <Payload Name='1038\mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl1038=SourceDir\WixstdbaResources\1038\mbapreq.wxl)' />
61
+ <Payload Name='1040\mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl1040=SourceDir\WixstdbaResources\1040\mbapreq.wxl)' />
62
+ <Payload Name='1041\mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl1041=SourceDir\WixstdbaResources\1041\mbapreq.wxl)' />
63
+ <Payload Name='1042\mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl1042=SourceDir\WixstdbaResources\1042\mbapreq.wxl)' />
64
+ <Payload Name='1043\mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl1043=SourceDir\WixstdbaResources\1043\mbapreq.wxl)' />
65
+ <Payload Name='1044\mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl1044=SourceDir\WixstdbaResources\1044\mbapreq.wxl)' />
66
+ <Payload Name='1045\mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl1045=SourceDir\WixstdbaResources\1045\mbapreq.wxl)' />
67
+ <Payload Name='1046\mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl1046=SourceDir\WixstdbaResources\1046\mbapreq.wxl)' />
68
+ <Payload Name='1049\mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl1049=SourceDir\WixstdbaResources\1049\mbapreq.wxl)' />
69
+ <Payload Name='1051\mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl1051=SourceDir\WixstdbaResources\1051\mbapreq.wxl)' />
70
+ <Payload Name='1053\mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl1053=SourceDir\WixstdbaResources\1053\mbapreq.wxl)' />
71
+ <Payload Name='1055\mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl1055=SourceDir\WixstdbaResources\1055\mbapreq.wxl)' />
72
+ <Payload Name='1060\mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl1060=SourceDir\WixstdbaResources\1060\mbapreq.wxl)' />
73
+ <Payload Name='2052\mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl2052=SourceDir\WixstdbaResources\2052\mbapreq.wxl)' />
74
+ <Payload Name='2070\mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl2070=SourceDir\WixstdbaResources\2070\mbapreq.wxl)' />
75
+ <Payload Name='3082\mbapreq.wxl' Compressed='yes' SourceFile='!(wix.PreqbaThemeWxl3082=SourceDir\WixstdbaResources\3082\mbapreq.wxl)' />
76
+ </PayloadGroup>
77
+ </Fragment>
78
+</Wix>
src/wixlib/NetFx451AsPrereq.wxs
new
+34
@@ -0,0 +1,34 @@
1
+<?xml version='1.0' encoding='utf-8'?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>
6
+ <?define NetFx451EulaLink = http://wixtoolset.org/licenses/netfx451 ?>
7
+ <?define NetFx451WebId = NetFx451Web ?>
8
+ <Fragment>
9
+ <PackageGroup Id="$(var.NetFx451WebId)AsPrereq">
10
+ <PackageGroupRef Id="$(var.NetFx451WebId)" />
11
+ </PackageGroup>
12
+
13
+ <CustomTable Id='WixMbaPrereqInformation'>
14
+ <Row>
15
+ <Data Column='PackageId'>$(var.NetFx451WebId)</Data>
16
+ <Data Column='LicenseUrl'>$(var.NetFx451EulaLink)</Data>
17
+ </Row>
18
+ </CustomTable>
19
+ </Fragment>
20
+
21
+ <?define NetFx451RedistId = NetFx451Redist ?>
22
+ <Fragment>
23
+ <PackageGroup Id="$(var.NetFx451RedistId)AsPrereq">
24
+ <PackageGroupRef Id="$(var.NetFx451RedistId)" />
25
+ </PackageGroup>
26
+
27
+ <CustomTable Id='WixMbaPrereqInformation'>
28
+ <Row>
29
+ <Data Column='PackageId'>$(var.NetFx451RedistId)</Data>
30
+ <Data Column='LicenseUrl'>$(var.NetFx451EulaLink)</Data>
31
+ </Row>
32
+ </CustomTable>
33
+ </Fragment>
34
+</Wix>
src/wixlib/NetFx452AsPrereq.wxs
new
+34
@@ -0,0 +1,34 @@
1
+<?xml version='1.0' encoding='utf-8'?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>
6
+ <?define NetFx452EulaLink = http://wixtoolset.org/licenses/netfx452 ?>
7
+ <?define NetFx452WebId = NetFx452Web ?>
8
+ <Fragment>
9
+ <PackageGroup Id="$(var.NetFx452WebId)AsPrereq">
10
+ <PackageGroupRef Id="$(var.NetFx452WebId)" />
11
+ </PackageGroup>
12
+
13
+ <CustomTable Id='WixMbaPrereqInformation'>
14
+ <Row>
15
+ <Data Column='PackageId'>$(var.NetFx452WebId)</Data>
16
+ <Data Column='LicenseUrl'>$(var.NetFx452EulaLink)</Data>
17
+ </Row>
18
+ </CustomTable>
19
+ </Fragment>
20
+
21
+ <?define NetFx452RedistId = NetFx452Redist ?>
22
+ <Fragment>
23
+ <PackageGroup Id="$(var.NetFx452RedistId)AsPrereq">
24
+ <PackageGroupRef Id="$(var.NetFx452RedistId)" />
25
+ </PackageGroup>
26
+
27
+ <CustomTable Id='WixMbaPrereqInformation'>
28
+ <Row>
29
+ <Data Column='PackageId'>$(var.NetFx452RedistId)</Data>
30
+ <Data Column='LicenseUrl'>$(var.NetFx452EulaLink)</Data>
31
+ </Row>
32
+ </CustomTable>
33
+ </Fragment>
34
+</Wix>
src/wixlib/NetFx45AsPrereq.wxs
new
+34
@@ -0,0 +1,34 @@
1
+<?xml version='1.0' encoding='utf-8'?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>
6
+ <?define NetFx45EulaLink = http://go.microsoft.com/fwlink/?LinkID=260867 ?>
7
+ <?define NetFx45WebId = NetFx45Web ?>
8
+ <Fragment>
9
+ <PackageGroup Id="$(var.NetFx45WebId)AsPrereq">
10
+ <PackageGroupRef Id="$(var.NetFx45WebId)" />
11
+ </PackageGroup>
12
+
13
+ <CustomTable Id='WixMbaPrereqInformation'>
14
+ <Row>
15
+ <Data Column='PackageId'>$(var.NetFx45WebId)</Data>
16
+ <Data Column='LicenseUrl'>$(var.NetFx45EulaLink)</Data>
17
+ </Row>
18
+ </CustomTable>
19
+ </Fragment>
20
+
21
+ <?define NetFx45RedistId = NetFx45Redist ?>
22
+ <Fragment>
23
+ <PackageGroup Id="$(var.NetFx45RedistId)AsPrereq">
24
+ <PackageGroupRef Id="$(var.NetFx45RedistId)" />
25
+ </PackageGroup>
26
+
27
+ <CustomTable Id='WixMbaPrereqInformation'>
28
+ <Row>
29
+ <Data Column='PackageId'>$(var.NetFx45RedistId)</Data>
30
+ <Data Column='LicenseUrl'>$(var.NetFx45EulaLink)</Data>
31
+ </Row>
32
+ </CustomTable>
33
+ </Fragment>
34
+</Wix>
src/wixlib/NetFx461AsPrereq.wxs
new
+34
@@ -0,0 +1,34 @@
1
+<?xml version='1.0' encoding='utf-8'?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>
6
+ <?define NetFx461EulaLink = http://referencesource.microsoft.com/license.html ?>
7
+ <?define NetFx461WebId = NetFx461Web ?>
8
+ <Fragment>
9
+ <PackageGroup Id="$(var.NetFx461WebId)AsPrereq">
10
+ <PackageGroupRef Id="$(var.NetFx461WebId)" />
11
+ </PackageGroup>
12
+
13
+ <CustomTable Id='WixMbaPrereqInformation'>
14
+ <Row>
15
+ <Data Column='PackageId'>$(var.NetFx461WebId)</Data>
16
+ <Data Column='LicenseUrl'>$(var.NetFx461EulaLink)</Data>
17
+ </Row>
18
+ </CustomTable>
19
+ </Fragment>
20
+
21
+ <?define NetFx461RedistId = NetFx461Redist ?>
22
+ <Fragment>
23
+ <PackageGroup Id="$(var.NetFx461RedistId)AsPrereq">
24
+ <PackageGroupRef Id="$(var.NetFx461RedistId)" />
25
+ </PackageGroup>
26
+
27
+ <CustomTable Id='WixMbaPrereqInformation'>
28
+ <Row>
29
+ <Data Column='PackageId'>$(var.NetFx461RedistId)</Data>
30
+ <Data Column='LicenseUrl'>$(var.NetFx461EulaLink)</Data>
31
+ </Row>
32
+ </CustomTable>
33
+ </Fragment>
34
+</Wix>
src/wixlib/NetFx462AsPrereq.wxs
new
+34
@@ -0,0 +1,34 @@
1
+<?xml version='1.0' encoding='utf-8'?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>
6
+ <?define NetFx462EulaLink = http://referencesource.microsoft.com/license.html ?>
7
+ <?define NetFx462WebId = NetFx462Web ?>
8
+ <Fragment>
9
+ <PackageGroup Id="$(var.NetFx462WebId)AsPrereq">
10
+ <PackageGroupRef Id="$(var.NetFx462WebId)" />
11
+ </PackageGroup>
12
+
13
+ <CustomTable Id='WixMbaPrereqInformation'>
14
+ <Row>
15
+ <Data Column='PackageId'>$(var.NetFx462WebId)</Data>
16
+ <Data Column='LicenseUrl'>$(var.NetFx462EulaLink)</Data>
17
+ </Row>
18
+ </CustomTable>
19
+ </Fragment>
20
+
21
+ <?define NetFx462RedistId = NetFx462Redist ?>
22
+ <Fragment>
23
+ <PackageGroup Id="$(var.NetFx462RedistId)AsPrereq">
24
+ <PackageGroupRef Id="$(var.NetFx462RedistId)" />
25
+ </PackageGroup>
26
+
27
+ <CustomTable Id='WixMbaPrereqInformation'>
28
+ <Row>
29
+ <Data Column='PackageId'>$(var.NetFx462RedistId)</Data>
30
+ <Data Column='LicenseUrl'>$(var.NetFx462EulaLink)</Data>
31
+ </Row>
32
+ </CustomTable>
33
+ </Fragment>
34
+</Wix>
src/wixlib/NetFx46AsPrereq.wxs
new
+34
@@ -0,0 +1,34 @@
1
+<?xml version='1.0' encoding='utf-8'?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>
6
+ <?define NetFx46EulaLink = http://go.microsoft.com/fwlink/?LinkID=558772 ?>
7
+ <?define NetFx46WebId = NetFx46Web ?>
8
+ <Fragment>
9
+ <PackageGroup Id="$(var.NetFx46WebId)AsPrereq">
10
+ <PackageGroupRef Id="$(var.NetFx46WebId)" />
11
+ </PackageGroup>
12
+
13
+ <CustomTable Id='WixMbaPrereqInformation'>
14
+ <Row>
15
+ <Data Column='PackageId'>$(var.NetFx46WebId)</Data>
16
+ <Data Column='LicenseUrl'>$(var.NetFx46EulaLink)</Data>
17
+ </Row>
18
+ </CustomTable>
19
+ </Fragment>
20
+
21
+ <?define NetFx46RedistId = NetFx46Redist ?>
22
+ <Fragment>
23
+ <PackageGroup Id="$(var.NetFx46RedistId)AsPrereq">
24
+ <PackageGroupRef Id="$(var.NetFx46RedistId)" />
25
+ </PackageGroup>
26
+
27
+ <CustomTable Id='WixMbaPrereqInformation'>
28
+ <Row>
29
+ <Data Column='PackageId'>$(var.NetFx46RedistId)</Data>
30
+ <Data Column='LicenseUrl'>$(var.NetFx46EulaLink)</Data>
31
+ </Row>
32
+ </CustomTable>
33
+ </Fragment>
34
+</Wix>
src/wixlib/NetFx4AsPrereq.wxs
new
+71
@@ -0,0 +1,71 @@
1
+<?xml version='1.0' encoding='utf-8'?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>
6
+ <?define NetFx40EulaLink = http://go.microsoft.com/fwlink/?LinkID=188993 ?>
7
+ <?define NetFx40WebId = NetFx40Web ?>
8
+ <Fragment>
9
+ <PackageGroup Id="$(var.NetFx40WebId)AsPrereq">
10
+ <PackageGroupRef Id="$(var.NetFx40WebId)" />
11
+ </PackageGroup>
12
+
13
+ <CustomTable Id='WixMbaPrereqInformation'>
14
+ <Row>
15
+ <Data Column='PackageId'>$(var.NetFx40WebId)</Data>
16
+ <Data Column='LicenseUrl'>$(var.NetFx40EulaLink)</Data>
17
+ </Row>
18
+ </CustomTable>
19
+ </Fragment>
20
+
21
+ <?define NetFx40RedistId = NetFx40Redist ?>
22
+ <Fragment>
23
+ <PackageGroup Id="$(var.NetFx40RedistId)AsPrereq">
24
+ <PackageGroupRef Id="$(var.NetFx40RedistId)" />
25
+ </PackageGroup>
26
+
27
+ <CustomTable Id='WixMbaPrereqInformation'>
28
+ <Row>
29
+ <Data Column='PackageId'>$(var.NetFx40RedistId)</Data>
30
+ <Data Column='LicenseUrl'>$(var.NetFx40EulaLink)</Data>
31
+ </Row>
32
+ </CustomTable>
33
+ </Fragment>
34
+
35
+ <?define NetFx40ClientWebId = NetFx40ClientWeb ?>
36
+ <Fragment>
37
+ <PackageGroup Id="$(var.NetFx40ClientWebId)AsPrereq">
38
+ <PackageGroupRef Id="$(var.NetFx40ClientWebId)" />
39
+ </PackageGroup>
40
+
41
+ <CustomTable Id='WixMbaPrereqInformation'>
42
+ <Row>
43
+ <Data Column='PackageId'>$(var.NetFx40ClientWebId)</Data>
44
+ <Data Column='LicenseUrl'>$(var.NetFx40EulaLink)</Data>
45
+ </Row>
46
+ </CustomTable>
47
+ </Fragment>
48
+
49
+ <?define NetFx40ClientRedistId = NetFx40ClientRedist ?>
50
+ <Fragment>
51
+ <PackageGroup Id="$(var.NetFx40ClientRedistId)AsPrereq">
52
+ <PackageGroupRef Id="$(var.NetFx40ClientRedistId)" />
53
+ </PackageGroup>
54
+
55
+ <CustomTable Id='WixMbaPrereqInformation'>
56
+ <Row>
57
+ <Data Column='PackageId'>$(var.NetFx40ClientRedistId)</Data>
58
+ <Data Column='LicenseUrl'>$(var.NetFx40EulaLink)</Data>
59
+ </Row>
60
+ </CustomTable>
61
+ </Fragment>
62
+
63
+ <!-- Not sure why we have to redefine the table here. -->
64
+ <Fragment>
65
+ <CustomTable Id='WixMbaPrereqInformation' BootstrapperApplicationData='yes'>
66
+ <Column Id='PackageId' Category='Identifier' Type='string' Width='72' PrimaryKey ='yes'/>
67
+ <Column Id='LicenseUrl' Category='Formatted' Type='string' Width='0' Nullable='yes'/>
68
+ <Column Id='LicenseFile' Category='Formatted' Type='string' Width='0' Nullable='yes'/>
69
+ </CustomTable>
70
+ </Fragment>
71
+</Wix>
src/wixlib/wixstdba.wxs
new
+93
@@ -0,0 +1,93 @@
1
+<?xml version='1.0' encoding='utf-8'?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>
6
+ <!-- RTF License Payload Group -->
7
+ <Fragment>
8
+ <PayloadGroup Id='WixStdbaRtfLicensePayloads'>
9
+ <Payload Name='thm.xml' Compressed='yes' SourceFile='!(wix.WixStdbaThemeXml=RtfTheme.xml)' />
10
+ <Payload Name='thm.wxl' Compressed='yes' SourceFile='!(wix.WixStdbaThemeWxl=RtfTheme.wxl)' />
11
+ <Payload Name='logo.png' Compressed='yes' SourceFile='!(wix.WixStdbaLogo=logo.png)' />
12
+
13
+ <Payload Name='!(wix.WixStdbaLicenseRtfName=license.rtf)' Compressed='yes' SourceFile='!(wix.WixStdbaLicenseRtf=LoremIpsumLicense.rtf)' />
14
+ </PayloadGroup>
15
+
16
+ <CustomTable Id='WixStdbaInformation'>
17
+ <Row>
18
+ <Data Column='LicenseFile'>!(wix.WixStdbaLicenseRtfName=license.rtf)</Data>
19
+ </Row>
20
+ </CustomTable>
21
+ </Fragment>
22
+
23
+ <!-- RTF Large License Payload Group -->
24
+ <Fragment>
25
+ <PayloadGroup Id='WixStdbaRtfLargeLicensePayloads'>
26
+ <Payload Name='thm.xml' Compressed='yes' SourceFile='!(wix.WixStdbaThemeXml=RtfLargeTheme.xml)' />
27
+ <Payload Name='thm.wxl' Compressed='yes' SourceFile='!(wix.WixStdbaThemeWxl=RtfTheme.wxl)' />
28
+ <Payload Name='logo.png' Compressed='yes' SourceFile='!(wix.WixStdbaLogo=logo.png)' />
29
+
30
+ <Payload Name='!(wix.WixStdbaLicenseRtfName=license.rtf)' Compressed='yes' SourceFile='!(wix.WixStdbaLicenseRtf=LoremIpsumLicense.rtf)' />
31
+ </PayloadGroup>
32
+
33
+ <CustomTable Id='WixStdbaInformation'>
34
+ <Row>
35
+ <Data Column='LicenseFile'>!(wix.WixStdbaLicenseRtfName=license.rtf)</Data>
36
+ </Row>
37
+ </CustomTable>
38
+ </Fragment>
39
+
40
+ <!-- Hyperlink License Payload Group -->
41
+ <Fragment>
42
+ <PayloadGroup Id='WixStdbaHyperlinkLicensePayloads'>
43
+ <Payload Name='thm.xml' Compressed='yes' SourceFile='!(wix.WixStdbaThemeXml=HyperlinkTheme.xml)' />
44
+ <Payload Name='thm.wxl' Compressed='yes' SourceFile='!(wix.WixStdbaThemeWxl=HyperlinkTheme.wxl)' />
45
+ <Payload Name='logo.png' Compressed='yes' SourceFile='!(wix.WixStdbaLogo=logo.png)' />
46
+ </PayloadGroup>
47
+
48
+ <CustomTable Id='WixStdbaInformation'>
49
+ <Row>
50
+ <Data Column='LicenseUrl'>!(wix.WixStdbaLicenseUrl)</Data>
51
+ </Row>
52
+ </CustomTable>
53
+ </Fragment>
54
+
55
+ <!-- Hyperlink Large License Payload Group -->
56
+ <Fragment>
57
+ <PayloadGroup Id='WixStdbaHyperlinkLargeLicensePayloads'>
58
+ <Payload Name='thm.xml' Compressed='yes' SourceFile='!(wix.WixStdbaThemeXml=HyperlinkLargeTheme.xml)' />
59
+ <Payload Name='thm.wxl' Compressed='yes' SourceFile='!(wix.WixStdbaThemeWxl=HyperlinkTheme.wxl)' />
60
+ <Payload Name='logo.png' Compressed='yes' SourceFile='!(wix.WixStdbaLogo=logo.png)' />
61
+ </PayloadGroup>
62
+
63
+ <CustomTable Id='WixStdbaInformation'>
64
+ <Row>
65
+ <Data Column='LicenseUrl'>!(wix.WixStdbaLicenseUrl)</Data>
66
+ </Row>
67
+ </CustomTable>
68
+ </Fragment>
69
+
70
+ <!-- HyperlinkSidebar License Payload Group -->
71
+ <Fragment>
72
+ <PayloadGroup Id='WixStdbaHyperlinkSidebarLicensePayloads'>
73
+ <Payload Name='thm.xml' Compressed='yes' SourceFile='!(wix.WixStdbaThemeXml=HyperlinkSidebarTheme.xml)' />
74
+ <Payload Name='thm.wxl' Compressed='yes' SourceFile='!(wix.WixStdbaThemeWxl=HyperlinkTheme.wxl)' />
75
+ <Payload Name='logo.png' Compressed='yes' SourceFile='!(wix.WixStdbaLogo=logo.png)' />
76
+ <Payload Name='logoside.png' Compressed='yes' SourceFile='!(wix.WixStdbaLogoSide=logoside.png)' />
77
+ </PayloadGroup>
78
+
79
+ <CustomTable Id='WixStdbaInformation'>
80
+ <Row>
81
+ <Data Column='LicenseUrl'>!(wix.WixStdbaLicenseUrl)</Data>
82
+ </Row>
83
+ </CustomTable>
84
+ </Fragment>
85
+
86
+ <!-- BootstrapperApplicationData tables definition -->
87
+ <Fragment>
88
+ <CustomTable Id='WixStdbaInformation' BootstrapperApplicationData='yes'>
89
+ <Column Id='LicenseFile' Category='Text' Type='string' Width='0' Nullable='yes' PrimaryKey='yes' />
90
+ <Column Id='LicenseUrl' Category='Text' Type='string' Width='0' Nullable='yes' PrimaryKey='yes' />
91
+ </CustomTable>
92
+ </Fragment>
93
+</Wix>
src/wixlib/wixstdba_platform.wxi
new
+41
@@ -0,0 +1,41 @@
1
+<?xml version='1.0' encoding='utf-8'?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<Include xmlns='http://wixtoolset.org/schemas/v4/wxs'>
6
+ <?include caSuffix.wxi ?>
7
+ <Fragment>
8
+ <BootstrapperApplication Id='WixStandardBootstrapperApplication.RtfLicense$(var.Suffix)' SourceFile='!(bindpath.$(var.platform))\wixstdba.dll'>
9
+ <PayloadGroupRef Id='WixStdbaRtfLicensePayloads' />
10
+ </BootstrapperApplication>
11
+ </Fragment>
12
+
13
+ <Fragment>
14
+ <BootstrapperApplication Id='WixStandardBootstrapperApplication.RtfLargeLicense$(var.Suffix)' SourceFile='!(bindpath.$(var.platform))\wixstdba.dll'>
15
+ <PayloadGroupRef Id='WixStdbaRtfLargeLicensePayloads' />
16
+ </BootstrapperApplication>
17
+ </Fragment>
18
+
19
+ <Fragment>
20
+ <BootstrapperApplication Id='WixStandardBootstrapperApplication.HyperlinkLicense$(var.Suffix)' SourceFile='!(bindpath.$(var.platform))\wixstdba.dll'>
21
+ <PayloadGroupRef Id='WixStdbaHyperlinkLicensePayloads' />
22
+ </BootstrapperApplication>
23
+ </Fragment>
24
+
25
+ <Fragment>
26
+ <BootstrapperApplication Id='WixStandardBootstrapperApplication.HyperlinkLargeLicense$(var.Suffix)' SourceFile='!(bindpath.$(var.platform))\wixstdba.dll'>
27
+ <PayloadGroupRef Id='WixStdbaHyperlinkLargeLicensePayloads' />
28
+ </BootstrapperApplication>
29
+ </Fragment>
30
+
31
+ <Fragment>
32
+ <BootstrapperApplication Id='WixStandardBootstrapperApplication.HyperlinkSidebarLicense$(var.Suffix)' SourceFile='!(bindpath.$(var.platform))\wixstdba.dll'>
33
+ <PayloadGroupRef Id='WixStdbaHyperlinkSidebarLicensePayloads' />
34
+ </BootstrapperApplication>
35
+ </Fragment>
36
+
37
+ <Fragment>
38
+
39
+ <BootstrapperApplication Id='WixStandardBootstrapperApplication.Foundation$(var.Suffix)' SourceFile='!(bindpath.$(var.platform))\wixstdba.dll' />
40
+ </Fragment>
41
+</Include>
src/wixlib/wixstdba_x86.wxs
new
+8
@@ -0,0 +1,8 @@
1
+<?xml version='1.0' encoding='utf-8'?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<Wix xmlns='http://wixtoolset.org/schemas/v4/wxs'>
6
+ <?define platform=x86 ?>
7
+ <?include wixstdba_platform.wxi ?>
8
+</Wix>
src/wixstdba/Resources/1028/mbapreq.wxl
new
+27
@@ -0,0 +1,27 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="zh-tw" Language="1028" xmlns="http://schemas.microsoft.com/wix/2006/localization">
6
+ <String Id="Caption">[WixBundleName] 安裝程式</String>
7
+ <String Id="Title">[WixBundleName] 安裝程式需要 Microsoft .NET Framework</String>
8
+ <String Id="ConfirmCancelMessage">您確定要取消嗎?</String>
9
+ <String Id="HelpHeader">安裝程式說明</String>
10
+ <String Id="HelpText">/passive | /quiet - 顯示最基本的 UI 但不顯示提示,或者不顯示 UI 也
11
+ 不顯示提示。預設會顯示 UI 和所有提示。
12
+
13
+/norestart - 隱藏任何重新啟動嘗試。根據預設,UI 會在重新啟動之前提示。
14
+/log log.txt - 記錄至特定檔案。預設會在 %TEMP% 建立記錄檔。</String>
15
+ <String Id="HelpCloseButton">關閉(&C)</String>
16
+ <String Id="InstallLicenseTerms">請按一下 「接受並安裝」5D; 按鈕,接受 Microsoft .NET Framework <a href="#">授權合約</a>。</String>
17
+ <String Id="InstallAcceptAndInstallButton">接受並安裝(&A)</String>
18
+ <String Id="InstallDeclineButton">拒絕(&D)</String>
19
+ <String Id="ProgressHeader">安裝進度</String>
20
+ <String Id="ProgressLabel">正在處理:</String>
21
+ <String Id="ProgressCancelButton">取消(&)</String>
22
+ <String Id="FailureHeader">安裝失敗</String>
23
+ <String Id="FailureLogLinkText">一或多個問題導致安裝失敗。請修正這些問題,然後再重試安裝。如需詳細資訊,請查看<a href="#">記錄檔</a>。</String>
24
+ <String Id="FailureRestartText">必須重新啟動電腦,才能完成軟體的復原。</String>
25
+ <String Id="FailureRestartButton">重新啟動(&R)</String>
26
+ <String Id="FailureCloseButton">關閉(&C)</String>
27
+</WixLocalization>
src/wixstdba/Resources/1029/mbapreq.wxl
new
+30
@@ -0,0 +1,30 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="cs-cz" Language="1029" xmlns="http://schemas.microsoft.com/wix/2006/localization">
6
+ <String Id="Caption">Instalace produktu [WixBundleName]</String>
7
+ <String Id="Title">Pro instalaci produktu [WixBundleName] je vyžadováno rozhraní Microsoft .NET Framework.</String>
8
+ <String Id="ConfirmCancelMessage">Opravdu chcete akci zrušit?</String>
9
+ <String Id="HelpHeader">Nápověda k instalaci</String>
10
+ <String Id="HelpText">/passive | /quiet - Zobrazí minimální uživatelské rozhraní bez jakýchkoli
11
+ výzev, nebo nezobrazí žádné uživatelské rozhraní ani žádné výzvy. Ve výchozím
12
+ nastavení se jak uživatelské rozhraní, tak i všechny výzvy zobrazují.
13
+
14
+/norestart - Potlačí jakékoli pokusy o restartování. Ve výchozím nastavení
15
+ se v uživatelském rozhraní před restartováním zobrazí výzva.
16
+/log log.txt - Nastaví, že se má zapisovat do konkrétního souboru protokolu.
17
+ Ve výchozím nastavení je soubor protokolu vytvořen v umístění %TEMP%.</String>
18
+ <String Id="HelpCloseButton">&Zavřít</String>
19
+ <String Id="InstallLicenseTerms">Kliknutím na tlačítko Přijmout a nainstalovat přijmete <a href="#">licenční podmínky</a> rozhraní Microsoft .NET Framework.</String>
20
+ <String Id="InstallAcceptAndInstallButton">&Přijmout a instalovat</String>
21
+ <String Id="InstallDeclineButton">&Odmítnout</String>
22
+ <String Id="ProgressHeader">Průběh instalace</String>
23
+ <String Id="ProgressLabel">Probíhá zpracování:</String>
24
+ <String Id="ProgressCancelButton">&Storno</String>
25
+ <String Id="FailureHeader">Instalace se nezdařila</String>
26
+ <String Id="FailureLogLinkText">Byly zjištěny problémy, kvůli kterým se instalaci nepodařilo dokončit. Odstraňte tyto problémy a potom instalaci opakujte. Další informace naleznete v <a href="#">souboru protokolu</a>.</String>
27
+ <String Id="FailureRestartText">Aby bylo možné zrušení instalace softwaru dokončit, je nutné počítač restartovat.</String>
28
+ <String Id="FailureRestartButton">&Restartovat</String>
29
+ <String Id="FailureCloseButton">&Zavřít</String>
30
+</WixLocalization>
src/wixstdba/Resources/1030/mbapreq.wxl
new
+30
@@ -0,0 +1,30 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="da-dk" Language="1030" xmlns="http://schemas.microsoft.com/wix/2006/localization">
6
+ <String Id="Caption">Installation af [WixBundleName]</String>
7
+ <String Id="Title">Microsoft .NET Framework skal være installeret i forbindelse med Installationen af [WixBundleName]</String>
8
+ <String Id="ConfirmCancelMessage">Er du sikker på, at du vil annullere?</String>
9
+ <String Id="HelpHeader">Hjælp til installation</String>
10
+ <String Id="HelpText">/passive | /quiet - viser en minimal brugergrænseflade uden prompter eller
11
+ viser ingen brugergrænseflade og ingen prompter.
12
+ Brugergrænsefladen og alle prompter vises som standard.
13
+
14
+/norestart - skjuler forsøg på genstart. Der vises som standard en
15
+ forespørgsel i brugergrænsefladen, før der genstartes.
16
+/log log.txt - logfører til en bestemt fil. Der oprettes som standard en
17
+ logfil i %TEMP%.</String>
18
+ <String Id="HelpCloseButton">&Luk</String>
19
+ <String Id="InstallLicenseTerms">Klik på knappen "Acceptér og installér" for at acceptere <a href="#">licensvilkårene</a> for Microsoft .NET Framework.</String>
20
+ <String Id="InstallAcceptAndInstallButton">&Acceptér og installér</String>
21
+ <String Id="InstallDeclineButton">&Afvis</String>
22
+ <String Id="ProgressHeader">Status for installation</String>
23
+ <String Id="ProgressLabel">Behandler:</String>
24
+ <String Id="ProgressCancelButton">&Annuller</String>
25
+ <String Id="FailureHeader">Installationen blev ikke gennemført</String>
26
+ <String Id="FailureLogLinkText">Installationen blev ikke gennemført på grund af et eller flere problemer. Løs problemerne, og prøv derefter at installere igen. Se <a href="#">logfilen</a> for at få flere oplysninger.</String>
27
+ <String Id="FailureRestartText">Du skal genstarte computeren for at fuldføre annulleringen af opdateringen af softwaren.</String>
28
+ <String Id="FailureRestartButton">&Genstart</String>
29
+ <String Id="FailureCloseButton">&Luk</String>
30
+</WixLocalization>
src/wixstdba/Resources/1031/mbapreq.wxl
new
+33
@@ -0,0 +1,33 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="de-de" Language="1031" xmlns="http://schemas.microsoft.com/wix/2006/localization">
6
+ <UI Control="InstallButton" Width="180" />
7
+
8
+ <String Id="Caption">[WixBundleName]-Setup</String>
9
+ <String Id="Title">Für das [WixBundleName]-Setup ist Microsoft .NET Framework erforderlich.</String>
10
+ <String Id="ConfirmCancelMessage">Sind Sie sicher, dass Sie den Vorgang abbrechen möchten?</String>
11
+ <String Id="HelpHeader">Setup-Hilfe</String>
12
+ <String Id="HelpText">/passive | /quiet - zeigt eine minimale Benutzeroberfläche ohne
13
+ Eingabeaufforderungen oder keine Benutzeroberfläche und keine
14
+ Eingabeaufforderungen an. Standardmäßig werden die Benutzeroberfläche und
15
+ alle Eingabeaufforderungen angezeigt.
16
+
17
+/norestart - unterdrückt alle Neustartversuche. Standardmäßig fordert die
18
+ Benutzeroberfläche zum Bestätigen eines Neustarts auf.
19
+/log log.txt - erstellt das Protokoll in einer bestimmten Datei.
20
+ Standardmäßig wird die Protokolldatei in "%TEMP%" erstellt.</String>
21
+ <String Id="HelpCloseButton">&Schließen</String>
22
+ <String Id="InstallLicenseTerms">Klicken Sie auf die Schaltfläche "Akzeptieren und installieren", um den Microsoft .NET Framework <a href="#">-Lizenzbedingungen</a> zuzustimmen.</String>
23
+ <String Id="InstallAcceptAndInstallButton">&Akzeptieren und installieren</String>
24
+ <String Id="InstallDeclineButton">&Ablehnen</String>
25
+ <String Id="ProgressHeader">Setup-Status</String>
26
+ <String Id="ProgressLabel">Verarbeitung:</String>
27
+ <String Id="ProgressCancelButton">&Abbrechen</String>
28
+ <String Id="FailureHeader">Setup-Fehler</String>
29
+ <String Id="FailureLogLinkText">Beim Setup ist aufgrund mindestens eines Problems ein Fehler aufgetreten. Beheben Sie die Probleme, und wiederholen Sie das Setup. Weitere Informationen finden Sie in der <a href="#">Protokolldatei</a>.</String>
30
+ <String Id="FailureRestartText">Sie müssen den Computer neu starten, um das Zurücksetzen der Software abzuschließen.</String>
31
+ <String Id="FailureRestartButton">&Neu starten</String>
32
+ <String Id="FailureCloseButton">&Schließen</String>
33
+</WixLocalization>
src/wixstdba/Resources/1032/mbapreq.wxl
new
+32
@@ -0,0 +1,32 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="el-gr" Language="1032" xmlns="http://schemas.microsoft.com/wix/2006/localization">
6
+ <String Id="Caption">Εγκατάσταση του [WixBundleName]</String>
7
+ <String Id="Title">Για την εγκατάσταση του [WixBundleName] απαιτείται το Microsoft .NET Framework</String>
8
+ <String Id="ConfirmCancelMessage">Είστε βέβαιοι ότι θέλετε να γίνει ακύρωση;</String>
9
+ <String Id="HelpHeader">Βοήθεια για την εγκατάσταση</String>
10
+ <String Id="HelpText">/passive | /quiet - εμφανίζει ελάχιστο περιεχόμενο του περιβάλλοντος εργασίας
11
+ χρήστη χωρίς μηνύματα ή δεν εμφανίζει περιβάλλον εργασίας χρήστη και
12
+ μηνύματα. Από προεπιλογή, εμφανίζονται όλα τα μηνύματα και το περιβάλλον
13
+ εργασίας χρήστη.
14
+
15
+/norestart - αποκρύπτει οποιεσδήποτε προσπάθειες για επανεκκίνηση. Από
16
+ προεπιλογή, το περιβάλλον εργασίας χρήστη θα εμφανίσει μήνυμα πριν από την
17
+ επανεκκίνηση.
18
+/log log.txt - πραγματοποιεί καταγραφή σε ένα συγκεκριμένο αρχείο. Από
19
+ προεπιλογή, δημιουργείται ένα αρχείο καταγραφής στο %TEMP%.</String>
20
+ <String Id="HelpCloseButton">&Κλείσιμο</String>
21
+ <String Id="InstallLicenseTerms">Κάντε κλικ στο κουμπί "Αποδοχή και εγκατάσταση" για να αποδεχτείτε τους <a href="#">όρους της άδειας χρήσης</a> του Microsoft .NET Framework.</String>
22
+ <String Id="InstallAcceptAndInstallButton">&Αποδοχή και εγκατάσταση</String>
23
+ <String Id="InstallDeclineButton">&Απόρριψη</String>
24
+ <String Id="ProgressHeader">Πρόοδος εγκατάστασης</String>
25
+ <String Id="ProgressLabel">Επεξεργασία:</String>
26
+ <String Id="ProgressCancelButton">&Άκυρο</String>
27
+ <String Id="FailureHeader">Αποτυχία εγκατάστασης</String>
28
+ <String Id="FailureLogLinkText">Ένα ή περισσότερα προβλήματα προκάλεσαν την αποτυχία της εγκατάστασης. Διορθώστε τα προβλήματα και μετά επαναλάβετε την εγκατάσταση. Για περισσότερες πληροφορίες, ανατρέξτε στο <a href="#">αρχείο καταγραφής</a>.</String>
29
+ <String Id="FailureRestartText">Για να ολοκληρωθεί η επαναφορά του λογισμικού, πρέπει να κάνετε επανεκκίνηση του υπολογιστή.</String>
30
+ <String Id="FailureRestartButton">&Επανεκκίνηση</String>
31
+ <String Id="FailureCloseButton">&Κλείσιμο</String>
32
+</WixLocalization>
src/wixstdba/Resources/1035/mbapreq.wxl
new
+30
@@ -0,0 +1,30 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="fi-fi" Language="1035" xmlns="http://schemas.microsoft.com/wix/2006/localization">
6
+ <String Id="Caption">[WixBundleName] -asennus</String>
7
+ <String Id="Title">Microsoft .NET Framework tarvitaan [WixBundleName] -asennusta varten</String>
8
+ <String Id="ConfirmCancelMessage">Haluatko varmasti peruuttaa?</String>
9
+ <String Id="HelpHeader">Asennusohjelman ohje</String>
10
+ <String Id="HelpText">/passive | /quiet - näyttää mahdollisimman vähän käyttöliittymästä; ei
11
+ kehotteita tai ei käyttöliittymää ja kehotteita. Oletusarvoisesti
12
+ käyttöliittymä ja kaikki kehotteet näytetään.
13
+
14
+/norestart - estää uudelleenkäynnistysyritykset. Oletusarvoisesti
15
+ käyttöliittymä kysyy ennen uudelleenkäynnistystä.
16
+/log loki.txt - kirjaa lokitiedot erityiseen tiedostoon. Oletusarvoisesti
17
+ lokitiedosto luodaan %TEMP%-kansioon.</String>
18
+ <String Id="HelpCloseButton">&Sulje</String>
19
+ <String Id="InstallLicenseTerms">Hyväksy Microsoft .NET Framework -ohjelman <a href="#">käyttöoikeusehdot</a> valitsemalla Hyväksy ja asenna.</String>
20
+ <String Id="InstallAcceptAndInstallButton">&Hyväksy ja asenna</String>
21
+ <String Id="InstallDeclineButton">&Hylkää</String>
22
+ <String Id="ProgressHeader">Asennuksen edistyminen</String>
23
+ <String Id="ProgressLabel">Käsitellään:</String>
24
+ <String Id="ProgressCancelButton">&Peruuta</String>
25
+ <String Id="FailureHeader">Asennus epäonnistui</String>
26
+ <String Id="FailureLogLinkText">Asennus epäonnistui yhdestä tai useammasta syystä. Korjaa ongelmat ja yritä suorittaa asennus sitten uudelleen. Lisätietoja on <a href="#">lokitiedostossa</a>.</String>
27
+ <String Id="FailureRestartText">Tietokone täytyy käynnistää uudelleen ohjelmiston palautuksen viimeistelemiseksi.</String>
28
+ <String Id="FailureRestartButton">&Käynnistä uudelleen</String>
29
+ <String Id="FailureCloseButton">&Sulje</String>
30
+</WixLocalization>
src/wixstdba/Resources/1036/mbapreq.wxl
new
+30
@@ -0,0 +1,30 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="fr-fr" Language="1036" xmlns="http://schemas.microsoft.com/wix/2006/localization">
6
+ <String Id="Caption">Installation de [WixBundleName]</String>
7
+ <String Id="Title">Microsoft .NET Framework requis pour l'installation de [WixBundleName]</String>
8
+ <String Id="ConfirmCancelMessage">Êtes-vous sûr de vouloir annuler ?</String>
9
+ <String Id="HelpHeader">Aide de l'installation</String>
10
+ <String Id="HelpText">/passive | /quiet - affiche une interface minimale sans invites ou n'affiche
11
+ aucune interface ni aucune invite. Par défaut, l'interface et toutes les
12
+ invites sont affichées.
13
+
14
+/norestart - annule toute tentative de redémarrage. Par défaut, l'interface
15
+ affiche une invite avant de redémarrer.
16
+/log journal.txt - consigne les entrées de journal dans un fichier spécifique.
17
+ Par défaut, un fichier journal est créé dans %TEMP%.</String>
18
+ <String Id="HelpCloseButton">&Fermer</String>
19
+ <String Id="InstallLicenseTerms">Cliquez sur le bouton « Accepter et installer » pour accepter les <a href="#">termes du contrat de licence</a> Microsoft .NET Framework.</String>
20
+ <String Id="InstallAcceptAndInstallButton">&Accepter et installer</String>
21
+ <String Id="InstallDeclineButton">&Refuser</String>
22
+ <String Id="ProgressHeader">Progression de l'installation</String>
23
+ <String Id="ProgressLabel">Traitement en cours :</String>
24
+ <String Id="ProgressCancelButton">&Annuler</String>
25
+ <String Id="FailureHeader">L'installation a échoué</String>
26
+ <String Id="FailureLogLinkText">L'installation a échoué pour une ou plusieurs raisons. Corrigez les problèmes et recommencez l'installation. Pour plus d'informations, consultez le <a href="#">fichier journal</a>.</String>
27
+ <String Id="FailureRestartText">Vous devez redémarrer votre ordinateur pour effectuer la restauration du logiciel.</String>
28
+ <String Id="FailureRestartButton">&Redémarrer</String>
29
+ <String Id="FailureCloseButton">&Fermer</String>
30
+</WixLocalization>
src/wixstdba/Resources/1038/mbapreq.wxl
new
+30
@@ -0,0 +1,30 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="hu-hu" Language="1038" xmlns="http://schemas.microsoft.com/wix/2006/localization">
6
+ <String Id="Caption">[WixBundleName] telepítő</String>
7
+ <String Id="Title">A(z) [WixBundleName] telepítéséhez Microsoft .NET-keretrendszer szükséges</String>
8
+ <String Id="ConfirmCancelMessage">Biztosan megszakítja?</String>
9
+ <String Id="HelpHeader">A telepítő súgója</String>
10
+ <String Id="HelpText">/passive | /quiet - Minimális felhasználói felület megjelenítése kérdések
11
+ nélkül, illetve felhasználói felület és kérdések megjelenítése nélküli
12
+ telepítés. Alapesetben a felhasználói felület és minden kérdés megjelenik.
13
+
14
+/norestart - Az újraindítási kérések elrejtése. Alapesetben a felhasználói
15
+ felületen megjelennek az újraindítási kérések.
16
+/log naplo.txt - Naplózás a megadott fájlba. Alapesetben a naplófájl a %TEMP%
17
+ könyvtárban jön létre.</String>
18
+ <String Id="HelpCloseButton">&Bezárás</String>
19
+ <String Id="InstallLicenseTerms">A Microsoft .NET-keretrendszer <a href="#">licencszerződésének</a> elfogadásához kattintson az „Elfogadás és telepítés” gombra.</String>
20
+ <String Id="InstallAcceptAndInstallButton">&Elfogadás és telepítés</String>
21
+ <String Id="InstallDeclineButton">&Elutasítás</String>
22
+ <String Id="ProgressHeader">Telepítési folyamat</String>
23
+ <String Id="ProgressLabel">Feldolgozás:</String>
24
+ <String Id="ProgressCancelButton">&Mégse</String>
25
+ <String Id="FailureHeader">A telepítés nem sikerült</String>
26
+ <String Id="FailureLogLinkText">Legalább egy olyan hiba lépett fel, amely a telepítés meghiúsulását okozta. Hárítsa el a hibákat, majd futtassa újra a telepítőt. További információt a <a href="#">naplófájlban </a> talál.</String>
27
+ <String Id="FailureRestartText">A szoftver visszaállításának befejezéséhez újra kell indítania a számítógépet.</String>
28
+ <String Id="FailureRestartButton">&Újraindítás</String>
29
+ <String Id="FailureCloseButton">&Bezárás</String>
30
+</WixLocalization>
src/wixstdba/Resources/1040/mbapreq.wxl
new
+31
@@ -0,0 +1,31 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="it-it" Language="1040" xmlns="http://schemas.microsoft.com/wix/2006/localization">
6
+ <String Id="Caption">Installazione di [WixBundleName]</String>
7
+ <String Id="Title">Microsoft .NET Framework necessario per l'installazione di [WixBundleName]</String>
8
+ <String Id="ConfirmCancelMessage">Annullare?</String>
9
+ <String Id="HelpHeader">Guida dell'installazione</String>
10
+ <String Id="HelpText">/passive | /quiet - visualizza l'interfaccia utente minima senza istruzioni
11
+ oppure non visualizza né l'interfaccia utente né le istruzioni. Per
12
+ impostazione predefinita vengono visualizzate interfaccia utente e
13
+ istruzioni.
14
+
15
+/norestart - elimina eventuali tentativi di riavvio. Per impostazione
16
+ predefinita l'interfaccia utente chiede istruzioni prima del riavvio.
17
+/log log.txt - registra in un file specifico. Per impostazione predefinita un
18
+ file di log viene creato in %TEMP%.</String>
19
+ <String Id="HelpCloseButton">&Chiudi</String>
20
+ <String Id="InstallLicenseTerms">Fare clic sul pulsante "Accetta e installa" per accettare le <a href="#">condizioni di licenza</a> di Microsoft .NET Framework.</String>
21
+ <String Id="InstallAcceptAndInstallButton">&Accetta e installa</String>
22
+ <String Id="InstallDeclineButton">&Rifiuta</String>
23
+ <String Id="ProgressHeader">Stato installazione</String>
24
+ <String Id="ProgressLabel">Elaborazione in corso:</String>
25
+ <String Id="ProgressCancelButton">&Annulla</String>
26
+ <String Id="FailureHeader">Installazione non riuscita</String>
27
+ <String Id="FailureLogLinkText">L'installazione non è riuscita a causa di uno o più problemi. Risolvere i problemi e provare di nuovo l'installazione. Per ulteriori informazioni vedere il <a href="#">file di log</a>.</String>
28
+ <String Id="FailureRestartText">È necessario riavviare il computer per completare il rollback del software.</String>
29
+ <String Id="FailureRestartButton">&Riavvia</String>
30
+ <String Id="FailureCloseButton">&Chiudi</String>
31
+</WixLocalization>
src/wixstdba/Resources/1041/mbapreq.wxl
new
+27
@@ -0,0 +1,27 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="ja-jp" Language="1041" xmlns="http://schemas.microsoft.com/wix/2006/localization">
6
+ <String Id="Caption">[WixBundleName] セットアップ</String>
7
+ <String Id="Title">[WixBundleName] セットアップには Microsoft .NET Framework が必要です</String>
8
+ <String Id="ConfirmCancelMessage">取り消しますか?</String>
9
+ <String Id="HelpHeader">セットアップのヘルプ</String>
10
+ <String Id="HelpText">/passive | /quiet - 最小の UI だけを表示してプロンプトは表示しないか、UI
11
+ もプロンプトも表示しません。 既定では、UI とすべてのプロンプトが表示されます。
12
+
13
+/norestart - 再起動の試みをすべて抑制します。既定では、再起動の前に UI によりプロンプトが表示されます。
14
+/log log.txt - 特定のファイルにログを記録します。既定では、%TEMP% にログ ファイルが作成されます。</String>
15
+ <String Id="HelpCloseButton">閉じる(&C)</String>
16
+ <String Id="InstallLicenseTerms">Microsoft .NET Framework の<a href="#">ライセンス条項</a>に同意する場合は、[同意してインストール]5D; ボタンをクリックします。</String>
17
+ <String Id="InstallAcceptAndInstallButton">同意してインストール(&A)</String>
18
+ <String Id="InstallDeclineButton">同意しない(&)</String>
19
+ <String Id="ProgressHeader">セットアップの進行状況</String>
20
+ <String Id="ProgressLabel">処理中:</String>
21
+ <String Id="ProgressCancelButton">キャンセル(&C)</String>
22
+ <String Id="FailureHeader">セットアップに失敗しました</String>
23
+ <String Id="FailureLogLinkText">1 つ以上の問題が原因でセットアップに失敗しました。問題を解決してからセットアップをやり直してください。詳細については、<a href="#">ログ ファイル</a>を参照してください。</String>
24
+ <String Id="FailureRestartText">ソフトウェアのロールバックを完了するには、コンピューターを再起動する必要があります。</String>
25
+ <String Id="FailureRestartButton">再起動(&R)</String>
26
+ <String Id="FailureCloseButton">閉じる(&C)</String>
27
+</WixLocalization>
src/wixstdba/Resources/1042/mbapreq.wxl
new
+27
@@ -0,0 +1,27 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="ko-kr" Language="1042" xmlns="http://schemas.microsoft.com/wix/2006/localization">
6
+ <String Id="Caption">[WixBundleName] 설치</String>
7
+ <String Id="Title">[WixBundleName] 설치에 필요한 Microsoft .NET Framework</String>
8
+ <String Id="ConfirmCancelMessage">취소하시겠습니까?</String>
9
+ <String Id="HelpHeader">설치 도움말</String>
10
+ <String Id="HelpText">/passive | /quiet - 메시지 없이 최소 UI를 표시하거나 UI와 메시지를 전혀
11
+ 표시하지 않습니다. 기본적으로 UI 및 모든 메시지는 표시됩니다.
12
+
13
+/norestart - 다시 시작하려는 시도를 무시합니다. 기본적으로 UI는 다시 시작하기 전에 메시지를 표시합니다.
14
+/log log.txt - 특정 파일에 기록합니다. 기본적으로 로그 파일이 %TEMP%에 생성됩니다.</String>
15
+ <String Id="HelpCloseButton">닫기(&C)</String>
16
+ <String Id="InstallLicenseTerms">Microsoft .NET Framework <a href="#">사용 조건</a>에 동의하려면 "동의 및 설치"를 클릭하십시오.</String>
17
+ <String Id="InstallAcceptAndInstallButton">동의 및 설치(&A)</String>
18
+ <String Id="InstallDeclineButton">동의 안 함(&D)</String>
19
+ <String Id="ProgressHeader">설치 진행률</String>
20
+ <String Id="ProgressLabel">처리 중:</String>
21
+ <String Id="ProgressCancelButton">취소(&C)</String>
22
+ <String Id="FailureHeader">설치 실패</String>
23
+ <String Id="FailureLogLinkText">하나 이상의 문제로 인해 설치에 실패했습니다. 문제를 수정하고 설치를 다시 시도하십시오. 자세한 내용은 <a href="#">로그 파일</a>을 참조하십시오.</String>
24
+ <String Id="FailureRestartText">소프트웨어의 롤백을 완료하려면 컴퓨터를 다시 시작해야 합니다.</String>
25
+ <String Id="FailureRestartButton">다시 시작(&R)</String>
26
+ <String Id="FailureCloseButton">닫기(&C)</String>
27
+</WixLocalization>
src/wixstdba/Resources/1043/mbapreq.wxl
new
+30
@@ -0,0 +1,30 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="nl-nl" Language="1043" xmlns="http://schemas.microsoft.com/wix/2006/localization">
6
+ <String Id="Caption">[WixBundleName] Installatie</String>
7
+ <String Id="Title">Microsoft .NET Framework is vereist voor installatie [WixBundleName]</String>
8
+ <String Id="ConfirmCancelMessage">Weet u zeker dat u de installatie wilt annuleren?</String>
9
+ <String Id="HelpHeader">Help bij Setup</String>
10
+ <String Id="HelpText">/passive | /quiet - geeft een minimale gebruikersinterface weer zonder prompts
11
+ of geeft geen gebruikersinterface en geen prompts weer. Gebruikersinterface
12
+ en alle prompts worden standaard weergegeven.
13
+
14
+/norestart - pogingen tot opnieuw opstarten onderdrukken.
15
+ Gebruikersinterface vraagt standaard alvorens opnieuw op te starten.
16
+/log log.txt - registreert gegevens in een specifiek bestand. Een logbestand
17
+ wordt standaard in %TEMP% gemaakt.</String>
18
+ <String Id="HelpCloseButton">&Sluiten</String>
19
+ <String Id="InstallLicenseTerms">Klik op de knop 'Accepteren en installeren' om de <a href="#">licentievoorwaarden</a> van het Microsoft .NET Framework te accepteren.</String>
20
+ <String Id="InstallAcceptAndInstallButton">&Accepteren en installeren</String>
21
+ <String Id="InstallDeclineButton">&Weigeren</String>
22
+ <String Id="ProgressHeader">Voortgang van de installatie</String>
23
+ <String Id="ProgressLabel">Verwerken:</String>
24
+ <String Id="ProgressCancelButton">&Annuleren</String>
25
+ <String Id="FailureHeader">Installatie mislukt</String>
26
+ <String Id="FailureLogLinkText">Er zijn een of meer fouten opgetreden waardoor de installatie is mislukt. Corrigeer de problemen en voer Setup opnieuw uit. Raadpleeg het <a href="#">log boekbestand</a> voor meer informatie.</String>
27
+ <String Id="FailureRestartText">U moet uw computer opnieuw opstarten om het terugdraaien van de software te voltooien.</String>
28
+ <String Id="FailureRestartButton">&Opnieuw opstarten</String>
29
+ <String Id="FailureCloseButton">&Sluiten</String>
30
+</WixLocalization>
src/wixstdba/Resources/1044/mbapreq.wxl
new
+30
@@ -0,0 +1,30 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="nb-no" Language="1044" xmlns="http://schemas.microsoft.com/wix/2006/localization">
6
+ <String Id="Caption">[WixBundleName] Installasjonsprogram</String>
7
+ <String Id="Title">Microsoft .NET Framework kreves for [WixBundleName]-installasjon</String>
8
+ <String Id="ConfirmCancelMessage">Er du sikker på at du vil avbryte?</String>
9
+ <String Id="HelpHeader">Installasjonshjelp</String>
10
+ <String Id="HelpText">/passive | /quiet - viser minimalt brukergrensesnitt uten ledetekster, eller
11
+ ikke noe brukergrensesnitt og ingen ledetekster. Som standard vises
12
+ brukergrensesnitt og alle ledetekster.
13
+
14
+/norestart - undertrykker alle forsøk på omstart. Som standard spør
15
+ brukergrensesnittet før omstart.
16
+/log log.txt - skriver logg til en bestemt fil. Som standard opprettes en
17
+ loggfil i %TEMP%.</String>
18
+ <String Id="HelpCloseButton">&Lukk</String>
19
+ <String Id="InstallLicenseTerms">Klikk Godta og installer for å godta<a href="#">lisensvilkårene</a> for Microsoft .NET Framework.</String>
20
+ <String Id="InstallAcceptAndInstallButton">&Godta og installer</String>
21
+ <String Id="InstallDeclineButton">&Avslå</String>
22
+ <String Id="ProgressHeader">Fremdrift for installasjon</String>
23
+ <String Id="ProgressLabel">Behandler:</String>
24
+ <String Id="ProgressCancelButton">&Avbryt</String>
25
+ <String Id="FailureHeader">Installasjon mislyktes</String>
26
+ <String Id="FailureLogLinkText">Ett eller flere problemer var årsak til at installasjonen mislyktes. Løs problemene, og installer på nytt. Du finner flere opplysninger i <a href="#">loggfilen</a>.</String>
27
+ <String Id="FailureRestartText">Du må starte datamaskinen på nytt for å fullføre tilbakerullingen av programvaren.</String>
28
+ <String Id="FailureRestartButton">&Start på nytt</String>
29
+ <String Id="FailureCloseButton">&Lukk</String>
30
+</WixLocalization>
src/wixstdba/Resources/1045/mbapreq.wxl
new
+30
@@ -0,0 +1,30 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="pl-pl" Language="1045" xmlns="http://schemas.microsoft.com/wix/2006/localization">
6
+ <String Id="Caption">Instalator programu [WixBundleName]</String>
7
+ <String Id="Title">Do zainstalowania programu [WixBundleName] jest wymagany program Microsoft .NET Framework</String>
8
+ <String Id="ConfirmCancelMessage">Czy na pewno chcesz anulować?</String>
9
+ <String Id="HelpHeader">Pomoc instalatora</String>
10
+ <String Id="HelpText">/passive | /quiet - wyświetla minimalny interfejs użytkownika bez monitów
11
+ lub nie wyświetla interfejsu użytkownika ani monitów. Domyślnie jest
12
+ wyświetlany interfejs użytkownika i wszystkie monity.
13
+
14
+/norestart - pomija wszelkie próby ponownego uruchomienia. Domyślnie
15
+ interfejs użytkownika będzie wyświetlał monit przed ponownym uruchomieniem.
16
+/log log.txt - zapisuje wpisy dziennika do określonego pliku.
17
+ Domyślnie plik dziennika jest tworzony w folderze %TEMP%.</String>
18
+ <String Id="HelpCloseButton">&Zamknij</String>
19
+ <String Id="InstallLicenseTerms">Kliknij przycisk Zaakceptuj i zainstaluj, aby zaakceptować <a href="#">warunki licencji</a> programu Microsoft .NET Framework.</String>
20
+ <String Id="InstallAcceptAndInstallButton">&Zaakceptuj i zainstaluj</String>
21
+ <String Id="InstallDeclineButton">&Odrzuć</String>
22
+ <String Id="ProgressHeader">Postęp instalacji</String>
23
+ <String Id="ProgressLabel">Trwa przetwarzanie:</String>
24
+ <String Id="ProgressCancelButton">&Anuluj</String>
25
+ <String Id="FailureHeader">Instalacja nie powiodła się</String>
26
+ <String Id="FailureLogLinkText">Co najmniej jeden problem spowodował niepowodzenie instalacji. Usuń problemy, a następnie ponów próbę instalacji. Aby uzyskać więcej informacji można znaleźć w <a href="#">pliku dziennika</a>.</String>
27
+ <String Id="FailureRestartText">Aby zakończyć wycofywanie oprogramowania, musisz ponownie uruchomić komputer.</String>
28
+ <String Id="FailureRestartButton">&Uruchom ponownie</String>
29
+ <String Id="FailureCloseButton">&Zamknij</String>
30
+</WixLocalization>
src/wixstdba/Resources/1046/mbapreq.wxl
new
+29
@@ -0,0 +1,29 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="pt-br" Language="1046" xmlns="http://schemas.microsoft.com/wix/2006/localization">
6
+ <String Id="Caption">[WixBundleName] Instalação</String>
7
+ <String Id="Title">Microsoft .NET Framework é necessário para instalação do [WixBundleName]</String>
8
+ <String Id="ConfirmCancelMessage">Tem certeza de que deseja cancelar?</String>
9
+ <String Id="HelpHeader">Ajuda da Instalação</String>
10
+ <String Id="HelpText">/passive | /quiet - exibe UI mínima sem avisos ou exibe sem UI e
11
+ sem avisos. Por padrão a UI e todos avisos são exibidos.
12
+
13
+/norestart - suprime qualquer tentativa de reinicialização. Por padrão a UI
14
+ irá solicitar antes de reiniciar.
15
+/log log.txt - logs para um arquivo específico. Por padrão um arquivo de log é
16
+ criado em %TEMP%.</String>
17
+ <String Id="HelpCloseButton">&Fechar</String>
18
+ <String Id="InstallLicenseTerms">Clique o botão "Aceitar e Instalar" para aceitar os termos de licença do Microsoft .NET Framework <a href="#"></a>.</String>
19
+ <String Id="InstallAcceptAndInstallButton">&Aceitar e Instalar</String>
20
+ <String Id="InstallDeclineButton">&Recusar</String>
21
+ <String Id="ProgressHeader">Progresso da Instalação</String>
22
+ <String Id="ProgressLabel">Processando:</String>
23
+ <String Id="ProgressCancelButton">&Cancelar</String>
24
+ <String Id="FailureHeader">Falha na Instalação</String>
25
+ <String Id="FailureLogLinkText">Um ou mais problemas causaram falha na instalação. Corrija os problemas e tente a instalação novamente. Para mais informações consulte o <a href="#">arquivo de log</a>.</String>
26
+ <String Id="FailureRestartText">Você deve reiniciar o computador para completar a reversão do software. </String>
27
+ <String Id="FailureRestartButton">&Reiniciar</String>
28
+ <String Id="FailureCloseButton">&Fechar</String>
29
+</WixLocalization>
src/wixstdba/Resources/1049/mbapreq.wxl
new
+29
@@ -0,0 +1,29 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="ru-ru" Language="1049" xmlns="http://schemas.microsoft.com/wix/2006/localization">
6
+ <String Id="Caption">Установка [WixBundleName]</String>
7
+ <String Id="Title">Для установки [WixBundleName] требуется Microsoft .NET Framework</String>
8
+ <String Id="ConfirmCancelMessage">Вы действительно хотите отменить операцию?</String>
9
+ <String Id="HelpHeader">Справка по установке</String>
10
+ <String Id="HelpText">/passive | /quiet - отображение минимального ИП без запросов или работа без ИП
11
+ и беззапросов. По умолчанию отображаются ИП и все запросы.
12
+
13
+/norestart - отключение всех попыток перезагрузки. По умолчанию в ИП перед
14
+ перезагрузкой отображается запрос.
15
+/log log.txt - запись журнала в указанный файл. По умолчанию файл журнала
16
+ создается в папке %TEMP%.</String>
17
+ <String Id="HelpCloseButton">&Закрыть</String>
18
+ <String Id="InstallLicenseTerms">Нажмите кнопку "Принять и установить", чтобы принять <a href="#">условия лицензии</a> Microsoft .NET Framework.</String>
19
+ <String Id="InstallAcceptAndInstallButton">&Принять и установить</String>
20
+ <String Id="InstallDeclineButton">&Отклонить</String>
21
+ <String Id="ProgressHeader">Выполнение установки</String>
22
+ <String Id="ProgressLabel">Обработка:</String>
23
+ <String Id="ProgressCancelButton">&Отмена</String>
24
+ <String Id="FailureHeader">Сбой установки</String>
25
+ <String Id="FailureLogLinkText">Не удалось выполнить установку из-за одной или нескольких проблем. Устраните эти проблемы, а затем снова запустите программу установки. Дополнительные сведения см. в <a href="#">файле журнала</a>.</String>
26
+ <String Id="FailureRestartText">Необходимо перезагрузить компьютер, чтобы завершить откат программного обеспечения.</String>
27
+ <String Id="FailureRestartButton">&Перезагрузить</String>
28
+ <String Id="FailureCloseButton">&Закрыть</String>
29
+</WixLocalization>
src/wixstdba/Resources/1051/mbapreq.wxl
new
+30
@@ -0,0 +1,30 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="sk-sk" Language="1051" xmlns="http://schemas.microsoft.com/wix/2006/localization">
6
+ <String Id="Caption">[WixBundleName] – inštalácia</String>
7
+ <String Id="Title">Na inštaláciu aplikácie [WixBundleName] sa vyžaduje súčasť Microsoft .NET Framework</String>
8
+ <String Id="ConfirmCancelMessage">Naozaj chcete zrušiť operáciu?</String>
9
+ <String Id="HelpHeader">Pomocník pre inštaláciu</String>
10
+ <String Id="HelpText">/passive | /quiet – zobrazí minimálne používateľské rozhranie bez výziev alebo
11
+ nezobrazí žiadne používateľské rozhranie ani výzvy. Predvolene sa
12
+ zobrazuje používateľské rozhranie aj všetky výzvy.
13
+
14
+/norestart – zruší všetky pokusy o reštart. Používateľské rozhranie
15
+ predvolene zobrazí pred reštartom výzvu.
16
+/log log.txt – urobí záznam do určeného súboru. Súbor denníka sa predvolene
17
+ vytvorí v priečinku %TEMP%.</String>
18
+ <String Id="HelpCloseButton">&Zavrieť</String>
19
+ <String Id="InstallLicenseTerms">Kliknutím na tlačidlo Súhlasiť a inštalovať vyjadrite svoj súhlas s <a href="#">licenčnými podmienkami</a> súčasti Microsoft .NET Framework.</String>
20
+ <String Id="InstallAcceptAndInstallButton">&Súhlasiť a inštalovať</String>
21
+ <String Id="InstallDeclineButton">&Odmietnuť</String>
22
+ <String Id="ProgressHeader">Priebeh inštalácie</String>
23
+ <String Id="ProgressLabel">Spracúva sa:</String>
24
+ <String Id="ProgressCancelButton">&Zrušiť</String>
25
+ <String Id="FailureHeader">Inštalácia zlyhala</String>
26
+ <String Id="FailureLogLinkText">Inštalácia zlyhala pre jednu alebo viac príčin. Odstráňte problémy a skúste znova spustiť inštaláciu. Ďalšie informácie nájdete v <a href="#">súbore denníka</a>.</String>
27
+ <String Id="FailureRestartText">Dokončenie všetkých zmien softvéru vyžaduje reštart počítača.</String>
28
+ <String Id="FailureRestartButton">&Reštartovať</String>
29
+ <String Id="FailureCloseButton">&Zavrieť</String>
30
+</WixLocalization>
src/wixstdba/Resources/1053/mbapreq.wxl
new
+30
@@ -0,0 +1,30 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="sv-se" Language="1053" xmlns="http://schemas.microsoft.com/wix/2006/localization">
6
+ <String Id="Caption">[WixBundleName]-installation</String>
7
+ <String Id="Title">Microsoft .NET Framework krävs för installation av [WixBundleName]</String>
8
+ <String Id="ConfirmCancelMessage">Vill du avbryta?</String>
9
+ <String Id="HelpHeader">Installationshjälp</String>
10
+ <String Id="HelpText">/passive | /quiet - visar ett minimalt användargränssnitt utan prompter,
11
+ alternativt inget användargränssnitt och inga prompter. Som standard visas
12
+ användargränssnitt och samtliga prompter.
13
+
14
+/norestart - hejdar omstart. Som standard visar användargränssnittet en
15
+ prompt före omstart.
16
+/log log.txt - skapar logg till en specifik fil. Som standard skapas loggfilen
17
+ i %TEMP%.</String>
18
+ <String Id="HelpCloseButton">&Stäng</String>
19
+ <String Id="InstallLicenseTerms">Klicka på knappen "Godkänn och installera" för att godkänna <a href="#">licensvillkoren</a> för Microsoft .NET Framework.</String>
20
+ <String Id="InstallAcceptAndInstallButton">&Godkänn och installera</String>
21
+ <String Id="InstallDeclineButton">&Avbryt</String>
22
+ <String Id="ProgressHeader">Installationsförlopp</String>
23
+ <String Id="ProgressLabel">Bearbetar:</String>
24
+ <String Id="ProgressCancelButton">&Avbryt</String>
25
+ <String Id="FailureHeader">Installationen misslyckades</String>
26
+ <String Id="FailureLogLinkText">Installationen misslyckades på grund av ett eller flera problem. Åtgärda problemen och försök igen. Se <a href="#">loggfilen</a> för mer information.</String>
27
+ <String Id="FailureRestartText">Starta om datorn för att återställa programmet.</String>
28
+ <String Id="FailureRestartButton">&Starta om</String>
29
+ <String Id="FailureCloseButton">&Stäng</String>
30
+</WixLocalization>
src/wixstdba/Resources/1055/mbapreq.wxl
new
+30
@@ -0,0 +1,30 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="tr-tr" Language="1055" xmlns="http://schemas.microsoft.com/wix/2006/localization">
6
+ <String Id="Caption">[WixBundleName] Kurulumu</String>
7
+ <String Id="Title">[WixBundleName] kurulumu için Microsoft .NET Framework gerekir</String>
8
+ <String Id="ConfirmCancelMessage">İptal etmek istediğinizden emin misiniz?</String>
9
+ <String Id="HelpHeader">Kurulum Yardımı</String>
10
+ <String Id="HelpText">/passive | /quiet - komut istemi olmayan olabildiğince küçük bir UI
11
+ görüntüler veya komut istemi ve UI görüntülemez. Varsayılan olarak UI
12
+ ve tüm komut istemleri görüntülenir.
13
+
14
+/norestart - yeniden başlatma denemelerini engeller. Varsayılan
15
+ olarak UI yeniden başlatmadan önce komut isteyecektir.
16
+/log log.txt - belirli bir dosyayı günlük dosyası olarak kullanır.
17
+ Varsayılan olarak %TEMP% konumunda bir günlük dosyası oluşturulur.</String>
18
+ <String Id="HelpCloseButton">&Kapat</String>
19
+ <String Id="InstallLicenseTerms">Microsoft .NET Framework <a href="#">lisans şartlarını</a> kabul etmek için "Kabul Et ve Yükle" düğmesini tıklatın.</String>
20
+ <String Id="InstallAcceptAndInstallButton">&Kabul Et ve Yükle</String>
21
+ <String Id="InstallDeclineButton">&Reddet</String>
22
+ <String Id="ProgressHeader">Kurulum İlerleme Durumu</String>
23
+ <String Id="ProgressLabel">İşleniyor:</String>
24
+ <String Id="ProgressCancelButton">&İptal</String>
25
+ <String Id="FailureHeader">Kurulum Başarısız</String>
26
+ <String Id="FailureLogLinkText">Bir veya daha fazla sorun kurulumun başarısız olmasına neden oldu. Lütfen sorunları çözün ve kurulumu yeniden deneyin. Daha fazla bilgi için <a href="#">günlük dosyasına</a> bakın.</String>
27
+ <String Id="FailureRestartText">Yazılım geri alma işlemini tamamlamak için bilgisayarınızı yeniden başlatmanız gerekir.</String>
28
+ <String Id="FailureRestartButton">&Yeniden Başlat</String>
29
+ <String Id="FailureCloseButton">&Kapat</String>
30
+</WixLocalization>
src/wixstdba/Resources/1060/mbapreq.wxl
new
+30
@@ -0,0 +1,30 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="sl-si" Language="1060" xmlns="http://schemas.microsoft.com/wix/2006/localization">
6
+ <String Id="Caption">[WixBundleName] Namestitev</String>
7
+ <String Id="Title">Microsoft .NET Framework, potreben za namestitev paketa [WixBundleName]</String>
8
+ <String Id="ConfirmCancelMessage">Ali ste prepričani, da želite preklicati?</String>
9
+ <String Id="HelpHeader">Pomoč za namestitev</String>
10
+ <String Id="HelpText">/passive | /quiet - prikaže minimalni uporabniški vmesnik brez pozivov ali ne prikaže
11
+ uporabniškega vmesnika in pozivov. Privzeto so prikazani uporabniški vmesnik in
12
+ vsi pozivi.
13
+
14
+/norestart - skrije vse možnosti za vnovicni zagon. Privzeto uporabniški vmesnik
15
+ prikaže poziv pred ponovnim zagonom.
16
+/log log.txt - beleži vnose v dnevnik v doloceno datoteko. Privzeto je datoteko
17
+ ustvarjena v mapi %TEMP%.</String>
18
+ <String Id="HelpCloseButton">&Zapri</String>
19
+ <String Id="InstallLicenseTerms">Kliknite »Sprejmi in namesti« in sprejmite <a href="#">licenčne pogoje</a> za Microsoft .NET Framework.</String>
20
+ <String Id="InstallAcceptAndInstallButton">&Sprejmi in namesti</String>
21
+ <String Id="InstallDeclineButton">&Zavrni</String>
22
+ <String Id="ProgressHeader">Potek namestitve</String>
23
+ <String Id="ProgressLabel">Obdelovanje:</String>
24
+ <String Id="ProgressCancelButton">&Prekliči</String>
25
+ <String Id="FailureHeader">Namestitev ni uspela</String>
26
+ <String Id="FailureLogLinkText">Namestitev ni uspela zaradi ene ali več težav. Odpravite težave in ponovno zaženite namestitev. Za več informacij glejte <a href="#">dnevniško datoteko</a>.</String>
27
+ <String Id="FailureRestartText">Za povrnitev prejšnjega stanja programske opreme morate ponovno zagnati računalnik.</String>
28
+ <String Id="FailureRestartButton">&Ponovni zagon</String>
29
+ <String Id="FailureCloseButton">&Zapri</String>
30
+</WixLocalization>
src/wixstdba/Resources/2052/mbapreq.wxl
new
+27
@@ -0,0 +1,27 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="zh-ch" Language="2052" xmlns="http://schemas.microsoft.com/wix/2006/localization">
6
+ <String Id="Caption">[WixBundleName] 安装</String>
7
+ <String Id="Title">[WixBundleName] 安装需要 Microsoft .NET Framework</String>
8
+ <String Id="ConfirmCancelMessage">是否确实要取消?</String>
9
+ <String Id="HelpHeader">安装程序帮助</String>
10
+ <String Id="HelpText">/passive | /quiet - 显示最小的 UI 且无提示,或者不显示 UI 且
11
+ 无提示。默认情况下显示 UI 和所有提示。
12
+
13
+/norestart - 隐藏任何重启提示。默认情况下 UI 会在重启前提示。
14
+/log log.txt - 记录到特定文件。默认情况下在 %TEMP% 中创建日志文件。</String>
15
+ <String Id="HelpCloseButton">关闭(&C)</String>
16
+ <String Id="InstallLicenseTerms">单击“接受并安装”按钮以接受 Microsoft .NET Framework <a href="#">许可证条款</a>。</String>
17
+ <String Id="InstallAcceptAndInstallButton">接受并安装(&A)</String>
18
+ <String Id="InstallDeclineButton">拒绝(&D)</String>
19
+ <String Id="ProgressHeader">安装进度</String>
20
+ <String Id="ProgressLabel">正在处理:</String>
21
+ <String Id="ProgressCancelButton">取消(&C)</String>
22
+ <String Id="FailureHeader">安装失败</String>
23
+ <String Id="FailureLogLinkText">一个或多个问题导致安装失败。请解决问题,然后重新尝试安装。有关详情,请查看<a href="#">日志文件</a>。</String>
24
+ <String Id="FailureRestartText">必须重启计算机才能完成软件的回滚。</String>
25
+ <String Id="FailureRestartButton">重启(&R)</String>
26
+ <String Id="FailureCloseButton">关闭(&C)</String>
27
+</WixLocalization>
src/wixstdba/Resources/2070/mbapreq.wxl
new
+29
@@ -0,0 +1,29 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="pt-pt" Language="2070" xmlns="http://schemas.microsoft.com/wix/2006/localization">
6
+ <String Id="Caption">Configuração do [WixBundleName]</String>
7
+ <String Id="Title">O Microsoft .NET Framework é necessário para a configuração do [WixBundleName]</String>
8
+ <String Id="ConfirmCancelMessage">Tem a certeza de que pretende cancelar?</String>
9
+ <String Id="HelpHeader">Ajuda da Configuração</String>
10
+ <String Id="HelpText">/passive | /quiet - apresenta IU mínima sem mensagens ou não apresenta IU nem
11
+ mensagens. Por predefinição, são apresentadas a IU e todas as mensagens.
12
+
13
+/norestart - suprimir qualquer tentativa de reinício. Por predefinição, a IU
14
+ avisará antes de reiniciar.
15
+/log log.txt - regista num ficheiro específico. Por predefinição, é criado um
16
+ ficheiro de registo em %TEMP%.</String>
17
+ <String Id="HelpCloseButton">&Fechar</String>
18
+ <String Id="InstallLicenseTerms">Clique no botão "Aceitar e Instalar" para aceitar os <a href="#">termos de licenciamento</a> do Microsoft .NET Framework.</String>
19
+ <String Id="InstallAcceptAndInstallButton">&Aceitar e Instalar</String>
20
+ <String Id="InstallDeclineButton">&Recusar</String>
21
+ <String Id="ProgressHeader">Progresso da Configuração</String>
22
+ <String Id="ProgressLabel">A processar:</String>
23
+ <String Id="ProgressCancelButton">&Cancelar</String>
24
+ <String Id="FailureHeader">Falha da Configuração</String>
25
+ <String Id="FailureLogLinkText">Um ou mais problemas provocaram a falha da configuração. Corrija os problemas e repita a configuração. Para mais informações, consulte o <a href="#">ficheiro de registo</a>.</String>
26
+ <String Id="FailureRestartText">Tem de reiniciar o computador para concluir a reversão do software.</String>
27
+ <String Id="FailureRestartButton">&Reiniciar</String>
28
+ <String Id="FailureCloseButton">&Fechar</String>
29
+</WixLocalization>
src/wixstdba/Resources/3082/mbapreq.wxl
new
+31
@@ -0,0 +1,31 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="es-es" Language="3082" xmlns="http://schemas.microsoft.com/wix/2006/localization">
6
+ <String Id="Caption">Instalación de [WixBundleName]</String>
7
+ <String Id="Title">La instalación de [WixBundleName] requiere Microsoft .NET Framework</String>
8
+ <String Id="ConfirmCancelMessage">¿Está seguro de que desea cancelar?</String>
9
+ <String Id="HelpHeader">Ayuda del programa de instalación</String>
10
+ <String Id="HelpText">/passive | /quiet - muestra una interfaz de usuario mínima y no realiza
11
+ preguntas, o bien no muestra interfaz de usuario y no realiza preguntas.
12
+ De manera predeterminada se muestra la interfaz de usuario completa y se
13
+ realizan todas las preguntas necesarias.
14
+
15
+/norestart - suprime cualquier intento de reinicio. De manera predeterminada,
16
+ la interfaz de usuario preguntará si se desea reiniciar.
17
+/log log.txt - registra los datos de instalación en un archivo específico.
18
+ De manera predeterminada se crea un archivo de registro en %TEMP%.</String>
19
+ <String Id="HelpCloseButton">&Cerrar</String>
20
+ <String Id="InstallLicenseTerms">Haga clic en el botón "Aceptar e instalar" para aceptar los <a href="#">términos de licencia</a> de Microsoft .NET Framework.</String>
21
+ <String Id="InstallAcceptAndInstallButton">&Aceptar e instalar</String>
22
+ <String Id="InstallDeclineButton">&Rechazar</String>
23
+ <String Id="ProgressHeader">Progreso de la instalación</String>
24
+ <String Id="ProgressLabel">Procesando:</String>
25
+ <String Id="ProgressCancelButton">&Cancelar</String>
26
+ <String Id="FailureHeader">Error de la instalación</String>
27
+ <String Id="FailureLogLinkText">No se pudo completar la instalación a causa de uno o varios problemas. Corrija los problemas y vuelva a intentar la instalación. Para más información, vea el <a href="#">archivo de registro</a>.</String>
28
+ <String Id="FailureRestartText">Debe reiniciar el equipo para completar la reversión del software.</String>
29
+ <String Id="FailureRestartButton">&Reiniciar</String>
30
+ <String Id="FailureCloseButton">&Cerrar</String>
31
+</WixLocalization>
src/wixstdba/Resources/HyperlinkLargeTheme.xml
new
+109
@@ -0,0 +1,109 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<Theme xmlns="http://wixtoolset.org/schemas/v4/thmutil">
6
+ <Font Id="0" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
7
+ <Font Id="1" Height="-24" Weight="500" Foreground="windowtext">Segoe UI</Font>
8
+ <Font Id="2" Height="-22" Weight="500" Foreground="graytext">Segoe UI</Font>
9
+ <Font Id="3" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
10
+
11
+ <Window Width="500" Height="390" HexStyle="100a0000" FontId="0" Caption="#(loc.Caption)">
12
+ <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="logo.png" Visible="yes"/>
13
+ <Label X="80" Y="11" Width="-11" Height="64" FontId="1" Visible="yes" DisablePrefix="yes">#(loc.Title)</Label>
14
+
15
+ <Page Name="Help">
16
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Label>
17
+ <Label X="11" Y="112" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Label>
18
+ <Button Name="HelpCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
19
+ <Text>#(loc.HelpCloseButton)</Text>
20
+ <CloseWindowAction />
21
+ </Button>
22
+ </Page>
23
+ <Page Name="Install">
24
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.InstallHeader)</Label>
25
+ <Label X="11" Y="121" Width="-11" Height="-129" FontId="3" DisablePrefix="yes">#(loc.InstallMessage)</Label>
26
+ <Hypertext Name="EulaHyperlink" X="11" Y="-107" Width="-11" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallLicenseLinkText)</Hypertext>
27
+ <Label Name="InstallVersion" X="11" Y="-73" Width="246" Height="17" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBAShowVersion">#(loc.InstallVersion)</Label>
28
+ <Checkbox Name="EulaAcceptCheckbox" X="-11" Y="-41" Width="260" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallAcceptCheckbox)</Checkbox>
29
+ <Button Name="OptionsButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" VisibleCondition="NOT WixStdBASuppressOptionsUI">
30
+ <Text>#(loc.InstallOptionsButton)</Text>
31
+ <ChangePageAction Page="Options" />
32
+ </Button>
33
+ <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
34
+ <Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
35
+ <Text>#(loc.InstallCancelButton)</Text>
36
+ <CloseWindowAction />
37
+ </Button>
38
+ </Page>
39
+ <Page Name="Options">
40
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.OptionsHeader)</Label>
41
+ <Label X="11" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OptionsLocationLabel)</Label>
42
+ <Editbox Name="InstallFolder" X="11" Y="143" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
43
+ <Button Name="BrowseButton" X="-11" Y="142" Width="75" Height="23" TabStop="yes" FontId="0">
44
+ <Text>#(loc.OptionsBrowseButton)</Text>
45
+ <BrowseDirectoryAction VariableName="InstallFolder" />
46
+ </Button>
47
+ <Button Name="OptionsOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
48
+ <Text>#(loc.OptionsOkButton)</Text>
49
+ <ChangePageAction Page="Install" />
50
+ </Button>
51
+ <Button Name="OptionsCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
52
+ <Text>#(loc.OptionsCancelButton)</Text>
53
+ <ChangePageAction Page="Install" Cancel="yes" />
54
+ </Button>
55
+ </Page>
56
+ <Page Name="Progress">
57
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Label>
58
+ <Label X="11" Y="121" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Label>
59
+ <Label Name="OverallProgressPackageText" X="85" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Label>
60
+ <Progressbar Name="OverallCalculatedProgressbar" X="11" Y="143" Width="-11" Height="15" />
61
+ <Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
62
+ </Page>
63
+ <Page Name="Modify">
64
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Label>
65
+ <Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button>
66
+ <Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button>
67
+ <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
68
+ <Text>#(loc.ModifyCancelButton)</Text>
69
+ <CloseWindowAction />
70
+ </Button>
71
+ </Page>
72
+ <Page Name="Success">
73
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
74
+ <Text>#(loc.SuccessHeader)</Text>
75
+ <Text Condition="WixBundleAction = 2">#(loc.SuccessLayoutHeader)</Text>
76
+ <Text Condition="WixBundleAction = 3">#(loc.SuccessUninstallHeader)</Text>
77
+ <Text Condition="WixBundleAction = 4">#(loc.SuccessInstallHeader)</Text>
78
+ <Text Condition="WixBundleAction = 6">#(loc.SuccessRepairHeader)</Text>
79
+ </Label>
80
+ <Button Name="LaunchButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>
81
+ <Label X="-11" Y="-51" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">
82
+ <Text>#(loc.SuccessRestartText)</Text>
83
+ <Text Condition="WixBundleAction = 3">#(loc.SuccessUninstallRestartText)</Text>
84
+ </Label>
85
+ <Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
86
+ <Button Name="SuccessCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
87
+ <Text>#(loc.SuccessCloseButton)</Text>
88
+ <CloseWindowAction />
89
+ </Button>
90
+ </Page>
91
+ <Page Name="Failure">
92
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
93
+ <Text>#(loc.FailureHeader)</Text>
94
+ <Text Condition="WixBundleAction = 2">#(loc.FailureLayoutHeader)</Text>
95
+ <Text Condition="WixBundleAction = 3">#(loc.FailureUninstallHeader)</Text>
96
+ <Text Condition="WixBundleAction = 4">#(loc.FailureInstallHeader)</Text>
97
+ <Text Condition="WixBundleAction = 6">#(loc.FailureRepairHeader)</Text>
98
+ </Label>
99
+ <Hypertext Name="FailureLogFileLink" X="11" Y="121" Width="-11" Height="42" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
100
+ <Hypertext Name="FailureMessageText" X="22" Y="163" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes" />
101
+ <Label X="-11" Y="-51" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">#(loc.FailureRestartText)</Label>
102
+ <Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
103
+ <Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
104
+ <Text>#(loc.FailureCloseButton)</Text>
105
+ <CloseWindowAction />
106
+ </Button>
107
+ </Page>
108
+ </Window>
109
+</Theme>
src/wixstdba/Resources/HyperlinkSidebarTheme.xml
new
+120
@@ -0,0 +1,120 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<Theme xmlns="http://wixtoolset.org/schemas/v4/thmutil">
6
+ <Font Id="0" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
7
+ <Font Id="1" Height="-24" Weight="500" Foreground="windowtext">Segoe UI</Font>
8
+ <Font Id="2" Height="-22" Weight="500" Foreground="graytext">Segoe UI</Font>
9
+ <Font Id="3" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
10
+
11
+ <Window Width="600" Height="450" HexStyle="100a0000" FontId="0" Caption="#(loc.Caption)">
12
+ <Page Name="Help">
13
+ <Label X="80" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Label>
14
+ <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="logo.png"/>
15
+ <Label X="11" Y="80" Width="-11" Height="32" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Label>
16
+ <Label X="11" Y="121" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Label>
17
+ <Button Name="HelpCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
18
+ <Text>#(loc.HelpCloseButton)</Text>
19
+ <CloseWindowAction />
20
+ </Button>
21
+ </Page>
22
+ <Page Name="Install">
23
+ <Label X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Label>
24
+ <ImageControl X="11" Y="11" Width="165" Height="400" ImageFile="logoside.png"/>
25
+ <Label X="185" Y="50" Width="-11" Height="32" FontId="2" DisablePrefix="yes">#(loc.InstallHeader)</Label>
26
+ <Label X="185" Y="91" Width="-11" Height="64" FontId="3" DisablePrefix="yes">#(loc.InstallMessage)</Label>
27
+ <Hypertext Name="EulaHyperlink" X="185" Y="-111" Width="-11" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallLicenseLinkText)</Hypertext>
28
+ <Label Name="InstallVersion" X="185" Y="-81" Width="-11" Height="17" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBAShowVersion">#(loc.InstallVersion)</Label>
29
+ <Checkbox Name="EulaAcceptCheckbox" X="185" Y="-51" Width="-11" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallAcceptCheckbox)</Checkbox>
30
+ <Button Name="OptionsButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" VisibleCondition="NOT WixStdBASuppressOptionsUI">
31
+ <Text>#(loc.InstallOptionsButton)</Text>
32
+ <ChangePageAction Page="Options" />
33
+ </Button>
34
+ <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
35
+ <Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
36
+ <Text>#(loc.InstallCancelButton)</Text>
37
+ <CloseWindowAction />
38
+ </Button>
39
+ </Page>
40
+ <Page Name="Options">
41
+ <Label X="80" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Label>
42
+ <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="logo.png"/>
43
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.OptionsHeader)</Label>
44
+ <Label X="11" Y="121" Width="-11" Height="17" FontId="3">#(loc.OptionsLocationLabel)</Label>
45
+ <Editbox Name="InstallFolder" X="11" Y="143" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
46
+ <Button Name="BrowseButton" X="-11" Y="142" Width="75" Height="23" TabStop="yes" FontId="3">
47
+ <Text>#(loc.OptionsBrowseButton)</Text>
48
+ <BrowseDirectoryAction VariableName="InstallFolder" />
49
+ </Button>
50
+ <Button Name="OptionsOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
51
+ <Text>#(loc.OptionsOkButton)</Text>
52
+ <ChangePageAction Page="Install" />
53
+ </Button>
54
+ <Button Name="OptionsCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
55
+ <Text>#(loc.OptionsCancelButton)</Text>
56
+ <ChangePageAction Page="Install" Cancel="yes" />
57
+ </Button>
58
+ </Page>
59
+ <Page Name="Progress">
60
+ <Label X="80" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Label>
61
+ <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="logo.png"/>
62
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Label>
63
+ <Label X="11" Y="141" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Label>
64
+ <Label Name="OverallProgressPackageText" X="85" Y="141" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Label>
65
+ <Progressbar Name="OverallCalculatedProgressbar" X="11" Y="163" Width="-11" Height="20" />
66
+ <Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
67
+ </Page>
68
+ <Page Name="Modify">
69
+ <Label X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Label>
70
+ <ImageControl X="11" Y="11" Width="165" Height="400" ImageFile="logoside.png"/>
71
+ <Label X="185" Y="50" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Label>
72
+ <Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button>
73
+ <Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button>
74
+ <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
75
+ <Text>#(loc.ModifyCancelButton)</Text>
76
+ <CloseWindowAction />
77
+ </Button>
78
+ </Page>
79
+ <Page Name="Success">
80
+ <Label X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Label>
81
+ <ImageControl X="11" Y="11" Width="165" Height="400" ImageFile="logoside.png"/>
82
+ <Label X="185" Y="50" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
83
+ <Text>#(loc.SuccessHeader)</Text>
84
+ <Text Condition="WixBundleAction = 2">#(loc.SuccessLayoutHeader)</Text>
85
+ <Text Condition="WixBundleAction = 3">#(loc.SuccessUninstallHeader)</Text>
86
+ <Text Condition="WixBundleAction = 4">#(loc.SuccessInstallHeader)</Text>
87
+ <Text Condition="WixBundleAction = 6">#(loc.SuccessRepairHeader)</Text>
88
+ </Label>
89
+ <Button Name="LaunchButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>
90
+ <Label X="185" Y="-51" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">
91
+ <Text>#(loc.SuccessRestartText)</Text>
92
+ <Text Condition="WixBundleAction = 3">#(loc.SuccessUninstallRestartText)</Text>
93
+ </Label>
94
+ <Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
95
+ <Button Name="SuccessCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
96
+ <Text>#(loc.SuccessCloseButton)</Text>
97
+ <CloseWindowAction />
98
+ </Button>
99
+ </Page>
100
+ <Page Name="Failure">
101
+ <Label X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Label>
102
+ <ImageControl X="11" Y="11" Width="165" Height="400" ImageFile="logoside.png"/>
103
+ <Label X="185" Y="50" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
104
+ <Text>#(loc.FailureHeader)</Text>
105
+ <Text Condition="WixBundleAction = 2">#(loc.FailureLayoutHeader)</Text>
106
+ <Text Condition="WixBundleAction = 3">#(loc.FailureUninstallHeader)</Text>
107
+ <Text Condition="WixBundleAction = 4">#(loc.FailureInstallHeader)</Text>
108
+ <Text Condition="WixBundleAction = 6">#(loc.FailureRepairHeader)</Text>
109
+ </Label>
110
+ <Hypertext Name="FailureLogFileLink" X="185" Y="121" Width="-11" Height="68" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
111
+ <Hypertext Name="FailureMessageText" X="185" Y="-115" Width="-11" Height="80" FontId="3" TabStop="yes" HideWhenDisabled="yes" />
112
+ <Label X="185" Y="-57" Width="-11" Height="80" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">#(loc.FailureRestartText)</Label>
113
+ <Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
114
+ <Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
115
+ <Text>#(loc.FailureCloseButton)</Text>
116
+ <CloseWindowAction />
117
+ </Button>
118
+ </Page>
119
+ </Window>
120
+</Theme>
src/wixstdba/Resources/HyperlinkTheme.wxl
new
+61
@@ -0,0 +1,61 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="en-us" Language="1033" xmlns="http://wixtoolset.org/schemas/v4/wxl">
6
+ <String Id="Caption">[WixBundleName] Setup</String>
7
+ <String Id="Title">[WixBundleName]</String>
8
+ <String Id="InstallHeader">Welcome</String>
9
+ <String Id="InstallMessage">Setup will install [WixBundleName] on your computer. Click install to continue, options to set the install directory or Close to exit.</String>
10
+ <String Id="InstallVersion">Version [WixBundleVersion]</String>
11
+ <String Id="ConfirmCancelMessage">Are you sure you want to cancel?</String>
12
+ <String Id="ExecuteUpgradeRelatedBundleMessage">Previous version</String>
13
+ <String Id="HelpHeader">Setup Help</String>
14
+ <String Id="HelpText">/install | /repair | /uninstall | /layout [directory] - installs, repairs, uninstalls or
15
+ creates a complete local copy of the bundle in directory. Install is the default.
16
+
17
+/passive | /quiet - displays minimal UI with no prompts or displays no UI and
18
+ no prompts. By default UI and all prompts are displayed.
19
+
20
+/norestart - suppress any attempts to restart. By default UI will prompt before restart.
21
+/log log.txt - logs to a specific file. By default a log file is created in %TEMP%.</String>
22
+ <String Id="HelpCloseButton">&Close</String>
23
+ <String Id="InstallLicenseLinkText">[WixBundleName] <a href="#">license terms</a>.</String>
24
+ <String Id="InstallAcceptCheckbox">I &agree to the license terms and conditions</String>
25
+ <String Id="InstallOptionsButton">&Options</String>
26
+ <String Id="InstallInstallButton">&Install</String>
27
+ <String Id="InstallCancelButton">&Cancel</String>
28
+ <String Id="OptionsHeader">Setup Options</String>
29
+ <String Id="OptionsLocationLabel">Install location:</String>
30
+ <String Id="OptionsBrowseButton">&Browse</String>
31
+ <String Id="OptionsOkButton">&OK</String>
32
+ <String Id="OptionsCancelButton">&Cancel</String>
33
+ <String Id="ProgressHeader">Setup Progress</String>
34
+ <String Id="ProgressLabel">Processing:</String>
35
+ <String Id="OverallProgressPackageText">Initializing...</String>
36
+ <String Id="ProgressCancelButton">&Cancel</String>
37
+ <String Id="ModifyHeader">Modify Setup</String>
38
+ <String Id="ModifyRepairButton">&Repair</String>
39
+ <String Id="ModifyUninstallButton">&Uninstall</String>
40
+ <String Id="ModifyCancelButton">&Cancel</String>
41
+ <String Id="SuccessHeader">Setup Successful</String>
42
+ <String Id="SuccessInstallHeader">Installation Successfully Completed</String>
43
+ <String Id="SuccessLayoutHeader">Layout Successfully Completed</String>
44
+ <String Id="SuccessRepairHeader">Repair Successfully Completed</String>
45
+ <String Id="SuccessUninstallHeader">Uninstall Successfully Completed</String>
46
+ <String Id="SuccessLaunchButton">&Launch</String>
47
+ <String Id="SuccessRestartText">You must restart your computer before you can use the software.</String>
48
+ <String Id="SuccessUninstallRestartText">You must restart your computer to complete the removal of the software.</String>
49
+ <String Id="SuccessRestartButton">&Restart</String>
50
+ <String Id="SuccessCloseButton">&Close</String>
51
+ <String Id="FailureHeader">Setup Failed</String>
52
+ <String Id="FailureInstallHeader">Setup Failed</String>
53
+ <String Id="FailureLayoutHeader">Layout Failed</String>
54
+ <String Id="FailureRepairHeader">Repair Failed</String>
55
+ <String Id="FailureUninstallHeader">Uninstall Failed</String>
56
+ <String Id="FailureHyperlinkLogText">One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the <a href="#">log file</a>.</String>
57
+ <String Id="FailureRestartText">You must restart your computer to complete the rollback of the software.</String>
58
+ <String Id="FailureRestartButton">&Restart</String>
59
+ <String Id="FailureCloseButton">&Close</String>
60
+ <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
61
+</WixLocalization>
src/wixstdba/Resources/HyperlinkTheme.xml
new
+106
@@ -0,0 +1,106 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<Theme xmlns="http://wixtoolset.org/schemas/v4/thmutil">
6
+ <Font Id="0" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
7
+ <Font Id="1" Height="-24" Weight="500" Foreground="windowtext">Segoe UI</Font>
8
+ <Font Id="2" Height="-22" Weight="500" Foreground="graytext">Segoe UI</Font>
9
+ <Font Id="3" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
10
+
11
+ <Window Width="485" Height="300" HexStyle="100a0000" FontId="0" Caption="#(loc.Caption)">
12
+ <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="logo.png" Visible="yes"/>
13
+ <Label X="80" Y="11" Width="-11" Height="64" FontId="1" Visible="yes" DisablePrefix="yes">#(loc.Title)</Label>
14
+
15
+ <Page Name="Help">
16
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Label>
17
+ <Label X="11" Y="112" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Label>
18
+ <Button Name="HelpCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
19
+ <Text>#(loc.HelpCloseButton)</Text>
20
+ <CloseWindowAction />
21
+ </Button>
22
+ </Page>
23
+ <Page Name="Install">
24
+ <Hypertext Name="EulaHyperlink" X="11" Y="121" Width="-11" Height="51" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallLicenseLinkText)</Hypertext>
25
+ <Checkbox Name="EulaAcceptCheckbox" X="-11" Y="-41" Width="260" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallAcceptCheckbox)</Checkbox>
26
+ <Button Name="OptionsButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" VisibleCondition="NOT WixStdBASuppressOptionsUI">
27
+ <Text>#(loc.InstallOptionsButton)</Text>
28
+ <ChangePageAction Page="Options" />
29
+ </Button>
30
+ <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
31
+ <Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
32
+ <Text>#(loc.InstallCancelButton)</Text>
33
+ <CloseWindowAction />
34
+ </Button>
35
+ </Page>
36
+ <Page Name="Options">
37
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.OptionsHeader)</Label>
38
+ <Label X="11" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OptionsLocationLabel)</Label>
39
+ <Editbox Name="InstallFolder" X="11" Y="143" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
40
+ <Button Name="BrowseButton" X="-11" Y="142" Width="75" Height="23" TabStop="yes" FontId="3">
41
+ <Text>#(loc.OptionsBrowseButton)</Text>
42
+ <BrowseDirectoryAction VariableName="InstallFolder" />
43
+ </Button>
44
+ <Button Name="OptionsOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
45
+ <Text>#(loc.OptionsOkButton)</Text>
46
+ <ChangePageAction Page="Install" />
47
+ </Button>
48
+ <Button Name="OptionsCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
49
+ <Text>#(loc.OptionsCancelButton)</Text>
50
+ <ChangePageAction Page="Install" Cancel="yes" />
51
+ </Button>
52
+ </Page>
53
+ <Page Name="Progress">
54
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Label>
55
+ <Label X="11" Y="121" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Label>
56
+ <Label Name="OverallProgressPackageText" X="85" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Label>
57
+ <Progressbar Name="OverallCalculatedProgressbar" X="11" Y="143" Width="-11" Height="15" />
58
+ <Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
59
+ </Page>
60
+ <Page Name="Modify">
61
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Label>
62
+ <Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button>
63
+ <Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button>
64
+ <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
65
+ <Text>#(loc.ModifyCancelButton)</Text>
66
+ <CloseWindowAction />
67
+ </Button>
68
+ </Page>
69
+ <Page Name="Success">
70
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
71
+ <Text>#(loc.SuccessHeader)</Text>
72
+ <Text Condition="WixBundleAction = 2">#(loc.SuccessLayoutHeader)</Text>
73
+ <Text Condition="WixBundleAction = 3">#(loc.SuccessUninstallHeader)</Text>
74
+ <Text Condition="WixBundleAction = 4">#(loc.SuccessInstallHeader)</Text>
75
+ <Text Condition="WixBundleAction = 6">#(loc.SuccessRepairHeader)</Text>
76
+ </Label>
77
+ <Button Name="LaunchButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>
78
+ <Label X="-11" Y="-51" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">
79
+ <Text>#(loc.SuccessRestartText)</Text>
80
+ <Text Condition="WixBundleAction = 3">#(loc.SuccessUninstallRestartText)</Text>
81
+ </Label>
82
+ <Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
83
+ <Button Name="SuccessCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
84
+ <Text>#(loc.SuccessCloseButton)</Text>
85
+ <CloseWindowAction />
86
+ </Button>
87
+ </Page>
88
+ <Page Name="Failure">
89
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
90
+ <Text>#(loc.FailureHeader)</Text>
91
+ <Text Condition="WixBundleAction = 2">#(loc.FailureLayoutHeader)</Text>
92
+ <Text Condition="WixBundleAction = 3">#(loc.FailureUninstallHeader)</Text>
93
+ <Text Condition="WixBundleAction = 4">#(loc.FailureInstallHeader)</Text>
94
+ <Text Condition="WixBundleAction = 6">#(loc.FailureRepairHeader)</Text>
95
+ </Label>
96
+ <Hypertext Name="FailureLogFileLink" X="11" Y="121" Width="-11" Height="42" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
97
+ <Hypertext Name="FailureMessageText" X="22" Y="163" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes" />
98
+ <Label X="-11" Y="-51" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">#(loc.FailureRestartText)</Label>
99
+ <Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
100
+ <Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
101
+ <Text>#(loc.FailureCloseButton)</Text>
102
+ <CloseWindowAction />
103
+ </Button>
104
+ </Page>
105
+ </Window>
106
+</Theme>
src/wixstdba/Resources/LoremIpsumLicense.rtf
Binary files /dev/null and b/src/wixstdba/Resources/LoremIpsumLicense.rtf differ
src/wixstdba/Resources/RtfLargeTheme.xml
new
+108
@@ -0,0 +1,108 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<Theme xmlns="http://wixtoolset.org/schemas/v4/thmutil">
6
+ <Font Id="0" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
7
+ <Font Id="1" Height="-24" Weight="500" Foreground="windowtext">Segoe UI</Font>
8
+ <Font Id="2" Height="-22" Weight="500" Foreground="graytext">Segoe UI</Font>
9
+ <Font Id="3" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
10
+
11
+ <Window Width="500" Height="390" HexStyle="100a0000" FontId="0" Caption="#(loc.Caption)">
12
+ <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="logo.png" Visible="yes"/>
13
+ <Label X="80" Y="11" Width="-11" Height="64" FontId="1" Visible="yes" DisablePrefix="yes">#(loc.Title)</Label>
14
+
15
+ <Page Name="Help">
16
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Label>
17
+ <Label X="11" Y="112" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Label>
18
+ <Button Name="HelpCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
19
+ <Text>#(loc.HelpCloseButton)</Text>
20
+ <CloseWindowAction />
21
+ </Button>
22
+ </Page>
23
+ <Page Name="Install">
24
+ <Label X="11" Y="80" Width="-11" Height="-70" TabStop="no" FontId="2" HexStyle="800000" DisablePrefix="yes" />
25
+ <Richedit Name="EulaRichedit" X="12" Y="81" Width="-12" Height="-71" TabStop="yes" FontId="0" />
26
+ <Label Name="InstallVersion" X="11" Y="-41" Width="210" Height="17" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBAShowVersion">#(loc.InstallVersion)</Label>
27
+ <Checkbox Name="EulaAcceptCheckbox" X="-11" Y="-41" Width="260" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallAcceptCheckbox)</Checkbox>
28
+ <Button Name="OptionsButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" VisibleCondition="NOT WixStdBASuppressOptionsUI">
29
+ <Text>#(loc.InstallOptionsButton)</Text>
30
+ <ChangePageAction Page="Options" />
31
+ </Button>
32
+ <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
33
+ <Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
34
+ <Text>#(loc.InstallCancelButton)</Text>
35
+ <CloseWindowAction />
36
+ </Button>
37
+ </Page>
38
+ <Page Name="Options">
39
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.OptionsHeader)</Label>
40
+ <Label X="11" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OptionsLocationLabel)</Label>
41
+ <Editbox Name="InstallFolder" X="11" Y="143" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
42
+ <Button Name="BrowseButton" X="-11" Y="142" Width="75" Height="23" TabStop="yes" FontId="3">
43
+ <Text>#(loc.OptionsBrowseButton)</Text>
44
+ <BrowseDirectoryAction VariableName="InstallFolder" />
45
+ </Button>
46
+ <Button Name="OptionsOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
47
+ <Text>#(loc.OptionsOkButton)</Text>
48
+ <ChangePageAction Page="Install" />
49
+ </Button>
50
+ <Button Name="OptionsCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
51
+ <Text>#(loc.OptionsCancelButton)</Text>
52
+ <ChangePageAction Page="Install" Cancel="yes" />
53
+ </Button>
54
+ </Page>
55
+ <Page Name="Progress">
56
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Label>
57
+ <Label X="11" Y="121" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Label>
58
+ <Label Name="OverallProgressPackageText" X="85" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Label>
59
+ <Progressbar Name="OverallCalculatedProgressbar" X="11" Y="143" Width="-11" Height="15" />
60
+ <Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
61
+ </Page>
62
+ <Page Name="Modify">
63
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Label>
64
+ <Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button>
65
+ <Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button>
66
+ <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
67
+ <Text>#(loc.ModifyCancelButton)</Text>
68
+ <CloseWindowAction />
69
+ </Button>
70
+ </Page>
71
+ <Page Name="Success">
72
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
73
+ <Text>#(loc.SuccessHeader)</Text>
74
+ <Text Condition="WixBundleAction = 2">#(loc.SuccessLayoutHeader)</Text>
75
+ <Text Condition="WixBundleAction = 3">#(loc.SuccessUninstallHeader)</Text>
76
+ <Text Condition="WixBundleAction = 4">#(loc.SuccessInstallHeader)</Text>
77
+ <Text Condition="WixBundleAction = 6">#(loc.SuccessRepairHeader)</Text>
78
+ </Label>
79
+ <Button Name="LaunchButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>
80
+ <Label X="-11" Y="-51" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">
81
+ <Text>#(loc.SuccessRestartText)</Text>
82
+ <Text Condition="WixBundleAction = 3">#(loc.SuccessUninstallRestartText)</Text>
83
+ </Label>
84
+ <Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
85
+ <Button Name="SuccessCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
86
+ <Text>#(loc.SuccessCloseButton)</Text>
87
+ <CloseWindowAction />
88
+ </Button>
89
+ </Page>
90
+ <Page Name="Failure">
91
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
92
+ <Text>#(loc.FailureHeader)</Text>
93
+ <Text Condition="WixBundleAction = 2">#(loc.FailureLayoutHeader)</Text>
94
+ <Text Condition="WixBundleAction = 3">#(loc.FailureUninstallHeader)</Text>
95
+ <Text Condition="WixBundleAction = 4">#(loc.FailureInstallHeader)</Text>
96
+ <Text Condition="WixBundleAction = 6">#(loc.FailureRepairHeader)</Text>
97
+ </Label>
98
+ <Hypertext Name="FailureLogFileLink" X="11" Y="121" Width="-11" Height="42" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
99
+ <Hypertext Name="FailureMessageText" X="22" Y="163" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes" />
100
+ <Label Name="FailureRestartText" X="-11" Y="-51" Width="400" Height="34" FontId="3" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureRestartText)</Label>
101
+ <Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
102
+ <Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
103
+ <Text>#(loc.FailureCloseButton)</Text>
104
+ <CloseWindowAction />
105
+ </Button>
106
+ </Page>
107
+ </Window>
108
+</Theme>
src/wixstdba/Resources/RtfTheme.wxl
new
+58
@@ -0,0 +1,58 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="en-us" Language="1033" xmlns="http://wixtoolset.org/schemas/v4/wxl">
6
+ <String Id="Caption">[WixBundleName] Setup</String>
7
+ <String Id="Title">[WixBundleName]</String>
8
+ <String Id="InstallVersion">Version [WixBundleVersion]</String>
9
+ <String Id="ConfirmCancelMessage">Are you sure you want to cancel?</String>
10
+ <String Id="ExecuteUpgradeRelatedBundleMessage">Previous version</String>
11
+ <String Id="HelpHeader">Setup Help</String>
12
+ <String Id="HelpText">/install | /repair | /uninstall | /layout [directory] - installs, repairs, uninstalls or
13
+ creates a complete local copy of the bundle in directory. Install is the default.
14
+
15
+/passive | /quiet - displays minimal UI with no prompts or displays no UI and
16
+ no prompts. By default UI and all prompts are displayed.
17
+
18
+/norestart - suppress any attempts to restart. By default UI will prompt before restart.
19
+/log log.txt - logs to a specific file. By default a log file is created in %TEMP%.</String>
20
+ <String Id="HelpCloseButton">&Close</String>
21
+ <String Id="InstallAcceptCheckbox">I &agree to the license terms and conditions</String>
22
+ <String Id="InstallOptionsButton">&Options</String>
23
+ <String Id="InstallInstallButton">&Install</String>
24
+ <String Id="InstallCancelButton">&Cancel</String>
25
+ <String Id="OptionsHeader">Setup Options</String>
26
+ <String Id="OptionsLocationLabel">Install location:</String>
27
+ <String Id="OptionsBrowseButton">&Browse</String>
28
+ <String Id="OptionsOkButton">&OK</String>
29
+ <String Id="OptionsCancelButton">&Cancel</String>
30
+ <String Id="ProgressHeader">Setup Progress</String>
31
+ <String Id="ProgressLabel">Processing:</String>
32
+ <String Id="OverallProgressPackageText">Initializing...</String>
33
+ <String Id="ProgressCancelButton">&Cancel</String>
34
+ <String Id="ModifyHeader">Modify Setup</String>
35
+ <String Id="ModifyRepairButton">&Repair</String>
36
+ <String Id="ModifyUninstallButton">&Uninstall</String>
37
+ <String Id="ModifyCancelButton">&Cancel</String>
38
+ <String Id="SuccessHeader">Setup Successful</String>
39
+ <String Id="SuccessInstallHeader">Installation Successfully Completed</String>
40
+ <String Id="SuccessLayoutHeader">Layout Successfully Completed</String>
41
+ <String Id="SuccessRepairHeader">Repair Successfully Completed</String>
42
+ <String Id="SuccessUninstallHeader">Uninstall Successfully Completed</String>
43
+ <String Id="SuccessLaunchButton">&Launch</String>
44
+ <String Id="SuccessRestartText">You must restart your computer before you can use the software.</String>
45
+ <String Id="SuccessUninstallRestartText">You must restart your computer to complete the removal of the software.</String>
46
+ <String Id="SuccessRestartButton">&Restart</String>
47
+ <String Id="SuccessCloseButton">&Close</String>
48
+ <String Id="FailureHeader">Setup Failed</String>
49
+ <String Id="FailureInstallHeader">Setup Failed</String>
50
+ <String Id="FailureLayoutHeader">Layout Failed</String>
51
+ <String Id="FailureRepairHeader">Repair Failed</String>
52
+ <String Id="FailureUninstallHeader">Uninstall Failed</String>
53
+ <String Id="FailureHyperlinkLogText">One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the <a href="#">log file</a>.</String>
54
+ <String Id="FailureRestartText">You must restart your computer to complete the rollback of the software.</String>
55
+ <String Id="FailureRestartButton">&Restart</String>
56
+ <String Id="FailureCloseButton">&Close</String>
57
+ <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
58
+</WixLocalization>
src/wixstdba/Resources/RtfTheme.xml
new
+106
@@ -0,0 +1,106 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<Theme xmlns="http://wixtoolset.org/schemas/v4/thmutil">
6
+ <Font Id="0" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
7
+ <Font Id="1" Height="-24" Weight="500" Foreground="windowtext">Segoe UI</Font>
8
+ <Font Id="2" Height="-22" Weight="500" Foreground="graytext">Segoe UI</Font>
9
+ <Font Id="3" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
10
+
11
+ <Window Width="485" Height="300" HexStyle="100a0000" FontId="0" Caption="#(loc.Caption)">
12
+ <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="logo.png" Visible="yes"/>
13
+ <Label X="80" Y="11" Width="-11" Height="64" FontId="1" Visible="yes" DisablePrefix="yes">#(loc.Title)</Label>
14
+
15
+ <Page Name="Help">
16
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Label>
17
+ <Label X="11" Y="112" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Label>
18
+ <Button Name="HelpCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
19
+ <Text>#(loc.HelpCloseButton)</Text>
20
+ <CloseWindowAction />
21
+ </Button>
22
+ </Page>
23
+ <Page Name="Install">
24
+ <Richedit Name="EulaRichedit" X="11" Y="80" Width="-11" Height="-70" TabStop="yes" FontId="0" HexStyle="800000" />
25
+ <Checkbox Name="EulaAcceptCheckbox" X="-11" Y="-41" Width="260" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallAcceptCheckbox)</Checkbox>
26
+ <Button Name="OptionsButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" VisibleCondition="NOT WixStdBASuppressOptionsUI">
27
+ <Text>#(loc.InstallOptionsButton)</Text>
28
+ <ChangePageAction Page="Options" />
29
+ </Button>
30
+ <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
31
+ <Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
32
+ <Text>#(loc.InstallCancelButton)</Text>
33
+ <CloseWindowAction />
34
+ </Button>
35
+ </Page>
36
+ <Page Name="Options">
37
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.OptionsHeader)</Label>
38
+ <Label X="11" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OptionsLocationLabel)</Label>
39
+ <Editbox Name="InstallFolder" X="11" Y="143" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
40
+ <Button Name="BrowseButton" X="-11" Y="142" Width="75" Height="23" TabStop="yes" FontId="3">
41
+ <Text>#(loc.OptionsBrowseButton)</Text>
42
+ <BrowseDirectoryAction VariableName="InstallFolder" />
43
+ </Button>
44
+ <Button Name="OptionsOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
45
+ <Text>#(loc.OptionsOkButton)</Text>
46
+ <ChangePageAction Page="Install" />
47
+ </Button>
48
+ <Button Name="OptionsCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
49
+ <Text>#(loc.OptionsCancelButton)</Text>
50
+ <ChangePageAction Page="Install" Cancel="yes" />
51
+ </Button>
52
+ </Page>
53
+ <Page Name="Progress">
54
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Label>
55
+ <Label X="11" Y="121" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Label>
56
+ <Label Name="OverallProgressPackageText" X="85" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Label>
57
+ <Progressbar Name="OverallCalculatedProgressbar" X="11" Y="143" Width="-11" Height="15" />
58
+ <Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
59
+ </Page>
60
+ <Page Name="Modify">
61
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Label>
62
+ <Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button>
63
+ <Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button>
64
+ <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
65
+ <Text>#(loc.ModifyCancelButton)</Text>
66
+ <CloseWindowAction />
67
+ </Button>
68
+ </Page>
69
+ <Page Name="Success">
70
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
71
+ <Text>#(loc.SuccessHeader)</Text>
72
+ <Text Condition="WixBundleAction = 2">#(loc.SuccessLayoutHeader)</Text>
73
+ <Text Condition="WixBundleAction = 3">#(loc.SuccessUninstallHeader)</Text>
74
+ <Text Condition="WixBundleAction = 4">#(loc.SuccessInstallHeader)</Text>
75
+ <Text Condition="WixBundleAction = 6">#(loc.SuccessRepairHeader)</Text>
76
+ </Label>
77
+ <Button Name="LaunchButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>
78
+ <Label X="-11" Y="-51" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">
79
+ <Text>#(loc.SuccessRestartText)</Text>
80
+ <Text Condition="WixBundleAction = 3">#(loc.SuccessUninstallRestartText)</Text>
81
+ </Label>
82
+ <Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
83
+ <Button Name="SuccessCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
84
+ <Text>#(loc.SuccessCloseButton)</Text>
85
+ <CloseWindowAction />
86
+ </Button>
87
+ </Page>
88
+ <Page Name="Failure">
89
+ <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
90
+ <Text>#(loc.FailureHeader)</Text>
91
+ <Text Condition="WixBundleAction = 2">#(loc.FailureLayoutHeader)</Text>
92
+ <Text Condition="WixBundleAction = 3">#(loc.FailureUninstallHeader)</Text>
93
+ <Text Condition="WixBundleAction = 4">#(loc.FailureInstallHeader)</Text>
94
+ <Text Condition="WixBundleAction = 6">#(loc.FailureRepairHeader)</Text>
95
+ </Label>
96
+ <Hypertext Name="FailureLogFileLink" X="11" Y="121" Width="-11" Height="42" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
97
+ <Hypertext Name="FailureMessageText" X="22" Y="163" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes" />
98
+ <Label X="-11" Y="-51" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">#(loc.FailureRestartText)</Label>
99
+ <Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
100
+ <Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
101
+ <Text>#(loc.FailureCloseButton)</Text>
102
+ <CloseWindowAction />
103
+ </Button>
104
+ </Page>
105
+ </Window>
106
+</Theme>
src/wixstdba/Resources/logo.png
Binary files /dev/null and b/src/wixstdba/Resources/logo.png differ
src/wixstdba/Resources/logoSide.png
Binary files /dev/null and b/src/wixstdba/Resources/logoSide.png differ
src/wixstdba/Resources/mbapreq.png
Binary files /dev/null and b/src/wixstdba/Resources/mbapreq.png differ
src/wixstdba/Resources/mbapreq.thm
new
+47
@@ -0,0 +1,47 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<Theme xmlns="http://wixtoolset.org/schemas/v4/thmutil">
3
+ <Font Id="0" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
4
+ <Font Id="1" Height="-24" Weight="500" Foreground="windowtext">Segoe UI</Font>
5
+ <Font Id="2" Height="-22" Weight="500" Foreground="graytext">Segoe UI</Font>
6
+ <Font Id="3" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
7
+
8
+ <Window Width="485" Height="300" HexStyle="100a0000" FontId="0" Caption="#(loc.Caption)">
9
+ <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="mbapreq.png" Visible="yes"/>
10
+ <Label X="80" Y="11" Width="-11" Height="96" FontId="1" Visible="yes" DisablePrefix="yes">#(loc.Title)</Label>
11
+
12
+ <Page Name="Help">
13
+ <Label X="11" Y="112" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Label>
14
+ <Label X="11" Y="153" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Label>
15
+ <Button Name="HelpCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
16
+ <Text>#(loc.HelpCloseButton)</Text>
17
+ <CloseWindowAction />
18
+ </Button>
19
+ </Page>
20
+ <Page Name="Install">
21
+ <Hypertext Name="EulaHyperlink" X="11" Y="121" Width="-11" Height="34" TabStop="yes" FontId="3">#(loc.InstallLicenseTerms)</Hypertext>
22
+ <Button Name="InstallButton" X="-91" Y="-11" Width="130" Height="23" TabStop="yes" FontId="0">#(loc.InstallAcceptAndInstallButton)</Button>
23
+ <Button Name="InstallDeclineButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
24
+ <Text>#(loc.InstallDeclineButton)</Text>
25
+ <CloseWindowAction />
26
+ </Button>
27
+ </Page>
28
+ <Page Name="Progress">
29
+ <Label X="11" Y="112" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Label>
30
+ <Label X="11" Y="153" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Label>
31
+ <Label Name="OverallProgressPackageText" X="85" Y="153" Width="-11" Height="17" FontId="3" DisablePrefix="yes">[ProgressPackageName]</Label>
32
+ <Progressbar Name="OverallCalculatedProgressbar" X="11" Y="175" Width="-11" Height="15" />
33
+ <Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
34
+ </Page>
35
+ <Page Name="Failure">
36
+ <Label X="11" Y="112" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.FailureHeader)</Label>
37
+ <Hypertext Name="FailureLogFileLink" X="11" Y="153" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureLogLinkText)</Hypertext>
38
+ <Hypertext Name="FailureMessageText" X="22" Y="190" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes"/>
39
+ <Label X="-11" Y="-20" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">#(loc.FailureRestartText)</Label>
40
+ <Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
41
+ <Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
42
+ <Text>#(loc.FailureCloseButton)</Text>
43
+ <CloseWindowAction />
44
+ </Button>
45
+ </Page>
46
+ </Window>
47
+</Theme>
src/wixstdba/Resources/mbapreq.wxl
new
+29
@@ -0,0 +1,29 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<WixLocalization Culture="en-us" Language="1033" xmlns="http://wixtoolset.org/schemas/v4/wxl">
6
+ <String Id="Caption">[WixBundleName] Setup</String>
7
+ <String Id="Title">Microsoft .NET Framework required for [WixBundleName] setup</String>
8
+ <String Id="ConfirmCancelMessage">Are you sure you want to cancel?</String>
9
+ <String Id="HelpHeader">Setup Help</String>
10
+ <String Id="HelpText">/passive | /quiet - displays minimal UI with no prompts or displays no UI and
11
+ no prompts. By default UI and all prompts are displayed.
12
+
13
+/norestart - suppress any attempts to restart. By default UI will prompt before restart.
14
+/log log.txt - logs to a specific file. By default a log file is created in %TEMP%.</String>
15
+ <String Id="HelpCloseButton">&Close</String>
16
+ <String Id="InstallLicenseTerms">Click the "Accept and Install" button to accept the Microsoft .NET Framework <a href="#">license terms</a>.</String>
17
+ <String Id="InstallAcceptAndInstallButton">&Accept and Install</String>
18
+ <String Id="InstallDeclineButton">&Decline</String>
19
+ <String Id="ProgressHeader">Setup Progress</String>
20
+ <String Id="ProgressLabel">Processing:</String>
21
+ <String Id="ProgressCancelButton">&Cancel</String>
22
+ <String Id="FailureHeader">Setup Failed</String>
23
+ <String Id="FailureLogLinkText">One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the <a href="#">log file</a>.</String>
24
+ <String Id="FailureRestartText">You must restart your computer to complete the rollback of the software.</String>
25
+ <String Id="FailureRestartButton">&Restart</String>
26
+ <String Id="FailureCloseButton">&Close</String>
27
+ <String Id="NET452WIN7RTMErrorMessage">[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment.</String>
28
+ <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String>
29
+</WixLocalization>
src/wixstdba/WixStandardBootstrapperApplication.cpp
new
+3849
@@ -0,0 +1,3849 @@
1
+// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
+
3
+#include "precomp.h"
4
+#include "BalBaseBootstrapperApplicationProc.h"
5
+#include "BalBaseBootstrapperApplication.h"
6
+
7
+static const LPCWSTR WIXBUNDLE_VARIABLE_ELEVATED = L"WixBundleElevated";
8
+
9
+static const LPCWSTR WIXSTDBA_WINDOW_CLASS = L"WixStdBA";
10
+
11
+static const LPCWSTR WIXSTDBA_VARIABLE_INSTALL_FOLDER = L"InstallFolder";
12
+static const LPCWSTR WIXSTDBA_VARIABLE_LAUNCH_TARGET_PATH = L"LaunchTarget";
13
+static const LPCWSTR WIXSTDBA_VARIABLE_LAUNCH_TARGET_ELEVATED_ID = L"LaunchTargetElevatedId";
14
+static const LPCWSTR WIXSTDBA_VARIABLE_LAUNCH_ARGUMENTS = L"LaunchArguments";
15
+static const LPCWSTR WIXSTDBA_VARIABLE_LAUNCH_HIDDEN = L"LaunchHidden";
16
+static const LPCWSTR WIXSTDBA_VARIABLE_LAUNCH_WORK_FOLDER = L"LaunchWorkingFolder";
17
+
18
+static const DWORD WIXSTDBA_ACQUIRE_PERCENTAGE = 30;
19
+
20
+static const LPCWSTR WIXSTDBA_VARIABLE_BUNDLE_FILE_VERSION = L"WixBundleFileVersion";
21
+static const LPCWSTR WIXSTDBA_VARIABLE_LANGUAGE_ID = L"WixStdBALanguageId";
22
+static const LPCWSTR WIXSTDBA_VARIABLE_RESTART_REQUIRED = L"WixStdBARestartRequired";
23
+static const LPCWSTR WIXSTDBA_VARIABLE_SHOW_VERSION = L"WixStdBAShowVersion";
24
+static const LPCWSTR WIXSTDBA_VARIABLE_SUPPRESS_OPTIONS_UI = L"WixStdBASuppressOptionsUI";
25
+
26
+enum WIXSTDBA_STATE
27
+{
28
+ WIXSTDBA_STATE_INITIALIZING,
29
+ WIXSTDBA_STATE_INITIALIZED,
30
+ WIXSTDBA_STATE_HELP,
31
+ WIXSTDBA_STATE_DETECTING,
32
+ WIXSTDBA_STATE_DETECTED,
33
+ WIXSTDBA_STATE_PLANNING,
34
+ WIXSTDBA_STATE_PLANNED,
35
+ WIXSTDBA_STATE_APPLYING,
36
+ WIXSTDBA_STATE_CACHING,
37
+ WIXSTDBA_STATE_CACHED,
38
+ WIXSTDBA_STATE_EXECUTING,
39
+ WIXSTDBA_STATE_EXECUTED,
40
+ WIXSTDBA_STATE_APPLIED,
41
+ WIXSTDBA_STATE_FAILED,
42
+};
43
+
44
+enum WM_WIXSTDBA
45
+{
46
+ WM_WIXSTDBA_SHOW_HELP = WM_APP + 100,
47
+ WM_WIXSTDBA_DETECT_PACKAGES,
48
+ WM_WIXSTDBA_PLAN_PACKAGES,
49
+ WM_WIXSTDBA_APPLY_PACKAGES,
50
+ WM_WIXSTDBA_CHANGE_STATE,
51
+ WM_WIXSTDBA_SHOW_FAILURE,
52
+};
53
+
54
+// This enum must be kept in the same order as the vrgwzPageNames array.
55
+enum WIXSTDBA_PAGE
56
+{
57
+ WIXSTDBA_PAGE_LOADING,
58
+ WIXSTDBA_PAGE_HELP,
59
+ WIXSTDBA_PAGE_INSTALL,
60
+ WIXSTDBA_PAGE_MODIFY,
61
+ WIXSTDBA_PAGE_PROGRESS,
62
+ WIXSTDBA_PAGE_PROGRESS_PASSIVE,
63
+ WIXSTDBA_PAGE_SUCCESS,
64
+ WIXSTDBA_PAGE_FAILURE,
65
+ COUNT_WIXSTDBA_PAGE,
66
+};
67
+
68
+// This array must be kept in the same order as the WIXSTDBA_PAGE enum.
69
+static LPCWSTR vrgwzPageNames[] = {
70
+ L"Loading",
71
+ L"Help",
72
+ L"Install",
73
+ L"Modify",
74
+ L"Progress",
75
+ L"ProgressPassive",
76
+ L"Success",
77
+ L"Failure",
78
+};
79
+
80
+enum WIXSTDBA_CONTROL
81
+{
82
+ // Welcome page
83
+ WIXSTDBA_CONTROL_INSTALL_BUTTON = THEME_FIRST_ASSIGN_CONTROL_ID,
84
+ WIXSTDBA_CONTROL_EULA_RICHEDIT,
85
+ WIXSTDBA_CONTROL_EULA_LINK,
86
+ WIXSTDBA_CONTROL_EULA_ACCEPT_CHECKBOX,
87
+
88
+ // Modify page
89
+ WIXSTDBA_CONTROL_REPAIR_BUTTON,
90
+ WIXSTDBA_CONTROL_UNINSTALL_BUTTON,
91
+
92
+ // Progress page
93
+ WIXSTDBA_CONTROL_CACHE_PROGRESS_PACKAGE_TEXT,
94
+ WIXSTDBA_CONTROL_CACHE_PROGRESS_BAR,
95
+ WIXSTDBA_CONTROL_CACHE_PROGRESS_TEXT,
96
+
97
+ WIXSTDBA_CONTROL_EXECUTE_PROGRESS_PACKAGE_TEXT,
98
+ WIXSTDBA_CONTROL_EXECUTE_PROGRESS_BAR,
99
+ WIXSTDBA_CONTROL_EXECUTE_PROGRESS_TEXT,
100
+ WIXSTDBA_CONTROL_EXECUTE_PROGRESS_ACTIONDATA_TEXT,
101
+
102
+ WIXSTDBA_CONTROL_OVERALL_PROGRESS_PACKAGE_TEXT,
103
+ WIXSTDBA_CONTROL_OVERALL_PROGRESS_BAR,
104
+ WIXSTDBA_CONTROL_OVERALL_CALCULATED_PROGRESS_BAR,
105
+ WIXSTDBA_CONTROL_OVERALL_PROGRESS_TEXT,
106
+
107
+ WIXSTDBA_CONTROL_PROGRESS_CANCEL_BUTTON,
108
+
109
+ // Success page
110
+ WIXSTDBA_CONTROL_LAUNCH_BUTTON,
111
+ WIXSTDBA_CONTROL_SUCCESS_RESTART_BUTTON,
112
+
113
+ // Failure page
114
+ WIXSTDBA_CONTROL_FAILURE_LOGFILE_LINK,
115
+ WIXSTDBA_CONTROL_FAILURE_MESSAGE_TEXT,
116
+ WIXSTDBA_CONTROL_FAILURE_RESTART_BUTTON,
117
+};
118
+
119
+static THEME_ASSIGN_CONTROL_ID vrgInitControls[] = {
120
+ { WIXSTDBA_CONTROL_INSTALL_BUTTON, L"InstallButton" },
121
+ { WIXSTDBA_CONTROL_EULA_RICHEDIT, L"EulaRichedit" },
122
+ { WIXSTDBA_CONTROL_EULA_LINK, L"EulaHyperlink" },
123
+ { WIXSTDBA_CONTROL_EULA_ACCEPT_CHECKBOX, L"EulaAcceptCheckbox" },
124
+
125
+ { WIXSTDBA_CONTROL_REPAIR_BUTTON, L"RepairButton" },
126
+ { WIXSTDBA_CONTROL_UNINSTALL_BUTTON, L"UninstallButton" },
127
+
128
+ { WIXSTDBA_CONTROL_CACHE_PROGRESS_PACKAGE_TEXT, L"CacheProgressPackageText" },
129
+ { WIXSTDBA_CONTROL_CACHE_PROGRESS_BAR, L"CacheProgressbar" },
130
+ { WIXSTDBA_CONTROL_CACHE_PROGRESS_TEXT, L"CacheProgressText" },
131
+ { WIXSTDBA_CONTROL_EXECUTE_PROGRESS_PACKAGE_TEXT, L"ExecuteProgressPackageText" },
132
+ { WIXSTDBA_CONTROL_EXECUTE_PROGRESS_BAR, L"ExecuteProgressbar" },
133
+ { WIXSTDBA_CONTROL_EXECUTE_PROGRESS_TEXT, L"ExecuteProgressText" },
134
+ { WIXSTDBA_CONTROL_EXECUTE_PROGRESS_ACTIONDATA_TEXT, L"ExecuteProgressActionDataText"},
135
+ { WIXSTDBA_CONTROL_OVERALL_PROGRESS_PACKAGE_TEXT, L"OverallProgressPackageText" },
136
+ { WIXSTDBA_CONTROL_OVERALL_PROGRESS_BAR, L"OverallProgressbar" },
137
+ { WIXSTDBA_CONTROL_OVERALL_CALCULATED_PROGRESS_BAR, L"OverallCalculatedProgressbar" },
138
+ { WIXSTDBA_CONTROL_OVERALL_PROGRESS_TEXT, L"OverallProgressText" },
139
+ { WIXSTDBA_CONTROL_PROGRESS_CANCEL_BUTTON, L"ProgressCancelButton" },
140
+
141
+ { WIXSTDBA_CONTROL_LAUNCH_BUTTON, L"LaunchButton" },
142
+ { WIXSTDBA_CONTROL_SUCCESS_RESTART_BUTTON, L"SuccessRestartButton" },
143
+
144
+ { WIXSTDBA_CONTROL_FAILURE_LOGFILE_LINK, L"FailureLogFileLink" },
145
+ { WIXSTDBA_CONTROL_FAILURE_MESSAGE_TEXT, L"FailureMessageText" },
146
+ { WIXSTDBA_CONTROL_FAILURE_RESTART_BUTTON, L"FailureRestartButton" },
147
+};
148
+
149
+typedef struct _WIXSTDBA_PREREQ_PACKAGE
150
+{
151
+ LPWSTR sczPackageId;
152
+ BOOL fWasAlreadyInstalled;
153
+ BOOL fPlannedToBeInstalled;
154
+ BOOL fSuccessfullyInstalled;
155
+} WIXSTDBA_PREREQ_PACKAGE;
156
+
157
+
158
+static HRESULT DAPI EvaluateVariableConditionCallback(
159
+ __in_z LPCWSTR wzCondition,
160
+ __out BOOL* pf,
161
+ __in_opt LPVOID pvContext
162
+ );
163
+static HRESULT DAPI FormatVariableStringCallback(
164
+ __in_z LPCWSTR wzFormat,
165
+ __inout LPWSTR* psczOut,
166
+ __in_opt LPVOID pvContext
167
+ );
168
+static HRESULT DAPI GetVariableNumericCallback(
169
+ __in_z LPCWSTR wzVariable,
170
+ __out LONGLONG* pllValue,
171
+ __in_opt LPVOID pvContext
172
+ );
173
+static HRESULT DAPI SetVariableNumericCallback(
174
+ __in_z LPCWSTR wzVariable,
175
+ __in LONGLONG llValue,
176
+ __in_opt LPVOID pvContext
177
+ );
178
+static HRESULT DAPI GetVariableStringCallback(
179
+ __in_z LPCWSTR wzVariable,
180
+ __inout LPWSTR* psczValue,
181
+ __in_opt LPVOID pvContext
182
+ );
183
+static HRESULT DAPI SetVariableStringCallback(
184
+ __in_z LPCWSTR wzVariable,
185
+ __in_z_opt LPCWSTR wzValue,
186
+ __in_opt LPVOID pvContext
187
+ );
188
+static LPCSTR LoggingRequestStateToString(
189
+ __in BOOTSTRAPPER_REQUEST_STATE requestState
190
+ );
191
+static LPCSTR LoggingMsiFeatureStateToString(
192
+ __in BOOTSTRAPPER_FEATURE_STATE featureState
193
+ );
194
+
195
+
196
+class CWixStandardBootstrapperApplication : public CBalBaseBootstrapperApplication
197
+{
198
+public: // IBootstrapperApplication
199
+ virtual STDMETHODIMP OnStartup()
200
+ {
201
+ HRESULT hr = S_OK;
202
+ DWORD dwUIThreadId = 0;
203
+
204
+ // create UI thread
205
+ m_hUiThread = ::CreateThread(NULL, 0, UiThreadProc, this, 0, &dwUIThreadId);
206
+ if (!m_hUiThread)
207
+ {
208
+ ExitWithLastError(hr, "Failed to create UI thread.");
209
+ }
210
+
211
+ LExit:
212
+ return hr;
213
+ }
214
+
215
+
216
+ virtual STDMETHODIMP OnShutdown(
217
+ __inout BOOTSTRAPPER_SHUTDOWN_ACTION* pAction
218
+ )
219
+ {
220
+ HRESULT hr = S_OK;
221
+
222
+ // wait for UI thread to terminate
223
+ if (m_hUiThread)
224
+ {
225
+ ::WaitForSingleObject(m_hUiThread, INFINITE);
226
+ ReleaseHandle(m_hUiThread);
227
+ }
228
+
229
+ // If a restart was required.
230
+ if (m_fRestartRequired)
231
+ {
232
+ if (m_fAllowRestart)
233
+ {
234
+ *pAction = BOOTSTRAPPER_SHUTDOWN_ACTION_RESTART;
235
+ }
236
+
237
+ if (m_fPrereq)
238
+ {
239
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, m_fAllowRestart ? "The prerequisites scheduled a restart. The bootstrapper application will be reloaded after the computer is restarted."
240
+ : "A restart is required by the prerequisites but the user delayed it. The bootstrapper application will be reloaded after the computer is restarted.");
241
+ }
242
+ }
243
+ else if (m_fPrereqInstalled)
244
+ {
245
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "The prerequisites were successfully installed. The bootstrapper application will be reloaded.");
246
+ *pAction = BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER;
247
+ }
248
+ else if (m_fPrereqAlreadyInstalled)
249
+ {
250
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "The prerequisites were already installed. The bootstrapper application will not be reloaded to prevent an infinite loop.");
251
+ }
252
+ else if (m_fPrereq)
253
+ {
254
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "The prerequisites were not successfully installed, error: 0x%x. The bootstrapper application will be not reloaded.", m_hrFinal);
255
+ }
256
+
257
+ return hr;
258
+ }
259
+
260
+
261
+ virtual STDMETHODIMP OnDetectRelatedBundle(
262
+ __in LPCWSTR wzBundleId,
263
+ __in BOOTSTRAPPER_RELATION_TYPE relationType,
264
+ __in LPCWSTR wzBundleTag,
265
+ __in BOOL fPerMachine,
266
+ __in DWORD64 dw64Version,
267
+ __in BOOTSTRAPPER_RELATED_OPERATION operation,
268
+ __inout BOOL* pfCancel
269
+ )
270
+ {
271
+ BalInfoAddRelatedBundleAsPackage(&m_Bundle.packages, wzBundleId, relationType, fPerMachine);
272
+
273
+ // If we're not doing a prerequisite install, remember when our bundle would cause a downgrade.
274
+ if (!m_fPrereq && BOOTSTRAPPER_RELATED_OPERATION_DOWNGRADE == operation)
275
+ {
276
+ m_fDowngrading = TRUE;
277
+ }
278
+
279
+ return CBalBaseBootstrapperApplication::OnDetectRelatedBundle(wzBundleId, relationType, wzBundleTag, fPerMachine, dw64Version, operation, pfCancel);
280
+ }
281
+
282
+
283
+ virtual STDMETHODIMP OnDetectPackageComplete(
284
+ __in LPCWSTR wzPackageId,
285
+ __in HRESULT /*hrStatus*/,
286
+ __in BOOTSTRAPPER_PACKAGE_STATE state
287
+ )
288
+ {
289
+ WIXSTDBA_PREREQ_PACKAGE* pPrereqPackage = NULL;
290
+ BAL_INFO_PACKAGE* pPackage = NULL;
291
+ HRESULT hr = GetPrereqPackage(wzPackageId, &pPrereqPackage, &pPackage);
292
+ if (SUCCEEDED(hr) && BOOTSTRAPPER_PACKAGE_STATE_PRESENT == state)
293
+ {
294
+ // If the prerequisite package is already installed, remember that.
295
+ pPrereqPackage->fWasAlreadyInstalled = TRUE;
296
+ }
297
+
298
+ return S_OK;
299
+ }
300
+
301
+
302
+ virtual STDMETHODIMP OnDetectComplete(
303
+ __in HRESULT hrStatus
304
+ )
305
+ {
306
+ HRESULT hr = S_OK;
307
+
308
+ if (SUCCEEDED(hrStatus))
309
+ {
310
+ hrStatus = EvaluateConditions();
311
+
312
+ if (m_fPrereq)
313
+ {
314
+ m_fPrereqAlreadyInstalled = TRUE;
315
+
316
+ // At this point we have to assume that all prerequisite packages need to be installed, so set to false if any of them aren't installed.
317
+ for (DWORD i = 0; i < m_cPrereqPackages; ++i)
318
+ {
319
+ if (m_rgPrereqPackages[i].sczPackageId && !m_rgPrereqPackages[i].fWasAlreadyInstalled)
320
+ {
321
+ m_fPrereqAlreadyInstalled = FALSE;
322
+ break;
323
+ }
324
+ }
325
+ }
326
+ }
327
+
328
+ SetState(WIXSTDBA_STATE_DETECTED, hrStatus);
329
+
330
+ if (BOOTSTRAPPER_ACTION_CACHE == m_plannedAction)
331
+ {
332
+ if (m_fSupportCacheOnly)
333
+ {
334
+ // Doesn't make sense to prompt the user if cache only is requested.
335
+ if (BOOTSTRAPPER_DISPLAY_PASSIVE < m_command.display)
336
+ {
337
+ m_command.display = BOOTSTRAPPER_DISPLAY_PASSIVE;
338
+ }
339
+
340
+ m_command.action = BOOTSTRAPPER_ACTION_CACHE;
341
+ }
342
+ else
343
+ {
344
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Ignoring attempt to only cache a bundle that does not explicitly support it.");
345
+ }
346
+ }
347
+
348
+ // If we're not interacting with the user or we're doing a layout or we're just after a force restart
349
+ // then automatically start planning.
350
+ if (BOOTSTRAPPER_DISPLAY_FULL > m_command.display || BOOTSTRAPPER_ACTION_LAYOUT == m_command.action || BOOTSTRAPPER_RESUME_TYPE_REBOOT == m_command.resumeType)
351
+ {
352
+ if (SUCCEEDED(hrStatus))
353
+ {
354
+ ::PostMessageW(m_hWnd, WM_WIXSTDBA_PLAN_PACKAGES, 0, m_command.action);
355
+ }
356
+ }
357
+
358
+ return hr;
359
+ }
360
+
361
+
362
+ virtual STDMETHODIMP OnPlanRelatedBundle(
363
+ __in_z LPCWSTR wzBundleId,
364
+ __in BOOTSTRAPPER_REQUEST_STATE recommendedState,
365
+ __inout_z BOOTSTRAPPER_REQUEST_STATE* pRequestedState,
366
+ __inout BOOL* pfCancel
367
+ )
368
+ {
369
+ // If we're only installing prerequisites, do not touch related bundles.
370
+ if (m_fPrereq)
371
+ {
372
+ *pRequestedState = BOOTSTRAPPER_REQUEST_STATE_NONE;
373
+ }
374
+
375
+ return CBalBaseBootstrapperApplication::OnPlanRelatedBundle(wzBundleId, recommendedState, pRequestedState, pfCancel);
376
+ }
377
+
378
+
379
+ virtual STDMETHODIMP OnPlanPackageBegin(
380
+ __in_z LPCWSTR wzPackageId,
381
+ __in BOOTSTRAPPER_REQUEST_STATE recommendedState,
382
+ __inout BOOTSTRAPPER_REQUEST_STATE *pRequestState,
383
+ __inout BOOL* pfCancel
384
+ )
385
+ {
386
+ HRESULT hr = S_OK;
387
+ WIXSTDBA_PREREQ_PACKAGE* pPrereqPackage = NULL;
388
+ BAL_INFO_PACKAGE* pPackage = NULL;
389
+
390
+ // If we're planning to install a prerequisite, install it. The prerequisite needs to be installed
391
+ // in all cases (even uninstall!) so the BA can load next.
392
+ if (m_fPrereq)
393
+ {
394
+ // Only install prerequisite packages, and check the InstallCondition on prerequisite support packages.
395
+ BOOL fInstall = FALSE;
396
+ hr = GetPrereqPackage(wzPackageId, &pPrereqPackage, &pPackage);
397
+ if (SUCCEEDED(hr) && pPackage)
398
+ {
399
+ if (pPackage->sczInstallCondition && *pPackage->sczInstallCondition)
400
+ {
401
+ hr = BalEvaluateCondition(pPackage->sczInstallCondition, &fInstall);
402
+ if (FAILED(hr))
403
+ {
404
+ fInstall = FALSE;
405
+ }
406
+ }
407
+ else
408
+ {
409
+ // If the InstallCondition is missing, then it should always be installed.
410
+ fInstall = TRUE;
411
+ }
412
+
413
+ pPrereqPackage->fPlannedToBeInstalled = fInstall;
414
+ }
415
+
416
+ if (fInstall)
417
+ {
418
+ *pRequestState = BOOTSTRAPPER_REQUEST_STATE_PRESENT;
419
+ }
420
+ else
421
+ {
422
+ *pRequestState = BOOTSTRAPPER_REQUEST_STATE_NONE;
423
+ }
424
+ }
425
+ else if (m_sczAfterForcedRestartPackage) // after force restart, skip packages until after the package that caused the restart.
426
+ {
427
+ // After restart we need to finish the dependency registration for our package so allow the package
428
+ // to go present.
429
+ if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzPackageId, -1, m_sczAfterForcedRestartPackage, -1))
430
+ {
431
+ // Do not allow a repair because that could put us in a perpetual restart loop.
432
+ if (BOOTSTRAPPER_REQUEST_STATE_REPAIR == *pRequestState)
433
+ {
434
+ *pRequestState = BOOTSTRAPPER_REQUEST_STATE_PRESENT;
435
+ }
436
+
437
+ ReleaseNullStr(m_sczAfterForcedRestartPackage); // no more skipping now.
438
+ }
439
+ else // not the matching package, so skip it.
440
+ {
441
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Skipping package: %ls, after restart because it was applied before the restart.", wzPackageId);
442
+
443
+ *pRequestState = BOOTSTRAPPER_REQUEST_STATE_NONE;
444
+ }
445
+ }
446
+
447
+ return CBalBaseBootstrapperApplication::OnPlanPackageBegin(wzPackageId, recommendedState, pRequestState, pfCancel);
448
+ }
449
+
450
+
451
+ virtual STDMETHODIMP OnPlanComplete(
452
+ __in HRESULT hrStatus
453
+ )
454
+ {
455
+ HRESULT hr = S_OK;
456
+
457
+ if (m_fPrereq)
458
+ {
459
+ m_fPrereqAlreadyInstalled = TRUE;
460
+
461
+ // Now that we've planned the packages, we can focus on the prerequisite packages that are supposed to be installed.
462
+ for (DWORD i = 0; i < m_cPrereqPackages; ++i)
463
+ {
464
+ if (m_rgPrereqPackages[i].sczPackageId && !m_rgPrereqPackages[i].fWasAlreadyInstalled && m_rgPrereqPackages[i].fPlannedToBeInstalled)
465
+ {
466
+ m_fPrereqAlreadyInstalled = FALSE;
467
+ break;
468
+ }
469
+ }
470
+ }
471
+
472
+ SetState(WIXSTDBA_STATE_PLANNED, hrStatus);
473
+
474
+ if (SUCCEEDED(hrStatus))
475
+ {
476
+ ::PostMessageW(m_hWnd, WM_WIXSTDBA_APPLY_PACKAGES, 0, 0);
477
+ }
478
+
479
+ m_fStartedExecution = FALSE;
480
+ m_dwCalculatedCacheProgress = 0;
481
+ m_dwCalculatedExecuteProgress = 0;
482
+
483
+ return hr;
484
+ }
485
+
486
+
487
+ virtual STDMETHODIMP OnCachePackageBegin(
488
+ __in_z LPCWSTR wzPackageId,
489
+ __in DWORD cCachePayloads,
490
+ __in DWORD64 dw64PackageCacheSize,
491
+ __inout BOOL* pfCancel
492
+ )
493
+ {
494
+ if (wzPackageId && *wzPackageId)
495
+ {
496
+ BAL_INFO_PACKAGE* pPackage = NULL;
497
+ HRESULT hr = BalInfoFindPackageById(&m_Bundle.packages, wzPackageId, &pPackage);
498
+ LPCWSTR wz = (SUCCEEDED(hr) && pPackage->sczDisplayName) ? pPackage->sczDisplayName : wzPackageId;
499
+
500
+ ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_CACHE_PROGRESS_PACKAGE_TEXT, wz);
501
+
502
+ // If something started executing, leave it in the overall progress text.
503
+ if (!m_fStartedExecution)
504
+ {
505
+ ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_OVERALL_PROGRESS_PACKAGE_TEXT, wz);
506
+ }
507
+ }
508
+
509
+ return __super::OnCachePackageBegin(wzPackageId, cCachePayloads, dw64PackageCacheSize, pfCancel);
510
+ }
511
+
512
+
513
+ virtual STDMETHODIMP OnCacheAcquireProgress(
514
+ __in_z LPCWSTR wzPackageOrContainerId,
515
+ __in_z_opt LPCWSTR wzPayloadId,
516
+ __in DWORD64 dw64Progress,
517
+ __in DWORD64 dw64Total,
518
+ __in DWORD dwOverallPercentage,
519
+ __inout BOOL* pfCancel
520
+ )
521
+ {
522
+#ifdef DEBUG
523
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnCacheAcquireProgress() - container/package: %ls, payload: %ls, progress: %I64u, total: %I64u, overall progress: %u%%", wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage);
524
+#endif
525
+
526
+ UpdateCacheProgress(dwOverallPercentage);
527
+
528
+ return __super::OnCacheAcquireProgress(wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage, pfCancel);
529
+ }
530
+
531
+
532
+ virtual STDMETHODIMP OnCacheAcquireComplete(
533
+ __in_z LPCWSTR wzPackageOrContainerId,
534
+ __in_z_opt LPCWSTR wzPayloadId,
535
+ __in HRESULT hrStatus,
536
+ __in BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION recommendation,
537
+ __inout BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION* pAction
538
+ )
539
+ {
540
+ SetProgressState(hrStatus);
541
+ return __super::OnCacheAcquireComplete(wzPackageOrContainerId, wzPayloadId, hrStatus, recommendation, pAction);
542
+ }
543
+
544
+
545
+ virtual STDMETHODIMP OnCacheVerifyComplete(
546
+ __in_z LPCWSTR wzPackageId,
547
+ __in_z LPCWSTR wzPayloadId,
548
+ __in HRESULT hrStatus,
549
+ __in BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation,
550
+ __inout BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION* pAction
551
+ )
552
+ {
553
+ SetProgressState(hrStatus);
554
+ return __super::OnCacheVerifyComplete(wzPackageId, wzPayloadId, hrStatus, recommendation, pAction);
555
+ }
556
+
557
+
558
+ virtual STDMETHODIMP OnCacheComplete(
559
+ __in HRESULT hrStatus
560
+ )
561
+ {
562
+ UpdateCacheProgress(SUCCEEDED(hrStatus) ? 100 : 0);
563
+ ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_CACHE_PROGRESS_PACKAGE_TEXT, L"");
564
+ SetState(WIXSTDBA_STATE_CACHED, S_OK); // we always return success here and let OnApplyComplete() deal with the error.
565
+ return __super::OnCacheComplete(hrStatus);
566
+ }
567
+
568
+
569
+ virtual STDMETHODIMP OnError(
570
+ __in BOOTSTRAPPER_ERROR_TYPE errorType,
571
+ __in LPCWSTR wzPackageId,
572
+ __in DWORD dwCode,
573
+ __in_z LPCWSTR wzError,
574
+ __in DWORD dwUIHint,
575
+ __in DWORD /*cData*/,
576
+ __in_ecount_z_opt(cData) LPCWSTR* /*rgwzData*/,
577
+ __in int /*nRecommendation*/,
578
+ __inout int* pResult
579
+ )
580
+ {
581
+ HRESULT hr = S_OK;
582
+ int nResult = *pResult;
583
+ LPWSTR sczError = NULL;
584
+
585
+ if (BOOTSTRAPPER_DISPLAY_EMBEDDED == m_command.display)
586
+ {
587
+ hr = m_pEngine->SendEmbeddedError(dwCode, wzError, dwUIHint, &nResult);
588
+ if (FAILED(hr))
589
+ {
590
+ nResult = IDERROR;
591
+ }
592
+ }
593
+ else if (BOOTSTRAPPER_DISPLAY_FULL == m_command.display)
594
+ {
595
+ // If this is an authentication failure, let the engine try to handle it for us.
596
+ if (BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_SERVER == errorType || BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_PROXY == errorType)
597
+ {
598
+ nResult = IDTRYAGAIN;
599
+ }
600
+ else // show a generic error message box.
601
+ {
602
+ BalRetryErrorOccurred(wzPackageId, dwCode);
603
+
604
+ if (!m_fShowingInternalUiThisPackage)
605
+ {
606
+ // If no error message was provided, use the error code to try and get an error message.
607
+ if (!wzError || !*wzError || BOOTSTRAPPER_ERROR_TYPE_WINDOWS_INSTALLER != errorType)
608
+ {
609
+ hr = StrAllocFromError(&sczError, dwCode, NULL);
610
+ if (FAILED(hr) || !sczError || !*sczError)
611
+ {
612
+ // special case for ERROR_FAIL_NOACTION_REBOOT: use loc string for Windows XP
613
+ if (ERROR_FAIL_NOACTION_REBOOT == dwCode)
614
+ {
615
+ LOC_STRING* pLocString = NULL;
616
+ hr = LocGetString(m_pWixLoc, L"#(loc.ErrorFailNoActionReboot)", &pLocString);
617
+ if (SUCCEEDED(hr))
618
+ {
619
+ StrAllocString(&sczError, pLocString->wzText, 0);
620
+ }
621
+ else
622
+ {
623
+ StrAllocFormatted(&sczError, L"0x%x", dwCode);
624
+ }
625
+ }
626
+ else
627
+ {
628
+ StrAllocFormatted(&sczError, L"0x%x", dwCode);
629
+ }
630
+ }
631
+ hr = S_OK;
632
+ }
633
+
634
+ nResult = ::MessageBoxW(m_hWnd, sczError ? sczError : wzError, m_pTheme->sczCaption, dwUIHint);
635
+ }
636
+ }
637
+
638
+ SetProgressState(HRESULT_FROM_WIN32(dwCode));
639
+ }
640
+ else // just take note of the error code and let things continue.
641
+ {
642
+ BalRetryErrorOccurred(wzPackageId, dwCode);
643
+ }
644
+
645
+ ReleaseStr(sczError);
646
+ *pResult = nResult;
647
+ return hr;
648
+ }
649
+
650
+
651
+ virtual STDMETHODIMP OnExecuteMsiMessage(
652
+ __in_z LPCWSTR wzPackageId,
653
+ __in INSTALLMESSAGE messageType,
654
+ __in DWORD dwUIHint,
655
+ __in_z LPCWSTR wzMessage,
656
+ __in DWORD cData,
657
+ __in_ecount_z_opt(cData) LPCWSTR* rgwzData,
658
+ __in int nRecommendation,
659
+ __inout int* pResult
660
+ )
661
+ {
662
+#ifdef DEBUG
663
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnExecuteMsiMessage() - package: %ls, message: %ls", wzPackageId, wzMessage);
664
+#endif
665
+ if (BOOTSTRAPPER_DISPLAY_FULL == m_command.display && (INSTALLMESSAGE_WARNING == messageType || INSTALLMESSAGE_USER == messageType))
666
+ {
667
+ if (!m_fShowingInternalUiThisPackage)
668
+ {
669
+ int nResult = ::MessageBoxW(m_hWnd, wzMessage, m_pTheme->sczCaption, dwUIHint);
670
+ return nResult;
671
+ }
672
+ }
673
+
674
+ if (INSTALLMESSAGE_ACTIONSTART == messageType)
675
+ {
676
+ ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_EXECUTE_PROGRESS_ACTIONDATA_TEXT, wzMessage);
677
+ }
678
+
679
+ return __super::OnExecuteMsiMessage(wzPackageId, messageType, dwUIHint, wzMessage, cData, rgwzData, nRecommendation, pResult);
680
+ }
681
+
682
+
683
+ virtual STDMETHODIMP OnProgress(
684
+ __in DWORD dwProgressPercentage,
685
+ __in DWORD dwOverallProgressPercentage,
686
+ __inout BOOL* pfCancel
687
+ )
688
+ {
689
+ WCHAR wzProgress[5] = { };
690
+
691
+#ifdef DEBUG
692
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnProgress() - progress: %u%%, overall progress: %u%%", dwProgressPercentage, dwOverallProgressPercentage);
693
+#endif
694
+
695
+ ::StringCchPrintfW(wzProgress, countof(wzProgress), L"%u%%", dwOverallProgressPercentage);
696
+ ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_OVERALL_PROGRESS_TEXT, wzProgress);
697
+
698
+ ThemeSetProgressControl(m_pTheme, WIXSTDBA_CONTROL_OVERALL_PROGRESS_BAR, dwOverallProgressPercentage);
699
+ SetTaskbarButtonProgress(dwOverallProgressPercentage);
700
+
701
+ return __super::OnProgress(dwProgressPercentage, dwOverallProgressPercentage, pfCancel);
702
+ }
703
+
704
+
705
+ virtual STDMETHODIMP OnExecutePackageBegin(
706
+ __in_z LPCWSTR wzPackageId,
707
+ __in BOOL fExecute,
708
+ __inout BOOL* pfCancel
709
+ )
710
+ {
711
+ LPWSTR sczFormattedString = NULL;
712
+
713
+ m_fStartedExecution = TRUE;
714
+
715
+ if (wzPackageId && *wzPackageId)
716
+ {
717
+ BAL_INFO_PACKAGE* pPackage = NULL;
718
+ BalInfoFindPackageById(&m_Bundle.packages, wzPackageId, &pPackage);
719
+
720
+ LPCWSTR wz = wzPackageId;
721
+ if (pPackage)
722
+ {
723
+ LOC_STRING* pLocString = NULL;
724
+
725
+ switch (pPackage->type)
726
+ {
727
+ case BAL_INFO_PACKAGE_TYPE_BUNDLE_ADDON:
728
+ LocGetString(m_pWixLoc, L"#(loc.ExecuteAddonRelatedBundleMessage)", &pLocString);
729
+ break;
730
+
731
+ case BAL_INFO_PACKAGE_TYPE_BUNDLE_PATCH:
732
+ LocGetString(m_pWixLoc, L"#(loc.ExecutePatchRelatedBundleMessage)", &pLocString);
733
+ break;
734
+
735
+ case BAL_INFO_PACKAGE_TYPE_BUNDLE_UPGRADE:
736
+ LocGetString(m_pWixLoc, L"#(loc.ExecuteUpgradeRelatedBundleMessage)", &pLocString);
737
+ break;
738
+ }
739
+
740
+ if (pLocString)
741
+ {
742
+ // If the wix developer is showing a hidden variable in the UI, then obviously they don't care about keeping it safe
743
+ // so don't go down the rabbit hole of making sure that this is securely freed.
744
+ BalFormatString(pLocString->wzText, &sczFormattedString);
745
+ }
746
+
747
+ wz = sczFormattedString ? sczFormattedString : pPackage->sczDisplayName ? pPackage->sczDisplayName : wzPackageId;
748
+ }
749
+
750
+ //Burn engine doesn't show internal UI for msi packages during uninstall or repair actions.
751
+ m_fShowingInternalUiThisPackage = pPackage && pPackage->fDisplayInternalUI && BOOTSTRAPPER_ACTION_UNINSTALL != m_plannedAction && BOOTSTRAPPER_ACTION_REPAIR != m_plannedAction;
752
+
753
+ ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_EXECUTE_PROGRESS_PACKAGE_TEXT, wz);
754
+ ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_OVERALL_PROGRESS_PACKAGE_TEXT, wz);
755
+ }
756
+ else
757
+ {
758
+ m_fShowingInternalUiThisPackage = FALSE;
759
+ }
760
+
761
+ ReleaseStr(sczFormattedString);
762
+ return __super::OnExecutePackageBegin(wzPackageId, fExecute, pfCancel);
763
+ }
764
+
765
+
766
+ virtual STDMETHODIMP OnExecuteProgress(
767
+ __in_z LPCWSTR wzPackageId,
768
+ __in DWORD dwProgressPercentage,
769
+ __in DWORD dwOverallProgressPercentage,
770
+ __inout BOOL* pfCancel
771
+ )
772
+ {
773
+ WCHAR wzProgress[5] = { };
774
+
775
+#ifdef DEBUG
776
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnExecuteProgress() - package: %ls, progress: %u%%, overall progress: %u%%", wzPackageId, dwProgressPercentage, dwOverallProgressPercentage);
777
+#endif
778
+
779
+ ::StringCchPrintfW(wzProgress, countof(wzProgress), L"%u%%", dwOverallProgressPercentage);
780
+ ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_EXECUTE_PROGRESS_TEXT, wzProgress);
781
+
782
+ ThemeSetProgressControl(m_pTheme, WIXSTDBA_CONTROL_EXECUTE_PROGRESS_BAR, dwOverallProgressPercentage);
783
+
784
+ m_dwCalculatedExecuteProgress = dwOverallProgressPercentage * (100 - WIXSTDBA_ACQUIRE_PERCENTAGE) / 100;
785
+ ThemeSetProgressControl(m_pTheme, WIXSTDBA_CONTROL_OVERALL_CALCULATED_PROGRESS_BAR, m_dwCalculatedCacheProgress + m_dwCalculatedExecuteProgress);
786
+
787
+ SetTaskbarButtonProgress(m_dwCalculatedCacheProgress + m_dwCalculatedExecuteProgress);
788
+
789
+ return __super::OnExecuteProgress(wzPackageId, dwProgressPercentage, dwOverallProgressPercentage, pfCancel);
790
+ }
791
+
792
+
793
+ virtual STDMETHODIMP OnExecutePackageComplete(
794
+ __in_z LPCWSTR wzPackageId,
795
+ __in HRESULT hrStatus,
796
+ __in BOOTSTRAPPER_APPLY_RESTART restart,
797
+ __in BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION recommendation,
798
+ __inout BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION* pAction
799
+ )
800
+ {
801
+ HRESULT hr = S_OK;
802
+ SetProgressState(hrStatus);
803
+
804
+ hr = __super::OnExecutePackageComplete(wzPackageId, hrStatus, restart, recommendation, pAction);
805
+
806
+ WIXSTDBA_PREREQ_PACKAGE* pPrereqPackage = NULL;
807
+ BAL_INFO_PACKAGE* pPackage;
808
+ HRESULT hrPrereq = GetPrereqPackage(wzPackageId, &pPrereqPackage, &pPackage);
809
+ if (SUCCEEDED(hrPrereq))
810
+ {
811
+ pPrereqPackage->fSuccessfullyInstalled = SUCCEEDED(hrStatus);
812
+
813
+ // If the prerequisite required a restart (any restart) then do an immediate
814
+ // restart to ensure that the bundle will get launched again post reboot.
815
+ if (BOOTSTRAPPER_APPLY_RESTART_NONE != restart)
816
+ {
817
+ *pAction = BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION_RESTART;
818
+ }
819
+ }
820
+
821
+ return hr;
822
+ }
823
+
824
+
825
+ virtual STDMETHODIMP OnExecuteComplete(
826
+ __in HRESULT hrStatus
827
+ )
828
+ {
829
+ HRESULT hr = S_OK;
830
+
831
+ ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_EXECUTE_PROGRESS_PACKAGE_TEXT, L"");
832
+ ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_EXECUTE_PROGRESS_ACTIONDATA_TEXT, L"");
833
+ ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_OVERALL_PROGRESS_PACKAGE_TEXT, L"");
834
+ ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_PROGRESS_CANCEL_BUTTON, FALSE); // no more cancel.
835
+
836
+ SetState(WIXSTDBA_STATE_EXECUTED, S_OK); // we always return success here and let OnApplyComplete() deal with the error.
837
+ SetProgressState(hrStatus);
838
+
839
+ return hr;
840
+ }
841
+
842
+
843
+ virtual STDMETHODIMP OnResolveSource(
844
+ __in_z LPCWSTR wzPackageOrContainerId,
845
+ __in_z_opt LPCWSTR wzPayloadId,
846
+ __in_z LPCWSTR wzLocalSource,
847
+ __in_z_opt LPCWSTR wzDownloadSource,
848
+ __in BOOTSTRAPPER_RESOLVESOURCE_ACTION /*recommendation*/,
849
+ __inout BOOTSTRAPPER_RESOLVESOURCE_ACTION* pAction,
850
+ __inout BOOL* pfCancel
851
+ )
852
+ {
853
+ HRESULT hr = S_OK;
854
+
855
+ if (BOOTSTRAPPER_DISPLAY_FULL == m_command.display)
856
+ {
857
+ if (wzDownloadSource)
858
+ {
859
+ *pAction = BOOTSTRAPPER_RESOLVESOURCE_ACTION_DOWNLOAD;
860
+ }
861
+ else // prompt to change the source location.
862
+ {
863
+ OPENFILENAMEW ofn = { };
864
+ WCHAR wzFile[MAX_PATH] = { };
865
+
866
+ ::StringCchCopyW(wzFile, countof(wzFile), wzLocalSource);
867
+
868
+ ofn.lStructSize = sizeof(ofn);
869
+ ofn.hwndOwner = m_hWnd;
870
+ ofn.lpstrFile = wzFile;
871
+ ofn.nMaxFile = countof(wzFile);
872
+ ofn.lpstrFilter = L"All Files\0*.*\0";
873
+ ofn.nFilterIndex = 1;
874
+ ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;
875
+ ofn.lpstrTitle = m_pTheme->sczCaption;
876
+
877
+ if (::GetOpenFileNameW(&ofn))
878
+ {
879
+ hr = m_pEngine->SetLocalSource(wzPackageOrContainerId, wzPayloadId, ofn.lpstrFile);
880
+ *pAction = BOOTSTRAPPER_RESOLVESOURCE_ACTION_RETRY;
881
+ }
882
+ else
883
+ {
884
+ *pfCancel = TRUE;
885
+ }
886
+ }
887
+ }
888
+ else if (wzDownloadSource)
889
+ {
890
+ // If doing a non-interactive install and download source is available, let's try downloading the package silently
891
+ *pAction = BOOTSTRAPPER_RESOLVESOURCE_ACTION_DOWNLOAD;
892
+ }
893
+ // else there's nothing more we can do in non-interactive mode
894
+
895
+ *pfCancel |= CheckCanceled();
896
+ return hr;
897
+ }
898
+
899
+
900
+ virtual STDMETHODIMP OnApplyComplete(
901
+ __in HRESULT hrStatus,
902
+ __in BOOTSTRAPPER_APPLY_RESTART restart,
903
+ __in BOOTSTRAPPER_APPLYCOMPLETE_ACTION recommendation,
904
+ __inout BOOTSTRAPPER_APPLYCOMPLETE_ACTION* pAction
905
+ )
906
+ {
907
+ HRESULT hr = S_OK;
908
+
909
+ __super::OnApplyComplete(hrStatus, restart, recommendation, pAction);
910
+
911
+ m_restartResult = restart; // remember the restart result so we return the correct error code no matter what the user chooses to do in the UI.
912
+
913
+ // If a restart was encountered and we are not suppressing restarts, then restart is required.
914
+ m_fRestartRequired = (BOOTSTRAPPER_APPLY_RESTART_NONE != restart && BOOTSTRAPPER_RESTART_NEVER < m_command.restart);
915
+ BalSetStringVariable(WIXSTDBA_VARIABLE_RESTART_REQUIRED, m_fRestartRequired ? L"1" : NULL);
916
+
917
+ // If a restart is required and we're not displaying a UI or we are not supposed to prompt for restart then allow the restart.
918
+ m_fAllowRestart = m_fRestartRequired && (BOOTSTRAPPER_DISPLAY_FULL > m_command.display || BOOTSTRAPPER_RESTART_PROMPT < m_command.restart);
919
+
920
+ if (m_fPrereq)
921
+ {
922
+ m_fPrereqInstalled = TRUE;
923
+ BOOL fInstalledAPackage = FALSE;
924
+
925
+ for (DWORD i = 0; i < m_cPrereqPackages; ++i)
926
+ {
927
+ if (m_rgPrereqPackages[i].sczPackageId && m_rgPrereqPackages[i].fPlannedToBeInstalled && !m_rgPrereqPackages[i].fWasAlreadyInstalled)
928
+ {
929
+ if (m_rgPrereqPackages[i].fSuccessfullyInstalled)
930
+ {
931
+ fInstalledAPackage = TRUE;
932
+ }
933
+ else
934
+ {
935
+ m_fPrereqInstalled = FALSE;
936
+ break;
937
+ }
938
+ }
939
+ }
940
+
941
+ m_fPrereqInstalled = m_fPrereqInstalled && fInstalledAPackage;
942
+ }
943
+
944
+ // If we are showing UI, wait a beat before moving to the final screen.
945
+ if (BOOTSTRAPPER_DISPLAY_NONE < m_command.display)
946
+ {
947
+ ::Sleep(250);
948
+ }
949
+
950
+ SetState(WIXSTDBA_STATE_APPLIED, hrStatus);
951
+ SetTaskbarButtonProgress(100); // show full progress bar, green, yellow, or red
952
+
953
+ *pAction = BOOTSTRAPPER_APPLYCOMPLETE_ACTION_NONE;
954
+
955
+ return hr;
956
+ }
957
+
958
+ virtual STDMETHODIMP OnLaunchApprovedExeComplete(
959
+ __in HRESULT hrStatus,
960
+ __in DWORD /*processId*/
961
+ )
962
+ {
963
+ HRESULT hr = S_OK;
964
+
965
+ if (HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED) == hrStatus)
966
+ {
967
+ //try with ShelExec next time
968
+ OnClickLaunchButton();
969
+ }
970
+ else
971
+ {
972
+ ::PostMessageW(m_hWnd, WM_CLOSE, 0, 0);
973
+ }
974
+
975
+ return hr;
976
+ }
977
+
978
+ virtual STDMETHODIMP_(void) BAProcFallback(
979
+ __in BOOTSTRAPPER_APPLICATION_MESSAGE message,
980
+ __in const LPVOID pvArgs,
981
+ __inout LPVOID pvResults,
982
+ __inout HRESULT* phr,
983
+ __in_opt LPVOID /*pvContext*/
984
+ )
985
+ {
986
+ if (!m_pfnBAFunctionsProc || FAILED(*phr))
987
+ {
988
+ return;
989
+ }
990
+
991
+ // Always log before and after so we don't get blamed when BAFunctions changes something.
992
+ switch (message)
993
+ {
994
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTBEGIN:
995
+ OnDetectBeginFallback(reinterpret_cast<BA_ONDETECTBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTBEGIN_RESULTS*>(pvResults));
996
+ break;
997
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPLETE:
998
+ OnDetectCompleteFallback(reinterpret_cast<BA_ONDETECTCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTCOMPLETE_RESULTS*>(pvResults));
999
+ break;
1000
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANBEGIN:
1001
+ OnPlanBeginFallback(reinterpret_cast<BA_ONPLANBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANBEGIN_RESULTS*>(pvResults));
1002
+ break;
1003
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPLETE:
1004
+ OnPlanCompleteFallback(reinterpret_cast<BA_ONPLANCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANCOMPLETE_RESULTS*>(pvResults));
1005
+ break;
1006
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONSTARTUP: // BAFunctions is loaded during this event on a separate thread so it's not possible to forward it.
1007
+ break;
1008
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN:
1009
+ OnShutdownFallback(reinterpret_cast<BA_ONSHUTDOWN_ARGS*>(pvArgs), reinterpret_cast<BA_ONSHUTDOWN_RESULTS*>(pvResults));
1010
+ break;
1011
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMSHUTDOWN:
1012
+ OnSystemShutdownFallback(reinterpret_cast<BA_ONSYSTEMSHUTDOWN_ARGS*>(pvArgs), reinterpret_cast<BA_ONSYSTEMSHUTDOWN_RESULTS*>(pvResults));
1013
+ break;
1014
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE:
1015
+ OnDetectForwardCompatibleBundleFallback(reinterpret_cast<BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_RESULTS*>(pvResults));
1016
+ break;
1017
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATEBEGIN:
1018
+ OnDetectUpdateBeginFallback(reinterpret_cast<BA_ONDETECTUPDATEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTUPDATEBEGIN_RESULTS*>(pvResults));
1019
+ break;
1020
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATE:
1021
+ OnDetectUpdateFallback(reinterpret_cast<BA_ONDETECTUPDATE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTUPDATE_RESULTS*>(pvResults));
1022
+ break;
1023
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATECOMPLETE:
1024
+ OnDetectUpdateCompleteFallback(reinterpret_cast<BA_ONDETECTUPDATECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTUPDATECOMPLETE_RESULTS*>(pvResults));
1025
+ break;
1026
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDBUNDLE:
1027
+ OnDetectRelatedBundleFallback(reinterpret_cast<BA_ONDETECTRELATEDBUNDLE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTRELATEDBUNDLE_RESULTS*>(pvResults));
1028
+ break;
1029
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPACKAGEBEGIN:
1030
+ OnDetectPackageBeginFallback(reinterpret_cast<BA_ONDETECTPACKAGEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTPACKAGEBEGIN_RESULTS*>(pvResults));
1031
+ break;
1032
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPATIBLEMSIPACKAGE:
1033
+ OnDetectCompatibleMsiPackageFallback(reinterpret_cast<BA_ONDETECTCOMPATIBLEMSIPACKAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTCOMPATIBLEMSIPACKAGE_RESULTS*>(pvResults));
1034
+ break;
1035
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDMSIPACKAGE:
1036
+ OnDetectRelatedMsiPackageFallback(reinterpret_cast<BA_ONDETECTRELATEDMSIPACKAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTRELATEDMSIPACKAGE_RESULTS*>(pvResults));
1037
+ break;
1038
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTTARGETMSIPACKAGE:
1039
+ OnDetectTargetMsiPackageFallback(reinterpret_cast<BA_ONDETECTTARGETMSIPACKAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTTARGETMSIPACKAGE_RESULTS*>(pvResults));
1040
+ break;
1041
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTMSIFEATURE:
1042
+ OnDetectMsiFeatureFallback(reinterpret_cast<BA_ONDETECTMSIFEATURE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTMSIFEATURE_RESULTS*>(pvResults));
1043
+ break;
1044
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPACKAGECOMPLETE:
1045
+ OnDetectPackageCompleteFallback(reinterpret_cast<BA_ONDETECTPACKAGECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTPACKAGECOMPLETE_RESULTS*>(pvResults));
1046
+ break;
1047
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLE:
1048
+ OnPlanRelatedBundleFallback(reinterpret_cast<BA_ONPLANRELATEDBUNDLE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANRELATEDBUNDLE_RESULTS*>(pvResults));
1049
+ break;
1050
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPACKAGEBEGIN:
1051
+ OnPlanPackageBeginFallback(reinterpret_cast<BA_ONPLANPACKAGEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANPACKAGEBEGIN_RESULTS*>(pvResults));
1052
+ break;
1053
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGEBEGIN:
1054
+ OnPlanCompatibleMsiPackageBeginFallback(reinterpret_cast<BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_RESULTS*>(pvResults));
1055
+ break;
1056
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE:
1057
+ OnPlanCompatibleMsiPackageCompleteFallback(reinterpret_cast<BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_RESULTS*>(pvResults));
1058
+ break;
1059
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANTARGETMSIPACKAGE:
1060
+ OnPlanTargetMsiPackageFallback(reinterpret_cast<BA_ONPLANTARGETMSIPACKAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANTARGETMSIPACKAGE_RESULTS*>(pvResults));
1061
+ break;
1062
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIFEATURE:
1063
+ OnPlanMsiFeatureFallback(reinterpret_cast<BA_ONPLANMSIFEATURE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANMSIFEATURE_RESULTS*>(pvResults));
1064
+ break;
1065
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPACKAGECOMPLETE:
1066
+ OnPlanPackageCompleteFallback(reinterpret_cast<BA_ONPLANPACKAGECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANPACKAGECOMPLETE_RESULTS*>(pvResults));
1067
+ break;
1068
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYBEGIN:
1069
+ OnApplyBeginFallback(reinterpret_cast<BA_ONAPPLYBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONAPPLYBEGIN_RESULTS*>(pvResults));
1070
+ break;
1071
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONELEVATEBEGIN:
1072
+ OnElevateBeginFallback(reinterpret_cast<BA_ONELEVATEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONELEVATEBEGIN_RESULTS*>(pvResults));
1073
+ break;
1074
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONELEVATECOMPLETE:
1075
+ OnElevateCompleteFallback(reinterpret_cast<BA_ONELEVATECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONELEVATECOMPLETE_RESULTS*>(pvResults));
1076
+ break;
1077
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPROGRESS:
1078
+ OnProgressFallback(reinterpret_cast<BA_ONPROGRESS_ARGS*>(pvArgs), reinterpret_cast<BA_ONPROGRESS_RESULTS*>(pvResults));
1079
+ break;
1080
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONERROR:
1081
+ OnErrorFallback(reinterpret_cast<BA_ONERROR_ARGS*>(pvArgs), reinterpret_cast<BA_ONERROR_RESULTS*>(pvResults));
1082
+ break;
1083
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONREGISTERBEGIN:
1084
+ OnRegisterBeginFallback(reinterpret_cast<BA_ONREGISTERBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONREGISTERBEGIN_RESULTS*>(pvResults));
1085
+ break;
1086
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONREGISTERCOMPLETE:
1087
+ OnRegisterCompleteFallback(reinterpret_cast<BA_ONREGISTERCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONREGISTERCOMPLETE_RESULTS*>(pvResults));
1088
+ break;
1089
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEBEGIN:
1090
+ OnCacheBeginFallback(reinterpret_cast<BA_ONCACHEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEBEGIN_RESULTS*>(pvResults));
1091
+ break;
1092
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGEBEGIN:
1093
+ OnCachePackageBeginFallback(reinterpret_cast<BA_ONCACHEPACKAGEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEPACKAGEBEGIN_RESULTS*>(pvResults));
1094
+ break;
1095
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREBEGIN:
1096
+ OnCacheAcquireBeginFallback(reinterpret_cast<BA_ONCACHEACQUIREBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEACQUIREBEGIN_RESULTS*>(pvResults));
1097
+ break;
1098
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREPROGRESS:
1099
+ OnCacheAcquireProgressFallback(reinterpret_cast<BA_ONCACHEACQUIREPROGRESS_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEACQUIREPROGRESS_RESULTS*>(pvResults));
1100
+ break;
1101
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONRESOLVESOURCE:
1102
+ OnResolveSourceFallback(reinterpret_cast<BA_ONRESOLVESOURCE_ARGS*>(pvArgs), reinterpret_cast<BA_ONRESOLVESOURCE_RESULTS*>(pvResults));
1103
+ break;
1104
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRECOMPLETE:
1105
+ OnCacheAcquireCompleteFallback(reinterpret_cast<BA_ONCACHEACQUIRECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEACQUIRECOMPLETE_RESULTS*>(pvResults));
1106
+ break;
1107
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYBEGIN:
1108
+ OnCacheVerifyBeginFallback(reinterpret_cast<BA_ONCACHEVERIFYBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEVERIFYBEGIN_RESULTS*>(pvResults));
1109
+ break;
1110
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYCOMPLETE:
1111
+ OnCacheVerifyCompleteFallback(reinterpret_cast<BA_ONCACHEVERIFYCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEVERIFYCOMPLETE_RESULTS*>(pvResults));
1112
+ break;
1113
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGECOMPLETE:
1114
+ OnCachePackageCompleteFallback(reinterpret_cast<BA_ONCACHEPACKAGECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEPACKAGECOMPLETE_RESULTS*>(pvResults));
1115
+ break;
1116
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECOMPLETE:
1117
+ OnCacheCompleteFallback(reinterpret_cast<BA_ONCACHECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHECOMPLETE_RESULTS*>(pvResults));
1118
+ break;
1119
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEBEGIN:
1120
+ OnExecuteBeginFallback(reinterpret_cast<BA_ONEXECUTEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEBEGIN_RESULTS*>(pvResults));
1121
+ break;
1122
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPACKAGEBEGIN:
1123
+ OnExecutePackageBeginFallback(reinterpret_cast<BA_ONEXECUTEPACKAGEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEPACKAGEBEGIN_RESULTS*>(pvResults));
1124
+ break;
1125
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPATCHTARGET:
1126
+ OnExecutePatchTargetFallback(reinterpret_cast<BA_ONEXECUTEPATCHTARGET_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEPATCHTARGET_RESULTS*>(pvResults));
1127
+ break;
1128
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPROGRESS:
1129
+ OnExecuteProgressFallback(reinterpret_cast<BA_ONEXECUTEPROGRESS_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEPROGRESS_RESULTS*>(pvResults));
1130
+ break;
1131
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEMSIMESSAGE:
1132
+ OnExecuteMsiMessageFallback(reinterpret_cast<BA_ONEXECUTEMSIMESSAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEMSIMESSAGE_RESULTS*>(pvResults));
1133
+ break;
1134
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEFILESINUSE:
1135
+ OnExecuteFilesInUseFallback(reinterpret_cast<BA_ONEXECUTEFILESINUSE_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEFILESINUSE_RESULTS*>(pvResults));
1136
+ break;
1137
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPACKAGECOMPLETE:
1138
+ OnExecutePackageCompleteFallback(reinterpret_cast<BA_ONEXECUTEPACKAGECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEPACKAGECOMPLETE_RESULTS*>(pvResults));
1139
+ break;
1140
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTECOMPLETE:
1141
+ OnExecuteCompleteFallback(reinterpret_cast<BA_ONEXECUTECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTECOMPLETE_RESULTS*>(pvResults));
1142
+ break;
1143
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONUNREGISTERBEGIN:
1144
+ OnUnregisterBeginFallback(reinterpret_cast<BA_ONUNREGISTERBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONUNREGISTERBEGIN_RESULTS*>(pvResults));
1145
+ break;
1146
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONUNREGISTERCOMPLETE:
1147
+ OnUnregisterCompleteFallback(reinterpret_cast<BA_ONUNREGISTERCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONUNREGISTERCOMPLETE_RESULTS*>(pvResults));
1148
+ break;
1149
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYCOMPLETE:
1150
+ OnApplyCompleteFallback(reinterpret_cast<BA_ONAPPLYCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONAPPLYCOMPLETE_RESULTS*>(pvResults));
1151
+ break;
1152
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXEBEGIN:
1153
+ OnLaunchApprovedExeBeginFallback(reinterpret_cast<BA_ONLAUNCHAPPROVEDEXEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONLAUNCHAPPROVEDEXEBEGIN_RESULTS*>(pvResults));
1154
+ break;
1155
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXECOMPLETE:
1156
+ OnLaunchApprovedExeCompleteFallback(reinterpret_cast<BA_ONLAUNCHAPPROVEDEXECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONLAUNCHAPPROVEDEXECOMPLETE_RESULTS*>(pvResults));
1157
+ break;
1158
+ default:
1159
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: Forwarding unknown BA message: %d", message);
1160
+ m_pfnBAFunctionsProc((BA_FUNCTIONS_MESSAGE)message, pvArgs, pvResults, m_pvBAFunctionsProcContext);
1161
+ break;
1162
+ }
1163
+ }
1164
+
1165
+
1166
+private: // privates
1167
+ void OnDetectBeginFallback(
1168
+ __in BA_ONDETECTBEGIN_ARGS* pArgs,
1169
+ __inout BA_ONDETECTBEGIN_RESULTS* pResults
1170
+ )
1171
+ {
1172
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1173
+ }
1174
+
1175
+ void OnDetectCompleteFallback(
1176
+ __in BA_ONDETECTCOMPLETE_ARGS* pArgs,
1177
+ __inout BA_ONDETECTCOMPLETE_RESULTS* pResults
1178
+ )
1179
+ {
1180
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTCOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1181
+ }
1182
+
1183
+ void OnPlanBeginFallback(
1184
+ __in BA_ONPLANBEGIN_ARGS* pArgs,
1185
+ __inout BA_ONPLANBEGIN_RESULTS* pResults
1186
+ )
1187
+ {
1188
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1189
+ }
1190
+
1191
+ void OnPlanCompleteFallback(
1192
+ __in BA_ONPLANCOMPLETE_ARGS* pArgs,
1193
+ __inout BA_ONPLANCOMPLETE_RESULTS* pResults
1194
+ )
1195
+ {
1196
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANCOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1197
+ }
1198
+
1199
+ void OnShutdownFallback(
1200
+ __in BA_ONSHUTDOWN_ARGS* pArgs,
1201
+ __inout BA_ONSHUTDOWN_RESULTS* pResults
1202
+ )
1203
+ {
1204
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONSHUTDOWN, pArgs, pResults, m_pvBAFunctionsProcContext);
1205
+ }
1206
+
1207
+ void OnSystemShutdownFallback(
1208
+ __in BA_ONSYSTEMSHUTDOWN_ARGS* pArgs,
1209
+ __inout BA_ONSYSTEMSHUTDOWN_RESULTS* pResults
1210
+ )
1211
+ {
1212
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONSYSTEMSHUTDOWN, pArgs, pResults, m_pvBAFunctionsProcContext);
1213
+ }
1214
+
1215
+ void OnDetectForwardCompatibleBundleFallback(
1216
+ __in BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_ARGS* pArgs,
1217
+ __inout BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_RESULTS* pResults
1218
+ )
1219
+ {
1220
+ BOOL fIgnoreBundle = pResults->fIgnoreBundle;
1221
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE, pArgs, pResults, m_pvBAFunctionsProcContext);
1222
+ BalLogId(BOOTSTRAPPER_LOG_LEVEL_STANDARD, MSG_WIXSTDBA_DETECTED_FORWARD_COMPATIBLE_BUNDLE, m_hModule, pArgs->wzBundleId, fIgnoreBundle ? "ignore" : "enable", pResults->fIgnoreBundle ? "ignore" : "enable");
1223
+ }
1224
+
1225
+ void OnDetectUpdateBeginFallback(
1226
+ __in BA_ONDETECTUPDATEBEGIN_ARGS* pArgs,
1227
+ __inout BA_ONDETECTUPDATEBEGIN_RESULTS* pResults
1228
+ )
1229
+ {
1230
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTUPDATEBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1231
+ }
1232
+
1233
+ void OnDetectUpdateFallback(
1234
+ __in BA_ONDETECTUPDATE_ARGS* pArgs,
1235
+ __inout BA_ONDETECTUPDATE_RESULTS* pResults
1236
+ )
1237
+ {
1238
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTUPDATE, pArgs, pResults, m_pvBAFunctionsProcContext);
1239
+ }
1240
+
1241
+ void OnDetectUpdateCompleteFallback(
1242
+ __in BA_ONDETECTUPDATECOMPLETE_ARGS* pArgs,
1243
+ __inout BA_ONDETECTUPDATECOMPLETE_RESULTS* pResults
1244
+ )
1245
+ {
1246
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTUPDATECOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1247
+ }
1248
+
1249
+ void OnDetectRelatedBundleFallback(
1250
+ __in BA_ONDETECTRELATEDBUNDLE_ARGS* pArgs,
1251
+ __inout BA_ONDETECTRELATEDBUNDLE_RESULTS* pResults
1252
+ )
1253
+ {
1254
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTRELATEDBUNDLE, pArgs, pResults, m_pvBAFunctionsProcContext);
1255
+ }
1256
+
1257
+ void OnDetectPackageBeginFallback(
1258
+ __in BA_ONDETECTPACKAGEBEGIN_ARGS* pArgs,
1259
+ __inout BA_ONDETECTPACKAGEBEGIN_RESULTS* pResults
1260
+ )
1261
+ {
1262
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTPACKAGEBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1263
+ }
1264
+
1265
+ void OnDetectCompatibleMsiPackageFallback(
1266
+ __in BA_ONDETECTCOMPATIBLEMSIPACKAGE_ARGS* pArgs,
1267
+ __inout BA_ONDETECTCOMPATIBLEMSIPACKAGE_RESULTS* pResults
1268
+ )
1269
+ {
1270
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTCOMPATIBLEMSIPACKAGE, pArgs, pResults, m_pvBAFunctionsProcContext);
1271
+ }
1272
+
1273
+ void OnDetectRelatedMsiPackageFallback(
1274
+ __in BA_ONDETECTRELATEDMSIPACKAGE_ARGS* pArgs,
1275
+ __inout BA_ONDETECTRELATEDMSIPACKAGE_RESULTS* pResults
1276
+ )
1277
+ {
1278
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTRELATEDMSIPACKAGE, pArgs, pResults, m_pvBAFunctionsProcContext);
1279
+ }
1280
+
1281
+ void OnDetectTargetMsiPackageFallback(
1282
+ __in BA_ONDETECTTARGETMSIPACKAGE_ARGS* pArgs,
1283
+ __inout BA_ONDETECTTARGETMSIPACKAGE_RESULTS* pResults
1284
+ )
1285
+ {
1286
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTTARGETMSIPACKAGE, pArgs, pResults, m_pvBAFunctionsProcContext);
1287
+ }
1288
+
1289
+ void OnDetectMsiFeatureFallback(
1290
+ __in BA_ONDETECTMSIFEATURE_ARGS* pArgs,
1291
+ __inout BA_ONDETECTMSIFEATURE_RESULTS* pResults
1292
+ )
1293
+ {
1294
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTMSIFEATURE, pArgs, pResults, m_pvBAFunctionsProcContext);
1295
+ }
1296
+
1297
+ void OnDetectPackageCompleteFallback(
1298
+ __in BA_ONDETECTPACKAGECOMPLETE_ARGS* pArgs,
1299
+ __inout BA_ONDETECTPACKAGECOMPLETE_RESULTS* pResults
1300
+ )
1301
+ {
1302
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTPACKAGECOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1303
+ }
1304
+
1305
+ void OnPlanRelatedBundleFallback(
1306
+ __in BA_ONPLANRELATEDBUNDLE_ARGS* pArgs,
1307
+ __inout BA_ONPLANRELATEDBUNDLE_RESULTS* pResults
1308
+ )
1309
+ {
1310
+ BOOTSTRAPPER_REQUEST_STATE requestedState = pResults->requestedState;
1311
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANRELATEDBUNDLE, pArgs, pResults, m_pvBAFunctionsProcContext);
1312
+ BalLogId(BOOTSTRAPPER_LOG_LEVEL_STANDARD, MSG_WIXSTDBA_PLANNED_RELATED_BUNDLE, m_hModule, pArgs->wzBundleId, LoggingRequestStateToString(requestedState), LoggingRequestStateToString(pResults->requestedState));
1313
+ }
1314
+
1315
+ void OnPlanPackageBeginFallback(
1316
+ __in BA_ONPLANPACKAGEBEGIN_ARGS* pArgs,
1317
+ __inout BA_ONPLANPACKAGEBEGIN_RESULTS* pResults
1318
+ )
1319
+ {
1320
+ BOOTSTRAPPER_REQUEST_STATE requestedState = pResults->requestedState;
1321
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANPACKAGEBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1322
+ BalLogId(BOOTSTRAPPER_LOG_LEVEL_STANDARD, MSG_WIXSTDBA_PLANNED_PACKAGE, m_hModule, pArgs->wzPackageId, LoggingRequestStateToString(requestedState), LoggingRequestStateToString(pResults->requestedState));
1323
+ }
1324
+
1325
+ void OnPlanCompatibleMsiPackageBeginFallback(
1326
+ __in BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_ARGS* pArgs,
1327
+ __inout BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_RESULTS* pResults
1328
+ )
1329
+ {
1330
+ BOOTSTRAPPER_REQUEST_STATE requestedState = pResults->requestedState;
1331
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGEBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1332
+ BalLogId(BOOTSTRAPPER_LOG_LEVEL_STANDARD, MSG_WIXSTDBA_PLANNED_COMPATIBLE_MSI_PACKAGE, m_hModule, pArgs->wzPackageId, pArgs->wzCompatiblePackageId, LoggingRequestStateToString(requestedState), LoggingRequestStateToString(pResults->requestedState));
1333
+ }
1334
+
1335
+ void OnPlanCompatibleMsiPackageCompleteFallback(
1336
+ __in BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_ARGS* pArgs,
1337
+ __inout BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_RESULTS* pResults
1338
+ )
1339
+ {
1340
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1341
+ }
1342
+
1343
+ void OnPlanTargetMsiPackageFallback(
1344
+ __in BA_ONPLANTARGETMSIPACKAGE_ARGS* pArgs,
1345
+ __inout BA_ONPLANTARGETMSIPACKAGE_RESULTS* pResults
1346
+ )
1347
+ {
1348
+ BOOTSTRAPPER_REQUEST_STATE requestedState = pResults->requestedState;
1349
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANTARGETMSIPACKAGE, pArgs, pResults, m_pvBAFunctionsProcContext);
1350
+ BalLogId(BOOTSTRAPPER_LOG_LEVEL_STANDARD, MSG_WIXSTDBA_PLANNED_TARGET_MSI_PACKAGE, m_hModule, pArgs->wzPackageId, pArgs->wzProductCode, LoggingRequestStateToString(requestedState), LoggingRequestStateToString(pResults->requestedState));
1351
+ }
1352
+
1353
+ void OnPlanMsiFeatureFallback(
1354
+ __in BA_ONPLANMSIFEATURE_ARGS* pArgs,
1355
+ __inout BA_ONPLANMSIFEATURE_RESULTS* pResults
1356
+ )
1357
+ {
1358
+ BOOTSTRAPPER_FEATURE_STATE requestedState = pResults->requestedState;
1359
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANMSIFEATURE, pArgs, pResults, m_pvBAFunctionsProcContext);
1360
+ BalLogId(BOOTSTRAPPER_LOG_LEVEL_STANDARD, MSG_WIXSTDBA_PLANNED_MSI_FEATURE, m_hModule, pArgs->wzPackageId, pArgs->wzFeatureId, LoggingMsiFeatureStateToString(requestedState), LoggingMsiFeatureStateToString(pResults->requestedState));
1361
+ }
1362
+
1363
+ void OnPlanPackageCompleteFallback(
1364
+ __in BA_ONPLANPACKAGECOMPLETE_ARGS* pArgs,
1365
+ __inout BA_ONPLANPACKAGECOMPLETE_RESULTS* pResults
1366
+ )
1367
+ {
1368
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANPACKAGECOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1369
+ }
1370
+
1371
+ void OnApplyBeginFallback(
1372
+ __in BA_ONAPPLYBEGIN_ARGS* pArgs,
1373
+ __inout BA_ONAPPLYBEGIN_RESULTS* pResults
1374
+ )
1375
+ {
1376
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONAPPLYBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1377
+ }
1378
+
1379
+ void OnElevateBeginFallback(
1380
+ __in BA_ONELEVATEBEGIN_ARGS* pArgs,
1381
+ __inout BA_ONELEVATEBEGIN_RESULTS* pResults
1382
+ )
1383
+ {
1384
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONELEVATEBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1385
+ }
1386
+
1387
+ void OnElevateCompleteFallback(
1388
+ __in BA_ONELEVATECOMPLETE_ARGS* pArgs,
1389
+ __inout BA_ONELEVATECOMPLETE_RESULTS* pResults
1390
+ )
1391
+ {
1392
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONELEVATECOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1393
+ }
1394
+
1395
+ void OnProgressFallback(
1396
+ __in BA_ONPROGRESS_ARGS* pArgs,
1397
+ __inout BA_ONPROGRESS_RESULTS* pResults
1398
+ )
1399
+ {
1400
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPROGRESS, pArgs, pResults, m_pvBAFunctionsProcContext);
1401
+ }
1402
+
1403
+ void OnErrorFallback(
1404
+ __in BA_ONERROR_ARGS* pArgs,
1405
+ __inout BA_ONERROR_RESULTS* pResults
1406
+ )
1407
+ {
1408
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONERROR, pArgs, pResults, m_pvBAFunctionsProcContext);
1409
+ }
1410
+
1411
+ void OnRegisterBeginFallback(
1412
+ __in BA_ONREGISTERBEGIN_ARGS* pArgs,
1413
+ __inout BA_ONREGISTERBEGIN_RESULTS* pResults
1414
+ )
1415
+ {
1416
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONREGISTERBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1417
+ }
1418
+
1419
+ void OnRegisterCompleteFallback(
1420
+ __in BA_ONREGISTERCOMPLETE_ARGS* pArgs,
1421
+ __inout BA_ONREGISTERCOMPLETE_RESULTS* pResults
1422
+ )
1423
+ {
1424
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONREGISTERCOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1425
+ }
1426
+
1427
+ void OnCacheBeginFallback(
1428
+ __in BA_ONCACHEBEGIN_ARGS* pArgs,
1429
+ __inout BA_ONCACHEBEGIN_RESULTS* pResults
1430
+ )
1431
+ {
1432
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHEBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1433
+ }
1434
+
1435
+ void OnCachePackageBeginFallback(
1436
+ __in BA_ONCACHEPACKAGEBEGIN_ARGS* pArgs,
1437
+ __inout BA_ONCACHEPACKAGEBEGIN_RESULTS* pResults
1438
+ )
1439
+ {
1440
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHEPACKAGEBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1441
+ }
1442
+
1443
+ void OnCacheAcquireBeginFallback(
1444
+ __in BA_ONCACHEACQUIREBEGIN_ARGS* pArgs,
1445
+ __inout BA_ONCACHEACQUIREBEGIN_RESULTS* pResults
1446
+ )
1447
+ {
1448
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHEACQUIREBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1449
+ }
1450
+
1451
+ void OnCacheAcquireProgressFallback(
1452
+ __in BA_ONCACHEACQUIREPROGRESS_ARGS* pArgs,
1453
+ __inout BA_ONCACHEACQUIREPROGRESS_RESULTS* pResults
1454
+ )
1455
+ {
1456
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHEACQUIREPROGRESS, pArgs, pResults, m_pvBAFunctionsProcContext);
1457
+ }
1458
+
1459
+ void OnResolveSourceFallback(
1460
+ __in BA_ONRESOLVESOURCE_ARGS* pArgs,
1461
+ __inout BA_ONRESOLVESOURCE_RESULTS* pResults
1462
+ )
1463
+ {
1464
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONRESOLVESOURCE, pArgs, pResults, m_pvBAFunctionsProcContext);
1465
+ }
1466
+
1467
+ void OnCacheAcquireCompleteFallback(
1468
+ __in BA_ONCACHEACQUIRECOMPLETE_ARGS* pArgs,
1469
+ __inout BA_ONCACHEACQUIRECOMPLETE_RESULTS* pResults
1470
+ )
1471
+ {
1472
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHEACQUIRECOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1473
+ }
1474
+
1475
+ void OnCacheVerifyBeginFallback(
1476
+ __in BA_ONCACHEVERIFYBEGIN_ARGS* pArgs,
1477
+ __inout BA_ONCACHEVERIFYBEGIN_RESULTS* pResults
1478
+ )
1479
+ {
1480
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1481
+ }
1482
+
1483
+ void OnCacheVerifyCompleteFallback(
1484
+ __in BA_ONCACHEVERIFYCOMPLETE_ARGS* pArgs,
1485
+ __inout BA_ONCACHEVERIFYCOMPLETE_RESULTS* pResults
1486
+ )
1487
+ {
1488
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYCOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1489
+ }
1490
+
1491
+ void OnCachePackageCompleteFallback(
1492
+ __in BA_ONCACHEPACKAGECOMPLETE_ARGS* pArgs,
1493
+ __inout BA_ONCACHEPACKAGECOMPLETE_RESULTS* pResults
1494
+ )
1495
+ {
1496
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHEPACKAGECOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1497
+ }
1498
+
1499
+ void OnCacheCompleteFallback(
1500
+ __in BA_ONCACHECOMPLETE_ARGS* pArgs,
1501
+ __inout BA_ONCACHECOMPLETE_RESULTS* pResults
1502
+ )
1503
+ {
1504
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONCACHECOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1505
+ }
1506
+
1507
+ void OnExecuteBeginFallback(
1508
+ __in BA_ONEXECUTEBEGIN_ARGS* pArgs,
1509
+ __inout BA_ONEXECUTEBEGIN_RESULTS* pResults
1510
+ )
1511
+ {
1512
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONEXECUTEBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1513
+ }
1514
+
1515
+ void OnExecutePackageBeginFallback(
1516
+ __in BA_ONEXECUTEPACKAGEBEGIN_ARGS* pArgs,
1517
+ __inout BA_ONEXECUTEPACKAGEBEGIN_RESULTS* pResults
1518
+ )
1519
+ {
1520
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONEXECUTEPACKAGEBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1521
+ }
1522
+
1523
+ void OnExecutePatchTargetFallback(
1524
+ __in BA_ONEXECUTEPATCHTARGET_ARGS* pArgs,
1525
+ __inout BA_ONEXECUTEPATCHTARGET_RESULTS* pResults
1526
+ )
1527
+ {
1528
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONEXECUTEPATCHTARGET, pArgs, pResults, m_pvBAFunctionsProcContext);
1529
+ }
1530
+
1531
+ void OnExecuteProgressFallback(
1532
+ __in BA_ONEXECUTEPROGRESS_ARGS* pArgs,
1533
+ __inout BA_ONEXECUTEPROGRESS_RESULTS* pResults
1534
+ )
1535
+ {
1536
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONEXECUTEPROGRESS, pArgs, pResults, m_pvBAFunctionsProcContext);
1537
+ }
1538
+
1539
+ void OnExecuteMsiMessageFallback(
1540
+ __in BA_ONEXECUTEMSIMESSAGE_ARGS* pArgs,
1541
+ __inout BA_ONEXECUTEMSIMESSAGE_RESULTS* pResults
1542
+ )
1543
+ {
1544
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONEXECUTEMSIMESSAGE, pArgs, pResults, m_pvBAFunctionsProcContext);
1545
+ }
1546
+
1547
+ void OnExecuteFilesInUseFallback(
1548
+ __in BA_ONEXECUTEFILESINUSE_ARGS* pArgs,
1549
+ __inout BA_ONEXECUTEFILESINUSE_RESULTS* pResults
1550
+ )
1551
+ {
1552
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONEXECUTEFILESINUSE, pArgs, pResults, m_pvBAFunctionsProcContext);
1553
+ }
1554
+
1555
+ void OnExecutePackageCompleteFallback(
1556
+ __in BA_ONEXECUTEPACKAGECOMPLETE_ARGS* pArgs,
1557
+ __inout BA_ONEXECUTEPACKAGECOMPLETE_RESULTS* pResults
1558
+ )
1559
+ {
1560
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONEXECUTEPACKAGECOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1561
+ }
1562
+
1563
+ void OnExecuteCompleteFallback(
1564
+ __in BA_ONEXECUTECOMPLETE_ARGS* pArgs,
1565
+ __inout BA_ONEXECUTECOMPLETE_RESULTS* pResults
1566
+ )
1567
+ {
1568
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONEXECUTECOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1569
+ }
1570
+
1571
+ void OnUnregisterBeginFallback(
1572
+ __in BA_ONUNREGISTERBEGIN_ARGS* pArgs,
1573
+ __inout BA_ONUNREGISTERBEGIN_RESULTS* pResults
1574
+ )
1575
+ {
1576
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONUNREGISTERBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1577
+ }
1578
+
1579
+ void OnUnregisterCompleteFallback(
1580
+ __in BA_ONUNREGISTERCOMPLETE_ARGS* pArgs,
1581
+ __inout BA_ONUNREGISTERCOMPLETE_RESULTS* pResults
1582
+ )
1583
+ {
1584
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONUNREGISTERCOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1585
+ }
1586
+
1587
+ void OnApplyCompleteFallback(
1588
+ __in BA_ONAPPLYCOMPLETE_ARGS* pArgs,
1589
+ __inout BA_ONAPPLYCOMPLETE_RESULTS* pResults
1590
+ )
1591
+ {
1592
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONAPPLYCOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1593
+ }
1594
+
1595
+ void OnLaunchApprovedExeBeginFallback(
1596
+ __in BA_ONLAUNCHAPPROVEDEXEBEGIN_ARGS* pArgs,
1597
+ __inout BA_ONLAUNCHAPPROVEDEXEBEGIN_RESULTS* pResults
1598
+ )
1599
+ {
1600
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONLAUNCHAPPROVEDEXEBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext);
1601
+ }
1602
+
1603
+ void OnLaunchApprovedExeCompleteFallback(
1604
+ __in BA_ONLAUNCHAPPROVEDEXECOMPLETE_ARGS* pArgs,
1605
+ __inout BA_ONLAUNCHAPPROVEDEXECOMPLETE_RESULTS* pResults
1606
+ )
1607
+ {
1608
+ m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONLAUNCHAPPROVEDEXECOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext);
1609
+ }
1610
+
1611
+ //
1612
+ // UiThreadProc - entrypoint for UI thread.
1613
+ //
1614
+ static DWORD WINAPI UiThreadProc(
1615
+ __in LPVOID pvContext
1616
+ )
1617
+ {
1618
+ HRESULT hr = S_OK;
1619
+ CWixStandardBootstrapperApplication* pThis = (CWixStandardBootstrapperApplication*)pvContext;
1620
+ BOOL fComInitialized = FALSE;
1621
+ BOOL fRet = FALSE;
1622
+ MSG msg = { };
1623
+
1624
+ // Initialize COM and theme.
1625
+ hr = ::CoInitialize(NULL);
1626
+ BalExitOnFailure(hr, "Failed to initialize COM.");
1627
+ fComInitialized = TRUE;
1628
+
1629
+ hr = ThemeInitialize(pThis->m_hModule);
1630
+ BalExitOnFailure(hr, "Failed to initialize theme manager.");
1631
+
1632
+ hr = pThis->InitializeData();
1633
+ BalExitOnFailure(hr, "Failed to initialize data in bootstrapper application.");
1634
+
1635
+ // Create main window.
1636
+ pThis->InitializeTaskbarButton();
1637
+ hr = pThis->CreateMainWindow();
1638
+ BalExitOnFailure(hr, "Failed to create main window.");
1639
+
1640
+ if (FAILED(pThis->m_hrFinal))
1641
+ {
1642
+ pThis->SetState(WIXSTDBA_STATE_FAILED, hr);
1643
+ ::PostMessageW(pThis->m_hWnd, WM_WIXSTDBA_SHOW_FAILURE, 0, 0);
1644
+ }
1645
+ else
1646
+ {
1647
+ // Okay, we're ready for packages now.
1648
+ pThis->SetState(WIXSTDBA_STATE_INITIALIZED, hr);
1649
+ ::PostMessageW(pThis->m_hWnd, BOOTSTRAPPER_ACTION_HELP == pThis->m_command.action ? WM_WIXSTDBA_SHOW_HELP : WM_WIXSTDBA_DETECT_PACKAGES, 0, 0);
1650
+ }
1651
+
1652
+ // message pump
1653
+ while (0 != (fRet = ::GetMessageW(&msg, NULL, 0, 0)))
1654
+ {
1655
+ if (-1 == fRet)
1656
+ {
1657
+ hr = E_UNEXPECTED;
1658
+ BalExitOnFailure(hr, "Unexpected return value from message pump.");
1659
+ }
1660
+ else if (!ThemeHandleKeyboardMessage(pThis->m_pTheme, msg.hwnd, &msg))
1661
+ {
1662
+ ::TranslateMessage(&msg);
1663
+ ::DispatchMessageW(&msg);
1664
+ }
1665
+ }
1666
+
1667
+ // Succeeded thus far, check to see if anything went wrong while actually
1668
+ // executing changes.
1669
+ if (FAILED(pThis->m_hrFinal))
1670
+ {
1671
+ hr = pThis->m_hrFinal;
1672
+ }
1673
+ else if (pThis->CheckCanceled())
1674
+ {
1675
+ hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
1676
+ }
1677
+
1678
+ LExit:
1679
+ // destroy main window
1680
+ pThis->DestroyMainWindow();
1681
+
1682
+ // initiate engine shutdown
1683
+ DWORD dwQuit = HRESULT_CODE(hr);
1684
+ if (BOOTSTRAPPER_APPLY_RESTART_INITIATED == pThis->m_restartResult)
1685
+ {
1686
+ dwQuit = ERROR_SUCCESS_REBOOT_INITIATED;
1687
+ }
1688
+ else if (BOOTSTRAPPER_APPLY_RESTART_REQUIRED == pThis->m_restartResult)
1689
+ {
1690
+ dwQuit = ERROR_SUCCESS_REBOOT_REQUIRED;
1691
+ }
1692
+ pThis->m_pEngine->Quit(dwQuit);
1693
+
1694
+ ReleaseTheme(pThis->m_pTheme);
1695
+ ThemeUninitialize();
1696
+
1697
+ // uninitialize COM
1698
+ if (fComInitialized)
1699
+ {
1700
+ ::CoUninitialize();
1701
+ }
1702
+
1703
+ return hr;
1704
+ }
1705
+
1706
+
1707
+ //
1708
+ // InitializeData - initializes all the package and prerequisite information.
1709
+ //
1710
+ HRESULT InitializeData()
1711
+ {
1712
+ HRESULT hr = S_OK;
1713
+ LPWSTR sczModulePath = NULL;
1714
+ IXMLDOMDocument *pixdManifest = NULL;
1715
+
1716
+ hr = BalManifestLoad(m_hModule, &pixdManifest);
1717
+ BalExitOnFailure(hr, "Failed to load bootstrapper application manifest.");
1718
+
1719
+ hr = ParseOverridableVariablesFromXml(pixdManifest);
1720
+ BalExitOnFailure(hr, "Failed to read overridable variables.");
1721
+
1722
+ hr = ProcessCommandLine(&m_sczLanguage);
1723
+ ExitOnFailure(hr, "Unknown commandline parameters.");
1724
+
1725
+ hr = PathRelativeToModule(&sczModulePath, NULL, m_hModule);
1726
+ BalExitOnFailure(hr, "Failed to get module path.");
1727
+
1728
+ hr = LoadLocalization(sczModulePath, m_sczLanguage);
1729
+ ExitOnFailure(hr, "Failed to load localization.");
1730
+
1731
+ hr = LoadTheme(sczModulePath, m_sczLanguage);
1732
+ ExitOnFailure(hr, "Failed to load theme.");
1733
+
1734
+ hr = BalInfoParseFromXml(&m_Bundle, pixdManifest);
1735
+ BalExitOnFailure(hr, "Failed to load bundle information.");
1736
+
1737
+ hr = BalConditionsParseFromXml(&m_Conditions, pixdManifest, m_pWixLoc);
1738
+ BalExitOnFailure(hr, "Failed to load conditions from XML.");
1739
+
1740
+ hr = LoadBAFunctions(pixdManifest);
1741
+ BalExitOnFailure(hr, "Failed to load bootstrapper functions.");
1742
+
1743
+ GetBundleFileVersion();
1744
+ // don't fail if we couldn't get the version info; best-effort only
1745
+
1746
+ if (m_fPrereq)
1747
+ {
1748
+ hr = ParsePrerequisiteInformationFromXml(pixdManifest);
1749
+ BalExitOnFailure(hr, "Failed to read prerequisite information.");
1750
+ }
1751
+ else
1752
+ {
1753
+ hr = ParseBootstrapperApplicationDataFromXml(pixdManifest);
1754
+ BalExitOnFailure(hr, "Failed to read bootstrapper application data.");
1755
+ }
1756
+
1757
+ LExit:
1758
+ ReleaseObject(pixdManifest);
1759
+ ReleaseStr(sczModulePath);
1760
+
1761
+ return hr;
1762
+ }
1763
+
1764
+
1765
+ //
1766
+ // ProcessCommandLine - process the provided command line arguments.
1767
+ //
1768
+ HRESULT ProcessCommandLine(
1769
+ __inout LPWSTR* psczLanguage
1770
+ )
1771
+ {
1772
+ HRESULT hr = S_OK;
1773
+ int argc = 0;
1774
+ LPWSTR* argv = NULL;
1775
+ LPWSTR sczVariableName = NULL;
1776
+ LPWSTR sczVariableValue = NULL;
1777
+
1778
+ if (m_command.wzCommandLine && *m_command.wzCommandLine)
1779
+ {
1780
+ hr = AppParseCommandLine(m_command.wzCommandLine, &argc, &argv);
1781
+ ExitOnFailure(hr, "Failed to parse command line.");
1782
+
1783
+ for (int i = 0; i < argc; ++i)
1784
+ {
1785
+ if (argv[i][0] == L'-' || argv[i][0] == L'/')
1786
+ {
1787
+ if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"lang", -1))
1788
+ {
1789
+ if (i + 1 >= argc)
1790
+ {
1791
+ hr = E_INVALIDARG;
1792
+ BalExitOnFailure(hr, "Must specify a language.");
1793
+ }
1794
+
1795
+ ++i;
1796
+
1797
+ hr = StrAllocString(psczLanguage, &argv[i][0], 0);
1798
+ BalExitOnFailure(hr, "Failed to copy language.");
1799
+ }
1800
+ }
1801
+ else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"cache", -1))
1802
+ {
1803
+ m_plannedAction = BOOTSTRAPPER_ACTION_CACHE;
1804
+ }
1805
+ else if (m_sdOverridableVariables)
1806
+ {
1807
+ const wchar_t* pwc = wcschr(argv[i], L'=');
1808
+ if (pwc)
1809
+ {
1810
+ hr = StrAllocString(&sczVariableName, argv[i], pwc - argv[i]);
1811
+ BalExitOnFailure(hr, "Failed to copy variable name.");
1812
+
1813
+ hr = DictKeyExists(m_sdOverridableVariables, sczVariableName);
1814
+ if (E_NOTFOUND == hr)
1815
+ {
1816
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Ignoring attempt to set non-overridable variable: '%ls'.", sczVariableName);
1817
+ hr = S_OK;
1818
+ continue;
1819
+ }
1820
+ ExitOnFailure(hr, "Failed to check the dictionary of overridable variables.");
1821
+
1822
+ hr = StrAllocString(&sczVariableValue, ++pwc, 0);
1823
+ BalExitOnFailure(hr, "Failed to copy variable value.");
1824
+
1825
+ hr = m_pEngine->SetVariableString(sczVariableName, sczVariableValue);
1826
+ BalExitOnFailure(hr, "Failed to set variable.");
1827
+ }
1828
+ else
1829
+ {
1830
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Ignoring unknown argument: %ls", argv[i]);
1831
+ }
1832
+ }
1833
+ }
1834
+ }
1835
+
1836
+ LExit:
1837
+ if (argv)
1838
+ {
1839
+ AppFreeCommandLineArgs(argv);
1840
+ }
1841
+
1842
+ ReleaseStr(sczVariableName);
1843
+ ReleaseStr(sczVariableValue);
1844
+
1845
+ return hr;
1846
+ }
1847
+
1848
+ HRESULT LoadLocalization(
1849
+ __in_z LPCWSTR wzModulePath,
1850
+ __in_z_opt LPCWSTR wzLanguage
1851
+ )
1852
+ {
1853
+ HRESULT hr = S_OK;
1854
+ LPWSTR sczLocPath = NULL;
1855
+ LPWSTR sczFormatted = NULL;
1856
+ LPCWSTR wzLocFileName = m_fPrereq ? L"mbapreq.wxl" : L"thm.wxl";
1857
+
1858
+ // Find and load .wxl file.
1859
+ hr = LocProbeForFile(wzModulePath, wzLocFileName, wzLanguage, &sczLocPath);
1860
+ BalExitOnFailure(hr, "Failed to probe for loc file: %ls in path: %ls", wzLocFileName, wzModulePath);
1861
+
1862
+ hr = LocLoadFromFile(sczLocPath, &m_pWixLoc);
1863
+ BalExitOnFailure(hr, "Failed to load loc file from path: %ls", sczLocPath);
1864
+
1865
+ // Set WixStdBALanguageId to .wxl language id.
1866
+ if (WIX_LOCALIZATION_LANGUAGE_NOT_SET != m_pWixLoc->dwLangId)
1867
+ {
1868
+ ::SetThreadLocale(m_pWixLoc->dwLangId);
1869
+
1870
+ hr = m_pEngine->SetVariableNumeric(WIXSTDBA_VARIABLE_LANGUAGE_ID, m_pWixLoc->dwLangId);
1871
+ BalExitOnFailure(hr, "Failed to set WixStdBALanguageId variable.");
1872
+ }
1873
+
1874
+ // Load ConfirmCancelMessage.
1875
+ hr = StrAllocString(&m_sczConfirmCloseMessage, L"#(loc.ConfirmCancelMessage)", 0);
1876
+ ExitOnFailure(hr, "Failed to initialize confirm message loc identifier.");
1877
+
1878
+ hr = LocLocalizeString(m_pWixLoc, &m_sczConfirmCloseMessage);
1879
+ BalExitOnFailure(hr, "Failed to localize confirm close message: %ls", m_sczConfirmCloseMessage);
1880
+
1881
+ hr = BalFormatString(m_sczConfirmCloseMessage, &sczFormatted);
1882
+ if (SUCCEEDED(hr))
1883
+ {
1884
+ ReleaseStr(m_sczConfirmCloseMessage);
1885
+ m_sczConfirmCloseMessage = sczFormatted;
1886
+ sczFormatted = NULL;
1887
+ }
1888
+
1889
+ LExit:
1890
+ ReleaseStr(sczFormatted);
1891
+ ReleaseStr(sczLocPath);
1892
+
1893
+ return hr;
1894
+ }
1895
+
1896
+
1897
+ HRESULT LoadTheme(
1898
+ __in_z LPCWSTR wzModulePath,
1899
+ __in_z_opt LPCWSTR wzLanguage
1900
+ )
1901
+ {
1902
+ HRESULT hr = S_OK;
1903
+ LPWSTR sczThemePath = NULL;
1904
+ LPCWSTR wzThemeFileName = m_fPrereq ? L"mbapreq.thm" : L"thm.xml";
1905
+
1906
+ hr = LocProbeForFile(wzModulePath, wzThemeFileName, wzLanguage, &sczThemePath);
1907
+ BalExitOnFailure(hr, "Failed to probe for theme file: %ls in path: %ls", wzThemeFileName, wzModulePath);
1908
+
1909
+ hr = ThemeLoadFromFile(sczThemePath, &m_pTheme);
1910
+ BalExitOnFailure(hr, "Failed to load theme from path: %ls", sczThemePath);
1911
+
1912
+ hr = ThemeRegisterVariableCallbacks(m_pTheme, EvaluateVariableConditionCallback, FormatVariableStringCallback, GetVariableNumericCallback, SetVariableNumericCallback, GetVariableStringCallback, SetVariableStringCallback, NULL);
1913
+ BalExitOnFailure(hr, "Failed to register variable theme callbacks.");
1914
+
1915
+ hr = ThemeLocalize(m_pTheme, m_pWixLoc);
1916
+ BalExitOnFailure(hr, "Failed to localize theme: %ls", sczThemePath);
1917
+
1918
+ LExit:
1919
+ ReleaseStr(sczThemePath);
1920
+
1921
+ return hr;
1922
+ }
1923
+
1924
+
1925
+ HRESULT ParseOverridableVariablesFromXml(
1926
+ __in IXMLDOMDocument* pixdManifest
1927
+ )
1928
+ {
1929
+ HRESULT hr = S_OK;
1930
+ IXMLDOMNode* pNode = NULL;
1931
+ IXMLDOMNodeList* pNodes = NULL;
1932
+ DWORD cNodes = 0;
1933
+ LPWSTR scz = NULL;
1934
+
1935
+ // Get the list of variables users can override on the command line.
1936
+ hr = XmlSelectNodes(pixdManifest, L"/BootstrapperApplicationData/WixStdbaOverridableVariable", &pNodes);
1937
+ if (S_FALSE == hr)
1938
+ {
1939
+ ExitFunction1(hr = S_OK);
1940
+ }
1941
+ ExitOnFailure(hr, "Failed to select overridable variable nodes.");
1942
+
1943
+ hr = pNodes->get_length((long*)&cNodes);
1944
+ ExitOnFailure(hr, "Failed to get overridable variable node count.");
1945
+
1946
+ if (cNodes)
1947
+ {
1948
+ hr = DictCreateStringList(&m_sdOverridableVariables, 32, DICT_FLAG_NONE);
1949
+ ExitOnFailure(hr, "Failed to create the string dictionary.");
1950
+
1951
+ for (DWORD i = 0; i < cNodes; ++i)
1952
+ {
1953
+ hr = XmlNextElement(pNodes, &pNode, NULL);
1954
+ ExitOnFailure(hr, "Failed to get next node.");
1955
+
1956
+ // @Name
1957
+ hr = XmlGetAttributeEx(pNode, L"Name", &scz);
1958
+ ExitOnFailure(hr, "Failed to get @Name.");
1959
+
1960
+ hr = DictAddKey(m_sdOverridableVariables, scz);
1961
+ ExitOnFailure(hr, "Failed to add \"%ls\" to the string dictionary.", scz);
1962
+
1963
+ // prepare next iteration
1964
+ ReleaseNullObject(pNode);
1965
+ }
1966
+ }
1967
+
1968
+ LExit:
1969
+ ReleaseObject(pNode);
1970
+ ReleaseObject(pNodes);
1971
+ ReleaseStr(scz);
1972
+ return hr;
1973
+ }
1974
+
1975
+
1976
+ HRESULT ParsePrerequisiteInformationFromXml(
1977
+ __in IXMLDOMDocument* pixdManifest
1978
+ )
1979
+ {
1980
+ HRESULT hr = S_OK;
1981
+ IXMLDOMNode* pNode = NULL;
1982
+ IXMLDOMNodeList* pNodes = NULL;
1983
+ DWORD cNodes = 0;
1984
+ LPWSTR scz = NULL;
1985
+ WIXSTDBA_PREREQ_PACKAGE* pPrereqPackage = NULL;
1986
+ BAL_INFO_PACKAGE* pPackage = NULL;
1987
+
1988
+ hr = XmlSelectNodes(pixdManifest, L"/BootstrapperApplicationData/WixMbaPrereqInformation", &pNodes);
1989
+ if (S_FALSE == hr)
1990
+ {
1991
+ hr = E_INVALIDARG;
1992
+ BalExitOnFailure(hr, "BootstrapperApplication.xml manifest is missing prerequisite information.");
1993
+ }
1994
+ BalExitOnFailure(hr, "Failed to select prerequisite information nodes.");
1995
+
1996
+ hr = pNodes->get_length((long*)&cNodes);
1997
+ BalExitOnFailure(hr, "Failed to get prerequisite information node count.");
1998
+
1999
+ m_cPrereqPackages = cNodes;
2000
+ m_rgPrereqPackages = static_cast<WIXSTDBA_PREREQ_PACKAGE*>(MemAlloc(sizeof(WIXSTDBA_PREREQ_PACKAGE) * m_cPrereqPackages, TRUE));
2001
+
2002
+ hr = DictCreateWithEmbeddedKey(&m_shPrereqSupportPackages, m_cPrereqPackages, reinterpret_cast<void **>(&m_rgPrereqPackages), offsetof(WIXSTDBA_PREREQ_PACKAGE, sczPackageId), DICT_FLAG_NONE);
2003
+ BalExitOnFailure(hr, "Failed to create the prerequisite package dictionary.");
2004
+
2005
+ for (DWORD i = 0; i < cNodes; ++i)
2006
+ {
2007
+ hr = XmlNextElement(pNodes, &pNode, NULL);
2008
+ BalExitOnFailure(hr, "Failed to get next node.");
2009
+
2010
+ hr = XmlGetAttributeEx(pNode, L"PackageId", &scz);
2011
+ BalExitOnFailure(hr, "Failed to get @PackageId.");
2012
+
2013
+ hr = DictGetValue(m_shPrereqSupportPackages, scz, reinterpret_cast<void **>(&pPrereqPackage));
2014
+ if (SUCCEEDED(hr))
2015
+ {
2016
+ hr = HRESULT_FROM_WIN32(ERROR_INVALID_DATA);
2017
+ BalExitOnFailure(hr, "Duplicate prerequisite information: %ls", scz);
2018
+ }
2019
+ else if (E_NOTFOUND != hr)
2020
+ {
2021
+ BalExitOnFailure(hr, "Failed to check if \"%ls\" was in the prerequisite package dictionary.", scz);
2022
+ }
2023
+
2024
+ hr = BalInfoFindPackageById(&m_Bundle.packages, scz, &pPackage);
2025
+ BalExitOnFailure(hr, "Failed to get info about \"%ls\" from BootstrapperApplicationData.", scz);
2026
+
2027
+ pPrereqPackage = &m_rgPrereqPackages[i];
2028
+ pPrereqPackage->sczPackageId = pPackage->sczId;
2029
+ hr = DictAddValue(m_shPrereqSupportPackages, pPrereqPackage);
2030
+ BalExitOnFailure(hr, "Failed to add \"%ls\" to the prerequisite package dictionary.", pPrereqPackage->sczPackageId);
2031
+
2032
+ hr = XmlGetAttributeEx(pNode, L"LicenseFile", &scz);
2033
+ if (E_NOTFOUND != hr)
2034
+ {
2035
+ BalExitOnFailure(hr, "Failed to get @LicenseFile.");
2036
+
2037
+ if (m_sczLicenseFile)
2038
+ {
2039
+ hr = HRESULT_FROM_WIN32(ERROR_INVALID_DATA);
2040
+ BalExitOnFailure(hr, "More than one license file specified in prerequisite info.");
2041
+ }
2042
+
2043
+ m_sczLicenseFile = scz;
2044
+ scz = NULL;
2045
+ }
2046
+
2047
+ hr = XmlGetAttributeEx(pNode, L"LicenseUrl", &scz);
2048
+ if (E_NOTFOUND != hr)
2049
+ {
2050
+ BalExitOnFailure(hr, "Failed to get @LicenseUrl.");
2051
+
2052
+ if (m_sczLicenseUrl)
2053
+ {
2054
+ hr = HRESULT_FROM_WIN32(ERROR_INVALID_DATA);
2055
+ BalExitOnFailure(hr, "More than one license URL specified in prerequisite info.");
2056
+ }
2057
+
2058
+ m_sczLicenseUrl = scz;
2059
+ scz = NULL;
2060
+ }
2061
+
2062
+ // Prepare next iteration.
2063
+ ReleaseNullObject(pNode);
2064
+ }
2065
+
2066
+ LExit:
2067
+ ReleaseObject(pNode);
2068
+ ReleaseObject(pNodes);
2069
+ ReleaseStr(scz);
2070
+ return hr;
2071
+ }
2072
+
2073
+
2074
+ HRESULT ParseBootstrapperApplicationDataFromXml(
2075
+ __in IXMLDOMDocument* pixdManifest
2076
+ )
2077
+ {
2078
+ HRESULT hr = S_OK;
2079
+ IXMLDOMNode* pNode = NULL;
2080
+ DWORD dwBool = 0;
2081
+
2082
+ hr = XmlSelectSingleNode(pixdManifest, L"/BootstrapperApplicationData/WixStdbaInformation", &pNode);
2083
+ if (S_FALSE == hr)
2084
+ {
2085
+ hr = E_INVALIDARG;
2086
+ }
2087
+ BalExitOnFailure(hr, "BootstrapperApplication.xml manifest is missing wixstdba information.");
2088
+
2089
+ hr = XmlGetAttributeEx(pNode, L"LicenseFile", &m_sczLicenseFile);
2090
+ if (E_NOTFOUND == hr)
2091
+ {
2092
+ hr = S_OK;
2093
+ }
2094
+ BalExitOnFailure(hr, "Failed to get license file.");
2095
+
2096
+ hr = XmlGetAttributeEx(pNode, L"LicenseUrl", &m_sczLicenseUrl);
2097
+ if (E_NOTFOUND == hr)
2098
+ {
2099
+ hr = S_OK;
2100
+ }
2101
+ BalExitOnFailure(hr, "Failed to get license URL.");
2102
+
2103
+ ReleaseObject(pNode);
2104
+
2105
+ hr = XmlSelectSingleNode(pixdManifest, L"/BootstrapperApplicationData/WixStdbaOptions", &pNode);
2106
+ if (S_FALSE == hr)
2107
+ {
2108
+ ExitFunction1(hr = S_OK);
2109
+ }
2110
+ BalExitOnFailure(hr, "Failed to read wixstdba options from BootstrapperApplication.xml manifest.");
2111
+
2112
+ hr = XmlGetAttributeNumber(pNode, L"SuppressOptionsUI", &dwBool);
2113
+ if (S_FALSE == hr)
2114
+ {
2115
+ hr = S_OK;
2116
+ }
2117
+ else if (SUCCEEDED(hr) && dwBool)
2118
+ {
2119
+ hr = BalSetNumericVariable(WIXSTDBA_VARIABLE_SUPPRESS_OPTIONS_UI, 1);
2120
+ BalExitOnFailure(hr, "Failed to set '%ls' variable.", WIXSTDBA_VARIABLE_SUPPRESS_OPTIONS_UI);
2121
+ }
2122
+ BalExitOnFailure(hr, "Failed to get SuppressOptionsUI value.");
2123
+
2124
+ dwBool = 0;
2125
+ hr = XmlGetAttributeNumber(pNode, L"SuppressDowngradeFailure", &dwBool);
2126
+ if (S_FALSE == hr)
2127
+ {
2128
+ hr = S_OK;
2129
+ }
2130
+ else if (SUCCEEDED(hr))
2131
+ {
2132
+ m_fSuppressDowngradeFailure = 0 < dwBool;
2133
+ }
2134
+ BalExitOnFailure(hr, "Failed to get SuppressDowngradeFailure value.");
2135
+
2136
+ dwBool = 0;
2137
+ hr = XmlGetAttributeNumber(pNode, L"SuppressRepair", &dwBool);
2138
+ if (S_FALSE == hr)
2139
+ {
2140
+ hr = S_OK;
2141
+ }
2142
+ else if (SUCCEEDED(hr))
2143
+ {
2144
+ m_fSuppressRepair = 0 < dwBool;
2145
+ }
2146
+ BalExitOnFailure(hr, "Failed to get SuppressRepair value.");
2147
+
2148
+ hr = XmlGetAttributeNumber(pNode, L"ShowVersion", &dwBool);
2149
+ if (S_FALSE == hr)
2150
+ {
2151
+ hr = S_OK;
2152
+ }
2153
+ else if (SUCCEEDED(hr) && dwBool)
2154
+ {
2155
+ hr = BalSetNumericVariable(WIXSTDBA_VARIABLE_SHOW_VERSION, 1);
2156
+ BalExitOnFailure(hr, "Failed to set '%ls' variable.", WIXSTDBA_VARIABLE_SHOW_VERSION);
2157
+ }
2158
+ BalExitOnFailure(hr, "Failed to get ShowVersion value.");
2159
+
2160
+ hr = XmlGetAttributeNumber(pNode, L"SupportCacheOnly", &dwBool);
2161
+ if (S_FALSE == hr)
2162
+ {
2163
+ hr = S_OK;
2164
+ }
2165
+ else if (SUCCEEDED(hr))
2166
+ {
2167
+ m_fSupportCacheOnly = 0 < dwBool;
2168
+ }
2169
+ BalExitOnFailure(hr, "Failed to get SupportCacheOnly value.");
2170
+
2171
+ LExit:
2172
+ ReleaseObject(pNode);
2173
+ return hr;
2174
+ }
2175
+
2176
+ HRESULT GetPrereqPackage(
2177
+ __in_z LPCWSTR wzPackageId,
2178
+ __out WIXSTDBA_PREREQ_PACKAGE** ppPrereqPackage,
2179
+ __out BAL_INFO_PACKAGE** ppPackage
2180
+ )
2181
+ {
2182
+ HRESULT hr = E_NOTFOUND;
2183
+ WIXSTDBA_PREREQ_PACKAGE* pPrereqPackage = NULL;
2184
+ BAL_INFO_PACKAGE* pPackage = NULL;
2185
+
2186
+ Assert(wzPackageId && *wzPackageId);
2187
+ Assert(ppPackage);
2188
+ Assert(ppPrereqPackage);
2189
+
2190
+ if (m_shPrereqSupportPackages)
2191
+ {
2192
+ hr = DictGetValue(m_shPrereqSupportPackages, wzPackageId, reinterpret_cast<void **>(&pPrereqPackage));
2193
+ if (E_NOTFOUND != hr)
2194
+ {
2195
+ ExitOnFailure(hr, "Failed to check the dictionary of prerequisite packages.");
2196
+
2197
+ // Ignore error.
2198
+ BalInfoFindPackageById(&m_Bundle.packages, wzPackageId, &pPackage);
2199
+ }
2200
+ }
2201
+
2202
+ if (pPrereqPackage)
2203
+ {
2204
+ *ppPrereqPackage = pPrereqPackage;
2205
+ *ppPackage = pPackage;
2206
+ }
2207
+ LExit:
2208
+ return hr;
2209
+ }
2210
+
2211
+
2212
+ //
2213
+ // Get the file version of the bootstrapper and record in bootstrapper log file
2214
+ //
2215
+ HRESULT GetBundleFileVersion()
2216
+ {
2217
+ HRESULT hr = S_OK;
2218
+ ULARGE_INTEGER uliVersion = { };
2219
+ LPWSTR sczCurrentPath = NULL;
2220
+
2221
+ hr = PathForCurrentProcess(&sczCurrentPath, NULL);
2222
+ BalExitOnFailure(hr, "Failed to get bundle path.");
2223
+
2224
+ hr = FileVersion(sczCurrentPath, &uliVersion.HighPart, &uliVersion.LowPart);
2225
+ BalExitOnFailure(hr, "Failed to get bundle file version.");
2226
+
2227
+ hr = m_pEngine->SetVariableVersion(WIXSTDBA_VARIABLE_BUNDLE_FILE_VERSION, uliVersion.QuadPart);
2228
+ BalExitOnFailure(hr, "Failed to set WixBundleFileVersion variable.");
2229
+
2230
+ LExit:
2231
+ ReleaseStr(sczCurrentPath);
2232
+
2233
+ return hr;
2234
+ }
2235
+
2236
+
2237
+ //
2238
+ // CreateMainWindow - creates the main install window.
2239
+ //
2240
+ HRESULT CreateMainWindow()
2241
+ {
2242
+ HRESULT hr = S_OK;
2243
+ HICON hIcon = reinterpret_cast<HICON>(m_pTheme->hIcon);
2244
+ WNDCLASSW wc = { };
2245
+ DWORD dwWindowStyle = 0;
2246
+ int x = CW_USEDEFAULT;
2247
+ int y = CW_USEDEFAULT;
2248
+ POINT ptCursor = { };
2249
+ HMONITOR hMonitor = NULL;
2250
+ MONITORINFO mi = { };
2251
+
2252
+ // If the theme did not provide an icon, try using the icon from the bundle engine.
2253
+ if (!hIcon)
2254
+ {
2255
+ HMODULE hBootstrapperEngine = ::GetModuleHandleW(NULL);
2256
+ if (hBootstrapperEngine)
2257
+ {
2258
+ hIcon = ::LoadIconW(hBootstrapperEngine, MAKEINTRESOURCEW(1));
2259
+ }
2260
+ }
2261
+
2262
+ // Register the window class and create the window.
2263
+ wc.lpfnWndProc = CWixStandardBootstrapperApplication::WndProc;
2264
+ wc.hInstance = m_hModule;
2265
+ wc.hIcon = hIcon;
2266
+ wc.hCursor = ::LoadCursorW(NULL, (LPCWSTR)IDC_ARROW);
2267
+ wc.hbrBackground = m_pTheme->rgFonts[m_pTheme->dwFontId].hBackground;
2268
+ wc.lpszMenuName = NULL;
2269
+ wc.lpszClassName = WIXSTDBA_WINDOW_CLASS;
2270
+ if (!::RegisterClassW(&wc))
2271
+ {
2272
+ ExitWithLastError(hr, "Failed to register window.");
2273
+ }
2274
+
2275
+ m_fRegistered = TRUE;
2276
+
2277
+ // Calculate the window style based on the theme style and command display value.
2278
+ dwWindowStyle = m_pTheme->dwStyle;
2279
+ if (BOOTSTRAPPER_DISPLAY_NONE >= m_command.display)
2280
+ {
2281
+ dwWindowStyle &= ~WS_VISIBLE;
2282
+ }
2283
+
2284
+ // Don't show the window if there is a splash screen (it will be made visible when the splash screen is hidden)
2285
+ if (::IsWindow(m_command.hwndSplashScreen))
2286
+ {
2287
+ dwWindowStyle &= ~WS_VISIBLE;
2288
+ }
2289
+
2290
+ // Center the window on the monitor with the mouse.
2291
+ if (::GetCursorPos(&ptCursor))
2292
+ {
2293
+ hMonitor = ::MonitorFromPoint(ptCursor, MONITOR_DEFAULTTONEAREST);
2294
+ if (hMonitor)
2295
+ {
2296
+ mi.cbSize = sizeof(mi);
2297
+ if (::GetMonitorInfoW(hMonitor, &mi))
2298
+ {
2299
+ x = mi.rcWork.left + (mi.rcWork.right - mi.rcWork.left - m_pTheme->nWidth) / 2;
2300
+ y = mi.rcWork.top + (mi.rcWork.bottom - mi.rcWork.top - m_pTheme->nHeight) / 2;
2301
+ }
2302
+ }
2303
+ }
2304
+
2305
+ m_hWnd = ::CreateWindowExW(0, wc.lpszClassName, m_pTheme->sczCaption, dwWindowStyle, x, y, m_pTheme->nWidth, m_pTheme->nHeight, HWND_DESKTOP, NULL, m_hModule, this);
2306
+ ExitOnNullWithLastError(m_hWnd, hr, "Failed to create window.");
2307
+
2308
+ hr = S_OK;
2309
+
2310
+ LExit:
2311
+ return hr;
2312
+ }
2313
+
2314
+
2315
+ //
2316
+ // InitializeTaskbarButton - initializes taskbar button for progress.
2317
+ //
2318
+ void InitializeTaskbarButton()
2319
+ {
2320
+ HRESULT hr = S_OK;
2321
+
2322
+ hr = ::CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_ALL, __uuidof(ITaskbarList3), reinterpret_cast<LPVOID*>(&m_pTaskbarList));
2323
+ if (REGDB_E_CLASSNOTREG == hr) // not supported before Windows 7
2324
+ {
2325
+ ExitFunction1(hr = S_OK);
2326
+ }
2327
+ BalExitOnFailure(hr, "Failed to create ITaskbarList3. Continuing.");
2328
+
2329
+ m_uTaskbarButtonCreatedMessage = ::RegisterWindowMessageW(L"TaskbarButtonCreated");
2330
+ BalExitOnNullWithLastError(m_uTaskbarButtonCreatedMessage, hr, "Failed to get TaskbarButtonCreated message. Continuing.");
2331
+
2332
+ LExit:
2333
+ return;
2334
+ }
2335
+
2336
+ //
2337
+ // DestroyMainWindow - clean up all the window registration.
2338
+ //
2339
+ void DestroyMainWindow()
2340
+ {
2341
+ if (::IsWindow(m_hWnd))
2342
+ {
2343
+ ::DestroyWindow(m_hWnd);
2344
+ m_hWnd = NULL;
2345
+ m_fTaskbarButtonOK = FALSE;
2346
+ }
2347
+
2348
+ if (m_fRegistered)
2349
+ {
2350
+ ::UnregisterClassW(WIXSTDBA_WINDOW_CLASS, m_hModule);
2351
+ m_fRegistered = FALSE;
2352
+ }
2353
+ }
2354
+
2355
+ static LRESULT CallDefaultWndProc(
2356
+ __in CWixStandardBootstrapperApplication* pBA,
2357
+ __in HWND hWnd,
2358
+ __in UINT uMsg,
2359
+ __in WPARAM wParam,
2360
+ __in LPARAM lParam
2361
+ )
2362
+ {
2363
+ LRESULT lres = NULL;
2364
+ THEME* pTheme = NULL;
2365
+ HRESULT hr = S_OK;
2366
+ BA_FUNCTIONS_WNDPROC_ARGS wndProcArgs = { };
2367
+ BA_FUNCTIONS_WNDPROC_RESULTS wndProcResults = { };
2368
+
2369
+ if (pBA)
2370
+ {
2371
+ pTheme = pBA->m_pTheme;
2372
+
2373
+ if (pBA->m_pfnBAFunctionsProc)
2374
+ {
2375
+ wndProcArgs.cbSize = sizeof(wndProcArgs);
2376
+ wndProcArgs.pTheme = pTheme;
2377
+ wndProcArgs.hWnd = hWnd;
2378
+ wndProcArgs.uMsg = uMsg;
2379
+ wndProcArgs.wParam = wParam;
2380
+ wndProcArgs.lParam = lParam;
2381
+ wndProcResults.cbSize = sizeof(wndProcResults);
2382
+
2383
+ hr = pBA->m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_WNDPROC, &wndProcArgs, &wndProcResults, pBA->m_pvBAFunctionsProcContext);
2384
+ if (E_NOTIMPL != hr)
2385
+ {
2386
+ lres = wndProcResults.lres;
2387
+ ExitFunction();
2388
+ }
2389
+ }
2390
+ }
2391
+
2392
+ lres = ThemeDefWindowProc(pTheme, hWnd, uMsg, wParam, lParam);
2393
+
2394
+ LExit:
2395
+ return lres;
2396
+ }
2397
+
2398
+ //
2399
+ // WndProc - standard windows message handler.
2400
+ //
2401
+ static LRESULT CALLBACK WndProc(
2402
+ __in HWND hWnd,
2403
+ __in UINT uMsg,
2404
+ __in WPARAM wParam,
2405
+ __in LPARAM lParam
2406
+ )
2407
+ {
2408
+#pragma warning(suppress:4312)
2409
+ CWixStandardBootstrapperApplication* pBA = reinterpret_cast<CWixStandardBootstrapperApplication*>(::GetWindowLongPtrW(hWnd, GWLP_USERDATA));
2410
+ BOOL fCancel = FALSE;
2411
+
2412
+ switch (uMsg)
2413
+ {
2414
+ case WM_NCCREATE:
2415
+ {
2416
+ LPCREATESTRUCT lpcs = reinterpret_cast<LPCREATESTRUCT>(lParam);
2417
+ pBA = reinterpret_cast<CWixStandardBootstrapperApplication*>(lpcs->lpCreateParams);
2418
+#pragma warning(suppress:4244)
2419
+ ::SetWindowLongPtrW(hWnd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(pBA));
2420
+ }
2421
+ break;
2422
+
2423
+ case WM_NCDESTROY:
2424
+ {
2425
+ LRESULT lres = CallDefaultWndProc(pBA, hWnd, uMsg, wParam, lParam);
2426
+ ::SetWindowLongPtrW(hWnd, GWLP_USERDATA, 0);
2427
+ ::PostQuitMessage(0);
2428
+ return lres;
2429
+ }
2430
+
2431
+ case WM_CREATE:
2432
+ if (!pBA->OnCreate(hWnd))
2433
+ {
2434
+ return -1;
2435
+ }
2436
+ break;
2437
+
2438
+ case WM_QUERYENDSESSION:
2439
+ fCancel = true;
2440
+ pBA->OnSystemShutdown(static_cast<DWORD>(lParam), &fCancel);
2441
+ return !fCancel;
2442
+
2443
+ case WM_CLOSE:
2444
+ // If the user chose not to close, do *not* let the default window proc handle the message.
2445
+ if (!pBA->OnClose())
2446
+ {
2447
+ return 0;
2448
+ }
2449
+ break;
2450
+
2451
+ case WM_WIXSTDBA_SHOW_HELP:
2452
+ pBA->OnShowHelp();
2453
+ return 0;
2454
+
2455
+ case WM_WIXSTDBA_DETECT_PACKAGES:
2456
+ pBA->OnDetect();
2457
+ return 0;
2458
+
2459
+ case WM_WIXSTDBA_PLAN_PACKAGES:
2460
+ pBA->OnPlan(static_cast<BOOTSTRAPPER_ACTION>(lParam));
2461
+ return 0;
2462
+
2463
+ case WM_WIXSTDBA_APPLY_PACKAGES:
2464
+ pBA->OnApply();
2465
+ return 0;
2466
+
2467
+ case WM_WIXSTDBA_CHANGE_STATE:
2468
+ pBA->OnChangeState(static_cast<WIXSTDBA_STATE>(lParam));
2469
+ return 0;
2470
+
2471
+ case WM_WIXSTDBA_SHOW_FAILURE:
2472
+ pBA->OnShowFailure();
2473
+ return 0;
2474
+
2475
+ case WM_COMMAND:
2476
+ switch (HIWORD(wParam))
2477
+ {
2478
+ case BN_CLICKED:
2479
+ switch (LOWORD(wParam))
2480
+ {
2481
+ case WIXSTDBA_CONTROL_EULA_ACCEPT_CHECKBOX:
2482
+ pBA->OnClickAcceptCheckbox();
2483
+ return 0;
2484
+
2485
+ case WIXSTDBA_CONTROL_INSTALL_BUTTON:
2486
+ pBA->OnClickInstallButton();
2487
+ return 0;
2488
+
2489
+ case WIXSTDBA_CONTROL_REPAIR_BUTTON:
2490
+ pBA->OnClickRepairButton();
2491
+ return 0;
2492
+
2493
+ case WIXSTDBA_CONTROL_UNINSTALL_BUTTON:
2494
+ pBA->OnClickUninstallButton();
2495
+ return 0;
2496
+
2497
+ case WIXSTDBA_CONTROL_LAUNCH_BUTTON:
2498
+ pBA->OnClickLaunchButton();
2499
+ return 0;
2500
+
2501
+ case WIXSTDBA_CONTROL_SUCCESS_RESTART_BUTTON: __fallthrough;
2502
+ case WIXSTDBA_CONTROL_FAILURE_RESTART_BUTTON:
2503
+ pBA->OnClickRestartButton();
2504
+ return 0;
2505
+
2506
+ case WIXSTDBA_CONTROL_PROGRESS_CANCEL_BUTTON:
2507
+ pBA->OnClickCloseButton();
2508
+ return 0;
2509
+ }
2510
+ break;
2511
+ }
2512
+ break;
2513
+
2514
+ case WM_NOTIFY:
2515
+ if (lParam)
2516
+ {
2517
+ LPNMHDR pnmhdr = reinterpret_cast<LPNMHDR>(lParam);
2518
+ switch (pnmhdr->code)
2519
+ {
2520
+ case NM_CLICK: __fallthrough;
2521
+ case NM_RETURN:
2522
+ switch (static_cast<DWORD>(pnmhdr->idFrom))
2523
+ {
2524
+ case WIXSTDBA_CONTROL_EULA_LINK:
2525
+ pBA->OnClickEulaLink();
2526
+ return 1;
2527
+ case WIXSTDBA_CONTROL_FAILURE_LOGFILE_LINK:
2528
+ pBA->OnClickLogFileLink();
2529
+ return 1;
2530
+ }
2531
+ }
2532
+ }
2533
+ break;
2534
+ }
2535
+
2536
+ if (pBA && pBA->m_pTaskbarList && uMsg == pBA->m_uTaskbarButtonCreatedMessage)
2537
+ {
2538
+ pBA->m_fTaskbarButtonOK = TRUE;
2539
+ return 0;
2540
+ }
2541
+
2542
+ return CallDefaultWndProc(pBA, hWnd, uMsg, wParam, lParam);
2543
+ }
2544
+
2545
+
2546
+ //
2547
+ // OnCreate - finishes loading the theme.
2548
+ //
2549
+ BOOL OnCreate(
2550
+ __in HWND hWnd
2551
+ )
2552
+ {
2553
+ HRESULT hr = S_OK;
2554
+ LPWSTR sczLicenseFormatted = NULL;
2555
+ LPWSTR sczLicensePath = NULL;
2556
+ LPWSTR sczLicenseDirectory = NULL;
2557
+ LPWSTR sczLicenseFilename = NULL;
2558
+ BA_FUNCTIONS_ONTHEMELOADED_ARGS themeLoadedArgs = { };
2559
+ BA_FUNCTIONS_ONTHEMELOADED_RESULTS themeLoadedResults = { };
2560
+
2561
+ hr = ThemeLoadControls(m_pTheme, hWnd, vrgInitControls, countof(vrgInitControls));
2562
+ BalExitOnFailure(hr, "Failed to load theme controls.");
2563
+
2564
+ C_ASSERT(COUNT_WIXSTDBA_PAGE == countof(vrgwzPageNames));
2565
+ C_ASSERT(countof(m_rgdwPageIds) == countof(vrgwzPageNames));
2566
+
2567
+ ThemeGetPageIds(m_pTheme, vrgwzPageNames, m_rgdwPageIds, countof(m_rgdwPageIds));
2568
+
2569
+ // Load the RTF EULA control with text if the control exists.
2570
+ if (ThemeControlExists(m_pTheme, WIXSTDBA_CONTROL_EULA_RICHEDIT))
2571
+ {
2572
+ hr = (m_sczLicenseFile && *m_sczLicenseFile) ? S_OK : E_INVALIDDATA;
2573
+ if (SUCCEEDED(hr))
2574
+ {
2575
+ hr = StrAllocString(&sczLicenseFormatted, m_sczLicenseFile, 0);
2576
+ if (SUCCEEDED(hr))
2577
+ {
2578
+ hr = LocLocalizeString(m_pWixLoc, &sczLicenseFormatted);
2579
+ if (SUCCEEDED(hr))
2580
+ {
2581
+ // Assume there is no hidden variables to be formatted
2582
+ // so don't worry about securely freeing it.
2583
+ hr = BalFormatString(sczLicenseFormatted, &sczLicenseFormatted);
2584
+ if (SUCCEEDED(hr))
2585
+ {
2586
+ hr = PathRelativeToModule(&sczLicensePath, sczLicenseFormatted, m_hModule);
2587
+ if (SUCCEEDED(hr))
2588
+ {
2589
+ hr = PathGetDirectory(sczLicensePath, &sczLicenseDirectory);
2590
+ if (SUCCEEDED(hr))
2591
+ {
2592
+ hr = StrAllocString(&sczLicenseFilename, PathFile(sczLicenseFormatted), 0);
2593
+ if (SUCCEEDED(hr))
2594
+ {
2595
+ hr = LocProbeForFile(sczLicenseDirectory, sczLicenseFilename, m_sczLanguage, &sczLicensePath);
2596
+ if (SUCCEEDED(hr))
2597
+ {
2598
+ hr = ThemeLoadRichEditFromFile(m_pTheme, WIXSTDBA_CONTROL_EULA_RICHEDIT, sczLicensePath, m_hModule);
2599
+ }
2600
+ }
2601
+ }
2602
+ }
2603
+ }
2604
+ }
2605
+ }
2606
+ }
2607
+
2608
+ if (FAILED(hr))
2609
+ {
2610
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Failed to load file into license richedit control from path '%ls' manifest value: %ls", sczLicensePath, m_sczLicenseFile);
2611
+ hr = S_OK;
2612
+ }
2613
+ }
2614
+
2615
+ if (m_pfnBAFunctionsProc)
2616
+ {
2617
+ themeLoadedArgs.cbSize = sizeof(themeLoadedArgs);
2618
+ themeLoadedArgs.pTheme = m_pTheme;
2619
+ themeLoadedArgs.pWixLoc = m_pWixLoc;
2620
+ themeLoadedResults.cbSize = sizeof(themeLoadedResults);
2621
+ hr = m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONTHEMELOADED, &themeLoadedArgs, &themeLoadedResults, m_pvBAFunctionsProcContext);
2622
+ BalExitOnFailure(hr, "BAFunctions OnThemeLoaded failed.");
2623
+ }
2624
+
2625
+ LExit:
2626
+ ReleaseStr(sczLicenseFilename);
2627
+ ReleaseStr(sczLicenseDirectory);
2628
+ ReleaseStr(sczLicensePath);
2629
+ ReleaseStr(sczLicenseFormatted);
2630
+
2631
+ return SUCCEEDED(hr);
2632
+ }
2633
+
2634
+
2635
+ //
2636
+ // OnShowFailure - display the failure page.
2637
+ //
2638
+ void OnShowFailure()
2639
+ {
2640
+ SetState(WIXSTDBA_STATE_FAILED, S_OK);
2641
+
2642
+ // If the UI should be visible, display it now and hide the splash screen
2643
+ if (BOOTSTRAPPER_DISPLAY_NONE < m_command.display)
2644
+ {
2645
+ ::ShowWindow(m_pTheme->hwndParent, SW_SHOW);
2646
+ }
2647
+
2648
+ m_pEngine->CloseSplashScreen();
2649
+
2650
+ return;
2651
+ }
2652
+
2653
+
2654
+ //
2655
+ // OnShowHelp - display the help page.
2656
+ //
2657
+ void OnShowHelp()
2658
+ {
2659
+ SetState(WIXSTDBA_STATE_HELP, S_OK);
2660
+
2661
+ // If the UI should be visible, display it now and hide the splash screen
2662
+ if (BOOTSTRAPPER_DISPLAY_NONE < m_command.display)
2663
+ {
2664
+ ::ShowWindow(m_pTheme->hwndParent, SW_SHOW);
2665
+ }
2666
+
2667
+ m_pEngine->CloseSplashScreen();
2668
+
2669
+ return;
2670
+ }
2671
+
2672
+
2673
+ //
2674
+ // OnDetect - start the processing of packages.
2675
+ //
2676
+ void OnDetect()
2677
+ {
2678
+ HRESULT hr = S_OK;
2679
+
2680
+ SetState(WIXSTDBA_STATE_DETECTING, hr);
2681
+
2682
+ // If the UI should be visible, display it now and hide the splash screen
2683
+ if (BOOTSTRAPPER_DISPLAY_NONE < m_command.display)
2684
+ {
2685
+ ::ShowWindow(m_pTheme->hwndParent, SW_SHOW);
2686
+ }
2687
+
2688
+ m_pEngine->CloseSplashScreen();
2689
+
2690
+ // Tell the core we're ready for the packages to be processed now.
2691
+ hr = m_pEngine->Detect();
2692
+ BalExitOnFailure(hr, "Failed to start detecting chain.");
2693
+
2694
+ LExit:
2695
+ if (FAILED(hr))
2696
+ {
2697
+ SetState(WIXSTDBA_STATE_DETECTING, hr);
2698
+ }
2699
+
2700
+ return;
2701
+ }
2702
+
2703
+
2704
+ //
2705
+ // OnPlan - plan the detected changes.
2706
+ //
2707
+ void OnPlan(
2708
+ __in BOOTSTRAPPER_ACTION action
2709
+ )
2710
+ {
2711
+ HRESULT hr = S_OK;
2712
+
2713
+ m_plannedAction = action;
2714
+
2715
+ // If we are going to apply a downgrade, bail.
2716
+ if (m_fDowngrading && BOOTSTRAPPER_ACTION_UNINSTALL < action)
2717
+ {
2718
+ if (m_fSuppressDowngradeFailure)
2719
+ {
2720
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "A newer version of this product is installed but downgrade failure has been suppressed; continuing...");
2721
+ }
2722
+ else
2723
+ {
2724
+ hr = HRESULT_FROM_WIN32(ERROR_PRODUCT_VERSION);
2725
+ BalExitOnFailure(hr, "Cannot install a product when a newer version is installed.");
2726
+ }
2727
+ }
2728
+
2729
+ SetState(WIXSTDBA_STATE_PLANNING, hr);
2730
+
2731
+ hr = m_pEngine->Plan(action);
2732
+ BalExitOnFailure(hr, "Failed to start planning packages.");
2733
+
2734
+ LExit:
2735
+ if (FAILED(hr))
2736
+ {
2737
+ SetState(WIXSTDBA_STATE_PLANNING, hr);
2738
+ }
2739
+
2740
+ return;
2741
+ }
2742
+
2743
+
2744
+ //
2745
+ // OnApply - apply the packages.
2746
+ //
2747
+ void OnApply()
2748
+ {
2749
+ HRESULT hr = S_OK;
2750
+
2751
+ SetState(WIXSTDBA_STATE_APPLYING, hr);
2752
+ SetProgressState(hr);
2753
+ SetTaskbarButtonProgress(0);
2754
+
2755
+ hr = m_pEngine->Apply(m_hWnd);
2756
+ BalExitOnFailure(hr, "Failed to start applying packages.");
2757
+
2758
+ ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_PROGRESS_CANCEL_BUTTON, TRUE); // ensure the cancel button is enabled before starting.
2759
+
2760
+ LExit:
2761
+ if (FAILED(hr))
2762
+ {
2763
+ SetState(WIXSTDBA_STATE_APPLYING, hr);
2764
+ }
2765
+
2766
+ return;
2767
+ }
2768
+
2769
+
2770
+ //
2771
+ // OnChangeState - change state.
2772
+ //
2773
+ void OnChangeState(
2774
+ __in WIXSTDBA_STATE state
2775
+ )
2776
+ {
2777
+ WIXSTDBA_STATE stateOld = m_state;
2778
+ DWORD dwOldPageId = 0;
2779
+ DWORD dwNewPageId = 0;
2780
+ LPWSTR sczText = NULL;
2781
+ LPWSTR sczUnformattedText = NULL;
2782
+ LPWSTR sczControlState = NULL;
2783
+ LPWSTR sczControlName = NULL;
2784
+
2785
+ m_state = state;
2786
+
2787
+ // If our install is at the end (success or failure) and we're not showing full UI or
2788
+ // we successfully installed the prerequisite then exit (prompt for restart if required).
2789
+ if ((WIXSTDBA_STATE_APPLIED <= m_state && BOOTSTRAPPER_DISPLAY_FULL > m_command.display) ||
2790
+ (WIXSTDBA_STATE_APPLIED == m_state && m_fPrereq))
2791
+ {
2792
+ // If a restart was required but we were not automatically allowed to
2793
+ // accept the reboot then do the prompt.
2794
+ if (m_fRestartRequired && !m_fAllowRestart)
2795
+ {
2796
+ StrAllocFromError(&sczUnformattedText, HRESULT_FROM_WIN32(ERROR_SUCCESS_REBOOT_REQUIRED), NULL);
2797
+
2798
+ int nResult = ::MessageBoxW(m_hWnd, sczUnformattedText ? sczUnformattedText : L"The requested operation is successful. Changes will not be effective until the system is rebooted.", m_pTheme->sczCaption, MB_ICONEXCLAMATION | MB_OKCANCEL);
2799
+ m_fAllowRestart = (IDOK == nResult);
2800
+ }
2801
+
2802
+ // Quietly exit.
2803
+ ::PostMessageW(m_hWnd, WM_CLOSE, 0, 0);
2804
+ }
2805
+ else // try to change the pages.
2806
+ {
2807
+ DeterminePageId(stateOld, &dwOldPageId);
2808
+ DeterminePageId(m_state, &dwNewPageId);
2809
+
2810
+ if (dwOldPageId != dwNewPageId)
2811
+ {
2812
+ // Enable disable controls per-page.
2813
+ if (m_rgdwPageIds[WIXSTDBA_PAGE_INSTALL] == dwNewPageId) // on the "Install" page, ensure the install button is enabled/disabled correctly.
2814
+ {
2815
+ LONGLONG llElevated = 0;
2816
+ if (m_Bundle.fPerMachine)
2817
+ {
2818
+ BalGetNumericVariable(WIXBUNDLE_VARIABLE_ELEVATED, &llElevated);
2819
+ }
2820
+ ThemeControlElevates(m_pTheme, WIXSTDBA_CONTROL_INSTALL_BUTTON, (m_Bundle.fPerMachine && !llElevated));
2821
+
2822
+ // If the EULA control exists, show it only if a license URL is provided as well.
2823
+ if (ThemeControlExists(m_pTheme, WIXSTDBA_CONTROL_EULA_LINK))
2824
+ {
2825
+ BOOL fEulaLink = (m_sczLicenseUrl && *m_sczLicenseUrl);
2826
+ ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_EULA_LINK, fEulaLink);
2827
+ ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_EULA_ACCEPT_CHECKBOX, fEulaLink);
2828
+ }
2829
+
2830
+ BOOL fAcceptedLicense = !ThemeControlExists(m_pTheme, WIXSTDBA_CONTROL_EULA_ACCEPT_CHECKBOX) || !ThemeControlEnabled(m_pTheme, WIXSTDBA_CONTROL_EULA_ACCEPT_CHECKBOX) || ThemeIsControlChecked(m_pTheme, WIXSTDBA_CONTROL_EULA_ACCEPT_CHECKBOX);
2831
+ ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_INSTALL_BUTTON, fAcceptedLicense);
2832
+ }
2833
+ else if (m_rgdwPageIds[WIXSTDBA_PAGE_MODIFY] == dwNewPageId)
2834
+ {
2835
+ ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_REPAIR_BUTTON, !m_fSuppressRepair);
2836
+ }
2837
+ else if (m_rgdwPageIds[WIXSTDBA_PAGE_SUCCESS] == dwNewPageId) // on the "Success" page, check if the restart or launch button should be enabled.
2838
+ {
2839
+ BOOL fShowRestartButton = FALSE;
2840
+ BOOL fLaunchTargetExists = FALSE;
2841
+ if (m_fRestartRequired)
2842
+ {
2843
+ if (BOOTSTRAPPER_RESTART_PROMPT == m_command.restart)
2844
+ {
2845
+ fShowRestartButton = TRUE;
2846
+ }
2847
+ }
2848
+ else if (ThemeControlExists(m_pTheme, WIXSTDBA_CONTROL_LAUNCH_BUTTON))
2849
+ {
2850
+ fLaunchTargetExists = BalStringVariableExists(WIXSTDBA_VARIABLE_LAUNCH_TARGET_PATH);
2851
+ }
2852
+
2853
+ ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_LAUNCH_BUTTON, fLaunchTargetExists && BOOTSTRAPPER_ACTION_UNINSTALL < m_plannedAction);
2854
+ ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_SUCCESS_RESTART_BUTTON, fShowRestartButton);
2855
+ }
2856
+ else if (m_rgdwPageIds[WIXSTDBA_PAGE_FAILURE] == dwNewPageId) // on the "Failure" page, show error message and check if the restart button should be enabled.
2857
+ {
2858
+ BOOL fShowLogLink = (m_Bundle.sczLogVariable && *m_Bundle.sczLogVariable); // if there is a log file variable then we'll assume the log file exists.
2859
+ BOOL fShowErrorMessage = FALSE;
2860
+ BOOL fShowRestartButton = FALSE;
2861
+
2862
+ if (FAILED(m_hrFinal))
2863
+ {
2864
+ // If we know the failure message, use that.
2865
+ if (m_sczFailedMessage && *m_sczFailedMessage)
2866
+ {
2867
+ StrAllocString(&sczUnformattedText, m_sczFailedMessage, 0);
2868
+ }
2869
+ else if (E_MBAHOST_NET452_ON_WIN7RTM == m_hrFinal)
2870
+ {
2871
+ HRESULT hr = StrAllocString(&sczUnformattedText, L"#(loc.NET452WIN7RTMErrorMessage)", 0);
2872
+ if (FAILED(hr))
2873
+ {
2874
+ BalLogError(hr, "Failed to initialize NET452WIN7RTMErrorMessage loc identifier.");
2875
+ }
2876
+ else
2877
+ {
2878
+ hr = LocLocalizeString(m_pWixLoc, &sczUnformattedText);
2879
+ if (FAILED(hr))
2880
+ {
2881
+ BalLogError(hr, "Failed to localize NET452WIN7RTMErrorMessage: %ls", sczUnformattedText);
2882
+ ReleaseNullStr(sczUnformattedText);
2883
+ }
2884
+ }
2885
+ }
2886
+ else // try to get the error message from the error code.
2887
+ {
2888
+ StrAllocFromError(&sczUnformattedText, m_hrFinal, NULL);
2889
+ if (!sczUnformattedText || !*sczUnformattedText)
2890
+ {
2891
+ StrAllocFromError(&sczUnformattedText, E_FAIL, NULL);
2892
+ }
2893
+ }
2894
+
2895
+ if (E_WIXSTDBA_CONDITION_FAILED == m_hrFinal)
2896
+ {
2897
+ if (sczUnformattedText)
2898
+ {
2899
+ StrAllocString(&sczText, sczUnformattedText, 0);
2900
+ }
2901
+ }
2902
+ else if (E_MBAHOST_NET452_ON_WIN7RTM == m_hrFinal)
2903
+ {
2904
+ if (sczUnformattedText)
2905
+ {
2906
+ BalFormatString(sczUnformattedText, &sczText);
2907
+ }
2908
+ }
2909
+ else
2910
+ {
2911
+ StrAllocFormatted(&sczText, L"0x%08x - %ls", m_hrFinal, sczUnformattedText);
2912
+ }
2913
+
2914
+ ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_FAILURE_MESSAGE_TEXT, sczText);
2915
+ fShowErrorMessage = TRUE;
2916
+ }
2917
+
2918
+ if (m_fRestartRequired)
2919
+ {
2920
+ if (BOOTSTRAPPER_RESTART_PROMPT == m_command.restart)
2921
+ {
2922
+ fShowRestartButton = TRUE;
2923
+ }
2924
+ }
2925
+
2926
+ ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_FAILURE_LOGFILE_LINK, fShowLogLink);
2927
+ ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_FAILURE_MESSAGE_TEXT, fShowErrorMessage);
2928
+ ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_FAILURE_RESTART_BUTTON, fShowRestartButton);
2929
+ }
2930
+
2931
+ HRESULT hr = ThemeShowPage(m_pTheme, dwOldPageId, SW_HIDE);
2932
+ if (FAILED(hr))
2933
+ {
2934
+ BalLogError(hr, "Failed to hide page: %u", dwOldPageId);
2935
+ }
2936
+
2937
+ hr = ThemeShowPage(m_pTheme, dwNewPageId, SW_SHOW);
2938
+ if (FAILED(hr))
2939
+ {
2940
+ BalLogError(hr, "Failed to show page: %u", dwOldPageId);
2941
+ }
2942
+
2943
+ // On the install page set the focus to the install button or the next enabled control if install is disabled.
2944
+ if (m_rgdwPageIds[WIXSTDBA_PAGE_INSTALL] == dwNewPageId)
2945
+ {
2946
+ ThemeSetFocus(m_pTheme, WIXSTDBA_CONTROL_INSTALL_BUTTON);
2947
+ }
2948
+ }
2949
+ }
2950
+
2951
+ ReleaseStr(sczText);
2952
+ ReleaseStr(sczUnformattedText);
2953
+ ReleaseStr(sczControlState);
2954
+ ReleaseStr(sczControlName);
2955
+ }
2956
+
2957
+
2958
+ //
2959
+ // OnClose - called when the window is trying to be closed.
2960
+ //
2961
+ BOOL OnClose()
2962
+ {
2963
+ BOOL fClose = FALSE;
2964
+ BOOL fCancel = FALSE;
2965
+
2966
+ // If we've already succeeded or failed or showing the help page, just close (prompts are annoying if the bootstrapper is done).
2967
+ if (WIXSTDBA_STATE_APPLIED <= m_state || WIXSTDBA_STATE_HELP == m_state)
2968
+ {
2969
+ fClose = TRUE;
2970
+ }
2971
+ else // prompt the user or force the cancel if there is no UI.
2972
+ {
2973
+ fClose = PromptCancel(m_hWnd, BOOTSTRAPPER_DISPLAY_FULL != m_command.display, m_sczConfirmCloseMessage ? m_sczConfirmCloseMessage : L"Are you sure you want to cancel?", m_pTheme->sczCaption);
2974
+ fCancel = fClose;
2975
+ }
2976
+
2977
+ // If we're doing progress then we never close, we just cancel to let rollback occur.
2978
+ if (WIXSTDBA_STATE_APPLYING <= m_state && WIXSTDBA_STATE_APPLIED > m_state)
2979
+ {
2980
+ // If we canceled, disable cancel button since clicking it again is silly.
2981
+ if (fClose)
2982
+ {
2983
+ ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_PROGRESS_CANCEL_BUTTON, FALSE);
2984
+ }
2985
+
2986
+ fClose = FALSE;
2987
+ }
2988
+
2989
+ if (fClose)
2990
+ {
2991
+ DWORD dwCurrentPageId = 0;
2992
+ DeterminePageId(m_state, &dwCurrentPageId);
2993
+
2994
+ // Hide the current page to let thmutil do its thing with variables.
2995
+ ThemeShowPageEx(m_pTheme, dwCurrentPageId, SW_HIDE, fCancel ? THEME_SHOW_PAGE_REASON_CANCEL : THEME_SHOW_PAGE_REASON_DEFAULT);
2996
+ }
2997
+
2998
+ return fClose;
2999
+ }
3000
+
3001
+
3002
+ //
3003
+ // OnClickAcceptCheckbox - allow the install to continue.
3004
+ //
3005
+ void OnClickAcceptCheckbox()
3006
+ {
3007
+ BOOL fAcceptedLicense = ThemeIsControlChecked(m_pTheme, WIXSTDBA_CONTROL_EULA_ACCEPT_CHECKBOX);
3008
+ ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_INSTALL_BUTTON, fAcceptedLicense);
3009
+ }
3010
+
3011
+
3012
+ //
3013
+ // OnClickInstallButton - start the install by planning the packages.
3014
+ //
3015
+ void OnClickInstallButton()
3016
+ {
3017
+ this->OnPlan(BOOTSTRAPPER_ACTION_INSTALL);
3018
+ }
3019
+
3020
+
3021
+ //
3022
+ // OnClickRepairButton - start the repair.
3023
+ //
3024
+ void OnClickRepairButton()
3025
+ {
3026
+ this->OnPlan(BOOTSTRAPPER_ACTION_REPAIR);
3027
+ }
3028
+
3029
+
3030
+ //
3031
+ // OnClickUninstallButton - start the uninstall.
3032
+ //
3033
+ void OnClickUninstallButton()
3034
+ {
3035
+ this->OnPlan(BOOTSTRAPPER_ACTION_UNINSTALL);
3036
+ }
3037
+
3038
+
3039
+ //
3040
+ // OnClickCloseButton - close the application.
3041
+ //
3042
+ void OnClickCloseButton()
3043
+ {
3044
+ ::SendMessageW(m_hWnd, WM_CLOSE, 0, 0);
3045
+ }
3046
+
3047
+
3048
+ //
3049
+ // OnClickEulaLink - show the end user license agreement.
3050
+ //
3051
+ void OnClickEulaLink()
3052
+ {
3053
+ HRESULT hr = S_OK;
3054
+ LPWSTR sczLicenseUrl = NULL;
3055
+ LPWSTR sczLicensePath = NULL;
3056
+ LPWSTR sczLicenseDirectory = NULL;
3057
+ LPWSTR sczLicenseFilename = NULL;
3058
+ URI_PROTOCOL protocol = URI_PROTOCOL_UNKNOWN;
3059
+
3060
+ hr = StrAllocString(&sczLicenseUrl, m_sczLicenseUrl, 0);
3061
+ BalExitOnFailure(hr, "Failed to copy license URL: %ls", m_sczLicenseUrl);
3062
+
3063
+ hr = LocLocalizeString(m_pWixLoc, &sczLicenseUrl);
3064
+ BalExitOnFailure(hr, "Failed to localize license URL: %ls", m_sczLicenseUrl);
3065
+
3066
+ // Assume there is no hidden variables to be formatted
3067
+ // so don't worry about securely freeing it.
3068
+ hr = BalFormatString(sczLicenseUrl, &sczLicenseUrl);
3069
+ BalExitOnFailure(hr, "Failed to get formatted license URL: %ls", m_sczLicenseUrl);
3070
+
3071
+ hr = UriProtocol(sczLicenseUrl, &protocol);
3072
+ if (FAILED(hr) || URI_PROTOCOL_UNKNOWN == protocol)
3073
+ {
3074
+ // Probe for localized license file
3075
+ hr = PathRelativeToModule(&sczLicensePath, sczLicenseUrl, m_hModule);
3076
+ if (SUCCEEDED(hr))
3077
+ {
3078
+ hr = PathGetDirectory(sczLicensePath, &sczLicenseDirectory);
3079
+ if (SUCCEEDED(hr))
3080
+ {
3081
+ hr = LocProbeForFile(sczLicenseDirectory, PathFile(sczLicenseUrl), m_sczLanguage, &sczLicensePath);
3082
+ }
3083
+ }
3084
+ }
3085
+
3086
+ hr = ShelExecUnelevated(sczLicensePath ? sczLicensePath : sczLicenseUrl, NULL, L"open", NULL, SW_SHOWDEFAULT);
3087
+ BalExitOnFailure(hr, "Failed to launch URL to EULA.");
3088
+
3089
+ LExit:
3090
+ ReleaseStr(sczLicensePath);
3091
+ ReleaseStr(sczLicenseUrl);
3092
+ ReleaseStr(sczLicenseDirectory);
3093
+ ReleaseStr(sczLicenseFilename);
3094
+
3095
+ return;
3096
+ }
3097
+
3098
+
3099
+ //
3100
+ // OnClickLaunchButton - launch the app from the success page.
3101
+ //
3102
+ void OnClickLaunchButton()
3103
+ {
3104
+ HRESULT hr = S_OK;
3105
+ LPWSTR sczUnformattedLaunchTarget = NULL;
3106
+ LPWSTR sczLaunchTarget = NULL;
3107
+ LPWSTR sczLaunchTargetElevatedId = NULL;
3108
+ LPWSTR sczUnformattedArguments = NULL;
3109
+ LPWSTR sczArguments = NULL;
3110
+ LPWSTR sczUnformattedLaunchFolder = NULL;
3111
+ LPWSTR sczLaunchFolder = NULL;
3112
+ int nCmdShow = SW_SHOWNORMAL;
3113
+
3114
+ hr = BalGetStringVariable(WIXSTDBA_VARIABLE_LAUNCH_TARGET_PATH, &sczUnformattedLaunchTarget);
3115
+ BalExitOnFailure(hr, "Failed to get launch target variable '%ls'.", WIXSTDBA_VARIABLE_LAUNCH_TARGET_PATH);
3116
+
3117
+ hr = BalFormatString(sczUnformattedLaunchTarget, &sczLaunchTarget);
3118
+ BalExitOnFailure(hr, "Failed to format launch target variable: %ls", sczUnformattedLaunchTarget);
3119
+
3120
+ if (BalStringVariableExists(WIXSTDBA_VARIABLE_LAUNCH_TARGET_ELEVATED_ID))
3121
+ {
3122
+ hr = BalGetStringVariable(WIXSTDBA_VARIABLE_LAUNCH_TARGET_ELEVATED_ID, &sczLaunchTargetElevatedId);
3123
+ BalExitOnFailure(hr, "Failed to get launch target elevated id '%ls'.", WIXSTDBA_VARIABLE_LAUNCH_TARGET_ELEVATED_ID);
3124
+ }
3125
+
3126
+ if (BalStringVariableExists(WIXSTDBA_VARIABLE_LAUNCH_ARGUMENTS))
3127
+ {
3128
+ hr = BalGetStringVariable(WIXSTDBA_VARIABLE_LAUNCH_ARGUMENTS, &sczUnformattedArguments);
3129
+ BalExitOnFailure(hr, "Failed to get launch arguments '%ls'.", WIXSTDBA_VARIABLE_LAUNCH_ARGUMENTS);
3130
+ }
3131
+
3132
+ if (BalStringVariableExists(WIXSTDBA_VARIABLE_LAUNCH_HIDDEN))
3133
+ {
3134
+ nCmdShow = SW_HIDE;
3135
+ }
3136
+
3137
+ if (BalStringVariableExists(WIXSTDBA_VARIABLE_LAUNCH_WORK_FOLDER))
3138
+ {
3139
+ hr = BalGetStringVariable(WIXSTDBA_VARIABLE_LAUNCH_WORK_FOLDER, &sczUnformattedLaunchFolder);
3140
+ BalExitOnFailure(hr, "Failed to get launch working directory variable '%ls'.", WIXSTDBA_VARIABLE_LAUNCH_WORK_FOLDER);
3141
+ }
3142
+
3143
+ if (sczLaunchTargetElevatedId && !m_fTriedToLaunchElevated)
3144
+ {
3145
+ m_fTriedToLaunchElevated = TRUE;
3146
+ hr = m_pEngine->LaunchApprovedExe(m_hWnd, sczLaunchTargetElevatedId, sczUnformattedArguments, 0);
3147
+ if (FAILED(hr))
3148
+ {
3149
+ BalLogError(hr, "Failed to launch elevated target: %ls", sczLaunchTargetElevatedId);
3150
+
3151
+ //try with ShelExec next time
3152
+ OnClickLaunchButton();
3153
+ }
3154
+ }
3155
+ else
3156
+ {
3157
+ if (sczUnformattedArguments)
3158
+ {
3159
+ hr = BalFormatString(sczUnformattedArguments, &sczArguments);
3160
+ BalExitOnFailure(hr, "Failed to format launch arguments variable: %ls", sczUnformattedArguments);
3161
+ }
3162
+
3163
+ if (sczUnformattedLaunchFolder)
3164
+ {
3165
+ hr = BalFormatString(sczUnformattedLaunchFolder, &sczLaunchFolder);
3166
+ BalExitOnFailure(hr, "Failed to format launch working directory variable: %ls", sczUnformattedLaunchFolder);
3167
+ }
3168
+
3169
+ hr = ShelExec(sczLaunchTarget, sczArguments, L"open", sczLaunchFolder, nCmdShow, m_hWnd, NULL);
3170
+ BalExitOnFailure(hr, "Failed to launch target: %ls", sczLaunchTarget);
3171
+
3172
+ ::PostMessageW(m_hWnd, WM_CLOSE, 0, 0);
3173
+ }
3174
+
3175
+ LExit:
3176
+ StrSecureZeroFreeString(sczLaunchFolder);
3177
+ ReleaseStr(sczUnformattedLaunchFolder);
3178
+ StrSecureZeroFreeString(sczArguments);
3179
+ ReleaseStr(sczUnformattedArguments);
3180
+ ReleaseStr(sczLaunchTargetElevatedId);
3181
+ StrSecureZeroFreeString(sczLaunchTarget);
3182
+ ReleaseStr(sczUnformattedLaunchTarget);
3183
+
3184
+ return;
3185
+ }
3186
+
3187
+
3188
+ //
3189
+ // OnClickRestartButton - allows the restart and closes the app.
3190
+ //
3191
+ void OnClickRestartButton()
3192
+ {
3193
+ AssertSz(m_fRestartRequired, "Restart must be requested to be able to click on the restart button.");
3194
+
3195
+ m_fAllowRestart = TRUE;
3196
+ ::SendMessageW(m_hWnd, WM_CLOSE, 0, 0);
3197
+
3198
+ return;
3199
+ }
3200
+
3201
+
3202
+ //
3203
+ // OnClickLogFileLink - show the log file.
3204
+ //
3205
+ void OnClickLogFileLink()
3206
+ {
3207
+ HRESULT hr = S_OK;
3208
+ LPWSTR sczLogFile = NULL;
3209
+
3210
+ hr = BalGetStringVariable(m_Bundle.sczLogVariable, &sczLogFile);
3211
+ BalExitOnFailure(hr, "Failed to get log file variable '%ls'.", m_Bundle.sczLogVariable);
3212
+
3213
+ hr = ShelExecUnelevated(L"notepad.exe", sczLogFile, L"open", NULL, SW_SHOWDEFAULT);
3214
+ BalExitOnFailure(hr, "Failed to open log file target: %ls", sczLogFile);
3215
+
3216
+ LExit:
3217
+ ReleaseStr(sczLogFile);
3218
+
3219
+ return;
3220
+ }
3221
+
3222
+
3223
+ //
3224
+ // SetState
3225
+ //
3226
+ void SetState(
3227
+ __in WIXSTDBA_STATE state,
3228
+ __in HRESULT hrStatus
3229
+ )
3230
+ {
3231
+ if (FAILED(hrStatus))
3232
+ {
3233
+ m_hrFinal = hrStatus;
3234
+ }
3235
+
3236
+ if (FAILED(m_hrFinal))
3237
+ {
3238
+ state = WIXSTDBA_STATE_FAILED;
3239
+ }
3240
+
3241
+ if (m_state < state)
3242
+ {
3243
+ ::PostMessageW(m_hWnd, WM_WIXSTDBA_CHANGE_STATE, 0, state);
3244
+ }
3245
+ }
3246
+
3247
+
3248
+ void DeterminePageId(
3249
+ __in WIXSTDBA_STATE state,
3250
+ __out DWORD* pdwPageId
3251
+ )
3252
+ {
3253
+ if (BOOTSTRAPPER_DISPLAY_PASSIVE == m_command.display)
3254
+ {
3255
+ switch (state)
3256
+ {
3257
+ case WIXSTDBA_STATE_INITIALIZED:
3258
+ *pdwPageId = BOOTSTRAPPER_ACTION_HELP == m_command.action ? m_rgdwPageIds[WIXSTDBA_PAGE_HELP] : m_rgdwPageIds[WIXSTDBA_PAGE_LOADING];
3259
+ break;
3260
+
3261
+ case WIXSTDBA_STATE_HELP:
3262
+ *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_HELP];
3263
+ break;
3264
+
3265
+ case WIXSTDBA_STATE_DETECTING:
3266
+ *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_LOADING] ? m_rgdwPageIds[WIXSTDBA_PAGE_LOADING] : m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS_PASSIVE] ? m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS_PASSIVE] : m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS];
3267
+ break;
3268
+
3269
+ case WIXSTDBA_STATE_DETECTED: __fallthrough;
3270
+ case WIXSTDBA_STATE_PLANNING: __fallthrough;
3271
+ case WIXSTDBA_STATE_PLANNED: __fallthrough;
3272
+ case WIXSTDBA_STATE_APPLYING: __fallthrough;
3273
+ case WIXSTDBA_STATE_CACHING: __fallthrough;
3274
+ case WIXSTDBA_STATE_CACHED: __fallthrough;
3275
+ case WIXSTDBA_STATE_EXECUTING: __fallthrough;
3276
+ case WIXSTDBA_STATE_EXECUTED:
3277
+ *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS_PASSIVE] ? m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS_PASSIVE] : m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS];
3278
+ break;
3279
+
3280
+ default:
3281
+ *pdwPageId = 0;
3282
+ break;
3283
+ }
3284
+ }
3285
+ else if (BOOTSTRAPPER_DISPLAY_FULL == m_command.display)
3286
+ {
3287
+ switch (state)
3288
+ {
3289
+ case WIXSTDBA_STATE_INITIALIZING:
3290
+ *pdwPageId = 0;
3291
+ break;
3292
+
3293
+ case WIXSTDBA_STATE_INITIALIZED:
3294
+ *pdwPageId = BOOTSTRAPPER_ACTION_HELP == m_command.action ? m_rgdwPageIds[WIXSTDBA_PAGE_HELP] : m_rgdwPageIds[WIXSTDBA_PAGE_LOADING];
3295
+ break;
3296
+
3297
+ case WIXSTDBA_STATE_HELP:
3298
+ *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_HELP];
3299
+ break;
3300
+
3301
+ case WIXSTDBA_STATE_DETECTING:
3302
+ *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_LOADING];
3303
+ break;
3304
+
3305
+ case WIXSTDBA_STATE_DETECTED:
3306
+ switch (m_command.action)
3307
+ {
3308
+ case BOOTSTRAPPER_ACTION_INSTALL:
3309
+ *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_INSTALL];
3310
+ break;
3311
+
3312
+ case BOOTSTRAPPER_ACTION_MODIFY: __fallthrough;
3313
+ case BOOTSTRAPPER_ACTION_REPAIR: __fallthrough;
3314
+ case BOOTSTRAPPER_ACTION_UNINSTALL:
3315
+ *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_MODIFY];
3316
+ break;
3317
+ }
3318
+ break;
3319
+
3320
+ case WIXSTDBA_STATE_PLANNING: __fallthrough;
3321
+ case WIXSTDBA_STATE_PLANNED: __fallthrough;
3322
+ case WIXSTDBA_STATE_APPLYING: __fallthrough;
3323
+ case WIXSTDBA_STATE_CACHING: __fallthrough;
3324
+ case WIXSTDBA_STATE_CACHED: __fallthrough;
3325
+ case WIXSTDBA_STATE_EXECUTING: __fallthrough;
3326
+ case WIXSTDBA_STATE_EXECUTED:
3327
+ *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS];
3328
+ break;
3329
+
3330
+ case WIXSTDBA_STATE_APPLIED:
3331
+ *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_SUCCESS];
3332
+ break;
3333
+
3334
+ case WIXSTDBA_STATE_FAILED:
3335
+ *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_FAILURE];
3336
+ break;
3337
+ }
3338
+ }
3339
+ }
3340
+
3341
+
3342
+ HRESULT EvaluateConditions()
3343
+ {
3344
+ HRESULT hr = S_OK;
3345
+ BOOL fResult = FALSE;
3346
+
3347
+ for (DWORD i = 0; i < m_Conditions.cConditions; ++i)
3348
+ {
3349
+ BAL_CONDITION* pCondition = m_Conditions.rgConditions + i;
3350
+
3351
+ hr = BalConditionEvaluate(pCondition, m_pEngine, &fResult, &m_sczFailedMessage);
3352
+ BalExitOnFailure(hr, "Failed to evaluate condition.");
3353
+
3354
+ if (!fResult)
3355
+ {
3356
+ hr = E_WIXSTDBA_CONDITION_FAILED;
3357
+ BalExitOnFailure(hr, "%ls", m_sczFailedMessage);
3358
+ }
3359
+ }
3360
+
3361
+ ReleaseNullStrSecure(m_sczFailedMessage);
3362
+
3363
+ LExit:
3364
+ return hr;
3365
+ }
3366
+
3367
+ void UpdateCacheProgress(
3368
+ __in DWORD dwOverallPercentage
3369
+ )
3370
+ {
3371
+ WCHAR wzProgress[5] = { };
3372
+
3373
+ ::StringCchPrintfW(wzProgress, countof(wzProgress), L"%u%%", dwOverallPercentage);
3374
+ ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_CACHE_PROGRESS_TEXT, wzProgress);
3375
+
3376
+ ThemeSetProgressControl(m_pTheme, WIXSTDBA_CONTROL_CACHE_PROGRESS_BAR, dwOverallPercentage);
3377
+
3378
+ m_dwCalculatedCacheProgress = dwOverallPercentage * WIXSTDBA_ACQUIRE_PERCENTAGE / 100;
3379
+ ThemeSetProgressControl(m_pTheme, WIXSTDBA_CONTROL_OVERALL_CALCULATED_PROGRESS_BAR, m_dwCalculatedCacheProgress + m_dwCalculatedExecuteProgress);
3380
+
3381
+ SetTaskbarButtonProgress(m_dwCalculatedCacheProgress + m_dwCalculatedExecuteProgress);
3382
+ }
3383
+
3384
+
3385
+ void SetTaskbarButtonProgress(
3386
+ __in DWORD dwOverallPercentage
3387
+ )
3388
+ {
3389
+ HRESULT hr = S_OK;
3390
+
3391
+ if (m_fTaskbarButtonOK)
3392
+ {
3393
+ hr = m_pTaskbarList->SetProgressValue(m_hWnd, dwOverallPercentage, 100UL);
3394
+ BalExitOnFailure(hr, "Failed to set taskbar button progress to: %d%%.", dwOverallPercentage);
3395
+ }
3396
+
3397
+ LExit:
3398
+ return;
3399
+ }
3400
+
3401
+
3402
+ void SetTaskbarButtonState(
3403
+ __in TBPFLAG tbpFlags
3404
+ )
3405
+ {
3406
+ HRESULT hr = S_OK;
3407
+
3408
+ if (m_fTaskbarButtonOK)
3409
+ {
3410
+ hr = m_pTaskbarList->SetProgressState(m_hWnd, tbpFlags);
3411
+ BalExitOnFailure(hr, "Failed to set taskbar button state.", tbpFlags);
3412
+ }
3413
+
3414
+ LExit:
3415
+ return;
3416
+ }
3417
+
3418
+
3419
+ void SetProgressState(
3420
+ __in HRESULT hrStatus
3421
+ )
3422
+ {
3423
+ TBPFLAG flag = TBPF_NORMAL;
3424
+
3425
+ if (IsCanceled() || HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT) == hrStatus)
3426
+ {
3427
+ flag = TBPF_PAUSED;
3428
+ }
3429
+ else if (IsRollingBack() || FAILED(hrStatus))
3430
+ {
3431
+ flag = TBPF_ERROR;
3432
+ }
3433
+
3434
+ SetTaskbarButtonState(flag);
3435
+ }
3436
+
3437
+
3438
+ HRESULT LoadBAFunctions(
3439
+ __in IXMLDOMDocument* pixdManifest
3440
+ )
3441
+ {
3442
+ HRESULT hr = S_OK;
3443
+ IXMLDOMNode* pBAFunctionsNode = NULL;
3444
+ IXMLDOMNode* pPayloadNode = NULL;
3445
+ LPWSTR sczPayloadId = NULL;
3446
+ LPWSTR sczPayloadXPath = NULL;
3447
+ LPWSTR sczBafName = NULL;
3448
+ LPWSTR sczBafPath = NULL;
3449
+ BA_FUNCTIONS_CREATE_ARGS bafCreateArgs = { };
3450
+ BA_FUNCTIONS_CREATE_RESULTS bafCreateResults = { };
3451
+
3452
+ hr = XmlSelectSingleNode(pixdManifest, L"/BootstrapperApplicationData/WixBalBAFunctions", &pBAFunctionsNode);
3453
+ BalExitOnFailure(hr, "Failed to read WixBalBAFunctions node from BootstrapperApplicationData.xml.");
3454
+
3455
+ if (S_FALSE == hr)
3456
+ {
3457
+ ExitFunction();
3458
+ }
3459
+
3460
+ hr = XmlGetAttributeEx(pBAFunctionsNode, L"PayloadId", &sczPayloadId);
3461
+ BalExitOnFailure(hr, "Failed to get BAFunctions PayloadId.");
3462
+
3463
+ hr = StrAllocFormatted(&sczPayloadXPath, L"/BootstrapperApplicationData/WixPayloadProperties[@Payload='%ls']", sczPayloadId);
3464
+ BalExitOnFailure(hr, "Failed to format BAFunctions payload XPath.");
3465
+
3466
+ hr = XmlSelectSingleNode(pixdManifest, sczPayloadXPath, &pPayloadNode);
3467
+ if (S_FALSE == hr)
3468
+ {
3469
+ hr = E_NOTFOUND;
3470
+ }
3471
+ BalExitOnFailure(hr, "Failed to find WixPayloadProperties node for BAFunctions PayloadId: %ls.", sczPayloadId);
3472
+
3473
+ hr = XmlGetAttributeEx(pPayloadNode, L"Name", &sczBafName);
3474
+ BalExitOnFailure(hr, "Failed to get BAFunctions Name.");
3475
+
3476
+ hr = PathRelativeToModule(&sczBafPath, sczBafName, m_hModule);
3477
+ BalExitOnFailure(hr, "Failed to get path to BAFunctions DLL.");
3478
+
3479
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: LoadBAFunctions() - BAFunctions DLL %ls", sczBafPath);
3480
+
3481
+ m_hBAFModule = ::LoadLibraryExW(sczBafPath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
3482
+ BalExitOnNullWithLastError(m_hBAFModule, hr, "WIXSTDBA: LoadBAFunctions() - Failed to load DLL %ls", sczBafPath);
3483
+
3484
+ PFN_BA_FUNCTIONS_CREATE pfnBAFunctionsCreate = reinterpret_cast<PFN_BA_FUNCTIONS_CREATE>(::GetProcAddress(m_hBAFModule, "BAFunctionsCreate"));
3485
+ BalExitOnNullWithLastError(pfnBAFunctionsCreate, hr, "Failed to get BAFunctionsCreate entry-point from: %ls", sczBafPath);
3486
+
3487
+ bafCreateArgs.cbSize = sizeof(bafCreateArgs);
3488
+ bafCreateArgs.qwBAFunctionsAPIVersion = MAKEQWORDVERSION(0, 0, 0, 2); // TODO: need to decide whether to keep this, and if so when to update it.
3489
+ bafCreateArgs.pBootstrapperCreateArgs = &m_createArgs;
3490
+
3491
+ bafCreateResults.cbSize = sizeof(bafCreateResults);
3492
+
3493
+ hr = pfnBAFunctionsCreate(&bafCreateArgs, &bafCreateResults);
3494
+ BalExitOnFailure(hr, "Failed to create BAFunctions.");
3495
+
3496
+ m_pfnBAFunctionsProc = bafCreateResults.pfnBAFunctionsProc;
3497
+ m_pvBAFunctionsProcContext = bafCreateResults.pvBAFunctionsProcContext;
3498
+
3499
+ LExit:
3500
+ if (m_hBAFModule && !m_pfnBAFunctionsProc)
3501
+ {
3502
+ ::FreeLibrary(m_hBAFModule);
3503
+ m_hBAFModule = NULL;
3504
+ }
3505
+ ReleaseStr(sczBafPath);
3506
+ ReleaseStr(sczBafName);
3507
+ ReleaseStr(sczPayloadXPath);
3508
+ ReleaseStr(sczPayloadId);
3509
+ ReleaseObject(pBAFunctionsNode);
3510
+ ReleaseObject(pPayloadNode);
3511
+
3512
+ return hr;
3513
+ }
3514
+
3515
+
3516
+public:
3517
+ //
3518
+ // Constructor - initialize member variables.
3519
+ //
3520
+ CWixStandardBootstrapperApplication(
3521
+ __in HMODULE hModule,
3522
+ __in BOOL fPrereq,
3523
+ __in HRESULT hrHostInitialization,
3524
+ __in IBootstrapperEngine* pEngine,
3525
+ __in const BOOTSTRAPPER_CREATE_ARGS* pArgs
3526
+ ) : CBalBaseBootstrapperApplication(pEngine, pArgs, 3, 3000)
3527
+ {
3528
+ m_hModule = hModule;
3529
+ memcpy_s(&m_command, sizeof(m_command), pArgs->pCommand, sizeof(BOOTSTRAPPER_COMMAND));
3530
+ memcpy_s(&m_createArgs, sizeof(m_createArgs), pArgs, sizeof(BOOTSTRAPPER_CREATE_ARGS));
3531
+ m_createArgs.pCommand = &m_command;
3532
+
3533
+ if (fPrereq)
3534
+ {
3535
+ // Pre-req BA should only show help or do an install (to launch the Managed BA which can then do the right action).
3536
+ if (BOOTSTRAPPER_ACTION_HELP != m_command.action)
3537
+ {
3538
+ m_command.action = BOOTSTRAPPER_ACTION_INSTALL;
3539
+ }
3540
+ }
3541
+ else // maybe modify the action state if the bundle is or is not already installed.
3542
+ {
3543
+ LONGLONG llInstalled = 0;
3544
+ HRESULT hr = BalGetNumericVariable(L"WixBundleInstalled", &llInstalled);
3545
+ if (SUCCEEDED(hr) && BOOTSTRAPPER_RESUME_TYPE_REBOOT != m_command.resumeType && 0 < llInstalled && BOOTSTRAPPER_ACTION_INSTALL == m_command.action)
3546
+ {
3547
+ m_command.action = BOOTSTRAPPER_ACTION_MODIFY;
3548
+ }
3549
+ else if (0 == llInstalled && (BOOTSTRAPPER_ACTION_MODIFY == m_command.action || BOOTSTRAPPER_ACTION_REPAIR == m_command.action))
3550
+ {
3551
+ m_command.action = BOOTSTRAPPER_ACTION_INSTALL;
3552
+ }
3553
+ }
3554
+
3555
+ m_plannedAction = BOOTSTRAPPER_ACTION_UNKNOWN;
3556
+
3557
+ // When resuming from restart doing some install-like operation, try to find the package that forced the
3558
+ // restart. We'll use this information during planning.
3559
+ m_sczAfterForcedRestartPackage = NULL;
3560
+
3561
+ if (BOOTSTRAPPER_RESUME_TYPE_REBOOT == m_command.resumeType && BOOTSTRAPPER_ACTION_UNINSTALL < m_command.action)
3562
+ {
3563
+ // Ensure the forced restart package variable is null when it is an empty string.
3564
+ HRESULT hr = BalGetStringVariable(L"WixBundleForcedRestartPackage", &m_sczAfterForcedRestartPackage);
3565
+ if (FAILED(hr) || !m_sczAfterForcedRestartPackage || !*m_sczAfterForcedRestartPackage)
3566
+ {
3567
+ ReleaseNullStr(m_sczAfterForcedRestartPackage);
3568
+ }
3569
+ }
3570
+
3571
+ m_pWixLoc = NULL;
3572
+ memset(&m_Bundle, 0, sizeof(m_Bundle));
3573
+ memset(&m_Conditions, 0, sizeof(m_Conditions));
3574
+ m_sczConfirmCloseMessage = NULL;
3575
+ m_sczFailedMessage = NULL;
3576
+
3577
+ m_sczLanguage = NULL;
3578
+ m_pTheme = NULL;
3579
+ memset(m_rgdwPageIds, 0, sizeof(m_rgdwPageIds));
3580
+ m_hUiThread = NULL;
3581
+ m_fRegistered = FALSE;
3582
+ m_hWnd = NULL;
3583
+
3584
+ m_state = WIXSTDBA_STATE_INITIALIZING;
3585
+ m_hrFinal = hrHostInitialization;
3586
+
3587
+ m_fDowngrading = FALSE;
3588
+ m_restartResult = BOOTSTRAPPER_APPLY_RESTART_NONE;
3589
+ m_fRestartRequired = FALSE;
3590
+ m_fAllowRestart = FALSE;
3591
+
3592
+ m_sczLicenseFile = NULL;
3593
+ m_sczLicenseUrl = NULL;
3594
+ m_fSuppressDowngradeFailure = FALSE;
3595
+ m_fSuppressRepair = FALSE;
3596
+ m_fSupportCacheOnly = FALSE;
3597
+
3598
+ m_sdOverridableVariables = NULL;
3599
+ m_shPrereqSupportPackages = NULL;
3600
+ m_rgPrereqPackages = NULL;
3601
+ m_cPrereqPackages = 0;
3602
+ m_pTaskbarList = NULL;
3603
+ m_uTaskbarButtonCreatedMessage = UINT_MAX;
3604
+ m_fTaskbarButtonOK = FALSE;
3605
+ m_fShowingInternalUiThisPackage = FALSE;
3606
+ m_fTriedToLaunchElevated = FALSE;
3607
+
3608
+ m_fPrereq = fPrereq;
3609
+ m_fPrereqInstalled = FALSE;
3610
+ m_fPrereqAlreadyInstalled = FALSE;
3611
+
3612
+ pEngine->AddRef();
3613
+ m_pEngine = pEngine;
3614
+
3615
+ m_hBAFModule = NULL;
3616
+ m_pfnBAFunctionsProc = NULL;
3617
+ m_pvBAFunctionsProcContext = NULL;
3618
+ }
3619
+
3620
+
3621
+ //
3622
+ // Destructor - release member variables.
3623
+ //
3624
+ ~CWixStandardBootstrapperApplication()
3625
+ {
3626
+ AssertSz(!::IsWindow(m_hWnd), "Window should have been destroyed before destructor.");
3627
+ AssertSz(!m_pTheme, "Theme should have been released before destructor.");
3628
+
3629
+ ReleaseObject(m_pTaskbarList);
3630
+ ReleaseDict(m_sdOverridableVariables);
3631
+ ReleaseDict(m_shPrereqSupportPackages);
3632
+ ReleaseMem(m_rgPrereqPackages);
3633
+ ReleaseStr(m_sczFailedMessage);
3634
+ ReleaseStr(m_sczConfirmCloseMessage);
3635
+ BalConditionsUninitialize(&m_Conditions);
3636
+ BalInfoUninitialize(&m_Bundle);
3637
+ LocFree(m_pWixLoc);
3638
+
3639
+ ReleaseStr(m_sczLanguage);
3640
+ ReleaseStr(m_sczLicenseFile);
3641
+ ReleaseStr(m_sczLicenseUrl);
3642
+ ReleaseStr(m_sczAfterForcedRestartPackage);
3643
+ ReleaseNullObject(m_pEngine);
3644
+
3645
+ if (m_hBAFModule)
3646
+ {
3647
+ PFN_BA_FUNCTIONS_DESTROY pfnBAFunctionsDestroy = reinterpret_cast<PFN_BA_FUNCTIONS_DESTROY>(::GetProcAddress(m_hBAFModule, "BAFunctionsDestroy"));
3648
+ if (pfnBAFunctionsDestroy)
3649
+ {
3650
+ pfnBAFunctionsDestroy();
3651
+ }
3652
+
3653
+ ::FreeLibrary(m_hBAFModule);
3654
+ m_hBAFModule = NULL;
3655
+ }
3656
+ }
3657
+
3658
+private:
3659
+ HMODULE m_hModule;
3660
+ BOOTSTRAPPER_CREATE_ARGS m_createArgs;
3661
+ BOOTSTRAPPER_COMMAND m_command;
3662
+ IBootstrapperEngine* m_pEngine;
3663
+ BOOTSTRAPPER_ACTION m_plannedAction;
3664
+
3665
+ LPWSTR m_sczAfterForcedRestartPackage;
3666
+
3667
+ WIX_LOCALIZATION* m_pWixLoc;
3668
+ BAL_INFO_BUNDLE m_Bundle;
3669
+ BAL_CONDITIONS m_Conditions;
3670
+ LPWSTR m_sczFailedMessage;
3671
+ LPWSTR m_sczConfirmCloseMessage;
3672
+
3673
+ LPWSTR m_sczLanguage;
3674
+ THEME* m_pTheme;
3675
+ DWORD m_rgdwPageIds[countof(vrgwzPageNames)];
3676
+ HANDLE m_hUiThread;
3677
+ BOOL m_fRegistered;
3678
+ HWND m_hWnd;
3679
+
3680
+ WIXSTDBA_STATE m_state;
3681
+ HRESULT m_hrFinal;
3682
+
3683
+ BOOL m_fStartedExecution;
3684
+ DWORD m_dwCalculatedCacheProgress;
3685
+ DWORD m_dwCalculatedExecuteProgress;
3686
+
3687
+ BOOL m_fDowngrading;
3688
+ BOOTSTRAPPER_APPLY_RESTART m_restartResult;
3689
+ BOOL m_fRestartRequired;
3690
+ BOOL m_fAllowRestart;
3691
+
3692
+ LPWSTR m_sczLicenseFile;
3693
+ LPWSTR m_sczLicenseUrl;
3694
+ BOOL m_fSuppressDowngradeFailure;
3695
+ BOOL m_fSuppressRepair;
3696
+ BOOL m_fSupportCacheOnly;
3697
+
3698
+ STRINGDICT_HANDLE m_sdOverridableVariables;
3699
+
3700
+ WIXSTDBA_PREREQ_PACKAGE* m_rgPrereqPackages;
3701
+ DWORD m_cPrereqPackages;
3702
+ STRINGDICT_HANDLE m_shPrereqSupportPackages;
3703
+
3704
+ BOOL m_fPrereq;
3705
+ BOOL m_fPrereqInstalled;
3706
+ BOOL m_fPrereqAlreadyInstalled;
3707
+
3708
+ ITaskbarList3* m_pTaskbarList;
3709
+ UINT m_uTaskbarButtonCreatedMessage;
3710
+ BOOL m_fTaskbarButtonOK;
3711
+ BOOL m_fShowingInternalUiThisPackage;
3712
+ BOOL m_fTriedToLaunchElevated;
3713
+
3714
+ HMODULE m_hBAFModule;
3715
+ PFN_BA_FUNCTIONS_PROC m_pfnBAFunctionsProc;
3716
+ LPVOID m_pvBAFunctionsProcContext;
3717
+};
3718
+
3719
+
3720
+//
3721
+// CreateBootstrapperApplication - creates a new IBootstrapperApplication object.
3722
+//
3723
+HRESULT CreateBootstrapperApplication(
3724
+ __in HMODULE hModule,
3725
+ __in BOOL fPrereq,
3726
+ __in HRESULT hrHostInitialization,
3727
+ __in IBootstrapperEngine* pEngine,
3728
+ __in const BOOTSTRAPPER_CREATE_ARGS* pArgs,
3729
+ __inout BOOTSTRAPPER_CREATE_RESULTS* pResults
3730
+ )
3731
+{
3732
+ HRESULT hr = S_OK;
3733
+ CWixStandardBootstrapperApplication* pApplication = NULL;
3734
+
3735
+ pApplication = new CWixStandardBootstrapperApplication(hModule, fPrereq, hrHostInitialization, pEngine, pArgs);
3736
+ ExitOnNull(pApplication, hr, E_OUTOFMEMORY, "Failed to create new standard bootstrapper application object.");
3737
+
3738
+ pResults->pfnBootstrapperApplicationProc = BalBaseBootstrapperApplicationProc;
3739
+ pResults->pvBootstrapperApplicationProcContext = pApplication;
3740
+ pApplication = NULL;
3741
+
3742
+LExit:
3743
+ ReleaseObject(pApplication);
3744
+ return hr;
3745
+}
3746
+
3747
+
3748
+static HRESULT DAPI EvaluateVariableConditionCallback(
3749
+ __in_z LPCWSTR wzCondition,
3750
+ __out BOOL* pf,
3751
+ __in_opt LPVOID /*pvContext*/
3752
+ )
3753
+{
3754
+ return BalEvaluateCondition(wzCondition, pf);
3755
+}
3756
+
3757
+
3758
+static HRESULT DAPI FormatVariableStringCallback(
3759
+ __in_z LPCWSTR wzFormat,
3760
+ __inout LPWSTR* psczOut,
3761
+ __in_opt LPVOID /*pvContext*/
3762
+ )
3763
+{
3764
+ return BalFormatString(wzFormat, psczOut);
3765
+}
3766
+
3767
+
3768
+static HRESULT DAPI GetVariableNumericCallback(
3769
+ __in_z LPCWSTR wzVariable,
3770
+ __out LONGLONG* pllValue,
3771
+ __in_opt LPVOID /*pvContext*/
3772
+ )
3773
+{
3774
+ return BalGetNumericVariable(wzVariable, pllValue);
3775
+}
3776
+
3777
+
3778
+static HRESULT DAPI SetVariableNumericCallback(
3779
+ __in_z LPCWSTR wzVariable,
3780
+ __in LONGLONG llValue,
3781
+ __in_opt LPVOID /*pvContext*/
3782
+ )
3783
+{
3784
+ return BalSetNumericVariable(wzVariable, llValue);
3785
+}
3786
+
3787
+
3788
+static HRESULT DAPI GetVariableStringCallback(
3789
+ __in_z LPCWSTR wzVariable,
3790
+ __inout LPWSTR* psczValue,
3791
+ __in_opt LPVOID /*pvContext*/
3792
+ )
3793
+{
3794
+ return BalGetStringVariable(wzVariable, psczValue);
3795
+}
3796
+
3797
+
3798
+static HRESULT DAPI SetVariableStringCallback(
3799
+ __in_z LPCWSTR wzVariable,
3800
+ __in_z_opt LPCWSTR wzValue,
3801
+ __in_opt LPVOID /*pvContext*/
3802
+ )
3803
+{
3804
+ return BalSetStringVariable(wzVariable, wzValue);
3805
+}
3806
+
3807
+static LPCSTR LoggingRequestStateToString(
3808
+ __in BOOTSTRAPPER_REQUEST_STATE requestState
3809
+ )
3810
+{
3811
+ switch (requestState)
3812
+ {
3813
+ case BOOTSTRAPPER_REQUEST_STATE_NONE:
3814
+ return "None";
3815
+ case BOOTSTRAPPER_REQUEST_STATE_FORCE_ABSENT:
3816
+ return "ForceAbsent";
3817
+ case BOOTSTRAPPER_REQUEST_STATE_ABSENT:
3818
+ return "Absent";
3819
+ case BOOTSTRAPPER_REQUEST_STATE_CACHE:
3820
+ return "Cache";
3821
+ case BOOTSTRAPPER_REQUEST_STATE_PRESENT:
3822
+ return "Present";
3823
+ case BOOTSTRAPPER_REQUEST_STATE_REPAIR:
3824
+ return "Repair";
3825
+ default:
3826
+ return "Invalid";
3827
+ }
3828
+}
3829
+
3830
+static LPCSTR LoggingMsiFeatureStateToString(
3831
+ __in BOOTSTRAPPER_FEATURE_STATE featureState
3832
+ )
3833
+{
3834
+ switch (featureState)
3835
+ {
3836
+ case BOOTSTRAPPER_FEATURE_STATE_UNKNOWN:
3837
+ return "Unknown";
3838
+ case BOOTSTRAPPER_FEATURE_STATE_ABSENT:
3839
+ return "Absent";
3840
+ case BOOTSTRAPPER_FEATURE_STATE_ADVERTISED:
3841
+ return "Advertised";
3842
+ case BOOTSTRAPPER_FEATURE_STATE_LOCAL:
3843
+ return "Local";
3844
+ case BOOTSTRAPPER_FEATURE_STATE_SOURCE:
3845
+ return "Source";
3846
+ default:
3847
+ return "Invalid";
3848
+ }
3849
+}
src/wixstdba/precomp.h
new
+51
@@ -0,0 +1,51 @@
1
+#pragma once
2
+// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
3
+
4
+
5
+#include <windows.h>
6
+#include <gdiplus.h>
7
+#include <msiquery.h>
8
+#include <objbase.h>
9
+#include <shlobj.h>
10
+#include <shlwapi.h>
11
+#include <stdlib.h>
12
+#include <strsafe.h>
13
+#include <stddef.h>
14
+
15
+#include "dutil.h"
16
+#include "apputil.h"
17
+#include "memutil.h"
18
+#include "dictutil.h"
19
+#include "dirutil.h"
20
+#include "fileutil.h"
21
+#include "locutil.h"
22
+#include "logutil.h"
23
+#include "pathutil.h"
24
+#include "resrutil.h"
25
+#include "shelutil.h"
26
+#include "strutil.h"
27
+#include "thmutil.h"
28
+#include "uriutil.h"
29
+#include "xmlutil.h"
30
+
31
+#include "BootstrapperEngine.h"
32
+#include "BootstrapperApplication.h"
33
+#include "IBootstrapperEngine.h"
34
+#include "IBootstrapperApplication.h"
35
+
36
+#include "balutil.h"
37
+#include "balinfo.h"
38
+#include "balcondition.h"
39
+
40
+#include "BAFunctions.h"
41
+
42
+#include "wixstdba.messages.h"
43
+
44
+HRESULT CreateBootstrapperApplication(
45
+ __in HMODULE hModule,
46
+ __in BOOL fPrereq,
47
+ __in HRESULT hrHostInitialization,
48
+ __in IBootstrapperEngine* pEngine,
49
+ __in const BOOTSTRAPPER_CREATE_ARGS* pArgs,
50
+ __inout BOOTSTRAPPER_CREATE_RESULTS* pResults
51
+ );
src/wixstdba/resource.h
new
+15
@@ -0,0 +1,15 @@
1
+// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
+
3
+#define IDC_STATIC -1
4
+
5
+
6
+// Next default values for new objects
7
+//
8
+#ifdef APSTUDIO_INVOKED
9
+#ifndef APSTUDIO_READONLY_SYMBOLS
10
+#define _APS_NEXT_RESOURCE_VALUE 102
11
+#define _APS_NEXT_COMMAND_VALUE 40001
12
+#define _APS_NEXT_CONTROL_VALUE 1003
13
+#define _APS_NEXT_SYMED_VALUE 101
14
+#endif
15
+#endif
src/wixstdba/wixstdba.cpp
new
+78
@@ -0,0 +1,78 @@
1
+// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
+
3
+#include "precomp.h"
4
+
5
+static HINSTANCE vhInstance = NULL;
6
+
7
+extern "C" BOOL WINAPI DllMain(
8
+ IN HINSTANCE hInstance,
9
+ IN DWORD dwReason,
10
+ IN LPVOID /* pvReserved */
11
+ )
12
+{
13
+ switch(dwReason)
14
+ {
15
+ case DLL_PROCESS_ATTACH:
16
+ ::DisableThreadLibraryCalls(hInstance);
17
+ vhInstance = hInstance;
18
+ break;
19
+
20
+ case DLL_PROCESS_DETACH:
21
+ vhInstance = NULL;
22
+ break;
23
+ }
24
+
25
+ return TRUE;
26
+}
27
+
28
+
29
+extern "C" HRESULT WINAPI BootstrapperApplicationCreate(
30
+ __in const BOOTSTRAPPER_CREATE_ARGS* pArgs,
31
+ __inout BOOTSTRAPPER_CREATE_RESULTS* pResults
32
+ )
33
+{
34
+ HRESULT hr = S_OK;
35
+ IBootstrapperEngine* pEngine = NULL;
36
+
37
+ hr = BalInitializeFromCreateArgs(pArgs, &pEngine);
38
+ ExitOnFailure(hr, "Failed to initialize Bal.");
39
+
40
+ hr = CreateBootstrapperApplication(vhInstance, FALSE, S_OK, pEngine, pArgs, pResults);
41
+ BalExitOnFailure(hr, "Failed to create bootstrapper application interface.");
42
+
43
+LExit:
44
+ ReleaseObject(pEngine);
45
+
46
+ return hr;
47
+}
48
+
49
+
50
+extern "C" void WINAPI BootstrapperApplicationDestroy()
51
+{
52
+ BalUninitialize();
53
+}
54
+
55
+
56
+extern "C" HRESULT WINAPI MbaPrereqBootstrapperApplicationCreate(
57
+ __in HRESULT hrHostInitialization,
58
+ __in IBootstrapperEngine* pEngine,
59
+ __in const BOOTSTRAPPER_CREATE_ARGS* pArgs,
60
+ __inout BOOTSTRAPPER_CREATE_RESULTS* pResults
61
+ )
62
+{
63
+ HRESULT hr = S_OK;
64
+
65
+ BalInitialize(pEngine);
66
+
67
+ hr = CreateBootstrapperApplication(vhInstance, TRUE, hrHostInitialization, pEngine, pArgs, pResults);
68
+ BalExitOnFailure(hr, "Failed to create managed prerequisite bootstrapper application interface.");
69
+
70
+LExit:
71
+ return hr;
72
+}
73
+
74
+
75
+extern "C" void WINAPI MbaPrereqBootstrapperApplicationDestroy()
76
+{
77
+ BalUninitialize();
78
+}
src/wixstdba/wixstdba.def
new
+8
@@ -0,0 +1,8 @@
1
+; Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
+
3
+
4
+EXPORTS
5
+ BootstrapperApplicationCreate
6
+ BootstrapperApplicationDestroy
7
+ MbaPrereqBootstrapperApplicationCreate
8
+ MbaPrereqBootstrapperApplicationDestroy
src/wixstdba/wixstdba.mc
new
+73
@@ -0,0 +1,73 @@
1
+; // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
+
3
+
4
+MessageIdTypedef=DWORD
5
+
6
+LanguageNames=(English=0x409:MSG00409)
7
+
8
+
9
+; // message definitions
10
+
11
+; // MessageId=#
12
+; // Severity=Success
13
+; // SymbolicName=MSG_SUCCESS
14
+; // Language=English
15
+; // Success %1.
16
+; // .
17
+;
18
+; // MessageId=#
19
+; // Severity=Warning
20
+; // SymbolicName=MSG_WARNING
21
+; // Language=English
22
+; // Warning %1.
23
+; // .
24
+;
25
+; // MessageId=#
26
+; // Severity=Error
27
+; // SymbolicName=MSG_ERROR
28
+; // Language=English
29
+; // Error %1.
30
+; // .
31
+
32
+MessageId=1
33
+Severity=Success
34
+SymbolicName=MSG_WIXSTDBA_DETECTED_FORWARD_COMPATIBLE_BUNDLE
35
+Language=English
36
+WIXSTDBA: Detected forward compatible bundle: %1!ls!, wixstdba requested: %2!hs!, bafunctions requested: %3!hs!
37
+.
38
+
39
+MessageId=2
40
+Severity=Success
41
+SymbolicName=MSG_WIXSTDBA_PLANNED_PACKAGE
42
+Language=English
43
+WIXSTDBA: Planned package: %1!ls!, wixstdba requested: %2!hs!, bafunctions requested: %3!hs!
44
+.
45
+
46
+MessageId=3
47
+Severity=Success
48
+SymbolicName=MSG_WIXSTDBA_PLANNED_RELATED_BUNDLE
49
+Language=English
50
+WIXSTDBA: Planned related bundle: %1!ls!, wixstdba requested: %2!hs!, bafunctions requested: %3!hs!
51
+.
52
+
53
+MessageId=4
54
+Severity=Success
55
+SymbolicName=MSG_WIXSTDBA_PLANNED_COMPATIBLE_MSI_PACKAGE
56
+Language=English
57
+WIXSTDBA: Planned compatible package: %2!ls! for %1!ls!, wixstdba requested: %3!hs!, bafunctions requested: %4!hs!
58
+.
59
+
60
+MessageId=5
61
+Severity=Success
62
+SymbolicName=MSG_WIXSTDBA_PLANNED_TARGET_MSI_PACKAGE
63
+Language=English
64
+WIXSTDBA: Planned target MSI package: %1!ls!, productCode: %2!ls!, wixstdba requested: %3!hs!, bafunctions requested: %4!hs!
65
+.
66
+
67
+MessageId=6
68
+Severity=Success
69
+SymbolicName=MSG_WIXSTDBA_PLANNED_MSI_FEATURE
70
+Language=English
71
+WIXSTDBA: Planned MSI feature: %2!ls! for %1!ls!, wixstdba requested: %3!hs!, bafunctions requested: %4!hs!
72
+.
73
+
src/wixstdba/wixstdba.vcxproj
new
+106
@@ -0,0 +1,106 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+
5
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6
+ <ItemGroup Label="ProjectConfigurations">
7
+ <ProjectConfiguration Include="Debug|Win32">
8
+ <Configuration>Debug</Configuration>
9
+ <Platform>Win32</Platform>
10
+ </ProjectConfiguration>
11
+ <ProjectConfiguration Include="Release|Win32">
12
+ <Configuration>Release</Configuration>
13
+ <Platform>Win32</Platform>
14
+ </ProjectConfiguration>
15
+ </ItemGroup>
16
+ <ItemGroup Label="ProjectConfigurations">
17
+ <ProjectConfiguration Include="Debug|ARM">
18
+ <Configuration>Debug</Configuration>
19
+ <Platform>ARM</Platform>
20
+ </ProjectConfiguration>
21
+ <ProjectConfiguration Include="Release|ARM">
22
+ <Configuration>Release</Configuration>
23
+ <Platform>ARM</Platform>
24
+ </ProjectConfiguration>
25
+ </ItemGroup>
26
+
27
+ <PropertyGroup Label="Globals">
28
+ <ProjectGuid>{41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}</ProjectGuid>
29
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
30
+ <CharacterSet>Unicode</CharacterSet>
31
+ <TargetName>WixStdBA</TargetName>
32
+ <ProjectModuleDefinitionFile>wixstdba.def</ProjectModuleDefinitionFile>
33
+ </PropertyGroup>
34
+
35
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.props" />
36
+
37
+ <PropertyGroup>
38
+ <ProjectAdditionalIncludeDirectories>$(WixRoot)src\libs\dutil\inc;$(WixRoot)src\burn\inc;$(WixRoot)src\libs\balutil\inc</ProjectAdditionalIncludeDirectories>
39
+ <ProjectAdditionalLinkLibraries>comctl32.lib;gdiplus.lib;msimg32.lib;shlwapi.lib;wininet.lib;dutil.lib;balutil.lib;wixstdba.res</ProjectAdditionalLinkLibraries>
40
+ </PropertyGroup>
41
+
42
+ <ItemGroup>
43
+ <ClCompile Include="WixStandardBootstrapperApplication.cpp" />
44
+ <ClCompile Include="wixstdba.cpp" />
45
+ </ItemGroup>
46
+ <ItemGroup>
47
+ <ClInclude Include="precomp.h" />
48
+ <ClInclude Include="resource.h" />
49
+ </ItemGroup>
50
+ <ItemGroup>
51
+ <None Include="Resources\logo.png">
52
+ <CopyToOutputSubDirectory>WixstdbaResources</CopyToOutputSubDirectory>
53
+ </None>
54
+ <None Include="Resources\logoside.png">
55
+ <CopyToOutputSubDirectory>WixstdbaResources</CopyToOutputSubDirectory>
56
+ </None>
57
+ <None Include="Resources\LoremIpsumLicense.rtf">
58
+ <CopyToOutputSubDirectory>WixstdbaResources</CopyToOutputSubDirectory>
59
+ </None>
60
+ <None Include="Resources\HyperlinkTheme.wxl">
61
+ <CopyToOutputSubDirectory>WixstdbaResources</CopyToOutputSubDirectory>
62
+ </None>
63
+ <None Include="Resources\HyperlinkTheme.xml">
64
+ <CopyToOutputSubDirectory>WixstdbaResources</CopyToOutputSubDirectory>
65
+ </None>
66
+ <None Include="Resources\HyperlinkLargeTheme.xml">
67
+ <CopyToOutputSubDirectory>WixstdbaResources</CopyToOutputSubDirectory>
68
+ </None>
69
+ <None Include="Resources\HyperlinkSidebarTheme.xml">
70
+ <CopyToOutputSubDirectory>WixstdbaResources</CopyToOutputSubDirectory>
71
+ </None>
72
+ <None Include="Resources\mbapreq.png">
73
+ <CopyToOutputSubDirectory>WixstdbaResources</CopyToOutputSubDirectory>
74
+ </None>
75
+ <None Include="Resources\mbapreq.thm">
76
+ <CopyToOutputSubDirectory>WixstdbaResources</CopyToOutputSubDirectory>
77
+ </None>
78
+ <None Include="Resources\mbapreq.wxl">
79
+ <CopyToOutputSubDirectory>WixstdbaResources</CopyToOutputSubDirectory>
80
+ </None>
81
+ <None Include="Resources\RtfTheme.wxl">
82
+ <CopyToOutputSubDirectory>WixstdbaResources</CopyToOutputSubDirectory>
83
+ </None>
84
+ <None Include="Resources\RtfTheme.xml">
85
+ <CopyToOutputSubDirectory>WixstdbaResources</CopyToOutputSubDirectory>
86
+ </None>
87
+ <None Include="Resources\RtfLargeTheme.xml">
88
+ <CopyToOutputSubDirectory>WixstdbaResources</CopyToOutputSubDirectory>
89
+ </None>
90
+ <None Include="Resources\*\mbapreq.wxl">
91
+ <CopyToOutputSubDirectory>Wixstdba%(RelativeDir)</CopyToOutputSubDirectory>
92
+ </None>
93
+ <None Include="wixstdba.def" />
94
+ </ItemGroup>
95
+ <ItemGroup>
96
+ <ResourceCompile Include="wixstdba.rc" />
97
+ <CustomBuild Include="wixstdba.mc">
98
+ <Message>Compiling message file...</Message>
99
+ <Command>mc.exe -h "$(IntDir)." -r "$(IntDir)." -A -c -z wixstdba.messages "$(InputDir)wixstdba.mc"
100
+rc.exe -fo "$(OutDir)wixstdba.res" "$(IntDir)wixstdba.messages.rc"</Command>
101
+ <Outputs>$(IntDir)wixstdba.messages.h;$(OutDir)wixstdba.messages.rc</Outputs>
102
+ </CustomBuild>
103
+ </ItemGroup>
104
+
105
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
106
+</Project>