From 1d3bd04d4aca82979b08a955dc0bf61eb80f2e66 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Fri, 4 Jun 2021 14:23:20 -0500 Subject: Add a manual test bundle for testing BAFunctions and thmutil. --- .../Manual/BafThmutilTesting/BafThmUtilTesting.cpp | 432 +++++++++++++++++++++ .../Manual/BafThmutilTesting/BafThmUtilTesting.def | 6 + .../BafThmutilTesting/BafThmUtilTesting.vcxproj | 64 +++ .../TestData/Manual/BafThmutilTesting/precomp.cpp | 46 +++ .../TestData/Manual/BafThmutilTesting/precomp.h | 40 ++ .../Manual/BafThmutilTesting/theme/128x128.png | Bin 0 -> 1484 bytes .../BafThmutilTesting/theme/128x128_focus.png | Bin 0 -> 1420 bytes .../BafThmutilTesting/theme/128x128_hover.png | Bin 0 -> 2312 bytes .../BafThmutilTesting/theme/128x128_selected.png | Bin 0 -> 1863 bytes .../Manual/BafThmutilTesting/theme/16x16.png | Bin 0 -> 206 bytes .../Manual/BafThmutilTesting/theme/256x256.png | Bin 0 -> 3208 bytes .../BafThmutilTesting/theme/256x256_focus.png | Bin 0 -> 3698 bytes .../BafThmutilTesting/theme/256x256_hover.png | Bin 0 -> 5171 bytes .../BafThmutilTesting/theme/256x256_selected.png | Bin 0 -> 5458 bytes .../Manual/BafThmutilTesting/theme/32x32.png | Bin 0 -> 243 bytes .../Manual/BafThmutilTesting/theme/64x64.png | Bin 0 -> 372 bytes .../Manual/BafThmutilTesting/theme/64x64_focus.png | Bin 0 -> 330 bytes .../Manual/BafThmutilTesting/theme/64x64_hover.png | Bin 0 -> 328 bytes .../BafThmutilTesting/theme/64x64_selected.png | Bin 0 -> 327 bytes .../theme/BafThmUtilTestingTheme.xml | 137 +++++++ .../Manual/BafThmutilTesting/theme/progressbar.bmp | Bin 0 -> 66 bytes .../theme/progressbar_reverse.bmp | Bin 0 -> 66 bytes .../Manual/BafThmutilTesting/theme/star_opaque.bmp | Bin 0 -> 262198 bytes .../BafThmutilTesting/theme/star_transparent.bmp | Bin 0 -> 262198 bytes .../BafThmutilTesting/theme/star_transparent.png | Bin 0 -> 1663 bytes .../Manual/BafThmutilTesting/theme/theme.rc | 20 + .../burn/TestData/Manual/BundleA/BundleA.wixproj | 18 + src/test/burn/TestData/Manual/BundleA/BundleA.wxs | 13 + .../burn/TestData/Manual/PackageA/PackageA.wixproj | 9 + 29 files changed, 785 insertions(+) create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.def create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.vcxproj create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/precomp.cpp create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/precomp.h create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/theme/128x128.png create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/theme/128x128_focus.png create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/theme/128x128_hover.png create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/theme/128x128_selected.png create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/theme/16x16.png create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/theme/256x256.png create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/theme/256x256_focus.png create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/theme/256x256_hover.png create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/theme/256x256_selected.png create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/theme/32x32.png create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/theme/64x64.png create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/theme/64x64_focus.png create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/theme/64x64_hover.png create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/theme/64x64_selected.png create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingTheme.xml create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/theme/progressbar.bmp create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/theme/progressbar_reverse.bmp create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/theme/star_opaque.bmp create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/theme/star_transparent.bmp create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/theme/star_transparent.png create mode 100644 src/test/burn/TestData/Manual/BafThmutilTesting/theme/theme.rc create mode 100644 src/test/burn/TestData/Manual/BundleA/BundleA.wixproj create mode 100644 src/test/burn/TestData/Manual/BundleA/BundleA.wxs create mode 100644 src/test/burn/TestData/Manual/PackageA/PackageA.wixproj diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp b/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp new file mode 100644 index 00000000..8b49cab6 --- /dev/null +++ b/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp @@ -0,0 +1,432 @@ +// 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. + +#include "precomp.h" +#include "BalBaseBAFunctions.h" +#include "BalBaseBAFunctionsProc.h" + +static const LPCWSTR BAFTHMUTILTESTING_WINDOW_CLASS = L"BafThmUtilTesting"; + +enum BAFTHMUTILTESTING_CONTROL +{ + BAFTHMUTILTESTING_CONTROL_LISTVIEW_TOP_LEFT = THEME_FIRST_ASSIGN_CONTROL_ID, + BAFTHMUTILTESTING_CONTROL_LISTVIEW_TOP_RIGHT, + BAFTHMUTILTESTING_CONTROL_LISTVIEW_BOTTOM_LEFT, + BAFTHMUTILTESTING_CONTROL_LISTVIEW_BOTTOM_RIGHT, + BAFTHMUTILTESTING_CONTROL_PROGRESSBAR_STANDARD, + BAFTHMUTILTESTING_CONTROL_PROGRESSBAR_IMAGE, +}; + +static THEME_ASSIGN_CONTROL_ID vrgInitControls[] = { + { BAFTHMUTILTESTING_CONTROL_LISTVIEW_TOP_LEFT, L"ListViewTopLeft" }, + { BAFTHMUTILTESTING_CONTROL_LISTVIEW_TOP_RIGHT, L"ListViewTopRight" }, + { BAFTHMUTILTESTING_CONTROL_LISTVIEW_BOTTOM_LEFT, L"ListViewBottomLeft" }, + { BAFTHMUTILTESTING_CONTROL_LISTVIEW_BOTTOM_RIGHT, L"ListViewBottomRight" }, + { BAFTHMUTILTESTING_CONTROL_PROGRESSBAR_IMAGE, L"ImageProgressBar" }, + { BAFTHMUTILTESTING_CONTROL_PROGRESSBAR_STANDARD, L"StandardProgressBar" }, +}; + +static void CALLBACK BafThmUtilTestingTraceError( + __in_z LPCSTR szFile, + __in int iLine, + __in REPORT_LEVEL rl, + __in UINT source, + __in HRESULT hrError, + __in_z __format_string LPCSTR szFormat, + __in va_list args + ); + +class CBafThmUtilTesting : public CBalBaseBAFunctions +{ +public: // IBAFunctions + /*virtual STDMETHODIMP OnThemeLoaded( + THEME* pTheme, + WIX_LOCALIZATION* pWixLoc + ) + { + HRESULT hr = S_OK; + + hr = __super::OnThemeLoaded(pTheme, pWixLoc); + + return hr; + }*/ + + virtual STDMETHODIMP WndProc( + __in THEME* pTheme, + __in HWND hWnd, + __in UINT uMsg, + __in WPARAM wParam, + __in LPARAM lParam, + __inout LRESULT* plRes + ) + { + HRESULT hr = S_OK; + + __super::WndProc(pTheme, hWnd, uMsg, wParam, lParam, plRes); + + // Show our window when any button is clicked. + switch (uMsg) + { + case WM_COMMAND: + switch (HIWORD(wParam)) + { + case BN_CLICKED: + OnShowTheme(); + break; + } + break; + } + + return hr; + } + +private: + HRESULT OnShowTheme() + { + HRESULT hr = S_OK; + BOOL fRet = FALSE; + MSG msg = { }; + + hr = ThemeLoadFromResource(m_hModule, MAKEINTRESOURCEA(1), &m_pBafTheme); + BalExitOnFailure(hr, "Failed to load BafThmUtilTesting theme."); + + hr = CreateTestingWindow(); + BalExitOnFailure(hr, "Failed to create BafThmUtilTesting window."); + + ::EnableWindow(m_pTheme->hwndParent, FALSE); + + // message pump + while (0 != (fRet = ::GetMessageW(&msg, NULL, 0, 0))) + { + if (-1 == fRet) + { + hr = E_UNEXPECTED; + BalExitOnFailure(hr, "Unexpected return value from message pump."); + } + else if (!ThemeHandleKeyboardMessage(m_pBafTheme, msg.hwnd, &msg)) + { + ::TranslateMessage(&msg); + ::DispatchMessageW(&msg); + } + } + + LExit: + ::EnableWindow(m_pTheme->hwndParent, TRUE); + + DestroyTestingWindow(); + + ReleaseTheme(m_pBafTheme); + + return hr; + } + + HRESULT CreateTestingWindow() + { + HRESULT hr = S_OK; + HICON hIcon = reinterpret_cast(m_pTheme->hIcon); + WNDCLASSW wc = { }; + int x = CW_USEDEFAULT; + int y = CW_USEDEFAULT; + POINT ptCursor = { }; + + // If the theme did not provide an icon, try using the icon from the bundle engine. + if (!hIcon) + { + HMODULE hBootstrapperEngine = ::GetModuleHandleW(NULL); + if (hBootstrapperEngine) + { + hIcon = ::LoadIconW(hBootstrapperEngine, MAKEINTRESOURCEW(1)); + } + } + + // Register the window class and create the window. + wc.lpfnWndProc = CBafThmUtilTesting::TestingWndProc; + wc.hInstance = m_hModule; + wc.hIcon = hIcon; + wc.hCursor = ::LoadCursorW(NULL, (LPCWSTR)IDC_ARROW); + wc.hbrBackground = m_pTheme->rgFonts[m_pBafTheme->dwFontId].hBackground; + wc.lpszMenuName = NULL; + wc.lpszClassName = BAFTHMUTILTESTING_WINDOW_CLASS; + if (!::RegisterClassW(&wc)) + { + ExitWithLastError(hr, "Failed to register window."); + } + + m_fRegistered = TRUE; + + // Center the window on the monitor with the mouse. + if (::GetCursorPos(&ptCursor)) + { + x = ptCursor.x; + y = ptCursor.y; + } + + hr = ThemeCreateParentWindow(m_pBafTheme, 0, wc.lpszClassName, m_pBafTheme->sczCaption, m_pBafTheme->dwStyle, x, y, m_pTheme->hwndParent, m_hModule, this, THEME_WINDOW_INITIAL_POSITION_CENTER_MONITOR_FROM_COORDINATES, &m_hWndBaf); + ExitOnFailure(hr, "Failed to create window."); + + hr = S_OK; + + LExit: + return hr; + } + + void DestroyTestingWindow() + { + if (::IsWindow(m_hWndBaf)) + { + ::DestroyWindow(m_hWndBaf); + m_hWndBaf = NULL; + } + + if (m_fRegistered) + { + ::UnregisterClassW(BAFTHMUTILTESTING_WINDOW_CLASS, m_hModule); + m_fRegistered = FALSE; + } + } + + static LRESULT CALLBACK TestingWndProc( + __in HWND hWnd, + __in UINT uMsg, + __in WPARAM wParam, + __in LPARAM lParam + ) + { +#pragma warning(suppress:4312) + CBafThmUtilTesting* pBaf = reinterpret_cast(::GetWindowLongPtrW(hWnd, GWLP_USERDATA)); + + switch (uMsg) + { + case WM_NCCREATE: + { + LPCREATESTRUCT lpcs = reinterpret_cast(lParam); + pBaf = reinterpret_cast(lpcs->lpCreateParams); +#pragma warning(suppress:4244) + ::SetWindowLongPtrW(hWnd, GWLP_USERDATA, reinterpret_cast(pBaf)); + break; + } + + case WM_CLOSE: + if (pBaf) + { + ::EnableWindow(pBaf->m_pTheme->hwndParent, TRUE); + } + + break; + + case WM_NCDESTROY: + { + LRESULT lres = ThemeDefWindowProc(pBaf ? pBaf->m_pBafTheme : NULL, hWnd, uMsg, wParam, lParam); + ::SetWindowLongPtrW(hWnd, GWLP_USERDATA, 0); + + ::PostQuitMessage(0); + return lres; + } + + case WM_CREATE: + if (!pBaf->OnCreate(hWnd)) + { + return -1; + } + break; + + case WM_TIMER: + if (!lParam && pBaf) + { + pBaf->UpdateProgressBarProgress(); + + return 0; + } + break; + } + + return ThemeDefWindowProc(pBaf ? pBaf->m_pBafTheme : NULL, hWnd, uMsg, wParam, lParam); + } + + BOOL OnCreate( + __in HWND hWnd + ) + { + HRESULT hr = S_OK; + LVITEMW lvitem = { }; + LVGROUP lvgroup = { }; + static UINT puColumns[] = { 0, 1, 2 }; + HWND hwndTopLeft = NULL; + HWND hwndTopRight = NULL; + HWND hwndBottomLeft = NULL; + HWND hwndBottomRight = NULL; + + hr = ThemeLoadControls(m_pBafTheme, vrgInitControls, countof(vrgInitControls)); + BalExitOnFailure(hr, "Failed to load theme controls."); + + hwndTopLeft = ::GetDlgItem(m_pBafTheme->hwndParent, BAFTHMUTILTESTING_CONTROL_LISTVIEW_TOP_LEFT); + BalExitOnNull(hwndTopLeft, hr, E_INVALIDSTATE, "Failed to get top left list view hWnd."); + + hwndTopRight = ::GetDlgItem(m_pBafTheme->hwndParent, BAFTHMUTILTESTING_CONTROL_LISTVIEW_TOP_RIGHT); + BalExitOnNull(hwndTopRight, hr, E_INVALIDSTATE, "Failed to get top right list view hWnd."); + + hwndBottomLeft = ::GetDlgItem(m_pBafTheme->hwndParent, BAFTHMUTILTESTING_CONTROL_LISTVIEW_BOTTOM_LEFT); + BalExitOnNull(hwndBottomLeft, hr, E_INVALIDSTATE, "Failed to get bottom left list view hWnd."); + + hwndBottomRight = ::GetDlgItem(m_pBafTheme->hwndParent, BAFTHMUTILTESTING_CONTROL_LISTVIEW_BOTTOM_RIGHT); + BalExitOnNull(hwndBottomRight, hr, E_INVALIDSTATE, "Failed to get bottom right list view hWnd."); + + lvgroup.cbSize = sizeof(LVGROUP); + lvgroup.mask = LVGF_GROUPID | LVGF_TITLEIMAGE | LVGF_DESCRIPTIONTOP | LVGF_HEADER; + + for (int i = 0; i < 3; ++i) + { + lvgroup.iGroupId = i; + lvgroup.iTitleImage = i; + + hr = StrAllocFormatted(&lvgroup.pszDescriptionTop, L"DescriptionTop_%d", i); + BalExitOnFailure(hr, "Failed to alloc list view group description."); + + hr = StrAllocFormatted(&lvgroup.pszHeader, L"Header_%d", i); + BalExitOnFailure(hr, "Failed to alloc list view group header."); + + ListView_InsertGroup(hwndTopLeft, -1, &lvgroup); + ListView_InsertGroup(hwndTopRight, -1, &lvgroup); + ListView_InsertGroup(hwndBottomLeft, -1, &lvgroup); + ListView_InsertGroup(hwndBottomRight, -1, &lvgroup); + + lvitem.mask = LVIF_COLUMNS | LVIF_GROUPID | LVIF_IMAGE | LVIF_TEXT; + lvitem.iItem = i; + lvitem.iSubItem = 0; + + hr = StrAllocFormatted(&lvitem.pszText, L"ListViewItem_%d", i); + BalExitOnFailure(hr, "Failed to alloc list view item text."); + + lvitem.iImage = i; + lvitem.iGroupId = i; + lvitem.cColumns = countof(puColumns); + lvitem.puColumns = puColumns; + + ListView_InsertItem(hwndTopLeft, &lvitem); + ListView_InsertItem(hwndTopRight, &lvitem); + ListView_InsertItem(hwndBottomLeft, &lvitem); + ListView_InsertItem(hwndBottomRight, &lvitem); + + for (int j = 0; j < 3; ++j) + { + lvitem.mask = LVIF_TEXT; + lvitem.iSubItem = j + 1; + + hr = StrAllocFormatted(&lvitem.pszText, L"%d_%d", j, i); + BalExitOnFailure(hr, "Failed to alloc list view subitem text."); + + ListView_InsertItem(hwndTopLeft, &lvitem); + ListView_InsertItem(hwndTopRight, &lvitem); + ListView_InsertItem(hwndBottomLeft, &lvitem); + ListView_InsertItem(hwndBottomRight, &lvitem); + } + } + + ListView_EnableGroupView(hwndTopRight, TRUE); + + ::SetTimer(hWnd, BAFTHMUTILTESTING_CONTROL_PROGRESSBAR_IMAGE, 500, NULL); + + LExit: + ReleaseStr(lvgroup.pszDescriptionTop); + ReleaseStr(lvgroup.pszHeader); + ReleaseStr(lvitem.pszText); + + return SUCCEEDED(hr); + } + + void UpdateProgressBarProgress() + { + static DWORD dwProgress = 0; + DWORD dwCurrent = dwProgress < 100 ? dwProgress : 200 - dwProgress; + + if (0 == dwProgress || 100 == dwProgress) + { + ThemeSetProgressControlColor(m_pBafTheme, BAFTHMUTILTESTING_CONTROL_PROGRESSBAR_IMAGE, 100 == dwProgress ? 1 : 0); + } + + dwProgress = (dwProgress + 10) % 200; + + ThemeSetProgressControl(m_pBafTheme, BAFTHMUTILTESTING_CONTROL_PROGRESSBAR_IMAGE, dwCurrent); + ThemeSetProgressControl(m_pBafTheme, BAFTHMUTILTESTING_CONTROL_PROGRESSBAR_STANDARD, dwCurrent); + } + +public: + // + // Constructor - initialize member variables. + // + CBafThmUtilTesting( + __in HMODULE hModule, + __in IBootstrapperEngine* pEngine, + __in const BA_FUNCTIONS_CREATE_ARGS* pArgs + ) : CBalBaseBAFunctions(hModule, pEngine, pArgs) + { + m_pBafTheme = NULL; + m_fRegistered = FALSE; + m_hWndBaf = NULL; + + ThemeInitialize(hModule); + } + + // + // Destructor - release member variables. + // + ~CBafThmUtilTesting() + { + Assert(!::IsWindow(m_hWndBaf)); + Assert(!m_pBafTheme); + + ThemeUninitialize(); + } + +private: + THEME* m_pBafTheme; + BOOL m_fRegistered; + HWND m_hWndBaf; +}; + + +HRESULT WINAPI CreateBAFunctions( + __in HMODULE hModule, + __in const BA_FUNCTIONS_CREATE_ARGS* pArgs, + __inout BA_FUNCTIONS_CREATE_RESULTS* pResults + ) +{ + HRESULT hr = S_OK; + CBafThmUtilTesting* pBAFunctions = NULL; + IBootstrapperEngine* pEngine = NULL; + + DutilInitialize(&BafThmUtilTestingTraceError); + + hr = BalInitializeFromCreateArgs(pArgs->pBootstrapperCreateArgs, &pEngine); + ExitOnFailure(hr, "Failed to initialize Bal."); + + pBAFunctions = new CBafThmUtilTesting(hModule, pEngine, pArgs); + ExitOnNull(pBAFunctions, hr, E_OUTOFMEMORY, "Failed to create new CBafThmUtilTesting object."); + + pResults->pfnBAFunctionsProc = BalBaseBAFunctionsProc; + pResults->pvBAFunctionsProcContext = pBAFunctions; + pBAFunctions = NULL; + +LExit: + ReleaseObject(pBAFunctions); + ReleaseObject(pEngine); + + return hr; +} + +static void CALLBACK BafThmUtilTestingTraceError( + __in_z LPCSTR /*szFile*/, + __in int /*iLine*/, + __in REPORT_LEVEL /*rl*/, + __in UINT source, + __in HRESULT hrError, + __in_z __format_string LPCSTR szFormat, + __in va_list args + ) +{ + // BalLogError currently uses the Exit... macros, + // so if expanding the scope need to ensure this doesn't get called recursively. + if (DUTIL_SOURCE_THMUTIL == source) + { + BalLogErrorArgs(hrError, szFormat, args); + } +} diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.def b/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.def new file mode 100644 index 00000000..6e016dad --- /dev/null +++ b/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.def @@ -0,0 +1,6 @@ +; 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. + + +EXPORTS + BAFunctionsCreate + BAFunctionsDestroy diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.vcxproj b/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.vcxproj new file mode 100644 index 00000000..8e7e9bd9 --- /dev/null +++ b/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.vcxproj @@ -0,0 +1,64 @@ + + + + + + Debug + ARM64 + + + Release + ARM64 + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {565E99AE-975F-4F26-8A6E-852603386A80} + DynamicLibrary + v142 + Unicode + BafThmUtilTesting + BafThmUtilTesting.def + + + + + comctl32.lib;gdiplus.lib;msimg32.lib;shlwapi.lib;wininet.lib + + + + + Create + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/precomp.cpp b/src/test/burn/TestData/Manual/BafThmutilTesting/precomp.cpp new file mode 100644 index 00000000..b20f4230 --- /dev/null +++ b/src/test/burn/TestData/Manual/BafThmutilTesting/precomp.cpp @@ -0,0 +1,46 @@ +// 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. + +#include "precomp.h" + +static HINSTANCE vhInstance = NULL; + +extern "C" BOOL WINAPI DllMain( + IN HINSTANCE hInstance, + IN DWORD dwReason, + IN LPVOID /* pvReserved */ + ) +{ + switch (dwReason) + { + case DLL_PROCESS_ATTACH: + ::DisableThreadLibraryCalls(hInstance); + vhInstance = hInstance; + break; + + case DLL_PROCESS_DETACH: + vhInstance = NULL; + break; + } + + return TRUE; +} + +extern "C" HRESULT WINAPI BAFunctionsCreate( + __in const BA_FUNCTIONS_CREATE_ARGS* pArgs, + __inout BA_FUNCTIONS_CREATE_RESULTS* pResults + ) +{ + HRESULT hr = S_OK; + + hr = CreateBAFunctions(vhInstance, pArgs, pResults); + BalExitOnFailure(hr, "Failed to create BAFunctions interface."); + +LExit: + return hr; +} + +extern "C" void WINAPI BAFunctionsDestroy( + ) +{ + BalUninitialize(); +} diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/precomp.h b/src/test/burn/TestData/Manual/BafThmutilTesting/precomp.h new file mode 100644 index 00000000..e7cd39dc --- /dev/null +++ b/src/test/burn/TestData/Manual/BafThmutilTesting/precomp.h @@ -0,0 +1,40 @@ +#pragma once +// 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. + + +#include + +#pragma warning(push) +#pragma warning(disable:4458) // declaration of 'xxx' hides class member +#include +#pragma warning(pop) + +#include +#include +#include +#include +#include +#include +#include + +#include "dutil.h" +#include "dictutil.h" +#include "fileutil.h" +#include "locutil.h" +#include "pathutil.h" +#include "strutil.h" +#include "thmutil.h" +#include "regutil.h" +#include "xmlutil.h" + +#include "BalBaseBootstrapperApplication.h" +#include "balutil.h" + +#include "BAFunctions.h" +#include "IBAFunctions.h" + +HRESULT WINAPI CreateBAFunctions( + __in HMODULE hModule, + __in const BA_FUNCTIONS_CREATE_ARGS* pArgs, + __inout BA_FUNCTIONS_CREATE_RESULTS* pResults + ); diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/128x128.png b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/128x128.png new file mode 100644 index 00000000..4dfceeba Binary files /dev/null and b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/128x128.png differ diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/128x128_focus.png b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/128x128_focus.png new file mode 100644 index 00000000..2caffb30 Binary files /dev/null and b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/128x128_focus.png differ diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/128x128_hover.png b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/128x128_hover.png new file mode 100644 index 00000000..8242b0d1 Binary files /dev/null and b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/128x128_hover.png differ diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/128x128_selected.png b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/128x128_selected.png new file mode 100644 index 00000000..7355fc06 Binary files /dev/null and b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/128x128_selected.png differ diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/16x16.png b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/16x16.png new file mode 100644 index 00000000..52975ac0 Binary files /dev/null and b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/16x16.png differ diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/256x256.png b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/256x256.png new file mode 100644 index 00000000..6924ec48 Binary files /dev/null and b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/256x256.png differ diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/256x256_focus.png b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/256x256_focus.png new file mode 100644 index 00000000..8cc141b2 Binary files /dev/null and b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/256x256_focus.png differ diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/256x256_hover.png b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/256x256_hover.png new file mode 100644 index 00000000..a1cff210 Binary files /dev/null and b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/256x256_hover.png differ diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/256x256_selected.png b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/256x256_selected.png new file mode 100644 index 00000000..184c1f78 Binary files /dev/null and b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/256x256_selected.png differ diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/32x32.png b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/32x32.png new file mode 100644 index 00000000..01d621b3 Binary files /dev/null and b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/32x32.png differ diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/64x64.png b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/64x64.png new file mode 100644 index 00000000..697274f9 Binary files /dev/null and b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/64x64.png differ diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/64x64_focus.png b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/64x64_focus.png new file mode 100644 index 00000000..7bd5b2ca Binary files /dev/null and b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/64x64_focus.png differ diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/64x64_hover.png b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/64x64_hover.png new file mode 100644 index 00000000..88b2e8c2 Binary files /dev/null and b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/64x64_hover.png differ diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/64x64_selected.png b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/64x64_selected.png new file mode 100644 index 00000000..39e75799 Binary files /dev/null and b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/64x64_selected.png differ diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingTheme.xml b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingTheme.xml new file mode 100644 index 00000000..0d0dabf5 --- /dev/null +++ b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/BafThmUtilTestingTheme.xml @@ -0,0 +1,137 @@ + + + + + + Segoe UI + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TL One + TL Two + TL Three + + + TR One + TR Two + TR Exp + + + BL One + BL Two + BL Three + + + BR One + BR Two + BR Exp + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/progressbar.bmp b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/progressbar.bmp new file mode 100644 index 00000000..2bab3944 Binary files /dev/null and b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/progressbar.bmp differ diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/progressbar_reverse.bmp b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/progressbar_reverse.bmp new file mode 100644 index 00000000..6fedd05e Binary files /dev/null and b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/progressbar_reverse.bmp differ diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/star_opaque.bmp b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/star_opaque.bmp new file mode 100644 index 00000000..230d958c Binary files /dev/null and b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/star_opaque.bmp differ diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/star_transparent.bmp b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/star_transparent.bmp new file mode 100644 index 00000000..6596bcff Binary files /dev/null and b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/star_transparent.bmp differ diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/star_transparent.png b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/star_transparent.png new file mode 100644 index 00000000..2f018763 Binary files /dev/null and b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/star_transparent.png differ diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/theme/theme.rc b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/theme.rc new file mode 100644 index 00000000..808d29d5 --- /dev/null +++ b/src/test/burn/TestData/Manual/BafThmutilTesting/theme/theme.rc @@ -0,0 +1,20 @@ +1 RCDATA "BafThmutilTestingTheme.xml" +2 RCDATA "star_transparent.bmp" +3 RCDATA "star_opaque.bmp" +4 RCDATA "star_transparent.png" +5 RCDATA "16x16.png" +6 RCDATA "32x32.png" +7 RCDATA "64x64.png" +8 RCDATA "128x128.png" +9 RCDATA "256x256.png" +13 RCDATA "64x64_focus.png" +14 RCDATA "128x128_focus.png" +15 RCDATA "256x256_focus.png" +19 RCDATA "64x64_hover.png" +20 RCDATA "128x128_hover.png" +21 RCDATA "256x256_hover.png" +25 RCDATA "64x64_selected.png" +26 RCDATA "128x128_selected.png" +27 RCDATA "256x256_selected.png" +30 RCDATA "progressbar.bmp" +31 RCDATA "progressbar_reverse.bmp" \ No newline at end of file diff --git a/src/test/burn/TestData/Manual/BundleA/BundleA.wixproj b/src/test/burn/TestData/Manual/BundleA/BundleA.wixproj new file mode 100644 index 00000000..dcfd3b7e --- /dev/null +++ b/src/test/burn/TestData/Manual/BundleA/BundleA.wixproj @@ -0,0 +1,18 @@ + + + + Bundle + hyperlinkLicense + {98ACBCF6-B54A-46AF-8990-DFB8795B965B} + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/burn/TestData/Manual/BundleA/BundleA.wxs b/src/test/burn/TestData/Manual/BundleA/BundleA.wxs new file mode 100644 index 00000000..1706f4e8 --- /dev/null +++ b/src/test/burn/TestData/Manual/BundleA/BundleA.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/src/test/burn/TestData/Manual/PackageA/PackageA.wixproj b/src/test/burn/TestData/Manual/PackageA/PackageA.wixproj new file mode 100644 index 00000000..c9c81c3a --- /dev/null +++ b/src/test/burn/TestData/Manual/PackageA/PackageA.wixproj @@ -0,0 +1,9 @@ + + + + {0D803A6E-8090-4174-8DAC-810ECC2B1BBF} + + + + + \ No newline at end of file -- cgit v1.2.3-55-g6feb