diff --git a/scripts/admin/copy-windows-installer-from-jenkins.sh b/scripts/admin/copy-windows-installer-from-jenkins.sh deleted file mode 100755 index 1cea82aeae..0000000000 --- a/scripts/admin/copy-windows-installer-from-jenkins.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash - -# Run this script on Mac/Linux, not on Windows -# Requires awscli to be installed and an appropriate ~/.aws/config. -# Usage: -# scripts/admin/copy-windows-installer-from-jenkins.sh BUILDNUMBER -# where BUILDNUMBER is the small integer Jenkins build number. - -set -e -set -u - -cd "$(dirname "$0")" - -TARGET="s3://meteor-windows/installers/" - -if [ $# -ne 1 ]; then - echo "usage: $0 jenkins-build-number" 1>&2 - exit 1 -fi - -# installer-windows--${METEOR_RELEASE}--${BUILD_ID}--${BUILD_NUMBER}--${GIT_COMMIT} -DIRNAME=$(aws s3 ls s3://com.meteor.jenkins/ | perl -nle 'print $1 if m!(installer-windows--.+--.+--'$1'--.+)/!') -RELEASE=$(echo $DIRNAME | perl -pe 's/^installer-windows--(.+)--.+--.+--.+$/$1/') - -if [ -z "$DIRNAME" ]; then - echo "build not found" 1>&2 - exit 1 -fi - -echo Found build "$DIRNAME" - -# aws s3 ls returns 0 when it lists nothing -if [[ $(aws s3 ls "s3://com.meteor.jenkins/$DIRNAME/InstallMeteor.exe" | wc -l) == 0 ]]; then - echo "InstallMeteor.exe wasn't found in $DIRNAME, did Jenkins job fail?" - exit 1 -fi - -aws s3 cp --acl public-read --recursive "s3://com.meteor.jenkins/$DIRNAME/" "$TARGET$RELEASE/" - diff --git a/scripts/windows/.gitignore b/scripts/windows/.gitignore deleted file mode 100644 index 570ab4c1bb..0000000000 --- a/scripts/windows/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -*.tar.gz -*.exe -*.pdb -*_.cs diff --git a/scripts/windows/README b/scripts/windows/README deleted file mode 100644 index 9da26cebab..0000000000 --- a/scripts/windows/README +++ /dev/null @@ -1,17 +0,0 @@ -To build the Windows installer, run .\build-installer.ps1 from within -PowerShell. - -Prerequisites: -============== - -Install Visual C++ 2010 Express, which can be found here: -* http://www.visualstudio.com/downloads/download-visual-studio-vs - -Then, install Visual Studio 2010 Service Pack 1 here: -* http://www.microsoft.com/en-us/download/details.aspx?id=23691 - -Now, install WiX Toolset 3.8 from here: -* https://wix.codeplex.com/releases/view/115492 - -Now restart your command line process before running the build script -again. diff --git a/scripts/windows/build-installer.ps1 b/scripts/windows/build-installer.ps1 deleted file mode 100644 index 903b58c85d..0000000000 --- a/scripts/windows/build-installer.ps1 +++ /dev/null @@ -1,23 +0,0 @@ -$ErrorActionPreference = "Stop" -$script_path = (split-path -parent $MyInvocation.MyCommand.Definition) + "\" - -echo "Compiling InstallMeteor" - -$web_client = new-object System.Net.WebClient - -# download 7za.exe, a build dependency that we don't want to compile each time -$7za_path = $script_path + "installer\WiXInstaller\Resources\7za.exe" -if (!(Test-Path $7za_path)) { - echo "Downloading binary dependencies: 7za" - $7za_url = "https://s3.amazonaws.com/meteor-windows/build-deps/7za.exe" - $web_client.DownloadFile($7za_url, $7za_path) -} - -Push-Location installer -Invoke-Expression ("cmd /c build.bat") -Pop-Location - -move-item ($script_path + "installer\Release\InstallMeteor.exe") ($script_path + "InstallMeteor.exe") -Force - -echo "Done" - diff --git a/scripts/windows/installer/.gitignore b/scripts/windows/installer/.gitignore deleted file mode 100644 index bf0120d310..0000000000 --- a/scripts/windows/installer/.gitignore +++ /dev/null @@ -1,111 +0,0 @@ -# Build Folders (you can keep bin if you'd like, to store dlls and pdbs) -[Bb]in/ -[Oo]bj/ - -# mstest test results -TestResults - -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# User-specific files -*.suo -*.user -*.sln.docstates - -# Build results -[Dd]ebug/ -[Rr]elease/ -x64/ -*_i.c -*_p.c -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.dll -*.exe -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.log -*.vspscc -*.vssscc -.builds - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opensdf -*.sdf - -# Visual Studio profiler -*.psess -*.vsp -*.vspx - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper* - -# NCrunch -*.ncrunch* -.*crunch*.local.xml - -# Installshield output folder -[Ee]xpress - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish - -# Publish Web Output -*.Publish.xml - -# NuGet Packages Directory -packages - -# Windows Azure Build Output -csx -*.build.csdef - -# Windows Store app package directory -AppPackages/ - -# Others -[Bb]in -[Oo]bj -sql -TestResults -[Tt]est[Rr]esult* -*.Cache -ClientBin -[Ss]tyle[Cc]op.* -~$* -*.dbmdl -Generated_Code #added for RIA/Silverlight projects - -# Backup & report files from converting an old project file to a newer -# Visual Studio version. Backup files are not needed, because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML - diff --git a/scripts/windows/installer/MeteorSetup.sln b/scripts/windows/installer/MeteorSetup.sln deleted file mode 100755 index 343679350b..0000000000 --- a/scripts/windows/installer/MeteorSetup.sln +++ /dev/null @@ -1,29 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "MSIPackage", "WiXInstaller\MSIPackage.wixproj", "{E053726B-937B-40C7-8F3D-25A3226979D9}" -EndProject -Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "SetupPackage", "WiXInstaller\SetupPackage.wixproj", "{7B569F5B-5D73-4E7B-BE41-041A2F22A521}" - ProjectSection(ProjectDependencies) = postProject - {E053726B-937B-40C7-8F3D-25A3226979D9} = {E053726B-937B-40C7-8F3D-25A3226979D9} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E053726B-937B-40C7-8F3D-25A3226979D9}.Release|x64.ActiveCfg = Release|x64 - {E053726B-937B-40C7-8F3D-25A3226979D9}.Release|x64.Build.0 = Release|x64 - {E053726B-937B-40C7-8F3D-25A3226979D9}.Release|x86.ActiveCfg = Release|x86 - {E053726B-937B-40C7-8F3D-25A3226979D9}.Release|x86.Build.0 = Release|x86 - {7B569F5B-5D73-4E7B-BE41-041A2F22A521}.Release|x64.ActiveCfg = Release|x64 - {7B569F5B-5D73-4E7B-BE41-041A2F22A521}.Release|x64.Build.0 = Release|x64 - {7B569F5B-5D73-4E7B-BE41-041A2F22A521}.Release|x86.ActiveCfg = Release|x86 - {7B569F5B-5D73-4E7B-BE41-041A2F22A521}.Release|x86.Build.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/scripts/windows/installer/WiXBalExtension/.gitignore b/scripts/windows/installer/WiXBalExtension/.gitignore deleted file mode 100644 index 57a1574c4f..0000000000 --- a/scripts/windows/installer/WiXBalExtension/.gitignore +++ /dev/null @@ -1,196 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -build/ -bld/ -[Bb]in/ -[Oo]bj/ - -# Visual Studo 2015 cache/options directory -.vs/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opensdf -*.sdf -*.cachefile - -# Visual Studio profiler -*.psess -*.vsp -*.vspx - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding addin-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -_NCrunch_* -.*crunch*.local.xml - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# TODO: Comment the next line if you want to checkin your web deploy settings -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config - -# Windows Azure Build Output -csx/ -*.build.csdef - -# Windows Store app package directory -AppPackages/ - -# Others -*.[Cc]ache -ClientBin/ -[Ss]tyle[Cc]op.* -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.pfx -*.publishsettings -node_modules/ -bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt diff --git a/scripts/windows/installer/WiXBalExtension/BalExtensionExt.sln b/scripts/windows/installer/WiXBalExtension/BalExtensionExt.sln deleted file mode 100755 index e7fa75fe30..0000000000 --- a/scripts/windows/installer/WiXBalExtension/BalExtensionExt.sln +++ /dev/null @@ -1,66 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wixextba", "wixstdba\wixstdba.vcxproj", "{41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}" -EndProject -Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "BalExtension", "wixlib\BalExtension.wixproj", "{3444D952-F21C-496F-AB6B-56435BFD0787}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBalExtensionExt", "wixext\WixBalExtensionExt.csproj", "{6F9B6AFD-538B-4DF6-A1E8-6C224CBD7B05}" - ProjectSection(ProjectDependencies) = postProject - {3444D952-F21C-496F-AB6B-56435BFD0787} = {3444D952-F21C-496F-AB6B-56435BFD0787} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|Mixed Platforms = Debug|Mixed Platforms - Debug|Win32 = Debug|Win32 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|Mixed Platforms = Release|Mixed Platforms - Release|Win32 = Release|Win32 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Debug|Any CPU.Build.0 = Debug|Win32 - {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Debug|Win32.ActiveCfg = Debug|Win32 - {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Debug|Win32.Build.0 = Debug|Win32 - {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Debug|x86.ActiveCfg = Debug|Win32 - {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Release|Any CPU.ActiveCfg = Debug|Win32 - {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Release|Mixed Platforms.Build.0 = Release|Win32 - {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Release|Win32.ActiveCfg = Debug|Win32 - {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Release|Win32.Build.0 = Debug|Win32 - {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Release|x86.ActiveCfg = Debug|Win32 - {3444D952-F21C-496F-AB6B-56435BFD0787}.Debug|Any CPU.ActiveCfg = Debug|x86 - {3444D952-F21C-496F-AB6B-56435BFD0787}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {3444D952-F21C-496F-AB6B-56435BFD0787}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {3444D952-F21C-496F-AB6B-56435BFD0787}.Debug|Win32.ActiveCfg = Debug|x86 - {3444D952-F21C-496F-AB6B-56435BFD0787}.Debug|x86.ActiveCfg = Debug|x86 - {3444D952-F21C-496F-AB6B-56435BFD0787}.Debug|x86.Build.0 = Debug|x86 - {3444D952-F21C-496F-AB6B-56435BFD0787}.Release|Any CPU.ActiveCfg = Release|x86 - {3444D952-F21C-496F-AB6B-56435BFD0787}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {3444D952-F21C-496F-AB6B-56435BFD0787}.Release|Mixed Platforms.Build.0 = Release|x86 - {3444D952-F21C-496F-AB6B-56435BFD0787}.Release|Win32.ActiveCfg = Release|x86 - {3444D952-F21C-496F-AB6B-56435BFD0787}.Release|x86.ActiveCfg = Release|x86 - {3444D952-F21C-496F-AB6B-56435BFD0787}.Release|x86.Build.0 = Release|x86 - {6F9B6AFD-538B-4DF6-A1E8-6C224CBD7B05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6F9B6AFD-538B-4DF6-A1E8-6C224CBD7B05}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6F9B6AFD-538B-4DF6-A1E8-6C224CBD7B05}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {6F9B6AFD-538B-4DF6-A1E8-6C224CBD7B05}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {6F9B6AFD-538B-4DF6-A1E8-6C224CBD7B05}.Debug|Win32.ActiveCfg = Debug|Any CPU - {6F9B6AFD-538B-4DF6-A1E8-6C224CBD7B05}.Debug|x86.ActiveCfg = Debug|Any CPU - {6F9B6AFD-538B-4DF6-A1E8-6C224CBD7B05}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6F9B6AFD-538B-4DF6-A1E8-6C224CBD7B05}.Release|Any CPU.Build.0 = Release|Any CPU - {6F9B6AFD-538B-4DF6-A1E8-6C224CBD7B05}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {6F9B6AFD-538B-4DF6-A1E8-6C224CBD7B05}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {6F9B6AFD-538B-4DF6-A1E8-6C224CBD7B05}.Release|Win32.ActiveCfg = Release|Any CPU - {6F9B6AFD-538B-4DF6-A1E8-6C224CBD7B05}.Release|x86.ActiveCfg = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/scripts/windows/installer/WiXBalExtension/LICENSE.TXT b/scripts/windows/installer/WiXBalExtension/LICENSE.TXT deleted file mode 100755 index 9e3440147b..0000000000 --- a/scripts/windows/installer/WiXBalExtension/LICENSE.TXT +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2004, Outercurve Foundation. -This software is released under the Microsoft Reciprocal License (MS-RL) (the "License"); you may not use the software except in compliance with the License. - -The text of the Microsoft Reciprocal License (MS-RL) can be found online at: - http://opensource.org/licenses/ms-rl - - -Microsoft Reciprocal License (MS-RL) - -This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. - -1. Definitions - The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. - A "contribution" is the original software, or any additions or changes to the software. - A "contributor" is any person that distributes its contribution under this license. - "Licensed patents" are a contributor's patent claims that read directly on its contribution. - -2. Grant of Rights - (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. - (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. - -3. Conditions and Limitations - (A) Reciprocal Grants- For any file you distribute that contains code from the software (in source code or binary format), you must provide recipients the source code to that file along with a copy of this license, which license will govern that file. You may license other files that are entirely your own work and do not contain code from the software under any terms you choose. - (B) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. - (C) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. - (D) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. - (E) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. - (F) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. diff --git a/scripts/windows/installer/WiXBalExtension/build.bat b/scripts/windows/installer/WiXBalExtension/build.bat deleted file mode 100755 index d212696f1e..0000000000 --- a/scripts/windows/installer/WiXBalExtension/build.bat +++ /dev/null @@ -1,35 +0,0 @@ -@echo off - -rem Configuring environment -set MSBUILD="%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" - -set outdir=%~dp0build - -rem Removing release folder -Call :DeleteDir "%outdir%" -Call :DeleteDir "ipch" - -%MSBUILD% inc\Version.proj /nologo /verbosity:quiet -%MSBUILD% BalExtensionExt.sln /nologo /verbosity:quiet /t:Rebuild /p:Configuration=Release /p:Platform="Mixed Platforms" /p:RunCodeAnalysis=false /p:DefineConstants="TRACE" /p:OutDir="%outdir%\\" /l:FileLogger,Microsoft.Build.Engine;logfile=build.log -if %errorlevel% neq 0 ( - echo Build failed - rem pause - goto :EOF -) - - -set outdir= - -goto :EOF - -REM ***************************************************************** -REM End of Main -REM ***************************************************************** - - -REM ***************************************************************** -REM Delete/create directory -REM ***************************************************************** -:DeleteDir -rd %1% /q/s 2>nul 1>nul -goto :EOF diff --git a/scripts/windows/installer/WiXBalExtension/inc/.gitignore b/scripts/windows/installer/WiXBalExtension/inc/.gitignore deleted file mode 100644 index eea9b0070e..0000000000 --- a/scripts/windows/installer/WiXBalExtension/inc/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -wixver.cs -wixver.h - diff --git a/scripts/windows/installer/WiXBalExtension/inc/Version.proj b/scripts/windows/installer/WiXBalExtension/inc/Version.proj deleted file mode 100755 index 68eb1251d4..0000000000 --- a/scripts/windows/installer/WiXBalExtension/inc/Version.proj +++ /dev/null @@ -1,100 +0,0 @@ - - - - 3 - 7 - - .\wixver.h - .\wixver.cs - - - - $([System.DateTime]::new(2000, 1, 1)) - $([System.Convert]::ToInt32($([System.DateTime]::Now.ToUniversalTime().Subtract($(Base)).TotalDays))) - $([System.Convert]::ToInt32($([MSBuild]::Divide($([System.Convert]::ToInt32($([System.DateTime]::Now.ToUniversalTime().TimeOfDay.TotalSeconds))), 2)))) - - $(MajorBuildNumber).$(MinorBuildNumber).$(BuildNumber).$(BuildRevision) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/scripts/windows/installer/WiXBalExtension/inc/WixDistribution.cs b/scripts/windows/installer/WiXBalExtension/inc/WixDistribution.cs deleted file mode 100755 index 54e7d1d830..0000000000 --- a/scripts/windows/installer/WiXBalExtension/inc/WixDistribution.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Reflection; -using System.Resources; - -[assembly: AssemblyCompany("Outercurve Foundation")] -[assembly: AssemblyCopyright("Copyright © Outercurve Foundation. All rights reserved.")] -[assembly: AssemblyTrademark("")] -#if DEBUG - [assembly: AssemblyConfiguration("DEBUG")] -#else - [assembly: AssemblyConfiguration("")] -#endif -[assembly: NeutralResourcesLanguage("en-US")] -[assembly: AssemblyProduct("Windows Installer XML")] diff --git a/scripts/windows/installer/WiXBalExtension/inc/WixDistribution.h b/scripts/windows/installer/WiXBalExtension/inc/WixDistribution.h deleted file mode 100755 index 41519072e5..0000000000 --- a/scripts/windows/installer/WiXBalExtension/inc/WixDistribution.h +++ /dev/null @@ -1,17 +0,0 @@ -/* ************************************************************************** - * WixDistribution.h file contains disribution specific items, such as - * Product Name. - * - * **************************************************************************/ - -#pragma once - -#ifndef __WIXDISTRIBUTION_FILE_H_ -#define __WIXDISTRIBUTION_FILE_H_ - -#ifdef VER_PRODUCT_NAME - #undef VER_PRODUCT_NAME -#endif -#define VER_PRODUCT_NAME "Windows Installer XML" - -#endif // __WIXDISTRIBUTION_FILE_H_ diff --git a/scripts/windows/installer/WiXBalExtension/inc/wix.rc b/scripts/windows/installer/WiXBalExtension/inc/wix.rc deleted file mode 100755 index 8c418b40db..0000000000 --- a/scripts/windows/installer/WiXBalExtension/inc/wix.rc +++ /dev/null @@ -1,140 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Common resource file for any native wix resources. -// -// -// Usage: -// #define VER_APP (VER_DLL, VER_TYPELIB, none) -// #define VER_LANG_NEUTRAL (optional) -// #define VER_ORIGINAL_FILENAME "FooBar.Exe" -// #define VER_INTERNAL_NAME "FooBar" -// #define VER_PRODUCT_NAME -// #define VER_FILE_DESCRIPTION -// #include "wix.rc" -// -// Optional to add before the #include (must add as a group and VER_BLOCK must match to VER_LANG and VER_CP) -// You should not have to do this except for some extreme cases. -// #define VER_LANG 0x0000 -// #define VER_CP 0x04E4 -// #define VER_BLOCK "000004E4" -// -//------------------------------------------------------------------------------------------------- - -#include -#include -#include "wixver.h" -#include "WixDistribution.h" - -#ifdef DEBUG - #define VER_DEBUG VS_FF_DEBUG - #define VER_PRIVATE_BUILD VS_FF_PRIVATEBUILD - #define VER_PRE_RELEASE (VS_FF_PRERELEASE | VS_FF_SPECIALBUILD) -#else - #define VER_DEBUG 0 - #define VER_PRIVATE_BUILD 0 - #define VER_PRE_RELEASE 0 -#endif - -#if defined(VER_APP) - #define VER_FILE_TYPE VFT_APP -#elif defined(VER_DLL) - #define VER_FILE_TYPE VFT_DLL -#elif defined(VER_TYPELIB) - #define VER_FILE_TYPE VFT_UNKNOWN -#else - #define VER_FILE_TYPE VFT_UNKNOWN -#endif - -#if defined(VER_LANG_NEUTRAL) - #ifndef VER_LANG - #define VER_LANG 0x0000 - #endif - #ifndef VER_CP - #define VER_CP 0x04E4 - #endif - #ifndef VER_BLOCK - #define VER_BLOCK "000004E4" - #endif -#else - #ifndef VER_LANG - #define VER_LANG 0x0409 - #endif - #ifndef VER_CP - #define VER_CP 0x04E4 - #endif - #ifndef VER_BLOCK - #define VER_BLOCK "040904E4" - #endif -#endif - -#define VER_FILE_VERSION rmj, rmm, rbd, rev -#define VER_PRODUCT_VERSION rmj, rmm, rbd, rev -#define VER_FILE_VERSION_STRING szVerMajorMinorBuildRev -#define VER_PRODUCT_VERSION_STRING VER_FILE_VERSION_STRING -#define VER_FILE_FLAGS_MASK VS_FFI_FILEFLAGSMASK -#define VER_FILE_FLAGS (VER_DEBUG | VER_PRIVATE_BUILD | VER_PRE_RELEASE) - -#define VER_FILE_OS VOS__WINDOWS32 - -#define VER_COMPANY_NAME "Outercurve Foundation" -#ifndef VER_PRODUCT_NAME - #define VER_PRODUCT_NAME "Windows Installer XML (WiX)" -#endif -#ifndef VER_FILE_DESCRIPTION - #define VER_FILE_DESCRIPTION "Windows Installer XML (WiX) component" -#endif - -#if defined(VER_LEGAL_COPYRIGHT) - #error -#endif -#define VER_LEGAL_COPYRIGHT "Copyright (c) Outercurve Foundation.\240 All rights reserved." - -#if !defined(VER_FILE_SUBTYPE) - #define VER_FILE_SUBTYPE 0 -#endif - -#ifdef RC_INVOKED - -VS_VERSION_INFO VERSIONINFO -FILEVERSION VER_FILE_VERSION -PRODUCTVERSION VER_PRODUCT_VERSION -FILEFLAGSMASK VER_FILE_FLAGS_MASK -FILEFLAGS VER_FILE_FLAGS -FILEOS VER_FILE_OS -FILETYPE VER_FILE_TYPE -FILESUBTYPE VER_FILE_SUBTYPE -BEGIN -BLOCK "StringFileInfo" - BEGIN - BLOCK VER_BLOCK - BEGIN - VALUE "CompanyName", VER_COMPANY_NAME - VALUE "FileDescription", VER_FILE_DESCRIPTION - VALUE "FileVersion", VER_FILE_VERSION_STRING - VALUE "InternalName", VER_INTERNAL_NAME - - VALUE "LegalCopyright", VER_LEGAL_COPYRIGHT - - VALUE "OriginalFilename", VER_ORIGINAL_FILENAME - VALUE "ProductName", VER_PRODUCT_NAME - VALUE "ProductVersion", VER_FILE_VERSION_STRING -#if defined(DEBUG) - VALUE "WiX Common Resource Format", "Debug Only" -#endif - END - END - -BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", VER_LANG, VER_CP - END -END - -#endif diff --git a/scripts/windows/installer/WiXBalExtension/wixext/BalCompiler.cs b/scripts/windows/installer/WiXBalExtension/wixext/BalCompiler.cs deleted file mode 100755 index f38cc0ec81..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixext/BalCompiler.cs +++ /dev/null @@ -1,346 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// The compiler for the Windows Installer XML Toolset Bal Extension. -// -//------------------------------------------------------------------------------------------------- - -namespace Microsoft.Tools.WindowsInstallerXml.Extensions -{ - using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.Globalization; - using System.IO; - using System.Reflection; - using System.Xml; - using System.Xml.Schema; - using Microsoft.Tools.WindowsInstallerXml; - - /// - /// The compiler for the Windows Installer XML Toolset Bal Extension. - /// - public sealed class BalCompiler : CompilerExtension - { - private SourceLineNumberCollection addedConditionLineNumber; - private XmlSchema schema; - - /// - /// Instantiate a new BalCompiler. - /// - public BalCompiler() - { - this.addedConditionLineNumber = null; - this.schema = LoadXmlSchemaHelper(Assembly.GetExecutingAssembly(), "Microsoft.Tools.WindowsInstallerXml.Extensions.Xsd.bal.xsd"); - } - - /// - /// Gets the schema for this extension. - /// - /// Schema for this extension. - public override XmlSchema Schema - { - get { return this.schema; } - } - - /// - /// Processes an element for the Compiler. - /// - /// Source line number for the parent element. - /// Parent element of element to process. - /// Element to process. - /// Extra information about the context in which this element is being parsed. - public override void ParseElement(SourceLineNumberCollection sourceLineNumbers, XmlElement parentElement, XmlElement element, params string[] contextValues) - { - switch (parentElement.LocalName) - { - case "Bundle": - case "Fragment": - switch (element.LocalName) - { - case "Condition": - this.ParseConditionElement(element); - break; - default: - this.Core.UnexpectedElement(parentElement, element); - break; - } - break; - case "BootstrapperApplicationRef": - switch (element.LocalName) - { - case "WixExtendedBootstrapperApplication": - this.ParseWixExtendedBootstrapperApplicationElement(element); - break; - default: - this.Core.UnexpectedElement(parentElement, element); - break; - } - break; - default: - this.Core.UnexpectedElement(parentElement, element); - break; - } - } - - /// - /// Processes an attribute for the Compiler. - /// - /// Source line number for the parent element. - /// Parent element of element to process. - /// Attribute to process. - /// Extra information about the context in which this element is being parsed. - public override void ParseAttribute(SourceLineNumberCollection sourceLineNumbers, XmlElement parentElement, XmlAttribute attribute, Dictionary contextValues) - { - switch (parentElement.LocalName) - { - case "Variable": - // at the time the extension attribute is parsed, the compiler might not yet have - // parsed the Name attribute, so we need to get it directly from the parent element. - string variableName = parentElement.GetAttribute("Name"); - if (String.IsNullOrEmpty(variableName)) - { - this.Core.OnMessage(WixErrors.ExpectedParentWithAttribute(sourceLineNumbers, "Variable", "Overridable", "Name")); - } - else - { - switch (attribute.LocalName) - { - case "Overridable": - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attribute)) - { - Row row = this.Core.CreateRow(sourceLineNumbers, "WixStdbaOverridableVariable"); - row[0] = variableName; - } - break; - default: - this.Core.UnexpectedAttribute(sourceLineNumbers, attribute); - break; - } - } - break; - default: - this.Core.UnexpectedElement(parentElement, parentElement); - break; - } - } - - /// - /// Parses a Condition element for Bundles. - /// - /// The element to parse. - private void ParseConditionElement(XmlNode node) - { - SourceLineNumberCollection sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); - string condition = CompilerCore.GetConditionInnerText(node); // condition is the inner text of the element. - string message = null; - - foreach (XmlAttribute attrib in node.Attributes) - { - if (0 == attrib.NamespaceURI.Length || attrib.NamespaceURI == this.schema.TargetNamespace) - { - switch (attrib.LocalName) - { - case "Message": - message = this.Core.GetAttributeValue(sourceLineNumbers, attrib, false); - break; - default: - this.Core.UnexpectedAttribute(sourceLineNumbers, attrib); - break; - } - } - else - { - this.Core.UnsupportedExtensionAttribute(sourceLineNumbers, attrib); - } - } - - foreach (XmlNode child in node.ChildNodes) - { - if (XmlNodeType.Element == child.NodeType) - { - if (child.NamespaceURI == this.schema.TargetNamespace) - { - this.Core.UnexpectedElement(node, child); - } - else - { - this.Core.UnsupportedExtensionElement(node, child); - } - } - } - - // Error check the values. - if (String.IsNullOrEmpty(condition)) - { - this.Core.OnMessage(WixErrors.ConditionExpected(sourceLineNumbers, node.Name)); - } - - if (null == message) - { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name, "Message")); - } - - if (!this.Core.EncounteredError) - { - Row row = this.Core.CreateRow(sourceLineNumbers, "WixBalCondition"); - row[0] = condition; - row[1] = message; - - if (null == this.addedConditionLineNumber) - { - this.addedConditionLineNumber = sourceLineNumbers; - } - } - } - - /// - /// Parses a WixExtendedBootstrapperApplication element for Bundles. - /// - /// The element to parse. - private void ParseWixExtendedBootstrapperApplicationElement(XmlNode node) - { - SourceLineNumberCollection sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); - string launchTarget = null; - string licenseFile = null; - string licenseUrl = null; - string logoFile = null; - string logoSideFile = null; - string themeFile = null; - string localizationFile = null; - YesNoType suppressOptionsUI = YesNoType.NotSet; - YesNoType suppressDowngradeFailure = YesNoType.NotSet; - YesNoType suppressRepair = YesNoType.NotSet; - - foreach (XmlAttribute attrib in node.Attributes) - { - if (0 == attrib.NamespaceURI.Length || attrib.NamespaceURI == this.schema.TargetNamespace) - { - switch (attrib.LocalName) - { - case "LaunchTarget": - launchTarget = this.Core.GetAttributeValue(sourceLineNumbers, attrib, false); - break; - case "LicenseFile": - licenseFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib, false); - break; - case "LicenseUrl": - licenseUrl = this.Core.GetAttributeValue(sourceLineNumbers, attrib, true); - break; - case "LogoFile": - logoFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib, false); - break; - case "LogoSideFile": - logoSideFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib, false); - break; - case "ThemeFile": - themeFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib, false); - break; - case "LocalizationFile": - localizationFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib, false); - break; - case "SuppressOptionsUI": - suppressOptionsUI = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); - break; - case "SuppressDowngradeFailure": - suppressDowngradeFailure = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); - break; - case "SuppressRepair": - suppressRepair = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); - break; - default: - this.Core.UnexpectedAttribute(sourceLineNumbers, attrib); - break; - } - } - else - { - this.Core.UnsupportedExtensionAttribute(sourceLineNumbers, attrib); - } - } - - foreach (XmlNode child in node.ChildNodes) - { - if (XmlNodeType.Element == child.NodeType) - { - if (child.NamespaceURI == this.schema.TargetNamespace) - { - this.Core.UnexpectedElement(node, child); - } - else - { - this.Core.UnsupportedExtensionElement(node, child); - } - } - } - - if (String.IsNullOrEmpty(licenseFile) && null == licenseUrl) - { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name, "LicenseFile", "LicenseUrl", true)); - } - - if (!this.Core.EncounteredError) - { - if (!String.IsNullOrEmpty(launchTarget)) - { - this.Core.CreateVariableRow(sourceLineNumbers, "LaunchTarget", launchTarget, "string", false, false); - } - - if (!String.IsNullOrEmpty(licenseFile)) - { - this.Core.CreateWixVariableRow(sourceLineNumbers, "WixExtbaLicenseRtf", licenseFile, false); - } - - if (null != licenseUrl) - { - this.Core.CreateWixVariableRow(sourceLineNumbers, "WixExtbaLicenseUrl", licenseUrl, false); - } - - if (!String.IsNullOrEmpty(logoFile)) - { - this.Core.CreateWixVariableRow(sourceLineNumbers, "WixExtbaLogo", logoFile, false); - } - - if (!String.IsNullOrEmpty(logoSideFile)) - { - this.Core.CreateWixVariableRow(sourceLineNumbers, "WixExtbaLogoSide", logoSideFile, false); - } - - if (!String.IsNullOrEmpty(themeFile)) - { - this.Core.CreateWixVariableRow(sourceLineNumbers, "WixExtbaThemeXml", themeFile, false); - } - - if (!String.IsNullOrEmpty(localizationFile)) - { - this.Core.CreateWixVariableRow(sourceLineNumbers, "WixExtbaThemeWxl", localizationFile, false); - } - - if (YesNoType.Yes == suppressOptionsUI || YesNoType.Yes == suppressDowngradeFailure || YesNoType.Yes == suppressRepair) - { - Row row = this.Core.CreateRow(sourceLineNumbers, "WixExtbaOptions"); - if (YesNoType.Yes == suppressOptionsUI) - { - row[0] = 1; - } - - if (YesNoType.Yes == suppressDowngradeFailure) - { - row[1] = 1; - } - - if (YesNoType.Yes == suppressRepair) - { - row[2] = 1; - } - } - } - } - } -} diff --git a/scripts/windows/installer/WiXBalExtension/wixext/BalExtension.cs b/scripts/windows/installer/WiXBalExtension/wixext/BalExtension.cs deleted file mode 100755 index ae0ba2cb60..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixext/BalExtension.cs +++ /dev/null @@ -1,96 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// The Windows Installer XML Toolset Bal extension. -// -//------------------------------------------------------------------------------------------------- - -namespace Microsoft.Tools.WindowsInstallerXml.Extensions -{ - using System; - using System.Reflection; - - /// - /// The Windows Installer XML Toolset Bal Extension. - /// - public sealed class BalExtension : WixExtension - { - private BalCompiler compilerExtension; - private Library library; - private TableDefinitionCollection tableDefinitions; - - private BalPreprocessorExtension preprocessorExtension; - - /// - /// Gets the optional compiler extension. - /// - /// The optional compiler extension. - public override CompilerExtension CompilerExtension - { - get - { - if (null == this.compilerExtension) - { - this.compilerExtension = new BalCompiler(); - } - - return this.compilerExtension; - } - } - - /// - /// Gets the optional table definitions for this extension. - /// - /// The optional table definitions for this extension. - public override TableDefinitionCollection TableDefinitions - { - get - { - if (null == this.tableDefinitions) - { - this.tableDefinitions = LoadTableDefinitionHelper(Assembly.GetExecutingAssembly(), "Microsoft.Tools.WindowsInstallerXml.Extensions.Data.tables.xml"); - } - - return this.tableDefinitions; - } - } - - /// - /// Gets the library associated with this extension. - /// - /// The table definitions to use while loading the library. - /// The loaded library. - public override Library GetLibrary(TableDefinitionCollection tableDefinitions) - { - if (null == this.library) - { - this.library = LoadLibraryHelper(Assembly.GetExecutingAssembly(), "Microsoft.Tools.WindowsInstallerXml.Extensions.Data.balExt.wixlib", tableDefinitions); - } - - return this.library; - } - - /// - /// Gets the optional preprocessor extension. - /// - /// The optional preprocessor extension. - public override PreprocessorExtension PreprocessorExtension - { - get - { - if (null == this.preprocessorExtension) - { - this.preprocessorExtension = new BalPreprocessorExtension(); - } - - return this.preprocessorExtension; - } - } - } -} diff --git a/scripts/windows/installer/WiXBalExtension/wixext/BalPreprocessorExtension.cs b/scripts/windows/installer/WiXBalExtension/wixext/BalPreprocessorExtension.cs deleted file mode 100755 index bd845482b5..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixext/BalPreprocessorExtension.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// -// -// -// A WiX preprocessor extension. -// -//------------------------------------------------------------------------------------------------- - -namespace Microsoft.Tools.WindowsInstallerXml.Extensions -{ - using System; - using Microsoft.Tools.WindowsInstallerXml; - - /// - /// The preprocessor extension. - /// - public sealed class BalPreprocessorExtension : PreprocessorExtension - { - private static readonly string[] prefixes = {"bal"}; - - /// - /// Gets the variable prefixes for this extension. - /// - /// The variable prefixes for this extension. - public override string[] Prefixes - { - get { return prefixes; } - } - - public override string EvaluateFunction(string prefix, string function, string[] args) - { - string result = null; - - switch (prefix) - { - case "bal": - switch (function) - { - case "Version": - // Make sure the base version is specified - if (args.Length == 0 || args[0].Length == 0) - { - throw new ArgumentException("Version template not specified"); - } - - // Build = days since 1/1/2000; Revision = seconds since midnight / 2 - DateTime now = DateTime.Now.ToUniversalTime(); - double build = (now - new DateTime(2000, 1, 1)).TotalDays; - double revision = now.TimeOfDay.TotalSeconds / 2; - - result = String.Format("{0}.{1}.{2}", args[0], (int)build, (int)revision); - - break; - } - - break; - } - - return result; - } - } -} diff --git a/scripts/windows/installer/WiXBalExtension/wixext/Properties/AssemblyInfo.cs b/scripts/windows/installer/WiXBalExtension/wixext/Properties/AssemblyInfo.cs deleted file mode 100755 index 5081dc3c03..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixext/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,27 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file LICENSE.TXT -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// The assembly information for the Windows Installer XML Toolset Bootstrapper Application Layer Extension. -// -//------------------------------------------------------------------------------------------------- - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -using Microsoft.Tools.WindowsInstallerXml; -using Microsoft.Tools.WindowsInstallerXml.Extensions; - -[assembly: AssemblyTitle("WiX Toolset Bootstrapper Application Layer Extension")] -[assembly: AssemblyDescription("Windows Installer XML Toolset Bootstrapper Application Layer Extension")] -[assembly: AssemblyCulture("")] -[assembly: CLSCompliant(true)] -[assembly: ComVisible(false)] -[assembly: AssemblyDefaultWixExtension(typeof(BalExtension))] diff --git a/scripts/windows/installer/WiXBalExtension/wixext/WixBalExtensionExt.csproj b/scripts/windows/installer/WiXBalExtension/wixext/WixBalExtensionExt.csproj deleted file mode 100755 index e693763d69..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixext/WixBalExtensionExt.csproj +++ /dev/null @@ -1,88 +0,0 @@ - - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {6F9B6AFD-538B-4DF6-A1E8-6C224CBD7B05} - Library - Properties - Microsoft.Tools.WindowsInstallerXml.Extensions - WixBalExtensionExt - v2.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - False - $(WIX)bin\wix.dll - False - - - - - Properties\WixDistribution.cs - - - Properties\wixver.cs - - - - - - - $(RootNamespace).Data.Messages.resources - - - $(RootNamespace).Data.tables.xml - - - $(RootNamespace).Xsd.bal.xsd - PreserveNewest - - - Microsoft.Tools.WindowsInstallerXml.Serialize - Microsoft.Tools.WindowsInstallerXml.Extensions.Serialize.Bal - - - Data\balExt.wixlib - - - - - \ No newline at end of file diff --git a/scripts/windows/installer/WiXBalExtension/wixext/Xsd/bal.xsd b/scripts/windows/installer/WiXBalExtension/wixext/Xsd/bal.xsd deleted file mode 100755 index 8a2a8437f9..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixext/Xsd/bal.xsd +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - The source code schema for the Windows Installer XML Toolset Burn User Experience Extension. - - - - - - - - - Conditions for a bundle. The condition is specified in the inner text of the element. - - - - - - - - - - - - The condition that must evaluate to true for the installation to continue. - - - - - - Set the value to the text to display when the condition fails and the installation must be terminated. - - - - - - - - - - - - Configures WixExtendedBootstrapperApplication for a Bundle. - - - - - - - - - If set, the success page will show a Launch button the user can use to launch the application being installed. The string value can be formatted using Burn variables enclosed in brackets, to refer to installation directories and so forth. - - - - - Source file of the RTF license file. Cannot be used simultaneously with LicenseUrl. - - - - - URL target of the license link. Cannot be used simultaneously with LicenseFile. This attribute can be empty to hide the license link completely. - - - - - Source file of the logo graphic. - - - - - Source file of the side logo graphic. - - - - - Source file of the theme XML. - - - - - Source file of the theme localization .wxl file. - - - - - If set to "yes", the Options button will not be shown and the user will not be able to choose an installation directory. - - - - - If set to "yes", attempting to installer a downgraded version of a bundle will be treated as a successful do-nothing operation. - The default behavior (or when explicitly set to "no") is to treat downgrade attempts as failures. - - - - - If set to "yes", the Repair button will not be shown in the maintenance-mode UI. - - - - - - - - - When set to "yes", lets the user override the variable's default value by specifying another value on the command line, - in the form Variable=Value. Otherwise, WixStdBA won't overwrite the default value and will log - "Ignoring attempt to set non-overridable variable: 'BAR'." - - - - - - - - - - Values of this type will either be "yes" or "no". - - - - - - - diff --git a/scripts/windows/installer/WiXBalExtension/wixext/data/messages.xml b/scripts/windows/installer/WiXBalExtension/wixext/data/messages.xml deleted file mode 100755 index a902dc9f0b..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixext/data/messages.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - diff --git a/scripts/windows/installer/WiXBalExtension/wixext/data/tables.xml b/scripts/windows/installer/WiXBalExtension/wixext/data/tables.xml deleted file mode 100755 index eba09de7c9..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixext/data/tables.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/scripts/windows/installer/WiXBalExtension/wixlib/BalExtension.wixproj b/scripts/windows/installer/WiXBalExtension/wixlib/BalExtension.wixproj deleted file mode 100755 index c0d8c9c75e..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixlib/BalExtension.wixproj +++ /dev/null @@ -1,48 +0,0 @@ - - - - - {3444d952-f21c-496f-ab6b-56435bfd0787} - balExt - Library - True - True - True - en-us - $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets - $(Configuration)\$(Platform) - True - - - ..\build\ - - - ..\build\ - - - - - - - - - - - - wixextba - {41085a22-e6aa-4e8b-ab1b-ddee0dc89dfa} - True - True - Binaries;Content;Satellites - INSTALLFOLDER - - - - \ No newline at end of file diff --git a/scripts/windows/installer/WiXBalExtension/wixlib/BalExtension.wxs b/scripts/windows/installer/WiXBalExtension/wixlib/BalExtension.wxs deleted file mode 100755 index 83f82038c7..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixlib/BalExtension.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/scripts/windows/installer/WiXBalExtension/wixlib/wixstdba.wxs b/scripts/windows/installer/WiXBalExtension/wixlib/wixstdba.wxs deleted file mode 100755 index 5632880e07..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixlib/wixstdba.wxs +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - !(wix.WixExtbaLicenseRtfName=license.rtf) - - - - - - - - - - - - - - - !(wix.WixExtbaLicenseUrl) - - - - - - - - - - - - - - - - !(wix.WixExtbaLicenseUrl) - - - - - - - - - - - - diff --git a/scripts/windows/installer/WiXBalExtension/wixlib/wixstdba_platform.wxi b/scripts/windows/installer/WiXBalExtension/wixlib/wixstdba_platform.wxi deleted file mode 100755 index 46bc723cc4..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixlib/wixstdba_platform.wxi +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/scripts/windows/installer/WiXBalExtension/wixlib/wixstdba_x86.wxs b/scripts/windows/installer/WiXBalExtension/wixlib/wixstdba_x86.wxs deleted file mode 100755 index 988f466594..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixlib/wixstdba_x86.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/scripts/windows/installer/WiXBalExtension/wixstdba/JSON.cpp b/scripts/windows/installer/WiXBalExtension/wixstdba/JSON.cpp deleted file mode 100755 index 0b966c039a..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixstdba/JSON.cpp +++ /dev/null @@ -1,280 +0,0 @@ -/* - * File JSON.cpp part of the SimpleJSON Library - http://mjpa.in/json - * - * Copyright (C) 2010 Mike Anchor - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#include "JSON.h" - -/** - * Blocks off the public constructor - * - * @access private - * - */ -JSON::JSON() -{ -} - -/** - * Parses a complete JSON encoded string - * This is just a wrapper around the UNICODE Parse(). - * - * @access public - * - * @param char* data The JSON text - * - * @return JSONValue* Returns a JSON Value representing the root, or NULL on error - */ -JSONValue *JSON::Parse(const char *data) -{ - size_t length = strlen(data) + 1; - wchar_t *w_data = (wchar_t*)malloc(length * sizeof(wchar_t)); - - #if defined(WIN32) && !defined(__GNUC__) - size_t ret_value = 0; - if (mbstowcs_s(&ret_value, w_data, length, data, length) != 0) - { - free(w_data); - return NULL; - } - #elif defined(ANDROID) - // mbstowcs seems to misbehave on android - for(size_t i = 0; iStringify(); - else - return L""; -} - -/** - * Skips over any whitespace characters (space, tab, \r or \n) defined by the JSON spec - * - * @access protected - * - * @param wchar_t** data Pointer to a wchar_t* that contains the JSON text - * - * @return bool Returns true if there is more data, or false if the end of the text was reached - */ -bool JSON::SkipWhitespace(const wchar_t **data) -{ - while (**data != 0 && (**data == L' ' || **data == L'\t' || **data == L'\r' || **data == L'\n')) - (*data)++; - - return **data != 0; -} - -/** - * Extracts a JSON String as defined by the spec - "" - * Any escaped characters are swapped out for their unescaped values - * - * @access protected - * - * @param wchar_t** data Pointer to a wchar_t* that contains the JSON text - * @param std::wstring& str Reference to a std::wstring to receive the extracted string - * - * @return bool Returns true on success, false on failure - */ -bool JSON::ExtractString(const wchar_t **data, std::wstring &str) -{ - str = L""; - - while (**data != 0) - { - // Save the char so we can change it if need be - wchar_t next_char = **data; - - // Escaping something? - if (next_char == L'\\') - { - // Move over the escape char - (*data)++; - - // Deal with the escaped char - switch (**data) - { - case L'"': next_char = L'"'; break; - case L'\\': next_char = L'\\'; break; - case L'/': next_char = L'/'; break; - case L'b': next_char = L'\b'; break; - case L'f': next_char = L'\f'; break; - case L'n': next_char = L'\n'; break; - case L'r': next_char = L'\r'; break; - case L't': next_char = L'\t'; break; - case L'u': - { - // We need 5 chars (4 hex + the 'u') or its not valid - if (!simplejson_wcsnlen(*data, 5)) - return false; - - // Deal with the chars - next_char = 0; - for (int i = 0; i < 4; i++) - { - // Do it first to move off the 'u' and leave us on the - // final hex digit as we move on by one later on - (*data)++; - - next_char <<= 4; - - // Parse the hex digit - if (**data >= '0' && **data <= '9') - next_char |= (**data - '0'); - else if (**data >= 'A' && **data <= 'F') - next_char |= (10 + (**data - 'A')); - else if (**data >= 'a' && **data <= 'f') - next_char |= (10 + (**data - 'a')); - else - { - // Invalid hex digit = invalid JSON - return false; - } - } - break; - } - - // By the spec, only the above cases are allowed - default: - return false; - } - } - - // End of the string? - else if (next_char == L'"') - { - (*data)++; - str.reserve(); // Remove unused capacity - return true; - } - - // Disallowed char? - else if (next_char < L' ' && next_char != L'\t') - { - // SPEC Violation: Allow tabs due to real world cases - return false; - } - - // Add the next char - str += next_char; - - // Move on - (*data)++; - } - - // If we're here, the string ended incorrectly - return false; -} - -/** - * Parses some text as though it is an integer - * - * @access protected - * - * @param wchar_t** data Pointer to a wchar_t* that contains the JSON text - * - * @return double Returns the double value of the number found - */ -double JSON::ParseInt(const wchar_t **data) -{ - double integer = 0; - while (**data != 0 && **data >= '0' && **data <= '9') - integer = integer * 10 + (*(*data)++ - '0'); - - return integer; -} - -/** - * Parses some text as though it is a decimal - * - * @access protected - * - * @param wchar_t** data Pointer to a wchar_t* that contains the JSON text - * - * @return double Returns the double value of the decimal found - */ -double JSON::ParseDecimal(const wchar_t **data) -{ - double decimal = 0.0; - double factor = 0.1; - while (**data != 0 && **data >= '0' && **data <= '9') - { - int digit = (*(*data)++ - '0'); - decimal = decimal + digit * factor; - factor *= 0.1; - } - return decimal; -} diff --git a/scripts/windows/installer/WiXBalExtension/wixstdba/JSON.h b/scripts/windows/installer/WiXBalExtension/wixstdba/JSON.h deleted file mode 100755 index 184a5de3ab..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixstdba/JSON.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - * File JSON.h part of the SimpleJSON Library - http://mjpa.in/json - * - * Copyright (C) 2010 Mike Anchor - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef _JSON_H_ -#define _JSON_H_ - -// Win32 incompatibilities -#if defined(WIN32) && !defined(__GNUC__) - #define wcsncasecmp _wcsnicmp - static inline bool isnan(double x) { return x != x; } - static inline bool isinf(double x) { return !isnan(x) && isnan(x - x); } -#endif - -#include -#include -#include - -// Linux compile fix - from quaker66 -#ifdef __GNUC__ - #include - #include -#endif - -// Mac compile fixes - from quaker66, Lion fix by dabrahams -#if defined(__APPLE__) && __DARWIN_C_LEVEL < 200809L || (defined(WIN32) && defined(__GNUC__)) || defined(ANDROID) - #include - #include - - static inline int wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n) - { - int lc1 = 0; - int lc2 = 0; - - while (n--) - { - lc1 = towlower (*s1); - lc2 = towlower (*s2); - - if (lc1 != lc2) - return (lc1 - lc2); - - if (!lc1) - return 0; - - ++s1; - ++s2; - } - - return 0; - } -#endif - -// Simple function to check a string 's' has at least 'n' characters -static inline bool simplejson_wcsnlen(const wchar_t *s, size_t n) { - if (s == 0) - return false; - - const wchar_t *save = s; - while (n-- > 0) - { - if (*(save++) == 0) return false; - } - - return true; -} - -// Custom types -class JSONValue; -typedef std::vector JSONArray; -typedef std::map JSONObject; - -#include "JSONValue.h" - -class JSON -{ - friend class JSONValue; - - public: - static JSONValue* Parse(const char *data); - static JSONValue* Parse(const wchar_t *data); - static std::wstring Stringify(const JSONValue *value); - protected: - static bool SkipWhitespace(const wchar_t **data); - static bool ExtractString(const wchar_t **data, std::wstring &str); - static double ParseInt(const wchar_t **data); - static double ParseDecimal(const wchar_t **data); - private: - JSON(); -}; - -#endif diff --git a/scripts/windows/installer/WiXBalExtension/wixstdba/JSONValue.cpp b/scripts/windows/installer/WiXBalExtension/wixstdba/JSONValue.cpp deleted file mode 100755 index 94bc8a0062..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixstdba/JSONValue.cpp +++ /dev/null @@ -1,803 +0,0 @@ -/* - * File JSONValue.cpp part of the SimpleJSON Library - http://mjpa.in/json - * - * Copyright (C) 2010 Mike Anchor - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "JSONValue.h" - -// Macros to free an array/object -#define FREE_ARRAY(x) { JSONArray::iterator iter; for (iter = x.begin(); iter != x.end(); iter++) { delete *iter; } } -#define FREE_OBJECT(x) { JSONObject::iterator iter; for (iter = x.begin(); iter != x.end(); iter++) { delete (*iter).second; } } - -/** - * Parses a JSON encoded value to a JSONValue object - * - * @access protected - * - * @param wchar_t** data Pointer to a wchar_t* that contains the data - * - * @return JSONValue* Returns a pointer to a JSONValue object on success, NULL on error - */ -JSONValue *JSONValue::Parse(const wchar_t **data) -{ - // Is it a string? - if (**data == '"') - { - std::wstring str; - if (!JSON::ExtractString(&(++(*data)), str)) - return NULL; - else - return new JSONValue(str); - } - - // Is it a boolean? - else if ((simplejson_wcsnlen(*data, 4) && wcsncasecmp(*data, L"true", 4) == 0) || (simplejson_wcsnlen(*data, 5) && wcsncasecmp(*data, L"false", 5) == 0)) - { - bool value = wcsncasecmp(*data, L"true", 4) == 0; - (*data) += value ? 4 : 5; - return new JSONValue(value); - } - - // Is it a null? - else if (simplejson_wcsnlen(*data, 4) && wcsncasecmp(*data, L"null", 4) == 0) - { - (*data) += 4; - return new JSONValue(); - } - - // Is it a number? - else if (**data == L'-' || (**data >= L'0' && **data <= L'9')) - { - // Negative? - bool neg = **data == L'-'; - if (neg) (*data)++; - - double number = 0.0; - - // Parse the whole part of the number - only if it wasn't 0 - if (**data == L'0') - (*data)++; - else if (**data >= L'1' && **data <= L'9') - number = JSON::ParseInt(data); - else - return NULL; - - // Could be a decimal now... - if (**data == '.') - { - (*data)++; - - // Not get any digits? - if (!(**data >= L'0' && **data <= L'9')) - return NULL; - - // Find the decimal and sort the decimal place out - // Use ParseDecimal as ParseInt won't work with decimals less than 0.1 - // thanks to Javier Abadia for the report & fix - double decimal = JSON::ParseDecimal(data); - - // Save the number - number += decimal; - } - - // Could be an exponent now... - if (**data == L'E' || **data == L'e') - { - (*data)++; - - // Check signage of expo - bool neg_expo = false; - if (**data == L'-' || **data == L'+') - { - neg_expo = **data == L'-'; - (*data)++; - } - - // Not get any digits? - if (!(**data >= L'0' && **data <= L'9')) - return NULL; - - // Sort the expo out - double expo = JSON::ParseInt(data); - for (double i = 0.0; i < expo; i++) - number = neg_expo ? (number / 10.0) : (number * 10.0); - } - - // Was it neg? - if (neg) number *= -1; - - return new JSONValue(number); - } - - // An object? - else if (**data == L'{') - { - JSONObject object; - - (*data)++; - - while (**data != 0) - { - // Whitespace at the start? - if (!JSON::SkipWhitespace(data)) - { - FREE_OBJECT(object); - return NULL; - } - - // Special case - empty object - if (object.size() == 0 && **data == L'}') - { - (*data)++; - return new JSONValue(object); - } - - // We want a string now... - std::wstring name; - if (!JSON::ExtractString(&(++(*data)), name)) - { - FREE_OBJECT(object); - return NULL; - } - - // More whitespace? - if (!JSON::SkipWhitespace(data)) - { - FREE_OBJECT(object); - return NULL; - } - - // Need a : now - if (*((*data)++) != L':') - { - FREE_OBJECT(object); - return NULL; - } - - // More whitespace? - if (!JSON::SkipWhitespace(data)) - { - FREE_OBJECT(object); - return NULL; - } - - // The value is here - JSONValue *value = Parse(data); - if (value == NULL) - { - FREE_OBJECT(object); - return NULL; - } - - // Add the name:value - if (object.find(name) != object.end()) - delete object[name]; - object[name] = value; - - // More whitespace? - if (!JSON::SkipWhitespace(data)) - { - FREE_OBJECT(object); - return NULL; - } - - // End of object? - if (**data == L'}') - { - (*data)++; - return new JSONValue(object); - } - - // Want a , now - if (**data != L',') - { - FREE_OBJECT(object); - return NULL; - } - - (*data)++; - } - - // Only here if we ran out of data - FREE_OBJECT(object); - return NULL; - } - - // An array? - else if (**data == L'[') - { - JSONArray array; - - (*data)++; - - while (**data != 0) - { - // Whitespace at the start? - if (!JSON::SkipWhitespace(data)) - { - FREE_ARRAY(array); - return NULL; - } - - // Special case - empty array - if (array.size() == 0 && **data == L']') - { - (*data)++; - return new JSONValue(array); - } - - // Get the value - JSONValue *value = Parse(data); - if (value == NULL) - { - FREE_ARRAY(array); - return NULL; - } - - // Add the value - array.push_back(value); - - // More whitespace? - if (!JSON::SkipWhitespace(data)) - { - FREE_ARRAY(array); - return NULL; - } - - // End of array? - if (**data == L']') - { - (*data)++; - return new JSONValue(array); - } - - // Want a , now - if (**data != L',') - { - FREE_ARRAY(array); - return NULL; - } - - (*data)++; - } - - // Only here if we ran out of data - FREE_ARRAY(array); - return NULL; - } - - // Ran out of possibilites, it's bad! - else - { - return NULL; - } -} - -/** - * Basic constructor for creating a JSON Value of type NULL - * - * @access public - */ -JSONValue::JSONValue(/*NULL*/) -{ - type = JSONType_Null; -} - -/** - * Basic constructor for creating a JSON Value of type String - * - * @access public - * - * @param wchar_t* m_char_value The string to use as the value - */ -JSONValue::JSONValue(const wchar_t *m_char_value) -{ - type = JSONType_String; - string_value = std::wstring(m_char_value); -} - -/** - * Basic constructor for creating a JSON Value of type String - * - * @access public - * - * @param std::wstring m_string_value The string to use as the value - */ -JSONValue::JSONValue(const std::wstring &m_string_value) -{ - type = JSONType_String; - string_value = m_string_value; -} - -/** - * Basic constructor for creating a JSON Value of type Bool - * - * @access public - * - * @param bool m_bool_value The bool to use as the value - */ -JSONValue::JSONValue(bool m_bool_value) -{ - type = JSONType_Bool; - bool_value = m_bool_value; -} - -/** - * Basic constructor for creating a JSON Value of type Number - * - * @access public - * - * @param double m_number_value The number to use as the value - */ -JSONValue::JSONValue(double m_number_value) -{ - type = JSONType_Number; - number_value = m_number_value; -} - -/** - * Basic constructor for creating a JSON Value of type Array - * - * @access public - * - * @param JSONArray m_array_value The JSONArray to use as the value - */ -JSONValue::JSONValue(const JSONArray &m_array_value) -{ - type = JSONType_Array; - array_value = m_array_value; -} - -/** - * Basic constructor for creating a JSON Value of type Object - * - * @access public - * - * @param JSONObject m_object_value The JSONObject to use as the value - */ -JSONValue::JSONValue(const JSONObject &m_object_value) -{ - type = JSONType_Object; - object_value = m_object_value; -} - -/** - * The destructor for the JSON Value object - * Handles deleting the objects in the array or the object value - * - * @access public - */ -JSONValue::~JSONValue() -{ - if (type == JSONType_Array) - { - JSONArray::iterator iter; - for (iter = array_value.begin(); iter != array_value.end(); iter++) - delete *iter; - } - else if (type == JSONType_Object) - { - JSONObject::iterator iter; - for (iter = object_value.begin(); iter != object_value.end(); iter++) - { - delete (*iter).second; - } - } -} - -/** - * Checks if the value is a NULL - * - * @access public - * - * @return bool Returns true if it is a NULL value, false otherwise - */ -bool JSONValue::IsNull() const -{ - return type == JSONType_Null; -} - -/** - * Checks if the value is a String - * - * @access public - * - * @return bool Returns true if it is a String value, false otherwise - */ -bool JSONValue::IsString() const -{ - return type == JSONType_String; -} - -/** - * Checks if the value is a Bool - * - * @access public - * - * @return bool Returns true if it is a Bool value, false otherwise - */ -bool JSONValue::IsBool() const -{ - return type == JSONType_Bool; -} - -/** - * Checks if the value is a Number - * - * @access public - * - * @return bool Returns true if it is a Number value, false otherwise - */ -bool JSONValue::IsNumber() const -{ - return type == JSONType_Number; -} - -/** - * Checks if the value is an Array - * - * @access public - * - * @return bool Returns true if it is an Array value, false otherwise - */ -bool JSONValue::IsArray() const -{ - return type == JSONType_Array; -} - -/** - * Checks if the value is an Object - * - * @access public - * - * @return bool Returns true if it is an Object value, false otherwise - */ -bool JSONValue::IsObject() const -{ - return type == JSONType_Object; -} - -/** - * Retrieves the String value of this JSONValue - * Use IsString() before using this method. - * - * @access public - * - * @return std::wstring Returns the string value - */ -const std::wstring &JSONValue::AsString() const -{ - return string_value; -} - -/** - * Retrieves the Bool value of this JSONValue - * Use IsBool() before using this method. - * - * @access public - * - * @return bool Returns the bool value - */ -bool JSONValue::AsBool() const -{ - return bool_value; -} - -/** - * Retrieves the Number value of this JSONValue - * Use IsNumber() before using this method. - * - * @access public - * - * @return double Returns the number value - */ -double JSONValue::AsNumber() const -{ - return number_value; -} - -/** - * Retrieves the Array value of this JSONValue - * Use IsArray() before using this method. - * - * @access public - * - * @return JSONArray Returns the array value - */ -const JSONArray &JSONValue::AsArray() const -{ - return array_value; -} - -/** - * Retrieves the Object value of this JSONValue - * Use IsObject() before using this method. - * - * @access public - * - * @return JSONObject Returns the object value - */ -const JSONObject &JSONValue::AsObject() const -{ - return object_value; -} - -/** - * Retrieves the number of children of this JSONValue. - * This number will be 0 or the actual number of children - * if IsArray() or IsObject(). - * - * @access public - * - * @return The number of children. - */ -std::size_t JSONValue::CountChildren() const -{ - switch (type) - { - case JSONType_Array: - return array_value.size(); - case JSONType_Object: - return object_value.size(); - default: - return 0; - } -} - -/** - * Checks if this JSONValue has a child at the given index. - * Use IsArray() before using this method. - * - * @access public - * - * @return bool Returns true if the array has a value at the given index. - */ -bool JSONValue::HasChild(std::size_t index) const -{ - if (type == JSONType_Array) - { - return index < array_value.size(); - } - else - { - return false; - } -} - -/** - * Retrieves the child of this JSONValue at the given index. - * Use IsArray() before using this method. - * - * @access public - * - * @return JSONValue* Returns JSONValue at the given index or NULL - * if it doesn't exist. - */ -JSONValue *JSONValue::Child(std::size_t index) -{ - if (index < array_value.size()) - { - return array_value[index]; - } - else - { - return NULL; - } -} - -/** - * Checks if this JSONValue has a child at the given key. - * Use IsObject() before using this method. - * - * @access public - * - * @return bool Returns true if the object has a value at the given key. - */ -bool JSONValue::HasChild(const wchar_t* name) const -{ - if (type == JSONType_Object) - { - return object_value.find(name) != object_value.end(); - } - else - { - return false; - } -} - -/** - * Retrieves the child of this JSONValue at the given key. - * Use IsObject() before using this method. - * - * @access public - * - * @return JSONValue* Returns JSONValue for the given key in the object - * or NULL if it doesn't exist. - */ -JSONValue* JSONValue::Child(const wchar_t* name) -{ - JSONObject::const_iterator it = object_value.find(name); - if (it != object_value.end()) - { - return it->second; - } - else - { - return NULL; - } -} - -/** - * Creates a JSON encoded string for the value with all necessary characters escaped - * - * @access public - * - * @return std::wstring Returns the JSON string - */ -std::wstring JSONValue::Stringify() const -{ - std::wstring ret_string; - - switch (type) - { - case JSONType_Null: - ret_string = L"null"; - break; - - case JSONType_String: - ret_string = StringifyString(string_value); - break; - - case JSONType_Bool: - ret_string = bool_value ? L"true" : L"false"; - break; - - case JSONType_Number: - { - if (isinf(number_value) || isnan(number_value)) - ret_string = L"null"; - else - { - std::wstringstream ss; - ss.precision(15); - ss << number_value; - ret_string = ss.str(); - } - break; - } - - case JSONType_Array: - { - ret_string = L"["; - JSONArray::const_iterator iter = array_value.begin(); - while (iter != array_value.end()) - { - ret_string += (*iter)->Stringify(); - - // Not at the end - add a separator - if (++iter != array_value.end()) - ret_string += L","; - } - ret_string += L"]"; - break; - } - - case JSONType_Object: - { - ret_string = L"{"; - JSONObject::const_iterator iter = object_value.begin(); - while (iter != object_value.end()) - { - ret_string += StringifyString((*iter).first); - ret_string += L":"; - ret_string += (*iter).second->Stringify(); - - // Not at the end - add a separator - if (++iter != object_value.end()) - ret_string += L","; - } - ret_string += L"}"; - break; - } - } - - return ret_string; -} - -/** - * Creates a JSON encoded string with all required fields escaped - * Works from http://www.ecma-internationl.org/publications/files/ECMA-ST/ECMA-262.pdf - * Section 15.12.3. - * - * @access private - * - * @param std::wstring str The string that needs to have the characters escaped - * - * @return std::wstring Returns the JSON string - */ -std::wstring JSONValue::StringifyString(const std::wstring &str) -{ - std::wstring str_out = L"\""; - - std::wstring::const_iterator iter = str.begin(); - while (iter != str.end()) - { - wchar_t chr = *iter; - - if (chr == L'"' || chr == L'\\' || chr == L'/') - { - str_out += L'\\'; - str_out += chr; - } - else if (chr == L'\b') - { - str_out += L"\\b"; - } - else if (chr == L'\f') - { - str_out += L"\\f"; - } - else if (chr == L'\n') - { - str_out += L"\\n"; - } - else if (chr == L'\r') - { - str_out += L"\\r"; - } - else if (chr == L'\t') - { - str_out += L"\\t"; - } - else if (chr < L' ' || chr > 126) - { - str_out += L"\\u"; - for (int i = 0; i < 4; i++) - { - int value = (chr >> 12) & 0xf; - if (value >= 0 && value <= 9) - str_out += (wchar_t)('0' + value); - else if (value >= 10 && value <= 15) - str_out += (wchar_t)('A' + (value - 10)); - chr <<= 4; - } - } - else - { - str_out += chr; - } - - iter++; - } - - str_out += L"\""; - return str_out; -} diff --git a/scripts/windows/installer/WiXBalExtension/wixstdba/JSONValue.h b/scripts/windows/installer/WiXBalExtension/wixstdba/JSONValue.h deleted file mode 100755 index f84389f923..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixstdba/JSONValue.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * File JSONValue.h part of the SimpleJSON Library - http://mjpa.in/json - * - * Copyright (C) 2010 Mike Anchor - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef _JSONVALUE_H_ -#define _JSONVALUE_H_ - -#include -#include - -#include "JSON.h" - -class JSON; - -enum JSONType { JSONType_Null, JSONType_String, JSONType_Bool, JSONType_Number, JSONType_Array, JSONType_Object }; - -class JSONValue -{ - friend class JSON; - - public: - JSONValue(/*NULL*/); - JSONValue(const wchar_t *m_char_value); - JSONValue(const std::wstring &m_string_value); - JSONValue(bool m_bool_value); - JSONValue(double m_number_value); - JSONValue(const JSONArray &m_array_value); - JSONValue(const JSONObject &m_object_value); - ~JSONValue(); - - bool IsNull() const; - bool IsString() const; - bool IsBool() const; - bool IsNumber() const; - bool IsArray() const; - bool IsObject() const; - - const std::wstring &AsString() const; - bool AsBool() const; - double AsNumber() const; - const JSONArray &AsArray() const; - const JSONObject &AsObject() const; - - std::size_t CountChildren() const; - bool HasChild(std::size_t index) const; - JSONValue *Child(std::size_t index); - bool HasChild(const wchar_t* name) const; - JSONValue *Child(const wchar_t* name); - - std::wstring Stringify() const; - - protected: - static JSONValue *Parse(const wchar_t **data); - - private: - static std::wstring StringifyString(const std::wstring &str); - - JSONType type; - std::wstring string_value; - bool bool_value; - double number_value; - JSONArray array_value; - JSONObject object_value; -}; - -#endif diff --git a/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/Hyperlink2Theme.xml b/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/Hyperlink2Theme.xml deleted file mode 100755 index 8f692a149b..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/Hyperlink2Theme.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - #(loc.Caption) - Segoe UI - Segoe UI - Segoe UI - Segoe UI - Segoe UI - - - #(loc.Title) - - #(loc.HelpHeader) - #(loc.HelpText) - - - - #(loc.Title) - - #(loc.InstallHeader) - #(loc.InstallMessage) - #(loc.InstallLicenseLinkText) - #(loc.InstallVersion) - #(loc.InstallUpgradeLinkText) - #(loc.InstallAcceptCheckbox) - - - - - - #(loc.Title) - - #(loc.OptionsHeader) - #(loc.OptionsLocationLabel) - - - - - - - - #(loc.Title) - - [varProgressHeader] - #(loc.ProgressLabel) - #(loc.OverallProgressPackageText) - - - - - #(loc.Title) - - #(loc.ModifyHeader) - - - - - - #(loc.Title) - - [varSuccessHeader] - - #(loc.SuccessRestartText) - - - - - #(loc.Title) - - [varFailureHeader] - #(loc.FailureHyperlinkLogText) - - #(loc.FailureRestartText) - - - - \ No newline at end of file diff --git a/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/HyperlinkTheme.wxl b/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/HyperlinkTheme.wxl deleted file mode 100755 index 3f122a841f..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/HyperlinkTheme.wxl +++ /dev/null @@ -1,54 +0,0 @@ - - - [WixBundleName] Setup - [WixBundleName] - Welcome - Setup will install [WixBundleName] on your computer. Click install to continue, options to set the install directory or Close to exit. - Version [WixBundleVersion] - Version [WixBundleVersion] <a href="#">upgrade available</a> - Are you sure you want to cancel? - Setup Help - /install | /repair | /uninstall | /layout [directory] - installs, repairs, uninstalls or - creates a complete local copy of the bundle in directory. Install is the default. - -/passive | /quiet - displays minimal UI with no prompts or displays no UI and - no prompts. By default UI and all prompts are displayed. - -/norestart - suppress any attempts to restart. By default UI will prompt before restart. -/log log.txt - logs to a specific file. By default a log file is created in %TEMP%. - &Close - [WixBundleName] <a href="#">license terms</a>. - I &agree to the license terms and conditions - &Options - &Install - &Close - Setup Options - Install location: - &Browse - &OK - &Cancel - Setup Progress - Repair Progress - Uninstall Progress - Processing: - Initializing... - &Cancel - Modify Setup - &Repair - &Uninstall - &Close - Setup Successful - Repair Successful - Uninstall Successful - &Launch - You must restart your computer before you can use the software. - &Restart - &Close - Setup Failed - Repair Failed - Uninstall Failed - 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>. - You must restart your computer to complete the rollback of the software. - &Restart - &Close - \ No newline at end of file diff --git a/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/HyperlinkTheme.xml b/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/HyperlinkTheme.xml deleted file mode 100755 index aa954fab21..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/HyperlinkTheme.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - #(loc.Caption) - Segoe UI - Segoe UI - Segoe UI - Segoe UI - Segoe UI - - - #(loc.Title) - - - #(loc.HelpHeader) - #(loc.HelpText) - - - - #(loc.InstallHeader) - #(loc.InstallMessage) - - #(loc.InstallLicenseLinkText) - #(loc.InstallVersion) - #(loc.InstallUpgradeLinkText) - #(loc.InstallAcceptCheckbox) - - - - - - #(loc.OptionsHeader) - #(loc.OptionsLocationLabel) - - - - - - - [varProgressHeader] - #(loc.ProgressLabel) - #(loc.OverallProgressPackageText) - - - - - #(loc.ModifyHeader) - - - - - - [varSuccessHeader] - - #(loc.SuccessRestartText) - - - - - [varFailureHeader] - #(loc.FailureHyperlinkLogText) - - #(loc.FailureRestartText) - - - - \ No newline at end of file diff --git a/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/LogoSide.png b/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/LogoSide.png deleted file mode 100755 index 3d7af32993..0000000000 Binary files a/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/LogoSide.png and /dev/null differ diff --git a/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/LoremIpsumLicense.rtf b/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/LoremIpsumLicense.rtf deleted file mode 100755 index 1a18323618..0000000000 Binary files a/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/LoremIpsumLicense.rtf and /dev/null differ diff --git a/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/RtfTheme.wxl b/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/RtfTheme.wxl deleted file mode 100755 index 67b5ee05f7..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/RtfTheme.wxl +++ /dev/null @@ -1,43 +0,0 @@ - - - [WixBundleName] Setup - [WixBundleName] - Are you sure you want to cancel? - Setup Help - /install | /repair | /uninstall | /layout [directory] - installs, repairs, uninstalls or - creates a complete local copy of the bundle in directory. Install is the default. - -/passive | /quiet - displays minimal UI with no prompts or displays no UI and - no prompts. By default UI and all prompts are displayed. - -/norestart - suppress any attempts to restart. By default UI will prompt before restart. -/log log.txt - logs to a specific file. By default a log file is created in %TEMP%. - &Close - I &agree to the license terms and conditions - &Options - &Install - &Close - Setup Options - Install location: - &Browse - &OK - &Cancel - Setup Progress - Processing: - Initializing... - &Cancel - Modify Setup - &Repair - &Uninstall - &Close - Setup Successful - &Launch - You must restart your computer before you can use the software. - &Restart - &Close - Setup Failed - 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>. - You must restart your computer to complete the rollback of the software. - &Restart - &Close - diff --git a/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/RtfTheme.xml b/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/RtfTheme.xml deleted file mode 100755 index 9b04f5eaa8..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/RtfTheme.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - #(loc.Caption) - Segoe UI - Segoe UI - Segoe UI - Segoe UI - Segoe UI - - - #(loc.Title) - - - #(loc.HelpHeader) - #(loc.HelpText) - - - - - - #(loc.InstallAcceptCheckbox) - - - - - - #(loc.OptionsHeader) - #(loc.OptionsLocationLabel) - - - - - - - [varProgressHeader] - #(loc.ProgressLabel) - #(loc.OverallProgressPackageText) - - - - - #(loc.ModifyHeader) - - - - - - [varSuccessHeader] - - #(loc.SuccessRestartText) - - - - - [varFailureHeader] - #(loc.FailureHyperlinkLogText) - - #(loc.FailureRestartText) - - - - \ No newline at end of file diff --git a/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/logo.png b/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/logo.png deleted file mode 100755 index 6df52d5464..0000000000 Binary files a/scripts/windows/installer/WiXBalExtension/wixstdba/Resources/logo.png and /dev/null differ diff --git a/scripts/windows/installer/WiXBalExtension/wixstdba/WixStandardBootstrapperApplication.cpp b/scripts/windows/installer/WiXBalExtension/wixstdba/WixStandardBootstrapperApplication.cpp deleted file mode 100755 index 8dce19bffb..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixstdba/WixStandardBootstrapperApplication.cpp +++ /dev/null @@ -1,4126 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -//------------------------------------------------------------------------------------------------- - - -#include "precomp.h" -#include "regutil.h" -#include "JSON.h" -#include -#include -#include - - -static const HRESULT E_WIXSTDBA_CONDITION_FAILED = MAKE_HRESULT(SEVERITY_ERROR, 500, 1); - -static const LPCWSTR WIXBUNDLE_VARIABLE_ELEVATED = L"WixBundleElevated"; - -static const LPCWSTR WIXSTDBA_WINDOW_CLASS = L"WixExtBA"; -static const LPCWSTR WIXSTDBA_VARIABLE_INSTALL_FOLDER = L"InstallFolder"; -static const LPCWSTR WIXSTDBA_VARIABLE_INSTALL_REGPATH = L"InstallRegPath"; -static const LPCWSTR WIXSTDBA_VARIABLE_LAUNCH_TARGET_PATH = L"LaunchTarget"; -static const LPCWSTR WIXSTDBA_VARIABLE_LAUNCH_ARGUMENTS = L"LaunchArguments"; -static const LPCWSTR WIXSTDBA_VARIABLE_LAUNCH_HIDDEN = L"LaunchHidden"; -static const LPCWSTR WIXSTDBA_VARIABLE_LAUNCHAFTERINSTALL_TARGET_PATH = L"LaunchAfterInstallTarget"; -static const LPCWSTR WIXSTDBA_VARIABLE_LAUNCHAFTERINSTALL_ARGUMENTS = L"LaunchAfterInstallArguments"; - -static const LPCWSTR WIXSTDBA_VARIABLE_PROGRESS_HEADER = L"varProgressHeader"; -static const LPCWSTR WIXSTDBA_VARIABLE_PROGRESS_INFO = L"varProgressInfo"; -static const LPCWSTR WIXSTDBA_VARIABLE_SUCCESS_HEADER = L"varSuccessHeader"; -static const LPCWSTR WIXSTDBA_VARIABLE_SUCCESS_INFO = L"varSuccessInfo"; -static const LPCWSTR WIXSTDBA_VARIABLE_FAILURE_HEADER = L"varFailureHeader"; -static const LPCWSTR WIXSTDBA_VARIABLE_SUCCESS_ERRINF = L"varSuccessErrorInfoText"; -static const LPCWSTR WIXSTDBA_VARIABLE_SUCCESS_ERRMSG = L"varSuccessErrorMessageText"; - -static const LPCWSTR WIXSTDBA_VARIABLE_PERMACHINE_INSTALL = L"PerMachineInstall"; -static const LPCWSTR WIXSTDBA_VARIABLE_PERMACHINE_INSTALL_FOLDER = L"PerMachineInstallFolder"; -static const LPCWSTR WIXSTDBA_VARIABLE_PERUSER_INSTALL_FOLDER = L"PerUserInstallFolder"; -static const LPCWSTR WIXSTDBA_VARIABLE_USERMETEORSESSIONFILE = L"UserMeteorSessionFile"; - - -static const LPCWSTR WIXSTDBA_VARIABLE_REG_MAIL = L"RegisterEmail"; -static const LPCWSTR WIXSTDBA_VARIABLE_REG_USER = L"RegisterUser"; -static const LPCWSTR WIXSTDBA_VARIABLE_REG_PASS = L"RegisterPass"; - -static const LPCWSTR WIXSTDBA_VARIABLE_LOG_USERNAME_OR_MAIL = L"LoginUsernameOrEmail"; -static const LPCWSTR WIXSTDBA_VARIABLE_LOG_PASS = L"LoginPass"; - - -static const LPCWSTR WIXSTDBA_VARIABLE_LOGSPATH = L"QCInstallLogsPath"; - -static const DWORD WIXSTDBA_ACQUIRE_PERCENTAGE = 1; - -enum WIXSTDBA_STATE -{ - WIXSTDBA_STATE_INSTALLDIR, - WIXSTDBA_STATE_SVC_OPTIONS, - WIXSTDBA_STATE_INITIALIZING, - WIXSTDBA_STATE_INITIALIZED, - WIXSTDBA_STATE_HELP, - WIXSTDBA_STATE_DETECTING, - WIXSTDBA_STATE_DETECTED, - WIXSTDBA_STATE_PLANNING, - WIXSTDBA_STATE_PLANNED, - WIXSTDBA_STATE_APPLYING, - WIXSTDBA_STATE_CACHING, - WIXSTDBA_STATE_CACHED, - WIXSTDBA_STATE_EXECUTING, - WIXSTDBA_STATE_EXECUTED, - WIXSTDBA_STATE_APPLIED, - WIXSTDBA_STATE_FAILED, -}; - -enum WM_WIXSTDBA -{ - WM_WIXSTDBA_SHOW_HELP = WM_APP + 100, - WM_WIXSTDBA_DETECT_PACKAGES, - WM_WIXSTDBA_PLAN_PACKAGES, - WM_WIXSTDBA_APPLY_PACKAGES, - WM_WIXSTDBA_CHANGE_STATE, -}; - -// This enum must be kept in the same order as the vrgwzPageNames array. -enum WIXSTDBA_PAGE -{ - WIXSTDBA_PAGE_LOADING, - WIXSTDBA_PAGE_HELP, - WIXSTDBA_PAGE_INSTALL, - WIXSTDBA_PAGE_INSTALLDIR, - WIXSTDBA_PAGE_SVC_OPTIONS, - WIXSTDBA_PAGE_MODIFY, - WIXSTDBA_PAGE_PROGRESS, - WIXSTDBA_PAGE_PROGRESS_PASSIVE, - WIXSTDBA_PAGE_SUCCESS, - WIXSTDBA_PAGE_FAILURE, - COUNT_WIXSTDBA_PAGE, -}; - -// This array must be kept in the same order as the WIXSTDBA_PAGE enum. -static LPCWSTR vrgwzPageNames[] = { - L"Loading", - L"Help", - L"Install", - L"InstallDir", - L"SvcOptions", - L"Modify", - L"Progress", - L"ProgressPassive", - L"Success", - L"Failure", -}; - -enum WIXSTDBA_CONTROL -{ - // Non-paged controls - WIXSTDBA_CONTROL_CLOSE_BUTTON = THEME_FIRST_ASSIGN_CONTROL_ID, - WIXSTDBA_CONTROL_MINIMIZE_BUTTON, - - // Help page - WIXSTDBA_CONTROL_HELP_CANCEL_BUTTON, - - // Welcome page - WIXSTDBA_CONTROL_INSTALL_BUTTON, - WIXSTDBA_CONTROL_OPTIONS_BUTTON, - WIXSTDBA_CONTROL_EULA_RICHEDIT, - WIXSTDBA_CONTROL_EULA_LINK, - WIXSTDBA_CONTROL_EULA_ACCEPT_CHECKBOX, - WIXSTDBA_CONTROL_WELCOME_CANCEL_BUTTON, - WIXSTDBA_CONTROL_VERSION_LABEL, - WIXSTDBA_CONTROL_UPGRADE_LINK, - WIXSTDBA_CONTROL_NEXT_BUTTON, - WIXSTDBA_CONTROL_BACK_BUTTON, - WIXSTDBA_CONTROL_SKIP_BUTTON, - - - // Options page - WIXSTDBA_CONTROL_PERMACHINE_RADIO, - WIXSTDBA_CONTROL_PERUSER_RADIO, - WIXSTDBA_CONTROL_INSTALLFOLDER_EDITBOX, - WIXSTDBA_CONTROL_BROWSE_BUTTON, - - WIXSTDBA_CONTROL_REGSIGNIN_RADIO, - WIXSTDBA_CONTROL_REGCREATE_RADIO, - WIXSTDBA_CONTROL_REGMAIL_LABEL, - WIXSTDBA_CONTROL_REGUSER_LABEL, - WIXSTDBA_CONTROL_REGPASS_LABEL, - WIXSTDBA_CONTROL_REGMAIL_EDIT, - WIXSTDBA_CONTROL_REGUSER_EDIT, - WIXSTDBA_CONTROL_REGPASS_EDIT, - - WIXSTDBA_CONTROL_LOGUSER_OR_MAIL_LABEL, - WIXSTDBA_CONTROL_LOGPASS_LABEL, - WIXSTDBA_CONTROL_LOGUSER_OR_MAIL_EDIT, - WIXSTDBA_CONTROL_LOGPASS_EDIT, - - WIXSTDBA_CONTROL_SKIPREG_CHECKBOX, - - - WIXSTDBA_CONTROL_OK_BUTTON, - WIXSTDBA_CONTROL_CANCEL_BUTTON, - - // Modify page - WIXSTDBA_CONTROL_REPAIR_BUTTON, - WIXSTDBA_CONTROL_UNINSTALL_BUTTON, - WIXSTDBA_CONTROL_MODIFY_CANCEL_BUTTON, - - // Progress page - WIXSTDBA_CONTROL_CACHE_PROGRESS_PACKAGE_TEXT, - WIXSTDBA_CONTROL_CACHE_PROGRESS_BAR, - WIXSTDBA_CONTROL_CACHE_PROGRESS_TEXT, - - WIXSTDBA_CONTROL_EXECUTE_PROGRESS_PACKAGE_TEXT, - WIXSTDBA_CONTROL_EXECUTE_PROGRESS_BAR, - WIXSTDBA_CONTROL_EXECUTE_PROGRESS_TEXT, - WIXSTDBA_CONTROL_EXECUTE_PROGRESS_ACTIONDATA_TEXT, - - WIXSTDBA_CONTROL_OVERALL_PROGRESS_PACKAGE_TEXT, - WIXSTDBA_CONTROL_OVERALL_PROGRESS_BAR, - WIXSTDBA_CONTROL_OVERALL_CALCULATED_PROGRESS_BAR, - WIXSTDBA_CONTROL_OVERALL_PROGRESS_TEXT, - - WIXSTDBA_CONTROL_PROGRESS_INSTALLING_HEADER, - - WIXSTDBA_CONTROL_PROGRESS_CANCEL_BUTTON, - - // Success page - WIXSTDBA_CONTROL_LAUNCH_BUTTON, - WIXSTDBA_CONTROL_SUCCESS_RESTART_TEXT, - WIXSTDBA_CONTROL_SUCCESS_RESTART_BUTTON, - WIXSTDBA_CONTROL_SUCCESS_CANCEL_BUTTON, - WIXSTDBA_CONTROL_SUCCESS_ERRINF_TEXT, - WIXSTDBA_CONTROL_SUCCESS_ERRMSG_TEXT, - - // Failure page - WIXSTDBA_CONTROL_FAILURE_LOGFILE_LINK, - WIXSTDBA_CONTROL_FAILURE_MESSAGE_TEXT, - WIXSTDBA_CONTROL_FAILURE_RESTART_TEXT, - WIXSTDBA_CONTROL_FAILURE_RESTART_BUTTON, - WIXSTDBA_CONTROL_FAILURE_CANCEL_BUTTON, - -}; - -static THEME_ASSIGN_CONTROL_ID vrgInitControls[] = { - { WIXSTDBA_CONTROL_CLOSE_BUTTON, L"CloseButton" }, - { WIXSTDBA_CONTROL_MINIMIZE_BUTTON, L"MinimizeButton" }, - - { WIXSTDBA_CONTROL_HELP_CANCEL_BUTTON, L"HelpCancelButton" }, - - { WIXSTDBA_CONTROL_INSTALL_BUTTON, L"InstallButton" }, - { WIXSTDBA_CONTROL_OPTIONS_BUTTON, L"OptionsButton" }, - { WIXSTDBA_CONTROL_EULA_RICHEDIT, L"EulaRichedit" }, - { WIXSTDBA_CONTROL_EULA_LINK, L"EulaHyperlink" }, - { WIXSTDBA_CONTROL_EULA_ACCEPT_CHECKBOX, L"EulaAcceptCheckbox" }, - { WIXSTDBA_CONTROL_WELCOME_CANCEL_BUTTON, L"WelcomeCancelButton" }, - { WIXSTDBA_CONTROL_VERSION_LABEL, L"InstallVersion" }, - { WIXSTDBA_CONTROL_UPGRADE_LINK, L"UpgradeHyperlink" }, - { WIXSTDBA_CONTROL_NEXT_BUTTON, L"NextButton" }, - { WIXSTDBA_CONTROL_BACK_BUTTON, L"BackButton" }, - { WIXSTDBA_CONTROL_SKIP_BUTTON, L"SkipButton" }, - - {WIXSTDBA_CONTROL_PERMACHINE_RADIO, L"PerMachineInstall" }, - {WIXSTDBA_CONTROL_PERUSER_RADIO, L"PerUserInstall" }, - { WIXSTDBA_CONTROL_INSTALLFOLDER_EDITBOX, L"InstallFolderEditbox" }, - { WIXSTDBA_CONTROL_BROWSE_BUTTON, L"BrowseButton" }, - - {WIXSTDBA_CONTROL_REGSIGNIN_RADIO, L"SignInRButton"}, - {WIXSTDBA_CONTROL_REGCREATE_RADIO, L"CreateRButton"}, - {WIXSTDBA_CONTROL_REGMAIL_LABEL, L"RegisterEmailLabel"}, - {WIXSTDBA_CONTROL_REGUSER_LABEL, L"RegisterUserLabel"}, - {WIXSTDBA_CONTROL_REGPASS_LABEL, L"RegisterPassLabel"}, - {WIXSTDBA_CONTROL_REGMAIL_EDIT, L"RegisterEmail"}, - {WIXSTDBA_CONTROL_REGUSER_EDIT, L"RegisterUser"}, - {WIXSTDBA_CONTROL_REGPASS_EDIT, L"RegisterPass"}, - - {WIXSTDBA_CONTROL_LOGUSER_OR_MAIL_LABEL, L"LoginUsernameOrEmailLabel"}, - {WIXSTDBA_CONTROL_LOGPASS_LABEL, L"LoginPassLabel"}, - {WIXSTDBA_CONTROL_LOGUSER_OR_MAIL_EDIT, L"LoginUsernameOrEmail"}, - {WIXSTDBA_CONTROL_LOGPASS_EDIT, L"LoginPass"}, - - {WIXSTDBA_CONTROL_SKIPREG_CHECKBOX, L"SkipRegistration"}, - - { WIXSTDBA_CONTROL_REPAIR_BUTTON, L"RepairButton" }, - { WIXSTDBA_CONTROL_UNINSTALL_BUTTON, L"UninstallButton" }, - { WIXSTDBA_CONTROL_MODIFY_CANCEL_BUTTON, L"ModifyCancelButton" }, - - { WIXSTDBA_CONTROL_CACHE_PROGRESS_PACKAGE_TEXT, L"CacheProgressPackageText" }, - { WIXSTDBA_CONTROL_CACHE_PROGRESS_BAR, L"CacheProgressbar" }, - { WIXSTDBA_CONTROL_CACHE_PROGRESS_TEXT, L"CacheProgressText" }, - { WIXSTDBA_CONTROL_EXECUTE_PROGRESS_PACKAGE_TEXT, L"ExecuteProgressPackageText" }, - { WIXSTDBA_CONTROL_EXECUTE_PROGRESS_BAR, L"ExecuteProgressbar" }, - { WIXSTDBA_CONTROL_EXECUTE_PROGRESS_TEXT, L"ExecuteProgressText" }, - { WIXSTDBA_CONTROL_EXECUTE_PROGRESS_ACTIONDATA_TEXT, L"ExecuteProgressActionDataText"}, - { WIXSTDBA_CONTROL_OVERALL_PROGRESS_PACKAGE_TEXT, L"OverallProgressPackageText" }, - { WIXSTDBA_CONTROL_OVERALL_PROGRESS_BAR, L"OverallProgressbar" }, - { WIXSTDBA_CONTROL_OVERALL_CALCULATED_PROGRESS_BAR, L"OverallCalculatedProgressbar" }, - { WIXSTDBA_CONTROL_OVERALL_PROGRESS_TEXT, L"OverallProgressText" }, - { WIXSTDBA_CONTROL_PROGRESS_CANCEL_BUTTON, L"ProgressCancelButton" }, - { WIXSTDBA_CONTROL_PROGRESS_INSTALLING_HEADER, L"InstallingHeader" }, - - { WIXSTDBA_CONTROL_LAUNCH_BUTTON, L"LaunchButton" }, - { WIXSTDBA_CONTROL_SUCCESS_RESTART_TEXT, L"SuccessRestartText" }, - { WIXSTDBA_CONTROL_SUCCESS_RESTART_BUTTON, L"SuccessRestartButton" }, - { WIXSTDBA_CONTROL_SUCCESS_CANCEL_BUTTON, L"SuccessCancelButton" }, - { WIXSTDBA_CONTROL_SUCCESS_ERRINF_TEXT, L"SuccessErrorInfoText" }, - { WIXSTDBA_CONTROL_SUCCESS_ERRMSG_TEXT, L"SuccessErrorMessageText" }, - - { WIXSTDBA_CONTROL_FAILURE_LOGFILE_LINK, L"FailureLogFileLink" }, - { WIXSTDBA_CONTROL_FAILURE_MESSAGE_TEXT, L"FailureMessageText" }, - { WIXSTDBA_CONTROL_FAILURE_RESTART_TEXT, L"FailureRestartText" }, - { WIXSTDBA_CONTROL_FAILURE_RESTART_BUTTON, L"FailureRestartButton" }, - { WIXSTDBA_CONTROL_FAILURE_CANCEL_BUTTON, L"FailureCloseButton" }, -}; - - -void ExtractActionProgressText( - __in_z LPCWSTR wzActionMessage, - __in_z LPCWSTR *pwzActionProgressText - ) -{ - if (!wzActionMessage) - return; - - DWORD i = 0; - LPCWSTR wzActionProgressText = wzActionMessage; - - LPCWSTR wz = wzActionMessage; - while (*wz) - { - if (L' ' == *wz) ++i; - if (i <= 2) wzActionProgressText++; - - ++wz; - } - *pwzActionProgressText = wzActionProgressText; - - return; -} - - - - -class CWixStandardBootstrapperApplication : public CBalBaseBootstrapperApplication -{ -public: // IBootstrapperApplication - virtual STDMETHODIMP OnStartup() - { - HRESULT hr = S_OK; - DWORD dwUIThreadId = 0; - - // create UI thread - m_hUiThread = ::CreateThread(NULL, 0, UiThreadProc, this, 0, &dwUIThreadId); - if (!m_hUiThread) - { - ExitWithLastError(hr, "Failed to create UI thread."); - } - -LExit: - return hr; - } - - - virtual STDMETHODIMP_(int) OnShutdown() - { - int nResult = IDNOACTION; - - // wait for UI thread to terminate - if (m_hUiThread) - { - ::WaitForSingleObject(m_hUiThread, INFINITE); - ReleaseHandle(m_hUiThread); - } - - // If a restart was required. - if (m_fRestartRequired) - { - if (m_fAllowRestart) - { - nResult = IDRESTART; - } - - if (m_sczPrereqPackage) - { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, m_fAllowRestart ? "The prerequisites scheduled a restart. The bootstrapper application will be reloaded after the computer is restarted." - : "A restart is required by the prerequisites but the user delayed it. The bootstrapper application will be reloaded after the computer is restarted."); - } - } - else if (m_fPrereqInstalled) - { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "The prerequisites were successfully installed. The bootstrapper application will be reloaded."); - nResult = IDRELOAD_BOOTSTRAPPER; - } - else if (m_fPrereqAlreadyInstalled) - { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "The prerequisites were already installed. The bootstrapper application will not be reloaded to prevent an infinite loop."); - } - else if (m_fPrereq) - { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "The prerequisites were not successfully installed, error: 0x%x. The bootstrapper application will be not reloaded.", m_hrFinal); - } - - return nResult; - } - - - virtual STDMETHODIMP_(int) OnDetectRelatedBundle( - __in LPCWSTR wzBundleId, - __in BOOTSTRAPPER_RELATION_TYPE relationType, - __in LPCWSTR /*wzBundleTag*/, - __in BOOL fPerMachine, - __in DWORD64 /*dw64Version*/, - __in BOOTSTRAPPER_RELATED_OPERATION operation - ) - { - BalInfoAddRelatedBundleAsPackage(&m_Bundle.packages, wzBundleId, relationType, fPerMachine); - // If we're not doing a pre-req install, remember when our bundle would cause a downgrade. - if (!m_sczPrereqPackage && BOOTSTRAPPER_RELATED_OPERATION_DOWNGRADE == operation) - { - m_fDowngrading = TRUE; - } - - m_Operation = operation; // Save operation - - return CheckCanceled() ? IDCANCEL : IDOK; - } - - - virtual STDMETHODIMP_(void) OnDetectPackageComplete( - __in LPCWSTR wzPackageId, - __in HRESULT /*hrStatus*/, - __in BOOTSTRAPPER_PACKAGE_STATE state - ) - { - // If the prereq package is already installed, remember that. - if (m_sczPrereqPackage && BOOTSTRAPPER_PACKAGE_STATE_PRESENT == state && - CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzPackageId, -1, m_sczPrereqPackage, -1)) - { - m_fPrereqAlreadyInstalled = TRUE; - } - } - - - // OnDetectUpdateBegin - called when the engine begins detection for bundle update. - virtual STDMETHODIMP_(int) OnDetectUpdateBegin( - __in_z LPCWSTR wzUpdateLocation, - __in int nRecommendation - ) - { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Update location: %ls.", wzUpdateLocation); - - m_wzUpdateLocation = wzUpdateLocation; - // If there is an upgrade link, check for update on a background thread - if (ThemeControlExists(m_pTheme, WIXSTDBA_CONTROL_UPGRADE_LINK)) - { - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_UPGRADE_LINK, FALSE); - ::CreateThread(NULL, 0, ThreadProc, this, 0, NULL); - } - - return nRecommendation; - } - - - virtual STDMETHODIMP_(int) OnDetectBegin( - __in BOOL /*fInstalled*/, - __in DWORD /*cPackages*/ - ) - { - return IDNOACTION; - } - - - virtual STDMETHODIMP_(void) OnDetectComplete( - __in HRESULT hrStatus - ) - { - if (SUCCEEDED(hrStatus) && m_pBAFunction) - { - m_pBAFunction->OnDetectComplete(); - } - - if (SUCCEEDED(hrStatus)) - { - hrStatus = EvaluateConditions(); - } - - if (m_command.action == BOOTSTRAPPER_ACTION_UNINSTALL) - this->OnPlan(BOOTSTRAPPER_ACTION_UNINSTALL); - else - this->OnPlan(BOOTSTRAPPER_ACTION_INSTALL); - - // Doing some custom vars handling - //if (BalStringVariableExists(WIXSTDBA_VARIABLE_DETECT_POSTGRES)) - //{ - // LONGLONG llValue = 0; - // BalGetNumericVariable(WIXSTDBA_VARIABLE_DETECT_POSTGRES, &llValue); - // if (llValue == 1) - // m_pEngine->SetVariableNumeric(WIXSTDBA_VARIABLE_INSTALL_POSTGRES, 0); - //} - - - // If we're not interacting with the user or we're doing a layout or we're just after a force restart - // then automatically start planning. - if (BOOTSTRAPPER_DISPLAY_FULL > m_command.display || BOOTSTRAPPER_ACTION_LAYOUT == m_command.action || BOOTSTRAPPER_RESUME_TYPE_REBOOT == m_command.resumeType) - { - if (SUCCEEDED(hrStatus)) - { - ::PostMessageW(m_hWnd, WM_WIXSTDBA_PLAN_PACKAGES, 0, m_command.action); - } - } - } - - - virtual STDMETHODIMP_(int) OnPlanRelatedBundle( - __in_z LPCWSTR /*wzBundleId*/, - __inout_z BOOTSTRAPPER_REQUEST_STATE* pRequestedState - ) - { - // If we're only installing prereq, do not touch related bundles. - if (m_sczPrereqPackage) - { - *pRequestedState = BOOTSTRAPPER_REQUEST_STATE_NONE; - } - else if (BOOTSTRAPPER_RELATED_OPERATION_NONE == m_Operation && - BOOTSTRAPPER_REQUEST_STATE_NONE == *pRequestedState && - BOOTSTRAPPER_RELATION_UPGRADE != m_command.relationType) - { - // Same version upgrade detected, mark absent so the install runs - *pRequestedState = BOOTSTRAPPER_REQUEST_STATE_ABSENT; - } - - return CheckCanceled() ? IDCANCEL : IDOK; - } - - - virtual STDMETHODIMP_(int) OnPlanPackageBegin( - __in_z LPCWSTR wzPackageId, - __inout BOOTSTRAPPER_REQUEST_STATE *pRequestState - ) - { - // If we're planning to install a pre-req, install it. The pre-req needs to be installed - // in all cases (even uninstall!) so the BA can load next. - if (m_sczPrereqPackage) - { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzPackageId, -1, m_sczPrereqPackage, -1)) - { - *pRequestState = BOOTSTRAPPER_REQUEST_STATE_PRESENT; - } - else // skip everything else. - { - *pRequestState = BOOTSTRAPPER_REQUEST_STATE_NONE; - } - } - else if (m_sczAfterForcedRestartPackage) // after force restart skip packages until after the package that caused the restart. - { - // After restart we need to finish the dependency registration for our package so allow the package - // to go present. - if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzPackageId, -1, m_sczAfterForcedRestartPackage, -1)) - { - // Do not allow a repair because that could put us in a perpetual restart loop. - if (BOOTSTRAPPER_REQUEST_STATE_REPAIR == *pRequestState) - { - *pRequestState = BOOTSTRAPPER_REQUEST_STATE_PRESENT; - } - - ReleaseNullStr(m_sczAfterForcedRestartPackage); // no more skipping now. - } - else // not the matching package, so skip it. - { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Skipping package: %ls, after restart because it was applied before the restart.", wzPackageId); - - *pRequestState = BOOTSTRAPPER_REQUEST_STATE_NONE; - } - } - - return CheckCanceled() ? IDCANCEL : IDOK; - } - - - virtual STDMETHODIMP_(void) OnPlanComplete( - __in HRESULT hrStatus - ) - { - if (SUCCEEDED(hrStatus) && m_pBAFunction) - { - m_pBAFunction->OnPlanComplete(); - } - - SetState(WIXSTDBA_STATE_PLANNED, hrStatus); - - if (SUCCEEDED(hrStatus)) - { - ::PostMessageW(m_hWnd, WM_WIXSTDBA_APPLY_PACKAGES, 0, 0); - } - - m_fStartedExecution = FALSE; - m_dwCalculatedCacheProgress = 0; - m_dwCalculatedExecuteProgress = 0; - } - - - virtual STDMETHODIMP_(int) OnCachePackageBegin( - __in_z LPCWSTR wzPackageId, - __in DWORD cCachePayloads, - __in DWORD64 dw64PackageCacheSize - ) - { - if (wzPackageId && *wzPackageId) - { - BAL_INFO_PACKAGE* pPackage = NULL; - HRESULT hr = BalInfoFindPackageById(&m_Bundle.packages, wzPackageId, &pPackage); - LPCWSTR wz = (SUCCEEDED(hr) && pPackage->sczDisplayName) ? pPackage->sczDisplayName : wzPackageId; - - WCHAR wzInfo[1024] = { }; - ::StringCchPrintfW(wzInfo, countof(wzInfo), L"Acquiring %s package...", wz); - ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_CACHE_PROGRESS_PACKAGE_TEXT, wzInfo); - // If something started executing, leave it in the overall progress text. - if (!m_fStartedExecution) - { - ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_OVERALL_PROGRESS_PACKAGE_TEXT, wzInfo); - } - } - - return __super::OnCachePackageBegin(wzPackageId, cCachePayloads, dw64PackageCacheSize); - } - - virtual STDMETHODIMP_(int) OnCacheAcquireProgress( - __in_z LPCWSTR wzPackageOrContainerId, - __in_z_opt LPCWSTR wzPayloadId, - __in DWORD64 dw64Progress, - __in DWORD64 dw64Total, - __in DWORD dwOverallPercentage - ) - { - WCHAR wzProgress[5] = { }; - -#ifdef DEBUG - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnCacheAcquireProgress() - container/package: %ls, payload: %ls, progress: %I64u, total: %I64u, overall progress: %u%%", wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage); -#endif - - ::StringCchPrintfW(wzProgress, countof(wzProgress), L"%u%%", dwOverallPercentage); - ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_CACHE_PROGRESS_TEXT, wzProgress); - ThemeSetProgressControl(m_pTheme, WIXSTDBA_CONTROL_CACHE_PROGRESS_BAR, dwOverallPercentage); - - BAL_INFO_PACKAGE* pPackage = NULL; - HRESULT hr = BalInfoFindPackageById(&m_Bundle.packages, wzPackageOrContainerId, &pPackage); - LPCWSTR wzPackageName = (SUCCEEDED(hr) && pPackage->sczDisplayName) ? pPackage->sczDisplayName : wzPackageOrContainerId; - - WCHAR wzInfo[1024] = { }; - ::StringCchPrintfW(wzInfo, countof(wzInfo), L"Acquiring %s package... [ %u%% ]", wzPackageName, dwOverallPercentage); - ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_OVERALL_PROGRESS_PACKAGE_TEXT, wzInfo); - - // Restrict progress to 100% to hide burn engine progress bug. - // m_dwCalculatedCacheProgress = min(dwOverallPercentage, 100) * WIXSTDBA_ACQUIRE_PERCENTAGE / 100; - -#ifdef DEBUG - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnCacheAcquireProgress() - calculated progress: %u%%, displayed progress: %u%%", m_dwCalculatedCacheProgress, m_dwCalculatedCacheProgress + m_dwCalculatedExecuteProgress); -#endif - m_dwCalculatedCacheProgress = dwOverallPercentage * WIXSTDBA_ACQUIRE_PERCENTAGE / 100; - ThemeSetProgressControl(m_pTheme, WIXSTDBA_CONTROL_OVERALL_CALCULATED_PROGRESS_BAR, m_dwCalculatedCacheProgress + m_dwCalculatedExecuteProgress); - - SetTaskbarButtonProgress(m_dwCalculatedCacheProgress + m_dwCalculatedExecuteProgress); - - return __super::OnCacheAcquireProgress(wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage); - } - - - virtual STDMETHODIMP_(int) OnCacheAcquireComplete( - __in_z LPCWSTR wzPackageOrContainerId, - __in_z_opt LPCWSTR wzPayloadId, - __in HRESULT hrStatus, - __in int nRecommendation - ) - { - SetProgressState(hrStatus); - return __super::OnCacheAcquireComplete(wzPackageOrContainerId, wzPayloadId, hrStatus, nRecommendation); - } - - - virtual STDMETHODIMP_(int) OnCacheVerifyComplete( - __in_z LPCWSTR wzPackageId, - __in_z LPCWSTR wzPayloadId, - __in HRESULT hrStatus, - __in int nRecommendation - ) - { - SetProgressState(hrStatus); - return __super::OnCacheVerifyComplete(wzPackageId, wzPayloadId, hrStatus, nRecommendation); - } - - virtual STDMETHODIMP_(void) OnCacheComplete( - __in HRESULT /*hrStatus*/ - ) - { - ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_CACHE_PROGRESS_PACKAGE_TEXT, L""); - SetState(WIXSTDBA_STATE_CACHED, S_OK); // we always return success here and let OnApplyComplete() deal with the error. - } - - - virtual STDMETHODIMP_(int) OnError( - __in BOOTSTRAPPER_ERROR_TYPE errorType, - __in LPCWSTR wzPackageId, - __in DWORD dwCode, - __in_z LPCWSTR wzError, - __in DWORD dwUIHint, - __in DWORD /*cData*/, - __in_ecount_z_opt(cData) LPCWSTR* /*rgwzData*/, - __in int nRecommendation - ) - { - int nResult = nRecommendation; - LPWSTR sczError = NULL; - - if (BOOTSTRAPPER_DISPLAY_EMBEDDED == m_command.display) - { - HRESULT hr = m_pEngine->SendEmbeddedError(dwCode, wzError, dwUIHint, &nResult); - if (FAILED(hr)) - { - nResult = IDERROR; - } - } - else if (BOOTSTRAPPER_DISPLAY_FULL == m_command.display) - { - // If this is an authentication failure, let the engine try to handle it for us. - if (BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_SERVER == errorType || BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_PROXY == errorType) - { - nResult = IDTRYAGAIN; - } - else // show a generic error message box. - { - BalRetryErrorOccurred(wzPackageId, dwCode); - - if (!m_fShowingInternalUiThisPackage) - { - // If no error message was provided, use the error code to try and get an error message. - if (!wzError || !*wzError || BOOTSTRAPPER_ERROR_TYPE_WINDOWS_INSTALLER != errorType) - { - HRESULT hr = StrAllocFromError(&sczError, dwCode, NULL); - if (FAILED(hr) || !sczError || !*sczError) - { - StrAllocFormatted(&sczError, L"0x%x", dwCode); - } - } - - nResult = ::MessageBoxW(m_hWnd, sczError ? sczError : wzError, m_pTheme->sczCaption, dwUIHint); - } - } - - SetProgressState(HRESULT_FROM_WIN32(dwCode)); - } - else // just take note of the error code and let things continue. - { - BalRetryErrorOccurred(wzPackageId, dwCode); - } - - ReleaseStr(sczError); - return nResult; - } - - - virtual STDMETHODIMP_(int) OnExecuteMsiMessage( - __in_z LPCWSTR wzPackageId, - __in INSTALLMESSAGE mt, - __in UINT uiFlags, - __in_z LPCWSTR wzMessage, - __in DWORD cData, - __in_ecount_z_opt(cData) LPCWSTR* rgwzData, - __in int nRecommendation - ) - { -#ifdef DEBUG - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnExecuteMsiMessage() - package: %ls, message: %ls", wzPackageId, wzMessage); -#endif - if (BOOTSTRAPPER_DISPLAY_FULL == m_command.display && (INSTALLMESSAGE_WARNING == mt || INSTALLMESSAGE_USER == mt)) - { - int nResult = ::MessageBoxW(m_hWnd, wzMessage, m_pTheme->sczCaption, uiFlags); - return nResult; - } - - if (INSTALLMESSAGE_ACTIONSTART == mt) - { - LPCWSTR wzActionProgressText = NULL; - ExtractActionProgressText(wzMessage, &wzActionProgressText); - ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_EXECUTE_PROGRESS_ACTIONDATA_TEXT, wzActionProgressText); - } - - - return __super::OnExecuteMsiMessage(wzPackageId, mt, uiFlags, wzMessage, cData, rgwzData, nRecommendation); - } - - - virtual STDMETHODIMP_(int) OnProgress( - __in DWORD dwProgressPercentage, - __in DWORD dwOverallProgressPercentage - ) - { - WCHAR wzProgress[5] = { }; - -#ifdef DEBUG - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnProgress() - progress: %u%%, overall progress: %u%%", dwProgressPercentage, dwOverallProgressPercentage); -#endif - - ::StringCchPrintfW(wzProgress, countof(wzProgress), L"%u%%", dwOverallProgressPercentage); - ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_OVERALL_PROGRESS_TEXT, wzProgress); - - ThemeSetProgressControl(m_pTheme, WIXSTDBA_CONTROL_OVERALL_PROGRESS_BAR, dwOverallProgressPercentage); - SetTaskbarButtonProgress(dwOverallProgressPercentage); - - return __super::OnProgress(dwProgressPercentage, dwOverallProgressPercentage); - } - - - virtual STDMETHODIMP_(int) OnExecutePackageBegin( - __in_z LPCWSTR wzPackageId, - __in BOOL fExecute - ) - { - if (m_fIsUninstall) { - ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_PROGRESS_INSTALLING_HEADER, L"Uninstalling Meteor,\nThe JavaScript App Platform"); - } else { - ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_PROGRESS_INSTALLING_HEADER, L"Installing Meteor,\nThe JavaScript App Platform"); - } - - LPWSTR sczFormattedString = NULL; - - m_fStartedExecution = TRUE; - - if (wzPackageId && *wzPackageId) - { - BAL_INFO_PACKAGE* pPackage = NULL; - BalInfoFindPackageById(&m_Bundle.packages, wzPackageId, &pPackage); - - LPCWSTR wz = wzPackageId; - if (pPackage) - { - LOC_STRING* pLocString = NULL; - - switch (pPackage->type) - { - case BAL_INFO_PACKAGE_TYPE_BUNDLE_ADDON: - LocGetString(m_pWixLoc, L"#(loc.ExecuteAddonRelatedBundleMessage)", &pLocString); - break; - - case BAL_INFO_PACKAGE_TYPE_BUNDLE_PATCH: - LocGetString(m_pWixLoc, L"#(loc.ExecutePatchRelatedBundleMessage)", &pLocString); - break; - - case BAL_INFO_PACKAGE_TYPE_BUNDLE_UPGRADE: - LocGetString(m_pWixLoc, L"#(loc.ExecuteUpgradeRelatedBundleMessage)", &pLocString); - break; - } - - if (pLocString) - { - BalFormatString(pLocString->wzText, &sczFormattedString); - } - - wz = sczFormattedString ? sczFormattedString : pPackage->sczDisplayName ? pPackage->sczDisplayName : wzPackageId; - } - - m_fShowingInternalUiThisPackage = pPackage && pPackage->fDisplayInternalUI; - - WCHAR wzInfo[1024] = { }; - if (m_fIsUninstall) - ::StringCchPrintfW(wzInfo, countof(wzInfo), L"Uninstalling %s...", wz); - else - ::StringCchPrintfW(wzInfo, countof(wzInfo), L"Installing %s...", wz); - - ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_EXECUTE_PROGRESS_PACKAGE_TEXT, wz); - ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_OVERALL_PROGRESS_PACKAGE_TEXT, wz); - } - else - { - m_fShowingInternalUiThisPackage = FALSE; - } - - ReleaseStr(sczFormattedString); - return __super::OnExecutePackageBegin(wzPackageId, fExecute); - } - - virtual int __stdcall OnExecuteProgress( - __in_z LPCWSTR wzPackageId, - __in DWORD dwProgressPercentage, - __in DWORD dwOverallProgressPercentage - ) - { - WCHAR wzProgress[5] = { }; - -#ifdef DEBUG - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnExecuteProgress() - package: %ls, progress: %u%%, overall progress: %u%%", wzPackageId, dwProgressPercentage, dwOverallProgressPercentage); -#endif - - ::StringCchPrintfW(wzProgress, countof(wzProgress), L"%u%%", dwOverallProgressPercentage); - ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_EXECUTE_PROGRESS_TEXT, wzProgress); - ThemeSetProgressControl(m_pTheme, WIXSTDBA_CONTROL_EXECUTE_PROGRESS_BAR, dwOverallProgressPercentage); - - BAL_INFO_PACKAGE* pPackage = NULL; - HRESULT hr = BalInfoFindPackageById(&m_Bundle.packages, wzPackageId, &pPackage); - LPCWSTR wzPackageName = (SUCCEEDED(hr) && pPackage->sczDisplayName) ? pPackage->sczDisplayName : wzPackageId; - - WCHAR wzInfo[1024] = { }; - if (m_fIsUninstall) - ::StringCchPrintfW(wzInfo, countof(wzInfo), L"Uninstalling %s...", wzPackageName, dwProgressPercentage); - else - ::StringCchPrintfW(wzInfo, countof(wzInfo), L"Installing %s...", wzPackageName, dwProgressPercentage); - ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_OVERALL_PROGRESS_PACKAGE_TEXT, wzInfo); - - m_dwCalculatedExecuteProgress = dwOverallProgressPercentage * (100 - WIXSTDBA_ACQUIRE_PERCENTAGE) / 100; -#ifdef DEBUG - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnExecuteProgress() - calculated progress: %u%%, displayed progress: %u%%", m_dwCalculatedExecuteProgress, m_dwCalculatedCacheProgress + m_dwCalculatedExecuteProgress); -#endif - ThemeSetProgressControl(m_pTheme, WIXSTDBA_CONTROL_OVERALL_CALCULATED_PROGRESS_BAR, m_dwCalculatedCacheProgress + m_dwCalculatedExecuteProgress); - - SetTaskbarButtonProgress(m_dwCalculatedCacheProgress + m_dwCalculatedExecuteProgress); - - return __super::OnExecuteProgress(wzPackageId, dwProgressPercentage, dwOverallProgressPercentage); - } - - - virtual STDMETHODIMP_(int) OnExecutePackageComplete( - __in_z LPCWSTR wzPackageId, - __in HRESULT hrExitCode, - __in BOOTSTRAPPER_APPLY_RESTART restart, - __in int nRecommendation - ) - { - SetProgressState(hrExitCode); - - int nResult = __super::OnExecutePackageComplete(wzPackageId, hrExitCode, restart, nRecommendation); - - if (m_sczPrereqPackage && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzPackageId, -1, m_sczPrereqPackage, -1)) - { - m_fPrereqInstalled = SUCCEEDED(hrExitCode); - - // If the pre-req required a restart (any restart) then do an immediate - // restart to ensure that the bundle will get launched again post reboot. - if (BOOTSTRAPPER_APPLY_RESTART_NONE != restart) - { - nResult = IDRESTART; - } - } - - - /// On package install complete, if WIXSTDBA_VARIABLE_LOGSPATH is defined - /// then will move the package installation log to the specified path. - if (BalStringVariableExists(WIXSTDBA_VARIABLE_LOGSPATH)) - { - LPWSTR wzVarPackageLog = NULL; - StrAllocFormatted(&wzVarPackageLog, L"WixBundleLog_%s", wzPackageId); - if (BalStringVariableExists(wzVarPackageLog)) - { - LPWSTR wzPackageLog = NULL; - LPWSTR wzInstallLogPath = NULL; - LPWSTR wzDstPackageLog = NULL; - - if ( SUCCEEDED(BalGetStringVariable(WIXSTDBA_VARIABLE_LOGSPATH, &wzInstallLogPath)) && - SUCCEEDED(BalGetStringVariable(wzVarPackageLog, &wzPackageLog))) - { - StrAllocFormatted(&wzDstPackageLog, L"%s\\%s", wzInstallLogPath, PathFile(wzPackageLog)); - DirEnsureExists(wzInstallLogPath, NULL); - FileEnsureMove(wzPackageLog, wzDstPackageLog, TRUE, TRUE); - } else - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Setup was unable to copy logs to the specified installation log path."); - - } - } - - return nResult; - } - - - virtual STDMETHODIMP_(void) OnExecuteComplete( - __in HRESULT hrStatus - ) - { - ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_EXECUTE_PROGRESS_PACKAGE_TEXT, L""); - ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_EXECUTE_PROGRESS_ACTIONDATA_TEXT, L""); - ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_OVERALL_PROGRESS_PACKAGE_TEXT, L""); - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_PROGRESS_CANCEL_BUTTON, FALSE); // no more cancel. - - SetState(WIXSTDBA_STATE_EXECUTED, S_OK); // we always return success here and let OnApplyComplete() deal with the error. - SetProgressState(hrStatus); - } - - virtual STDMETHODIMP_(int) OnResolveSource( - __in_z LPCWSTR wzPackageOrContainerId, - __in_z_opt LPCWSTR wzPayloadId, - __in_z LPCWSTR wzLocalSource, - __in_z_opt LPCWSTR wzDownloadSource - ) - { - int nResult = IDERROR; // assume we won't resolve source and that is unexpected. - - if (BOOTSTRAPPER_DISPLAY_FULL == m_command.display) - { - if (wzDownloadSource) - { - nResult = IDDOWNLOAD; - } - else // prompt to change the source location. - { - OPENFILENAMEW ofn = { }; - WCHAR wzFile[MAX_PATH] = { }; - - ::StringCchCopyW(wzFile, countof(wzFile), wzLocalSource); - - ofn.lStructSize = sizeof(ofn); - ofn.hwndOwner = m_hWnd; - ofn.lpstrFile = wzFile; - ofn.nMaxFile = countof(wzFile); - ofn.lpstrFilter = L"All Files\0*.*\0"; - ofn.nFilterIndex = 1; - ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST; - ofn.lpstrTitle = m_pTheme->sczCaption; - - if (::GetOpenFileNameW(&ofn)) - { - HRESULT hr = m_pEngine->SetLocalSource(wzPackageOrContainerId, wzPayloadId, ofn.lpstrFile); - nResult = SUCCEEDED(hr) ? IDRETRY : IDERROR; - } - else - { - nResult = IDCANCEL; - } - } - } - else if (wzDownloadSource) - { - // If doing a non-interactive install and download source is available, let's try downloading the package silently - nResult = IDDOWNLOAD; - } - // else there's nothing more we can do in non-interactive mode - - return CheckCanceled() ? IDCANCEL : nResult; - } - - - virtual STDMETHODIMP_(int) OnApplyComplete( - __in HRESULT hrStatus, - __in BOOTSTRAPPER_APPLY_RESTART restart - ) - { - 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. - - // If a restart was encountered and we are not suppressing restarts, then restart is required. - m_fRestartRequired = (BOOTSTRAPPER_APPLY_RESTART_NONE != restart && BOOTSTRAPPER_RESTART_NEVER < m_command.restart); - // 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. - m_fAllowRestart = m_fRestartRequired && (BOOTSTRAPPER_DISPLAY_FULL > m_command.display || BOOTSTRAPPER_RESTART_PROMPT < m_command.restart); - - // If we are showing UI, wait a beat before moving to the final screen. - if (BOOTSTRAPPER_DISPLAY_NONE < m_command.display) - { - ::Sleep(250); - } - - if (m_command.action == BOOTSTRAPPER_ACTION_UNINSTALL || BOOTSTRAPPER_DISPLAY_FULL > m_command.display) - SetState(WIXSTDBA_STATE_APPLIED, S_OK); - else - SetState(WIXSTDBA_STATE_SVC_OPTIONS, hrStatus); - - // If we successfully applied an update close the window since the new Bundle should be running now. - if (SUCCEEDED(hrStatus) && m_fUpdating) - { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Update downloaded, close bundle."); - ::PostMessageW(m_hWnd, WM_CLOSE, 0, 0); - } - - return IDNOACTION; - } - - -private: // privates - // - // UiThreadProc - entrypoint for UI thread. - // - static DWORD WINAPI UiThreadProc( - __in LPVOID pvContext - ) - { - HRESULT hr = S_OK; - CWixStandardBootstrapperApplication* pThis = (CWixStandardBootstrapperApplication*)pvContext; - BOOL fComInitialized = FALSE; - BOOL fRet = FALSE; - MSG msg = { }; - - // Initialize COM and theme. - hr = ::CoInitialize(NULL); - BalExitOnFailure(hr, "Failed to initialize COM."); - fComInitialized = TRUE; - - hr = ThemeInitialize(pThis->m_hModule); - BalExitOnFailure(hr, "Failed to initialize theme manager."); - - hr = pThis->InitializeData(); - BalExitOnFailure(hr, "Failed to initialize data in bootstrapper application."); - - - // Create main window. - pThis->InitializeTaskbarButton(); - hr = pThis->CreateMainWindow(); - BalExitOnFailure(hr, "Failed to create main window."); - - // Okay, we're ready for packages now. - pThis->SetState(WIXSTDBA_STATE_INITIALIZED, hr); - ::PostMessageW(pThis->m_hWnd, BOOTSTRAPPER_ACTION_HELP == pThis->m_command.action ? WM_WIXSTDBA_SHOW_HELP : WM_WIXSTDBA_DETECT_PACKAGES, 0, 0); - - // 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(pThis->m_pTheme, msg.hwnd, &msg)) - { - ::TranslateMessage(&msg); - ::DispatchMessageW(&msg); - } - } - - // Succeeded thus far, check to see if anything went wrong while actually - // executing changes. - if (FAILED(pThis->m_hrFinal)) - { - hr = pThis->m_hrFinal; - } - else if (pThis->CheckCanceled()) - { - hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT); - } - -LExit: - // destroy main window - pThis->DestroyMainWindow(); - - // initiate engine shutdown - DWORD dwQuit = HRESULT_CODE(hr); - if (BOOTSTRAPPER_APPLY_RESTART_INITIATED == pThis->m_restartResult) - { - dwQuit = ERROR_SUCCESS_REBOOT_INITIATED; - } - else if (BOOTSTRAPPER_APPLY_RESTART_REQUIRED == pThis->m_restartResult) - { - dwQuit = ERROR_SUCCESS_REBOOT_REQUIRED; - } - pThis->m_pEngine->Quit(dwQuit); - - ReleaseTheme(pThis->m_pTheme); - ThemeUninitialize(); - - // uninitialize COM - if (fComInitialized) - { - ::CoUninitialize(); - } - - return hr; - } - - - static DWORD WINAPI ThreadProc( - __in LPVOID pvContext - ) - { - CWixStandardBootstrapperApplication* pThis = static_cast(pvContext);; - - HRESULT hr = S_OK; - IXMLDOMDocument *pixd = NULL; - IXMLDOMNode* pNode = NULL; - LPWSTR sczUpdateUrl = NULL; - DWORD64 qwSize = 0; - - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Checking for update."); - - // Load the update XML from a location url and parse it for an update. - // - // - // - // - // - - hr = XmlLoadDocumentFromFile(pThis->m_wzUpdateLocation, &pixd); - BalExitOnFailure(hr, "Failed to load version check XML document."); - - hr = XmlSelectSingleNode(pixd, L"/Setup/Upgrade", &pNode); - BalExitOnFailure(hr, "Failed to select upgrade node."); - - if (S_OK == hr) - { - hr = XmlGetAttributeEx(pNode, L"Url", &sczUpdateUrl); - BalExitOnFailure(hr, "Failed to get url attribute."); - - hr = XmlGetAttributeLargeNumber(pNode, L"Size", &qwSize); - } - - if (sczUpdateUrl && *sczUpdateUrl) - { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Update available, url: %ls; size: %I64u.", sczUpdateUrl, qwSize); - // Show upgrade on install and modify pages - if (pThis->m_rgdwPageIds[WIXSTDBA_PAGE_INSTALL] == pThis->m_dwCurrentPage || - pThis->m_rgdwPageIds[WIXSTDBA_PAGE_MODIFY] == pThis->m_dwCurrentPage) - { - pThis->m_pEngine->SetUpdate(NULL, sczUpdateUrl, qwSize, BOOTSTRAPPER_UPDATE_HASH_TYPE_NONE, NULL, 0); - ThemeControlEnable(pThis->m_pTheme, WIXSTDBA_CONTROL_UPGRADE_LINK, TRUE); - } - } - else - { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "No update available."); - } - -LExit: - ReleaseObject(pixd); - ReleaseObject(pNode); - ReleaseStr(sczUpdateUrl); - - return 0; - } - - - // - // InitializeData - initializes all the package and prereq information. - // - HRESULT InitializeData() - { - HRESULT hr = S_OK; - LPWSTR sczModulePath = NULL; - IXMLDOMDocument *pixdManifest = NULL; - - hr = BalManifestLoad(m_hModule, &pixdManifest); - BalExitOnFailure(hr, "Failed to load bootstrapper application manifest."); - - hr = ParseOverridableVariablesFromXml(pixdManifest); - BalExitOnFailure(hr, "Failed to read overridable variables."); - - hr = ProcessCommandLine(&m_sczLanguage); - ExitOnFailure(hr, "Unknown commandline parameters."); - - // Override default language to correctly support UK English (this is not required in WiX 3.8) - if (!(m_sczLanguage && *m_sczLanguage)) - { - hr = StrAllocFormatted(&m_sczLanguage, L"%u", ::GetUserDefaultLangID()); - BalExitOnFailure(hr, "Failed to set language."); - } - - hr = PathRelativeToModule(&sczModulePath, NULL, m_hModule); - BalExitOnFailure(hr, "Failed to get module path."); - - hr = LoadLocalization(sczModulePath, m_sczLanguage); - ExitOnFailure(hr, "Failed to load localization."); - - hr = LoadTheme(sczModulePath, m_sczLanguage); - ExitOnFailure(hr, "Failed to load theme."); - - hr = BalInfoParseFromXml(&m_Bundle, pixdManifest); - BalExitOnFailure(hr, "Failed to load bundle information."); - - hr = BalConditionsParseFromXml(&m_Conditions, pixdManifest, m_pWixLoc); - BalExitOnFailure(hr, "Failed to load conditions from XML."); - - LoadBootstrapperBAFunctions(); - - hr = ParseBootrapperApplicationDataFromXml(pixdManifest); - BalExitOnFailure(hr, "Failed to read bootstrapper application data."); - - LOC_STRING* pLocString = NULL; - LocGetString(m_pWixLoc, L"#(loc.ProgressHeader)", &pLocString); - m_pEngine->SetVariableString(WIXSTDBA_VARIABLE_PROGRESS_HEADER, pLocString->wzText); - LocGetString(m_pWixLoc, L"#(loc.ProgressInfo)", &pLocString); - m_pEngine->SetVariableString(WIXSTDBA_VARIABLE_PROGRESS_INFO, pLocString->wzText); - LocGetString(m_pWixLoc, L"#(loc.SuccessHeader)", &pLocString); - m_pEngine->SetVariableString(WIXSTDBA_VARIABLE_SUCCESS_HEADER, pLocString->wzText); - LocGetString(m_pWixLoc, L"#(loc.SuccessInfo)", &pLocString); - m_pEngine->SetVariableString(WIXSTDBA_VARIABLE_SUCCESS_INFO, pLocString->wzText); - LocGetString(m_pWixLoc, L"#(loc.FailureHeader)", &pLocString); - m_pEngine->SetVariableString(WIXSTDBA_VARIABLE_FAILURE_HEADER, pLocString->wzText); - if (m_fPrereq) - { - hr = ParsePrerequisiteInformationFromXml(pixdManifest); - BalExitOnFailure(hr, "Failed to read prerequisite information."); - } - else - { - hr = ParseBootrapperApplicationDataFromXml(pixdManifest); - BalExitOnFailure(hr, "Failed to read bootstrapper application data."); - } - - if (m_fOutputToConsole) - { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Write to console command was detected! Trying to attach to the parent console process"); - BOOL bAttCons = AttachConsole(ATTACH_PARENT_PROCESS); - - if (!bAttCons) - { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Failed to attach to parent process."); - } - - if (bAttCons) - { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Successfully attached to parent console process."); - m_fStdConsoleHandle = GetStdHandle(STD_OUTPUT_HANDLE); - m_fAttachedToConsole = ((m_fStdConsoleHandle != NULL) && (m_fStdConsoleHandle != INVALID_HANDLE_VALUE)); - if (!m_fAttachedToConsole) - { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Failed to get the console handle"); - FreeConsole(); - } - } - - if (!m_fAttachedToConsole) - { - hr = E_UNEXPECTED; - BalExitOnFailure(hr, "Failed to setup console output. Setup will exit now!"); - } - } - - -LExit: - ReleaseObject(pixdManifest); - ReleaseStr(sczModulePath); - - return hr; - } - - - // - // ProcessCommandLine - process the provided command line arguments. - // - HRESULT ProcessCommandLine( - __inout LPWSTR* psczLanguage - ) - { - HRESULT hr = S_OK; - int argc = 0; - LPWSTR* argv = NULL; - LPWSTR sczVariableName = NULL; - LPWSTR sczVariableValue = NULL; - - if (m_command.wzCommandLine && *m_command.wzCommandLine) - { - argv = ::CommandLineToArgvW(m_command.wzCommandLine, &argc); - ExitOnNullWithLastError(argv, hr, "Failed to get command line."); - - for (int i = 0; i < argc; ++i) - { - if (argv[i][0] == L'-' || argv[i][0] == L'/') - { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"lang", -1)) - { - if (i + 1 >= argc) - { - hr = E_INVALIDARG; - BalExitOnFailure(hr, "Must specify a language."); - } - - ++i; - - hr = StrAllocString(psczLanguage, &argv[i][0], 0); - BalExitOnFailure(hr, "Failed to copy language."); - } - } - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"toconsole", -1)) - { - m_fOutputToConsole = TRUE; - m_command.display = BOOTSTRAPPER_DISPLAY_NONE; - if (BOOTSTRAPPER_RESTART_UNKNOWN == m_command.restart) - { - m_command.restart = BOOTSTRAPPER_RESTART_AUTOMATIC; - } - } - else if (m_sdOverridableVariables) - { - const wchar_t* pwc = wcschr(argv[i], L'='); - if (pwc) - { - hr = StrAllocString(&sczVariableName, argv[i], pwc - argv[i]); - BalExitOnFailure(hr, "Failed to copy variable name."); - - hr = DictKeyExists(m_sdOverridableVariables, sczVariableName); - if (E_NOTFOUND == hr) - { - BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Ignoring attempt to set non-overridable variable: '%ls'.", sczVariableName); - hr = S_OK; - continue; - } - ExitOnFailure(hr, "Failed to check the dictionary of overridable variables."); - - hr = StrAllocString(&sczVariableValue, ++pwc, 0); - BalExitOnFailure(hr, "Failed to copy variable value."); - - hr = m_pEngine->SetVariableString(sczVariableName, sczVariableValue); - BalExitOnFailure(hr, "Failed to set variable."); - } - else - { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Ignoring unknown argument: %ls", argv[i]); - } - } - } - } - -LExit: - if (argv) - { - ::LocalFree(argv); - } - - ReleaseStr(sczVariableName); - ReleaseStr(sczVariableValue); - - return hr; - } - - HRESULT LoadLocalization( - __in_z LPCWSTR wzModulePath, - __in_z_opt LPCWSTR wzLanguage - ) - { - HRESULT hr = S_OK; - LPWSTR sczLocPath = NULL; - LPCWSTR wzLocFileName = L"thm.wxl"; - - hr = LocProbeForFile(wzModulePath, wzLocFileName, wzLanguage, &sczLocPath); - BalExitOnFailure2(hr, "Failed to probe for loc file: %ls in path: %ls", wzLocFileName, wzModulePath); - - hr = LocLoadFromFile(sczLocPath, &m_pWixLoc); - BalExitOnFailure1(hr, "Failed to load loc file from path: %ls", sczLocPath); - - if (WIX_LOCALIZATION_LANGUAGE_NOT_SET != m_pWixLoc->dwLangId) - { - ::SetThreadLocale(m_pWixLoc->dwLangId); - } - - hr = StrAllocString(&m_sczConfirmCloseMessage, L"#(loc.ConfirmCancelMessage)", 0); - ExitOnFailure(hr, "Failed to initialize confirm message loc identifier."); - - hr = LocLocalizeString(m_pWixLoc, &m_sczConfirmCloseMessage); - BalExitOnFailure1(hr, "Failed to localize confirm close message: %ls", m_sczConfirmCloseMessage); - -LExit: - ReleaseStr(sczLocPath); - - return hr; - } - - - HRESULT LoadTheme( - __in_z LPCWSTR wzModulePath, - __in_z_opt LPCWSTR wzLanguage - ) - { - HRESULT hr = S_OK; - LPWSTR sczThemePath = NULL; - LPCWSTR wzThemeFileName = L"thm.xml"; - LPWSTR sczCaption = NULL; - - hr = LocProbeForFile(wzModulePath, wzThemeFileName, wzLanguage, &sczThemePath); - BalExitOnFailure2(hr, "Failed to probe for theme file: %ls in path: %ls", wzThemeFileName, wzModulePath); - - hr = ThemeLoadFromFile(sczThemePath, &m_pTheme); - BalExitOnFailure1(hr, "Failed to load theme from path: %ls", sczThemePath); - - hr = ThemeLocalize(m_pTheme, m_pWixLoc); - BalExitOnFailure1(hr, "Failed to localize theme: %ls", sczThemePath); - - // Update the caption if there are any formatted strings in it. - hr = BalFormatString(m_pTheme->sczCaption, &sczCaption); - if (SUCCEEDED(hr)) - { - ThemeUpdateCaption(m_pTheme, sczCaption); - } - -LExit: - ReleaseStr(sczCaption); - ReleaseStr(sczThemePath); - - return hr; - } - - - HRESULT ParseOverridableVariablesFromXml( - __in IXMLDOMDocument* pixdManifest - ) - { - HRESULT hr = S_OK; - IXMLDOMNode* pNode = NULL; - IXMLDOMNodeList* pNodes = NULL; - DWORD cNodes = 0; - LPWSTR scz = NULL; - - // get the list of variables users can override on the command line - hr = XmlSelectNodes(pixdManifest, L"/BootstrapperApplicationData/WixStdbaOverridableVariable", &pNodes); - if (S_FALSE == hr) - { - ExitFunction1(hr = S_OK); - } - ExitOnFailure(hr, "Failed to select overridable variable nodes."); - - hr = pNodes->get_length((long*)&cNodes); - ExitOnFailure(hr, "Failed to get overridable variable node count."); - - if (cNodes) - { - hr = DictCreateStringList(&m_sdOverridableVariables, 32, DICT_FLAG_NONE); - ExitOnFailure(hr, "Failed to create the string dictionary."); - - for (DWORD i = 0; i < cNodes; ++i) - { - hr = XmlNextElement(pNodes, &pNode, NULL); - ExitOnFailure(hr, "Failed to get next node."); - - // @Name - hr = XmlGetAttributeEx(pNode, L"Name", &scz); - ExitOnFailure(hr, "Failed to get @Name."); - - hr = DictAddKey(m_sdOverridableVariables, scz); - ExitOnFailure1(hr, "Failed to add \"%ls\" to the string dictionary.", scz); - - // prepare next iteration - ReleaseNullObject(pNode); - } - } - -LExit: - ReleaseObject(pNode); - ReleaseObject(pNodes); - ReleaseStr(scz); - return hr; - } - - - HRESULT ParsePrerequisiteInformationFromXml( - __in IXMLDOMDocument* pixdManifest - ) - { - HRESULT hr = S_OK; - IXMLDOMNode* pNode = NULL; - - hr = XmlSelectSingleNode(pixdManifest, L"/BootstrapperApplicationData/WixMbaPrereqInformation", &pNode); - if (S_FALSE == hr) - { - hr = E_INVALIDARG; - } - BalExitOnFailure(hr, "BootstrapperApplication.xml manifest is missing prerequisite information."); - - hr = XmlGetAttributeEx(pNode, L"PackageId", &m_sczPrereqPackage); - BalExitOnFailure(hr, "Failed to get prerequisite package identifier."); - - hr = XmlGetAttributeEx(pNode, L"LicenseUrl", &m_sczLicenseUrl); - if (E_NOTFOUND == hr) - { - hr = S_OK; - } - BalExitOnFailure(hr, "Failed to get prerequisite license URL."); - - hr = XmlGetAttributeEx(pNode, L"LicenseFile", &m_sczLicenseFile); - if (E_NOTFOUND == hr) - { - hr = S_OK; - } - BalExitOnFailure(hr, "Failed to get prerequisite license file."); - -LExit: - ReleaseObject(pNode); - return hr; - } - - - HRESULT ParseBootrapperApplicationDataFromXml( - __in IXMLDOMDocument* pixdManifest - ) - { - HRESULT hr = S_OK; - IXMLDOMNode* pNode = NULL; - DWORD dwBool = 0; - - hr = XmlSelectSingleNode(pixdManifest, L"/BootstrapperApplicationData/WixExtbaInformation", &pNode); - if (S_FALSE == hr) - { - hr = E_INVALIDARG; - } - BalExitOnFailure(hr, "BootstrapperApplication.xml manifest is missing wixextba information."); - - hr = XmlGetAttributeEx(pNode, L"LicenseFile", &m_sczLicenseFile); - if (E_NOTFOUND == hr) - { - hr = S_OK; - } - BalExitOnFailure(hr, "Failed to get license file."); - - hr = XmlGetAttributeEx(pNode, L"LicenseUrl", &m_sczLicenseUrl); - if (E_NOTFOUND == hr) - { - hr = S_OK; - } - BalExitOnFailure(hr, "Failed to get license URL."); - - ReleaseObject(pNode); - - hr = XmlSelectSingleNode(pixdManifest, L"/BootstrapperApplicationData/WixExtbaOptions", &pNode); - if (S_FALSE == hr) - { - ExitFunction1(hr = S_OK); - } - BalExitOnFailure(hr, "Failed to read wixextba options from BootstrapperApplication.xml manifest."); - - hr = XmlGetAttributeNumber(pNode, L"SuppressOptionsUI", &dwBool); - if (E_NOTFOUND == hr) - { - hr = S_OK; - } - else if (SUCCEEDED(hr)) - { - m_fSuppressOptionsUI = 0 < dwBool; - } - BalExitOnFailure(hr, "Failed to get SuppressOptionsUI value."); - - dwBool = 0; - hr = XmlGetAttributeNumber(pNode, L"SuppressDowngradeFailure", &dwBool); - if (E_NOTFOUND == hr) - { - hr = S_OK; - } - else if (SUCCEEDED(hr)) - { - m_fSuppressDowngradeFailure = 0 < dwBool; - } - BalExitOnFailure(hr, "Failed to get SuppressDowngradeFailure value."); - - dwBool = 0; - hr = XmlGetAttributeNumber(pNode, L"SuppressRepair", &dwBool); - if (E_NOTFOUND == hr) - { - hr = S_OK; - } - else if (SUCCEEDED(hr)) - { - m_fSuppressRepair = 0 < dwBool; - } - BalExitOnFailure(hr, "Failed to get SuppressRepair value."); - - hr = XmlGetAttributeNumber(pNode, L"ShowVersion", &dwBool); - if (E_NOTFOUND == hr) - { - hr = S_OK; - } - else if (SUCCEEDED(hr)) - { - m_fShowVersion = 0 < dwBool; - } - BalExitOnFailure(hr, "Failed to get ShowVersion value."); - -LExit: - ReleaseObject(pNode); - return hr; - } - - - // - // CreateMainWindow - creates the main install window. - // - HRESULT CreateMainWindow() - { - HRESULT hr = S_OK; - HICON hIcon = reinterpret_cast(m_pTheme->hIcon); - WNDCLASSW wc = { }; - DWORD dwWindowStyle = 0; - int x = CW_USEDEFAULT; - int y = CW_USEDEFAULT; - POINT ptCursor = { }; - HMONITOR hMonitor = NULL; - MONITORINFO mi = { }; - - // 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 = CWixStandardBootstrapperApplication::WndProc; - wc.hInstance = m_hModule; - wc.hIcon = hIcon; - wc.hCursor = ::LoadCursorW(NULL, (LPCWSTR)IDC_ARROW); - wc.hbrBackground = m_pTheme->rgFonts[m_pTheme->dwFontId].hBackground; - wc.lpszMenuName = NULL; - wc.lpszClassName = WIXSTDBA_WINDOW_CLASS; - if (!::RegisterClassW(&wc)) - { - ExitWithLastError(hr, "Failed to register window."); - } - - m_fRegistered = TRUE; - - // Calculate the window style based on the theme style and command display value. - dwWindowStyle = m_pTheme->dwStyle; - if (BOOTSTRAPPER_DISPLAY_NONE >= m_command.display) - { - dwWindowStyle &= ~WS_VISIBLE; - } - - // Don't show the window if there is a splash screen (it will be made visible when the splash screen is hidden) - if (::IsWindow(m_command.hwndSplashScreen)) - { - dwWindowStyle &= ~WS_VISIBLE; - } - - // Center the window on the monitor with the mouse. - if (::GetCursorPos(&ptCursor)) - { - hMonitor = ::MonitorFromPoint(ptCursor, MONITOR_DEFAULTTONEAREST); - if (hMonitor) - { - mi.cbSize = sizeof(mi); - if (::GetMonitorInfoW(hMonitor, &mi)) - { - x = mi.rcWork.left + (mi.rcWork.right - mi.rcWork.left - m_pTheme->nWidth) / 2; - y = mi.rcWork.top + (mi.rcWork.bottom - mi.rcWork.top - m_pTheme->nHeight) / 2; - } - } - } - - m_hWnd = ::CreateWindowExW(0, wc.lpszClassName, m_pTheme->sczCaption, dwWindowStyle, x, y, m_pTheme->nWidth, m_pTheme->nHeight, HWND_DESKTOP, NULL, m_hModule, this); - ExitOnNullWithLastError(m_hWnd, hr, "Failed to create window."); - - hr = S_OK; - -LExit: - return hr; - } - - - // - // InitializeTaskbarButton - initializes taskbar button for progress. - // - void InitializeTaskbarButton() - { - HRESULT hr = S_OK; - - hr = ::CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_ALL, __uuidof(ITaskbarList3), reinterpret_cast(&m_pTaskbarList)); - if (REGDB_E_CLASSNOTREG == hr) // not supported before Windows 7 - { - ExitFunction1(hr = S_OK); - } - BalExitOnFailure(hr, "Failed to create ITaskbarList3. Continuing."); - - m_uTaskbarButtonCreatedMessage = ::RegisterWindowMessageW(L"TaskbarButtonCreated"); - BalExitOnNullWithLastError(m_uTaskbarButtonCreatedMessage, hr, "Failed to get TaskbarButtonCreated message. Continuing."); - -LExit: - return; - } - - // - // DestroyMainWindow - clean up all the window registration. - // - void DestroyMainWindow() - { - if (::IsWindow(m_hWnd)) - { - ::DestroyWindow(m_hWnd); - m_hWnd = NULL; - m_fTaskbarButtonOK = FALSE; - } - - if (m_fRegistered) - { - ::UnregisterClassW(WIXSTDBA_WINDOW_CLASS, m_hModule); - m_fRegistered = FALSE; - } - } - - - // - // WndProc - standard windows message handler. - // - static LRESULT CALLBACK WndProc( - __in HWND hWnd, - __in UINT uMsg, - __in WPARAM wParam, - __in LPARAM lParam - ) - { -#pragma warning(suppress:4312) - CWixStandardBootstrapperApplication* pBA = reinterpret_cast(::GetWindowLongPtrW(hWnd, GWLP_USERDATA)); - - switch (uMsg) - { - case WM_NCCREATE: - { - LPCREATESTRUCT lpcs = reinterpret_cast(lParam); - pBA = reinterpret_cast(lpcs->lpCreateParams); -#pragma warning(suppress:4244) - ::SetWindowLongPtrW(hWnd, GWLP_USERDATA, reinterpret_cast(pBA)); - } - break; - - case WM_NCDESTROY: - { - LRESULT lres = ThemeDefWindowProc(pBA ? pBA->m_pTheme : NULL, hWnd, uMsg, wParam, lParam); - ::SetWindowLongPtrW(hWnd, GWLP_USERDATA, 0); - return lres; - } - - case WM_CREATE: - if (!pBA->OnCreate(hWnd)) - { - return -1; - } - break; - - case WM_QUERYENDSESSION: - return IDCANCEL != pBA->OnSystemShutdown(static_cast(lParam), IDCANCEL); - - case WM_CLOSE: - // If the user chose not to close, do *not* let the default window proc handle the message. - if (!pBA->OnClose()) - { - return 0; - } - break; - - case WM_DESTROY: - ::PostQuitMessage(0); - break; - - case WM_WIXSTDBA_SHOW_HELP: - pBA->OnShowHelp(); - return 0; - - case WM_WIXSTDBA_DETECT_PACKAGES: - pBA->OnDetect(); - return 0; - - case WM_WIXSTDBA_PLAN_PACKAGES: - pBA->OnPlan(static_cast(lParam)); - return 0; - - case WM_WIXSTDBA_APPLY_PACKAGES: - pBA->OnApply(); - return 0; - - case WM_WIXSTDBA_CHANGE_STATE: - pBA->OnChangeState(static_cast(lParam)); - return 0; - - case WM_COMMAND: - switch (LOWORD(wParam)) - { - case WIXSTDBA_CONTROL_EULA_ACCEPT_CHECKBOX: - pBA->OnClickAcceptCheckbox(); - return 0; - - case WIXSTDBA_CONTROL_PERMACHINE_RADIO: __fallthrough; - case WIXSTDBA_CONTROL_PERUSER_RADIO: - pBA->OnClickInstallScope(); - return 0; - - case WIXSTDBA_CONTROL_REGSIGNIN_RADIO: __fallthrough; - case WIXSTDBA_CONTROL_REGCREATE_RADIO: __fallthrough; - case WIXSTDBA_CONTROL_SKIPREG_CHECKBOX: - pBA->OnClickSkipRegistrationCheckbox(); - return 0; - - - case WIXSTDBA_CONTROL_OPTIONS_BUTTON: - pBA->OnClickOptionsButton(); - return 0; - - case WIXSTDBA_CONTROL_BROWSE_BUTTON: - pBA->OnClickOptionsBrowseButton(WIXSTDBA_CONTROL_BROWSE_BUTTON); - return 0; - - case WIXSTDBA_CONTROL_OK_BUTTON: - pBA->OnClickOptionsOkButton(); - return 0; - - case WIXSTDBA_CONTROL_CANCEL_BUTTON: - pBA->OnClickOptionsCancelButton(); - return 0; - - case WIXSTDBA_CONTROL_SKIP_BUTTON: - pBA->SetState(WIXSTDBA_STATE_APPLIED, S_OK); - return 0; - - case WIXSTDBA_CONTROL_INSTALL_BUTTON: - pBA->OnSignIn(); - return 0; - - case WIXSTDBA_CONTROL_REPAIR_BUTTON: - pBA->OnClickRepairButton(); - return 0; - - case WIXSTDBA_CONTROL_UNINSTALL_BUTTON: - pBA->OnClickUninstallButton(); - return 0; - - case WIXSTDBA_CONTROL_LAUNCH_BUTTON: - pBA->OnClickLaunchButton(); - return 0; - - case WIXSTDBA_CONTROL_SUCCESS_RESTART_BUTTON: __fallthrough; - case WIXSTDBA_CONTROL_FAILURE_RESTART_BUTTON: - pBA->OnClickRestartButton(); - return 0; - - case WIXSTDBA_CONTROL_HELP_CANCEL_BUTTON: __fallthrough; - - case WIXSTDBA_CONTROL_WELCOME_CANCEL_BUTTON: __fallthrough; - case WIXSTDBA_CONTROL_MODIFY_CANCEL_BUTTON: __fallthrough; - case WIXSTDBA_CONTROL_PROGRESS_CANCEL_BUTTON: __fallthrough; - case WIXSTDBA_CONTROL_SUCCESS_CANCEL_BUTTON: __fallthrough; - case WIXSTDBA_CONTROL_FAILURE_CANCEL_BUTTON: __fallthrough; - case WIXSTDBA_CONTROL_CLOSE_BUTTON: - pBA->OnClickCloseButton(); - return 0; - case WIXSTDBA_CONTROL_NEXT_BUTTON: - pBA->OnClickNextButton(); - return 0; - case WIXSTDBA_CONTROL_BACK_BUTTON: - pBA->OnClickBackButton(); - return 0; - - } - break; - - case WM_NOTIFY: - if (lParam) - { - LPNMHDR pnmhdr = reinterpret_cast(lParam); - switch (pnmhdr->code) - { - case NM_CLICK: __fallthrough; - case NM_RETURN: - switch (static_cast(pnmhdr->idFrom)) - { - case WIXSTDBA_CONTROL_EULA_LINK: - pBA->OnClickEulaLink(); - return 1; - case WIXSTDBA_CONTROL_FAILURE_LOGFILE_LINK: - pBA->OnClickLogFileLink(); - return 1; - case WIXSTDBA_CONTROL_UPGRADE_LINK: - pBA->OnClickUpgradeLink(); - return 1; - } - } - } - break; - } - - if (pBA && pBA->m_pTaskbarList && uMsg == pBA->m_uTaskbarButtonCreatedMessage) - { - pBA->m_fTaskbarButtonOK = TRUE; - return 0; - } - - return ThemeDefWindowProc(pBA ? pBA->m_pTheme : NULL, hWnd, uMsg, wParam, lParam); - } - - - // - // OnCreate - finishes loading the theme. - // - BOOL OnCreate( - __in HWND hWnd - ) - { - HRESULT hr = S_OK; - LPWSTR sczText = NULL; - LPWSTR sczLicenseFormatted = NULL; - LPWSTR sczLicensePath = NULL; - LPWSTR sczLicenseDirectory = NULL; - LPWSTR sczLicenseFilename = NULL; - - hr = ThemeLoadControls(m_pTheme, hWnd, vrgInitControls, countof(vrgInitControls)); - BalExitOnFailure(hr, "Failed to load theme controls."); - - C_ASSERT(COUNT_WIXSTDBA_PAGE == countof(vrgwzPageNames)); - C_ASSERT(countof(m_rgdwPageIds) == countof(vrgwzPageNames)); - - ThemeGetPageIds(m_pTheme, vrgwzPageNames, m_rgdwPageIds, countof(m_rgdwPageIds)); - - // Initialize the text on all "application" (non-page) controls. - for (DWORD i = 0; i < m_pTheme->cControls; ++i) - { - THEME_CONTROL* pControl = m_pTheme->rgControls + i; - if (!pControl->wPageId && pControl->sczText && *pControl->sczText) - { - HRESULT hrFormat = BalFormatString(pControl->sczText, &sczText); - if (SUCCEEDED(hrFormat)) - { - ThemeSetTextControl(m_pTheme, pControl->wId, sczText); - } - } - } - - // Load the RTF EULA control with text if the control exists. - if (ThemeControlExists(m_pTheme, WIXSTDBA_CONTROL_EULA_RICHEDIT)) - { - hr = (m_sczLicenseFile && *m_sczLicenseFile) ? S_OK : E_INVALIDDATA; - if (SUCCEEDED(hr)) - { - hr = StrAllocString(&sczLicenseFormatted, m_sczLicenseFile, 0); - if (SUCCEEDED(hr)) - { - hr = LocLocalizeString(m_pWixLoc, &sczLicenseFormatted); - if (SUCCEEDED(hr)) - { - hr = BalFormatString(sczLicenseFormatted, &sczLicenseFormatted); - if (SUCCEEDED(hr)) - { - hr = PathRelativeToModule(&sczLicensePath, sczLicenseFormatted, m_hModule); - if (SUCCEEDED(hr)) - { - hr = PathGetDirectory(sczLicensePath, &sczLicenseDirectory); - if (SUCCEEDED(hr)) - { - hr = StrAllocString(&sczLicenseFilename, PathFile(sczLicenseFormatted), 0); - if (SUCCEEDED(hr)) - { - hr = LocProbeForFile(sczLicenseDirectory, sczLicenseFilename, m_sczLanguage, &sczLicensePath); - if (SUCCEEDED(hr)) - { - hr = ThemeLoadRichEditFromFile(m_pTheme, WIXSTDBA_CONTROL_EULA_RICHEDIT, sczLicensePath, m_hModule); - } - } - } - } - } - } - } - } - - if (FAILED(hr)) - { - BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Failed to load file into license richedit control from path '%ls' manifest value: %ls", sczLicensePath, m_sczLicenseFile); - hr = S_OK; - } - } - -LExit: - ReleaseStr(sczLicenseFilename); - ReleaseStr(sczLicenseDirectory); - ReleaseStr(sczLicensePath); - ReleaseStr(sczLicenseFormatted); - ReleaseStr(sczText); - - return SUCCEEDED(hr); - } - - - // - // OnShowHelp - display the help page. - // - void OnShowHelp() - { - SetState(WIXSTDBA_STATE_HELP, S_OK); - - // If the UI should be visible, display it now and hide the splash screen - if (BOOTSTRAPPER_DISPLAY_NONE < m_command.display) - { - ::ShowWindow(m_pTheme->hwndParent, SW_SHOW); - } - - m_pEngine->CloseSplashScreen(); - - return; - } - - - // - // OnDetect - start the processing of packages. - // - void OnDetect() - { - HRESULT hr = S_OK; - - if (m_pBAFunction) - { - hr = m_pBAFunction->OnDetect(); - BalExitOnFailure(hr, "Failed calling detect BA function."); - } - - SetState(WIXSTDBA_STATE_DETECTING, hr); - - // If the UI should be visible, display it now and hide the splash screen - if (BOOTSTRAPPER_DISPLAY_NONE < m_command.display) - { - ::ShowWindow(m_pTheme->hwndParent, SW_SHOW); - } - - m_pEngine->CloseSplashScreen(); - - // Tell the core we're ready for the packages to be processed now. - hr = m_pEngine->Detect(); - BalExitOnFailure(hr, "Failed to start detecting chain."); - -LExit: - if (FAILED(hr)) - { - SetState(WIXSTDBA_STATE_DETECTING, hr); - } - - return; - } - - - // - // OnPlan - plan the detected changes. - // - void OnPlan( - __in BOOTSTRAPPER_ACTION action - ) - { - HRESULT hr = S_OK; - - m_plannedAction = action; - - LOC_STRING* pLocString = NULL; - - if (m_plannedAction == BOOTSTRAPPER_ACTION_UNINSTALL) - { - m_fIsUninstall = TRUE; - LocGetString(m_pWixLoc, L"#(loc.ProgressHeaderUninstall)", &pLocString); - m_pEngine->SetVariableString(WIXSTDBA_VARIABLE_PROGRESS_HEADER, pLocString->wzText); - LocGetString(m_pWixLoc, L"#(loc.ProgressInfoUninstall)", &pLocString); - m_pEngine->SetVariableString(WIXSTDBA_VARIABLE_PROGRESS_INFO, pLocString->wzText); - } - - if (m_plannedAction == BOOTSTRAPPER_ACTION_REPAIR) - { - m_fIsRepair = TRUE; - LocGetString(m_pWixLoc, L"#(loc.ProgressHeaderRepair)", &pLocString); - m_pEngine->SetVariableString(WIXSTDBA_VARIABLE_PROGRESS_HEADER, pLocString->wzText); - LocGetString(m_pWixLoc, L"#(loc.ProgressInfoRepair)", &pLocString); - m_pEngine->SetVariableString(WIXSTDBA_VARIABLE_PROGRESS_INFO, pLocString->wzText); - } - - // If we are going to apply a downgrade, bail. - if (m_fDowngrading && BOOTSTRAPPER_ACTION_UNINSTALL < action) - { - if (m_fSuppressDowngradeFailure) - { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "A newer version of this product is installed but downgrade failure has been suppressed; continuing..."); - } - else - { - hr = HRESULT_FROM_WIN32(ERROR_PRODUCT_VERSION); - BalExitOnFailure(hr, "Cannot install a product when a newer version is installed."); - } - } - - SetState(WIXSTDBA_STATE_PLANNING, hr); - - if (m_pBAFunction) - { - m_pBAFunction->OnPlan(); - } - - hr = m_pEngine->Plan(action); - BalExitOnFailure(hr, "Failed to start planning packages."); - -LExit: - if (FAILED(hr)) - { - SetState(WIXSTDBA_STATE_PLANNING, hr); - } - - return; - } - - - // - // OnApply - apply the packages. - // - void OnApply() - { - HRESULT hr = S_OK; - - SetState(WIXSTDBA_STATE_APPLYING, hr); - SetProgressState(hr); - - if (m_fAttachedToConsole) - { - char *szPgLine; - if (m_fIsUninstall) { - szPgLine = "\nInstalling...\n"; - } else { - szPgLine = "\nUninstalling...\n"; - } - DWORD dSzWritten; - WriteConsole(m_fStdConsoleHandle, szPgLine, strlen(szPgLine), &dSzWritten, NULL); - } - SetTaskbarButtonProgress(0); - - hr = m_pEngine->Apply(m_hWnd); - BalExitOnFailure(hr, "Failed to start applying packages."); - - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_PROGRESS_CANCEL_BUTTON, TRUE); // ensure the cancel button is enabled before starting. - -LExit: - if (FAILED(hr)) - { - SetState(WIXSTDBA_STATE_APPLYING, hr); - } - - return; - } - - - // - // OnChangeState - change state. - // - void OnChangeState( - __in WIXSTDBA_STATE state - ) - { - WIXSTDBA_STATE stateOld = m_state; - DWORD dwOldPageId = 0; - DWORD dwNewPageId = 0; - LPWSTR sczText = NULL; - LPWSTR sczUnformattedText = NULL; - LPWSTR sczControlState = NULL; - LPWSTR sczControlName = NULL; - LOC_STRING* pLocString = NULL; - m_state = state; - - // If our install is at the end (success or failure) and we're not showing full UI or - // we successfully installed the prerequisite then exit (prompt for restart if required). - if ((WIXSTDBA_STATE_APPLIED <= m_state && BOOTSTRAPPER_DISPLAY_FULL > m_command.display) || - (WIXSTDBA_STATE_APPLIED == m_state && m_fPrereq)) - { - // If a restart was required but we were not automatically allowed to - // accept the reboot then do the prompt. - if (m_fRestartRequired && !m_fAllowRestart) - { - StrAllocFromError(&sczUnformattedText, HRESULT_FROM_WIN32(ERROR_SUCCESS_REBOOT_REQUIRED), NULL); - - 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); - m_fAllowRestart = (IDOK == nResult); - } - - // Quietly exit. - ::PostMessageW(m_hWnd, WM_CLOSE, 0, 0); - } - else // try to change the pages. - { - DeterminePageId(stateOld, &dwOldPageId); - DeterminePageId(m_state, &dwNewPageId); - - if (dwOldPageId != dwNewPageId) - { - // Enable disable controls per-page. - if (m_rgdwPageIds[WIXSTDBA_PAGE_INSTALL] == dwNewPageId) // on the "Install" page, ensure the install button is enabled/disabled correctly. - { - LONGLONG llElevated = 0; - if (m_Bundle.fPerMachine) - { - BalGetNumericVariable(WIXBUNDLE_VARIABLE_ELEVATED, &llElevated); - } - ThemeControlElevates(m_pTheme, WIXSTDBA_CONTROL_INSTALL_BUTTON, (m_Bundle.fPerMachine && !llElevated)); - - // If the EULA control exists, show it only if a license URL is provided as well. - if (ThemeControlExists(m_pTheme, WIXSTDBA_CONTROL_EULA_LINK)) - { - BOOL fEulaLink = (m_sczLicenseUrl && *m_sczLicenseUrl); - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_EULA_LINK, fEulaLink); - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_EULA_ACCEPT_CHECKBOX, fEulaLink); - } - - 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); - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_INSTALL_BUTTON, fAcceptedLicense); - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_NEXT_BUTTON, fAcceptedLicense); - - // If there is an "Options" page, the "Options" button exists, and it hasn't been suppressed, then enable the button. - BOOL fOptionsEnabled = m_rgdwPageIds[WIXSTDBA_PAGE_INSTALLDIR] && ThemeControlExists(m_pTheme, WIXSTDBA_CONTROL_OPTIONS_BUTTON) && !m_fSuppressOptionsUI; - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_OPTIONS_BUTTON, fOptionsEnabled); - - // Show/Hide the version label if it exists. - if (m_rgdwPageIds[WIXSTDBA_PAGE_INSTALLDIR] && ThemeControlExists(m_pTheme, WIXSTDBA_CONTROL_VERSION_LABEL) && !m_fShowVersion) - { - ThemeShowControl(m_pTheme, WIXSTDBA_CONTROL_VERSION_LABEL, SW_HIDE); - } - } - else if (m_rgdwPageIds[WIXSTDBA_PAGE_MODIFY] == dwNewPageId) - { - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_REPAIR_BUTTON, !m_fSuppressRepair); - } - else if (m_rgdwPageIds[WIXSTDBA_PAGE_INSTALLDIR] == dwNewPageId) - { - HRESULT hr = BalGetStringVariable(WIXSTDBA_VARIABLE_INSTALL_FOLDER, &sczUnformattedText); - if (SUCCEEDED(hr)) - { - BalFormatString(sczUnformattedText, &sczText); - ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_INSTALLFOLDER_EDITBOX, sczText); - } - } - else if (m_rgdwPageIds[WIXSTDBA_PAGE_SUCCESS] == dwNewPageId) // on the "Success" page, check if the restart or launch button should be enabled. - { - BOOL fShowRestartButton = FALSE; - BOOL fLaunchTargetExists = FALSE; - - if (m_fIsRepair) - { - LocGetString(m_pWixLoc, L"#(loc.SuccessHeaderRepair)", &pLocString); - m_pEngine->SetVariableString(WIXSTDBA_VARIABLE_SUCCESS_HEADER, pLocString->wzText); - LocGetString(m_pWixLoc, L"#(loc.SuccessInfoRepair)", &pLocString); - m_pEngine->SetVariableString(WIXSTDBA_VARIABLE_SUCCESS_INFO, pLocString->wzText); - } - else if (m_fIsUninstall) - { - LocGetString(m_pWixLoc, L"#(loc.SuccessHeaderUninstall)", &pLocString); - m_pEngine->SetVariableString(WIXSTDBA_VARIABLE_SUCCESS_HEADER, pLocString->wzText); - LocGetString(m_pWixLoc, L"#(loc.SuccessInfoUninstall)", &pLocString); - m_pEngine->SetVariableString(WIXSTDBA_VARIABLE_SUCCESS_INFO, pLocString->wzText); - } - else - { - m_fInstallSucceed = TRUE; - - // If we have left some kind of error message file from MSI the show that - if (BalStringVariableExists(L"MSICustomErrFile")) - { - LPWSTR sczUnFormatedErrFile = NULL; - LPWSTR sczErrFile = NULL; - LPWSTR sczSuccessErrMsg = NULL; - FILE_ENCODING feEncodingFound = FILE_ENCODING_UNSPECIFIED; - - BalGetStringVariable(L"MSICustomErrFile", &sczUnFormatedErrFile); - BalFormatString(sczUnFormatedErrFile, &sczErrFile); - - if (SUCCEEDED(FileToString(sczErrFile, &sczSuccessErrMsg, &feEncodingFound))) - { - LocGetString(m_pWixLoc, L"#(loc.SuccessErrorInfoText)", &pLocString); - m_pEngine->SetVariableString(WIXSTDBA_VARIABLE_SUCCESS_ERRINF, pLocString->wzText); - m_pEngine->SetVariableString(WIXSTDBA_VARIABLE_SUCCESS_ERRMSG, sczSuccessErrMsg); - FileEnsureDelete(sczErrFile); - } - } - } - - if (m_fRestartRequired) - { - if (BOOTSTRAPPER_RESTART_PROMPT == m_command.restart) - { - fShowRestartButton = TRUE; - } - } - else if (ThemeControlExists(m_pTheme, WIXSTDBA_CONTROL_LAUNCH_BUTTON)) - { - fLaunchTargetExists = BalStringVariableExists(WIXSTDBA_VARIABLE_LAUNCH_TARGET_PATH); - } - - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_LAUNCH_BUTTON, fLaunchTargetExists && BOOTSTRAPPER_ACTION_UNINSTALL < m_plannedAction); - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_SUCCESS_RESTART_TEXT, fShowRestartButton); - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_SUCCESS_RESTART_BUTTON, fShowRestartButton); - } - else if (m_rgdwPageIds[WIXSTDBA_PAGE_FAILURE] == dwNewPageId) // on the "Failure" page, show error message and check if the restart button should be enabled. - { - BOOL fShowLogLink = (m_Bundle.sczLogVariable && *m_Bundle.sczLogVariable); // if there is a log file variable then we'll assume the log file exists. - BOOL fShowErrorMessage = FALSE; - BOOL fShowRestartButton = FALSE; - - if (m_fIsRepair) - { - LocGetString(m_pWixLoc, L"#(loc.FailureHeaderRepair)", &pLocString); - m_pEngine->SetVariableString(WIXSTDBA_VARIABLE_FAILURE_HEADER, pLocString->wzText); - } - - if (m_fIsUninstall) - { - LocGetString(m_pWixLoc, L"#(loc.FailureHeaderUninstall)", &pLocString); - m_pEngine->SetVariableString(WIXSTDBA_VARIABLE_FAILURE_HEADER, pLocString->wzText); - } - if (FAILED(m_hrFinal)) - { - // If we know the failure message, use that. - if (m_sczFailedMessage && *m_sczFailedMessage) - { - StrAllocString(&sczUnformattedText, m_sczFailedMessage, 0); - } - else // try to get the error message from the error code. - { - StrAllocFromError(&sczUnformattedText, m_hrFinal, NULL); - if (!sczUnformattedText || !*sczUnformattedText) - { - StrAllocFromError(&sczUnformattedText, E_FAIL, NULL); - } - } - - StrAllocFormatted(&sczText, L"0x%08x - %ls", m_hrFinal, sczUnformattedText); - ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_FAILURE_MESSAGE_TEXT, sczText); - fShowErrorMessage = TRUE; - } - - if (m_fRestartRequired) - { - if (BOOTSTRAPPER_RESTART_PROMPT == m_command.restart) - { - fShowRestartButton = TRUE; - } - } - - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_FAILURE_LOGFILE_LINK, fShowLogLink); - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_FAILURE_MESSAGE_TEXT, fShowErrorMessage); - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_FAILURE_RESTART_TEXT, fShowRestartButton); - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_FAILURE_RESTART_BUTTON, fShowRestartButton); - } - - // Hide the upgrade link - if (ThemeControlExists(m_pTheme, WIXSTDBA_CONTROL_UPGRADE_LINK)) - { - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_UPGRADE_LINK, FALSE); - } - - // Process each control for special handling in the new page. - THEME_PAGE* pPage = ThemeGetPage(m_pTheme, dwNewPageId); - if (pPage) - { - for (DWORD i = 0; i < pPage->cControlIndices; ++i) - { - THEME_CONTROL* pControl = m_pTheme->rgControls + pPage->rgdwControlIndices[i]; - - // If we are on the install, options or modify pages and this is a named control, try to set its default state. - if ((m_rgdwPageIds[WIXSTDBA_PAGE_INSTALL] == dwNewPageId || - m_rgdwPageIds[WIXSTDBA_PAGE_INSTALLDIR] == dwNewPageId || - m_rgdwPageIds[WIXSTDBA_PAGE_SVC_OPTIONS] == dwNewPageId || - m_rgdwPageIds[WIXSTDBA_PAGE_MODIFY] == dwNewPageId) && - pControl->sczName && *pControl->sczName) - { - // If this is a checkbox control, try to set its default state to the state of a matching named Burn variable. - if (THEME_CONTROL_TYPE_CHECKBOX == pControl->type && WIXSTDBA_CONTROL_EULA_ACCEPT_CHECKBOX != pControl->wId) - { - LONGLONG llValue = 0; - HRESULT hr = BalGetNumericVariable(pControl->sczName, &llValue); - - ThemeSendControlMessage(m_pTheme, pControl->wId, BM_SETCHECK, SUCCEEDED(hr) && llValue ? BST_CHECKED : BST_UNCHECKED, 0); - } - - // If this is a button control with the BS_AUTORADIOBUTTON style, try to set its default - // state to the state of a matching named Burn variable. - if (THEME_CONTROL_TYPE_BUTTON == pControl->type && (BS_AUTORADIOBUTTON == (BS_AUTORADIOBUTTON & pControl->dwStyle))) - { - LONGLONG llValue = 0; - HRESULT hr = BalGetNumericVariable(pControl->sczName, &llValue); - - // If the control value isn't set then disable it. - if (!SUCCEEDED(hr)) - { - ThemeControlEnable(m_pTheme, pControl->wId, FALSE); - } - else - { - ThemeSendControlMessage(m_pTheme, pControl->wId, BM_SETCHECK, SUCCEEDED(hr) && llValue ? BST_CHECKED : BST_UNCHECKED, 0); - } - } - - // Hide or disable controls based on the control name with 'State' appended - HRESULT hr = StrAllocFormatted(&sczControlName, L"%lsState", pControl->sczName); - if (SUCCEEDED(hr)) - { - hr = BalGetStringVariable(sczControlName, &sczControlState); - if (SUCCEEDED(hr) && sczControlState && *sczControlState) - { - if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, sczControlState, -1, L"disable", -1)) - { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Disable control %ls", pControl->sczName); - ThemeControlEnable(m_pTheme, pControl->wId, FALSE); - } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, sczControlState, -1, L"hide", -1)) - { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Hide control %ls", pControl->sczName); - // TODO: This doesn't work - ThemeShowControl(m_pTheme, pControl->wId, SW_HIDE); - } - } - } - } - - // Format the text in each of the new page's controls (if they have any text). - if (pControl->sczText && *pControl->sczText) - { - HRESULT hr = BalFormatString(pControl->sczText, &sczText); - if (SUCCEEDED(hr)) - { - ThemeSetTextControl(m_pTheme, pControl->wId, sczText); - } - } - - } - } - - // See #Hidden - ThemeShowControl(m_pTheme, WIXSTDBA_CONTROL_LOGUSER_OR_MAIL_LABEL, false); - ThemeShowControl(m_pTheme, WIXSTDBA_CONTROL_LOGPASS_LABEL, false); - ThemeShowControl(m_pTheme, WIXSTDBA_CONTROL_LOGUSER_OR_MAIL_EDIT, false); - ThemeShowControl(m_pTheme, WIXSTDBA_CONTROL_LOGPASS_EDIT, false); - - // XXX why do we need this?? - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_LOGUSER_OR_MAIL_LABEL, true); - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_LOGPASS_LABEL, true); - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_LOGUSER_OR_MAIL_EDIT, true); - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_LOGPASS_EDIT, true); - - ThemeShowPage(m_pTheme, dwOldPageId, SW_HIDE); - ThemeShowPage(m_pTheme, dwNewPageId, SW_SHOW); - - - // Remember current page - m_dwCurrentPage = dwNewPageId; - - // On the install page set the focus to the install button or the next enabled control if install is disabled - if (m_rgdwPageIds[WIXSTDBA_PAGE_INSTALL] == dwNewPageId) - { - HWND hwndFocus = ::GetDlgItem(m_pTheme->hwndParent, WIXSTDBA_CONTROL_INSTALL_BUTTON); - if (hwndFocus && !ThemeControlEnabled(m_pTheme, WIXSTDBA_CONTROL_INSTALL_BUTTON)) - { - hwndFocus = ::GetNextDlgTabItem(m_pTheme->hwndParent, hwndFocus, FALSE); - } - - if (hwndFocus) - { - ::SetFocus(hwndFocus); - } - } - } - } - - ReleaseStr(sczText); - ReleaseStr(sczUnformattedText); - ReleaseStr(sczControlState); - ReleaseStr(sczControlName); - } - - - // - // OnClose - called when the window is trying to be closed. - // - BOOL OnClose() - { - BOOL fClose = FALSE; - - // If we've already succeeded or failed or showing the help page, just close (prompts are annoying if the bootstrapper is done). - // Also, allow people to simply close out at the signin stage - if (WIXSTDBA_STATE_APPLIED <= m_state || WIXSTDBA_STATE_HELP == m_state || WIXSTDBA_STATE_SVC_OPTIONS == m_state) - { - fClose = TRUE; - } - else // prompt the user or force the cancel if there is no UI. - { - 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); - } - - // If we're doing progress then we never close, we just cancel to let rollback occur. - if (WIXSTDBA_STATE_APPLYING <= m_state && WIXSTDBA_STATE_APPLIED > m_state) - { - // If we canceled disable cancel button since clicking it again is silly. - if (fClose) - { - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_PROGRESS_CANCEL_BUTTON, FALSE); - } - - fClose = FALSE; - } - - return fClose; - } - - - // - // OnClickAcceptCheckbox - allow the install to continue. - // - void OnClickAcceptCheckbox() - { - BOOL fAcceptedLicense = ThemeIsControlChecked(m_pTheme, WIXSTDBA_CONTROL_EULA_ACCEPT_CHECKBOX); - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_INSTALL_BUTTON, fAcceptedLicense); - ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_NEXT_BUTTON, fAcceptedLicense); - } - - - // - // OnClickOptionsButton - show the options page. - // - void OnClickOptionsButton() - { - SavePageSettings(WIXSTDBA_PAGE_INSTALL); - m_stateInstallPage = m_state; - SetState(WIXSTDBA_STATE_INSTALLDIR, S_OK); - } - - - BOOL CheckNonEmptyField(LPCWSTR wzEditVarID) - { - BOOL bRes = TRUE; - LPWSTR sczFieldValue = NULL; - - if (SUCCEEDED(BalGetStringVariable(wzEditVarID, &sczFieldValue))) - { - if (StrCmpCW(sczFieldValue, L"") == 0) - { - LOC_STRING* pLocString = NULL; - LPWSTR wzLoc = NULL; - LPWSTR sczMessageText = NULL; - - StrAllocFormatted(&wzLoc, L"#(loc.%s)", wzEditVarID); - LocGetString(m_pWixLoc, wzLoc, &pLocString); - StrAllocFormatted(&sczMessageText, L"The field \"%s\" cannot be blank! In order to continue with setup you should fill it.", pLocString->wzText); - - ::MessageBoxW(m_hWnd, sczMessageText, m_pTheme->sczCaption, MB_ICONEXCLAMATION | MB_OK); - bRes = FALSE; - } - } - return bRes; - } - - - - - BOOL CheckCurrentUserPassword(LPCWSTR wzPasswordVarID) - { - LPWSTR sczUserNameValue = NULL; - LPWSTR sczDomainValue = NULL; - LPWSTR sczPasswordValue = NULL; - - BOOL bRes = SUCCEEDED(BalGetStringVariable(L"ComputerName", &sczDomainValue)) && - SUCCEEDED(BalGetStringVariable(L"LogonUser", &sczUserNameValue)) && - SUCCEEDED(BalGetStringVariable(wzPasswordVarID, &sczPasswordValue)); - - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "CheckCurrentUserPassword. 1"); - - - if (bRes) - { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "CheckCurrentUserPassword. 2"); - HANDLE hToken; - if (!LogonUserW(sczUserNameValue, sczDomainValue, sczPasswordValue, LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_DEFAULT, &hToken)) - { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "CheckCurrentUserPassword. 3 - Failed"); - - LPWSTR sczMessageText = NULL; - StrAllocFormatted(&sczMessageText, L"Setup was unable to validate specified password for \"%s\\%s\"! Please double check it.", sczDomainValue, sczUserNameValue); - - ::MessageBoxW(m_hWnd, sczMessageText, m_pTheme->sczCaption, MB_ICONEXCLAMATION | MB_OK); - bRes = FALSE; - } - else - { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "CheckCurrentUserPassword. 4 - Succeed"); - } - } - return bRes; - } - - - - - - /* - - BOOL CheckPostgreSQLConnection(LPCWSTR VAR_HOST, LPCWSTR VAR_USER, LPCWSTR VAR_PASS, LPCWSTR DB_ToCheck, BOOL DB_ShouldExists) - { - BOOL bPSQLOk = CheckNonEmptyField(VAR_HOST) && CheckNonEmptyField(VAR_USER) && CheckNonEmptyField(VAR_PASS); - -// if (!bPSQLOk) return FALSE; - - LPWSTR sczPSQLPath = NULL; - LPWSTR sczPSQLDirectory = NULL; - - if (bPSQLOk && SUCCEEDED(PathRelativeToModule(&sczPSQLPath, L"qcPSQL.exe", m_hModule)) && SUCCEEDED(PathGetDirectory(sczPSQLPath, &sczPSQLDirectory))) - { - LPWSTR sczPSQLHost = NULL; - LPWSTR sczPSQLUser = NULL; - LPWSTR sczPSQLPass = NULL; - - if (SUCCEEDED(BalGetStringVariable(VAR_HOST, &sczPSQLHost)) && - SUCCEEDED(BalGetStringVariable(VAR_USER, &sczPSQLUser)) && - SUCCEEDED(BalGetStringVariable(VAR_PASS, &sczPSQLPass)) ) - { - DWORD exitcode = 0; - LPWSTR sczCmdParam = NULL; - if (DB_ToCheck == NULL) - StrAllocFormatted(&sczCmdParam, L"\"%s\" checkconnection -H%s -U%s -P%s", sczPSQLPath, sczPSQLHost, sczPSQLUser, sczPSQLPass); - else - StrAllocFormatted(&sczCmdParam, L"\"%s\" checkdbexists -H%s -U%s -P%s -CKDB%s", sczPSQLPath, sczPSQLHost, sczPSQLUser, sczPSQLPass, DB_ToCheck); - - _STARTUPINFOW si; - _PROCESS_INFORMATION pi; - - ZeroMemory( &si, sizeof(si) ); - si.cb = sizeof(si); - ZeroMemory( &pi, sizeof(pi) ); - - - // Start the child process. - if( CreateProcessW(NULL, // No module name (use command line) - sczCmdParam, // Command line - NULL, // Process handle not inheritable - NULL, // Thread handle not inheritable - FALSE, // Set handle inheritance to FALSE - CREATE_NO_WINDOW, // No creation flags - NULL, // Use parent's environment block - NULL, // Use parent's starting directory - &si, // Pointer to STARTUPINFO structure - &pi ) // Pointer to PROCESS_INFORMATION structure - ) - { - // Wait until child process exits. - WaitForSingleObject( pi.hProcess, INFINITE ); - - // get the process exit code - GetExitCodeProcess(pi.hProcess, (LPDWORD)&exitcode); - - // Close process and thread handles. - CloseHandle( pi.hProcess ); - CloseHandle( pi.hThread ); - } - - - - LPWSTR sczMessageText = NULL; - switch (exitcode) - { - case QCPSQL_ERROR_UNKNOWN: - sczMessageText = L"Setup was unable to connect to the specified database server. Unknown error.\nWould you like to continue anyway?"; - break; - case QCPSQL_ERROR_EXECSQL: - sczMessageText = L"Setup was unable to execute specified command.\nWould you like to continue anyway?"; - break; - case QCPSQL_ERROR_CONNECT: - sczMessageText = L"Setup was unable to connect to the specified database server.\nWould you like to continue anyway?"; - break; - case QCPSQL_ERROR_INVALIDARGS: - sczMessageText = L"Setup was unable to connect to the specified database server. Invalid arguments.\nWould you like to continue anyway?"; - break; - case QCPSQL_SUCCESS_DBNOTEXISTS: - if ((DB_ToCheck != NULL) && (DB_ShouldExists)) - StrAllocFormatted(&sczMessageText, L"The database \"%s\" does not exists on the host \"%s\".\nWould you like to continue anyway?", DB_ToCheck, sczPSQLHost); - break; - case QCPSQL_SUCCESS_DBEXISTS: - if ((DB_ToCheck != NULL) && (!DB_ShouldExists)) - StrAllocFormatted(&sczMessageText, L"The database \"%s\" already exists on the host \"%s\".\nWould you like to continue anyway?", DB_ToCheck, sczPSQLHost); - break; - default: - break; - } - - if (sczMessageText != NULL) - bPSQLOk = (IDYES == ::MessageBoxW(m_hWnd, sczMessageText, m_pTheme->sczCaption, MB_ICONEXCLAMATION | MB_YESNO)); - } - } - - return bPSQLOk; - } - */ - - BOOL CheckInstallPathIsValid(LPCWSTR wzInstallPath) - { - BOOL bPathIsValid = TRUE; - - if (StrCmpCW(wzInstallPath, L"") == 0) - { - bPathIsValid = FALSE; - ::MessageBoxW(m_hWnd, L"The install location cannot be blank. You must enter a full path with drive letter, like:\n\tC:\\Program Files\\App\n\nor a UNC path, like\n\t\\\\ServerName\\AppShare", m_pTheme->sczCaption, MB_ICONEXCLAMATION | MB_OK); - } else { - DWORD i = 0; - LPCWSTR wz = wzInstallPath; - BOOL bInvalidCharFound = FALSE; - while (*wz) - { - ++i; - if ((L'/' == *wz) || ((L':' == *wz) && (i != 2)) || (L'*' == *wz) || (L'?' == *wz) || - (L'"' == *wz) || (L'<' == *wz) || (L'>' == *wz) || (L'|' == *wz)) - bInvalidCharFound = TRUE; - ++wz; - } - - if (bInvalidCharFound) - { - bPathIsValid = FALSE; - ::MessageBoxW(m_hWnd, L"The install location cannot include any of the following characters:\n\n/ : * ? \" < > |", m_pTheme->sczCaption, MB_ICONEXCLAMATION | MB_OK); - } - } - return bPathIsValid; - } - - - BOOL CheckEmailAddressIsValid(LPCWSTR wzEmailVarID, LPCWSTR wzPassVarID = NULL, BOOL AllowBlank = TRUE) - { - BOOL bRes = TRUE; - LPWSTR sczEmailValue = NULL; - LPWSTR sczPassValue = NULL; - - if (SUCCEEDED(BalGetStringVariable(wzEmailVarID, &sczEmailValue))) - { - LOC_STRING* pLocString = NULL; - LPWSTR wzLoc = NULL; - LPWSTR sczMessageText = NULL; - - StrAllocFormatted(&wzLoc, L"#(loc.%s)", wzEmailVarID); - LocGetString(m_pWixLoc, wzLoc, &pLocString); - - BOOL bIsBlank = (StrCmpCW(sczEmailValue, L"") == 0); - - if (bIsBlank && AllowBlank) - return TRUE; - - if (bIsBlank) - { - bRes = FALSE; - StrAllocFormatted(&sczMessageText, L"The field \"%s\" cannot be blank! In order to continue with setup you should fill it.", pLocString->wzText); - } else { - DWORD i = 0; - DWORD iAt = 0; - DWORD iPt = 0; - - LPCWSTR wz = sczEmailValue; - while (*wz) - { - ++i; - if (L'@' == *wz) iAt = i; - if (L'.' == *wz) iPt = i; - ++wz; - } - bRes = (1 < iAt) && (iAt < iPt); - - if (!bRes) - StrAllocFormatted(&sczMessageText, L"The field \"%s\" dosen't seems to be a valid email address! Please double check that.", pLocString->wzText); - } - - if (!bRes) - ::MessageBoxW(m_hWnd, sczMessageText, m_pTheme->sczCaption, MB_ICONEXCLAMATION | MB_OK); - else { - if (wzPassVarID != NULL) - { - if (SUCCEEDED(BalGetStringVariable(wzPassVarID, &sczPassValue))) - if (StrCmpCW(sczEmailValue, L"") == 0) { - bRes = FALSE; - ::MessageBoxW(m_hWnd, L"You specified a valid email address but the account password is blank. The password is required!", m_pTheme->sczCaption, MB_ICONEXCLAMATION | MB_OK); - } - } - } - - } - - return bRes; - } - - - void OnClickNextButton() - { - BOOL bOkToContinue = TRUE; - LPWSTR sczPath = NULL; - - switch (m_state) - { - // this clause is dead code, since we cancelled the "choose an - // install directory" screen. but let's leave it in, in case we - // bring it back. - case WIXSTDBA_STATE_INSTALLDIR: - ThemeGetTextControl(m_pTheme, WIXSTDBA_CONTROL_INSTALLFOLDER_EDITBOX, &sczPath); - bOkToContinue = CheckInstallPathIsValid(sczPath); - - if (bOkToContinue) { - m_pEngine->SetVariableString(WIXSTDBA_VARIABLE_INSTALL_FOLDER, sczPath); - SavePageSettings(WIXSTDBA_PAGE_INSTALLDIR); - SetState(WIXSTDBA_STATE_SVC_OPTIONS, S_OK); - - // Display the elevation shield if perMachine installation - LONGLONG llElevated = 0; - if (SUCCEEDED(BalGetNumericVariable(WIXSTDBA_VARIABLE_PERMACHINE_INSTALL, &llElevated))) - ThemeControlElevates(m_pTheme, WIXSTDBA_CONTROL_INSTALL_BUTTON, (llElevated == 1)); - } - break; - - default: - SavePageSettings(WIXSTDBA_PAGE_INSTALL); - m_stateInstallPage = m_state; - SetState(WIXSTDBA_STATE_SVC_OPTIONS, S_OK); - break; - } - } - - - // - // OnClickInstallScope - allow user to choose between a perMachine and perUser install - // - void OnClickInstallScope() - { - LPWSTR sczPath = NULL; - LPWSTR sczFPath = NULL; - BOOL fPerMachineInst = ThemeIsControlChecked(m_pTheme, WIXSTDBA_CONTROL_PERMACHINE_RADIO); - - - if (fPerMachineInst) - { - if (SUCCEEDED(BalGetStringVariable(WIXSTDBA_VARIABLE_PERMACHINE_INSTALL_FOLDER, &sczPath)) - && SUCCEEDED(BalFormatString(sczPath, &sczFPath))) - ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_INSTALLFOLDER_EDITBOX, sczFPath); - } - else - { - if (SUCCEEDED(BalGetStringVariable(WIXSTDBA_VARIABLE_PERUSER_INSTALL_FOLDER, &sczPath)) - && SUCCEEDED(BalFormatString(sczPath, &sczFPath))) - ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_INSTALLFOLDER_EDITBOX, sczFPath); - } - } - - // - // OnClickInstallPostgressCheckbox - we will set defaults value and disable controls if checkbox was checked. - // - void OnClickSkipRegistrationCheckbox() - { - BOOL fSignIn = ThemeIsControlChecked(m_pTheme, WIXSTDBA_CONTROL_REGSIGNIN_RADIO); - - //if (fSkipReg) - //{ - // ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_DBHOST_EDIT, L"localhost"); - // ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_DBUSER_EDIT, L"postgres"); - // ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_DBPASS_EDIT, L"postgres"); - //} - - ThemeShowControl(m_pTheme, WIXSTDBA_CONTROL_REGMAIL_LABEL, !fSignIn); - ThemeShowControl(m_pTheme, WIXSTDBA_CONTROL_REGUSER_LABEL, !fSignIn); - ThemeShowControl(m_pTheme, WIXSTDBA_CONTROL_REGPASS_LABEL, !fSignIn); - ThemeShowControl(m_pTheme, WIXSTDBA_CONTROL_REGMAIL_EDIT, !fSignIn); - ThemeShowControl(m_pTheme, WIXSTDBA_CONTROL_REGUSER_EDIT, !fSignIn); - ThemeShowControl(m_pTheme, WIXSTDBA_CONTROL_REGPASS_EDIT, !fSignIn); - - ThemeShowControl(m_pTheme, WIXSTDBA_CONTROL_LOGUSER_OR_MAIL_LABEL, fSignIn); - ThemeShowControl(m_pTheme, WIXSTDBA_CONTROL_LOGPASS_LABEL, fSignIn); - ThemeShowControl(m_pTheme, WIXSTDBA_CONTROL_LOGUSER_OR_MAIL_EDIT, fSignIn); - ThemeShowControl(m_pTheme, WIXSTDBA_CONTROL_LOGPASS_EDIT, fSignIn); - } - - - - void OnSignIn() - { - BOOL fSignIn = ThemeIsControlChecked(m_pTheme, WIXSTDBA_CONTROL_REGSIGNIN_RADIO); - BOOL bOkToContinue = false; - - SavePageSettings(WIXSTDBA_PAGE_SVC_OPTIONS); - - if (fSignIn) - { - LPWSTR wzUserNameOrEmail = NULL; - LPWSTR wzUserPass = NULL; - if (SUCCEEDED(BalGetStringVariable(WIXSTDBA_VARIABLE_LOG_USERNAME_OR_MAIL, &wzUserNameOrEmail)) && - SUCCEEDED(BalGetStringVariable(WIXSTDBA_VARIABLE_LOG_PASS, &wzUserPass))) - { - bOkToContinue = REST_SignInOrRegister(true, wzUserNameOrEmail, NULL, NULL, wzUserPass); - } - } - else - { - LPWSTR wzUserName = NULL; - LPWSTR wzEmail = NULL; - LPWSTR wzUserPass = NULL; - if (SUCCEEDED(BalGetStringVariable(WIXSTDBA_VARIABLE_REG_MAIL, &wzEmail)) && - SUCCEEDED(BalGetStringVariable(WIXSTDBA_VARIABLE_REG_USER, &wzUserName)) && - SUCCEEDED(BalGetStringVariable(WIXSTDBA_VARIABLE_REG_PASS, &wzUserPass))) - { - bOkToContinue = REST_SignInOrRegister(false, NULL, wzUserName, wzEmail, wzUserPass); - } - } - - if (bOkToContinue) - this->SetState(WIXSTDBA_STATE_APPLIED, S_OK); - } - - - void OnClickBackButton() - { - BOOL bOkToContinue = TRUE; - LPWSTR sczPath = NULL; - - switch (m_state) - { - case WIXSTDBA_STATE_INSTALLDIR: - ThemeGetTextControl(m_pTheme, WIXSTDBA_CONTROL_INSTALLFOLDER_EDITBOX, &sczPath); - bOkToContinue = CheckInstallPathIsValid(sczPath); - - if (bOkToContinue) { - m_pEngine->SetVariableString(WIXSTDBA_VARIABLE_INSTALL_FOLDER, sczPath); - SavePageSettings(WIXSTDBA_PAGE_INSTALLDIR); - SetState(m_stateInstallPage, S_OK); - } - - break; - - case WIXSTDBA_STATE_SVC_OPTIONS: - SavePageSettings(WIXSTDBA_PAGE_SVC_OPTIONS); - SetState(WIXSTDBA_STATE_DETECTED, S_OK); - break; - } - - } - - - // - // OnClickOptionsBrowseButton - browse for install folder on the options page. - // - void OnClickOptionsBrowseButton(DWORD dwControl) - { - WCHAR wzPath[MAX_PATH] = { }; - BROWSEINFOW browseInfo = { }; - PIDLIST_ABSOLUTE pidl = NULL; - PIDLIST_ABSOLUTE pidlRoot = NULL; - - ::SHGetFolderLocation(m_hWnd, CSIDL_DRIVES, NULL, 0, &pidlRoot); - - browseInfo.hwndOwner = m_hWnd; - browseInfo.pszDisplayName = wzPath; - browseInfo.lpszTitle = m_pTheme->sczCaption; - browseInfo.ulFlags = BIF_RETURNONLYFSDIRS | BIF_USENEWUI; - browseInfo.pidlRoot = pidlRoot; - pidl = ::SHBrowseForFolderW(&browseInfo); - if (pidl && ::SHGetPathFromIDListW(pidl, wzPath)) - { - switch (dwControl) - { - case WIXSTDBA_CONTROL_BROWSE_BUTTON: - ThemeSetTextControl(m_pTheme, WIXSTDBA_CONTROL_INSTALLFOLDER_EDITBOX, wzPath); - break; - } - } - - if (pidl) - { - ::CoTaskMemFree(pidl); - } - - return; - } - - // - // OnClickOptionsOkButton - accept the changes made by the options page. - // - void OnClickOptionsOkButton() - { - HRESULT hr = S_OK; - LPWSTR sczPath = NULL; - - if (ThemeControlExists(m_pTheme, WIXSTDBA_CONTROL_INSTALLFOLDER_EDITBOX)) - { - hr = ThemeGetTextControl(m_pTheme, WIXSTDBA_CONTROL_INSTALLFOLDER_EDITBOX, &sczPath); - ExitOnFailure(hr, "Failed to get text from folder edit box."); - - // TODO: verify the path is valid. - - hr = m_pEngine->SetVariableString(WIXSTDBA_VARIABLE_INSTALL_FOLDER, sczPath); - ExitOnFailure(hr, "Failed to set the install folder."); - } - - - SavePageSettings(WIXSTDBA_PAGE_INSTALLDIR); - -LExit: - SetState(m_stateInstallPage, S_OK); - return; - } - - - // - // OnClickOptionsCancelButton - discard the changes made by the options page. - // - void OnClickOptionsCancelButton() - { - SetState(m_stateInstallPage, S_OK); - } - - - // - // OnClickRepairButton - start the repair. - // - void OnClickRepairButton() - { - this->OnPlan(BOOTSTRAPPER_ACTION_REPAIR); - } - - - // - // OnClickUninstallButton - start the uninstall. - // - void OnClickUninstallButton() - { - this->OnPlan(BOOTSTRAPPER_ACTION_UNINSTALL); - } - - - - void TryLaunchAfterInstall(LPWSTR wzVarTargetPath) - { - BOOL fLaunchAfterInstallTargetExists = BalStringVariableExists(wzVarTargetPath); - - HRESULT hr = S_OK; - LPWSTR sczUnformattedLaunchTarget = NULL; - LPWSTR sczLaunchTarget = NULL; - LPWSTR sczUnformattedArguments = NULL; - LPWSTR sczArguments = NULL; - LPWSTR sczRunOnceValue = NULL; - - int nCmdShow = SW_SHOWNORMAL; - - if (fLaunchAfterInstallTargetExists) - { - hr = BalGetStringVariable(wzVarTargetPath, &sczUnformattedLaunchTarget); - hr = BalFormatString(sczUnformattedLaunchTarget, &sczLaunchTarget); - } - - if (m_fInstallSucceed && fLaunchAfterInstallTargetExists) - { - - if (!m_fRestartRequired) - { - DWORD dwAttr; - if (FileExistsEx(sczLaunchTarget, &dwAttr)) - ShelExec(sczLaunchTarget, sczArguments, L"open", NULL, nCmdShow, m_hWnd, NULL); - } - } - - ReleaseStr(sczUnformattedLaunchTarget); - ReleaseStr(sczLaunchTarget); - ReleaseStr(sczUnformattedArguments); - ReleaseStr(sczArguments); - ReleaseStr(sczRunOnceValue); - - return; - } - - // - // OnClickCloseButton - close the application. - // - void OnClickCloseButton() - { - TryLaunchAfterInstall(L"Launch_IISStartServerPath"); - TryLaunchAfterInstall(L"Launch_EverywarePOSPath"); - ::SendMessageW(m_hWnd, WM_CLOSE, 0, 0); - return; - } - - - // - // OnClickEulaLink - show the end user license agreement. - // - void OnClickEulaLink() - { - HRESULT hr = S_OK; - LPWSTR sczLicenseUrl = NULL; - LPWSTR sczLicensePath = NULL; - LPWSTR sczLicenseDirectory = NULL; - URI_PROTOCOL protocol = URI_PROTOCOL_UNKNOWN; - - hr = StrAllocString(&sczLicenseUrl, m_sczLicenseUrl, 0); - BalExitOnFailure1(hr, "Failed to copy license URL: %ls", m_sczLicenseUrl); - - hr = LocLocalizeString(m_pWixLoc, &sczLicenseUrl); - BalExitOnFailure1(hr, "Failed to localize license URL: %ls", m_sczLicenseUrl); - - hr = BalFormatString(sczLicenseUrl, &sczLicenseUrl); - BalExitOnFailure1(hr, "Failed to get formatted license URL: %ls", m_sczLicenseUrl); - - hr = UriProtocol(sczLicenseUrl, &protocol); - if (FAILED(hr) || URI_PROTOCOL_UNKNOWN == protocol) - { - // Probe for localised license file - hr = PathRelativeToModule(&sczLicensePath, sczLicenseUrl, m_hModule); - if (SUCCEEDED(hr)) - { - hr = PathGetDirectory(sczLicensePath, &sczLicenseDirectory); - if (SUCCEEDED(hr)) - { - hr = LocProbeForFile(sczLicenseDirectory, PathFile(sczLicenseUrl), m_sczLanguage, &sczLicensePath); - } - } - } - - hr = ShelExec(sczLicensePath ? sczLicensePath : sczLicenseUrl, NULL, L"open", NULL, SW_SHOWDEFAULT, m_hWnd, NULL); - BalExitOnFailure(hr, "Failed to launch URL to EULA."); - -LExit: - ReleaseStr(sczLicensePath); - ReleaseStr(sczLicenseUrl); - ReleaseStr(sczLicenseDirectory); - - return; - } - - - // - // OnClickUpgradeLink - download the upgrade. - // - void OnClickUpgradeLink() - { - this->OnPlan(BOOTSTRAPPER_ACTION_UPDATE_REPLACE); - - m_fUpdating = TRUE; - - return; - } - - - // - // OnClickLaunchButton - launch the app from the success page. - // - void OnClickLaunchButton() - { - HRESULT hr = S_OK; - LPWSTR sczUnformattedLaunchTarget = NULL; - LPWSTR sczLaunchTarget = NULL; - LPWSTR sczUnformattedArguments = NULL; - LPWSTR sczArguments = NULL; - int nCmdShow = SW_SHOWNORMAL; - - hr = BalGetStringVariable(WIXSTDBA_VARIABLE_LAUNCH_TARGET_PATH, &sczUnformattedLaunchTarget); - BalExitOnFailure1(hr, "Failed to get launch target variable '%ls'.", WIXSTDBA_VARIABLE_LAUNCH_TARGET_PATH); - - hr = BalFormatString(sczUnformattedLaunchTarget, &sczLaunchTarget); - BalExitOnFailure1(hr, "Failed to format launch target variable: %ls", sczUnformattedLaunchTarget); - - if (BalStringVariableExists(WIXSTDBA_VARIABLE_LAUNCH_ARGUMENTS)) - { - hr = BalGetStringVariable(WIXSTDBA_VARIABLE_LAUNCH_ARGUMENTS, &sczUnformattedArguments); - BalExitOnFailure1(hr, "Failed to get launch arguments '%ls'.", WIXSTDBA_VARIABLE_LAUNCH_ARGUMENTS); - - hr = BalFormatString(sczUnformattedArguments, &sczArguments); - BalExitOnFailure1(hr, "Failed to format launch arguments variable: %ls", sczUnformattedArguments); - } - - if (BalStringVariableExists(WIXSTDBA_VARIABLE_LAUNCH_HIDDEN)) - { - nCmdShow = SW_HIDE; - } - - hr = ShelExec(sczLaunchTarget, sczArguments, L"open", NULL, nCmdShow, m_hWnd, NULL); - BalExitOnFailure1(hr, "Failed to launch target: %ls", sczLaunchTarget); - - ::PostMessageW(m_hWnd, WM_CLOSE, 0, 0); - -LExit: - ReleaseStr(sczLaunchTarget); - ReleaseStr(sczUnformattedLaunchTarget); - ReleaseStr(sczArguments); - ReleaseStr(sczUnformattedArguments); - - return; - } - - - // - // OnClickRestartButton - allows the restart and closes the app. - // - void OnClickRestartButton() - { - AssertSz(m_fRestartRequired, "Restart must be requested to be able to click on the restart button."); - - m_fAllowRestart = TRUE; - ::SendMessageW(m_hWnd, WM_CLOSE, 0, 0); - - return; - } - - - // - // OnClickLogFileLink - show the log file. - // - void OnClickLogFileLink() - { - HRESULT hr = S_OK; - LPWSTR sczLogFile = NULL; - - hr = BalGetStringVariable(m_Bundle.sczLogVariable, &sczLogFile); - BalExitOnFailure1(hr, "Failed to get log file variable '%ls'.", m_Bundle.sczLogVariable); - - hr = ShelExec(L"notepad.exe", sczLogFile, L"open", NULL, SW_SHOWDEFAULT, m_hWnd, NULL); - BalExitOnFailure1(hr, "Failed to open log file target: %ls", sczLogFile); - -LExit: - ReleaseStr(sczLogFile); - - return; - } - - - // - // SetState - // - void SetState( - __in WIXSTDBA_STATE state, - __in HRESULT hrStatus - ) - { - if (FAILED(hrStatus)) - { - m_hrFinal = hrStatus; - } - - if (FAILED(m_hrFinal)) - { - state = WIXSTDBA_STATE_FAILED; - } - - if (WIXSTDBA_STATE_INSTALLDIR == state || m_state < state) - { - ::PostMessageW(m_hWnd, WM_WIXSTDBA_CHANGE_STATE, 0, state); - } - - if (WIXSTDBA_STATE_INSTALLDIR == state || m_state < state) - { - ::PostMessageW(m_hWnd, WM_WIXSTDBA_CHANGE_STATE, 0, state); - } - - if (WIXSTDBA_STATE_SVC_OPTIONS == state || m_state < state) - { - ::PostMessageW(m_hWnd, WM_WIXSTDBA_CHANGE_STATE, 0, state); - } - } - - - void DeterminePageId( - __in WIXSTDBA_STATE state, - __out DWORD* pdwPageId - ) - { - if (BOOTSTRAPPER_DISPLAY_PASSIVE == m_command.display) - { - switch (state) - { - case WIXSTDBA_STATE_INITIALIZED: - *pdwPageId = BOOTSTRAPPER_ACTION_HELP == m_command.action ? m_rgdwPageIds[WIXSTDBA_PAGE_HELP] : m_rgdwPageIds[WIXSTDBA_PAGE_LOADING]; - break; - - case WIXSTDBA_STATE_HELP: - *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_HELP]; - break; - - case WIXSTDBA_STATE_DETECTING: - *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]; - break; - - case WIXSTDBA_STATE_DETECTED: __fallthrough; - case WIXSTDBA_STATE_PLANNING: __fallthrough; - case WIXSTDBA_STATE_PLANNED: __fallthrough; - case WIXSTDBA_STATE_APPLYING: __fallthrough; - case WIXSTDBA_STATE_CACHING: __fallthrough; - case WIXSTDBA_STATE_CACHED: __fallthrough; - case WIXSTDBA_STATE_EXECUTING: __fallthrough; - case WIXSTDBA_STATE_EXECUTED: - *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS_PASSIVE] ? m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS_PASSIVE] : m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS]; - break; - - default: - *pdwPageId = 0; - break; - } - } - else if (BOOTSTRAPPER_DISPLAY_FULL == m_command.display) - { - switch (state) - { - case WIXSTDBA_STATE_INITIALIZING: - *pdwPageId = 0; - break; - - case WIXSTDBA_STATE_INITIALIZED: - *pdwPageId = BOOTSTRAPPER_ACTION_HELP == m_command.action ? m_rgdwPageIds[WIXSTDBA_PAGE_HELP] : m_rgdwPageIds[WIXSTDBA_PAGE_LOADING]; - break; - - case WIXSTDBA_STATE_HELP: - *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_HELP]; - break; - - case WIXSTDBA_STATE_DETECTING: - *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_LOADING]; - break; - - case WIXSTDBA_STATE_DETECTED: - switch (m_command.action) - { - case BOOTSTRAPPER_ACTION_INSTALL: - *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_INSTALL]; - break; - - case BOOTSTRAPPER_ACTION_MODIFY: __fallthrough; - case BOOTSTRAPPER_ACTION_REPAIR: __fallthrough; - case BOOTSTRAPPER_ACTION_UNINSTALL: - *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_MODIFY]; - break; - } - break; - - case WIXSTDBA_STATE_INSTALLDIR: - *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_INSTALLDIR]; - break; - - case WIXSTDBA_STATE_SVC_OPTIONS: - *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_SVC_OPTIONS]; - break; - - case WIXSTDBA_STATE_PLANNING: __fallthrough; - case WIXSTDBA_STATE_PLANNED: __fallthrough; - case WIXSTDBA_STATE_APPLYING: __fallthrough; - case WIXSTDBA_STATE_CACHING: __fallthrough; - case WIXSTDBA_STATE_CACHED: __fallthrough; - case WIXSTDBA_STATE_EXECUTING: __fallthrough; - case WIXSTDBA_STATE_EXECUTED: - *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS]; - break; - - case WIXSTDBA_STATE_APPLIED: - *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_SUCCESS]; - CopyBundleLogToSpecifiedPath(); - break; - - case WIXSTDBA_STATE_FAILED: - *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_FAILURE]; - CopyBundleLogToSpecifiedPath(); - break; - } - } - } - - - HRESULT EvaluateConditions() - { - HRESULT hr = S_OK; - BOOL fResult = FALSE; - - for (DWORD i = 0; i < m_Conditions.cConditions; ++i) - { - BAL_CONDITION* pCondition = m_Conditions.rgConditions + i; - - hr = BalConditionEvaluate(pCondition, m_pEngine, &fResult, &m_sczFailedMessage); - BalExitOnFailure(hr, "Failed to evaluate condition."); - - if (!fResult) - { - hr = E_WIXSTDBA_CONDITION_FAILED; - BalExitOnFailure1(hr, "Bundle condition evaluated to false: %ls", pCondition->sczCondition); - } - } - - ReleaseNullStr(m_sczFailedMessage); - -LExit: - return hr; - } - - - - void CopyBundleLogToSpecifiedPath() - { - /// On package install complete, if WIXSTDBA_VARIABLE_LOGSPATH is defined - /// then will move bundle installation log to the specified path. - if (!m_fOverallInstallationStarted) - return; - - if (BalStringVariableExists(WIXSTDBA_VARIABLE_LOGSPATH)) - { - LPWSTR wzBundleLog = NULL; - LPWSTR wzInstallLogPath = NULL; - LPWSTR wzDstBundleLog = NULL; - - if ( SUCCEEDED(BalGetStringVariable(WIXSTDBA_VARIABLE_LOGSPATH, &wzInstallLogPath)) && - SUCCEEDED(BalGetStringVariable(L"WixBundleLog", &wzBundleLog))) - { - StrAllocFormatted(&wzDstBundleLog, L"%s\\%s", wzInstallLogPath, PathFile(wzBundleLog)); - DirEnsureExists(wzInstallLogPath, NULL); - FileEnsureCopy(wzBundleLog, wzDstBundleLog, TRUE); - } else - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Setup was unable to copy bundle log to the specified installation log path."); - } - - return; - } - - - - void SetTaskbarButtonProgress( - __in DWORD dwOverallPercentage - ) - { - HRESULT hr = S_OK; - if (m_fAttachedToConsole) - { - CONSOLE_SCREEN_BUFFER_INFO csbiInfo; - if (GetConsoleScreenBufferInfo(m_fStdConsoleHandle, &csbiInfo)) - { - csbiInfo.dwCursorPosition.X = 0; - SetConsoleCursorPosition(m_fStdConsoleHandle, csbiInfo.dwCursorPosition); - } - - int lnWidth = 79; - int barWidth = 60; - int pos = int(barWidth * dwOverallPercentage/100); - char szPgLine[200] = "["; - - for (int i = 0; i < barWidth; ++i) - { - if (i < pos) - { - sprintf_s(szPgLine, lnWidth, "%s%s", szPgLine, "="); - } - else if (i == pos) - { - sprintf_s(szPgLine, lnWidth, "%s%s", szPgLine, ">"); - } - else - { - sprintf_s(szPgLine, lnWidth, "%s%s", szPgLine, " "); - } - } - sprintf_s(szPgLine, lnWidth, "%s] %u%%", szPgLine, dwOverallPercentage); - - DWORD dSzWritten; - WriteConsole(m_fStdConsoleHandle, szPgLine, strlen(szPgLine), &dSzWritten, NULL); - // m_fStdConsoleHandle = NULL; - } - - - if (m_fTaskbarButtonOK) - { -// hr = m_pTaskbarList->SetProgressValue(m_hWnd, dwOverallPercentage, 100UL); - BalExitOnFailure1(hr, "Failed to set taskbar button progress to: %d%%.", dwOverallPercentage); - } - -LExit: - return; - } - - - void SetTaskbarButtonState( - __in TBPFLAG tbpFlags - ) - { - HRESULT hr = S_OK; - - if (m_fTaskbarButtonOK) - { - hr = m_pTaskbarList->SetProgressState(m_hWnd, tbpFlags); - BalExitOnFailure1(hr, "Failed to set taskbar button state.", tbpFlags); - } - -LExit: - return; - } - - - void SetProgressState( - __in HRESULT hrStatus - ) - { - TBPFLAG flag = TBPF_NORMAL; - - if (IsCanceled() || HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT) == hrStatus) - { - flag = TBPF_PAUSED; - } - else if (IsRollingBack() || FAILED(hrStatus)) - { - flag = TBPF_ERROR; - } - - SetTaskbarButtonState(flag); - } - - - void SavePageSettings( - __in WIXSTDBA_PAGE page - ) - { - THEME_PAGE* pPage = NULL; - - pPage = ThemeGetPage(m_pTheme, m_rgdwPageIds[page]); - if (pPage) - { - for (DWORD i = 0; i < pPage->cControlIndices; ++i) - { - // Loop through all the checkbox controls (or buttons with BS_AUTORADIOBUTTON) with names and set a Burn variable with that name to true or false. - THEME_CONTROL* pControl = m_pTheme->rgControls + pPage->rgdwControlIndices[i]; - if ((THEME_CONTROL_TYPE_CHECKBOX == pControl->type) || - (THEME_CONTROL_TYPE_BUTTON == pControl->type && (BS_AUTORADIOBUTTON == (BS_AUTORADIOBUTTON & pControl->dwStyle)) && - pControl->sczName && *pControl->sczName)) - { - BOOL bChecked = ThemeIsControlChecked(m_pTheme, pControl->wId); - m_pEngine->SetVariableNumeric(pControl->sczName, bChecked ? 1 : 0); - } - - // Loop through all the editbox controls with names and set a Burn variable with that name to the contents. - if (THEME_CONTROL_TYPE_EDITBOX == pControl->type && pControl->sczName && *pControl->sczName && - (WIXSTDBA_CONTROL_INSTALLFOLDER_EDITBOX != pControl->wId)) - { - LPWSTR sczValue = NULL; - ThemeGetTextControl(m_pTheme, pControl->wId, &sczValue); - m_pEngine->SetVariableString(pControl->sczName, sczValue); - } - } - } - } - - - - HRESULT LoadBootstrapperBAFunctions() - { - HRESULT hr = S_OK; - LPWSTR sczBafPath = NULL; - - hr = PathRelativeToModule(&sczBafPath, L"bafunctions.dll", m_hModule); - BalExitOnFailure(hr, "Failed to get path to BA function DLL."); - -#ifdef DEBUG - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXEXTBA: LoadBootstrapperBAFunctions() - BA function DLL '%ls'", sczBafPath); -#endif - - m_hBAFModule = ::LoadLibraryW(sczBafPath); - if (m_hBAFModule) - { - PFN_BOOTSTRAPPER_BA_FUNCTION_CREATE pfnBAFunctionCreate = reinterpret_cast(::GetProcAddress(m_hBAFModule, "CreateBootstrapperBAFunction")); - BalExitOnNullWithLastError1(pfnBAFunctionCreate, hr, "Failed to get CreateBootstrapperBAFunction entry-point from: %ls", sczBafPath); - - hr = pfnBAFunctionCreate(m_pEngine, m_hBAFModule, &m_pBAFunction); - BalExitOnFailure(hr, "Failed to create BA function."); - } -#ifdef DEBUG - else - { - BalLogError(HRESULT_FROM_WIN32(::GetLastError()), "WIXEXTBA: LoadBootstrapperBAFunctions() - Failed to load DLL %ls", sczBafPath); - } -#endif - -LExit: - if (m_hBAFModule && !m_pBAFunction) - { - ::FreeLibrary(m_hBAFModule); - m_hBAFModule = NULL; - } - ReleaseStr(sczBafPath); - - return hr; - } - -typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO); - -bool getWindowsUserAgent(std::string &str){ - OSVERSIONINFOEX osvi; - SYSTEM_INFO si; - BOOL bOsVersionInfoEx; - ZeroMemory(&si, sizeof(SYSTEM_INFO)); - ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - bOsVersionInfoEx = GetVersionEx((OSVERSIONINFO*) &osvi); if(bOsVersionInfoEx == 0) - return false; - PGNSI pGNSI = (PGNSI) GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetNativeSystemInfo"); - if(NULL != pGNSI) - pGNSI(&si); - else GetSystemInfo(&si); - std::stringstream os; - os << "Installer/wix os/win32 (Windows_NT; "; - os << osvi.dwMajorVersion << "." << osvi.dwMinorVersion << "." << osvi.dwBuildNumber; - os << "; ia32;)"; - str = os.str(); - return true; -} - - - #pragma comment( lib,"Wininet.lib") - - -#define BUF_LEN 1024 - -BOOL POSTRequest( - __in LPCSTR szHost, - __in LPCSTR szApiPath, - __in LPSTR szFormData, - __out LPSTR *ppszResponseMessage) -{ - BOOL bRes = false; - StrAnsiAlloc(ppszResponseMessage, BUF_LEN); - - std::string header = "Content-Type: application/x-www-form-urlencoded"; - - std::string userAgent; - if (getWindowsUserAgent(userAgent)) { - header += std::string("\nUser-Agent: "); - header += userAgent; - } - - LPCSTR method = "POST"; - LPCSTR agent = "Mozilla/4.0 (compatible; MSIE 1.0)"; - - HINTERNET internet = InternetOpenA(agent, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0); - if(internet != NULL) - { - HINTERNET connect = InternetConnectA(internet, szHost, INTERNET_DEFAULT_HTTPS_PORT, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0); - if(connect != NULL) - { - HINTERNET request = HttpOpenRequestA(connect, method, szApiPath, "HTTP/1.1", NULL, NULL, - INTERNET_FLAG_HYPERLINK | - INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP | - INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS | - INTERNET_FLAG_NO_AUTH | - INTERNET_FLAG_NO_CACHE_WRITE | - INTERNET_FLAG_NO_UI | - INTERNET_FLAG_PRAGMA_NOCACHE | - INTERNET_FLAG_RELOAD | - INTERNET_FLAG_SECURE, NULL); - - if(request != NULL) - { - int datalen = 0; - if(szFormData != NULL) datalen = strlen(szFormData); - int headerlen = 0; - headerlen = (int)header.length(); - - if(HttpSendRequestA(request, header.c_str(), headerlen, szFormData, datalen)) - { - // We have succesfully sent the POST request - bRes = true; - - // Now we should read the response - DWORD bytesRead; - char holdBuff[4096]; - char* temp = holdBuff; - while (InternetReadFile(request, temp, 1024, &bytesRead) == TRUE && bytesRead > 0) - { - temp += bytesRead; - } - *temp = '\0'; // manually append NULL terminator - - StringCchPrintfA(*ppszResponseMessage, BUF_LEN, holdBuff); - } - else - StringCchPrintfA(*ppszResponseMessage, BUF_LEN, "Failed to send http request. Error code: %d", ::GetLastError()); - - InternetCloseHandle(request); - } - else - StringCchPrintfA(*ppszResponseMessage, BUF_LEN, "Failed to open http request."); - } - else - StringCchPrintfA(*ppszResponseMessage, BUF_LEN, "Connectiong to %s failed.", szHost); - - InternetCloseHandle(connect); - } - else - StringCchPrintfA(*ppszResponseMessage, BUF_LEN, "Initialize internet resources failed."); - InternetCloseHandle(internet); - - return bRes; -} - - -BOOL REST_SignInOrRegister( - __in BOOL fSignIn, - __in LPCWSTR wzSignInUserNameOrEmail, - __in LPCWSTR wzRegisterUsername, - __in LPCWSTR wzRegisterEmail, - __in LPCWSTR wzPassword/*, - __out LPWSTR *ppwzErrorMessage*/ - ) -{ - BOOL bRes = false; - wchar_t wzFormData[BUF_LEN] = L""; - - DWORD escapedLength; - - escapedLength = BUF_LEN; - wchar_t wzPasswordEscaped[BUF_LEN]; - UrlEscapeW(wzPassword, wzPasswordEscaped, &escapedLength, NULL); - - if (fSignIn) { - // sign in - wchar_t *wzUsernameOrEmailKey; - if (wcschr(wzSignInUserNameOrEmail, L'@')) { - wzUsernameOrEmailKey = L"meteorAccountsLoginInfo[email]"; - } else { - wzUsernameOrEmailKey = L"meteorAccountsLoginInfo[username]"; - } - - escapedLength = BUF_LEN; - wchar_t wzSignInUserNameOrEmailEscaped[BUF_LEN]; - UrlEscapeW(wzSignInUserNameOrEmail, wzSignInUserNameOrEmailEscaped, &escapedLength, NULL); - - StringCchPrintfW(wzFormData, BUF_LEN, L"%s=%s&meteorAccountsLoginInfo[password]=%s", wzUsernameOrEmailKey, wzSignInUserNameOrEmailEscaped, wzPasswordEscaped); - } else { - escapedLength = BUF_LEN; - wchar_t wzRegisterUsernameEscaped[BUF_LEN]; - UrlEscapeW(wzRegisterUsername, wzRegisterUsernameEscaped, &escapedLength, NULL); - - escapedLength = BUF_LEN; - wchar_t wzRegisterEmailEscaped[BUF_LEN]; - UrlEscapeW(wzRegisterEmail, wzRegisterEmailEscaped, &escapedLength, NULL); - - // register - StringCchPrintfW(wzFormData, BUF_LEN, L"username=%s&email=%s&password=%s", wzRegisterUsernameEscaped, wzRegisterEmailEscaped, wzPasswordEscaped); - } - - // agentInfo part of the query - wchar_t aiHostW[BUF_LEN] = L""; - DWORD aiHostSize = BUF_LEN; - GetComputerNameW(aiHostW, &aiHostSize); - - wchar_t wzAgentInfo[BUF_LEN] = L""; - StringCchPrintfW(wzAgentInfo, BUF_LEN, L"agentInfo[host]=%s&agentInfo[agent]=%s&agentInfo[agentVersion]=%s&agentInfo[arch]=%s", - aiHostW, L"Windows Installer", L"0.0", L"os.windows.x64_32"); - StringCchCatW(wzFormData, BUF_LEN, L"&"); - StringCchCatW(wzFormData, BUF_LEN, wzAgentInfo); - - size_t i; - char *pMBFormData = (char *)malloc( BUF_LEN ); - wcstombs_s(&i, pMBFormData, (size_t)BUF_LEN, wzFormData, (size_t)BUF_LEN ); - - char *pMBDataResponse = NULL; - wchar_t wzErrorMessage[BUF_LEN] = L""; - - char *path = fSignIn ? "/api/v1/private/login" - : "/api/v1/private/register"; - - if (POSTRequest("www.meteor.com", path, pMBFormData, &pMBDataResponse)) - { - JSONValue *JSONResponse = JSON::Parse(pMBDataResponse); - if (JSONResponse != NULL) - { - size_t n; - - // Retrieve the main object - JSONObject JSONRoot; - if (JSONResponse->IsObject() == false) - { - mbstowcs_s(&n, wzErrorMessage, BUF_LEN, pMBDataResponse, BUF_LEN); - } - else - { - JSONRoot = JSONResponse->AsObject(); - if (JSONRoot.find(L"reason") != JSONRoot.end() && JSONRoot[L"reason"]->IsString()) - { - StringCchPrintfW(wzErrorMessage, BUF_LEN, JSONRoot[L"reason"]->AsString().c_str()); - } - else - { - bRes = true; - - LPWSTR wzUMSFilePath = NULL; - LPWSTR wzUMSFileExpPath = NULL; - if (SUCCEEDED(BalGetStringVariable(WIXSTDBA_VARIABLE_USERMETEORSESSIONFILE, &wzUMSFilePath))) - { - if (SUCCEEDED(BalFormatString(wzUMSFilePath, &wzUMSFileExpPath))) - { - FileEnsureDelete(wzUMSFileExpPath); - HANDLE hFile = CreateFileW(wzUMSFileExpPath, GENERIC_ALL, 0, 0L, 1, 0x80L, 0); - if (hFile != INVALID_HANDLE_VALUE) - { - std::string innerSession = pMBDataResponse; - // In JS this would be: innerSession.userId = innerSession.id; delete innerSession.id; - innerSession.replace(innerSession.find("\"id\":"), strlen("\"id\":"), "\"userId\":"); - // In JS this would be: innerSession.type = "meteor-account" - innerSession.replace(innerSession.find("{"), 1, "{\"type\": \"meteor-account\", "); - - // In JS this would be: sessionData = {sessions: {"www.meteor.com": innerSession}} - std::string sessionData = "{\"sessions\": {\"www.meteor.com\": "; - sessionData += innerSession; - sessionData += "}}"; - - char sessionDataStr[BUF_LEN]; - strcpy_s(sessionDataStr, BUF_LEN, sessionData.c_str()); - - DWORD bytesWritten; - WriteFile(hFile, sessionDataStr, strlen(sessionDataStr), &bytesWritten, NULL); - CloseHandle(hFile); - } - } - } - } - } - } - else { - wcsncat_s(wzErrorMessage, L"Unknown error.", BUF_LEN-1); - } - - // Clean up JSON object - delete JSONResponse; - } else { - wcsncat_s(wzErrorMessage, L"Network error contacting the Meteor accounts server. Please retry, or skip this step and complete your registration later.", BUF_LEN-1); - } - - - if (bRes == false) - { - wchar_t wzMessage[BUF_LEN] = L""; - StringCchPrintfW(wzMessage, BUF_LEN, L"%s", wzErrorMessage); - MessageBoxW(m_hWnd, wzMessage, m_pTheme->sczCaption, MB_ICONEXCLAMATION | MB_OK); - } - - return bRes; -} - - - HRESULT DAPI LocGetString( - __in const WIX_LOCALIZATION* pWixLoc, - __in_z LPCWSTR wzId, - __out LOC_STRING** ppLocString - ) - { - HRESULT hr = E_NOTFOUND; - LOC_STRING* pLocString = NULL; - - for (DWORD i = 0; i < pWixLoc->cLocStrings; ++i) - { - pLocString = pWixLoc->rgLocStrings + i; - - if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, pLocString->wzId, -1, wzId, -1)) - { - *ppLocString = pLocString; - hr = S_OK; - break; - } - } - - return hr; - } -public: - // - // Constructor - intitialize member variables. - // - CWixStandardBootstrapperApplication( - __in HMODULE hModule, - __in BOOL fPrereq, - __in IBootstrapperEngine* pEngine, - __in const BOOTSTRAPPER_COMMAND* pCommand - ) : CBalBaseBootstrapperApplication(pEngine, pCommand, 3, 3000) - { - m_hModule = hModule; - memcpy_s(&m_command, sizeof(m_command), pCommand, sizeof(BOOTSTRAPPER_COMMAND)); - - // Pre-req BA should only show help or do an install (to launch the Managed BA which can then do the right action). - if (fPrereq && BOOTSTRAPPER_ACTION_HELP != m_command.action && BOOTSTRAPPER_ACTION_INSTALL != m_command.action) - { - m_command.action = BOOTSTRAPPER_ACTION_INSTALL; - } - else // maybe modify the action state if the bundle is or is not already installed. - { - LONGLONG llInstalled = 0; - HRESULT hr = BalGetNumericVariable(L"WixBundleInstalled", &llInstalled); - if (SUCCEEDED(hr) && BOOTSTRAPPER_RESUME_TYPE_REBOOT != m_command.resumeType && 0 < llInstalled && BOOTSTRAPPER_ACTION_INSTALL == m_command.action) - { - m_command.action = BOOTSTRAPPER_ACTION_MODIFY; - } - else if (0 == llInstalled && (BOOTSTRAPPER_ACTION_MODIFY == m_command.action || BOOTSTRAPPER_ACTION_REPAIR == m_command.action)) - { - m_command.action = BOOTSTRAPPER_ACTION_INSTALL; - } - } - - m_plannedAction = BOOTSTRAPPER_ACTION_UNKNOWN; - - // When resuming from restart doing some install-like operation, try to find the package that forced the - // restart. We'll use this information during planning. - m_sczAfterForcedRestartPackage = NULL; - - if (BOOTSTRAPPER_RESUME_TYPE_REBOOT == m_command.resumeType && BOOTSTRAPPER_ACTION_UNINSTALL < m_command.action) - { - // Ensure the forced restart package variable is null when it is an empty string. - HRESULT hr = BalGetStringVariable(L"WixBundleForcedRestartPackage", &m_sczAfterForcedRestartPackage); - if (FAILED(hr) || !m_sczAfterForcedRestartPackage || !*m_sczAfterForcedRestartPackage) - { - ReleaseNullStr(m_sczAfterForcedRestartPackage); - } - } - - m_pWixLoc = NULL; - memset(&m_Bundle, 0, sizeof(m_Bundle)); - memset(&m_Conditions, 0, sizeof(m_Conditions)); - m_sczConfirmCloseMessage = NULL; - m_sczFailedMessage = NULL; - - m_sczLanguage = NULL; - m_pTheme = NULL; - memset(m_rgdwPageIds, 0, sizeof(m_rgdwPageIds)); - m_dwCurrentPage = 0; - m_hUiThread = NULL; - m_fRegistered = FALSE; - m_hWnd = NULL; - - m_state = WIXSTDBA_STATE_INITIALIZING; - m_hrFinal = S_OK; - - m_fDowngrading = FALSE; - m_restartResult = BOOTSTRAPPER_APPLY_RESTART_NONE; - m_fRestartRequired = FALSE; - m_fAllowRestart = FALSE; - - m_sczLicenseFile = NULL; - m_sczLicenseUrl = NULL; - m_fSuppressOptionsUI = FALSE; - m_fSuppressDowngradeFailure = FALSE; - m_fSuppressRepair = FALSE; - m_fShowVersion = FALSE; - m_fIsRepair = FALSE; - m_fIsUninstall = FALSE; - m_fInstallSucceed = FALSE; - m_fIsProductCore = FALSE; - m_sdOverridableVariables = NULL; - m_pTaskbarList = NULL; - m_uTaskbarButtonCreatedMessage = UINT_MAX; - m_fTaskbarButtonOK = FALSE; - m_fShowingInternalUiThisPackage = FALSE; - - m_fPrereq = fPrereq; - m_sczPrereqPackage = NULL; - m_fPrereqInstalled = FALSE; - m_fPrereqAlreadyInstalled = FALSE; - m_fOverallInstallationStarted = FALSE; - m_fUpdating = FALSE; - m_fOutputToConsole = FALSE; - m_fAttachedToConsole = FALSE; - m_fStdConsoleHandle = NULL; - - pEngine->AddRef(); - m_pEngine = pEngine; - - m_hBAFModule = NULL; - m_pBAFunction = NULL; - } - - - // - // Destructor - release member variables. - // - ~CWixStandardBootstrapperApplication() - { - CopyBundleLogToSpecifiedPath(); - AssertSz(!::IsWindow(m_hWnd), "Window should have been destroyed before destructor."); - AssertSz(!m_pTheme, "Theme should have been released before destuctor."); - - if (m_fAttachedToConsole) - { - FreeConsole(); - } - - ReleaseObject(m_pTaskbarList); - ReleaseDict(m_sdOverridableVariables); - ReleaseStr(m_sczFailedMessage); - ReleaseStr(m_sczConfirmCloseMessage); - BalConditionsUninitialize(&m_Conditions); - BalInfoUninitialize(&m_Bundle); - LocFree(m_pWixLoc); - - ReleaseStr(m_sczLanguage); - ReleaseStr(m_sczLicenseFile); - ReleaseStr(m_sczLicenseUrl); - ReleaseStr(m_sczPrereqPackage); - ReleaseStr(m_sczAfterForcedRestartPackage); - ReleaseNullObject(m_pEngine); - - if (m_hBAFModule) - { - ::FreeLibrary(m_hBAFModule); - m_hBAFModule = NULL; - } - } - -private: - HMODULE m_hModule; - BOOTSTRAPPER_COMMAND m_command; - IBootstrapperEngine* m_pEngine; - BOOTSTRAPPER_ACTION m_plannedAction; - - LPWSTR m_sczAfterForcedRestartPackage; - - WIX_LOCALIZATION* m_pWixLoc; - BAL_INFO_BUNDLE m_Bundle; - BAL_CONDITIONS m_Conditions; - LPWSTR m_sczFailedMessage; - LPWSTR m_sczConfirmCloseMessage; - - LPWSTR m_sczLanguage; - THEME* m_pTheme; - DWORD m_rgdwPageIds[countof(vrgwzPageNames)]; - DWORD m_dwCurrentPage; - HANDLE m_hUiThread; - BOOL m_fRegistered; - HWND m_hWnd; - - WIXSTDBA_STATE m_state; - WIXSTDBA_STATE m_stateInstallPage; - HRESULT m_hrFinal; - - BOOL m_fStartedExecution; - DWORD m_dwCalculatedCacheProgress; - DWORD m_dwCalculatedExecuteProgress; - - BOOL m_fDowngrading; - BOOTSTRAPPER_APPLY_RESTART m_restartResult; - BOOL m_fRestartRequired; - BOOL m_fAllowRestart; - - LPWSTR m_sczLicenseFile; - LPWSTR m_sczLicenseUrl; - BOOL m_fSuppressOptionsUI; - BOOL m_fSuppressDowngradeFailure; - BOOL m_fSuppressRepair; - BOOL m_fShowVersion; - BOOL m_fIsRepair; - BOOL m_fIsUninstall; - BOOL m_fInstallSucceed; - - BOOTSTRAPPER_RELATED_OPERATION m_Operation; - - BOOL m_fIsProductCore; - BOOL m_fOverallInstallationStarted; - - - STRINGDICT_HANDLE m_sdOverridableVariables; - - BOOL m_fPrereq; - LPWSTR m_sczPrereqPackage; - BOOL m_fPrereqInstalled; - BOOL m_fPrereqAlreadyInstalled; - BOOL m_fOutputToConsole; - BOOL m_fAttachedToConsole; - HANDLE m_fStdConsoleHandle; - - ITaskbarList3* m_pTaskbarList; - UINT m_uTaskbarButtonCreatedMessage; - BOOL m_fTaskbarButtonOK; - BOOL m_fShowingInternalUiThisPackage; - - BOOL m_fUpdating; - LPCWSTR m_wzUpdateLocation; - - HMODULE m_hBAFModule; - IBootstrapperBAFunction* m_pBAFunction; -}; - - -// -// CreateUserExperience - creates a new IBurnUserExperience object. -// -HRESULT CreateBootstrapperApplication( - __in HMODULE hModule, - __in BOOL fPrereq, - __in IBootstrapperEngine* pEngine, - __in const BOOTSTRAPPER_COMMAND* pCommand, - __out IBootstrapperApplication** ppApplication - ) -{ - HRESULT hr = S_OK; - CWixStandardBootstrapperApplication* pApplication = NULL; - - pApplication = new CWixStandardBootstrapperApplication(hModule, fPrereq, pEngine, pCommand); - ExitOnNull(pApplication, hr, E_OUTOFMEMORY, "Failed to create new standard bootstrapper application object."); - - *ppApplication = pApplication; - pApplication = NULL; - -LExit: - ReleaseObject(pApplication); - return hr; -} diff --git a/scripts/windows/installer/WiXBalExtension/wixstdba/precomp.h b/scripts/windows/installer/WiXBalExtension/wixstdba/precomp.h deleted file mode 100755 index c3737268ed..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixstdba/precomp.h +++ /dev/null @@ -1,56 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Precompiled header for standard bootstrapper application. -// -//------------------------------------------------------------------------------------------------- - -#pragma once - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "dutil.h" -#include "memutil.h" -#include "dictutil.h" -#include "dirutil.h" -#include "fileutil.h" -#include "locutil.h" -#include "logutil.h" -#include "pathutil.h" -#include "resrutil.h" -#include "shelutil.h" -#include "strutil.h" -#include "thmutil.h" -#include "uriutil.h" -#include "xmlutil.h" - -#include "IBootstrapperEngine.h" -#include "IBootstrapperApplication.h" - -#include "BalBaseBootstrapperApplication.h" -#include "balinfo.h" -#include "balcondition.h" - -HRESULT CreateBootstrapperApplication( - __in HMODULE hModule, - __in BOOL fPrereq, - __in IBootstrapperEngine* pEngine, - __in const BOOTSTRAPPER_COMMAND* pCommand, - __out IBootstrapperApplication** ppApplication - ); - -#include "IBootstrapperBAFunction.h" - diff --git a/scripts/windows/installer/WiXBalExtension/wixstdba/resource.h b/scripts/windows/installer/WiXBalExtension/wixstdba/resource.h deleted file mode 100755 index 53c03c319f..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixstdba/resource.h +++ /dev/null @@ -1,25 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -//------------------------------------------------------------------------------------------------- - -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// -#define IDC_STATIC -1 - - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 102 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1003 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/scripts/windows/installer/WiXBalExtension/wixstdba/wixstdba.cpp b/scripts/windows/installer/WiXBalExtension/wixstdba/wixstdba.cpp deleted file mode 100755 index 59c389ca95..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixstdba/wixstdba.cpp +++ /dev/null @@ -1,61 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Setup chainer/bootstrapper standard UI for WiX toolset. -// -//------------------------------------------------------------------------------------------------- - -#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 BootstrapperApplicationCreate( - __in IBootstrapperEngine* pEngine, - __in const BOOTSTRAPPER_COMMAND* pCommand, - __out IBootstrapperApplication** ppApplication - ) -{ - HRESULT hr = S_OK; - - BalInitialize(pEngine); - - hr = CreateBootstrapperApplication(vhInstance, FALSE, pEngine, pCommand, ppApplication); - BalExitOnFailure(hr, "Failed to create bootstrapper application interface."); - -LExit: - return hr; -} - - -extern "C" void WINAPI BootstrapperApplicationDestroy() -{ - BalUninitialize(); -} diff --git a/scripts/windows/installer/WiXBalExtension/wixstdba/wixstdba.def b/scripts/windows/installer/WiXBalExtension/wixstdba/wixstdba.def deleted file mode 100755 index e2de8e8f8a..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixstdba/wixstdba.def +++ /dev/null @@ -1,16 +0,0 @@ -;------------------------------------------------------------------------------------------------- -; -; Copyright (c) 2004, Outercurve Foundation. -; This software is released under Microsoft Reciprocal License (MS-RL). -; The license and further copyright text can be found in the file -; LICENSE.TXT at the root directory of the distribution. -; -; -; -; WiX Standard Bootstrapper Application DLL entry points. -; -;------------------------------------------------------------------------------------------------- - -EXPORTS - BootstrapperApplicationCreate - BootstrapperApplicationDestroy diff --git a/scripts/windows/installer/WiXBalExtension/wixstdba/wixstdba.rc b/scripts/windows/installer/WiXBalExtension/wixstdba/wixstdba.rc deleted file mode 100755 index 98a03baaed..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixstdba/wixstdba.rc +++ /dev/null @@ -1,19 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// WiX Extendend Bootstrapper Application resource file. -// -//------------------------------------------------------------------------------------------------- - -#define VER_APP -#define VER_ORIGINAL_FILENAME "wixextba.dll" -#define VER_INTERNAL_NAME "wixextba" -#define VER_PRODUCT_NAME "WiX Extendend Bootstrapper Application" -#define VER_FILE_DESCRIPTION "WiX Extendend Bootstrapper Application" -#include "wix.rc" diff --git a/scripts/windows/installer/WiXBalExtension/wixstdba/wixstdba.vcxproj b/scripts/windows/installer/WiXBalExtension/wixstdba/wixstdba.vcxproj deleted file mode 100755 index 55553440c0..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixstdba/wixstdba.vcxproj +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - Debug - Win32 - - - Release - Win32 - - - - {41085a22-e6aa-4e8b-ab1b-ddee0dc89dfa} - WixStdBA - Win32Proj - DynamicLibrary - MultiByte - wixextba - - - - v100 - - - v100 - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - true - AllRules.ruleset - - - $(Configuration)\ - $(Configuration)\ - true - AllRules.ruleset - - - - - - - - - - Disabled - $(WiX)SDK\inc;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;DEBUG;%(PreprocessorDefinitions);$(ExtraDefinitions) - true - EnableFastChecks - MultiThreadedDebug - NotUsing - precomp.h - $(IntDir)$(ProjectName).pdb - Level4 - ProgramDatabase - StdCall - true - 4995 - - - $(ProjectDir)..\inc;%(AdditionalIncludeDirectories) - - - dutil.lib;balutil.lib;comctl32.lib;msimg32.lib;gdiplus.lib;shlwapi.lib;wininet.lib;version.lib;%(AdditionalDependencies) - ..\..\WiXSDK\VS2010\lib\x86;%(AdditionalLibraryDirectories) - wixstdba.def - true - Windows - - - - - - - - - Disabled - ..\..\WiXSDK\inc;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);$(ExtraDefinitions) - true - EnableFastChecks - MultiThreaded - NotUsing - precomp.h - $(IntDir)$(ProjectName).pdb - Level4 - ProgramDatabase - StdCall - true - 4995 - - - $(ProjectDir)..\inc;%(AdditionalIncludeDirectories) - - - dutil.lib;balutil.lib;comctl32.lib;msimg32.lib;gdiplus.lib;shlwapi.lib;wininet.lib;version.lib;%(AdditionalDependencies) - ..\..\WiXSDK\VS2010\lib\x86;%(AdditionalLibraryDirectories) - wixstdba.def - false - Windows - - - - - - - - Create - Create - - - - - - - - - - Designer - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/scripts/windows/installer/WiXBalExtension/wixstdba/wixstdba.vcxproj.filters b/scripts/windows/installer/WiXBalExtension/wixstdba/wixstdba.vcxproj.filters deleted file mode 100755 index 405b4233fb..0000000000 --- a/scripts/windows/installer/WiXBalExtension/wixstdba/wixstdba.vcxproj.filters +++ /dev/null @@ -1,73 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/scripts/windows/installer/WiXHelper/.gitignore b/scripts/windows/installer/WiXHelper/.gitignore deleted file mode 100644 index 57a1574c4f..0000000000 --- a/scripts/windows/installer/WiXHelper/.gitignore +++ /dev/null @@ -1,196 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -build/ -bld/ -[Bb]in/ -[Oo]bj/ - -# Visual Studo 2015 cache/options directory -.vs/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opensdf -*.sdf -*.cachefile - -# Visual Studio profiler -*.psess -*.vsp -*.vspx - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding addin-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -_NCrunch_* -.*crunch*.local.xml - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# TODO: Comment the next line if you want to checkin your web deploy settings -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config - -# Windows Azure Build Output -csx/ -*.build.csdef - -# Windows Store app package directory -AppPackages/ - -# Others -*.[Cc]ache -ClientBin/ -[Ss]tyle[Cc]op.* -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.pfx -*.publishsettings -node_modules/ -bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt diff --git a/scripts/windows/installer/WiXHelper/CustomAction.cpp b/scripts/windows/installer/WiXHelper/CustomAction.cpp deleted file mode 100755 index 45f90349ee..0000000000 --- a/scripts/windows/installer/WiXHelper/CustomAction.cpp +++ /dev/null @@ -1,525 +0,0 @@ -#include "stdafx.h" - - -#include - -#include -#include - -#include -#include -#include - -#include -#include -#include - -#define BUF_LEN 1024 -#define MAX_LONG_PATH 2048 -#define LOG true - - - - - - - - -HRESULT ExtractBinary( - __in LPCWSTR wzBinaryId, - __out BYTE** pbData, - __out DWORD* pcbData - ) -{ - HRESULT hr = S_OK; - LPWSTR pwzSql = NULL; - PMSIHANDLE hView; - PMSIHANDLE hRec; - - // make sure we're not horked from the get-go - hr = WcaTableExists(L"Binary"); - if (S_OK != hr) - { - if (SUCCEEDED(hr)) - { - hr = E_UNEXPECTED; - } - ExitOnFailure(hr, "There is no Binary table."); - } - - ExitOnNull(wzBinaryId, hr, E_INVALIDARG, "Binary ID cannot be null"); - ExitOnNull(*wzBinaryId, hr, E_INVALIDARG, "Binary ID cannot be empty string"); - - hr = StrAllocFormatted(&pwzSql, L"SELECT `Data` FROM `Binary` WHERE `Name`=\'%s\'", wzBinaryId); - ExitOnFailure(hr, "Failed to allocate Binary table query."); - - hr = WcaOpenExecuteView(pwzSql, &hView); - ExitOnFailure(hr, "Failed to open view on Binary table"); - - hr = WcaFetchSingleRecord(hView, &hRec); - ExitOnFailure(hr, "Failed to retrieve request from Binary table"); - - hr = WcaGetRecordStream(hRec, 1, pbData, pcbData); - ExitOnFailure(hr, "Failed to read Binary.Data."); - -LExit: - ReleaseStr(pwzSql); - return hr; -} - - -HRESULT ExtractBinaryToFile( - __in LPCWSTR wzBinaryId, - __in LPCWSTR wzFilePath - ) -{ - HRESULT hr = S_OK; - BYTE* pbData = NULL; - DWORD cbData = 0; - DWORD cbWritten = 0; - - HANDLE hFile = INVALID_HANDLE_VALUE; - - wchar_t szTmpFile[BUF_LEN] = L""; DWORD nTmpFileLen = BUF_LEN; - hr = ExtractBinary(wzBinaryId, &pbData, &cbData); - - hFile = CreateFile(wzFilePath, GENERIC_WRITE,FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - if (hFile != INVALID_HANDLE_VALUE) { - WriteFile(hFile, pbData, cbData, &cbWritten, NULL); - CloseHandle(hFile); - } - else - { - hr = HRESULT_FROM_WIN32(::GetLastError()); - } - - return hr; -} - - - - -BOOL ExecuteCommandLine(LPWSTR CommandLine, DWORD & exitCode) -{ - PROCESS_INFORMATION processInformation = {0}; - STARTUPINFO startupInfo = {0}; - startupInfo.cb = sizeof(startupInfo); - - // Create the process - BOOL result = CreateProcess(NULL, CommandLine, - NULL, NULL, FALSE, - NORMAL_PRIORITY_CLASS | CREATE_NO_WINDOW, - NULL, NULL, &startupInfo, &processInformation); - - if (!result) - { - // CreateProcess() failed; Get the error from the system - LPVOID lpMsgBuf; - DWORD dw = GetLastError(); - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, dw, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0, NULL); - - // Display the error - LPTSTR strError = (LPTSTR) lpMsgBuf; - - // Free resources created by the system - LocalFree(lpMsgBuf); - - // We failed. - return FALSE; - } - else - { - // Successfully created the process. Wait for it to finish. - WaitForSingleObject( processInformation.hProcess, INFINITE ); - - // Get the exit code. - result = GetExitCodeProcess(processInformation.hProcess, &exitCode); - - // Close the handles. - CloseHandle( processInformation.hProcess ); - CloseHandle( processInformation.hThread ); - - if (!result) { - return FALSE; - } else { - // We succeeded. - return TRUE; - } - } -} - - -HRESULT UnzipToFolder( - MSIHANDLE hInstall, - __in LPCWSTR wzFriendlyName, - __in LPCWSTR wzTarGzFileName, - __in LPCWSTR wzDestPath - ) -{ - HRESULT hr = S_OK; - - WcaLog(LOGMSG_STANDARD, "Extract \"%S\" package initialized.", wzFriendlyName); - - wchar_t szSourceDir[BUF_LEN] = L""; DWORD nSourceDirDirLen = BUF_LEN; - wchar_t szTarGzFilePath[BUF_LEN] = L""; - wchar_t szTarFilePath[BUF_LEN] = L""; - MsiGetProperty(hInstall, L"SourceDir", szSourceDir, &nSourceDirDirLen); - StringCchPrintf(szTarGzFilePath, BUF_LEN, L"%s%s", szSourceDir, wzTarGzFileName); - StringCchPrintf(szTarFilePath, BUF_LEN, L"%s*.tar", szSourceDir); - - DWORD pdwAttr; - if (FileExistsEx(szTarGzFilePath, &pdwAttr) == TRUE) - { - //Extacting quality_cloud_production.sql to %TEMP% folder - wchar_t szTmpDir[BUF_LEN] = L""; DWORD nTmpDirLen = BUF_LEN; - wchar_t sz7Zip[BUF_LEN] = L""; - - wchar_t szCommandLine1[BUF_LEN] = L""; - wchar_t szCommandLine2[BUF_LEN] = L""; - - MsiGetProperty(hInstall, L"TempFolder", szTmpDir, &nTmpDirLen); - StringCchPrintf(sz7Zip, BUF_LEN, L"%s%s", szTmpDir, L"7za.exe"); - - DWORD pdwAttr; - if (FileExistsEx(sz7Zip, &pdwAttr) == FALSE) - { - hr = ExtractBinaryToFile(L"SevenZip", sz7Zip); - } - - DWORD nRes=0; - - // Remove old Meteor installs - wchar_t szCmdRemoveOld[BUF_LEN] = L""; - wchar_t szSysDir[BUF_LEN] = L""; - DWORD nSysDirLen = BUF_LEN; - MsiGetProperty(hInstall, L"SystemFolder", szSysDir, &nSysDirLen); - - LPTSTR ErrorMessage = NULL; - - StringCchPrintf(szCmdRemoveOld, BUF_LEN, L"%s\\cmd.exe /C \"RD /S /Q \"%s\\.meteor\">NUL\"", szSysDir, wzDestPath); - StringCchPrintf(szCommandLine1, BUF_LEN, L"\"%s\" x -o\"%s\" -y \"%s\"", sz7Zip, szSourceDir, szTarGzFilePath); - StringCchPrintf(szCommandLine2, BUF_LEN, L"\"%s\" x -o\"%s\" -y \"%s\"", sz7Zip, wzDestPath, szTarFilePath); - - if (! ExecuteCommandLine(szCmdRemoveOld, nRes)) { - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, HRESULT_FROM_WIN32(nRes), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&ErrorMessage, 0, NULL); - if (NULL != ErrorMessage) WcaLog(LOGMSG_STANDARD, "Deleting old install completed with (%d): %S", nRes, ErrorMessage); - return HRESULT_FROM_WIN32(nRes); - } - - if (! ExecuteCommandLine(szCommandLine1, nRes)) { - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, HRESULT_FROM_WIN32(nRes), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&ErrorMessage, 0, NULL); - if (NULL != ErrorMessage) WcaLog(LOGMSG_STANDARD, "Archive expanding completed with (%d): %S", nRes, ErrorMessage); - return HRESULT_FROM_WIN32(nRes); - } - - if (! ExecuteCommandLine(szCommandLine2, nRes)) { - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, HRESULT_FROM_WIN32(nRes), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&ErrorMessage, 0, NULL); - if (NULL != ErrorMessage) WcaLog(LOGMSG_STANDARD, "Archive deployment completed with (%d): %S", nRes, ErrorMessage); - return HRESULT_FROM_WIN32(nRes); - } - } - else - { - hr = HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); - WcaLog(LOGMSG_STANDARD, "Failed to extract %S files. File not found: %S", wzFriendlyName, szTarGzFilePath); - } - - WcaLog(LOGMSG_STANDARD, "Extracting \"%S\" package completed.", wzFriendlyName); - - return hr; -} - - -UINT __stdcall Extract_MeteorFiles(MSIHANDLE hInstall) -{ - // If cancelled, don't try to extract anything. - wchar_t szValueBuf[64]; - DWORD szValueBufSize = 64; - MsiGetProperty(hInstall, L"Cancelled", szValueBuf, &szValueBufSize); - if (szValueBuf[0] == L'Y') - return 0; - - // Go ahead. - HRESULT hr = S_OK; - UINT er = ERROR_SUCCESS; - - hr = WcaInitialize(hInstall, "Extract_MeteorFiles"); - ExitOnFailure(hr, "Failed to initialize Extract_MeteorFiles"); - - wchar_t szMeteorDir[BUF_LEN] = L""; DWORD nMeteorDirLen = BUF_LEN; - MsiGetProperty(hInstall, L"METEOR_DIR", szMeteorDir, &nMeteorDirLen); - - hr = UnzipToFolder(hInstall, L"Meteor", L"meteor-bootstrap-os.windows.x86_32.tar.gz", szMeteorDir); - ExitOnFailure(hr, "Failed to extract Meteor files."); - -LExit: - er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; - return WcaFinalize(er); -} - - - -HRESULT Download_Package( - MSIHANDLE hInstall, - __in LPCWSTR wzFriendlyName, - __in LPCWSTR szDwnUrl, - __in LPCWSTR wzZipFile) -{ - HRESULT hr = S_OK; - - WcaLog(LOGMSG_STANDARD, "Download package \"%S\" initialized.", wzFriendlyName); - - wchar_t szSourceDir[BUF_LEN] = L""; DWORD nSourceDirDirLen = BUF_LEN; - wchar_t szZipFile[BUF_LEN] = L""; - - MsiGetProperty(hInstall, L"SourceDir", szSourceDir, &nSourceDirDirLen); - - StringCchPrintf(szZipFile, BUF_LEN, L"%s%s", szSourceDir, wzZipFile); - - HINTERNET internet = InternetOpen( - L"MeteorWindowsInstaller/1.0", - INTERNET_OPEN_TYPE_PRECONFIG, - NULL, - NULL, - 0); - - if (internet == NULL) { - return HRESULT_FROM_WIN32(::GetLastError()); - } - - HINTERNET request = InternetOpenUrl( - internet, - szDwnUrl, - NULL, - 0, - INTERNET_FLAG_SECURE, - NULL); - - if (request == NULL) { - return HRESULT_FROM_WIN32(::GetLastError()); - } - - DWORD dwContentLen; - DWORD dwBufLen = sizeof(dwContentLen); - - BOOL result = HttpQueryInfo( - request, - HTTP_QUERY_CONTENT_LENGTH | HTTP_QUERY_FLAG_NUMBER, - (LPVOID)&dwContentLen, - &dwBufLen, - 0); - - if (!request) { - return HRESULT_FROM_WIN32(::GetLastError()); - } - - const int capacity = 1024*64; - char* buffer = new char[capacity]; - DWORD bytes_downloaded = 0; - - FILE* output = _wfopen(szZipFile, L"wb"); - for (;;) { - DWORD bytes_read; - - BOOL result = InternetReadFile( - request, - buffer, - capacity, - &bytes_read); - - if (!result) { - return HRESULT_FROM_WIN32(::GetLastError()); - } - - if (bytes_read == 0) { - break; - } - - bytes_downloaded += bytes_read; - - fwrite(buffer, 1, bytes_read, output); - - // update progress bar - PMSIHANDLE hActionRec = MsiCreateRecord(3); - PMSIHANDLE hProgressRec = MsiCreateRecord(3); - - DWORD ulPrc = 0; - WCHAR wzInfo[1024] = { }; - - ulPrc = static_cast(100 * static_cast(bytes_downloaded) / static_cast(dwContentLen)); - ::StringCchPrintfW(wzInfo, countof(wzInfo), L"Downloading Meteor... %u%%", ulPrc); - - MsiRecordSetString(hActionRec, 1, TEXT("Download_MeteorPackage")); - MsiRecordSetString(hActionRec, 2, wzInfo); - MsiRecordSetString(hActionRec, 3, NULL); - - UINT iResult = MsiProcessMessage(hInstall, INSTALLMESSAGE_ACTIONSTART, hActionRec); - - // XXX I *thought* this should return IDCANCEL, and have verified that - // that's what - // WixStandardBootstrapperApplication.cpp::OnExecuteMsiMessage - // returns. But for some reason `iResult` ends up being 1. - if (iResult == 1) { - fclose(output); - MsiSetProperty(hInstall, L"Cancelled", L"Y"); // read from Extract_MeteorFiles - return ERROR_INSTALL_USEREXIT; - } - } - - fclose(output); - - WcaLog(LOGMSG_STANDARD, "Download package \"%S\" completed.", wzFriendlyName); - - return hr; -} - - -// assumes content is at most 1024 characters -UINT FetchHTTPSToShortString(wchar_t *url, char *result) { - HINTERNET internet = InternetOpen( - L"MeteorWindowsInstaller/1.0", - INTERNET_OPEN_TYPE_PRECONFIG, - NULL, - NULL, - 0); - - if (internet == NULL) { - return ::GetLastError(); - } - - HINTERNET request = InternetOpenUrl( - internet, - url, - NULL, - 0, - INTERNET_FLAG_SECURE, - NULL); - - if (request == NULL) { - return ::GetLastError(); - } - - DWORD bytes_read; - BOOL readResult = InternetReadFile( - request, - result, - 1023, - &bytes_read); - if (!readResult) { - return ::GetLastError(); - } - result[bytes_read] = 0; - - return 0; -} - - -UINT __stdcall Download_MeteorPackage(MSIHANDLE hInstall) -{ - HRESULT hr = S_OK; - UINT er = ERROR_SUCCESS; - UINT httpEr; - - hr = WcaInitialize(hInstall, "Download_MeteorPackage"); - ExitOnFailure(hr, "Failed to initialize Download_MeteorPackage"); - - char bootstrapLink[1024]; - - httpEr = FetchHTTPSToShortString(L"https://packages.meteor.com/bootstrap-link", bootstrapLink); - if (httpEr) { - hr = HRESULT_FROM_WIN32(httpEr); - MessageBoxA(NULL, "Failed to contact install server. Please try again later.", NULL, NULL); - ExitOnFailure(hr, "Couldn't get bootstap-link"); - } - - // strip trailing newline; if it's not there it's probably because we're - // getting some bad response from packages.meteor.com. - char *bootstrapLinkNewline = strchr(bootstrapLink, '\n'); - if (!bootstrapLinkNewline) { - MessageBoxA(NULL, "Malformed response from install server. Please try again later.", NULL, NULL); - ExitOnFailure(E_FAIL, "Couldn't parse bootstrap-link"); - } - - *bootstrapLinkNewline = '\0'; - - char downloadUrl[1024]; - sprintf(downloadUrl, "%s/meteor-bootstrap-os.windows.x86_32.tar.gz", bootstrapLink); - - wchar_t wDownloadUrl[1024]; - mbstowcs(wDownloadUrl, downloadUrl, 1024); - - hr = Download_Package(hInstall, L"Meteor", wDownloadUrl, L"meteor-bootstrap-os.windows.x86_32.tar.gz"); - if (FAILED(hr)) { - MessageBoxA(NULL, "Failed to download Meteor installation package. Please try again later.", NULL, NULL); - } - ExitOnFailure(hr, "Failed to download Meteor package from specified URL."); - -LExit: - er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; - return WcaFinalize(er); -} - - - - -UINT __stdcall BulkRemoveMeteorFiles(MSIHANDLE hInstall) -{ - HRESULT hr = S_OK; - UINT er = ERROR_SUCCESS; - - hr = WcaInitialize(hInstall, "BulkRemoveMeteorFiles"); - ExitOnFailure(hr, "Failed to initialize BulkRemoveMeteorFiles"); - - WcaLog(LOGMSG_STANDARD, "BulkRemoveMeteorFiles Initialized."); - - wchar_t szPathPackages[BUF_LEN] = L""; DWORD nPathPackages = BUF_LEN; - wchar_t szPathPkg_Meta[BUF_LEN] = L""; DWORD nPathPkg_Meta = BUF_LEN; - - MsiGetProperty(hInstall, L"METEORDIR_PACKAGES", szPathPackages, &nPathPackages); - MsiGetProperty(hInstall, L"METEORDIR_PKG_META", szPathPkg_Meta, &nPathPkg_Meta); - - wchar_t szSysDir[BUF_LEN] = L""; DWORD nSysDirLen = BUF_LEN; - wchar_t szCmd1[BUF_LEN] = L""; - wchar_t szCmd2[BUF_LEN] = L""; - - DWORD nRes=0; - - - MsiGetProperty(hInstall, L"SystemFolder", szSysDir, &nSysDirLen); - StringCchPrintf(szCmd1, BUF_LEN, L"%s\\cmd.exe /C \"RD /S /Q \"%s\">NUL\"", szSysDir, szPathPackages); - StringCchPrintf(szCmd2, BUF_LEN, L"%s\\cmd.exe /C \"RD /S /Q \"%s\">NUL\"", szSysDir, szPathPkg_Meta); - - ExecuteCommandLine(szCmd1, nRes); - ExecuteCommandLine(szCmd2, nRes); - - WcaLog(LOGMSG_STANDARD, "BulkRemoveMeteorFiles done."); - -LExit: - er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; - return WcaFinalize(er); -} - - - - -// DllMain - Initialize and cleanup WiX custom action utils. -extern "C" BOOL WINAPI DllMain( - __in HINSTANCE hInst, - __in ULONG ulReason, - __in LPVOID - ) -{ - switch(ulReason) - { - case DLL_PROCESS_ATTACH: - WcaGlobalInitialize(hInst); - break; - - case DLL_PROCESS_DETACH: - WcaGlobalFinalize(); - break; - } - - return TRUE; -} diff --git a/scripts/windows/installer/WiXHelper/CustomAction.def b/scripts/windows/installer/WiXHelper/CustomAction.def deleted file mode 100755 index 8c8f141025..0000000000 --- a/scripts/windows/installer/WiXHelper/CustomAction.def +++ /dev/null @@ -1,10 +0,0 @@ -LIBRARY "WiXHelper" - -EXPORTS - -; DROP_QCloudDatabase -; CREATE_QCloudDatabase - -Download_MeteorPackage -Extract_MeteorFiles -BulkRemoveMeteorFiles \ No newline at end of file diff --git a/scripts/windows/installer/WiXHelper/WiXHelper.vcxproj b/scripts/windows/installer/WiXHelper/WiXHelper.vcxproj deleted file mode 100755 index cd392d640a..0000000000 --- a/scripts/windows/installer/WiXHelper/WiXHelper.vcxproj +++ /dev/null @@ -1,128 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - - {17815519-26F7-4F37-9FAC-3FC50796C25D} - WiXHelper - Win32Proj - - - - DynamicLibrary - Unicode - true - v100 - - - DynamicLibrary - Unicode - true - v100 - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - bin\$(Configuration)\Win32\ - obj\$(Configuration)\Win32\ - false - false - AllRules.ruleset - AllRules.ruleset - - - - - - - bin\$(Configuration)\Win64\ - obj\$(Configuration)\Win64\ - - - - MaxSpeed - true - ..\WiXSDK\inc;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;CUSTOMACTIONTEST_EXPORTS;%(PreprocessorDefinitions) - MultiThreaded - true - Use - Level3 - ProgramDatabase - - - msi.lib;dutil.lib;wcautil.lib;Version.lib;Urlmon.lib;Wininet.lib;Userenv.lib;%(AdditionalDependencies) - ..\WiXSDK\VS2010\lib\x86;%(AdditionalLibraryDirectories) - CustomAction.def - true - Windows - true - true - MachineX86 - - - - - - - - - MaxSpeed - true - ..\WiXSDK\inc;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;CUSTOMACTIONTEST_EXPORTS;%(PreprocessorDefinitions) - MultiThreaded - true - Use - Level3 - ProgramDatabase - - - msi.lib;dutil.lib;wcautil.lib;Version.lib;Urlmon.lib;Wininet.lib;Userenv.lib;%(AdditionalDependencies) - ..\WiXSDK\VS2010\lib\x64;%(AdditionalLibraryDirectories) - CustomAction.def - true - Windows - true - true - - - - - - - - - - Create - Create - - - - - - - - - - - - - \ No newline at end of file diff --git a/scripts/windows/installer/WiXHelper/WiXHelper.vcxproj.filters b/scripts/windows/installer/WiXHelper/WiXHelper.vcxproj.filters deleted file mode 100755 index 5837c344d6..0000000000 --- a/scripts/windows/installer/WiXHelper/WiXHelper.vcxproj.filters +++ /dev/null @@ -1,38 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Source Files - - - Source Files - - - - - Source Files - - - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/scripts/windows/installer/WiXHelper/stdafx.cpp b/scripts/windows/installer/WiXHelper/stdafx.cpp deleted file mode 100755 index 8647bd6058..0000000000 --- a/scripts/windows/installer/WiXHelper/stdafx.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// WiXHelper.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - -// TODO: reference any additional headers you need in STDAFX.H -// and not in this file diff --git a/scripts/windows/installer/WiXHelper/stdafx.h b/scripts/windows/installer/WiXHelper/stdafx.h deleted file mode 100755 index cac5e1cfd4..0000000000 --- a/scripts/windows/installer/WiXHelper/stdafx.h +++ /dev/null @@ -1,26 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#pragma once - -#include "targetver.h" - -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -// Windows Header Files: -#include -#include -#include - -// WiX Header Files: -#include - - -// TODO: reference additional headers your program requires here -typedef struct _BURN_DOWNLOAD_SOURCE -{ - LPWSTR sczUrl; - LPWSTR sczUser; - LPWSTR sczPassword; -} BURN_DOWNLOAD_SOURCE; diff --git a/scripts/windows/installer/WiXHelper/targetver.h b/scripts/windows/installer/WiXHelper/targetver.h deleted file mode 100755 index 20d087c2b4..0000000000 --- a/scripts/windows/installer/WiXHelper/targetver.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - -// The following macros define the minimum required platform. The minimum required platform -// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run -// your application. The macros work by enabling all features available on platform versions up to and -// including the version specified. - -// Modify the following defines if you have to target a platform prior to the ones specified below. -// Refer to MSDN for the latest info on corresponding values for different platforms. -#ifndef WINVER // Specifies that the minimum required platform is Windows 2000. -#define WINVER 0x0500 // Change this to the appropriate value to target other versions of Windows. -#endif - -#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows 2000. -#define _WIN32_WINNT 0x0500 // Change this to the appropriate value to target other versions of Windows. -#endif - -#ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 5.0. -#define _WIN32_IE 0x0500 // Change this to the appropriate value to target other versions of IE. -#endif - -#ifndef _WIN32_MSI // Specifies that the minimum required MSI version is MSI 3.1 -#define _WIN32_MSI 310 // Change this to the appropriate value to target other versions of MSI. -#endif diff --git a/scripts/windows/installer/WiXInstaller/.gitignore b/scripts/windows/installer/WiXInstaller/.gitignore deleted file mode 100644 index 57a1574c4f..0000000000 --- a/scripts/windows/installer/WiXInstaller/.gitignore +++ /dev/null @@ -1,196 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -build/ -bld/ -[Bb]in/ -[Oo]bj/ - -# Visual Studo 2015 cache/options directory -.vs/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opensdf -*.sdf -*.cachefile - -# Visual Studio profiler -*.psess -*.vsp -*.vspx - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding addin-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -_NCrunch_* -.*crunch*.local.xml - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# TODO: Comment the next line if you want to checkin your web deploy settings -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config - -# Windows Azure Build Output -csx/ -*.build.csdef - -# Windows Store app package directory -AppPackages/ - -# Others -*.[Cc]ache -ClientBin/ -[Ss]tyle[Cc]op.* -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.pfx -*.publishsettings -node_modules/ -bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt diff --git a/scripts/windows/installer/WiXInstaller/Configuration.wxi b/scripts/windows/installer/WiXInstaller/Configuration.wxi deleted file mode 100644 index b4334f279a..0000000000 --- a/scripts/windows/installer/WiXInstaller/Configuration.wxi +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/scripts/windows/installer/WiXInstaller/MSIPackage.wixproj b/scripts/windows/installer/WiXInstaller/MSIPackage.wixproj deleted file mode 100755 index 3ed8349c5b..0000000000 --- a/scripts/windows/installer/WiXInstaller/MSIPackage.wixproj +++ /dev/null @@ -1,71 +0,0 @@ - - - - Debug - x86 - {e053726b-937b-40c7-8f3d-25a3226979d9} - 2.0 - Package - $(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets - $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets - MSIPackage - 6.0.2469 - - - bin\$(Configuration)\$(Platform)\ - obj\$(Platform)\$(Configuration)\ - - - x86 - ICE60;ICE80 - SetupMeteor - - - bin\$(Configuration)\$(Platform)\ - obj\$(Platform)\$(Configuration)\ - - - x64 - ICE60;ICE61;ICE69; - SetupMeteor - - - - - - $(WixExtDir)\WixNetFxExtension.dll - WixNetFxExtension - - - $(WixExtDir)\WixFirewallExtension.dll - WixFirewallExtension - - - $(WixExtDir)\WixUtilExtension.dll - WixUtilExtension - - - - - - - - Configuration.wxi - - - - - - - - - - - \ No newline at end of file diff --git a/scripts/windows/installer/WiXInstaller/Meteor_Bundle.wxs b/scripts/windows/installer/WiXInstaller/Meteor_Bundle.wxs deleted file mode 100755 index 872cb5106b..0000000000 --- a/scripts/windows/installer/WiXInstaller/Meteor_Bundle.wxs +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/scripts/windows/installer/WiXInstaller/Meteor_Product.wxs b/scripts/windows/installer/WiXInstaller/Meteor_Product.wxs deleted file mode 100755 index e138497bc8..0000000000 --- a/scripts/windows/installer/WiXInstaller/Meteor_Product.wxs +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - NOT Installed - NOT Installed - REMOVE~="ALL" - REMOVE~="ALL" - REMOVE~="ALL" - - - - Installing Meteor... please wait. (This may take a minute or two.) - Removing Meteor... - - - - - - - - PERUSER_INSTALL - - - - - PERMACHINE_INSTALL - - - - - - - - - - PERMACHINE_INSTALL - - - - - - - - diff --git a/scripts/windows/installer/WiXInstaller/Resources/Background - Copy.png b/scripts/windows/installer/WiXInstaller/Resources/Background - Copy.png deleted file mode 100755 index 8ab6fe5c0d..0000000000 Binary files a/scripts/windows/installer/WiXInstaller/Resources/Background - Copy.png and /dev/null differ diff --git a/scripts/windows/installer/WiXInstaller/Resources/Background.png b/scripts/windows/installer/WiXInstaller/Resources/Background.png deleted file mode 100755 index 5184f65d0f..0000000000 Binary files a/scripts/windows/installer/WiXInstaller/Resources/Background.png and /dev/null differ diff --git a/scripts/windows/installer/WiXInstaller/Resources/License.htm b/scripts/windows/installer/WiXInstaller/Resources/License.htm deleted file mode 100755 index e15530b61d..0000000000 --- a/scripts/windows/installer/WiXInstaller/Resources/License.htm +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - - - - -
- -

[Put Your License Agreement Here]

- -

Lorem -ipsum dolor sit amet, consectetur adipiscing elit. Donec ultricies ultricies -arcu id commodo. Ut dignissim ante nec urna elementum imperdiet. Praesent -pretium condimentum orci sit amet laoreet. Fusce condimentum tempor leo, vitae -tempor quam interdum et. Nulla ante dui, tincidunt sed porta nec, pulvinar in -felis. Pellentesque pellentesque ornare nibh id accumsan. In eu arcu nibh. -Aenean ut vulputate nisl. Proin at nibh lacinia urna elementum commodo. Donec semper -lorem quis neque fringilla quis facilisis dolor dignissim. Suspendisse a massa -in odio viverra vehicula. Curabitur id lectus purus, non bibendum arcu. Cras -dictum, turpis eget gravida condimentum, turpis ante varius leo, molestie -pulvinar mauris libero ut leo. Morbi libero diam, sollicitudin id interdum sit -amet, rhoncus eget turpis.

- -

Vestibulum arcu dui, suscipit -vitae suscipit laoreet, posuere eget risus. Sed vitae massa in justo vehicula -elementum sed at arcu. Pellentesque arcu ante, accumsan sed lacinia sed, -lacinia vel urna. Vivamus at ligula nulla, lobortis ultricies tortor. Vivamus -suscipit dolor non velit adipiscing venenatis. Nullam adipiscing accumsan -condimentum. Nullam ut lorem neque, et iaculis felis. Donec sed massa diam, et -feugiat velit. Pellentesque facilisis mi a odio ultrices facilisis. Nam porta, -lorem feugiat aliquet placerat, ipsum risus accumsan sem, euismod bibendum -velit dolor sed turpis. Suspendisse tincidunt, lectus congue rhoncus -sollicitudin, magna erat porttitor ante, eget sodales ante sem eu augue. Aenean -risus risus, mattis vitae pretium at, venenatis dictum est. Vestibulum -consectetur euismod magna vel sodales.

- -

Quisque eu urna lacus. Nunc eget -dictum odio. Pellentesque vel dolor leo. Praesent aliquet, erat vel fringilla -lobortis, ante nibh dapibus augue, sed semper ligula odio vitae nulla. Nullam -dictum gravida lectus nec lacinia. Vivamus fermentum ultricies lobortis. In -quis magna massa, ut commodo lectus. Donec nunc velit, gravida id euismod -luctus, luctus sed ante. Nunc elementum mollis sapien, ac interdum quam -fringilla eu. Pellentesque habitant morbi tristique senectus et netus et -malesuada fames ac turpis egestas. Aliquam dui enim, tempus vel aliquam sed, -pretium sed nisi. Fusce vitae magna nec nibh aliquam suscipit vel a felis. -Etiam gravida, lorem id laoreet gravida, nisl leo hendrerit dolor, quis porta -mauris enim vitae justo. Maecenas congue, felis at rhoncus vestibulum, nisl -urna pellentesque urna, id iaculis augue metus eget neque. Curabitur pretium -risus nec tortor vulputate et rhoncus ipsum gravida.

- -

Maecenas elementum volutpat arcu, -nec ultricies velit faucibus facilisis. Etiam sem lacus, mattis eget gravida -ut, rhoncus porta lorem. Vivamus volutpat dui sit amet risus mollis venenatis. -Quisque velit velit, condimentum id pharetra sed, varius vitae lectus. Praesent -nisi turpis, porttitor nec accumsan a, aliquam sit amet augue. Quisque -facilisis enim sed enim pretium tristique. Aliquam commodo varius mi, ut -iaculis nunc tempus non. Vivamus velit nunc, dictum a dignissim vitae, commodo -id metus. Integer volutpat, neque at ultrices dignissim, felis nulla commodo -orci, at auctor nisl quam nec sem. Pellentesque interdum pellentesque nulla, ac -fermentum tortor porttitor a. Etiam condimentum aliquet sapien vel adipiscing. Quisque -est velit, vulputate a iaculis ut, tempus in nibh. Cras consectetur quam nibh, -vel lobortis justo. Aenean a elit leo. Aenean mollis dolor a odio accumsan -mollis. Proin blandit neque erat. Integer lectus urna, volutpat quis vulputate -et, fermentum et ante. Maecenas vitae ultricies dui.

- -

Mauris accumsan varius luctus. In -hac habitasse platea dictumst. Mauris malesuada tempus nibh, porta accumsan -tortor tincidunt eu. Proin orci mauris, commodo id malesuada nec, adipiscing ut -sapien. Phasellus at dui vel nisi adipiscing auctor quis vel sem. Phasellus -fermentum, enim id sodales ullamcorper, magna sapien facilisis urna, ac -lobortis nunc augue ut ligula. Quisque vulputate nibh sed velit pharetra -dictum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque -mi metus, vestibulum vitae dapibus vel, ultrices at tellus. Vivamus iaculis dui -a nisl faucibus eget congue velit gravida. Donec vel quam ligula. Nam magna -ante, vulputate id pharetra ac, dapibus commodo velit. Cras nisl nulla, congue -sit amet laoreet eget, cursus et lorem. Mauris diam tortor, porttitor vitae -fringilla id, iaculis sit amet eros. Donec sed enim eget felis fermentum -posuere. Pellentesque sodales feugiat dolor, vel molestie est adipiscing non. -Morbi tincidunt viverra felis ut hendrerit.

- -
- - - - diff --git a/scripts/windows/installer/WiXInstaller/Resources/License.rtf b/scripts/windows/installer/WiXInstaller/Resources/License.rtf deleted file mode 100755 index 1a18323618..0000000000 Binary files a/scripts/windows/installer/WiXInstaller/Resources/License.rtf and /dev/null differ diff --git a/scripts/windows/installer/WiXInstaller/Resources/LogoSide.png b/scripts/windows/installer/WiXInstaller/Resources/LogoSide.png deleted file mode 100755 index 70802b3a53..0000000000 Binary files a/scripts/windows/installer/WiXInstaller/Resources/LogoSide.png and /dev/null differ diff --git a/scripts/windows/installer/WiXInstaller/Resources/Product.ico b/scripts/windows/installer/WiXInstaller/Resources/Product.ico deleted file mode 100755 index e070f56d51..0000000000 Binary files a/scripts/windows/installer/WiXInstaller/Resources/Product.ico and /dev/null differ diff --git a/scripts/windows/installer/WiXInstaller/Resources/Theme_Meteor.wxl b/scripts/windows/installer/WiXInstaller/Resources/Theme_Meteor.wxl deleted file mode 100755 index c53a728bb2..0000000000 --- a/scripts/windows/installer/WiXInstaller/Resources/Theme_Meteor.wxl +++ /dev/null @@ -1,104 +0,0 @@ - - - Install [WixBundleName] - [WixBundleName] - Welcome to the [WixBundleName] Setup - Setup will install [WixBundleName] on your computer. During the wizard, you will be able to adjust product features and settings that fit best to your needs. - Version [WixBundleVersion] - - Are you sure you want to cancel? - Setup Help - - /passive | /quiet - displays minimal UI with no prompts or displays no UI and no prompts. By default UI and all prompts are displayed. - - /toconsole - similar to /quiet except that progress is redirected to console. - - /log log.txt - logs to a specific file. By default a log file is created in %TEMP%. - - &Close - I &agree to the license terms and conditions - &Options - &Install - &Cancel - < Back - Next > - Skip this step - Install - Install Meteor - - Version [WixBundleVersion] <a href="#">upgrade available</a> - Current user password: - - [WixBundleName] install directory - Please select the way you want [WixBundleName] to be installed on your computer. - Install location: - Install this application for: - For all users on this computer (recommended) - Only for me ([LogonUser]) - - [WixBundleName] registration - Sign in with your Meteor developer account or create a new one now. - Sign up for a new account - Sign in with an existing account - Email Address - Username - Username or Email - Password - Skip [WixBundleName] registration and continue with setup - - - - Setup Options - Adjust setup parameters in order to your needs. - Install location: - &Browse... - Database location: - B&rowse... - &OK - &Cancel - - - - - Installing [WixBundleName] - Repairing [WixBundleName] - Uninstalling [WixBundleName] - Please wait while Setup installs [WixBundleName] on your computer. - Please wait while Setup repairs [WixBundleName] installed on your computer. - Please wait while [WixBundleName] is removed from your computer. - Processing: - Initializing... - Initializing... - Initializing... - - &Cancel - [WixBundleName] Maintenance - The setup wizard allows you to repair or remove [WixBundleName] from your computer. If you have a [WixBundleName] application currently running, it is recommended to close it. Click Repair if you want to repair [WixBundleName], Uninstall to remove it or click Cancel to close this maintenance wizard. - &Repair - &Uninstall - &Close - Meteor is now installed on your computer. - Repair Successful - Meteor has been uninstalled. - -To get started, open a new command prompt and type "meteor". If you're running Windows 8.1, you may need to restart your machine. - -To learn more about Meteor, check out the <a href="https://www.meteor.com/try">Meteor tutorial</a> and read the <a href="https://docs.meteor.com">official documentation</a>. If you need help, ask a question on the official forums at <a href="https://forums.meteor.com">forums.meteor.com</a> or <a href="https://stackoverflow.com/questions/tagged/meteor">Stack Overflow</a>. - -Check out the <a href="https://github.com/meteor/meteor/wiki/Preview-of-Meteor-on-Windows">Wiki page on GitHub</a> to learn more about the Meteor Windows preview. - - Following non critical errors occured: - Setup has finished repairing [WixBundleName] installed on your computer. The application may be launched by selecting the installed icons. - We hope to see you again soon! - &Launch - You must restart your computer before you can use the software. - &Restart - &Close - Setup Failed - Repair Failed - Uninstall Failed - 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>. - You must restart your computer to complete the rollback of the software. - &Restart - &Close - \ No newline at end of file diff --git a/scripts/windows/installer/WiXInstaller/Resources/Theme_Meteor.xml b/scripts/windows/installer/WiXInstaller/Resources/Theme_Meteor.xml deleted file mode 100755 index 0679a60653..0000000000 --- a/scripts/windows/installer/WiXInstaller/Resources/Theme_Meteor.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - #(loc.Caption) - Segoe UI - Segoe UI - Tahoma - Segoe UI - Tahoma - Segoe UI - Segoe UI - Segoe UI - - - - - - #(loc.InstallLicenseLinkText) --> - - - - - - #(loc.InstallDirHeader) - #(loc.InstallDirMessage) - - #(loc.InstallScopeLabel) - - - - #(loc.InstallDirPathLabel) - - - - - - - - - - - - - #(loc.ExecuteProgressActionDataText) - - - - - - - -Before getting started, please take a moment to -create a Meteor developer account. - - -Registering tells us who's using Meteor for Windows and helps us make it better. -You'll also need your account to publish Atmosphere packages and get -notified about critical security updates when they happen. - - - - - - - - #(loc.RegisterEmail): - #(loc.RegisterUser): - #(loc.RegisterPass): - - [RegisterEmail] - [RegisterUser] - [RegisterPass] - - - - - #(loc.RegisterUsernameOrEmail): - #(loc.RegisterPass): - - [LoginUsernameOrEmail] - [LoginPass] - - - - - - - - - #(loc.ModifyHeader) - #(loc.ModifyInfo) - - - - - - [varSuccessHeader] - [varSuccessInfo] - - - - - - [varFailureHeader] - #(loc.FailureHyperlinkLogText) - - - #(loc.FailureRestartText) - - - - diff --git a/scripts/windows/installer/WiXInstaller/Resources/TopHeader.png b/scripts/windows/installer/WiXInstaller/Resources/TopHeader.png deleted file mode 100755 index dc92e121f9..0000000000 Binary files a/scripts/windows/installer/WiXInstaller/Resources/TopHeader.png and /dev/null differ diff --git a/scripts/windows/installer/WiXInstaller/Resources/dummy.file b/scripts/windows/installer/WiXInstaller/Resources/dummy.file deleted file mode 100755 index e69de29bb2..0000000000 diff --git a/scripts/windows/installer/WiXInstaller/Resources/meteor-logo-sm.jpg b/scripts/windows/installer/WiXInstaller/Resources/meteor-logo-sm.jpg deleted file mode 100644 index 91a38ea0be..0000000000 Binary files a/scripts/windows/installer/WiXInstaller/Resources/meteor-logo-sm.jpg and /dev/null differ diff --git a/scripts/windows/installer/WiXInstaller/SetupPackage.wixproj b/scripts/windows/installer/WiXInstaller/SetupPackage.wixproj deleted file mode 100755 index 1751b3538d..0000000000 --- a/scripts/windows/installer/WiXInstaller/SetupPackage.wixproj +++ /dev/null @@ -1,71 +0,0 @@ - - - - Debug - x86 - 3.8 - 7b569f5b-5d73-4e7b-be41-041a2f22a521 - 2.0 - Bundle - $(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets - $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets - SetupPackage - - - bin\$(Configuration)\$(Platform)\ - obj\$(Configuration)\ - True - True - False - InstallMeteor - - - bin\$(Configuration)\$(Platform)\ - obj\$(Configuration)\ - True - True - False - InstallMeteor - - - - - - - $(WixExtDir)\WixNetFxExtension.dll - WixNetFxExtension - - - ..\WiXBalExtension\build\WixBalExtensionExt.dll - WixBalExtensionExt - - - $(WixExtDir)\WixUtilExtension.dll - WixUtilExtension - - - - - - - - - - - - - - - - - copy "$(ProjectDir)$(OutDir)$(TargetFileName)" "$(ProjectDir)..\Release\" /Y - - - \ No newline at end of file diff --git a/scripts/windows/installer/WiXSDK/inc/BalBaseBootstrapperApplication.h b/scripts/windows/installer/WiXSDK/inc/BalBaseBootstrapperApplication.h deleted file mode 100644 index 7ab91a456d..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/BalBaseBootstrapperApplication.h +++ /dev/null @@ -1,651 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -//------------------------------------------------------------------------------------------------- - -#include -#include - -#include "IBootstrapperEngine.h" -#include "IBootstrapperApplication.h" - -#include "balutil.h" -#include "balretry.h" - -class CBalBaseBootstrapperApplication : public IBootstrapperApplication -{ -public: // IUnknown - virtual STDMETHODIMP QueryInterface( - __in REFIID riid, - __out LPVOID *ppvObject - ) - { - if (!ppvObject) - { - return E_INVALIDARG; - } - - *ppvObject = NULL; - - if (::IsEqualIID(__uuidof(IBootstrapperApplication), riid)) - { - *ppvObject = static_cast(this); - } - else if (::IsEqualIID(IID_IUnknown, riid)) - { - *ppvObject = static_cast(this); - } - else // no interface for requested iid - { - return E_NOINTERFACE; - } - - AddRef(); - return S_OK; - } - - virtual STDMETHODIMP_(ULONG) AddRef() - { - return ::InterlockedIncrement(&this->m_cReferences); - } - - virtual STDMETHODIMP_(ULONG) Release() - { - long l = ::InterlockedDecrement(&this->m_cReferences); - if (0 < l) - { - return l; - } - - delete this; - return 0; - } - -public: // IBurnUserExperience - virtual STDMETHODIMP OnStartup() - { - return S_OK; - } - - virtual STDMETHODIMP_(int) OnShutdown() - { - return IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnSystemShutdown( - __in DWORD dwEndSession, - __in int /*nRecommendation*/ - ) - { - // Allow requests to shut down when critical or not applying. - if (ENDSESSION_CRITICAL & dwEndSession || !m_fApplying) - { - return IDOK; - } - - return IDCANCEL; - } - - virtual STDMETHODIMP_(int) OnDetectBegin( - __in BOOL /*fInstalled*/, - __in DWORD /*cPackages*/ - ) - { - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnDetectForwardCompatibleBundle( - __in_z LPCWSTR /*wzBundleId*/, - __in BOOTSTRAPPER_RELATION_TYPE /*relationType*/, - __in_z LPCWSTR /*wzBundleTag*/, - __in BOOL /*fPerMachine*/, - __in DWORD64 /*dw64Version*/, - __in int nRecommendation - ) - { - return CheckCanceled() ? IDCANCEL : nRecommendation; - } - - virtual STDMETHODIMP_(int) OnDetectUpdateBegin( - __in_z LPCWSTR /*wzUpdateLocation*/, - __in int nRecommendation - ) - { - return CheckCanceled() ? IDCANCEL : nRecommendation; - } - - virtual STDMETHODIMP_(void) OnDetectUpdateComplete( - __in HRESULT /*hrStatus*/, - __in_z_opt LPCWSTR /*wzUpdateLocation*/ - ) - { - } - - virtual STDMETHODIMP_(int) OnDetectPriorBundle( - __in_z LPCWSTR /*wzBundleId*/ - ) - { - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnDetectPackageBegin( - __in_z LPCWSTR /*wzPackageId*/ - ) - { - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnDetectRelatedBundle( - __in_z LPCWSTR /*wzBundleId*/, - __in BOOTSTRAPPER_RELATION_TYPE /*relationType*/, - __in_z LPCWSTR /*wzBundleTag*/, - __in BOOL /*fPerMachine*/, - __in DWORD64 /*dw64Version*/, - __in BOOTSTRAPPER_RELATED_OPERATION /*operation*/ - ) - { - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnDetectRelatedMsiPackage( - __in_z LPCWSTR /*wzPackageId*/, - __in_z LPCWSTR /*wzProductCode*/, - __in BOOL /*fPerMachine*/, - __in DWORD64 /*dw64Version*/, - __in BOOTSTRAPPER_RELATED_OPERATION /*operation*/ - ) - { - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnDetectTargetMsiPackage( - __in_z LPCWSTR /*wzPackageId*/, - __in_z LPCWSTR /*wzProductCode*/, - __in BOOTSTRAPPER_PACKAGE_STATE /*patchState*/ - ) - { - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnDetectMsiFeature( - __in_z LPCWSTR /*wzPackageId*/, - __in_z LPCWSTR /*wzFeatureId*/, - __in BOOTSTRAPPER_FEATURE_STATE /*state*/ - ) - { - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(void) OnDetectPackageComplete( - __in_z LPCWSTR /*wzPackageId*/, - __in HRESULT /*hrStatus*/, - __in BOOTSTRAPPER_PACKAGE_STATE /*state*/ - ) - { - } - - virtual STDMETHODIMP_(void) OnDetectComplete( - __in HRESULT /*hrStatus*/ - ) - { - } - - virtual STDMETHODIMP_(int) OnPlanBegin( - __in DWORD /*cPackages*/ - ) - { - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnPlanRelatedBundle( - __in_z LPCWSTR /*wzBundleId*/, - __inout BOOTSTRAPPER_REQUEST_STATE* /*pRequestedState*/ - ) - { - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnPlanPackageBegin( - __in_z LPCWSTR /*wzPackageId*/, - __inout BOOTSTRAPPER_REQUEST_STATE* /*pRequestState*/ - ) - { - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnPlanTargetMsiPackage( - __in_z LPCWSTR /*wzPackageId*/, - __in_z LPCWSTR /*wzProductCode*/, - __inout BOOTSTRAPPER_REQUEST_STATE* /*pRequestedState*/ - ) - { - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnPlanMsiFeature( - __in_z LPCWSTR /*wzPackageId*/, - __in_z LPCWSTR /*wzFeatureId*/, - __inout BOOTSTRAPPER_FEATURE_STATE* /*pRequestedState*/ - ) - { - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(void) OnPlanPackageComplete( - __in_z LPCWSTR /*wzPackageId*/, - __in HRESULT /*hrStatus*/, - __in BOOTSTRAPPER_PACKAGE_STATE /*state*/, - __in BOOTSTRAPPER_REQUEST_STATE /*requested*/, - __in BOOTSTRAPPER_ACTION_STATE /*execute*/, - __in BOOTSTRAPPER_ACTION_STATE /*rollback*/ - ) - { - } - - virtual STDMETHODIMP_(void) OnPlanComplete( - __in HRESULT /*hrStatus*/ - ) - { - } - - virtual STDMETHODIMP_(int) OnApplyBegin() - { - m_fApplying = TRUE; - - m_dwProgressPercentage = 0; - m_dwOverallProgressPercentage = 0; - - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnElevate() - { - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnRegisterBegin() - { - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(void) OnRegisterComplete( - __in HRESULT /*hrStatus*/ - ) - { - return; - } - - virtual STDMETHODIMP_(void) OnUnregisterBegin() - { - return; - } - - virtual STDMETHODIMP_(void) OnUnregisterComplete( - __in HRESULT /*hrStatus*/ - ) - { - return; - } - - virtual STDMETHODIMP_(int) OnApplyComplete( - __in HRESULT /*hrStatus*/, - __in BOOTSTRAPPER_APPLY_RESTART restart - ) - { - m_fApplying = FALSE; - return BOOTSTRAPPER_APPLY_RESTART_REQUIRED == restart ? IDRESTART : CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnCacheBegin() - { - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnCachePackageBegin( - __in_z LPCWSTR /*wzPackageId*/, - __in DWORD /*cCachePayloads*/, - __in DWORD64 /*dw64PackageCacheSize*/ - ) - { - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnCacheAcquireBegin( - __in_z LPCWSTR wzPackageOrContainerId, - __in_z_opt LPCWSTR wzPayloadId, - __in BOOTSTRAPPER_CACHE_OPERATION /*operation*/, - __in_z LPCWSTR /*wzSource*/ - ) - { - BalRetryStartPackage(BALRETRY_TYPE_CACHE, wzPackageOrContainerId, wzPayloadId); - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnCacheAcquireProgress( - __in_z LPCWSTR /*wzPackageOrContainerId*/, - __in_z_opt LPCWSTR /*wzPayloadId*/, - __in DWORD64 /*dw64Progress*/, - __in DWORD64 /*dw64Total*/, - __in DWORD /*dwOverallPercentage*/ - ) - { - HRESULT hr = S_OK; - int nResult = IDNOACTION; - - // Send progress even though we don't update the numbers to at least give the caller an opportunity - // to cancel. - if (BOOTSTRAPPER_DISPLAY_EMBEDDED == m_display) - { - hr = m_pEngine->SendEmbeddedProgress(m_dwProgressPercentage, m_dwOverallProgressPercentage, &nResult); - BalExitOnFailure(hr, "Failed to send embedded cache progress."); - } - - LExit: - return FAILED(hr) ? IDERROR : CheckCanceled() ? IDCANCEL : nResult; - } - - virtual STDMETHODIMP_(int) OnCacheAcquireComplete( - __in_z LPCWSTR wzPackageOrContainerId, - __in_z_opt LPCWSTR wzPayloadId, - __in HRESULT hrStatus, - __in int nRecommendation - ) - { - int nResult = CheckCanceled() ? IDCANCEL : BalRetryEndPackage(BALRETRY_TYPE_CACHE, wzPackageOrContainerId, wzPayloadId, hrStatus); - return IDNOACTION == nResult ? nRecommendation : nResult; - } - - virtual STDMETHODIMP_(int) OnCacheVerifyBegin( - __in_z LPCWSTR /*wzPackageId*/, - __in_z LPCWSTR /*wzPayloadId*/ - ) - { - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnCacheVerifyComplete( - __in_z LPCWSTR /*wzPackageId*/, - __in_z LPCWSTR /*wzPayloadId*/, - __in HRESULT /*hrStatus*/, - __in int nRecommendation - ) - { - return CheckCanceled() ? IDCANCEL : nRecommendation; - } - - virtual STDMETHODIMP_(int) OnCachePackageComplete( - __in_z LPCWSTR /*wzPackageId*/, - __in HRESULT /*hrStatus*/, - __in int nRecommendation - ) - { - return CheckCanceled() ? IDCANCEL : nRecommendation; - } - - virtual STDMETHODIMP_(void) OnCacheComplete( - __in HRESULT /*hrStatus*/ - ) - { - } - - virtual STDMETHODIMP_(int) OnExecuteBegin( - __in DWORD /*cExecutingPackages*/ - ) - { - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnExecutePackageBegin( - __in_z LPCWSTR wzPackageId, - __in BOOL fExecute - ) - { - // Only track retry on execution (not rollback). - if (fExecute) - { - BalRetryStartPackage(BALRETRY_TYPE_EXECUTE, wzPackageId, NULL); - } - - m_fRollingBack = !fExecute; - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnExecutePatchTarget( - __in_z LPCWSTR /*wzPackageId*/, - __in_z LPCWSTR /*wzTargetProductCode*/ - ) - { - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnError( - __in BOOTSTRAPPER_ERROR_TYPE errorType, - __in_z LPCWSTR wzPackageId, - __in DWORD dwCode, - __in_z LPCWSTR /*wzError*/, - __in DWORD /*dwUIHint*/, - __in DWORD /*cData*/, - __in_ecount_z_opt(cData) LPCWSTR* /*rgwzData*/, - __in int nRecommendation - ) - { - BalRetryErrorOccurred(wzPackageId, dwCode); - - if (BOOTSTRAPPER_DISPLAY_FULL == m_display) - { - if (BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_SERVER == errorType ||BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_PROXY == errorType) - { - nRecommendation = IDTRYAGAIN; - } - } - - return CheckCanceled() ? IDCANCEL : nRecommendation; - } - - virtual STDMETHODIMP_(int) OnProgress( - __in DWORD dwProgressPercentage, - __in DWORD dwOverallProgressPercentage - ) - { - HRESULT hr = S_OK; - int nResult = IDNOACTION; - - m_dwProgressPercentage = dwProgressPercentage; - m_dwOverallProgressPercentage = dwOverallProgressPercentage; - - if (BOOTSTRAPPER_DISPLAY_EMBEDDED == m_display) - { - hr = m_pEngine->SendEmbeddedProgress(m_dwProgressPercentage, m_dwOverallProgressPercentage, &nResult); - BalExitOnFailure(hr, "Failed to send embedded overall progress."); - } - - LExit: - return FAILED(hr) ? IDERROR : CheckCanceled() ? IDCANCEL : nResult; - } - - virtual STDMETHODIMP_(int) OnDownloadPayloadBegin( - __in_z LPCWSTR /*wzPayloadId*/, - __in_z LPCWSTR /*wzPayloadFileName*/ - ) - { - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnDownloadPayloadComplete( - __in_z LPCWSTR /*wzPayloadId*/, - __in_z LPCWSTR /*wzPayloadFileName*/, - __in HRESULT /*hrStatus*/ - ) - { - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnExecuteProgress( - __in_z LPCWSTR /*wzPackageId*/, - __in DWORD /*dwProgressPercentage*/, - __in DWORD /*dwOverallProgressPercentage*/ - ) - { - HRESULT hr = S_OK; - int nResult = IDNOACTION; - - // Send progress even though we don't update the numbers to at least give the caller an opportunity - // to cancel. - if (BOOTSTRAPPER_DISPLAY_EMBEDDED == m_display) - { - hr = m_pEngine->SendEmbeddedProgress(m_dwProgressPercentage, m_dwOverallProgressPercentage, &nResult); - BalExitOnFailure(hr, "Failed to send embedded execute progress."); - } - - LExit: - return FAILED(hr) ? IDERROR : CheckCanceled() ? IDCANCEL : nResult; - } - - virtual STDMETHODIMP_(int) OnExecuteMsiMessage( - __in_z LPCWSTR /*wzPackageId*/, - __in INSTALLMESSAGE /*mt*/, - __in UINT /*uiFlags*/, - __in_z LPCWSTR /*wzMessage*/, - __in DWORD /*cData*/, - __in_ecount_z_opt(cData) LPCWSTR* /*rgwzData*/, - __in int nRecommendation - ) - { - return CheckCanceled() ? IDCANCEL : nRecommendation; - } - - virtual STDMETHODIMP_(int) OnExecuteFilesInUse( - __in_z LPCWSTR /*wzPackageId*/, - __in DWORD /*cFiles*/, - __in_ecount_z(cFiles) LPCWSTR* /*rgwzFiles*/ - ) - { - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - - virtual STDMETHODIMP_(int) OnExecutePackageComplete( - __in_z LPCWSTR wzPackageId, - __in HRESULT hrExitCode, - __in BOOTSTRAPPER_APPLY_RESTART /*restart*/, - __in int nRecommendation - ) - { - int nResult = CheckCanceled() ? IDCANCEL : CheckCanceled() ? IDCANCEL : BalRetryEndPackage(BALRETRY_TYPE_EXECUTE, wzPackageId, NULL, hrExitCode); - return IDNOACTION == nResult ? nRecommendation : nResult; - } - - virtual STDMETHODIMP_(void) OnExecuteComplete( - __in HRESULT /*hrStatus*/ - ) - { - } - - virtual STDMETHODIMP_(int) OnResolveSource( - __in_z LPCWSTR /*wzPackageOrContainerId*/, - __in_z_opt LPCWSTR /*wzPayloadId*/, - __in_z LPCWSTR /*wzLocalSource*/, - __in_z_opt LPCWSTR /*wzDownloadSource*/ - ) - { - return CheckCanceled() ? IDCANCEL : IDNOACTION; - } - -protected: - // - // PromptCancel - prompts the user to close (if not forced). - // - virtual BOOL PromptCancel( - __in HWND hWnd, - __in BOOL fForceCancel, - __in_z LPCWSTR wzMessage, - __in_z LPCWSTR wzCaption - ) - { - ::EnterCriticalSection(&m_csCanceled); - - // Only prompt the user to close if we have not canceled already. - if (!m_fCanceled) - { - if (fForceCancel) - { - m_fCanceled = TRUE; - } - else - { - m_fCanceled = (IDYES == ::MessageBoxW(hWnd, wzMessage, wzCaption, MB_YESNO | MB_ICONEXCLAMATION)); - } - } - - ::LeaveCriticalSection(&m_csCanceled); - - return m_fCanceled; - } - - // - // CheckCanceled - waits if the cancel dialog is up and checks to see if the user canceled the operation. - // - BOOL CheckCanceled() - { - ::EnterCriticalSection(&m_csCanceled); - ::LeaveCriticalSection(&m_csCanceled); - return m_fRollingBack ? FALSE : m_fCanceled; - } - - BOOL IsRollingBack() - { - return m_fRollingBack; - } - - BOOL IsCanceled() - { - return m_fCanceled; - } - - CBalBaseBootstrapperApplication( - __in IBootstrapperEngine* pEngine, - __in const BOOTSTRAPPER_COMMAND* pCommand, - __in DWORD dwRetryCount = 0, - __in DWORD dwRetryTimeout = 1000 - ) - { - m_cReferences = 1; - m_display = pCommand->display; - m_restart = pCommand->restart; - - pEngine->AddRef(); - m_pEngine = pEngine; - - ::InitializeCriticalSection(&m_csCanceled); - m_fCanceled = FALSE; - m_fApplying = FALSE; - m_fRollingBack = FALSE; - - BalRetryInitialize(dwRetryCount, dwRetryTimeout); - } - - virtual ~CBalBaseBootstrapperApplication() - { - BalRetryUninitialize(); - ::DeleteCriticalSection(&m_csCanceled); - - ReleaseNullObject(m_pEngine); - } - -private: - long m_cReferences; - BOOTSTRAPPER_DISPLAY m_display; - BOOTSTRAPPER_RESTART m_restart; - IBootstrapperEngine* m_pEngine; - - CRITICAL_SECTION m_csCanceled; - BOOL m_fCanceled; - BOOL m_fApplying; - BOOL m_fRollingBack; - - DWORD m_dwProgressPercentage; - DWORD m_dwOverallProgressPercentage; -}; diff --git a/scripts/windows/installer/WiXSDK/inc/IBootstrapperApplication.h b/scripts/windows/installer/WiXSDK/inc/IBootstrapperApplication.h deleted file mode 100644 index f4ae288f16..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/IBootstrapperApplication.h +++ /dev/null @@ -1,704 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// IBootstrapperApplication implemented by a bootstrapper application and used by bootstrapper engine. -// -//------------------------------------------------------------------------------------------------- - -#pragma once - - -enum BOOTSTRAPPER_DISPLAY -{ - BOOTSTRAPPER_DISPLAY_UNKNOWN, - BOOTSTRAPPER_DISPLAY_EMBEDDED, - BOOTSTRAPPER_DISPLAY_NONE, - BOOTSTRAPPER_DISPLAY_PASSIVE, - BOOTSTRAPPER_DISPLAY_FULL, -}; - - -enum BOOTSTRAPPER_RESTART -{ - BOOTSTRAPPER_RESTART_UNKNOWN, - BOOTSTRAPPER_RESTART_NEVER, - BOOTSTRAPPER_RESTART_PROMPT, - BOOTSTRAPPER_RESTART_AUTOMATIC, - BOOTSTRAPPER_RESTART_ALWAYS, -}; - - -enum BOOTSTRAPPER_RESUME_TYPE -{ - BOOTSTRAPPER_RESUME_TYPE_NONE, - BOOTSTRAPPER_RESUME_TYPE_INVALID, // resume information is present but invalid - BOOTSTRAPPER_RESUME_TYPE_INTERRUPTED, // relaunched after an unexpected interruption - BOOTSTRAPPER_RESUME_TYPE_REBOOT_PENDING, // reboot has not taken place yet - BOOTSTRAPPER_RESUME_TYPE_REBOOT, // relaunched after reboot - BOOTSTRAPPER_RESUME_TYPE_SUSPEND, // relaunched after suspend - BOOTSTRAPPER_RESUME_TYPE_ARP, // launched from ARP -}; - - -enum BOOTSTRAPPER_ERROR_TYPE -{ - BOOTSTRAPPER_ERROR_TYPE_ELEVATE, // error occurred trying to elevate. - BOOTSTRAPPER_ERROR_TYPE_WINDOWS_INSTALLER, // error came from windows installer. - BOOTSTRAPPER_ERROR_TYPE_EXE_PACKAGE, // error came from an exe package. - BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_SERVER, // error occurred trying to authenticate with HTTP server. - BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_PROXY, // error occurred trying to authenticate with HTTP proxy. - BOOTSTRAPPER_ERROR_TYPE_APPLY, // error occurred during apply. -}; - - -enum BOOTSTRAPPER_RELATED_OPERATION -{ - BOOTSTRAPPER_RELATED_OPERATION_NONE, - BOOTSTRAPPER_RELATED_OPERATION_DOWNGRADE, - BOOTSTRAPPER_RELATED_OPERATION_MINOR_UPDATE, - BOOTSTRAPPER_RELATED_OPERATION_MAJOR_UPGRADE, - BOOTSTRAPPER_RELATED_OPERATION_REMOVE, - BOOTSTRAPPER_RELATED_OPERATION_INSTALL, - BOOTSTRAPPER_RELATED_OPERATION_REPAIR, -}; - - -enum BOOTSTRAPPER_CACHE_OPERATION -{ - BOOTSTRAPPER_CACHE_OPERATION_COPY, - BOOTSTRAPPER_CACHE_OPERATION_DOWNLOAD, - BOOTSTRAPPER_CACHE_OPERATION_EXTRACT, -}; - - -enum BOOTSTRAPPER_APPLY_RESTART -{ - BOOTSTRAPPER_APPLY_RESTART_NONE, - BOOTSTRAPPER_APPLY_RESTART_REQUIRED, - BOOTSTRAPPER_APPLY_RESTART_INITIATED, -}; - - -enum BOOTSTRAPPER_RELATION_TYPE -{ - BOOTSTRAPPER_RELATION_NONE, - BOOTSTRAPPER_RELATION_DETECT, - BOOTSTRAPPER_RELATION_UPGRADE, - BOOTSTRAPPER_RELATION_ADDON, - BOOTSTRAPPER_RELATION_PATCH, - BOOTSTRAPPER_RELATION_DEPENDENT, - BOOTSTRAPPER_RELATION_UPDATE, -}; - - -struct BOOTSTRAPPER_COMMAND -{ - BOOTSTRAPPER_ACTION action; - BOOTSTRAPPER_DISPLAY display; - BOOTSTRAPPER_RESTART restart; - - LPWSTR wzCommandLine; - int nCmdShow; - - BOOTSTRAPPER_RESUME_TYPE resumeType; - HWND hwndSplashScreen; - - // If this was run from a related bundle, specifies the relation type - BOOTSTRAPPER_RELATION_TYPE relationType; - BOOL fPassthrough; - - LPWSTR wzLayoutDirectory; -}; - - -DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-AB06-099D717C67FE") -{ - // OnStartup - called when the engine is ready for the bootstrapper application to start. - // - STDMETHOD(OnStartup)() = 0; - - // OnShutdown - called after the bootstrapper application quits the engine. - // - // Return: - // IDRESTART instructs the engine to restart. The engine will not launch again after the machine - // is rebooted. Ignored if reboot was already initiated by OnExecutePackageComplete(). - // - // IDRELOAD_BOOTSTRAPPER instructs the engine to unload the bootstrapper application and restart - // the engine which will load the bootstrapper application again. Typically - // used to switch from a native bootstrapper application to a managed one. - // - // All other return codes are ignored. - STDMETHOD_(int, OnShutdown)() = 0; - - // OnSystemShutdown - called when the operating system is instructed to shutdown the machine. - // - // Return: - // IDCANCEL instructs the engine to block the shutdown of the machine. - // - // All other return codes allow the shutdown to commence. - STDMETHOD_(int, OnSystemShutdown)( - __in DWORD dwEndSession, - __in int nRecommendation - ) = 0; - - // OnDetectBegin - called when the engine begins detection. - // - // Return: - // IDCANCEL instructs the engine to stop detection. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnDetectBegin)( - __in BOOL fInstalled, - __in DWORD cPackages - ) = 0; - - // OnDetectForwardCompatibleBundle - called when the engine detects a forward compatible bundle. - // - // Return: - // IDOK instructs the engine to use the forward compatible bundle. - // - // IDCANCEL instructs the engine to stop detection. - // - // IDNOACTION instructs the engine to not use the forward compatible bundle. - STDMETHOD_(int, OnDetectForwardCompatibleBundle)( - __in_z LPCWSTR wzBundleId, - __in BOOTSTRAPPER_RELATION_TYPE relationType, - __in_z LPCWSTR wzBundleTag, - __in BOOL fPerMachine, - __in DWORD64 dw64Version, - __in int nRecommendation - ) = 0; - - // OnDetectUpdateBegin - called when the engine begins detection for bundle update. - // - // Return: - // IDOK instructs the engine to attempt update detection. - // - // IDCANCEL instructs the engine to stop detection. - // - // IDNOACTION instructs the engine to skip update detection. - STDMETHOD_(int, OnDetectUpdateBegin)( - __in_z LPCWSTR wzUpdateLocation, - __in int nRecommendation - ) = 0; - - // OnDetectUpdateComplete - called when the engine completes detection for bundle update. - // - // Remarks: - // wzUpdateLocation is null if no update was available. - STDMETHOD_(void, OnDetectUpdateComplete)( - __in HRESULT hrStatus, - __in_z_opt LPCWSTR wzUpdateLocation - ) = 0; - - // OnDetectRelatedBundle - called when the engine detects a related bundle. - // - // Return: - // IDCANCEL instructs the engine to stop detection. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnDetectRelatedBundle)( - __in_z LPCWSTR wzBundleId, - __in BOOTSTRAPPER_RELATION_TYPE relationType, - __in_z LPCWSTR wzBundleTag, - __in BOOL fPerMachine, - __in DWORD64 dw64Version, - __in BOOTSTRAPPER_RELATED_OPERATION operation - ) = 0; - - // OnDetectPackageBegin - called when the engine begins detecting a package. - // - // Return: - // IDCANCEL instructs the engine to stop detection. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnDetectPackageBegin)( - __in_z LPCWSTR wzPackageId - ) = 0; - - // OnDetectRelatedMsiPackage - called when the engine begins detects a related package. - // - // Return: - // IDCANCEL instructs the engine to stop detection. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnDetectRelatedMsiPackage)( - __in_z LPCWSTR wzPackageId, - __in_z LPCWSTR wzProductCode, - __in BOOL fPerMachine, - __in DWORD64 dw64Version, - __in BOOTSTRAPPER_RELATED_OPERATION operation - ) = 0; - - // OnDetectTargetMsiPackage - called when the engine detects a target MSI package for - // an MSP package. - // - // Return: - // IDCANCEL instructs the engine to stop detection. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnDetectTargetMsiPackage)( - __in_z LPCWSTR wzPackageId, - __in_z LPCWSTR wzProductCode, - __in BOOTSTRAPPER_PACKAGE_STATE patchState - ) = 0; - - // OnDetectMsiFeature - called when the engine detects a feature in an MSI package. - // - // Return: - // IDCANCEL instructs the engine to stop detection. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnDetectMsiFeature)( - __in_z LPCWSTR wzPackageId, - __in_z LPCWSTR wzFeatureId, - __in BOOTSTRAPPER_FEATURE_STATE state - ) = 0; - - // OnDetectPackageComplete - called after the engine detects a package. - // - STDMETHOD_(void, OnDetectPackageComplete)( - __in_z LPCWSTR wzPackageId, - __in HRESULT hrStatus, - __in BOOTSTRAPPER_PACKAGE_STATE state - ) = 0; - - // OnDetectPackageComplete - called after the engine completes detection. - // - STDMETHOD_(void, OnDetectComplete)( - __in HRESULT hrStatus - ) = 0; - - // OnPlanBegin - called when the engine begins planning. - // - // Return: - // IDCANCEL instructs the engine to stop planning. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnPlanBegin)( - __in DWORD cPackages - ) = 0; - - // OnPlanRelatedBundle - called when the engine begins planning a related bundle. - // - // Return: - // IDCANCEL instructs the engine to stop planning. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnPlanRelatedBundle)( - __in_z LPCWSTR wzBundleId, - __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState - ) = 0; - - // OnPlanPackageBegin - called when the engine begins planning a package. - // - // Return: - // IDCANCEL instructs the engine to stop planning. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnPlanPackageBegin)( - __in_z LPCWSTR wzPackageId, - __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState - ) = 0; - - // OnPlanTargetMsiPackage - called when the engine plans an MSP package - // to apply to an MSI package. - // - // Return: - // IDCANCEL instructs the engine to stop planning. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnPlanTargetMsiPackage)( - __in_z LPCWSTR wzPackageId, - __in_z LPCWSTR wzProductCode, - __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState - ) = 0; - - // OnPlanMsiFeature - called when the engine plans a feature in an - // MSI package. - // - // Return: - // IDCANCEL instructs the engine to stop planning. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnPlanMsiFeature)( - __in_z LPCWSTR wzPackageId, - __in_z LPCWSTR wzFeatureId, - __inout BOOTSTRAPPER_FEATURE_STATE* pRequestedState - ) = 0; - - // OnPlanPackageComplete - called after the engine plans a package. - // - STDMETHOD_(void, OnPlanPackageComplete)( - __in_z LPCWSTR wzPackageId, - __in HRESULT hrStatus, - __in BOOTSTRAPPER_PACKAGE_STATE state, - __in BOOTSTRAPPER_REQUEST_STATE requested, - __in BOOTSTRAPPER_ACTION_STATE execute, - __in BOOTSTRAPPER_ACTION_STATE rollback - ) = 0; - - // OnPlanComplete - called when the engine completes planning. - // - STDMETHOD_(void, OnPlanComplete)( - __in HRESULT hrStatus - ) = 0; - - // OnApplyBegin - called when the engine begins applying the plan. - // - // Return: - // IDCANCEL instructs the engine to stop applying. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnApplyBegin)() = 0; - - // OnElevate - called before the engine displays an elevation prompt. - // Will only happen once per execution of the engine. - // - // Return: - // IDCANCEL instructs the engine to abort elevation and stop applying. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnElevate)() = 0; - - // OnProgress - called when the engine makes progress. - // - // Return: - // IDCANCEL instructs the engine to stop applying. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnProgress)( - __in DWORD dwProgressPercentage, - __in DWORD dwOverallPercentage - ) = 0; - - // OnError - called when the engine encounters an error. - // - // Return: - // uiFlags is a combination of valid ID* return values appropriate for - // the error. - // - // IDNOACTION instructs the engine to pass the error through to default - // handling which usually results in the apply failing. - STDMETHOD_(int, OnError)( - __in BOOTSTRAPPER_ERROR_TYPE errorType, - __in_z_opt LPCWSTR wzPackageId, - __in DWORD dwCode, - __in_z_opt LPCWSTR wzError, - __in DWORD uiFlags, - __in DWORD cData, - __in_ecount_z_opt(cData) LPCWSTR* rgwzData, - __in int nRecommendation - ) = 0; - - // OnRegisterBegin - called when the engine registers the bundle. - // - // Return: - // IDCANCEL instructs the engine to stop applying. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnRegisterBegin)() = 0; - - // OnRegisterComplete - called when the engine registration is - // complete. - // - STDMETHOD_(void, OnRegisterComplete)( - __in HRESULT hrStatus - ) = 0; - - // OnCacheBegin - called when the engine begins caching. - // - // Return: - // IDCANCEL instructs the engine to stop caching. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnCacheBegin)() = 0; - - // OnCachePackageBegin - called when the engine begins caching - // a package. - // - // Return: - // IDCANCEL instructs the engine to stop caching. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnCachePackageBegin)( - __in_z LPCWSTR wzPackageId, - __in DWORD cCachePayloads, - __in DWORD64 dw64PackageCacheSize - ) = 0; - - // OnCacheAcquireBegin - called when the engine begins copying or - // downloading a payload to the working folder. - // - // Return: - // IDCANCEL instructs the engine to stop caching. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnCacheAcquireBegin)( - __in_z_opt LPCWSTR wzPackageOrContainerId, - __in_z_opt LPCWSTR wzPayloadId, - __in BOOTSTRAPPER_CACHE_OPERATION operation, - __in_z LPCWSTR wzSource - ) = 0; - - // OnCacheAcquireProgress - called when the engine makes progresss copying - // or downloading a payload to the working folder. - // - // Return: - // IDCANCEL instructs the engine to stop caching. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnCacheAcquireProgress)( - __in_z_opt LPCWSTR wzPackageOrContainerId, - __in_z_opt LPCWSTR wzPayloadId, - __in DWORD64 dw64Progress, - __in DWORD64 dw64Total, - __in DWORD dwOverallPercentage - ) = 0; - - // OnResolveSource - called when a payload or container cannot be found locally. - // - // Parameters: - // wzPayloadId will be NULL when resolving a container. - // wzDownloadSource will be NULL if the container or payload does not provide a DownloadURL. - // - // Return: - // IDRETRY instructs the engine to try the local source again. - // - // IDDOWNLOAD instructs the engine to try the download source. - // - // All other return codes result in an error. - // - // Notes: - // It is expected the BA may call IBurnCore::SetLocalSource() or IBurnCore::SetDownloadSource() - // to update the source location before returning IDRETRY or IDDOWNLOAD. - STDMETHOD_(int, OnResolveSource)( - __in_z LPCWSTR wzPackageOrContainerId, - __in_z_opt LPCWSTR wzPayloadId, - __in_z LPCWSTR wzLocalSource, - __in_z_opt LPCWSTR wzDownloadSource - ) = 0; - - // OnCacheAcquireComplete - called after the engine copied or downloaded - // a payload to the working folder. - // - // Return: - // IDRETRY instructs the engine to try the copy or download of the payload again. - // - // All other return codes are ignored. - STDMETHOD_(int, OnCacheAcquireComplete)( - __in_z_opt LPCWSTR wzPackageOrContainerId, - __in_z_opt LPCWSTR wzPayloadId, - __in HRESULT hrStatus, - __in int nRecommendation - ) = 0; - - // OnCacheVerifyBegin - called when the engine begins to verify then copy - // a payload or container to the package cache folder. - // - // Return: - // IDCANCEL instructs the engine to stop caching. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnCacheVerifyBegin)( - __in_z_opt LPCWSTR wzPackageOrContainerId, - __in_z_opt LPCWSTR wzPayloadId - ) = 0; - - // OnCacheVerifyComplete - called after the engine verifies and copies - // a payload or container to the package cache folder. - // - // Return: - // IDRETRY instructs the engine to try the verification of the payload again. - // Ignored if hrStatus is success. - // - // IDTRYAGAIN instructs the engine to acquire the payload again. Ignored if - // hrStatus is success. - // - // All other return codes are ignored. - STDMETHOD_(int, OnCacheVerifyComplete)( - __in_z_opt LPCWSTR wzPackageOrContainerId, - __in_z_opt LPCWSTR wzPayloadId, - __in HRESULT hrStatus, - __in int nRecommendation - ) = 0; - - // OnCachePackageComplete - called after the engine attempts to copy or download all - // payloads of a package into the package cache folder. - // - // Return: - // IDIGNORE instructs the engine to ignore non-vital package failures and continue with the - // caching. Ignored if hrStatus is a success or the package is vital. - // - // IDRETRY instructs the engine to try the acquisition and verification of the package - // again. Ignored if hrStatus is a success. - // - // All other return codes are ignored. - STDMETHOD_(int, OnCachePackageComplete)( - __in_z LPCWSTR wzPackageId, - __in HRESULT hrStatus, - __in int nRecommendation - ) = 0; - - // OnCacheComplete - called when the engine caching is complete. - // - STDMETHOD_(void, OnCacheComplete)( - __in HRESULT hrStatus - ) = 0; - - // OnExecuteBegin - called when the engine begins executing the plan. - // - // Return: - // IDCANCEL instructs the engine to stop applying. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnExecuteBegin)( - __in DWORD cExecutingPackages - ) = 0; - - // OnExecuteBegin - called when the engine begins executing a package. - // - // Return: - // IDCANCEL instructs the engine to stop applying. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnExecutePackageBegin)( - __in_z LPCWSTR wzPackageId, - __in BOOL fExecute - ) = 0; - - // OnExecutePatchTarget - called when the engine executes one or more patches targeting - // a product. - // - // Return: - // IDCANCEL instructs the engine to stop applying. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnExecutePatchTarget)( - __in_z LPCWSTR wzPackageId, - __in_z LPCWSTR wzTargetProductCode - ) = 0; - - // OnExecuteProgress - called when the engine makes progress executing a package. - // - // Return: - // IDCANCEL instructs the engine to stop applying. - // - // IDNOACTION instructs the engine to continue. - STDMETHOD_(int, OnExecuteProgress)( - __in_z LPCWSTR wzPackageId, - __in DWORD dwProgressPercentage, - __in DWORD dwOverallPercentage - ) = 0; - - // OnExecuteMsiMessage - called when the engine receives an MSI package message. - // - // Return: - // uiFlags is a combination of valid ID* return values appropriate for - // the message. - // - // IDNOACTION instructs the engine to pass the message through to default - // handling which usually results in the execution continuing. - STDMETHOD_(int, OnExecuteMsiMessage)( - __in_z LPCWSTR wzPackageId, - __in INSTALLMESSAGE mt, - __in UINT uiFlags, - __in_z LPCWSTR wzMessage, - __in DWORD cData, - __in_ecount_z_opt(cData) LPCWSTR* rgwzData, - __in int nRecommendation - ) = 0; - - // OnExecuteFilesInUse - called when the engine encounters files in use while - // executing a package. - // - // Return: - // IDOK instructs the engine to let the Restart Manager attempt to close the - // applications to avoid a restart. - // - // IDCANCEL instructs the engine to abort the execution and start rollback. - // - // IDIGNORE instructs the engine to ignore the running applications. A restart will be - // required. - // - // IDRETRY instructs the engine to check if the applications are still running again. - // - // IDNOACTION is equivalent to ignoring the running applications. A restart will be - // required. - STDMETHOD_(int, OnExecuteFilesInUse)( - __in_z LPCWSTR wzPackageId, - __in DWORD cFiles, - __in_ecount_z(cFiles) LPCWSTR* rgwzFiles - ) = 0; - - // OnExecutePackageComplete - called when a package execution is complete. - // - // Parameters: - // restart will indicate whether this package requires a reboot or initiated the reboot already. - // - // Return: - // IDIGNORE instructs the engine to ignore non-vital package failures and continue with the - // install. Ignored if hrStatus is a success or the package is vital. - // - // IDRETRY instructs the engine to try the execution of the package again. Ignored if hrStatus - // is a success. - // - // IDRESTART instructs the engine to stop processing the chain and restart. The engine will - // launch again after the machine is restarted. - // - // IDSUSPEND instructs the engine to stop processing the chain and suspend the current state. - // - // All other return codes are ignored. - STDMETHOD_(int, OnExecutePackageComplete)( - __in_z LPCWSTR wzPackageId, - __in HRESULT hrStatus, - __in BOOTSTRAPPER_APPLY_RESTART restart, - __in int nRecommendation - ) = 0; - - // OnExecuteComplete - called when the engine execution is complete. - // - STDMETHOD_(void, OnExecuteComplete)( - __in HRESULT hrStatus - ) = 0; - - // OnUnregisterBegin - called when the engine unregisters the bundle. - // - STDMETHOD_(void, OnUnregisterBegin)() = 0; - - // OnUnregisterComplete - called when the engine unregistration is complete. - // - STDMETHOD_(void, OnUnregisterComplete)( - __in HRESULT hrStatus - ) = 0; - - // OnApplyComplete - called after the plan has been applied. - // - // Parameters: - // restart will indicate whether any package required a reboot or initiated the reboot already. - // - // Return: - // IDRESTART instructs the engine to restart. The engine will not launch again after the machine - // is rebooted. Ignored if reboot was already initiated by OnExecutePackageComplete(). - // - // All other return codes are ignored. - STDMETHOD_(int, OnApplyComplete)( - __in HRESULT hrStatus, - __in BOOTSTRAPPER_APPLY_RESTART restart - ) = 0; -}; - - -extern "C" typedef HRESULT (WINAPI *PFN_BOOTSTRAPPER_APPLICATION_CREATE)( - __in IBootstrapperEngine* pEngine, - __in const BOOTSTRAPPER_COMMAND* pCommand, - __out IBootstrapperApplication** ppApplication - ); - -extern "C" typedef void (WINAPI *PFN_BOOTSTRAPPER_APPLICATION_DESTROY)(); diff --git a/scripts/windows/installer/WiXSDK/inc/IBootstrapperBAFunction.h b/scripts/windows/installer/WiXSDK/inc/IBootstrapperBAFunction.h deleted file mode 100644 index c0c9b3b94f..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/IBootstrapperBAFunction.h +++ /dev/null @@ -1,29 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -//------------------------------------------------------------------------------------------------- - -#pragma once - -#include - -#include "IBootstrapperEngine.h" - -interface IBootstrapperBAFunction -{ - STDMETHOD(OnDetect)() = 0; - STDMETHOD(OnDetectComplete)() = 0; - STDMETHOD(OnPlan)() = 0; - STDMETHOD(OnPlanComplete)() = 0; -}; - -extern "C" typedef HRESULT (WINAPI *PFN_BOOTSTRAPPER_BA_FUNCTION_CREATE)( - __in IBootstrapperEngine* pEngine, - __in HMODULE hModule, - __out IBootstrapperBAFunction** ppBAFunction - ); - diff --git a/scripts/windows/installer/WiXSDK/inc/IBootstrapperEngine.h b/scripts/windows/installer/WiXSDK/inc/IBootstrapperEngine.h deleted file mode 100644 index 604d4b9781..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/IBootstrapperEngine.h +++ /dev/null @@ -1,220 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// IBoostrapperEngine implemented by engine and used by bootstrapper application. -// -//------------------------------------------------------------------------------------------------- - -#pragma once - -#define IDERROR -1 -#define IDNOACTION 0 - -#define IDDOWNLOAD 101 // Only valid as a return code from OnResolveSource() to instruct the engine to use the download source. -#define IDRESTART 102 -#define IDSUSPEND 103 -#define IDRELOAD_BOOTSTRAPPER 104 - -enum BOOTSTRAPPER_ACTION -{ - BOOTSTRAPPER_ACTION_UNKNOWN, - BOOTSTRAPPER_ACTION_HELP, - BOOTSTRAPPER_ACTION_LAYOUT, - BOOTSTRAPPER_ACTION_UNINSTALL, - BOOTSTRAPPER_ACTION_INSTALL, - BOOTSTRAPPER_ACTION_MODIFY, - BOOTSTRAPPER_ACTION_REPAIR, - BOOTSTRAPPER_ACTION_UPDATE_REPLACE, - BOOTSTRAPPER_ACTION_UPDATE_REPLACE_EMBEDDED, -}; - -enum BOOTSTRAPPER_ACTION_STATE -{ - BOOTSTRAPPER_ACTION_STATE_NONE, - BOOTSTRAPPER_ACTION_STATE_UNINSTALL, - BOOTSTRAPPER_ACTION_STATE_INSTALL, - BOOTSTRAPPER_ACTION_STATE_ADMIN_INSTALL, - BOOTSTRAPPER_ACTION_STATE_MODIFY, - BOOTSTRAPPER_ACTION_STATE_REPAIR, - BOOTSTRAPPER_ACTION_STATE_MINOR_UPGRADE, - BOOTSTRAPPER_ACTION_STATE_MAJOR_UPGRADE, - BOOTSTRAPPER_ACTION_STATE_PATCH, -}; - -enum BOOTSTRAPPER_PACKAGE_STATE -{ - BOOTSTRAPPER_PACKAGE_STATE_UNKNOWN, - BOOTSTRAPPER_PACKAGE_STATE_OBSOLETE, - BOOTSTRAPPER_PACKAGE_STATE_ABSENT, - BOOTSTRAPPER_PACKAGE_STATE_CACHED, - BOOTSTRAPPER_PACKAGE_STATE_PRESENT, - BOOTSTRAPPER_PACKAGE_STATE_SUPERSEDED, -}; - -enum BOOTSTRAPPER_REQUEST_STATE -{ - BOOTSTRAPPER_REQUEST_STATE_NONE, - BOOTSTRAPPER_REQUEST_STATE_FORCE_ABSENT, - BOOTSTRAPPER_REQUEST_STATE_ABSENT, - BOOTSTRAPPER_REQUEST_STATE_CACHE, - BOOTSTRAPPER_REQUEST_STATE_PRESENT, - BOOTSTRAPPER_REQUEST_STATE_REPAIR, -}; - -enum BOOTSTRAPPER_FEATURE_STATE -{ - BOOTSTRAPPER_FEATURE_STATE_UNKNOWN, - BOOTSTRAPPER_FEATURE_STATE_ABSENT, - BOOTSTRAPPER_FEATURE_STATE_ADVERTISED, - BOOTSTRAPPER_FEATURE_STATE_LOCAL, - BOOTSTRAPPER_FEATURE_STATE_SOURCE, -}; - -enum BOOTSTRAPPER_FEATURE_ACTION -{ - BOOTSTRAPPER_FEATURE_ACTION_NONE, - BOOTSTRAPPER_FEATURE_ACTION_ADDLOCAL, - BOOTSTRAPPER_FEATURE_ACTION_ADDSOURCE, - BOOTSTRAPPER_FEATURE_ACTION_ADDDEFAULT, - BOOTSTRAPPER_FEATURE_ACTION_REINSTALL, - BOOTSTRAPPER_FEATURE_ACTION_ADVERTISE, - BOOTSTRAPPER_FEATURE_ACTION_REMOVE, -}; - -enum BOOTSTRAPPER_LOG_LEVEL -{ - BOOTSTRAPPER_LOG_LEVEL_NONE, // turns off report (only valid for XXXSetLevel()) - BOOTSTRAPPER_LOG_LEVEL_STANDARD, // written if reporting is on - BOOTSTRAPPER_LOG_LEVEL_VERBOSE, // written only if verbose reporting is on - BOOTSTRAPPER_LOG_LEVEL_DEBUG, // reporting useful when debugging code - BOOTSTRAPPER_LOG_LEVEL_ERROR, // always gets reported, but can never be specified -}; - -enum BOOTSTRAPPER_UPDATE_HASH_TYPE -{ - BOOTSTRAPPER_UPDATE_HASH_TYPE_NONE, - BOOTSTRAPPER_UPDATE_HASH_TYPE_SHA1, -}; - - -DECLARE_INTERFACE_IID_(IBootstrapperEngine, IUnknown, "6480D616-27A0-44D7-905B-81512C29C2FB") -{ - STDMETHOD(GetPackageCount)( - __out DWORD* pcPackages - ) = 0; - - STDMETHOD(GetVariableNumeric)( - __in_z LPCWSTR wzVariable, - __out LONGLONG* pllValue - ) = 0; - - STDMETHOD(GetVariableString)( - __in_z LPCWSTR wzVariable, - __out_ecount_opt(*pcchValue) LPWSTR wzValue, - __inout DWORD* pcchValue - ) = 0; - - STDMETHOD(GetVariableVersion)( - __in_z LPCWSTR wzVariable, - __out DWORD64* pqwValue - ) = 0; - - STDMETHOD(FormatString)( - __in_z LPCWSTR wzIn, - __out_ecount_opt(*pcchOut) LPWSTR wzOut, - __inout DWORD* pcchOut - ) = 0; - - STDMETHOD(EscapeString)( - __in_z LPCWSTR wzIn, - __out_ecount_opt(*pcchOut) LPWSTR wzOut, - __inout DWORD* pcchOut - ) = 0; - - STDMETHOD(EvaluateCondition)( - __in_z LPCWSTR wzCondition, - __out BOOL* pf - ) = 0; - - STDMETHOD(Log)( - __in BOOTSTRAPPER_LOG_LEVEL level, - __in_z LPCWSTR wzMessage - ) = 0; - - STDMETHOD(SendEmbeddedError)( - __in DWORD dwErrorCode, - __in_z_opt LPCWSTR wzMessage, - __in DWORD dwUIHint, - __out int* pnResult - ) = 0; - - STDMETHOD(SendEmbeddedProgress)( - __in DWORD dwProgressPercentage, - __in DWORD dwOverallProgressPercentage, - __out int* pnResult - ) = 0; - - STDMETHOD(SetUpdate)( - __in_z_opt LPCWSTR wzLocalSource, - __in_z_opt LPCWSTR wzDownloadSource, - __in DWORD64 qwSize, - __in BOOTSTRAPPER_UPDATE_HASH_TYPE hashType, - __in_bcount_opt(cbHash) BYTE* rgbHash, - __in DWORD cbHash - ) = 0; - - STDMETHOD(SetLocalSource)( - __in_z LPCWSTR wzPackageOrContainerId, - __in_z_opt LPCWSTR wzPayloadId, - __in_z LPCWSTR wzPath - ) = 0; - - STDMETHOD(SetDownloadSource)( - __in_z LPCWSTR wzPackageOrContainerId, - __in_z_opt LPCWSTR wzPayloadId, - __in_z LPCWSTR wzUrl, - __in_z_opt LPWSTR wzUser, - __in_z_opt LPWSTR wzPassword - ) = 0; - - STDMETHOD(SetVariableNumeric)( - __in_z LPCWSTR wzVariable, - __in LONGLONG llValue - ) = 0; - - STDMETHOD(SetVariableString)( - __in_z LPCWSTR wzVariable, - __in_z_opt LPCWSTR wzValue - ) = 0; - - STDMETHOD(SetVariableVersion)( - __in_z LPCWSTR wzVariable, - __in DWORD64 qwValue - ) = 0; - - STDMETHOD(CloseSplashScreen)() = 0; - - STDMETHOD(Detect)() = 0; - - STDMETHOD(Plan)( - __in BOOTSTRAPPER_ACTION action - ) = 0; - - STDMETHOD(Elevate)( - __in_opt HWND hwndParent - ) = 0; - - STDMETHOD(Apply)( - __in_opt HWND hwndParent - ) = 0; - - STDMETHOD(Quit)( - __in DWORD dwExitCode - ) = 0; -}; diff --git a/scripts/windows/installer/WiXSDK/inc/aclutil.h b/scripts/windows/installer/WiXSDK/inc/aclutil.h deleted file mode 100644 index ee688ec328..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/aclutil.h +++ /dev/null @@ -1,151 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Access Control List helper functions. -// -//------------------------------------------------------------------------------------------------- - -#include -#include - -#define ReleaseSid(x) if (x) { AclFreeSid(x); } -#define ReleaseNullSid(x) if (x) { AclFreeSid(x); x = NULL; } - -#ifdef __cplusplus -extern "C" { -#endif - -// structs -struct ACL_ACCESS -{ - BOOL fDenyAccess; - DWORD dwAccessMask; - - // TODO: consider using a union - LPCWSTR pwzAccountName; // NOTE: the last three items in this structure are ignored if this is not NULL - - SID_IDENTIFIER_AUTHORITY sia; // used if pwzAccountName is NULL - BYTE nSubAuthorityCount; - DWORD nSubAuthority[8]; -}; - -struct ACL_ACE -{ - DWORD dwFlags; - DWORD dwMask; - PSID psid; -}; - - -// functions -HRESULT DAPI AclCheckAccess( - __in HANDLE hToken, - __in ACL_ACCESS* paa - ); -HRESULT DAPI AclCheckAdministratorAccess( - __in HANDLE hToken - ); -HRESULT DAPI AclCheckLocalSystemAccess( - __in HANDLE hToken - ); - -HRESULT DAPI AclGetWellKnownSid( - __in WELL_KNOWN_SID_TYPE wkst, - __deref_out PSID* ppsid - ); -HRESULT DAPI AclGetAccountSid( - __in_opt LPCWSTR wzSystem, - __in_z LPCWSTR wzAccount, - __deref_out PSID* ppsid - ); -HRESULT DAPI AclGetAccountSidString( - __in_z LPCWSTR wzSystem, - __in_z LPCWSTR wzAccount, - __deref_out_z LPWSTR* ppwzSid - ); - -HRESULT DAPI AclCreateDacl( - __in_ecount(cDeny) ACL_ACE rgaaDeny[], - __in DWORD cDeny, - __in_ecount(cAllow) ACL_ACE rgaaAllow[], - __in DWORD cAllow, - __deref_out ACL** ppAcl - ); -HRESULT DAPI AclAddToDacl( - __in ACL* pAcl, - __in_ecount_opt(cDeny) const ACL_ACE rgaaDeny[], - __in DWORD cDeny, - __in_ecount_opt(cAllow) const ACL_ACE rgaaAllow[], - __in DWORD cAllow, - __deref_out ACL** ppAclNew - ); -HRESULT DAPI AclMergeDacls( - __in const ACL* pAcl1, - __in const ACL* pAcl2, - __deref_out ACL** ppAclNew - ); -HRESULT DAPI AclCreateDaclOld( - __in_ecount(cAclAccesses) ACL_ACCESS* paa, - __in DWORD cAclAccesses, - __deref_out ACL** ppAcl - ); -HRESULT DAPI AclCreateSecurityDescriptor( - __in_ecount(cAclAccesses) ACL_ACCESS* paa, - __in DWORD cAclAccesses, - __deref_out SECURITY_DESCRIPTOR** ppsd - ); -HRESULT DAPI AclCreateSecurityDescriptorFromDacl( - __in ACL* pACL, - __deref_out SECURITY_DESCRIPTOR** ppsd - ); -HRESULT __cdecl AclCreateSecurityDescriptorFromString( - __deref_out SECURITY_DESCRIPTOR** ppsd, - __in_z __format_string LPCWSTR wzSddlFormat, - ... - ); -HRESULT DAPI AclDuplicateSecurityDescriptor( - __in SECURITY_DESCRIPTOR* psd, - __deref_out SECURITY_DESCRIPTOR** ppsd - ); -HRESULT DAPI AclGetSecurityDescriptor( - __in_z LPCWSTR wzObject, - __in SE_OBJECT_TYPE sot, - __in SECURITY_INFORMATION securityInformation, - __deref_out SECURITY_DESCRIPTOR** ppsd - ); -HRESULT DAPI AclSetSecurityWithRetry( - __in_z LPCWSTR wzObject, - __in SE_OBJECT_TYPE sot, - __in SECURITY_INFORMATION securityInformation, - __in_opt PSID psidOwner, - __in_opt PSID psidGroup, - __in_opt PACL pDacl, - __in_opt PACL pSacl, - __in DWORD cRetry, - __in DWORD dwWaitMilliseconds - ); - -HRESULT DAPI AclFreeSid( - __in PSID psid - ); -HRESULT DAPI AclFreeDacl( - __in ACL* pACL - ); -HRESULT DAPI AclFreeSecurityDescriptor( - __in SECURITY_DESCRIPTOR* psd - ); - -HRESULT DAPI AclAddAdminToSecurityDescriptor( - __in SECURITY_DESCRIPTOR* pSecurity, - __deref_out SECURITY_DESCRIPTOR** ppSecurityNew - ); -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/apuputil.h b/scripts/windows/installer/WiXSDK/inc/apuputil.h deleted file mode 100644 index 6bcaecca16..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/apuputil.h +++ /dev/null @@ -1,92 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Header for Application Update helper functions. -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -#define ReleaseApupChain(p) if (p) { ApupFreeChain(p); p = NULL; } -#define ReleaseNullApupChain(p) if (p) { ApupFreeChain(p); p = NULL; } - - -const LPCWSTR APPLICATION_SYNDICATION_NAMESPACE = L"http://appsyndication.org/2006/appsyn"; - -enum APUP_HASH_ALGORITHM -{ - APUP_HASH_ALGORITHM_UNKNOWN, - APUP_HASH_ALGORITHM_MD5, - APUP_HASH_ALGORITHM_SHA1, - APUP_HASH_ALGORITHM_SHA256, -}; - - -struct APPLICATION_UPDATE_ENCLOSURE -{ - LPWSTR wzUrl; - LPWSTR wzLocalName; - DWORD64 dw64Size; - - BYTE* rgbDigest; - DWORD cbDigest; - APUP_HASH_ALGORITHM digestAlgorithm; - - BOOL fInstaller; -}; - - -struct APPLICATION_UPDATE_ENTRY -{ - LPWSTR wzApplicationId; - LPWSTR wzApplicationType; - - LPWSTR wzUpgradeId; - BOOL fUpgradeExclusive; - DWORD64 dw64Version; - DWORD64 dw64UpgradeVersion; - - DWORD64 dw64TotalSize; - - DWORD cEnclosures; - APPLICATION_UPDATE_ENCLOSURE* rgEnclosures; -}; - - -struct APPLICATION_UPDATE_CHAIN -{ - LPWSTR wzDefaultApplicationId; - LPWSTR wzDefaultApplicationType; - - DWORD cEntries; - APPLICATION_UPDATE_ENTRY* rgEntries; -}; - - -HRESULT DAPI ApupAllocChainFromAtom( - __in ATOM_FEED* pFeed, - __out APPLICATION_UPDATE_CHAIN** ppChain - ); - -HRESULT DAPI ApupFilterChain( - __in APPLICATION_UPDATE_CHAIN* pChain, - __in DWORD64 dw64Version, - __out APPLICATION_UPDATE_CHAIN** ppFilteredChain - ); - -void DAPI ApupFreeChain( - __in APPLICATION_UPDATE_CHAIN* pChain - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/atomutil.h b/scripts/windows/installer/WiXSDK/inc/atomutil.h deleted file mode 100644 index 7f4f71e3d6..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/atomutil.h +++ /dev/null @@ -1,158 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// ATOM helper functions. -// -//------------------------------------------------------------------------------------------------- - -#pragma once - - -#ifdef __cplusplus -extern "C" { -#endif - -#define ReleaseAtomFeed(p) if (p) { AtomFreeFeed(p); } -#define ReleaseNullAtomFeed(p) if (p) { AtomFreeFeed(p); p = NULL; } - - -struct ATOM_UNKNOWN_ATTRIBUTE -{ - LPWSTR wzNamespace; - LPWSTR wzAttribute; - LPWSTR wzValue; - - ATOM_UNKNOWN_ATTRIBUTE* pNext; -}; - -struct ATOM_UNKNOWN_ELEMENT -{ - LPWSTR wzNamespace; - LPWSTR wzElement; - LPWSTR wzValue; - - ATOM_UNKNOWN_ATTRIBUTE* pAttributes; - ATOM_UNKNOWN_ELEMENT* pNext; -}; - -struct ATOM_LINK -{ - LPWSTR wzRel; - LPWSTR wzTitle; - LPWSTR wzType; - LPWSTR wzUrl; - LPWSTR wzValue; - DWORD64 dw64Length; - - ATOM_UNKNOWN_ATTRIBUTE* pUnknownAttributes; - ATOM_UNKNOWN_ELEMENT* pUnknownElements; -}; - -struct ATOM_CONTENT -{ - LPWSTR wzType; - LPWSTR wzUrl; - LPWSTR wzValue; - - ATOM_UNKNOWN_ELEMENT* pUnknownElements; -}; - -struct ATOM_AUTHOR -{ - LPWSTR wzName; - LPWSTR wzEmail; - LPWSTR wzUrl; -}; - -struct ATOM_CATEGORY -{ - LPWSTR wzLabel; - LPWSTR wzScheme; - LPWSTR wzTerm; - - ATOM_UNKNOWN_ELEMENT* pUnknownElements; -}; - -struct ATOM_ENTRY -{ - LPWSTR wzId; - LPWSTR wzSummary; - LPWSTR wzTitle; - FILETIME ftPublished; - FILETIME ftUpdated; - - ATOM_CONTENT* pContent; - - DWORD cAuthors; - ATOM_AUTHOR* rgAuthors; - - DWORD cCategories; - ATOM_CATEGORY* rgCategories; - - DWORD cLinks; - ATOM_LINK* rgLinks; - - IXMLDOMNode* pixn; - ATOM_UNKNOWN_ELEMENT* pUnknownElements; -}; - -struct ATOM_FEED -{ - LPWSTR wzGenerator; - LPWSTR wzIcon; - LPWSTR wzId; - LPWSTR wzLogo; - LPWSTR wzSubtitle; - LPWSTR wzTitle; - FILETIME ftUpdated; - - DWORD cAuthors; - ATOM_AUTHOR* rgAuthors; - - DWORD cCategories; - ATOM_CATEGORY* rgCategories; - - DWORD cEntries; - ATOM_ENTRY* rgEntries; - - DWORD cLinks; - ATOM_LINK* rgLinks; - - IXMLDOMNode* pixn; - ATOM_UNKNOWN_ELEMENT* pUnknownElements; -}; - -HRESULT DAPI AtomInitialize( - ); - -void DAPI AtomUninitialize( - ); - -HRESULT DAPI AtomParseFromString( - __in_z LPCWSTR wzAtomString, - __out ATOM_FEED **ppFeed - ); - -HRESULT DAPI AtomParseFromFile( - __in_z LPCWSTR wzAtomFile, - __out ATOM_FEED **ppFeed - ); - -HRESULT DAPI AtomParseFromDocument( - __in IXMLDOMDocument* pixdDocument, - __out ATOM_FEED **ppFeed - ); - -void DAPI AtomFreeFeed( - __in_xcount(pFeed->cItems) ATOM_FEED *pFEED - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/balcondition.h b/scripts/windows/installer/WiXSDK/inc/balcondition.h deleted file mode 100644 index 8f3a78a740..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/balcondition.h +++ /dev/null @@ -1,69 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Bootstrapper Application Layer condition utility. -// -//------------------------------------------------------------------------------------------------- - - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct _BAL_CONDITION -{ - LPWSTR sczCondition; - LPWSTR sczMessage; -} BAL_CONDITION; - - -typedef struct _BAL_CONDITIONS -{ - BAL_CONDITION* rgConditions; - DWORD cConditions; -} BAL_CONDITIONS; - - -/******************************************************************* - BalConditionsParseFromXml - loads the conditions from the UX manifest. - -********************************************************************/ -DAPI_(HRESULT) BalConditionsParseFromXml( - __in BAL_CONDITIONS* pConditions, - __in IXMLDOMDocument* pixdManifest, - __in_opt WIX_LOCALIZATION* pWixLoc - ); - - -/******************************************************************* - BalConditionEvaluate - evaluates condition against the provided IBurnCore. - - NOTE: psczMessage is optional. -********************************************************************/ -DAPI_(HRESULT) BalConditionEvaluate( - __in BAL_CONDITION* pCondition, - __in IBootstrapperEngine* pEngine, - __out BOOL* pfResult, - __out_z_opt LPWSTR* psczMessage - ); - - -/******************************************************************* - BalConditionsUninitialize - uninitializes any conditions previously loaded. - -********************************************************************/ -DAPI_(void) BalConditionsUninitialize( - __in BAL_CONDITIONS* pConditions - ); - - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/balinfo.h b/scripts/windows/installer/WiXSDK/inc/balinfo.h deleted file mode 100644 index 3a1a8ac3e7..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/balinfo.h +++ /dev/null @@ -1,106 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Bootstrapper Application Layer package utility. -// -//------------------------------------------------------------------------------------------------- - - -#ifdef __cplusplus -extern "C" { -#endif - -enum BAL_INFO_PACKAGE_TYPE -{ - BAL_INFO_PACKAGE_TYPE_UNKNOWN, - BAL_INFO_PACKAGE_TYPE_EXE, - BAL_INFO_PACKAGE_TYPE_MSI, - BAL_INFO_PACKAGE_TYPE_MSP, - BAL_INFO_PACKAGE_TYPE_MSU, - BAL_INFO_PACKAGE_TYPE_BUNDLE_UPGRADE, - BAL_INFO_PACKAGE_TYPE_BUNDLE_ADDON, - BAL_INFO_PACKAGE_TYPE_BUNDLE_PATCH, -}; - - -typedef struct _BAL_INFO_PACKAGE -{ - LPWSTR sczId; - LPWSTR sczDisplayName; - LPWSTR sczDescription; - BAL_INFO_PACKAGE_TYPE type; - BOOL fPermanent; - BOOL fVital; - BOOL fDisplayInternalUI; -} BAL_INFO_PACKAGE; - - -typedef struct _BAL_INFO_PACKAGES -{ - BAL_INFO_PACKAGE* rgPackages; - DWORD cPackages; -} BAL_INFO_PACKAGES; - - -typedef struct _BAL_INFO_BUNDLE -{ - BOOL fPerMachine; - LPWSTR sczName; - LPWSTR sczLogVariable; - BAL_INFO_PACKAGES packages; -} BAL_INFO_BUNDLE; - - -/******************************************************************* - BalInfoParseFromXml - loads the bundle and package info from the UX - manifest. - -********************************************************************/ -DAPI_(HRESULT) BalInfoParseFromXml( - __in BAL_INFO_BUNDLE* pBundle, - __in IXMLDOMDocument* pixdManifest - ); - - -/******************************************************************* - BalInfoAddRelatedBundleAsPackage - adds a related bundle as a package. - - ********************************************************************/ -DAPI_(HRESULT) BalInfoAddRelatedBundleAsPackage( - __in BAL_INFO_PACKAGES* pPackages, - __in LPCWSTR wzId, - __in BOOTSTRAPPER_RELATION_TYPE relationType, - __in BOOL fPerMachine - ); - - -/******************************************************************* - BalInfoFindPackageById - finds a package by its id. - - ********************************************************************/ -DAPI_(HRESULT) BalInfoFindPackageById( - __in BAL_INFO_PACKAGES* pPackages, - __in LPCWSTR wzId, - __out BAL_INFO_PACKAGE** ppPackage - ); - - -/******************************************************************* - BalInfoUninitialize - uninitializes any info previously loaded. - -********************************************************************/ -DAPI_(void) BalInfoUninitialize( - __in BAL_INFO_BUNDLE* pBundle - ); - - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/balretry.h b/scripts/windows/installer/WiXSDK/inc/balretry.h deleted file mode 100644 index 0e78189953..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/balretry.h +++ /dev/null @@ -1,75 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Bootstrapper Application Layer retry utility. -// -//------------------------------------------------------------------------------------------------- - - -#ifdef __cplusplus -extern "C" { -#endif - -enum BALRETRY_TYPE -{ - BALRETRY_TYPE_CACHE, - BALRETRY_TYPE_EXECUTE, -}; - -/******************************************************************* - BalRetryInitialize - initialize the retry count and timeout between - retries (in milliseconds). -********************************************************************/ -DAPI_(void) BalRetryInitialize( - __in DWORD dwMaxRetries, - __in DWORD dwTimeout - ); - -/******************************************************************* - BalRetryUninitialize - call to cleanup any memory allocated during - use of the retry utility. -********************************************************************/ -DAPI_(void) BalRetryUninitialize(); - -/******************************************************************* - BalRetryStartPackage - call when a package begins to be modified. If - the package is being retried, the function will - wait the specified timeout. -********************************************************************/ -DAPI_(void) BalRetryStartPackage( - __in BALRETRY_TYPE type, - __in_z_opt LPCWSTR wzPackageId, - __in_z_opt LPCWSTR wzPayloadId - ); - -/******************************************************************* - BalRetryErrorOccured - call when an error occurs for the retry utility - to consider. -********************************************************************/ -DAPI_(void) BalRetryErrorOccurred( - __in_z_opt LPCWSTR wzPackageId, - __in DWORD dwError - ); - -/******************************************************************* - BalRetryEndPackage - returns IDRETRY is a retry is recommended or - IDNOACTION if a retry is not recommended. -********************************************************************/ -DAPI_(int) BalRetryEndPackage( - __in BALRETRY_TYPE type, - __in_z_opt LPCWSTR wzPackageId, - __in_z_opt LPCWSTR wzPayloadId, - __in HRESULT hrError - ); - - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/balutil.h b/scripts/windows/installer/WiXSDK/inc/balutil.h deleted file mode 100644 index 89c2b69f7b..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/balutil.h +++ /dev/null @@ -1,120 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Burn utility library. -// -//------------------------------------------------------------------------------------------------- - -#include "dutil.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -#define BalExitOnFailure(x, f) if (FAILED(x)) { BalLogError(x, f); ExitTrace(x, f); goto LExit; } -#define BalExitOnFailure1(x, f, s) if (FAILED(x)) { BalLogError(x, f, s); ExitTrace1(x, f, s); goto LExit; } -#define BalExitOnFailure2(x, f, s, t) if (FAILED(x)) { BalLogError(x, f, s, t); ExitTrace2(x, f, s, t); goto LExit; } -#define BalExitOnFailure3(x, f, s, t, u) if (FAILED(x)) { BalLogError(x, f, s, t, u); ExitTrace3(x, f, s, t, u); goto LExit; } - -#define BalExitOnRootFailure(x, f) if (FAILED(x)) { BalLogError(x, f); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, f); goto LExit; } -#define BalExitOnRootFailure1(x, f, s) if (FAILED(x)) { BalLogError(x, f, s); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace1(x, f, s); goto LExit; } -#define BalExitOnRootFailure2(x, f, s, t) if (FAILED(x)) { BalLogError(x, f, s, t); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace2(x, f, s, t); goto LExit; } -#define BalExitOnRootFailure3(x, f, s, t, u) if (FAILED(x)) { BalLogError(x, f, s, t, u); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace3(x, f, s, t, u); goto LExit; } - -#define BalExitOnNullWithLastError(p, x, f) if (NULL == p) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } BalLogError(x, f); ExitTrace(x, f); goto LExit; } -#define BalExitOnNullWithLastError1(p, x, f, s) if (NULL == p) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } BalLogError(x, f, s); ExitTrace1(x, f, s); goto LExit; } - - -/******************************************************************* - BalInitialize - remembers the engine interface to enable logging and - other functions. - -********************************************************************/ -DAPI_(void) BalInitialize( - __in IBootstrapperEngine* pEngine - ); - -/******************************************************************* - BalUninitialize - cleans up utility layer internals. - -********************************************************************/ -DAPI_(void) BalUninitialize(); - -/******************************************************************* - BalManifestLoad - loads the Application manifest into an XML document. - -********************************************************************/ -DAPI_(HRESULT) BalManifestLoad( - __in HMODULE hUXModule, - __out IXMLDOMDocument** ppixdManifest - ); - -/******************************************************************* -BalFormatString - formats a string using variables in the engine. - - Note: Use StrFree() to release psczOut. -********************************************************************/ -DAPI_(HRESULT) BalFormatString( - __in_z LPCWSTR wzFormat, - __inout LPWSTR* psczOut - ); - -/******************************************************************* -BalGetNumericVariable - gets a number from a variable in the engine. - - Note: Returns E_NOTFOUND if variable does not exist. -********************************************************************/ -DAPI_(HRESULT) BalGetNumericVariable( - __in_z LPCWSTR wzVariable, - __out LONGLONG* pllValue - ); - -/******************************************************************* -BalStringVariableExists - checks if a string variable exists in the engine. - -********************************************************************/ -DAPI_(BOOL) BalStringVariableExists( - __in_z LPCWSTR wzVariable - ); - -/******************************************************************* -BalGetStringVariable - gets a string from a variable in the engine. - - Note: Use StrFree() to release psczValue. -********************************************************************/ -DAPI_(HRESULT) BalGetStringVariable( - __in_z LPCWSTR wzVariable, - __inout LPWSTR* psczValue - ); - -/******************************************************************* - BalLog - logs a message with the engine. - -********************************************************************/ -DAPIV_(HRESULT) BalLog( - __in BOOTSTRAPPER_LOG_LEVEL level, - __in_z __format_string LPCSTR szFormat, - ... - ); - -/******************************************************************* - BalLogError - logs an error message with the engine. - -********************************************************************/ -DAPIV_(HRESULT) BalLogError( - __in HRESULT hr, - __in_z __format_string LPCSTR szFormat, - ... - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/buffutil.h b/scripts/windows/installer/WiXSDK/inc/buffutil.h deleted file mode 100644 index ae85f3067a..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/buffutil.h +++ /dev/null @@ -1,92 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Binary serialization helper functions. -// -//------------------------------------------------------------------------------------------------- - -#pragma once - - -#ifdef __cplusplus -extern "C" { -#endif - - -// macro definitions - -#define ReleaseBuffer ReleaseMem -#define ReleaseNullBuffer ReleaseNullMem -#define BuffFree MemFree - - -// function declarations - -HRESULT BuffReadNumber( - __in_bcount(cbBuffer) const BYTE* pbBuffer, - __in SIZE_T cbBuffer, - __inout SIZE_T* piBuffer, - __out DWORD* pdw - ); -HRESULT BuffReadNumber64( - __in_bcount(cbBuffer) const BYTE* pbBuffer, - __in SIZE_T cbBuffer, - __inout SIZE_T* piBuffer, - __out DWORD64* pdw64 - ); -HRESULT BuffReadString( - __in_bcount(cbBuffer) const BYTE* pbBuffer, - __in SIZE_T cbBuffer, - __inout SIZE_T* piBuffer, - __deref_out_z LPWSTR* pscz - ); -HRESULT BuffReadStringAnsi( - __in_bcount(cbBuffer) const BYTE* pbBuffer, - __in SIZE_T cbBuffer, - __inout SIZE_T* piBuffer, - __deref_out_z LPSTR* pscz - ); -HRESULT BuffReadStream( - __in_bcount(cbBuffer) const BYTE* pbBuffer, - __in SIZE_T cbBuffer, - __inout SIZE_T* piBuffer, - __deref_out_bcount(*pcbStream) BYTE** ppbStream, - __out SIZE_T* pcbStream - ); - -HRESULT BuffWriteNumber( - __deref_out_bcount(*piBuffer) BYTE** ppbBuffer, - __inout SIZE_T* piBuffer, - __in DWORD dw - ); -HRESULT BuffWriteNumber64( - __deref_out_bcount(*piBuffer) BYTE** ppbBuffer, - __inout SIZE_T* piBuffer, - __in DWORD64 dw64 - ); -HRESULT BuffWriteString( - __deref_out_bcount(*piBuffer) BYTE** ppbBuffer, - __inout SIZE_T* piBuffer, - __in_z_opt LPCWSTR scz - ); -HRESULT BuffWriteStringAnsi( - __deref_out_bcount(*piBuffer) BYTE** ppbBuffer, - __inout SIZE_T* piBuffer, - __in_z_opt LPCSTR scz - ); -HRESULT BuffWriteStream( - __deref_out_bcount(*piBuffer) BYTE** ppbBuffer, - __inout SIZE_T* piBuffer, - __in_bcount(cbStream) const BYTE* pbStream, - __in SIZE_T cbStream - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/cabcutil.h b/scripts/windows/installer/WiXSDK/inc/cabcutil.h deleted file mode 100644 index 5f7c30dae7..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/cabcutil.h +++ /dev/null @@ -1,72 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Header for cabinet creation helper functions. -// -//------------------------------------------------------------------------------------------------- - -#include -#include -#include - -// Callback from PFNFCIGETNEXTCABINET CabCGetNextCabinet method -// First argument is the name of splitting cabinet without extension e.g. "cab1" -// Second argument is name of the new cabinet that would be formed by splitting e.g. "cab1b.cab" -// Third argument is the file token of the first file present in the splitting cabinet -typedef void (__stdcall * FileSplitCabNamesCallback)(LPWSTR, LPWSTR, LPWSTR); - -#define CAB_MAX_SIZE 0x7FFFFFFF // (see KB: Q174866) - -#ifdef __cplusplus -extern "C" { -#endif - -extern const int CABC_HANDLE_BYTES; - -// time vs. space trade-off -enum COMPRESSION_TYPE -{ - COMPRESSION_TYPE_NONE, // fastest - COMPRESSION_TYPE_LOW, - COMPRESSION_TYPE_MEDIUM, - COMPRESSION_TYPE_HIGH, // smallest - COMPRESSION_TYPE_MSZIP -}; - -// functions -HRESULT DAPI CabCBegin( - __in_z LPCWSTR wzCab, - __in_z LPCWSTR wzCabDir, - __in DWORD dwMaxFiles, - __in DWORD dwMaxSize, - __in DWORD dwMaxThresh, - __in COMPRESSION_TYPE ct, - __out_bcount(CABC_HANDLE_BYTES) HANDLE *phContext - ); -HRESULT DAPI CabCNextCab( - __in_bcount(CABC_HANDLE_BYTES) HANDLE hContext - ); -HRESULT DAPI CabCAddFile( - __in_z LPCWSTR wzFile, - __in_z_opt LPCWSTR wzToken, - __in_opt PMSIFILEHASHINFO pmfHash, - __in_bcount(CABC_HANDLE_BYTES) HANDLE hContext - ); -HRESULT DAPI CabCFinish( - __in_bcount(CABC_HANDLE_BYTES) HANDLE hContext, - __in_opt FileSplitCabNamesCallback fileSplitCabNamesCallback - ); -void DAPI CabCCancel( - __in_bcount(CABC_HANDLE_BYTES) HANDLE hContext - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/cabutil.h b/scripts/windows/installer/WiXSDK/inc/cabutil.h deleted file mode 100644 index 7792046643..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/cabutil.h +++ /dev/null @@ -1,66 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Header for cabinet decompression helper functions -// -//------------------------------------------------------------------------------------------------- - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -// structs - - -// callback function prototypes -typedef HRESULT (*CAB_CALLBACK_OPEN_FILE)(LPCWSTR wzFile, INT_PTR* ppFile); -typedef HRESULT (*CAB_CALLBACK_READ_FILE)(INT_PTR pFile, LPVOID pvData, DWORD cbData, DWORD* pcbRead); -typedef HRESULT (*CAB_CALLBACK_WRITE_FILE)(INT_PTR pFile, LPVOID pvData, DWORD cbData, DWORD* pcbRead); -typedef LONG (*CAB_CALLBACK_SEEK_FILE)(INT_PTR pFile, DWORD dwMove, DWORD dwMoveMethod); -typedef HRESULT (*CAB_CALLBACK_CLOSE_FILE)(INT_PTR pFile); - -typedef HRESULT (*CAB_CALLBACK_BEGIN_FILE)(LPCWSTR wzFileId, FILETIME* pftFileTime, DWORD cbFileSize, LPVOID pvContext, INT_PTR* ppFile); -typedef HRESULT (*CAB_CALLBACK_END_FILE)(LPCWSTR wzFileId, LPVOID pvContext, INT_PTR pFile); -typedef HRESULT (*CAB_CALLBACK_PROGRESS)(BOOL fBeginFile, LPCWSTR wzFileId, LPVOID pvContext); - -// function type with calling convention of __stdcall that .NET 1.1 understands only -// .NET 2.0 will not need this -typedef INT_PTR (FAR __stdcall *STDCALL_PFNFDINOTIFY)(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin); - - -// functions -HRESULT DAPI CabInitialize( - __in BOOL fDelayLoad - ); -void DAPI CabUninitialize( - ); - -HRESULT DAPI CabExtract( - __in_z LPCWSTR wzCabinet, - __in_z LPCWSTR wzExtractFile, - __in_z LPCWSTR wzExtractDir, - __in_opt CAB_CALLBACK_PROGRESS pfnProgress, - __in_opt LPVOID pvContext, - __in DWORD64 dw64EmbeddedOffset - ); - -HRESULT DAPI CabEnumerate( - __in_z LPCWSTR wzCabinet, - __in_z LPCWSTR wzEnumerateFile, - __in STDCALL_PFNFDINOTIFY pfnNotify, - __in DWORD64 dw64EmbeddedOffset - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/certutil.h b/scripts/windows/installer/WiXSDK/inc/certutil.h deleted file mode 100644 index 5cd27d4aae..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/certutil.h +++ /dev/null @@ -1,76 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Certificate helper functions. -// -//------------------------------------------------------------------------------------------------- - -#define ReleaseCertStore(p) if (p) { ::CertCloseStore(p, 0); p = NULL; } -#define ReleaseCertContext(p) if (p) { ::CertFreeCertificateContext(p); p = NULL; } -#define ReleaseCertChain(p) if (p) { ::CertFreeCertificateChain(p); p = NULL; } - -#ifdef __cplusplus -extern "C" { -#endif - -HRESULT DAPI CertReadProperty( - __in PCCERT_CONTEXT pCertContext, - __in DWORD dwProperty, - __out_bcount(*pcbValue) LPVOID pvValue, - __out_opt DWORD* pcbValue - ); - -HRESULT DAPI CertGetAuthenticodeSigningTimestamp( - __in CMSG_SIGNER_INFO* pSignerInfo, - __out FILETIME* pft - ); - -HRESULT DAPI GetCryptProvFromCert( - __in_opt HWND hwnd, - __in PCCERT_CONTEXT pCert, - __out HCRYPTPROV *phCryptProv, - __out DWORD *pdwKeySpec, - __in BOOL *pfDidCryptAcquire, - __deref_opt_out LPWSTR *ppwszTmpContainer, - __deref_opt_out LPWSTR *ppwszProviderName, - __out DWORD *pdwProviderType - ); - -HRESULT DAPI FreeCryptProvFromCert( - __in BOOL fAcquired, - __in HCRYPTPROV hProv, - __in_opt LPWSTR pwszCapiProvider, - __in DWORD dwProviderType, - __in_opt LPWSTR pwszTmpContainer - ); - -HRESULT DAPI GetProvSecurityDesc( - __in HCRYPTPROV hProv, - __deref_out SECURITY_DESCRIPTOR** pSecurity - ); - -HRESULT DAPI SetProvSecurityDesc( - __in HCRYPTPROV hProv, - __in SECURITY_DESCRIPTOR* pSecurity - ); - -BOOL DAPI CertHasPrivateKey( - __in PCCERT_CONTEXT pCertContext, - __out_opt DWORD* pdwKeySpec - ); - -HRESULT DAPI CertInstallSingleCertificate( - __in HCERTSTORE hStore, - __in PCCERT_CONTEXT pCertContext, - __in LPCWSTR wzName - ); -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/conutil.h b/scripts/windows/installer/WiXSDK/inc/conutil.h deleted file mode 100644 index 13bb1aa685..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/conutil.h +++ /dev/null @@ -1,110 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Console helper functions. -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -#define ConsoleExitOnFailure(x, c, f) if (FAILED(x)) { ConsoleWriteError(x, c, f); ExitTrace(x, f); goto LExit; } -#define ConsoleExitOnFailure1(x, c, f, s) if (FAILED(x)) { ConsoleWriteError(x, c, f, s, NULL); ExitTrace1(x, f, s); goto LExit; } -#define ConsoleExitOnFailure2(x, c, f, s, t) if (FAILED(x)) { ConsoleWriteError(x, c, f, s, t); ExitTrace2(x, f, s, t); goto LExit; } -#define ConsoleExitOnFailure3(x, c, f, s, t, u) if (FAILED(x)) { ConsoleWriteError(x, c, f, s, t, u); ExitTrace3(x, f, s, t, u); goto LExit; } - -#define ConsoleExitOnLastError(x, c, f) { x = ::GetLastError(); x = HRESULT_FROM_WIN32(x); if (FAILED(x)) { ConsoleWriteError(x, c, f); ExitTrace(x, f); goto LExit; } } -#define ConsoleExitOnLastError1(x, c, f, s) { x = ::GetLastError(); x = HRESULT_FROM_WIN32(x); if (FAILED(x)) { ConsoleWriteError(x, c, f, s, NULL); ExitTrace1(x, f, s); goto LExit; } } -#define ConsoleExitOnLastError2(x, c, f, s, t) { x = ::GetLastError(); x = HRESULT_FROM_WIN32(x); if (FAILED(x)) { ConsoleWriteError(x, c, f, s, t); ExitTrace2(x, f, s, t); goto LExit; } } -#define ConsoleExitOnLastError3(x, c, f, s, t, u) { x = ::GetLastError(); x = HRESULT_FROM_WIN32(x); if (FAILED(x)) { ConsoleWriteError(x, c, f, s, t, u); ExitTrace3(x, f, s, t, u); goto LExit; } } - -#define ConsoleExitOnNull(p, x, e, c, f) if (NULL == p) { x = e; ConsoleWriteError(x, c, f); ExitTrace(x, f); goto LExit; } -#define ConsoleExitOnNull1(p, x, e, c, f, s) if (NULL == p) { x = e; ConsoleWriteError(x, c, f, s, NULL); ExitTrace1(x, f, s); goto LExit; } -#define ConsoleExitOnNull2(p, x, e, c, f, s, t) if (NULL == p) { x = e; ConsoleWriteError(x, c, f, s, t); ExitTrace2(x, f, s, t); goto LExit; } -#define ConsoleExitOnNull3(p, x, e, c, f, s, t, u) if (NULL == p) { x = e; ConsoleWriteError(x, c, f, s, t, u); ExitTrace2(x, f, s, t, u); goto LExit; } - - -// the following macros need to go away -#define ConsoleTrace(l, f) { ConsoleWriteLine(CONSOLE_COLOR_NORMAL, f); Trace(l, f); } -#define ConsoleTrace1(l, f, s) { ConsoleWriteLine(CONSOLE_COLOR_NORMAL, f, s); Trace1(l, f, s); } -#define ConsoleTrace2(l, f, s, t) { ConsoleWriteLine(CONSOLE_COLOR_NORMAL, f, s, t); Trace2(l, f, s, t); } -#define ConsoleTrace3(l, f, s, t, u) { ConsoleWriteLine(CONSOLE_COLOR_NORMAL, f, s, t, u); Trace3(l, f, s, t, u); } - -#define ConsoleWarning(f) { ConsoleWriteLine(CONSOLE_COLOR_YELLOW, f); Trace(REPORT_STANDARD, f); } -#define ConsoleWarning1(f, s) { ConsoleWriteLine(CONSOLE_COLOR_YELLOW, f, s); Trace1(REPORT_STANDARD, f, s); } -#define ConsoleWarning2(f, s, t) { ConsoleWriteLine(CONSOLE_COLOR_YELLOW, f, s, t); Trace2(REPORT_STANDARD, f, s, t); } -#define ConsoleWarning3(f, s, t, u) { ConsoleWriteLine(CONSOLE_COLOR_YELLOW, f, s, t, u); Trace3(REPORT_STANDARD, f, s, t, u); } - -#define ConsoleError(x, f) { ConsoleWriteError(x, CONSOLE_COLOR_RED, f); TraceError(x, f); } -#define ConsoleError1(x, f, s) { ConsoleWriteError(x, CONSOLE_COLOR_RED, f, s); TraceError1(x, f, s); } -#define ConsoleError2(x, f, s, t) { ConsoleWriteError(x, CONSOLE_COLOR_RED, f, s, t); TraceError2(x, f, s, t); } -#define ConsoleError3(x, f, s, t, u) { ConsoleWriteError(x, CONSOLE_COLOR_RED, f, s, t, u); TraceError3(x, f, s, t, u); } - - -// enums -enum CONSOLE_COLOR { CONSOLE_COLOR_NORMAL, CONSOLE_COLOR_RED, CONSOLE_COLOR_YELLOW, CONSOLE_COLOR_GREEN }; - -// structs - -// functions -HRESULT DAPI ConsoleInitialize(); -void DAPI ConsoleUninitialize(); - -void DAPI ConsoleGreen(); -void DAPI ConsoleRed(); -void DAPI ConsoleYellow(); -void DAPI ConsoleNormal(); - -HRESULT DAPI ConsoleWrite( - CONSOLE_COLOR cc, - __in_z __format_string LPCSTR szFormat, - ... - ); -HRESULT DAPI ConsoleWriteLine( - CONSOLE_COLOR cc, - __in_z __format_string LPCSTR szFormat, - ... - ); -HRESULT DAPI ConsoleWriteError( - HRESULT hrError, - CONSOLE_COLOR cc, - __in_z __format_string LPCSTR szFormat, - ... - ); - -HRESULT DAPI ConsoleReadW( - __deref_out_z LPWSTR* ppwzBuffer - ); - -HRESULT DAPI ConsoleReadStringA( - __deref_out_ecount_part(cchCharBuffer,*pcchNumCharReturn) LPSTR* szCharBuffer, - CONST DWORD cchCharBuffer, - __out DWORD* pcchNumCharReturn - ); -HRESULT DAPI ConsoleReadStringW( - __deref_out_ecount_part(cchCharBuffer,*pcchNumCharReturn) LPWSTR* szCharBuffer, - CONST DWORD cchCharBuffer, - __out DWORD* pcchNumCharReturn - ); - -HRESULT DAPI ConsoleReadNonBlockingW( - __deref_out_ecount_opt(*pcchSize) LPWSTR* ppwzBuffer, - __out DWORD* pcchSize, - BOOL fReadLine - ); - -HRESULT DAPI ConsoleSetReadHidden(void); -HRESULT DAPI ConsoleSetReadNormal(void); - -#ifdef __cplusplus -} -#endif - diff --git a/scripts/windows/installer/WiXSDK/inc/cryputil.h b/scripts/windows/installer/WiXSDK/inc/cryputil.h deleted file mode 100644 index 2cb69ec2a9..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/cryputil.h +++ /dev/null @@ -1,72 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Cryptography helper functions. -// -//------------------------------------------------------------------------------------------------- - -#define ReleaseCryptMsg(p) if (p) { ::CryptMsgClose(p); p = NULL; } - -#ifdef __cplusplus -extern "C" { -#endif - - -#define SHA1_HASH_LEN 20 - -// function declarations - -HRESULT DAPI CrypDecodeObject( - __in_z LPCSTR szStructType, - __in_ecount(cbData) const BYTE* pbData, - __in DWORD cbData, - __in DWORD dwFlags, - __out LPVOID* ppvObject, - __out_opt DWORD* pcbObject - ); - -HRESULT DAPI CrypMsgGetParam( - __in HCRYPTMSG hCryptMsg, - __in DWORD dwType, - __in DWORD dwIndex, - __out LPVOID* ppvData, - __out_opt DWORD* pcbData - ); - -HRESULT DAPI CrypHashFile( - __in_z LPCWSTR wzFilePath, - __in DWORD dwProvType, - __in ALG_ID algid, - __out_bcount(cbHash) BYTE* pbHash, - __in DWORD cbHash, - __out_opt DWORD64* pqwBytesHashed - ); - -HRESULT DAPI CrypHashFileHandle( - __in HANDLE hFile, - __in DWORD dwProvType, - __in ALG_ID algid, - __out_bcount(cbHash) BYTE* pbHash, - __in DWORD cbHash, - __out_opt DWORD64* pqwBytesHashed - ); - -HRESULT DAPI CrypHashBuffer( - __in_bcount(cbBuffer) const BYTE* pbBuffer, - __in SIZE_T cbBuffer, - __in DWORD dwProvType, - __in ALG_ID algid, - __out_bcount(cbHash) BYTE* pbHash, - __in DWORD cbHash - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/custommsierrors.h b/scripts/windows/installer/WiXSDK/inc/custommsierrors.h deleted file mode 100644 index ca9505a0ac..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/custommsierrors.h +++ /dev/null @@ -1,153 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -//------------------------------------------------------------------------------------------------- - -//--------------------------------------------------------------------------- -// Indexes for custom errors in the MSI -// -// Note: Custom Errors must be in the range 25000-30000, all other error -// codes are reserved for the Windows Installer as standard error ranges -// NEVER reuse an error number or you're likely to break the builds. -//--------------------------------------------------------------------------- - -// Instructions: -// 1. add the index to this file -// 2. define the error table row -// 3. #include CustomMsiErrors to refer to the index -// 4. Import Misc\CustomErrors { MYDEFINE=1 }; with your errorgroup under MYDEFINE - - -//--------------------------------------------------------------------------- -// GLOBAL 25501-25600 -#define GLOBAL_ERROR_BASE 25501 - -#define msierrSecureObjectsFailedCreateSD 25520 -#define msierrSecureObjectsFailedSet 25521 -#define msierrSecureObjectsUnknownType 25522 - -#define msierrXmlFileFailedRead 25530 -#define msierrXmlFileFailedOpen 25531 -#define msierrXmlFileFailedSelect 25532 -#define msierrXmlFileFailedSave 25533 - -#define msierrXmlConfigFailedRead 25540 -#define msierrXmlConfigFailedOpen 25541 -#define msierrXmlConfigFailedSelect 25542 -#define msierrXmlConfigFailedSave 25543 - -#define msierrFirewallCannotConnect 25580 - -//--------------------------------------------------------------------------- -// Server CustomAction Errors -// SERVER range: 26001-26100 -#define SERVER_ERROR_BASE 26000 - -#define msierrIISCannotConnect 26001 -#define msierrIISFailedReadWebSite 26002 -#define msierrIISFailedReadWebDirs 26003 -#define msierrIISFailedReadVDirs 26004 -#define msierrIISFailedReadFilters 26005 -#define msierrIISFailedReadAppPool 26006 -#define msierrIISFailedReadMimeMap 26007 -#define msierrIISFailedReadProp 26008 -#define msierrIISFailedReadWebSvcExt 26009 -#define msierrIISFailedReadWebError 26010 -#define msierrIISFailedReadHttpHeader 26011 - -#define msierrIISFailedSchedTransaction 26031 -#define msierrIISFailedSchedInstallWebs 26032 -#define msierrIISFailedSchedInstallWebDirs 26033 -#define msierrIISFailedSchedInstallVDirs 26034 -#define msierrIISFailedSchedInstallFilters 26035 -#define msierrIISFailedSchedInstallAppPool 26036 -#define msierrIISFailedSchedInstallProp 26037 -#define msierrIISFailedSchedInstallWebSvcExt 26038 - -#define msierrIISFailedSchedUninstallWebs 26051 -#define msierrIISFailedSchedUninstallWebDirs 26052 -#define msierrIISFailedSchedUninstallVDirs 26053 -#define msierrIISFailedSchedUninstallFilters 26054 -#define msierrIISFailedSchedUninstallAppPool 26055 -#define msierrIISFailedSchedUninstallProp 26056 -#define msierrIISFailedSchedUninstallWebSvcExt 26057 - -#define msierrIISFailedStartTransaction 26101 -#define msierrIISFailedOpenKey 26102 -#define msierrIISFailedCreateKey 26103 -#define msierrIISFailedWriteData 26104 -#define msierrIISFailedCreateApp 26105 -#define msierrIISFailedDeleteKey 26106 -#define msierrIISFailedDeleteApp 26107 -#define msierrIISFailedDeleteValue 26108 -#define msierrIISFailedCommitInUse 26109 - -#define msierrSQLFailedCreateDatabase 26201 -#define msierrSQLFailedDropDatabase 26202 -#define msierrSQLFailedConnectDatabase 26203 -#define msierrSQLFailedExecString 26204 -#define msierrSQLDatabaseAlreadyExists 26205 - -#define msierrPERFMONFailedRegisterDLL 26251 -#define msierrPERFMONFailedUnregisterDLL 26252 -#define msierrInstallPerfCounterData 26253 -#define msierrUninstallPerfCounterData 26254 - -#define msierrSMBFailedCreate 26301 -#define msierrSMBFailedDrop 26302 - -#define msierrCERTFailedOpen 26351 -#define msierrCERTFailedAdd 26352 - -#define msierrUSRFailedUserCreate 26401 -#define msierrUSRFailedUserCreatePswd 26402 -#define msierrUSRFailedUserGroupAdd 26403 -#define msierrUSRFailedUserCreateExists 26404 -#define msierrUSRFailedGrantLogonAsService 26405 - -#define msierrDependencyMissingDependencies 26451 -#define msierrDependencyHasDependents 26452 - -//-------------------------------------------------------------------------- -// Managed code CustomAction Errors -// MANAGED range: 27000-27100 -#define MANAGED_ERROR_BASE 27000 - -#define msierrDotNetRuntimeRequired 27000 -//--------------------------------------------------------------------------- -// Public CustomAction Errors -// PUBLIC range: 28001-28100 -#define PUBLIC_ERROR_BASE 28000 - -#define msierrComPlusCannotConnect 28001 -#define msierrComPlusPartitionReadFailed 28002 -#define msierrComPlusPartitionRoleReadFailed 28003 -#define msierrComPlusUserInPartitionRoleReadFailed 28004 -#define msierrComPlusPartitionUserReadFailed 28005 -#define msierrComPlusApplicationReadFailed 28006 -#define msierrComPlusApplicationRoleReadFailed 28007 -#define msierrComPlusUserInApplicationRoleReadFailed 28008 -#define msierrComPlusAssembliesReadFailed 28009 -#define msierrComPlusSubscriptionReadFailed 28010 -#define msierrComPlusPartitionDependency 28011 -#define msierrComPlusPartitionNotFound 28012 -#define msierrComPlusPartitionIdConflict 28013 -#define msierrComPlusPartitionNameConflict 28014 -#define msierrComPlusApplicationDependency 28015 -#define msierrComPlusApplicationNotFound 28016 -#define msierrComPlusApplicationIdConflict 28017 -#define msierrComPlusApplicationNameConflict 28018 -#define msierrComPlusApplicationRoleDependency 28019 -#define msierrComPlusApplicationRoleNotFound 28020 -#define msierrComPlusApplicationRoleConflict 28021 -#define msierrComPlusAssemblyDependency 28022 -#define msierrComPlusSubscriptionIdConflict 28023 -#define msierrComPlusSubscriptionNameConflict 28024 -#define msierrComPlusFailedLookupNames 28025 - -#define msierrMsmqCannotConnect 28101 diff --git a/scripts/windows/installer/WiXSDK/inc/dictutil.h b/scripts/windows/installer/WiXSDK/inc/dictutil.h deleted file mode 100644 index ed690c1325..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/dictutil.h +++ /dev/null @@ -1,79 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Header for string dict helper functions. -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -#define ReleaseDict(sdh) if (sdh) { DictDestroy(sdh); } -#define ReleaseNullDict(sdh) if (sdh) { DictDestroy(sdh); sdh = NULL; } - -typedef void* STRINGDICT_HANDLE; -typedef const void* C_STRINGDICT_HANDLE; - -extern const int STRINGDICT_HANDLE_BYTES; - -enum DICT_FLAG -{ - DICT_FLAG_NONE = 0, - DICT_FLAG_CASEINSENSITIVE = 1 -}; - -HRESULT DAPI DictCreateWithEmbeddedKey( - __out_bcount(STRINGDICT_HANDLE_BYTES) STRINGDICT_HANDLE* psdHandle, - __in DWORD dwNumExpectedItems, - __in_opt void **ppvArray, - __in size_t cByteOffset, - __in DICT_FLAG dfFlags - ); -HRESULT DAPI DictCreateStringList( - __out_bcount(STRINGDICT_HANDLE_BYTES) STRINGDICT_HANDLE* psdHandle, - __in DWORD dwNumExpectedItems, - __in DICT_FLAG dfFlags - ); -HRESULT DAPI DictCreateStringListFromArray( - __out_bcount(STRINGDICT_HANDLE_BYTES) STRINGDICT_HANDLE* psdHandle, - __in_ecount(cStringArray) const LPCWSTR* rgwzStringArray, - __in const DWORD cStringArray, - __in DICT_FLAG dfFlags - ); -HRESULT DAPI DictCompareStringListToArray( - __in_bcount(STRINGDICT_HANDLE_BYTES) STRINGDICT_HANDLE sdStringList, - __in_ecount(cStringArray) const LPCWSTR* rgwzStringArray, - __in const DWORD cStringArray - ); -HRESULT DAPI DictAddKey( - __in_bcount(STRINGDICT_HANDLE_BYTES) STRINGDICT_HANDLE sdHandle, - __in_z LPCWSTR szString - ); -HRESULT DAPI DictAddValue( - __in_bcount(STRINGDICT_HANDLE_BYTES) STRINGDICT_HANDLE sdHandle, - __in void *pvValue - ); -HRESULT DAPI DictKeyExists( - __in_bcount(STRINGDICT_HANDLE_BYTES) C_STRINGDICT_HANDLE sdHandle, - __in_z LPCWSTR szString - ); -HRESULT DAPI DictGetValue( - __in_bcount(STRINGDICT_HANDLE_BYTES) C_STRINGDICT_HANDLE sdHandle, - __in_z LPCWSTR szString, - __out void **ppvValue - ); -void DAPI DictDestroy( - __in_bcount(STRINGDICT_HANDLE_BYTES) STRINGDICT_HANDLE sdHandle - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/dirutil.h b/scripts/windows/installer/WiXSDK/inc/dirutil.h deleted file mode 100644 index ff04ad44ec..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/dirutil.h +++ /dev/null @@ -1,65 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Directory helper functions. -// -//------------------------------------------------------------------------------------------------- - -#pragma once - -enum DIR_DELETE -{ - DIR_DELETE_FILES = 1, - DIR_DELETE_RECURSE = 2, - DIR_DELETE_SCHEDULE = 4, -}; - -#ifdef __cplusplus -extern "C" { -#endif - -BOOL DAPI DirExists( - __in_z LPCWSTR wzPath, - __out_opt DWORD *pdwAttributes - ); - -HRESULT DAPI DirCreateTempPath( - __in_z LPCWSTR wzPrefix, - __out_ecount_z(cchPath) LPWSTR wzPath, - __in DWORD cchPath - ); - -HRESULT DAPI DirEnsureExists( - __in_z LPCWSTR wzPath, - __in_opt LPSECURITY_ATTRIBUTES psa - ); - -HRESULT DAPI DirEnsureDelete( - __in_z LPCWSTR wzPath, - __in BOOL fDeleteFiles, - __in BOOL fRecurse - ); - -HRESULT DAPI DirEnsureDeleteEx( - __in_z LPCWSTR wzPath, - __in DWORD dwFlags - ); - -HRESULT DAPI DirGetCurrent( - __deref_out_z LPWSTR* psczCurrentDirectory - ); - -HRESULT DAPI DirSetCurrent( - __in_z LPCWSTR wzDirectory - ); - -#ifdef __cplusplus -} -#endif - diff --git a/scripts/windows/installer/WiXSDK/inc/dutil.h b/scripts/windows/installer/WiXSDK/inc/dutil.h deleted file mode 100644 index bad9ec2e4a..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/dutil.h +++ /dev/null @@ -1,215 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Header for utility layer that provides standard support for asserts, exit macros -// -//------------------------------------------------------------------------------------------------- - -#define DAPI __stdcall -#define DAPIV __cdecl // used only for functions taking variable length arguments - -#define DAPI_(type) EXTERN_C type DAPI -#define DAPIV_(type) EXTERN_C type DAPIV - - -// enums -enum REPORT_LEVEL -{ - REPORT_NONE, // turns off report (only valid for XXXSetLevel()) - REPORT_WARNING, // written if want only warnings or reporting is on in general - REPORT_STANDARD, // written if reporting is on - REPORT_VERBOSE, // written only if verbose reporting is on - REPORT_DEBUG, // reporting useful when debugging code - REPORT_ERROR, // always gets reported, but can never be specified -}; - -// asserts and traces -typedef BOOL (DAPI *DUTIL_ASSERTDISPLAYFUNCTION)(__in_z LPCSTR sz); - -extern "C" void DAPI Dutil_SetAssertModule(__in HMODULE hAssertModule); -extern "C" void DAPI Dutil_SetAssertDisplayFunction(__in DUTIL_ASSERTDISPLAYFUNCTION pfn); -extern "C" void DAPI Dutil_Assert(__in_z LPCSTR szFile, __in int iLine); -extern "C" void DAPI Dutil_AssertSz(__in_z LPCSTR szFile, __in int iLine, __in_z LPCSTR szMsg); - -extern "C" void DAPI Dutil_TraceSetLevel(__in REPORT_LEVEL ll, __in BOOL fTraceFilenames); -extern "C" REPORT_LEVEL DAPI Dutil_TraceGetLevel(); -extern "C" void __cdecl Dutil_Trace(__in_z LPCSTR szFile, __in int iLine, __in REPORT_LEVEL rl, __in_z __format_string LPCSTR szMessage, ...); -extern "C" void __cdecl Dutil_TraceError(__in_z LPCSTR szFile, __in int iLine, __in REPORT_LEVEL rl, __in HRESULT hr, __in_z __format_string LPCSTR szMessage, ...); -extern "C" void DAPI Dutil_RootFailure(__in_z LPCSTR szFile, __in int iLine, __in HRESULT hrError); - -#ifdef DEBUG - -#define AssertSetModule(m) (void)Dutil_SetAssertModule(m) -#define AssertSetDisplayFunction(pfn) (void)Dutil_SetAssertDisplayFunction(pfn) -#define Assert(f) ((f) ? (void)0 : (void)Dutil_Assert(__FILE__, __LINE__)) -#define AssertSz(f, sz) ((f) ? (void)0 : (void)Dutil_AssertSz(__FILE__, __LINE__, sz)) - -#define TraceSetLevel(l, f) (void)Dutil_TraceSetLevel(l, f) -#define TraceGetLevel() (REPORT_LEVEL)Dutil_TraceGetLevel() -#define Trace(l, f) (void)Dutil_Trace(__FILE__, __LINE__, l, f, NULL) -#define Trace1(l, f, s) (void)Dutil_Trace(__FILE__, __LINE__, l, f, s) -#define Trace2(l, f, s, t) (void)Dutil_Trace(__FILE__, __LINE__, l, f, s, t) -#define Trace3(l, f, s, t, u) (void)Dutil_Trace(__FILE__, __LINE__, l, f, s, t, u) - -#define TraceError(x, f) (void)Dutil_TraceError(__FILE__, __LINE__, REPORT_ERROR, x, f, NULL) -#define TraceError1(x, f, s) (void)Dutil_TraceError(__FILE__, __LINE__, REPORT_ERROR, x, f, s) -#define TraceError2(x, f, s, t) (void)Dutil_TraceError(__FILE__, __LINE__, REPORT_ERROR, x, f, s, t) -#define TraceError3(x, f, s, t, u) (void)Dutil_TraceError(__FILE__, __LINE__, REPORT_ERROR, x, f, s, t, u) - -#define TraceErrorDebug(x, f) (void)Dutil_TraceError(__FILE__, __LINE__, REPORT_DEBUG, x, f, NULL) -#define TraceErrorDebug1(x, f, s) (void)Dutil_TraceError(__FILE__, __LINE__, REPORT_DEBUG, x, f, s) -#define TraceErrorDebug2(x, f, s, t) (void)Dutil_TraceError(__FILE__, __LINE__, REPORT_DEBUG, x, f, s, t) -#define TraceErrorDebug3(x, f, s, t, u) (void)Dutil_TraceError(__FILE__, __LINE__, REPORT_DEBUG, x, f, s, t, u) - -#else // !DEBUG - -#define AssertSetModule(m) -#define AssertSetDisplayFunction(pfn) -#define Assert(f) -#define AssertSz(f, sz) - -#define TraceSetLevel(l, f) -#define Trace(l, f) -#define Trace1(l, f, s) -#define Trace2(l, f, s, t) -#define Trace3(l, f, s, t, u) - -#define TraceError(x, f) -#define TraceError1(x, f, s) -#define TraceError2(x, f, s, t) -#define TraceError3(x, f, s, t, u) - -#define TraceErrorDebug(x, f) -#define TraceErrorDebug1(x, f, s) -#define TraceErrorDebug2(x, f, s, t) -#define TraceErrorDebug3(x, f, s, t, u) - -#endif // DEBUG - - -// ExitTrace can be overriden -#ifndef ExitTrace -#define ExitTrace TraceError -#endif -#ifndef ExitTrace1 -#define ExitTrace1 TraceError1 -#endif -#ifndef ExitTrace2 -#define ExitTrace2 TraceError2 -#endif -#ifndef ExitTrace3 -#define ExitTrace3 TraceError3 -#endif - -// Exit macros -#define ExitFunction() { goto LExit; } -#define ExitFunction1(x) { x; goto LExit; } - -#define ExitOnLastError(x, s) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s); goto LExit; } } -#define ExitOnLastError1(x, f, s) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace1(x, f, s); goto LExit; } } -#define ExitOnLastError2(x, f, s, t) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace2(x, f, s, t); goto LExit; } } - -#define ExitOnLastErrorDebugTrace(x, s) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); TraceErrorDebug(x, s); goto LExit; } } -#define ExitOnLastErrorDebugTrace1(x, f, s) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); TraceErrorDebug1(x, f, s); goto LExit; } } -#define ExitOnLastErrorDebugTrace2(x, f, s, t) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); TraceErrorDebug2(x, f, s, t); goto LExit; } } - -#define ExitWithLastError(x, s) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s); goto LExit; } -#define ExitWithLastError1(x, f, s) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace1(x, f, s); goto LExit; } -#define ExitWithLastError2(x, f, s, t) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace2(x, f, s, t); goto LExit; } -#define ExitWithLastError3(x, f, s, t, u) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace3(x, f, s, t, u); goto LExit; } - -#define ExitOnFailure(x, s) if (FAILED(x)) { ExitTrace(x, s); goto LExit; } -#define ExitOnFailure1(x, f, s) if (FAILED(x)) { ExitTrace1(x, f, s); goto LExit; } -#define ExitOnFailure2(x, f, s, t) if (FAILED(x)) { ExitTrace2(x, f, s, t); goto LExit; } -#define ExitOnFailure3(x, f, s, t, u) if (FAILED(x)) { ExitTrace3(x, f, s, t, u); goto LExit; } - -#define ExitOnRootFailure(x, s) if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s); goto LExit; } -#define ExitOnRootFailure1(x, f, s) if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace1(x, f, s); goto LExit; } -#define ExitOnRootFailure2(x, f, s, t) if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace2(x, f, s, t); goto LExit; } -#define ExitOnRootFailure3(x, f, s, t, u) if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace3(x, f, s, t, u); goto LExit; } - -#define ExitOnFailureDebugTrace(x, s) if (FAILED(x)) { TraceErrorDebug(x, s); goto LExit; } -#define ExitOnFailureDebugTrace1(x, f, s) if (FAILED(x)) { TraceErrorDebug1(x, f, s); goto LExit; } -#define ExitOnFailureDebugTrace2(x, f, s, t) if (FAILED(x)) { TraceErrorDebug2(x, f, s, t); goto LExit; } -#define ExitOnFailureDebugTrace3(x, f, s, t, u) if (FAILED(x)) { TraceErrorDebug3(x, f, s, t, u); goto LExit; } - -#define ExitOnNull(p, x, e, s) if (NULL == p) { x = e; Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s); goto LExit; } -#define ExitOnNull1(p, x, e, f, s) if (NULL == p) { x = e; Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace1(x, f, s); goto LExit; } -#define ExitOnNull2(p, x, e, f, s, t) if (NULL == p) { x = e; Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace2(x, f, s, t); goto LExit; } - -#define ExitOnNullWithLastError(p, x, s) if (NULL == p) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s); goto LExit; } -#define ExitOnNullWithLastError1(p, x, f, s) if (NULL == p) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace1(x, f, s); goto LExit; } - -#define ExitOnNullDebugTrace(p, x, e, s) if (NULL == p) { x = e; Dutil_RootFailure(__FILE__, __LINE__, x); TraceErrorDebug(x, s); goto LExit; } -#define ExitOnNullDebugTrace1(p, x, e, f, s) if (NULL == p) { x = e; Dutil_RootFailure(__FILE__, __LINE__, x); TraceErrorDebug1(x, f, s); goto LExit; } - -#define ExitOnInvalidHandleWithLastError(p, x, s) if (INVALID_HANDLE_VALUE == p) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s); goto LExit; } -#define ExitOnInvalidHandleWithLastError1(p, x, f, s) if (INVALID_HANDLE_VALUE == p) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace1(x, f, s); goto LExit; } - -#define ExitOnWin32Error(e, x, s) if (ERROR_SUCCESS != e) { x = HRESULT_FROM_WIN32(e); if (!FAILED(x)) { x = E_FAIL; } Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s); goto LExit; } -#define ExitOnWin32Error1(e, x, f, s) if (ERROR_SUCCESS != e) { x = HRESULT_FROM_WIN32(e); if (!FAILED(x)) { x = E_FAIL; } Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace1(x, f, s); goto LExit; } -#define ExitOnWin32Error2(e, x, f, s, t) if (ERROR_SUCCESS != e) { x = HRESULT_FROM_WIN32(e); if (!FAILED(x)) { x = E_FAIL; } Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace2(x, f, s, t); goto LExit; } - -// release macros -#define ReleaseObject(x) if (x) { x->Release(); } -#define ReleaseObjectArray(prg, cel) if (prg) { for (DWORD Dutil_ReleaseObjectArrayIndex = 0; Dutil_ReleaseObjectArrayIndex < cel; ++Dutil_ReleaseObjectArrayIndex) { ReleaseObject(prg[Dutil_ReleaseObjectArrayIndex]); } ReleaseMem(prg); } -#define ReleaseVariant(x) { ::VariantClear(&x); } -#define ReleaseNullObject(x) if (x) { (x)->Release(); x = NULL; } -#define ReleaseCertificate(x) if (x) { ::CertFreeCertificateContext(x); x=NULL; } -#define ReleaseHandle(x) if (x) { ::CloseHandle(x); x = NULL; } - - -// useful defines and macros -#define Unused(x) ((void)x) - -#ifndef countof -#if 1 -#define countof(ary) (sizeof(ary) / sizeof(ary[0])) -#else -#ifndef __cplusplus -#define countof(ary) (sizeof(ary) / sizeof(ary[0])) -#else -template static char countofVerify(void const *, T) throw() { return 0; } -template static void countofVerify(T *const, T *const *) throw() {}; -#define countof(arr) (sizeof(countofVerify(arr,&(arr))) * sizeof(arr)/sizeof(*(arr))) -#endif -#endif -#endif - -#define roundup(x, n) roundup_typed(x, n, DWORD) -#define roundup_typed(x, n, t) (((t)(x) + ((t)(n) - 1)) & ~((t)(n) - 1)) - -#define HRESULT_FROM_RPC(x) ((HRESULT) ((x) | FACILITY_RPC)) - -#ifndef MAXSIZE_T -#define MAXSIZE_T ((SIZE_T)~((SIZE_T)0)) -#endif - -typedef const BYTE* LPCBYTE; - -#define E_FILENOTFOUND HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) -#define E_PATHNOTFOUND HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) -#define E_INVALIDDATA HRESULT_FROM_WIN32(ERROR_INVALID_DATA) -#define E_INVALIDSTATE HRESULT_FROM_WIN32(ERROR_INVALID_STATE) -#define E_INSUFFICIENT_BUFFER HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) -#define E_MOREDATA HRESULT_FROM_WIN32(ERROR_MORE_DATA) -#define E_NOMOREITEMS HRESULT_FROM_WIN32(ERROR_NO_MORE_ITEMS) -#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND) -#define E_MODNOTFOUND HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND) -#define E_BADCONFIGURATION HRESULT_FROM_WIN32(ERROR_BAD_CONFIGURATION) - -#define AddRefAndRelease(x) { x->AddRef(); x->Release(); } - -#define MAKEDWORD(lo, hi) ((DWORD)MAKELONG(lo, hi)) -#define MAKEQWORDVERSION(mj, mi, b, r) (((DWORD64)MAKELONG(r, b)) | (((DWORD64)MAKELONG(mi, mj)) << 32)) - -// other functions -extern "C" HRESULT DAPI LoadSystemLibrary(__in_z LPCWSTR wzModuleName, __out HMODULE *phModule); -extern "C" HRESULT DAPI LoadSystemLibraryWithPath(__in_z LPCWSTR wzModuleName, __out HMODULE *phModule, __deref_out_z_opt LPWSTR* psczPath); diff --git a/scripts/windows/installer/WiXSDK/inc/eseutil.h b/scripts/windows/installer/WiXSDK/inc/eseutil.h deleted file mode 100644 index 0ed8cc31b5..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/eseutil.h +++ /dev/null @@ -1,233 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Header for Extensible Storage Engine (Jetblue) helper functions. -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -#define ReleaseEseQuery(pqh) if (pqh) { EseFinishQuery(pqh); } -#define ReleaseNullEseQuery(pqh) if (pqh) { EseFinishQuery(pqh); pqh = NULL; } - -struct ESE_COLUMN_SCHEMA -{ - JET_COLUMNID jcColumn; - LPCWSTR pszName; - JET_COLTYP jcColumnType; - BOOL fKey; // If this column is part of the key of the table - BOOL fFixed; - BOOL fNullable; - BOOL fAutoIncrement; -}; - -struct ESE_TABLE_SCHEMA -{ - JET_TABLEID jtTable; - LPCWSTR pszName; - DWORD dwColumns; - ESE_COLUMN_SCHEMA *pcsColumns; -}; - -struct ESE_DATABASE_SCHEMA -{ - DWORD dwTables; - ESE_TABLE_SCHEMA *ptsTables; -}; - -enum ESE_QUERY_TYPE -{ - ESE_QUERY_EXACT, - ESE_QUERY_FROM_TOP, - ESE_QUERY_FROM_BOTTOM -}; - -typedef void* ESE_QUERY_HANDLE; - -HRESULT DAPI EseBeginSession( - __out JET_INSTANCE *pjiInstance, - __out JET_SESID *pjsSession, - __in_z LPCWSTR pszInstance, - __in_z LPCWSTR pszPath - ); -HRESULT DAPI EseEndSession( - __in JET_INSTANCE jiInstance, - __in JET_SESID jsSession - ); -HRESULT DAPI EseEnsureDatabase( - __in JET_SESID jsSession, - __in_z LPCWSTR pszFile, - __in ESE_DATABASE_SCHEMA *pdsSchema, - __out JET_DBID* pjdbDb, - __in BOOL fExclusive, - __in BOOL fReadonly - ); -HRESULT DAPI EseCloseDatabase( - __in JET_SESID jsSession, - __in JET_DBID jdbDb - ); -HRESULT DAPI EseCreateTable( - __in JET_SESID jsSession, - __in JET_DBID jdbDb, - __in_z LPCWSTR pszTable, - __out JET_TABLEID *pjtTable - ); -HRESULT DAPI EseOpenTable( - __in JET_SESID jsSession, - __in JET_DBID jdbDb, - __in_z LPCWSTR pszTable, - __out JET_TABLEID *pjtTable - ); -HRESULT DAPI EseCloseTable( - __in JET_SESID jsSession, - __in JET_TABLEID jtTable - ); -HRESULT DAPI EseEnsureColumn( - __in JET_SESID jsSession, - __in JET_TABLEID jtTable, - __in_z LPCWSTR pszColumnName, - __in JET_COLTYP jcColumnType, - __in ULONG ulColumnSize, - __in BOOL fFixed, - __in BOOL fNullable, - __out_opt JET_COLUMNID *pjcColumn - ); -HRESULT DAPI EseGetColumn( - __in JET_SESID jsSession, - __in JET_TABLEID jtTable, - __in_z LPCWSTR pszColumnName, - __out JET_COLUMNID *pjcColumn - ); -HRESULT DAPI EseMoveCursor( - __in JET_SESID jsSession, - __in JET_TABLEID jtTable, - __in LONG lRow - ); -HRESULT DAPI EseDeleteRow( - __in JET_SESID jsSession, - __in JET_TABLEID jtTable - ); -HRESULT DAPI EseBeginTransaction( - __in JET_SESID jsSession - ); -HRESULT DAPI EseRollbackTransaction( - __in JET_SESID jsSession, - __in BOOL fAll - ); -HRESULT DAPI EseCommitTransaction( - __in JET_SESID jsSession - ); -HRESULT DAPI EsePrepareUpdate( - __in JET_SESID jsSession, - __in JET_TABLEID jtTable, - __in ULONG ulPrep - ); -HRESULT DAPI EseFinishUpdate( - __in JET_SESID jsSession, - __in JET_TABLEID jtTable, - __in BOOL fSeekToInsertedRecord - ); -HRESULT DAPI EseSetColumnBinary( - __in JET_SESID jsSession, - __in ESE_TABLE_SCHEMA tsTable, - __in DWORD dwColumn, - __in_bcount(cbBuffer) const BYTE* pbBuffer, - __in SIZE_T cbBuffer - ); -HRESULT DAPI EseSetColumnDword( - __in JET_SESID jsSession, - __in ESE_TABLE_SCHEMA tsTable, - __in DWORD dwColumn, - __in DWORD dwValue - ); -HRESULT DAPI EseSetColumnBool( - __in JET_SESID jsSession, - __in ESE_TABLE_SCHEMA tsTable, - __in DWORD dwColumn, - __in BOOL fValue - ); -HRESULT DAPI EseSetColumnString( - __in JET_SESID jsSession, - __in ESE_TABLE_SCHEMA tsTable, - __in DWORD dwColumn, - __in_z LPCWSTR pszValue - ); -HRESULT DAPI EseSetColumnEmpty( - __in JET_SESID jsSession, - __in ESE_TABLE_SCHEMA tsTable, - __in DWORD dwColumn - ); -HRESULT DAPI EseGetColumnBinary( - __in JET_SESID jsSession, - __in ESE_TABLE_SCHEMA tsTable, - __in DWORD dwColumn, - __deref_out_bcount(*piBuffer) BYTE** ppbBuffer, - __inout SIZE_T* piBuffer - ); -HRESULT DAPI EseGetColumnDword( - __in JET_SESID jsSession, - __in ESE_TABLE_SCHEMA tsTable, - __in DWORD dwColumn, - __out DWORD *pdwValue - ); -HRESULT DAPI EseGetColumnBool( - __in JET_SESID jsSession, - __in ESE_TABLE_SCHEMA tsTable, - __in DWORD dwColumn, - __out BOOL *pfValue - ); -HRESULT DAPI EseGetColumnString( - __in JET_SESID jsSession, - __in ESE_TABLE_SCHEMA tsTable, - __in DWORD dwColumn, - __out LPWSTR *ppszValue - ); - -// Call this once for each key column in the table -HRESULT DAPI EseBeginQuery( - __in JET_SESID jsSession, - __in JET_TABLEID jtTable, - __in ESE_QUERY_TYPE qtQueryType, - __out ESE_QUERY_HANDLE *peqhHandle - ); -HRESULT DAPI EseSetQueryColumnBinary( - __in ESE_QUERY_HANDLE eqhHandle, - __in_bcount(cbBuffer) const BYTE* pbBuffer, - __in SIZE_T cbBuffer, - __in BOOL fFinal // If this is true, all other key columns in the query will be set to "*" - ); -HRESULT DAPI EseSetQueryColumnDword( - __in ESE_QUERY_HANDLE eqhHandle, - __in DWORD dwData, - __in BOOL fFinal // If this is true, all other key columns in the query will be set to "*" - ); -HRESULT DAPI EseSetQueryColumnBool( - __in ESE_QUERY_HANDLE eqhHandle, - __in BOOL fValue, - __in BOOL fFinal // If this is true, all other key columns in the query will be set to "*" - ); -HRESULT DAPI EseSetQueryColumnString( - __in ESE_QUERY_HANDLE eqhHandle, - __in_z LPCWSTR pszString, - __in BOOL fFinal // If this is true, all other key columns in the query will be set to "*" - ); -HRESULT DAPI EseFinishQuery( - __in ESE_QUERY_HANDLE eqhHandle - ); -// Once all columns have been set up, call this and read the result -HRESULT DAPI EseRunQuery( - __in ESE_QUERY_HANDLE eqhHandle - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/fileutil.h b/scripts/windows/installer/WiXSDK/inc/fileutil.h deleted file mode 100644 index 212a1ec44b..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/fileutil.h +++ /dev/null @@ -1,229 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Header for file helper functions. -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -#define ReleaseFile(h) if (INVALID_HANDLE_VALUE != h) { ::CloseHandle(h); h = INVALID_HANDLE_VALUE; } -#define ReleaseFileHandle(h) if (INVALID_HANDLE_VALUE != h) { ::CloseHandle(h); h = INVALID_HANDLE_VALUE; } -#define ReleaseFileFindHandle(h) if (INVALID_HANDLE_VALUE != h) { ::FindClose(h); h = INVALID_HANDLE_VALUE; } - -#define FILEMAKEVERSION(major, minor, build, revision) static_cast((static_cast(major & 0xFFFF) << 48) \ - | (static_cast(minor & 0xFFFF) << 32) \ - | (static_cast(build & 0xFFFF) << 16) \ - | (static_cast(revision & 0xFFFF))) - -enum FILE_ARCHITECTURE -{ - FILE_ARCHITECTURE_UNKNOWN, - FILE_ARCHITECTURE_X86, - FILE_ARCHITECTURE_X64, - FILE_ARCHITECTURE_IA64, -}; - -enum FILE_ENCODING -{ - FILE_ENCODING_UNSPECIFIED = 0, - // TODO: distinguish between non-BOM utf-8 and ANSI in the future? - FILE_ENCODING_UTF8, - FILE_ENCODING_UTF8_WITH_BOM, - FILE_ENCODING_UTF16, - FILE_ENCODING_UTF16_WITH_BOM, -}; - - -LPWSTR DAPI FileFromPath( - __in_z LPCWSTR wzPath - ); -HRESULT DAPI FileResolvePath( - __in_z LPCWSTR wzRelativePath, - __out LPWSTR *ppwzFullPath - ); -HRESULT DAPI FileStripExtension( - __in_z LPCWSTR wzFileName, - __out LPWSTR *ppwzFileNameNoExtension - ); -HRESULT DAPI FileChangeExtension( - __in_z LPCWSTR wzFileName, - __in_z LPCWSTR wzNewExtension, - __out LPWSTR *ppwzFileNameNewExtension - ); -HRESULT DAPI FileAddSuffixToBaseName( - __in_z LPCWSTR wzFileName, - __in_z LPCWSTR wzSuffix, - __out_z LPWSTR* psczNewFileName - ); -HRESULT DAPI FileVersionFromString( - __in_z LPCWSTR wzVersion, - __out DWORD *pdwVerMajor, - __out DWORD* pdwVerMinor - ); -HRESULT DAPI FileVersionFromStringEx( - __in_z LPCWSTR wzVersion, - __in DWORD cchVersion, - __out DWORD64* pqwVersion - ); -HRESULT DAPI FileVersionToStringEx( - __in DWORD64 qwVersion, - __out LPWSTR* psczVersion - ); -HRESULT DAPI FileSetPointer( - __in HANDLE hFile, - __in DWORD64 dw64Move, - __out_opt DWORD64* pdw64NewPosition, - __in DWORD dwMoveMethod - ); -HRESULT DAPI FileSize( - __in_z LPCWSTR pwzFileName, - __out LONGLONG* pllSize - ); -HRESULT DAPI FileSizeByHandle( - __in HANDLE hFile, - __out LONGLONG* pllSize - ); -BOOL DAPI FileExistsEx( - __in_z LPCWSTR wzPath, - __out_opt DWORD *pdwAttributes - ); -BOOL DAPI FileExistsAfterRestart( - __in_z LPCWSTR wzPath, - __out_opt DWORD *pdwAttributes - ); -HRESULT DAPI FileRemoveFromPendingRename( - __in_z LPCWSTR wzPath - ); -HRESULT DAPI FileRead( - __deref_out_bcount_full(*pcbDest) LPBYTE* ppbDest, - __out DWORD* pcbDest, - __in_z LPCWSTR wzSrcPath - ); -HRESULT DAPI FileReadUntil( - __deref_out_bcount_full(*pcbDest) LPBYTE* ppbDest, - __out_range(<=, cbMaxRead) DWORD* pcbDest, - __in_z LPCWSTR wzSrcPath, - __in DWORD cbMaxRead - ); -HRESULT DAPI FileReadPartial( - __deref_out_bcount_full(*pcbDest) LPBYTE* ppbDest, - __out_range(<=, cbMaxRead) DWORD* pcbDest, - __in_z LPCWSTR wzSrcPath, - __in BOOL fSeek, - __in DWORD cbStartPosition, - __in DWORD cbMaxRead, - __in BOOL fPartialOK - ); -HRESULT DAPI FileWrite( - __in_z LPCWSTR pwzFileName, - __in DWORD dwFlagsAndAttributes, - __in_bcount_opt(cbData) LPCBYTE pbData, - __in DWORD cbData, - __out_opt HANDLE* pHandle - ); -HRESULT DAPI FileWriteHandle( - __in HANDLE hFile, - __in_bcount_opt(cbData) LPCBYTE pbData, - __in DWORD cbData - ); -HRESULT DAPI FileCopyUsingHandles( - __in HANDLE hSource, - __in HANDLE hTarget, - __in DWORD64 cbCopy, - __out_opt DWORD64* pcbCopied - ); -HRESULT DAPI FileEnsureCopy( - __in_z LPCWSTR wzSource, - __in_z LPCWSTR wzTarget, - __in BOOL fOverwrite - ); -HRESULT DAPI FileEnsureCopyWithRetry( - __in LPCWSTR wzSource, - __in LPCWSTR wzTarget, - __in BOOL fOverwrite, - __in DWORD cRetry, - __in DWORD dwWaitMilliseconds - ); -HRESULT DAPI FileEnsureMove( - __in_z LPCWSTR wzSource, - __in_z LPCWSTR wzTarget, - __in BOOL fOverwrite, - __in BOOL fAllowCopy - ); -HRESULT DAPI FileEnsureMoveWithRetry( - __in LPCWSTR wzSource, - __in LPCWSTR wzTarget, - __in BOOL fOverwrite, - __in BOOL fAllowCopy, - __in DWORD cRetry, - __in DWORD dwWaitMilliseconds - ); -HRESULT DAPI FileCreateTemp( - __in_z LPCWSTR wzPrefix, - __in_z LPCWSTR wzExtension, - __deref_opt_out_z LPWSTR* ppwzTempFile, - __out_opt HANDLE* phTempFile - ); -HRESULT DAPI FileCreateTempW( - __in_z LPCWSTR wzPrefix, - __in_z LPCWSTR wzExtension, - __deref_opt_out_z LPWSTR* ppwzTempFile, - __out_opt HANDLE* phTempFile - ); -HRESULT DAPI FileVersion( - __in_z LPCWSTR wzFilename, - __out DWORD *pdwVerMajor, - __out DWORD* pdwVerMinor - ); -HRESULT DAPI FileIsSame( - __in_z LPCWSTR wzFile1, - __in_z LPCWSTR wzFile2, - __out LPBOOL lpfSameFile - ); -HRESULT DAPI FileEnsureDelete( - __in_z LPCWSTR wzFile - ); -HRESULT DAPI FileGetTime( - __in_z LPCWSTR wzFile, - __out_opt LPFILETIME lpCreationTime, - __out_opt LPFILETIME lpLastAccessTime, - __out_opt LPFILETIME lpLastWriteTime - ); -HRESULT DAPI FileSetTime( - __in_z LPCWSTR wzFile, - __in_opt const FILETIME *lpCreationTime, - __in_opt const FILETIME *lpLastAccessTime, - __in_opt const FILETIME *lpLastWriteTime - ); -HRESULT DAPI FileResetTime( - __in_z LPCWSTR wzFile - ); -HRESULT DAPI FileExecutableArchitecture( - __in_z LPCWSTR wzFile, - __out FILE_ARCHITECTURE *pArchitecture - ); -HRESULT DAPI FileToString( - __in_z LPCWSTR wzFile, - __out LPWSTR *psczString, - __out_opt FILE_ENCODING *pfeEncoding - ); -HRESULT DAPI FileFromString( - __in_z LPCWSTR wzFile, - __in DWORD dwFlagsAndAttributes, - __in_z LPCWSTR sczString, - __in FILE_ENCODING feEncoding - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/gdiputil.h b/scripts/windows/installer/WiXSDK/inc/gdiputil.h deleted file mode 100644 index 0241f7b2dd..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/gdiputil.h +++ /dev/null @@ -1,41 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// GDI+ helper functions. -// -//------------------------------------------------------------------------------------------------- - -#pragma once - -#define ExitOnGdipFailure(g, x, s) { x = GdipHresultFromStatus(g); if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s); goto LExit; } } -#define ExitOnGdipFailure1(g, x, f, s) { x = GdipHresultFromStatus(g); if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace1(x, f, s); goto LExit; } } -#define ExitOnGdipFailure2(g, x, f, s, t) { x = GdipHresultFromStatus(g); if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace2(x, f, s, t); goto LExit; } } - -#ifdef __cplusplus -extern "C" { -#endif - -HRESULT DAPI GdipBitmapFromResource( - __in_opt HINSTANCE hinst, - __in_z LPCSTR szId, - __out Gdiplus::Bitmap **ppBitmap - ); - -HRESULT DAPI GdipBitmapFromFile( - __in_z LPCWSTR wzFileName, - __out Gdiplus::Bitmap **ppBitmap - ); - -HRESULT DAPI GdipHresultFromStatus( - __in Gdiplus::Status gs - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/iis7util.h b/scripts/windows/installer/WiXSDK/inc/iis7util.h deleted file mode 100644 index 953c6b17ee..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/iis7util.h +++ /dev/null @@ -1,233 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// IIS7 helper functions. -// -//------------------------------------------------------------------------------------------------- - - -#ifdef __cplusplus -extern "C" { -#endif - -// IIS Config schema names -#define IIS_CONFIG_ADD L"add" -#define IIS_CONFIG_ALLOWED L"allowed" -#define IIS_CONFIG_APPHOST_ROOT L"MACHINE/WEBROOT/APPHOST" -#define IIS_CONFIG_APPLICATION L"application" -#define IIS_CONFIG_APPPOOL L"applicationPool" -#define IIS_CONFIG_APPPOOL_AUTO L"autoStart" -#define IIS_CONFIG_APPPOOL_SECTION L"system.applicationHost/applicationPools" -#define IIS_CONFIG_AUTOSTART L"serverAutoStart" -#define IIS_CONFIG_BINDING L"binding" -#define IIS_CONFIG_BINDINGINFO L"bindingInformation" -#define IIS_CONFIG_BINDINGS L"bindings" -#define IIS_CONFIG_DESC L"description" -#define IIS_CONFIG_EXECUTABLE L"scriptProcessor" -#define IIS_CONFIG_ENABLED L"enabled" -#define IIS_CONFIG_ENABLE32 L"enable32BitAppOnWin64" -#define IIS_CONFIG_FILEEXT L"fileExtension" -#define IIS_CONFIG_FILTER L"filter" -#define IIS_CONFIG_GROUPID L"groupId" -#define IIS_CONFIG_HEADERS L"customHeaders" -#define IIS_CONFIG_HTTPERRORS_SECTION L"system.webServer/httpErrors" -#define IIS_CONFIG_ID L"id" -#define IIS_CONFIG_ISAPI_SECTION L"system.webServer/isapiFilters" -#define IIS_CONFIG_HTTPPROTO_SECTION L"system.webServer/httpProtocol" -#define IIS_CONFIG_LOG_SECTION L"system.applicationHost/log" -#define IIS_CONFIG_LOG_UTF8 L"logInUTF8" -#define IIS_CONFIG_LIMITS L"limits" -#define IIS_CONFIG_PIPELINEMODE L"managedPipelineMode" -#define IIS_CONFIG_MANAGEDRUNTIMEVERSION L"managedRuntimeVersion" -#define IIS_CONFIG_WEBLOG L"logFile" -#define IIS_CONFIG_LOGFORMAT L"logFormat" -#define IIS_CONFIG_MIMEMAP L"mimeMap" -#define IIS_CONFIG_MIMETYPE L"mimeType" -#define IIS_CONFIG_MODULES L"modules" -#define IIS_CONFIG_NAME L"name" -#define IIS_CONFIG_PATH L"path" -#define IIS_CONFIG_PHYSPATH L"physicalPath" -#define IIS_CONFIG_PROTOCOL L"protocol" -#define IIS_CONFIG_RESTRICTION_SECTION L"system.webServer/security/isapiCgiRestriction" -#define IIS_CONFIG_SITE L"site" -#define IIS_CONFIG_SITE_ID L"id" -#define IIS_CONFIG_SITES_SECTION L"system.applicationHost/sites" -#define IIS_CONFIG_CONNECTTIMEOUT L"connectionTimeout" -#define IIS_CONFIG_VDIR L"virtualDirectory" -#define IIS_CONFIG_VALUE L"value" -#define IIS_CONFIG_VERBS L"verb" -#define IIS_CONFIG_WEBLIMITS_SECTION L"system.applicationHost/webLimits" -#define IIS_CONFIG_WEBLIMITS_MAXBAND L"maxGlobalBandwidth" -#define IIS_CONFIG_TRUE L"true" -#define IIS_CONFIG_FALSE L"false" -#define IIS_CONFIG_ERROR L"error" -#define IIS_CONFIG_STATUSCODE L"statusCode" -#define IIS_CONFIG_SUBSTATUS L"subStatusCode" -#define IIS_CONFIG_LANGPATH L"prefixLanguageFilePath" -#define IIS_CONFIG_RESPMODE L"responseMode" -#define IIS_CONFIG_CLEAR L"clear" -#define IIS_CONFIG_RECYCLING L"recycling" -#define IIS_CONFIG_PEROIDRESTART L"periodicRestart" -#define IIS_CONFIG_TIME L"time" -#define IIS_CONFIG_REQUESTS L"requests" -#define IIS_CONFIG_SCHEDULE L"schedule" -#define IIS_CONFIG_MEMORY L"memory" -#define IIS_CONFIG_PRIVMEMORY L"privateMemory" -#define IIS_CONFIG_PROCESSMODEL L"processModel" -#define IIS_CONFIG_IDLETIMEOUT L"idleTimeout" -#define IIS_CONFIG_QUEUELENGTH L"queueLength" -#define IIS_CONFIG_IDENITITYTYPE L"identityType" -#define IIS_CONFIG_LOCALSYSTEM L"LocalSystem" -#define IIS_CONFIG_LOCALSERVICE L"LocalService" -#define IIS_CONFIG_NETWORKSERVICE L"NetworkService" -#define IIS_CONFIG_SPECIFICUSER L"SpecificUser" -#define IIS_CONFIG_APPLICATIONPOOLIDENTITY L"ApplicationPoolIdentity" -#define IIS_CONFIG_USERNAME L"userName" -#define IIS_CONFIG_PASSWORD L"password" -#define IIS_CONFIG_CPU L"cpu" -#define IIS_CONFIG_LIMIT L"limit" -#define IIS_CONFIG_CPU_ACTION L"action" -#define IIS_CONFIG_KILLW3WP L"KillW3wp" -#define IIS_CONFIG_NOACTION L"NoAction" -#define IIS_CONFIG_RESETINTERVAL L"resetInterval" -#define IIS_CONFIG_MAXWRKPROCESSES L"maxProcesses" -#define IIS_CONFIG_HANDLERS_SECTION L"system.webServer/handlers" -#define IIS_CONFIG_DEFAULTDOC_SECTION L"system.webServer/defaultDocument" -#define IIS_CONFIG_ASP_SECTION L"system.webServer/asp" -#define IIS_CONFIG_SCRIPTERROR L"scriptErrorSentToBrowser" -#define IIS_CONFIG_STATICCONTENT_SECTION L"system.webServer/staticContent" -#define IIS_CONFIG_HTTPEXPIRES L"httpExpires" -#define IIS_CONFIG_MAXAGE L"cacheControlMaxAge" -#define IIS_CONFIG_CLIENTCACHE L"clientCache" -#define IIS_CONFIG_CACHECONTROLMODE L"cacheControlMode" -#define IIS_CONFIG_USEMAXAGE L"UseMaxAge" -#define IIS_CONFIG_USEEXPIRES L"UseExpires" -#define IIS_CONFIG_CACHECUST L"cacheControlCustom" -#define IIS_CONFIG_ASP_SECTION L"system.webServer/asp" -#define IIS_CONFIG_SESSION L"session" -#define IIS_CONFIG_ALLOWSTATE L"allowSessionState" -#define IIS_CONFIG_TIMEOUT L"timeout" -#define IIS_CONFIG_BUFFERING L"bufferingOn" -#define IIS_CONFIG_PARENTPATHS L"enableParentPaths" -#define IIS_CONFIG_SCRIPTLANG L"scriptLanguage" -#define IIS_CONFIG_SCRIPTTIMEOUT L"scriptTimeout" -#define IIS_CONFIG_LIMITS L"limits" -#define IIS_CONFIG_ALLOWDEBUG L"appAllowDebugging" -#define IIS_CONFIG_ALLOWCLIENTDEBUG L"appAllowClientDebug" -#define IIS_CONFIG_CERTIFICATEHASH L"certificateHash" -#define IIS_CONFIG_CERTIFICATESTORENAME L"certificateStoreName" -#define IIS_CONFIG_HTTPLOGGING_SECTION L"system.webServer/httpLogging" -#define IIS_CONFIG_DONTLOG L"dontLog" - -typedef BOOL (CALLBACK* ENUMAPHOSTELEMENTPROC)(IAppHostElement*, LPVOID); -typedef BOOL (CALLBACK* VARIANTCOMPARATORPROC)(VARIANT*, VARIANT*); - -HRESULT DAPI Iis7PutPropertyVariant( - __in IAppHostElement *pElement, - __in LPCWSTR wzPropName, - __in VARIANT vtPut - ); - -HRESULT DAPI Iis7PutPropertyInteger( - __in IAppHostElement *pElement, - __in LPCWSTR wzPropName, - __in DWORD dValue - ); - -HRESULT DAPI Iis7PutPropertyString( - __in IAppHostElement *pElement, - __in LPCWSTR wzPropName, - __in LPCWSTR wzString - ); - -HRESULT DAPI Iis7PutPropertyBool( - __in IAppHostElement *pElement, - __in LPCWSTR wzPropName, - __in BOOL fValue); - -HRESULT DAPI Iis7GetPropertyVariant( - __in IAppHostElement *pElement, - __in LPCWSTR wzPropName, - __in VARIANT* vtGet - ); - -HRESULT DAPI Iis7GetPropertyString( - __in IAppHostElement *pElement, - __in LPCWSTR wzPropName, - __in LPWSTR* psczGet - ); - -struct IIS7_APPHOSTELEMENTCOMPARISON -{ - LPCWSTR sczElementName; - LPCWSTR sczAttributeName; - VARIANT* pvAttributeValue; - VARIANTCOMPARATORPROC pComparator; -}; - -BOOL DAPI Iis7IsMatchingAppHostElement( - __in IAppHostElement *pElement, - __in IIS7_APPHOSTELEMENTCOMPARISON* pComparison - ); - -HRESULT DAPI Iis7FindAppHostElementString( - __in IAppHostElementCollection *pCollection, - __in LPCWSTR wzElementName, - __in LPCWSTR wzAttributeName, - __in LPCWSTR wzAttributeValue, - __out IAppHostElement** ppElement, - __out DWORD* pdwIndex - ); - -HRESULT DAPI Iis7FindAppHostElementPath( - __in IAppHostElementCollection *pCollection, - __in LPCWSTR wzElementName, - __in LPCWSTR wzAttributeName, - __in LPCWSTR wzAttributeValue, - __out IAppHostElement** ppElement, - __out DWORD* pdwIndex - ); - -HRESULT DAPI Iis7FindAppHostElementInteger( - __in IAppHostElementCollection *pCollection, - __in LPCWSTR wzElementName, - __in LPCWSTR wzAttributeName, - __in DWORD dwAttributeValue, - __out IAppHostElement** ppElement, - __out DWORD* pdwIndex - ); - -HRESULT DAPI Iis7FindAppHostElementVariant( - __in IAppHostElementCollection *pCollection, - __in LPCWSTR wzElementName, - __in LPCWSTR wzAttributeName, - __in VARIANT* pvAttributeValue, - __out IAppHostElement** ppElement, - __out DWORD* pdwIndex - ); - -HRESULT DAPI Iis7EnumAppHostElements( - __in IAppHostElementCollection *pCollection, - __in ENUMAPHOSTELEMENTPROC pCallback, - __in LPVOID pContext, - __out IAppHostElement** ppElement, - __out DWORD* pdwIndex - ); - -HRESULT DAPI Iis7FindAppHostMethod( - __in IAppHostMethodCollection *pCollection, - __in LPCWSTR wzMethodName, - __out IAppHostMethod** ppMethod, - __out DWORD* pdwIndex - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/inetutil.h b/scripts/windows/installer/WiXSDK/inc/inetutil.h deleted file mode 100644 index 1b875735a3..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/inetutil.h +++ /dev/null @@ -1,49 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Internet utilites. -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -#define ReleaseInternet(h) if (h) { ::InternetCloseHandle(h); h = NULL; } -#define ReleaseNullInternet(h) if (h) { ::InternetCloseHandle(h); h = NULL; } - - -// functions -HRESULT DAPI InternetGetSizeByHandle( - __in HINTERNET hiFile, - __out LONGLONG* pllSize - ); - -HRESULT DAPI InternetGetCreateTimeByHandle( - __in HINTERNET hiFile, - __out LPFILETIME pft - ); - -HRESULT DAPI InternetQueryInfoString( - __in HINTERNET h, - __in DWORD dwInfo, - __deref_out_z LPWSTR* psczValue - ); - -HRESULT DAPI InternetQueryInfoNumber( - __in HINTERNET h, - __in DWORD dwInfo, - __out LONG* plInfo - ); - -#ifdef __cplusplus -} -#endif - diff --git a/scripts/windows/installer/WiXSDK/inc/iniutil.h b/scripts/windows/installer/WiXSDK/inc/iniutil.h deleted file mode 100644 index b2dfee9681..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/iniutil.h +++ /dev/null @@ -1,83 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Ini/cfg file helper functions. -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -#define ReleaseIni(ih) if (ih) { IniUninitialize(ih); } -#define ReleaseNullIni(ih) if (ih) { IniUninitialize(ih); ih = NULL; } - -typedef void* INI_HANDLE; -typedef const void* C_INI_HANDLE; - -extern const int INI_HANDLE_BYTES; - -struct INI_VALUE -{ - LPCWSTR wzName; - LPCWSTR wzValue; - - DWORD dwLineNumber; -}; - -HRESULT DAPI IniInitialize( - __out_bcount(INI_HANDLE_BYTES) INI_HANDLE* piHandle - ); -void DAPI IniUninitialize( - __in_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle - ); -HRESULT DAPI IniSetOpenTag( - __inout_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle, - __in_z_opt LPCWSTR wzOpenTagPrefix, - __in_z_opt LPCWSTR wzOpenTagPostfix - ); -HRESULT DAPI IniSetValueStyle( - __inout_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle, - __in_z_opt LPCWSTR wzValuePrefix, - __in_z_opt LPCWSTR wzValueSeparator - ); -HRESULT DAPI IniSetCommentStyle( - __inout_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle, - __in_z_opt LPCWSTR wzLinePrefix - ); -HRESULT DAPI IniParse( - __inout_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle, - __in LPCWSTR wzPath, - __out_opt FILE_ENCODING *pfeEncodingFound - ); -HRESULT DAPI IniGetValueList( - __in_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle, - __deref_out_ecount_opt(pcValues) INI_VALUE** prgivValues, - __out DWORD *pcValues - ); -HRESULT DAPI IniGetValue( - __in_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle, - __in LPCWSTR wzValueName, - __deref_out_z LPWSTR* psczValue - ); -HRESULT DAPI IniSetValue( - __in_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle, - __in LPCWSTR wzValueName, - __in_z_opt LPCWSTR wzValue - ); -HRESULT DAPI IniWriteFile( - __in_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle, - __in_z_opt LPCWSTR wzPath, - __in FILE_ENCODING feOverrideEncoding - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/jsonutil.h b/scripts/windows/installer/WiXSDK/inc/jsonutil.h deleted file mode 100644 index 56c1481753..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/jsonutil.h +++ /dev/null @@ -1,122 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// JavaScript Object Notation (JSON) helper functions. -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -enum JSON_TOKEN -{ - JSON_TOKEN_NONE, - JSON_TOKEN_ARRAY_START, - JSON_TOKEN_ARRAY_VALUE, - JSON_TOKEN_ARRAY_END, - JSON_TOKEN_OBJECT_START, - JSON_TOKEN_OBJECT_KEY, - JSON_TOKEN_OBJECT_VALUE, - JSON_TOKEN_OBJECT_END, - JSON_TOKEN_VALUE, -}; - -typedef struct _JSON_VALUE -{ -} JSON_VALUE; - -typedef struct _JSON_READER -{ - CRITICAL_SECTION cs; - LPWSTR sczJson; - - LPWSTR pwz; - JSON_TOKEN token; -} JSON_READER; - -typedef struct _JSON_WRITER -{ - CRITICAL_SECTION cs; - LPWSTR sczJson; - - JSON_TOKEN* rgTokenStack; - DWORD cTokens; - DWORD cMaxTokens; -} JSON_WRITER; - - -DAPI_(HRESULT) JsonInitializeReader( - __in_z LPCWSTR wzJson, - __in JSON_READER* pReader - ); - -DAPI_(void) JsonUninitializeReader( - __in JSON_READER* pReader - ); - -DAPI_(HRESULT) JsonReadNext( - __in JSON_READER* pReader, - __out JSON_TOKEN* pToken, - __out JSON_VALUE* pValue - ); - -DAPI_(HRESULT) JsonReadValue( - __in JSON_READER* pReader, - __in JSON_VALUE* pValue - ); - -DAPI_(HRESULT) JsonInitializeWriter( - __in JSON_WRITER* pWriter - ); - -DAPI_(void) JsonUninitializeWriter( - __in JSON_WRITER* pWriter - ); - -DAPI_(HRESULT) JsonWriteBool( - __in JSON_WRITER* pWriter, - __in BOOL fValue - ); - -DAPI_(HRESULT) JsonWriteNumber( - __in JSON_WRITER* pWriter, - __in DWORD dwValue - ); - -DAPI_(HRESULT) JsonWriteString( - __in JSON_WRITER* pWriter, - __in_z LPCWSTR wzValue - ); - -DAPI_(HRESULT) JsonWriteArrayStart( - __in JSON_WRITER* pWriter - ); - -DAPI_(HRESULT) JsonWriteArrayEnd( - __in JSON_WRITER* pWriter - ); - -DAPI_(HRESULT) JsonWriteObjectStart( - __in JSON_WRITER* pWriter - ); - -DAPI_(HRESULT) JsonWriteObjectKey( - __in JSON_WRITER* pWriter, - __in_z LPCWSTR wzKey - ); - -DAPI_(HRESULT) JsonWriteObjectEnd( - __in JSON_WRITER* pWriter - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/locutil.h b/scripts/windows/installer/WiXSDK/inc/locutil.h deleted file mode 100644 index 5046d5703b..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/locutil.h +++ /dev/null @@ -1,120 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Header for localization helper functions. -// -//------------------------------------------------------------------------------------------------- -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -struct LOC_STRING -{ - LPWSTR wzId; - LPWSTR wzText; - BOOL bOverridable; -}; - -const int LOC_CONTROL_NOT_SET = INT_MAX; - -struct LOC_CONTROL -{ - LPWSTR wzControl; - int nX; - int nY; - int nWidth; - int nHeight; - LPWSTR wzText; -}; - -const int WIX_LOCALIZATION_LANGUAGE_NOT_SET = INT_MAX; - -struct WIX_LOCALIZATION -{ - DWORD dwLangId; - - DWORD cLocStrings; - LOC_STRING* rgLocStrings; - - DWORD cLocControls; - LOC_CONTROL* rgLocControls; -}; - -/******************************************************************** - LocProbeForFile - Searches for a localization file on disk. - -*******************************************************************/ -HRESULT DAPI LocProbeForFile( - __in_z LPCWSTR wzBasePath, - __in_z LPCWSTR wzLocFileName, - __in_z_opt LPCWSTR wzLanguage, - __inout LPWSTR* psczPath - ); - -/******************************************************************** - LocLoadFromFile - Loads a localization file - -*******************************************************************/ -HRESULT DAPI LocLoadFromFile( - __in_z LPCWSTR wzWxlFile, - __out WIX_LOCALIZATION** ppWixLoc - ); - -/******************************************************************** - LocLoadFromResource - loads a localization file from a module's data - resource. - - NOTE: The resource data must be UTF-8 encoded. -*******************************************************************/ -HRESULT DAPI LocLoadFromResource( - __in HMODULE hModule, - __in_z LPCSTR szResource, - __out WIX_LOCALIZATION** ppWixLoc - ); - -/******************************************************************** - LocFree - free memory allocated when loading a localization file - -*******************************************************************/ -void DAPI LocFree( - __in_opt WIX_LOCALIZATION* pWixLoc - ); - -/******************************************************************** - LocLocalizeString - replace any #(loc.id) in a string with the - correct sub string -*******************************************************************/ -HRESULT DAPI LocLocalizeString( - __in const WIX_LOCALIZATION* pWixLoc, - __inout LPWSTR* psczInput - ); - -/******************************************************************** - LocGetControl - returns a control's localization information -*******************************************************************/ -HRESULT DAPI LocGetControl( - __in const WIX_LOCALIZATION* pWixLoc, - __in_z LPCWSTR wzId, - __out LOC_CONTROL** ppLocControl - ); - -/******************************************************************** - LocGetString - returns a string's localization information -*******************************************************************/ -extern "C" HRESULT DAPI LocGetString( - __in const WIX_LOCALIZATION* pWixLoc, - __in_z LPCWSTR wzId, - __out LOC_STRING** ppLocString - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/logutil.h b/scripts/windows/installer/WiXSDK/inc/logutil.h deleted file mode 100644 index 73ce81f7e1..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/logutil.h +++ /dev/null @@ -1,210 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Logging helper functions. -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -#define LogExitOnFailure(x, i, f) if (FAILED(x)) { LogErrorId(x, i, NULL, NULL, NULL); ExitTrace(x, f); goto LExit; } -#define LogExitOnFailure1(x, i, f, s) if (FAILED(x)) { LogErrorId(x, i, s, NULL, NULL); ExitTrace1(x, f, s); goto LExit; } -#define LogExitOnFailure2(x, i, f, s, t) if (FAILED(x)) { LogErrorId(x, i, s, t, NULL); ExitTrace2(x, f, s, t); goto LExit; } -#define LogExitOnFailure3(x, i, f, s, t, u) if (FAILED(x)) { LogErrorId(x, i, s, t, u); ExitTrace3(x, f, s, t, u); goto LExit; } - -#define LogExitOnRootFailure(x, i, f) if (FAILED(x)) { LogErrorId(x, i, NULL, NULL, NULL); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, f); goto LExit; } -#define LogExitOnRootFailure1(x, i, f, s) if (FAILED(x)) { LogErrorId(x, i, s, NULL, NULL); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace1(x, f, s); goto LExit; } -#define LogExitOnRootFailure2(x, i, f, s, t) if (FAILED(x)) { LogErrorId(x, i, s, t, NULL); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace2(x, f, s, t); goto LExit; } -#define LogExitOnRootFailure3(x, i, f, s, t, u) if (FAILED(x)) { LogErrorId(x, i, s, t, u); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace3(x, f, s, t, u); goto LExit; } - -typedef HRESULT (DAPI *PFN_LOGSTRINGWORKRAW)( - __in_z LPCSTR szString, - __in_opt LPVOID pvContext - ); - -// enums - -// structs - -// functions -BOOL DAPI IsLogInitialized(); - -BOOL DAPI IsLogOpen(); - -void DAPI LogInitialize( - __in HMODULE hModule - ); - -HRESULT DAPI LogOpen( - __in_z_opt LPCWSTR wzDirectory, - __in_z LPCWSTR wzLog, - __in_z_opt LPCWSTR wzPostfix, - __in_z_opt LPCWSTR wzExt, - __in BOOL fAppend, - __in BOOL fHeader, - __out_z_opt LPWSTR* psczLogPath - ); - -void DAPI LogDisable(); - -void DAPI LogRedirect( - __in_opt PFN_LOGSTRINGWORKRAW vpfLogStringWorkRaw, - __in_opt LPVOID pvContext - ); - -HRESULT DAPI LogRename( - __in_z LPCWSTR wzNewPath - ); - -void DAPI LogClose( - __in BOOL fFooter - ); - -void DAPI LogUninitialize( - __in BOOL fFooter - ); - -BOOL DAPI LogIsOpen(); - -HRESULT DAPI LogSetSpecialParams( - __in_z_opt LPCWSTR wzSpecialBeginLine, - __in_z_opt LPCWSTR wzSpecialAfterTimeStamp, - __in_z_opt LPCWSTR wzSpecialEndLine - ); - -REPORT_LEVEL DAPI LogSetLevel( - __in REPORT_LEVEL rl, - __in BOOL fLogChange - ); - -REPORT_LEVEL DAPI LogGetLevel(); - -HRESULT DAPI LogGetPath( - __out_ecount_z(cchLogPath) LPWSTR pwzLogPath, - __in DWORD cchLogPath - ); - -HANDLE DAPI LogGetHandle(); - -HRESULT DAPIV LogString( - __in REPORT_LEVEL rl, - __in_z __format_string LPCSTR szFormat, - ... - ); - -HRESULT DAPI LogStringArgs( - __in REPORT_LEVEL rl, - __in_z __format_string LPCSTR szFormat, - __in va_list args - ); - -HRESULT DAPIV LogStringLine( - __in REPORT_LEVEL rl, - __in_z __format_string LPCSTR szFormat, - ... - ); - -HRESULT DAPI LogStringLineArgs( - __in REPORT_LEVEL rl, - __in_z __format_string LPCSTR szFormat, - __in va_list args - ); - -HRESULT DAPI LogIdModuleArgs( - __in REPORT_LEVEL rl, - __in DWORD dwLogId, - __in_opt HMODULE hModule, - __in va_list args - ); - -/* - * Wraps LogIdModuleArgs, so inline to save the function call - */ - -inline HRESULT LogId( - __in REPORT_LEVEL rl, - __in DWORD dwLogId, - ... - ) -{ - HRESULT hr = S_OK; - va_list args; - - va_start(args, dwLogId); - hr = LogIdModuleArgs(rl, dwLogId, NULL, args); - va_end(args); - - return hr; -} - - -/* - * Wraps LogIdModuleArgs, so inline to save the function call - */ - -inline HRESULT LogIdArgs( - __in REPORT_LEVEL rl, - __in DWORD dwLogId, - __in va_list args - ) -{ - return LogIdModuleArgs(rl, dwLogId, NULL, args); -} - -HRESULT DAPIV LogErrorString( - __in HRESULT hrError, - __in_z __format_string LPCSTR szFormat, - ... - ); - -HRESULT DAPI LogErrorStringArgs( - __in HRESULT hrError, - __in_z __format_string LPCSTR szFormat, - __in va_list args - ); - -HRESULT DAPI LogErrorIdModule( - __in HRESULT hrError, - __in DWORD dwLogId, - __in_opt HMODULE hModule, - __in_z_opt LPCWSTR wzString1, - __in_z_opt LPCWSTR wzString2, - __in_z_opt LPCWSTR wzString3 - ); - -inline HRESULT LogErrorId( - __in HRESULT hrError, - __in DWORD dwLogId, - __in_z_opt LPCWSTR wzString1, - __in_z_opt LPCWSTR wzString2, - __in_z_opt LPCWSTR wzString3 - ) -{ - return LogErrorIdModule(hrError, dwLogId, NULL, wzString1, wzString2, wzString3); -} - -HRESULT DAPI LogHeader(); - -HRESULT DAPI LogFooter(); - -HRESULT LogStringWorkRaw( - __in_z LPCSTR szLogData - ); - -// begin the switch of LogXXX to LogStringXXX -#define Log LogString -#define LogLine LogStringLine - -#ifdef __cplusplus -} -#endif - diff --git a/scripts/windows/installer/WiXSDK/inc/memutil.h b/scripts/windows/installer/WiXSDK/inc/memutil.h deleted file mode 100644 index d3dea7f8c9..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/memutil.h +++ /dev/null @@ -1,59 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Header for memory helper functions. -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -#define ReleaseMem(p) if (p) { MemFree(p); } -#define ReleaseNullMem(p) if (p) { MemFree(p); p = NULL; } - -HRESULT DAPI MemInitialize(); -void DAPI MemUninitialize(); - -LPVOID DAPI MemAlloc( - __in SIZE_T cbSize, - __in BOOL fZero - ); -LPVOID DAPI MemReAlloc( - __in LPVOID pv, - __in SIZE_T cbSize, - __in BOOL fZero - ); -HRESULT DAPI MemEnsureArraySize( - __deref_out_bcount(cArray * cbArrayType) LPVOID* ppvArray, - __in DWORD cArray, - __in SIZE_T cbArrayType, - __in DWORD dwGrowthCount - ); -HRESULT DAPI MemInsertIntoArray( - __deref_out_bcount((cExistingArray + cNumInsertItems) * cbArrayType) LPVOID* ppvArray, - __in DWORD dwInsertIndex, - __in DWORD cNumInsertItems, - __in DWORD cExistingArray, - __in SIZE_T cbArrayType, - __in DWORD dwGrowthCount - ); - -HRESULT DAPI MemFree( - __in LPVOID pv - ); -SIZE_T DAPI MemSize( - __in LPCVOID pv - ); - -#ifdef __cplusplus -} -#endif - diff --git a/scripts/windows/installer/WiXSDK/inc/metautil.h b/scripts/windows/installer/WiXSDK/inc/metautil.h deleted file mode 100644 index b4df17d33c..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/metautil.h +++ /dev/null @@ -1,62 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// IIS Metabase helper functions. -// -//------------------------------------------------------------------------------------------------- - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -// structs - -// prototypes -HRESULT DAPI MetaFindWebBase( - __in IMSAdminBaseW* piMetabase, - __in_z LPCWSTR wzIP, - __in int iPort, - __in_z LPCWSTR wzHeader, - __in BOOL fSecure, - __out_ecount(cchWebBase) LPWSTR wzWebBase, - __in DWORD cchWebBase - ); -HRESULT DAPI MetaFindFreeWebBase( - __in IMSAdminBaseW* piMetabase, - __out_ecount(cchWebBase) LPWSTR wzWebBase, - __in DWORD cchWebBase - ); - -HRESULT DAPI MetaOpenKey( - __in IMSAdminBaseW* piMetabase, - __in METADATA_HANDLE mhKey, - __in_z LPCWSTR wzKey, - __in DWORD dwAccess, - __in DWORD cRetries, - __out METADATA_HANDLE* pmh - ); -HRESULT DAPI MetaGetValue( - __in IMSAdminBaseW* piMetabase, - __in METADATA_HANDLE mhKey, - __in_z LPCWSTR wzKey, - __inout METADATA_RECORD* pmr - ); -void DAPI MetaFreeValue( - __in METADATA_RECORD* pmr - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/osutil.h b/scripts/windows/installer/WiXSDK/inc/osutil.h deleted file mode 100644 index b5de193814..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/osutil.h +++ /dev/null @@ -1,49 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Operating system helper functions. -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -enum OS_VERSION -{ - OS_VERSION_UNKNOWN, - OS_VERSION_WINNT, - OS_VERSION_WIN2000, - OS_VERSION_WINXP, - OS_VERSION_WIN2003, - OS_VERSION_VISTA, - OS_VERSION_WIN2008, - OS_VERSION_WIN7, - OS_VERSION_WIN2008_R2, - OS_VERSION_FUTURE -}; - -void DAPI OsGetVersion( - __out OS_VERSION* pVersion, - __out DWORD* pdwServicePack - ); -HRESULT DAPI OsCouldRunPrivileged( - __out BOOL* pfPrivileged - ); -HRESULT DAPI OsIsRunningPrivileged( - __out BOOL* pfPrivileged - ); -HRESULT DAPI OsIsUacEnabled( - __out BOOL* pfUacEnabled - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/pathutil.h b/scripts/windows/installer/WiXSDK/inc/pathutil.h deleted file mode 100644 index 0956cd2596..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/pathutil.h +++ /dev/null @@ -1,213 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Header for path helper functions. -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -enum PATH_EXPAND -{ - PATH_EXPAND_ENVIRONMENT = 0x0001, - PATH_EXPAND_FULLPATH = 0x0002, -}; - - -/******************************************************************* - PathCommandLineAppend - appends a command line argument on to a - string such that ::CommandLineToArgv() will shred them correctly - (i.e. quote arguments with spaces in them). -********************************************************************/ -DAPI_(HRESULT) PathCommandLineAppend( - __deref_out_z LPWSTR* psczCommandLine, - __in_z LPCWSTR wzArgument - ); - -/******************************************************************* - PathFile - returns a pointer to the file part of the path. -********************************************************************/ -DAPI_(LPWSTR) PathFile( - __in_z LPCWSTR wzPath - ); - -/******************************************************************* - PathExtension - returns a pointer to the extension part of the path - (including the dot). -********************************************************************/ -DAPI_(LPCWSTR) PathExtension( - __in_z LPCWSTR wzPath - ); - -/******************************************************************* - PathGetDirectory - extracts the directory from a path. -********************************************************************/ -DAPI_(HRESULT) PathGetDirectory( - __in_z LPCWSTR wzPath, - __out LPWSTR *psczDirectory - ); - -/******************************************************************* - PathExpand - gets the full path to a file resolving environment - variables along the way. -********************************************************************/ -DAPI_(HRESULT) PathExpand( - __out LPWSTR *psczFullPath, - __in_z LPCWSTR wzRelativePath, - __in DWORD dwResolveFlags - ); - -/******************************************************************* - PathPrefix - prefixes a full path with \\?\ or \\?\UNC as - appropriate. -********************************************************************/ -DAPI_(HRESULT) PathPrefix( - __inout LPWSTR *psczFullPath - ); - -/******************************************************************* - PathFixedBackslashTerminate - appends a \ if path does not have it - already, but fails if the buffer is - insufficient. -********************************************************************/ -DAPI_(HRESULT) PathFixedBackslashTerminate( - __inout_ecount_z(cchPath) LPWSTR wzPath, - __in DWORD_PTR cchPath - ); - -/******************************************************************* - PathBackslashTerminate - appends a \ if path does not have it - already. -********************************************************************/ -DAPI_(HRESULT) PathBackslashTerminate( - __inout LPWSTR* psczPath - ); - -/******************************************************************* - PathForCurrentProcess - gets the full path to the currently executing - process or (optionally) a module inside the process. -********************************************************************/ -DAPI_(HRESULT) PathForCurrentProcess( - __inout LPWSTR *psczFullPath, - __in_opt HMODULE hModule - ); - -/******************************************************************* - PathRelativeToModule - gets the name of a file in the same - directory as the current process or (optionally) a module inside - the process -********************************************************************/ -DAPI_(HRESULT) PathRelativeToModule( - __inout LPWSTR *psczFullPath, - __in_opt LPCWSTR wzFileName, - __in_opt HMODULE hModule - ); - -/******************************************************************* - PathCreateTempFile - - Note: if wzDirectory is null, ::GetTempPath() will be used instead. - if wzFileNameTemplate is null, GetTempFileName() will be used instead. -*******************************************************************/ -DAPI_(HRESULT) PathCreateTempFile( - __in_opt LPCWSTR wzDirectory, - __in_opt __format_string LPCWSTR wzFileNameTemplate, - __in DWORD dwUniqueCount, - __in DWORD dwFileAttributes, - __out_opt LPWSTR* psczTempFile, - __out_opt HANDLE* phTempFile - ); - -/******************************************************************* - PathCreateTimeBasedTempFile - creates an empty temp file based on current - system time -********************************************************************/ -DAPI_(HRESULT) PathCreateTimeBasedTempFile( - __in_z_opt LPCWSTR wzDirectory, - __in_z LPCWSTR wzPrefix, - __in_z_opt LPCWSTR wzPostfix, - __in_z LPCWSTR wzExtension, - __deref_opt_out_z LPWSTR* psczTempFile, - __out_opt HANDLE* phTempFile - ); - -/******************************************************************* - PathCreateTempDirectory - - Note: if wzDirectory is null, ::GetTempPath() will be used instead. -*******************************************************************/ -DAPI_(HRESULT) PathCreateTempDirectory( - __in_opt LPCWSTR wzDirectory, - __in __format_string LPCWSTR wzDirectoryNameTemplate, - __in DWORD dwUniqueCount, - __out LPWSTR* psczTempDirectory - ); - -/******************************************************************* - PathGetKnownFolder - returns the path to a well-known shell folder - -*******************************************************************/ -DAPI_(HRESULT) PathGetKnownFolder( - __in int csidl, - __out LPWSTR* psczKnownFolder - ); - -/******************************************************************* - PathIsAbsolute - returns true if the path is absolute; false - otherwise. -*******************************************************************/ -DAPI_(BOOL) PathIsAbsolute( - __in_z LPCWSTR wzPath - ); - -/******************************************************************* - PathConcat - like .NET's Path.Combine, lets you build up a path - one piece -- file or directory -- at a time. -*******************************************************************/ -DAPI_(HRESULT) PathConcat( - __in_opt LPCWSTR wzPath1, - __in_opt LPCWSTR wzPath2, - __deref_out_z LPWSTR* psczCombined - ); - -/******************************************************************* - PathEnsureQuoted - ensures that a path is quoted; optionally, - this function also terminates a directory with a backslash - if it is not already. -*******************************************************************/ -DAPI_(HRESULT) PathEnsureQuoted( - __inout LPWSTR* ppszPath, - __in BOOL fDirectory - ); - -/******************************************************************* - PathCompare - compares the fully expanded path of the two paths using - ::CompareStringW(). -*******************************************************************/ -DAPI_(HRESULT) PathCompare( - __in_z LPCWSTR wzPath1, - __in_z LPCWSTR wzPath2, - __out int* pnResult - ); - -/******************************************************************* - PathCompress - sets the compression state on an existing file or - directory. A no-op on file systems that don't - support compression. -*******************************************************************/ -DAPI_(HRESULT) PathCompress( - __in_z LPCWSTR wzPath - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/perfutil.h b/scripts/windows/installer/WiXSDK/inc/perfutil.h deleted file mode 100644 index 0245db351a..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/perfutil.h +++ /dev/null @@ -1,34 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Performance helper functions. -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -// structs - - -// functions -void DAPI PerfInitialize( - ); -void DAPI PerfClickTime( - __out_opt LARGE_INTEGER* pliElapsed - ); -double DAPI PerfConvertToSeconds( - __in const LARGE_INTEGER* pli - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/polcutil.h b/scripts/windows/installer/WiXSDK/inc/polcutil.h deleted file mode 100644 index 95f2c4a735..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/polcutil.h +++ /dev/null @@ -1,47 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Header for Policy utility functions. -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -/******************************************************************** -PolcReadNumber - reads a number from policy. - -NOTE: S_FALSE returned if policy not set. -NOTE: out is set to default on S_FALSE or any error. -********************************************************************/ -HRESULT DAPI PolcReadNumber( - __in_z LPCWSTR wzPolicyPath, - __in_z LPCWSTR wzPolicyName, - __in DWORD dwDefault, - __out DWORD* pdw - ); - -/******************************************************************** -PolcReadString - reads a string from policy. - -NOTE: S_FALSE returned if policy not set. -NOTE: out is set to default on S_FALSE or any error. -********************************************************************/ -HRESULT DAPI PolcReadString( - __in_z LPCWSTR wzPolicyPath, - __in_z LPCWSTR wzPolicyName, - __in_z_opt LPCWSTR wzDefault, - __deref_out_z LPWSTR* pscz - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/procutil.h b/scripts/windows/installer/WiXSDK/inc/procutil.h deleted file mode 100644 index 7b7e5a2d2a..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/procutil.h +++ /dev/null @@ -1,85 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Header for process helper functions. -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -// structs -typedef struct _PROC_FILESYSTEMREDIRECTION -{ - BOOL fDisabled; - LPVOID pvRevertState; -} PROC_FILESYSTEMREDIRECTION; - -HRESULT DAPI ProcElevated( - __in HANDLE hProcess, - __out BOOL* pfElevated - ); - -HRESULT DAPI ProcWow64( - __in HANDLE hProcess, - __out BOOL* pfWow64 - ); -HRESULT DAPI ProcDisableWowFileSystemRedirection( - __in PROC_FILESYSTEMREDIRECTION* pfsr - ); -HRESULT DAPI ProcRevertWowFileSystemRedirection( - __in PROC_FILESYSTEMREDIRECTION* pfsr - ); - -HRESULT DAPI ProcExec( - __in_z LPCWSTR wzExecutablePath, - __in_z_opt LPCWSTR wzCommandLine, - __in int nCmdShow, - __out HANDLE *phProcess - ); -HRESULT DAPI ProcExecute( - __in_z LPWSTR wzCommand, - __out HANDLE *phProcess, - __out_opt HANDLE *phChildStdIn, - __out_opt HANDLE *phChildStdOutErr - ); -HRESULT DAPI ProcWaitForCompletion( - __in HANDLE hProcess, - __in DWORD dwTimeout, - __out DWORD *pReturnCode - ); -HRESULT DAPI ProcWaitForIds( - __in_ecount(cProcessIds) const DWORD* pdwProcessIds, - __in DWORD cProcessIds, - __in DWORD dwMilliseconds - ); -HRESULT DAPI ProcCloseIds( - __in_ecount(cProcessIds) const DWORD* pdwProcessIds, - __in DWORD cProcessIds - ); - -// following code in proc2utl.cpp due to dependency on PSAPI.DLL. -HRESULT DAPI ProcFindAllIdsFromExeName( - __in_z LPCWSTR wzExeName, - __out DWORD** ppdwProcessIds, - __out DWORD* pcProcessIds - ); - -// following code in proc3utl.cpp due to dependency on Wtsapi32.DLL. -HRESULT DAPI ProcExecuteAsInteractiveUser( - __in_z LPCWSTR wzExecutablePath, - __in_z LPCWSTR wzCommand, - __out HANDLE *phProcess - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/regutil.h b/scripts/windows/installer/WiXSDK/inc/regutil.h deleted file mode 100644 index 97d132fa0d..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/regutil.h +++ /dev/null @@ -1,240 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Registry helper functions. -// -//------------------------------------------------------------------------------------------------- - -#pragma once - - -#ifdef __cplusplus -extern "C" { -#endif - - -#define ReleaseRegKey(h) if (h) { ::RegCloseKey(h); h = NULL; } - -enum REG_KEY_BITNESS -{ - REG_KEY_DEFAULT = 0, - REG_KEY_32BIT = 1, - REG_KEY_64BIT = 2 -}; - -typedef LSTATUS (APIENTRY *PFN_REGCREATEKEYEXW)( - __in HKEY hKey, - __in LPCWSTR lpSubKey, - __reserved DWORD Reserved, - __in_opt LPWSTR lpClass, - __in DWORD dwOptions, - __in REGSAM samDesired, - __in_opt CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes, - __out PHKEY phkResult, - __out_opt LPDWORD lpdwDisposition - ); -typedef LSTATUS (APIENTRY *PFN_REGOPENKEYEXW)( - __in HKEY hKey, - __in_opt LPCWSTR lpSubKey, - __reserved DWORD ulOptions, - __in REGSAM samDesired, - __out PHKEY phkResult - ); -typedef LSTATUS (APIENTRY *PFN_REGDELETEKEYEXW)( - __in HKEY hKey, - __in LPCWSTR lpSubKey, - __in REGSAM samDesired, - __reserved DWORD Reserved - ); -typedef LSTATUS (APIENTRY *PFN_REGDELETEKEYW)( - __in HKEY hKey, - __in LPCWSTR lpSubKey - ); -typedef LSTATUS (APIENTRY *PFN_REGENUMKEYEXW)( - __in HKEY hKey, - __in DWORD dwIndex, - __out LPWSTR lpName, - __inout LPDWORD lpcName, - __reserved LPDWORD lpReserved, - __inout LPWSTR lpClass, - __inout_opt LPDWORD lpcClass, - __out_opt PFILETIME lpftLastWriteTime - ); -typedef LSTATUS (APIENTRY *PFN_REGENUMVALUEW)( - __in HKEY hKey, - __in DWORD dwIndex, - __out LPWSTR lpValueName, - __inout LPDWORD lpcchValueName, - __reserved LPDWORD lpReserved, - __out_opt LPDWORD lpType, - __out_opt LPBYTE lpData, - __out_opt LPDWORD lpcbData - ); -typedef LSTATUS (APIENTRY *PFN_REGQUERYINFOKEYW)( - __in HKEY hKey, - __out LPWSTR lpClass, - __inout_opt LPDWORD lpcClass, - __reserved LPDWORD lpReserved, - __out_opt LPDWORD lpcSubKeys, - __out_opt LPDWORD lpcMaxSubKeyLen, - __out_opt LPDWORD lpcMaxClassLen, - __out_opt LPDWORD lpcValues, - __out_opt LPDWORD lpcMaxValueNameLen, - __out_opt LPDWORD lpcMaxValueLen, - __out_opt LPDWORD lpcbSecurityDescriptor, - __out_opt PFILETIME lpftLastWriteTime - ); -typedef LSTATUS (APIENTRY *PFN_REGQUERYVALUEEXW)( - __in HKEY hKey, - __in_opt LPCWSTR lpValueName, - __reserved LPDWORD lpReserved, - __out_opt LPDWORD lpType, - __out_bcount_part_opt(*lpcbData, *lpcbData) __out_data_source(REGISTRY) LPBYTE lpData, - __inout_opt LPDWORD lpcbData - ); -typedef LSTATUS (APIENTRY *PFN_REGSETVALUEEXW)( - __in HKEY hKey, - __in_opt LPCWSTR lpValueName, - __reserved DWORD Reserved, - __in DWORD dwType, - __in_bcount_opt(cbData) CONST BYTE* lpData, - __in DWORD cbData - ); -typedef LSTATUS (APIENTRY *PFN_REGDELETEVALUEW)( - __in HKEY hKey, - __in_opt LPCWSTR lpValueName - ); - -HRESULT DAPI RegInitialize(); -void DAPI RegUninitialize(); - -void DAPI RegFunctionOverride( - __in_opt PFN_REGCREATEKEYEXW pfnRegCreateKeyExW, - __in_opt PFN_REGOPENKEYEXW pfnRegOpenKeyExW, - __in_opt PFN_REGDELETEKEYEXW pfnRegDeleteKeyExW, - __in_opt PFN_REGENUMKEYEXW pfnRegEnumKeyExW, - __in_opt PFN_REGENUMVALUEW pfnRegEnumValueW, - __in_opt PFN_REGQUERYINFOKEYW pfnRegQueryInfoKeyW, - __in_opt PFN_REGQUERYVALUEEXW pfnRegQueryValueExW, - __in_opt PFN_REGSETVALUEEXW pfnRegSetValueExW, - __in_opt PFN_REGDELETEVALUEW pfnRegDeleteValueW - ); -HRESULT DAPI RegCreate( - __in HKEY hkRoot, - __in_z LPCWSTR wzSubKey, - __in DWORD dwAccess, - __out HKEY* phk - ); -HRESULT DAPI RegCreateEx( - __in HKEY hkRoot, - __in_z LPCWSTR wzSubKey, - __in DWORD dwAccess, - __in BOOL fVolatile, - __in_opt SECURITY_ATTRIBUTES* pSecurityAttributes, - __out HKEY* phk, - __out_opt BOOL* pfCreated - ); -HRESULT DAPI RegOpen( - __in HKEY hkRoot, - __in_z LPCWSTR wzSubKey, - __in DWORD dwAccess, - __out HKEY* phk - ); -HRESULT DAPI RegDelete( - __in HKEY hkRoot, - __in_z LPCWSTR wzSubKey, - __in REG_KEY_BITNESS kbKeyBitness, - __in BOOL fDeleteTree - ); -HRESULT DAPI RegKeyEnum( - __in HKEY hk, - __in DWORD dwIndex, - __deref_out_z LPWSTR* psczKey - ); -HRESULT DAPI RegValueEnum( - __in HKEY hk, - __in DWORD dwIndex, - __deref_out_z LPWSTR* psczName, - __out_opt DWORD *pdwType - ); -HRESULT DAPI RegReadBinary( - __in HKEY hk, - __in_z_opt LPCWSTR wzName, - __deref_out_bcount_opt(*pcbBuffer) BYTE** ppbBuffer, - __out SIZE_T *pcbBuffer - ); -HRESULT DAPI RegReadString( - __in HKEY hk, - __in_z_opt LPCWSTR wzName, - __deref_out_z LPWSTR* psczValue - ); -HRESULT DAPI RegReadStringArray( - __in HKEY hk, - __in_z_opt LPCWSTR wzName, - __deref_out_ecount_opt(pcStrings) LPWSTR** prgsczStrings, - __out DWORD *pcStrings - ); -HRESULT DAPI RegReadVersion( - __in HKEY hk, - __in_z_opt LPCWSTR wzName, - __out DWORD64* pdw64Version - ); -HRESULT DAPI RegReadNumber( - __in HKEY hk, - __in_z_opt LPCWSTR wzName, - __out DWORD* pdwValue - ); -HRESULT DAPI RegReadQword( - __in HKEY hk, - __in_z_opt LPCWSTR wzName, - __out DWORD64* pqwValue - ); -HRESULT DAPI RegWriteBinary( - __in HKEY hk, - __in_z_opt LPCWSTR wzName, - __in_bcount(cbBuffer) const BYTE *pbBuffer, - __in DWORD cbBuffer - ); -HRESULT DAPI RegWriteString( - __in HKEY hk, - __in_z_opt LPCWSTR wzName, - __in_z_opt LPCWSTR wzValue - ); -HRESULT DAPI RegWriteStringArray( - __in HKEY hk, - __in_z_opt LPCWSTR wzName, - __in_ecount(cValues) LPWSTR *rgwzStrings, - __in DWORD cStrings - ); -HRESULT DAPI RegWriteStringFormatted( - __in HKEY hk, - __in_z_opt LPCWSTR wzName, - __in __format_string LPCWSTR szFormat, - ... - ); -HRESULT DAPI RegWriteNumber( - __in HKEY hk, - __in_z_opt LPCWSTR wzName, - __in DWORD dwValue - ); -HRESULT DAPI RegWriteQword( - __in HKEY hk, - __in_z_opt LPCWSTR wzName, - __in DWORD64 qwValue - ); -HRESULT DAPI RegQueryKey( - __in HKEY hk, - __out_opt DWORD* pcSubKeys, - __out_opt DWORD* pcValues - ); - -#ifdef __cplusplus -} -#endif - diff --git a/scripts/windows/installer/WiXSDK/inc/resrutil.h b/scripts/windows/installer/WiXSDK/inc/resrutil.h deleted file mode 100644 index 9accf8e3a3..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/resrutil.h +++ /dev/null @@ -1,55 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Resource read helper functions. -// -//------------------------------------------------------------------------------------------------- - -#pragma once - - -#ifdef __cplusplus -extern "C" { -#endif - -HRESULT DAPI ResGetStringLangId( - __in_opt LPCWSTR wzPath, - __in UINT uID, - __out WORD *pwLangId - ); - -HRESULT DAPI ResReadString( - __in HINSTANCE hinst, - __in UINT uID, - __deref_out_z LPWSTR* ppwzString - ); - -HRESULT DAPI ResReadStringAnsi( - __in HINSTANCE hinst, - __in UINT uID, - __deref_out_z LPSTR* ppszString - ); - -HRESULT DAPI ResReadData( - __in_opt HINSTANCE hinst, - __in_z LPCSTR szDataName, - __deref_out_bcount(*pcb) PVOID *ppv, - __out DWORD *pcb - ); - -HRESULT DAPI ResExportDataToFile( - __in_z LPCSTR szDataName, - __in_z LPCWSTR wzTargetFile, - __in DWORD dwCreationDisposition - ); - -#ifdef __cplusplus -} -#endif - diff --git a/scripts/windows/installer/WiXSDK/inc/reswutil.h b/scripts/windows/installer/WiXSDK/inc/reswutil.h deleted file mode 100644 index e8933dfae6..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/reswutil.h +++ /dev/null @@ -1,43 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Resource writer helper functions. -// -//------------------------------------------------------------------------------------------------- - -#pragma once - - -#ifdef __cplusplus -extern "C" { -#endif - -HRESULT DAPI ResWriteString( - __in_z LPCWSTR wzResourceFile, - __in DWORD dwDataId, - __in_z LPCWSTR wzData, - __in WORD wLangId - ); - -HRESULT DAPI ResWriteData( - __in_z LPCWSTR wzResourceFile, - __in_z LPCSTR szDataName, - __in PVOID pData, - __in DWORD cbData - ); - -HRESULT DAPI ResImportDataFromFile( - __in_z LPCWSTR wzTargetFile, - __in_z LPCWSTR wzSourceFile, - __in_z LPCSTR szDataName - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/rexutil.h b/scripts/windows/installer/WiXSDK/inc/rexutil.h deleted file mode 100644 index 771e0bae24..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/rexutil.h +++ /dev/null @@ -1,64 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Resource Cabinet Extract Utilities -// -//------------------------------------------------------------------------------------------------- - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -// defines -#define FILETABLESIZE 40 - -// structs -struct MEM_FILE -{ - LPCBYTE vpStart; - UINT uiCurrent; - UINT uiLength; -}; - -enum FAKE_FILE_TYPE { NORMAL_FILE, MEMORY_FILE }; - -typedef HRESULT (*REX_CALLBACK_PROGRESS)(BOOL fBeginFile, LPCWSTR wzFileId, LPVOID pvContext); -typedef VOID (*REX_CALLBACK_WRITE)(UINT cb); - - -struct FAKE_FILE // used __in internal file table -{ - BOOL fUsed; - FAKE_FILE_TYPE fftType; - MEM_FILE mfFile; // State for memory file - HANDLE hFile; // Handle for disk file -}; - -// functions -HRESULT RexInitialize(); -void RexUninitialize(); - -HRESULT RexExtract( - __in_z LPCSTR szResource, - __in_z LPCWSTR wzExtractId, - __in_z LPCWSTR wzExtractDir, - __in_z LPCWSTR wzExtractName, - __in REX_CALLBACK_PROGRESS pfnProgress, - __in REX_CALLBACK_WRITE pfnWrite, - __in LPVOID pvContext - ); - -#ifdef __cplusplus -} -#endif - diff --git a/scripts/windows/installer/WiXSDK/inc/rmutil.h b/scripts/windows/installer/WiXSDK/inc/rmutil.h deleted file mode 100644 index beec457d86..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/rmutil.h +++ /dev/null @@ -1,56 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Header for Restart Manager utility functions. -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct _RMU_SESSION *PRMU_SESSION; - -HRESULT DAPI RmuJoinSession( - __out PRMU_SESSION *ppSession, - __in_z LPCWSTR wzSessionKey - ); - -HRESULT DAPI RmuAddFile( - __in PRMU_SESSION pSession, - __in_z LPCWSTR wzPath - ); - -HRESULT DAPI RmuAddProcessById( - __in PRMU_SESSION pSession, - __in DWORD dwProcessId - ); - -HRESULT DAPI RmuAddProcessesByName( - __in PRMU_SESSION pSession, - __in_z LPCWSTR wzProcessName - ); - -HRESULT DAPI RmuAddService( - __in PRMU_SESSION pSession, - __in_z LPCWSTR wzServiceName - ); - -HRESULT DAPI RmuRegisterResources( - __in PRMU_SESSION pSession - ); - -HRESULT DAPI RmuEndSession( - __in PRMU_SESSION pSession - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/rssutil.h b/scripts/windows/installer/WiXSDK/inc/rssutil.h deleted file mode 100644 index 9df757c7f8..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/rssutil.h +++ /dev/null @@ -1,101 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// RSS helper functions. -// -//------------------------------------------------------------------------------------------------- - -#pragma once - - -#ifdef __cplusplus -extern "C" { -#endif - -#define ReleaseRssChannel(p) if (p) { RssFreeChannel(p); } -#define ReleaseNullRssChannel(p) if (p) { RssFreeChannel(p); p = NULL; } - - -struct RSS_UNKNOWN_ATTRIBUTE -{ - LPWSTR wzNamespace; - LPWSTR wzAttribute; - LPWSTR wzValue; - - RSS_UNKNOWN_ATTRIBUTE* pNext; -}; - -struct RSS_UNKNOWN_ELEMENT -{ - LPWSTR wzNamespace; - LPWSTR wzElement; - LPWSTR wzValue; - - RSS_UNKNOWN_ATTRIBUTE* pAttributes; - RSS_UNKNOWN_ELEMENT* pNext; -}; - -struct RSS_ITEM -{ - LPWSTR wzTitle; - LPWSTR wzLink; - LPWSTR wzDescription; - - LPWSTR wzGuid; - FILETIME ftPublished; - - LPWSTR wzEnclosureUrl; - DWORD dwEnclosureSize; - LPWSTR wzEnclosureType; - - RSS_UNKNOWN_ELEMENT* pUnknownElements; -}; - -struct RSS_CHANNEL -{ - LPWSTR wzTitle; - LPWSTR wzLink; - LPWSTR wzDescription; - DWORD dwTimeToLive; - - RSS_UNKNOWN_ELEMENT* pUnknownElements; - - DWORD cItems; - RSS_ITEM rgItems[1]; -}; - -HRESULT DAPI RssInitialize( - ); - -void DAPI RssUninitialize( - ); - -HRESULT DAPI RssParseFromString( - __in_z LPCWSTR wzRssString, - __out RSS_CHANNEL **ppChannel - ); - -HRESULT DAPI RssParseFromFile( - __in_z LPCWSTR wzRssFile, - __out RSS_CHANNEL **ppChannel - ); - -// Adding this until we have the updated specstrings.h -#ifndef __in_xcount -#define __in_xcount(size) -#endif - -void DAPI RssFreeChannel( - __in_xcount(pChannel->cItems) RSS_CHANNEL *pChannel - ); - -#ifdef __cplusplus -} -#endif - diff --git a/scripts/windows/installer/WiXSDK/inc/sceutil.h b/scripts/windows/installer/WiXSDK/inc/sceutil.h deleted file mode 100644 index 9a3fd52099..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/sceutil.h +++ /dev/null @@ -1,271 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Header for SQL Compact Edition helper functions. -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -typedef void* SCE_DATABASE_HANDLE; -typedef void* SCE_ROW_HANDLE; -typedef void* SCE_QUERY_HANDLE; -typedef void* SCE_QUERY_RESULTS_HANDLE; - -extern const int SCE_ROW_HANDLE_BYTES; -extern const int SCE_QUERY_HANDLE_BYTES; -extern const int SCE_QUERY_RESULTS_HANDLE_BYTES; - -#define ReleaseSceRow(prrh) if (prrh) { SceFreeRow(prrh); } -#define ReleaseNullSceRow(prrh) if (prrh) { SceFreeRow(prrh); prrh = NULL; } -#define ReleaseSceQuery(pqh) if (pqh) { SceFreeQuery(pqh); } -#define ReleaseNullSceQuery(pqh) if (pqh) { SceFreeQuery(pqh); pqh = NULL; } -#define ReleaseSceQueryResults(pqh) if (pqh) { SceFreeQueryResults(pqh); } -#define ReleaseNullSceQueryResults(pqh) if (pqh) { SceFreeQueryResults(pqh); pqh = NULL; } - -struct SCE_COLUMN_SCHEMA -{ - LPCWSTR wzName; - DBTYPE dbtColumnType; - DWORD dwLength; - BOOL fPrimaryKey; // If this column is the primary key - BOOL fNullable; - BOOL fAutoIncrement; - - LPWSTR wzRelationName; - DWORD dwForeignKeyTable; - DWORD dwForeignKeyColumn; -}; - -struct SCE_INDEX_SCHEMA -{ - LPWSTR wzName; - - DWORD *rgColumns; - DWORD cColumns; -}; - -struct SCE_TABLE_SCHEMA -{ - LPCWSTR wzName; - DWORD cColumns; - SCE_COLUMN_SCHEMA *rgColumns; - - DWORD cIndexes; - SCE_INDEX_SCHEMA *rgIndexes; - - // Internal to SCEUtil - consumers shouldn't access or modify - // TODO: enforce / hide in a handle of some sort? - IRowset *pIRowset; - IRowsetChange *pIRowsetChange; -}; - -struct SCE_DATABASE_SCHEMA -{ - DWORD cTables; - SCE_TABLE_SCHEMA *rgTables; -}; - -struct SCE_DATABASE -{ - SCE_DATABASE_HANDLE sdbHandle; - SCE_DATABASE_SCHEMA *pdsSchema; -}; - -HRESULT DAPI SceCreateDatabase( - __in_z LPCWSTR sczFile, - __deref_out SCE_DATABASE **ppDatabase - ); -HRESULT DAPI SceOpenDatabase( - __in_z LPCWSTR sczFile, - __in LPCWSTR wzSchemaType, - __in DWORD dwExpectedVersion, - __deref_out SCE_DATABASE **ppDatabase, - __in BOOL fReadOnly - ); -HRESULT DAPI SceEnsureDatabase( - __in_z LPCWSTR sczFile, - __in LPCWSTR wzSchemaType, - __in DWORD dwExpectedVersion, - __in SCE_DATABASE_SCHEMA *pdsSchema, - __deref_out SCE_DATABASE **ppDatabase - ); -HRESULT DAPI SceIsTableEmpty( - __in SCE_DATABASE *pDatabase, - __in DWORD dwTableIndex, - __out BOOL *pfEmpty - ); -HRESULT DAPI SceGetFirstRow( - __in SCE_DATABASE *pDatabase, - __in DWORD dwTableIndex, - __deref_out_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE *pRowHandle - ); -HRESULT DAPI SceGetNextRow( - __in SCE_DATABASE *pDatabase, - __in DWORD dwTableIndex, - __deref_out_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE *pRowHandle - ); -HRESULT DAPI SceBeginTransaction( - __in SCE_DATABASE *pDatabase - ); -HRESULT DAPI SceCommitTransaction( - __in SCE_DATABASE *pDatabase - ); -HRESULT DAPI SceRollbackTransaction( - __in SCE_DATABASE *pDatabase - ); -HRESULT DAPI SceDeleteRow( - __in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE *pRowHandle - ); -HRESULT DAPI ScePrepareInsert( - __in SCE_DATABASE *pDatabase, - __in DWORD dwTableIndex, - __deref_out_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE *pRowHandle - ); -HRESULT DAPI SceFinishUpdate( - __in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle - ); -HRESULT DAPI SceSetColumnBinary( - __in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle, - __in DWORD dwColumnIndex, - __in_bcount(cbBuffer) const BYTE* pbBuffer, - __in SIZE_T cbBuffer - ); -HRESULT DAPI SceSetColumnDword( - __in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle, - __in DWORD dwColumnIndex, - __in const DWORD dwValue - ); -HRESULT DAPI SceSetColumnQword( - __in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle, - __in DWORD dwColumnIndex, - __in const DWORD64 qwValue - ); -HRESULT DAPI SceSetColumnBool( - __in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle, - __in DWORD dwColumnIndex, - __in const BOOL fValue - ); -HRESULT DAPI SceSetColumnString( - __in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle, - __in DWORD dwColumnIndex, - __in_z_opt LPCWSTR wzValue - ); -HRESULT DAPI SceSetColumnSystemTime( - __in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle, - __in DWORD dwColumnIndex, - __in const SYSTEMTIME *pst - ); -HRESULT DAPI SceSetColumnEmpty( - __in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle, - __in DWORD dwColumnIndex - ); -HRESULT DAPI SceGetColumnBinary( - __in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowReadHandle, - __in DWORD dwColumnIndex, - __out_opt BYTE **ppbBuffer, - __inout SIZE_T *pcbBuffer - ); -HRESULT DAPI SceGetColumnDword( - __in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowReadHandle, - __in DWORD dwColumnIndex, - __out DWORD *pdwValue - ); -HRESULT DAPI SceGetColumnQword( - __in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowReadHandle, - __in DWORD dwColumnIndex, - __out DWORD64 *pqwValue - ); -HRESULT DAPI SceGetColumnBool( - __in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowReadHandle, - __in DWORD dwColumnIndex, - __out BOOL *pfValue - ); -HRESULT DAPI SceGetColumnString( - __in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowReadHandle, - __in DWORD dwColumnIndex, - __out_z LPWSTR *psczValue - ); -HRESULT DAPI SceGetColumnSystemTime( - __in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowReadHandle, - __in DWORD dwColumnIndex, - __out SYSTEMTIME *pst - ); -HRESULT DAPI SceBeginQuery( - __in SCE_DATABASE *pDatabase, - __in DWORD dwTableIndex, - __in DWORD dwIndex, - __deref_out_bcount(SCE_QUERY_HANDLE_BYTES) SCE_QUERY_HANDLE *psqhHandle - ); -HRESULT DAPI SceSetQueryColumnBinary( - __in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE sqhHandle, - __in_bcount(cbBuffer) const BYTE* pbBuffer, - __in SIZE_T cbBuffer - ); -HRESULT DAPI SceSetQueryColumnDword( - __in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE sqhHandle, - __in const DWORD dwValue - ); -HRESULT DAPI SceSetQueryColumnQword( - __in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE sqhHandle, - __in const DWORD64 qwValue - ); -HRESULT DAPI SceSetQueryColumnBool( - __in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE sqhHandle, - __in const BOOL fValue - ); -HRESULT DAPI SceSetQueryColumnString( - __in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE sqhHandle, - __in_z_opt LPCWSTR wzString - ); -HRESULT DAPI SceSetQueryColumnSystemTime( - __in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle, - __in const SYSTEMTIME *pst - ); -HRESULT DAPI SceSetQueryColumnEmpty( - __in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE sqhHandle - ); -HRESULT DAPI SceRunQueryExact( - __in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE *psqhHandle, - __deref_out_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE *pRowHandle - ); -HRESULT DAPI SceRunQueryRange( - __in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE *psqhHandle, - __deref_out_bcount(SCE_QUERY_RESULTS_BYTES) SCE_QUERY_RESULTS_HANDLE *psqrhHandle - ); -HRESULT DAPI SceGetNextResultRow( - __in_bcount(SCE_QUERY_RESULTS_BYTES) SCE_QUERY_RESULTS_HANDLE sqrhHandle, - __deref_out_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE *pRowHandle - ); -void DAPI SceCloseTable( - __in SCE_TABLE_SCHEMA *pTable - ); -HRESULT DAPI SceCloseDatabase( - __in SCE_DATABASE *pDatabase - ); -void DAPI SceFreeRow( - __in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowReadHandle - ); -void DAPI SceFreeQuery( - __in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE sqhHandle - ); -void DAPI SceFreeQueryResults( - __in_bcount(SCE_QUERY_RESULTS_BYTES) SCE_QUERY_RESULTS_HANDLE sqrhHandle - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/shelutil.h b/scripts/windows/installer/WiXSDK/inc/shelutil.h deleted file mode 100644 index 462dcacbbe..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/shelutil.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Header for shell helper functions. -// -//------------------------------------------------------------------------------------------------- - -#ifndef REFKNOWNFOLDERID -#define REFKNOWNFOLDERID REFGUID -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -typedef BOOL (STDAPICALLTYPE *PFN_SHELLEXECUTEEXW)( - __inout LPSHELLEXECUTEINFOW lpExecInfo - ); - -void DAPI ShelFunctionOverride( - __in_opt PFN_SHELLEXECUTEEXW pfnShellExecuteExW - ); -HRESULT DAPI ShelExec( - __in_z LPCWSTR wzTargetPath, - __in_opt LPCWSTR wzParameters, - __in_opt LPCWSTR wzVerb, - __in_opt LPCWSTR wzWorkingDirectory, - __in int nShowCmd, - __in_opt HWND hwndParent, - __out_opt HANDLE* phProcess - ); -HRESULT DAPI ShelExecUnelevated( - __in_z LPCWSTR wzTargetPath, - __in_z_opt LPCWSTR wzParameters, - __in_z_opt LPCWSTR wzVerb, - __in_z_opt LPCWSTR wzWorkingDirectory, - __in int nShowCmd - ); -HRESULT DAPI ShelGetFolder( - __out_z LPWSTR* psczFolderPath, - __in int csidlFolder - ); -HRESULT DAPI ShelGetKnownFolder( - __out_z LPWSTR* psczFolderPath, - __in REFKNOWNFOLDERID rfidFolder - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/sqlutil.h b/scripts/windows/installer/WiXSDK/inc/sqlutil.h deleted file mode 100644 index eadcb31c61..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/sqlutil.h +++ /dev/null @@ -1,146 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// SQL helper functions. -// -//------------------------------------------------------------------------------------------------- - -#include -#include -#include - - -#ifdef __cplusplus -extern "C" { -#endif - -// Adding this until the SQL annotations are published to specstrings.h -#ifndef __sql_command -#define __sql_command -#endif - -// structs -struct SQL_FILESPEC -{ - WCHAR wzName[MAX_PATH]; - WCHAR wzFilename[MAX_PATH]; - WCHAR wzSize[MAX_PATH]; - WCHAR wzMaxSize[MAX_PATH]; - WCHAR wzGrow[MAX_PATH]; -}; - - -// functions -HRESULT DAPI SqlConnectDatabase( - __in_z LPCWSTR wzServer, - __in_z LPCWSTR wzInstance, - __in_z LPCWSTR wzDatabase, - __in BOOL fIntegratedAuth, - __in_z LPCWSTR wzUser, - __in_z LPCWSTR wzPassword, - __out IDBCreateSession** ppidbSession - ); -HRESULT DAPI SqlStartTransaction( - __in IDBCreateSession* pidbSession, - __out IDBCreateCommand** ppidbCommand, - __out ITransaction** ppit - ); -HRESULT DAPI SqlEndTransaction( - __in ITransaction* pit, - __in BOOL fCommit - ); -HRESULT DAPI SqlDatabaseExists( - __in_z LPCWSTR wzServer, - __in_z LPCWSTR wzInstance, - __in_z LPCWSTR wzDatabase, - __in BOOL fIntegratedAuth, - __in_z LPCWSTR wzUser, - __in_z LPCWSTR wzPassword, - __out_opt BSTR* pbstrErrorDescription - ); -HRESULT DAPI SqlSessionDatabaseExists( - __in IDBCreateSession* pidbSession, - __in_z LPCWSTR wzDatabase, - __out_opt BSTR* pbstrErrorDescription - ); -HRESULT DAPI SqlDatabaseEnsureExists( - __in_z LPCWSTR wzServer, - __in_z LPCWSTR wzInstance, - __in_z LPCWSTR wzDatabase, - __in BOOL fIntegratedAuth, - __in_z LPCWSTR wzUser, - __in_z LPCWSTR wzPassword, - __in_opt const SQL_FILESPEC* psfDatabase, - __in_opt const SQL_FILESPEC* psfLog, - __out_opt BSTR* pbstrErrorDescription - ); -HRESULT DAPI SqlSessionDatabaseEnsureExists( - __in IDBCreateSession* pidbSession, - __in_z LPCWSTR wzDatabase, - __in_opt const SQL_FILESPEC* psfDatabase, - __in_opt const SQL_FILESPEC* psfLog, - __out_opt BSTR* pbstrErrorDescription - ); -HRESULT DAPI SqlCreateDatabase( - __in_z LPCWSTR wzServer, - __in_z LPCWSTR wzInstance, - __in_z LPCWSTR wzDatabase, - __in BOOL fIntegratedAuth, - __in_z LPCWSTR wzUser, - __in_z LPCWSTR wzPassword, - __in_opt const SQL_FILESPEC* psfDatabase, - __in_opt const SQL_FILESPEC* psfLog, - __out_opt BSTR* pbstrErrorDescription - ); -HRESULT DAPI SqlSessionCreateDatabase( - __in IDBCreateSession* pidbSession, - __in_z LPCWSTR wzDatabase, - __in_opt const SQL_FILESPEC* psfDatabase, - __in_opt const SQL_FILESPEC* psfLog, - __out_opt BSTR* pbstrErrorDescription - ); -HRESULT DAPI SqlDropDatabase( - __in_z LPCWSTR wzServer, - __in_z LPCWSTR wzInstance, - __in_z LPCWSTR wzDatabase, - __in BOOL fIntegratedAuth, - __in_z LPCWSTR wzUser, - __in_z LPCWSTR wzPassword, - __out_opt BSTR* pbstrErrorDescription - ); -HRESULT DAPI SqlSessionDropDatabase( - __in IDBCreateSession* pidbSession, - __in_z LPCWSTR wzDatabase, - __out_opt BSTR* pbstrErrorDescription - ); -HRESULT DAPI SqlSessionExecuteQuery( - __in IDBCreateSession* pidbSession, - __in __sql_command LPCWSTR wzSql, - __out_opt IRowset** ppirs, - __out_opt DBROWCOUNT* pcRows, - __out_opt BSTR* pbstrErrorDescription - ); -HRESULT DAPI SqlCommandExecuteQuery( - __in IDBCreateCommand* pidbCommand, - __in __sql_command LPCWSTR wzSql, - __out IRowset** ppirs, - __out DBROWCOUNT* pcRows - ); -HRESULT DAPI SqlGetErrorInfo( - __in IUnknown* pObjectWithError, - __in REFIID IID_InterfaceWithError, - __in DWORD dwLocaleId, - __out_opt BSTR* pbstrErrorSource, - __out_opt BSTR* pbstrErrorDescription - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/srputil.h b/scripts/windows/installer/WiXSDK/inc/srputil.h deleted file mode 100644 index 952b2470f1..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/srputil.h +++ /dev/null @@ -1,57 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// System restore point helper functions. -// -//------------------------------------------------------------------------------------------------- - -#pragma once - - -#ifdef __cplusplus -extern "C" { -#endif - - -enum SRP_ACTION -{ - SRP_ACTION_UNKNOWN, - SRP_ACTION_UNINSTALL, - SRP_ACTION_INSTALL, - SRP_ACTION_MODIFY, -}; - - -/******************************************************************** - SrpInitialize - initializes system restore point functionality. - -*******************************************************************/ -DAPI_(HRESULT) SrpInitialize( - __in BOOL fInitializeComSecurity - ); - -/******************************************************************** - SrpUninitialize - uninitializes system restore point functionality. - -*******************************************************************/ -DAPI_(void) SrpUninitialize(); - -/******************************************************************** - SrpCreateRestorePoint - creates a system restore point. - -*******************************************************************/ -DAPI_(HRESULT) SrpCreateRestorePoint( - __in_z LPCWSTR wzApplicationName, - __in SRP_ACTION action - ); - -#ifdef __cplusplus -} -#endif - diff --git a/scripts/windows/installer/WiXSDK/inc/strutil.h b/scripts/windows/installer/WiXSDK/inc/strutil.h deleted file mode 100644 index e8dc1acba9..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/strutil.h +++ /dev/null @@ -1,279 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Header for string helper functions. -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -#define ReleaseStr(pwz) if (pwz) { StrFree(pwz); } -#define ReleaseNullStr(pwz) if (pwz) { StrFree(pwz); pwz = NULL; } -#define ReleaseBSTR(bstr) if (bstr) { ::SysFreeString(bstr); } -#define ReleaseNullBSTR(bstr) if (bstr) { ::SysFreeString(bstr); bstr = NULL; } -#define ReleaseStrArray(rg, c) { if (rg) { StrArrayFree(rg, c); } } -#define ReleaseNullStrArray(rg, c) { if (rg) { StrArrayFree(rg, c); c = 0; rg = NULL; } } - -#define DeclareConstBSTR(bstr_const, wz) const WCHAR bstr_const[] = { 0x00, 0x00, sizeof(wz)-sizeof(WCHAR), 0x00, wz } -#define UseConstBSTR(bstr_const) const_cast(bstr_const + 4) - -HRESULT DAPI StrAlloc( - __deref_out_ecount_part(cch, 0) LPWSTR* ppwz, - __in DWORD_PTR cch - ); -HRESULT DAPI StrTrimCapacity( - __deref_out_z LPWSTR* ppwz - ); -HRESULT DAPI StrTrimWhitespace( - __deref_out_z LPWSTR* ppwz, - __in_z LPCWSTR wzSource - ); -HRESULT DAPI StrAnsiAlloc( - __deref_out_ecount_part(cch, 0) LPSTR* ppz, - __in DWORD_PTR cch - ); -HRESULT DAPI StrAnsiTrimCapacity( - __deref_out_z LPSTR* ppz - ); -HRESULT DAPI StrAnsiTrimWhitespace( - __deref_out_z LPSTR* ppz, - __in_z LPCSTR szSource - ); -HRESULT DAPI StrAllocString( - __deref_out_ecount_z(cchSource+1) LPWSTR* ppwz, - __in_z LPCWSTR wzSource, - __in DWORD_PTR cchSource - ); -HRESULT DAPI StrAnsiAllocString( - __deref_out_ecount_z(cchSource+1) LPSTR* ppsz, - __in_z LPCWSTR wzSource, - __in DWORD_PTR cchSource, - __in UINT uiCodepage - ); -HRESULT DAPI StrAllocStringAnsi( - __deref_out_ecount_z(cchSource+1) LPWSTR* ppwz, - __in_z LPCSTR szSource, - __in DWORD_PTR cchSource, - __in UINT uiCodepage - ); -HRESULT DAPI StrAnsiAllocStringAnsi( - __deref_out_ecount_z(cchSource+1) LPSTR* ppsz, - __in_z LPCSTR szSource, - __in DWORD_PTR cchSource - ); -HRESULT DAPI StrAllocPrefix( - __deref_out_z LPWSTR* ppwz, - __in_z LPCWSTR wzPrefix, - __in DWORD_PTR cchPrefix - ); -HRESULT DAPI StrAllocConcat( - __deref_out_z LPWSTR* ppwz, - __in_z LPCWSTR wzSource, - __in DWORD_PTR cchSource - ); -HRESULT DAPI StrAnsiAllocConcat( - __deref_out_z LPSTR* ppz, - __in_z LPCSTR pzSource, - __in DWORD_PTR cchSource - ); -HRESULT __cdecl StrAllocFormatted( - __deref_out_z LPWSTR* ppwz, - __in __format_string LPCWSTR wzFormat, - ... - ); -HRESULT __cdecl StrAnsiAllocFormatted( - __deref_out_z LPSTR* ppsz, - __in __format_string LPCSTR szFormat, - ... - ); -HRESULT DAPI StrAllocFormattedArgs( - __deref_out_z LPWSTR* ppwz, - __in __format_string LPCWSTR wzFormat, - __in va_list args - ); -HRESULT DAPI StrAnsiAllocFormattedArgs( - __deref_out_z LPSTR* ppsz, - __in __format_string LPCSTR szFormat, - __in va_list args - ); -HRESULT DAPI StrAllocFromError( - __inout LPWSTR *ppwzMessage, - __in HRESULT hrError, - __in_opt HMODULE hModule, - ... - ); - -HRESULT DAPI StrMaxLength( - __in LPCVOID p, - __out DWORD_PTR* pcch - ); -HRESULT DAPI StrSize( - __in LPCVOID p, - __out DWORD_PTR* pcb - ); - -HRESULT DAPI StrFree( - __in LPVOID p - ); - - -HRESULT DAPI StrReplaceStringAll( - __inout LPWSTR* ppwzOriginal, - __in_z LPCWSTR wzOldSubString, - __in_z LPCWSTR wzNewSubString - ); -HRESULT DAPI StrReplaceString( - __inout LPWSTR* ppwzOriginal, - __inout DWORD* pdwStartIndex, - __in_z LPCWSTR wzOldSubString, - __in_z LPCWSTR wzNewSubString - ); - -HRESULT DAPI StrHexEncode( - __in_ecount(cbSource) const BYTE* pbSource, - __in DWORD_PTR cbSource, - __out_ecount(cchDest) LPWSTR wzDest, - __in DWORD_PTR cchDest - ); -HRESULT DAPI StrHexDecode( - __in_z LPCWSTR wzSource, - __out_bcount(cbDest) BYTE* pbDest, - __in DWORD_PTR cbDest - ); -HRESULT DAPI StrAllocHexDecode( - __in_z LPCWSTR wzSource, - __out_bcount(*pcbDest) BYTE** ppbDest, - __out_opt DWORD* pcbDest - ); - -HRESULT DAPI StrAllocBase85Encode( - __in_bcount_opt(cbSource) const BYTE* pbSource, - __in DWORD_PTR cbSource, - __deref_out_z LPWSTR* pwzDest - ); -HRESULT DAPI StrAllocBase85Decode( - __in_z LPCWSTR wzSource, - __deref_out_bcount(*pcbDest) BYTE** hbDest, - __out DWORD_PTR* pcbDest - ); - -HRESULT DAPI MultiSzLen( - __in_ecount(*pcch) __nullnullterminated LPCWSTR pwzMultiSz, - __out DWORD_PTR* pcch - ); -HRESULT DAPI MultiSzPrepend( - __deref_inout_ecount(*pcchMultiSz) __nullnullterminated LPWSTR* ppwzMultiSz, - __inout_opt DWORD_PTR *pcchMultiSz, - __in __nullnullterminated LPCWSTR pwzInsert - ); -HRESULT DAPI MultiSzFindSubstring( - __in __nullnullterminated LPCWSTR pwzMultiSz, - __in __nullnullterminated LPCWSTR pwzSubstring, - __out_opt DWORD_PTR* pdwIndex, - __deref_opt_out_z LPCWSTR* ppwzFoundIn - ); -HRESULT DAPI MultiSzFindString( - __in __nullnullterminated LPCWSTR pwzMultiSz, - __in __nullnullterminated LPCWSTR pwzString, - __out_opt DWORD_PTR* pdwIndex, - __deref_opt_out __nullnullterminated LPCWSTR* ppwzFound - ); -HRESULT DAPI MultiSzRemoveString( - __deref_inout __nullnullterminated LPWSTR* ppwzMultiSz, - __in DWORD_PTR dwIndex - ); -HRESULT DAPI MultiSzInsertString( - __deref_inout_z LPWSTR* ppwzMultiSz, - __inout_opt DWORD_PTR *pcchMultiSz, - __in DWORD_PTR dwIndex, - __in_z LPCWSTR pwzInsert - ); -HRESULT DAPI MultiSzReplaceString( - __deref_inout __nullnullterminated LPWSTR* ppwzMultiSz, - __in DWORD_PTR dwIndex, - __in_z LPCWSTR pwzString - ); - -LPCWSTR wcsistr( - __in_z LPCWSTR wzString, - __in_z LPCWSTR wzCharSet - ); - -HRESULT DAPI StrStringToInt16( - __in_z LPCWSTR wzIn, - __in DWORD cchIn, - __out SHORT* psOut - ); -HRESULT DAPI StrStringToUInt16( - __in_z LPCWSTR wzIn, - __in DWORD cchIn, - __out USHORT* pusOut - ); -HRESULT DAPI StrStringToInt32( - __in_z LPCWSTR wzIn, - __in DWORD cchIn, - __out INT* piOut - ); -HRESULT DAPI StrStringToUInt32( - __in_z LPCWSTR wzIn, - __in DWORD cchIn, - __out UINT* puiOut - ); -HRESULT DAPI StrStringToInt64( - __in_z LPCWSTR wzIn, - __in DWORD cchIn, - __out LONGLONG* pllOut - ); -HRESULT DAPI StrStringToUInt64( - __in_z LPCWSTR wzIn, - __in DWORD cchIn, - __out ULONGLONG* pullOut - ); -void DAPI StrStringToUpper( - __inout_z LPWSTR wzIn - ); -void DAPI StrStringToLower( - __inout_z LPWSTR wzIn - ); -HRESULT DAPI StrAllocStringToUpperInvariant( - __deref_out_z LPWSTR* pscz, - __in_z LPCWSTR wzSource, - __in int cchSource - ); -HRESULT DAPI StrAllocStringToLowerInvariant( - __deref_out_z LPWSTR* pscz, - __in_z LPCWSTR wzSource, - __in int cchSource - ); - -HRESULT DAPI StrArrayAllocString( - __deref_inout_ecount_opt(*pcStrArray) LPWSTR **prgsczStrArray, - __inout LPUINT pcStrArray, - __in_z LPCWSTR wzSource, - __in DWORD_PTR cchSource - ); - -HRESULT DAPI StrArrayFree( - __in_ecount(cStrArray) LPWSTR *rgsczStrArray, - __in UINT cStrArray - ); - -HRESULT DAPI StrSplitAllocArray( - __deref_inout_ecount_opt(*pcStrArray) LPWSTR **prgsczStrArray, - __inout LPUINT pcStrArray, - __in_z LPCWSTR wzSource, - __in_z LPCWSTR wzDelim - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/svcutil.h b/scripts/windows/installer/WiXSDK/inc/svcutil.h deleted file mode 100644 index d7d87ffb7f..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/svcutil.h +++ /dev/null @@ -1,31 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Header for Windows service helper functions. -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - - -#define ReleaseServiceHandle(h) if (h) { ::CloseServiceHandle(h); h = NULL; } - - -HRESULT DAPI SvcQueryConfig( - __in SC_HANDLE sch, - __out QUERY_SERVICE_CONFIGW** ppConfig - ); - - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/thmutil.h b/scripts/windows/installer/WiXSDK/inc/thmutil.h deleted file mode 100644 index 4ef2814429..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/thmutil.h +++ /dev/null @@ -1,559 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Theme helper functions. -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -#define ReleaseTheme(p) if (p) { ThemeFree(p); p = NULL; } - -enum THEME_CONTROL_DATA -{ - THEME_CONTROL_DATA_HOVER = 1, -}; - -enum THEME_CONTROL_TYPE -{ - THEME_CONTROL_TYPE_UNKNOWN, - THEME_CONTROL_TYPE_BILLBOARD, - THEME_CONTROL_TYPE_BUTTON, - THEME_CONTROL_TYPE_CHECKBOX, - THEME_CONTROL_TYPE_EDITBOX, - THEME_CONTROL_TYPE_HYPERLINK, - THEME_CONTROL_TYPE_HYPERTEXT, - THEME_CONTROL_TYPE_IMAGE, - THEME_CONTROL_TYPE_PROGRESSBAR, - THEME_CONTROL_TYPE_RICHEDIT, - THEME_CONTROL_TYPE_STATIC, - THEME_CONTROL_TYPE_TEXT, - THEME_CONTROL_TYPE_LISTVIEW, - THEME_CONTROL_TYPE_TREEVIEW, - THEME_CONTROL_TYPE_TAB, -}; - - -struct THEME_BILLBOARD -{ - HBITMAP hImage; - LPWSTR sczUrl; -}; - - -struct THEME_COLUMN -{ - LPWSTR pszName; - UINT uStringId; - int nWidth; -}; - - -struct THEME_TAB -{ - LPWSTR pszName; - UINT uStringId; -}; - -// THEME_ASSIGN_CONTROL_ID - Used to apply a specific id to a named control (usually -// to set the WM_COMMAND). -struct THEME_ASSIGN_CONTROL_ID -{ - WORD wId; // id to apply to control - LPCWSTR wzName; // name of control to match -}; - -const DWORD THEME_FIRST_ASSIGN_CONTROL_ID = 1024; // Recommended first control id to be assigned. - -struct THEME_CONTROL -{ - THEME_CONTROL_TYPE type; - - WORD wId; - WORD wPageId; - - LPWSTR sczName; // optional name for control, only used to apply control id. - LPWSTR sczText; - int nX; - int nY; - int nHeight; - int nWidth; - int nSourceX; - int nSourceY; - UINT uStringId; - - HBITMAP hImage; - - // Don't free these; it's just a handle to the central image lists stored in THEME. The handle is freed once, there. - HIMAGELIST rghImageList[4]; - - DWORD dwStyle; - DWORD dwExtendedStyle; - DWORD dwInternalStyle; - - DWORD dwFontId; - DWORD dwFontHoverId; - DWORD dwFontSelectedId; - - // Used by billboard controls - THEME_BILLBOARD* ptbBillboards; - DWORD cBillboards; - WORD wBillboardInterval; - WORD wBillboardUrls; - BOOL fBillboardLoops; - - // Used by listview controls - THEME_COLUMN *ptcColumns; - DWORD cColumns; - - // Used by tab controls - THEME_TAB *pttTabs; - DWORD cTabs; - - // state variables that should be ignored - HWND hWnd; - DWORD dwData; // type specific data -}; - - -struct THEME_IMAGELIST -{ - LPWSTR sczName; - - HIMAGELIST hImageList; -}; - -struct THEME_PAGE -{ - WORD wId; - LPWSTR sczName; - - DWORD cControlIndices; - DWORD* rgdwControlIndices; -}; - -struct THEME_FONT -{ - HFONT hFont; - COLORREF crForeground; - HBRUSH hForeground; - COLORREF crBackground; - HBRUSH hBackground; -}; - - -struct THEME -{ - WORD wId; - - DWORD dwStyle; - DWORD dwFontId; - HANDLE hIcon; - LPWSTR sczCaption; - int nHeight; - int nWidth; - int nSourceX; - int nSourceY; - UINT uStringId; - - HBITMAP hImage; - - DWORD cFonts; - THEME_FONT* rgFonts; - - DWORD cPages; - THEME_PAGE* rgPages; - - DWORD cImageLists; - THEME_IMAGELIST* rgImageLists; - - DWORD cControls; - THEME_CONTROL* rgControls; - - // state variables that should be ignored - HWND hwndParent; // parent for loaded controls - HWND hwndHover; // current hwnd hovered over -}; - - -/******************************************************************** - ThemeInitialize - initialized theme management. - -*******************************************************************/ -DAPI_(HRESULT) ThemeInitialize( - __in_opt HMODULE hModule - ); - -/******************************************************************** - ThemeUninitialize - unitialize theme management. - -*******************************************************************/ -DAPI_(void) ThemeUninitialize(); - -/******************************************************************** - ThemeLoadFromFile - loads a theme from a loose file. - - *******************************************************************/ -DAPI_(HRESULT) ThemeLoadFromFile( - __in_z LPCWSTR wzThemeFile, - __out THEME** ppTheme - ); - -/******************************************************************** - ThemeLoadFromResource - loads a theme from a module's data resource. - - NOTE: The resource data must be UTF-8 encoded. -*******************************************************************/ -DAPI_(HRESULT) ThemeLoadFromResource( - __in_opt HMODULE hModule, - __in_z LPCSTR szResource, - __out THEME** ppTheme - ); - -/******************************************************************** - ThemeFree - frees any memory associated with a theme. - -*******************************************************************/ -DAPI_(void) ThemeFree( - __in THEME* pTheme - ); - -/******************************************************************** - ThemeLoadControls - creates the windows for all the theme controls. - -*******************************************************************/ -DAPI_(HRESULT) ThemeLoadControls( - __in THEME* pTheme, - __in HWND hwndParent, - __in_ecount_opt(cAssignControlIds) const THEME_ASSIGN_CONTROL_ID* rgAssignControlIds, - __in DWORD cAssignControlIds - ); - -/******************************************************************** - ThemeUnloadControls - resets all the theme control windows so the theme - controls can be reloaded. - -*******************************************************************/ -DAPI_(void) ThemeUnloadControls( - __in THEME* pTheme - ); - -/******************************************************************** - ThemeLocalize - Localizes all of the strings in the them. - -*******************************************************************/ -DAPI_(HRESULT) ThemeLocalize( - __in THEME *pTheme, - __in const WIX_LOCALIZATION *pLocStringSet - ); - -DAPI_(HRESULT) ThemeLoadStrings( - __in THEME* pTheme, - __in HMODULE hResModule - ); - -/******************************************************************** - ThemeLoadRichEditFromFile - Attach a richedit control to a RTF file. - - *******************************************************************/ -DAPI_(HRESULT) ThemeLoadRichEditFromFile( - __in THEME* pTheme, - __in DWORD dwControl, - __in_z LPCWSTR wzFileName, - __in HMODULE hModule - ); - -/******************************************************************** - ThemeLoadRichEditFromResource - Attach a richedit control to resource data. - - *******************************************************************/ -DAPI_(HRESULT) ThemeLoadRichEditFromResource( - __in THEME* pTheme, - __in DWORD dwControl, - __in_z LPCSTR szResourceName, - __in HMODULE hModule - ); - -/******************************************************************** - ThemeLoadRichEditFromResourceToHWnd - Attach a richedit control (by - HWND) to resource data. - - *******************************************************************/ -DAPI_(HRESULT) ThemeLoadRichEditFromResourceToHWnd( - __in HWND hWnd, - __in_z LPCSTR szResourceName, - __in HMODULE hModule - ); - -/******************************************************************** - ThemeHandleKeyboardMessage - will translate the message using the active - accelerator table. - -*******************************************************************/ -DAPI_(BOOL) ThemeHandleKeyboardMessage( - __in_opt THEME* pTheme, - __in HWND hWnd, - __in MSG* pMsg - ); - -/******************************************************************** - ThemeDefWindowProc - replacement for DefWindowProc() when using theme. - -*******************************************************************/ -LRESULT CALLBACK ThemeDefWindowProc( - __in_opt THEME* pTheme, - __in HWND hWnd, - __in UINT uMsg, - __in WPARAM wParam, - __in LPARAM lParam - ); - -/******************************************************************** - ThemeGetPageIds - gets the page ids for the theme via page names. - -*******************************************************************/ -DAPI_(void) ThemeGetPageIds( - __in const THEME* pTheme, - __in_ecount(cGetPages) LPCWSTR* rgwzFindNames, - __in_ecount(cGetPages) DWORD* rgdwPageIds, - __in DWORD cGetPages - ); - -/******************************************************************** - ThemeGetPage - gets a theme page by id. - - *******************************************************************/ -DAPI_(THEME_PAGE*) ThemeGetPage( - __in const THEME* pTheme, - __in DWORD dwPage - ); - -/******************************************************************** - ThemeShowPage - shows or hides all of the controls in the page at one time. - - *******************************************************************/ -DAPI_(void) ThemeShowPage( - __in THEME* pTheme, - __in DWORD dwPage, - __in int nCmdShow - ); - -/******************************************************************** - ThemeControlExists - check if a control with the specified id exists. - - *******************************************************************/ -DAPI_(BOOL) ThemeControlExists( - __in THEME* pTheme, - __in DWORD dwControl - ); - -/******************************************************************** - ThemeControlEnable - enables/disables a control. - - *******************************************************************/ -DAPI_(void) ThemeControlEnable( - __in THEME* pTheme, - __in DWORD dwControl, - __in BOOL fEnable - ); - -/******************************************************************** - ThemeControlEnabled - returns whether a control is enabled/disabled. - - *******************************************************************/ -DAPI_(BOOL) ThemeControlEnabled( - __in THEME* pTheme, - __in DWORD dwControl - ); - -/******************************************************************** - ThemeControlElevates - sets/removes the shield icon on a control. - - *******************************************************************/ -DAPI_(void) ThemeControlElevates( - __in THEME* pTheme, - __in DWORD dwControl, - __in BOOL fElevates - ); - -/******************************************************************** - ThemeShowControl - shows/hides a control. - - *******************************************************************/ -DAPI_(void) ThemeShowControl( - __in THEME* pTheme, - __in DWORD dwControl, - __in int nCmdShow - ); - -/******************************************************************** - ThemeControlVisible - returns whether a control is visible. - - *******************************************************************/ -DAPI_(BOOL) ThemeControlVisible( - __in THEME* pTheme, - __in DWORD dwControl - ); - -DAPI_(BOOL) ThemePostControlMessage( - __in THEME* pTheme, - __in DWORD dwControl, - __in UINT Msg, - __in WPARAM wParam, - __in LPARAM lParam - ); - -DAPI_(LRESULT) ThemeSendControlMessage( - __in THEME* pTheme, - __in DWORD dwControl, - __in UINT Msg, - __in WPARAM wParam, - __in LPARAM lParam - ); - -/******************************************************************** - ThemeDrawBackground - draws the theme background. - -*******************************************************************/ -DAPI_(HRESULT) ThemeDrawBackground( - __in THEME* pTheme, - __in PAINTSTRUCT* pps - ); - -/******************************************************************** - ThemeDrawControl - draw an owner drawn control. - -*******************************************************************/ -DAPI_(HRESULT) ThemeDrawControl( - __in THEME* pTheme, - __in DRAWITEMSTRUCT* pdis - ); - -/******************************************************************** - ThemeHoverControl - mark a control as hover. - -*******************************************************************/ -DAPI_(BOOL) ThemeHoverControl( - __in THEME* pTheme, - __in HWND hwndParent, - __in HWND hwndControl - ); - -/******************************************************************** - ThemeIsControlChecked - gets whether a control is checked. Only - really useful for checkbox controls. - -*******************************************************************/ -DAPI_(BOOL) ThemeIsControlChecked( - __in THEME* pTheme, - __in DWORD dwControl - ); - -/******************************************************************** - ThemeSetControlColor - sets the color of text for a control. - -*******************************************************************/ -DAPI_(BOOL) ThemeSetControlColor( - __in THEME* pTheme, - __in HDC hdc, - __in HWND hWnd, - __out HBRUSH* phBackgroundBrush - ); - -/******************************************************************** - ThemeStartBillboard - starts a billboard control changing images according - to their interval. - - NOTE: iImage specifies the image to start on. If iImage is - greater than the number of images, the last image shown - will be the start image. -*******************************************************************/ -DAPI_(HRESULT) ThemeStartBillboard( - __in const THEME* pTheme, - __in DWORD dwControl, - __in WORD iImage - ); - -/******************************************************************** - ThemeStopBillboard - stops a billboard control from changing images. - -*******************************************************************/ -DAPI_(HRESULT) ThemeStopBillboard( - __in const THEME* pTheme, - __in DWORD dwControl - ); - -/******************************************************************** - ThemeSetProgressControl - sets the current percentage complete in a - progress bar control. - -*******************************************************************/ -DAPI_(HRESULT) ThemeSetProgressControl( - __in THEME* pTheme, - __in DWORD dwControl, - __in DWORD dwProgressPercentage - ); - -/******************************************************************** - ThemeSetProgressControlColor - sets the current color of a - progress bar control. - -*******************************************************************/ -DAPI_(HRESULT) ThemeSetProgressControlColor( - __in THEME* pTheme, - __in DWORD dwControl, - __in DWORD dwColorIndex - ); - -/******************************************************************** - ThemeSetTextControl - sets the text of a control. - -*******************************************************************/ -DAPI_(HRESULT) ThemeSetTextControl( - __in THEME* pTheme, - __in DWORD dwControl, - __in_z LPCWSTR wzText - ); - -/******************************************************************** - ThemeGetTextControl - gets the text of a control. - -*******************************************************************/ -DAPI_(HRESULT) ThemeGetTextControl( - __in const THEME* pTheme, - __in DWORD dwControl, - __out LPWSTR* psczText - ); - -/******************************************************************** - ThemeUpdateCaption - updates the caption in the theme. - -*******************************************************************/ -DAPI_(HRESULT) ThemeUpdateCaption( - __in THEME* pTheme, - __in_z LPCWSTR wzCaption - ); - -/******************************************************************** - ThemeSetFocus - set the focus to the control supplied or the next - enabled control if it is disabled. - -*******************************************************************/ -DAPI_(void) ThemeSetFocus( - __in THEME* pTheme, - __in DWORD dwControl - ); - -#ifdef __cplusplus -} -#endif - diff --git a/scripts/windows/installer/WiXSDK/inc/timeutil.h b/scripts/windows/installer/WiXSDK/inc/timeutil.h deleted file mode 100644 index b5f4eabd79..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/timeutil.h +++ /dev/null @@ -1,45 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Time helper functions. -// -//------------------------------------------------------------------------------------------------- - - -#ifdef __cplusplus -extern "C" { -#endif - -HRESULT DAPI TimeFromString( - __in_z LPCWSTR wzTime, - __out FILETIME* pFileTime - ); -HRESULT DAPI TimeFromString3339( - __in_z LPCWSTR wzTime, - __out FILETIME* pFileTime - ); -HRESULT DAPI TimeCurrentTime( - __deref_out_z LPWSTR* ppwz, - __in BOOL fGMT - ); -HRESULT DAPI TimeCurrentDateTime( - __deref_out_z LPWSTR* ppwz, - __in BOOL fGMT - ); -HRESULT DAPI TimeSystemDateTime( - __deref_out_z LPWSTR* ppwz, - __in const SYSTEMTIME *pst, - __in BOOL fGMT - ); - -#ifdef __cplusplus -} -#endif - diff --git a/scripts/windows/installer/WiXSDK/inc/uriutil.h b/scripts/windows/installer/WiXSDK/inc/uriutil.h deleted file mode 100644 index 08079f2da8..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/uriutil.h +++ /dev/null @@ -1,111 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// URI helper functions. -// -//------------------------------------------------------------------------------------------------- - -#pragma once - -#include "wininet.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -enum URI_PROTOCOL -{ - URI_PROTOCOL_UNKNOWN, - URI_PROTOCOL_FILE, - URI_PROTOCOL_FTP, - URI_PROTOCOL_HTTP, - URI_PROTOCOL_HTTPS, - URI_PROTOCOL_LOCAL, - URI_PROTOCOL_UNC -}; - -typedef struct _URI_INFO -{ - INTERNET_SCHEME scheme; - LPWSTR sczHostName; - INTERNET_PORT port; - LPWSTR sczUser; - LPWSTR sczPassword; - LPWSTR sczPath; - LPWSTR sczQueryString; -} URI_INFO; - - -HRESULT DAPI UriCanonicalize( - __inout_z LPWSTR* psczUri - ); - -HRESULT DAPI UriCrack( - __in_z LPCWSTR wzUri, - __out_opt INTERNET_SCHEME* pScheme, - __deref_opt_out_z LPWSTR* psczHostName, - __out_opt INTERNET_PORT* pPort, - __deref_opt_out_z LPWSTR* psczUser, - __deref_opt_out_z LPWSTR* psczPassword, - __deref_opt_out_z LPWSTR* psczPath, - __deref_opt_out_z LPWSTR* psczQueryString - ); - -HRESULT DAPI UriCrackEx( - __in_z LPCWSTR wzUri, - __in URI_INFO* pUriInfo - ); - -void DAPI UriInfoUninitialize( - __in URI_INFO* pUriInfo - ); - -HRESULT DAPI UriCreate( - __inout_z LPWSTR* psczUri, - __in INTERNET_SCHEME scheme, - __in_z_opt LPWSTR wzHostName, - __in INTERNET_PORT port, - __in_z_opt LPWSTR wzUser, - __in_z_opt LPWSTR wzPassword, - __in_z_opt LPWSTR wzPath, - __in_z_opt LPWSTR wzQueryString - ); - -HRESULT DAPI UriCanonicalize( - __inout_z LPWSTR* psczUri - ); - -HRESULT DAPI UriFile( - __deref_out_z LPWSTR* psczFile, - __in_z LPCWSTR wzUri - ); - -HRESULT DAPI UriProtocol( - __in_z LPCWSTR wzUri, - __out URI_PROTOCOL* pProtocol - ); - -HRESULT DAPI UriRoot( - __in_z LPCWSTR wzUri, - __out LPWSTR* ppwzRoot, - __out_opt URI_PROTOCOL* pProtocol - ); - -HRESULT DAPI UriResolve( - __in_z LPCWSTR wzUri, - __in_opt LPCWSTR wzBaseUri, - __out LPWSTR* ppwzResolvedUri, - __out_opt const URI_PROTOCOL* pResolvedProtocol - ); - -#ifdef __cplusplus -} -#endif - diff --git a/scripts/windows/installer/WiXSDK/inc/userutil.h b/scripts/windows/installer/WiXSDK/inc/userutil.h deleted file mode 100644 index 569bc8a539..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/userutil.h +++ /dev/null @@ -1,42 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// User helper functions. -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -HRESULT DAPI UserBuildDomainUserName( - __out_ecount_z(cchDest) LPWSTR wzDest, - __in int cchDest, - __in_z LPCWSTR pwzName, - __in_z LPCWSTR pwzDomain - ); - -HRESULT DAPI UserCheckIsMember( - __in_z LPCWSTR pwzName, - __in_z LPCWSTR pwzDomain, - __in_z LPCWSTR pwzGroupName, - __in_z LPCWSTR pwzGroupDomain, - __out LPBOOL lpfMember - ); - -HRESULT DAPI UserCreateADsPath( - __in_z LPCWSTR wzObjectDomain, - __in_z LPCWSTR wzObjectName, - __out BSTR *pbstrAdsPath - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/wcalog.h b/scripts/windows/installer/WiXSDK/inc/wcalog.h deleted file mode 100644 index b42f09827f..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/wcalog.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Private header for internal logging functions -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -BOOL WIXAPI IsVerboseLogging(); -HRESULT WIXAPI SetVerboseLoggingAtom(BOOL bValue); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/wcautil.h b/scripts/windows/installer/WiXSDK/inc/wcautil.h deleted file mode 100644 index a8e5feff15..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/wcautil.h +++ /dev/null @@ -1,372 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Windows Installer XML CustomAction utility library. -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -#define WIXAPI __stdcall -#define ExitTrace WcaLogError -#define ExitTrace1 WcaLogError -#define ExitTrace2 WcaLogError -#define ExitTrace3 WcaLogError - -#include "dutil.h" - -#define MessageExitOnLastError(x, e, s) { x = ::GetLastError(); x = HRESULT_FROM_WIN32(x); if (FAILED(x)) { ExitTrace(x, "%s", s); WcaErrorMessage(e, x, MB_OK, 0); goto LExit; } } -#define MessageExitOnLastError1(x, e, f, s) { x = ::GetLastError(); x = HRESULT_FROM_WIN32(x); if (FAILED(x)) { ExitTrace1(x, f, s); WcaErrorMessage(e, x, MB_OK, 1, s); goto LExit; } } - -#define MessageExitOnFailure(x, e, s) if (FAILED(x)) { ExitTrace(x, "%s", s); WcaErrorMessage(e, x, INSTALLMESSAGE_ERROR | MB_OK, 0); goto LExit; } -#define MessageExitOnFailure1(x, e, f, s) if (FAILED(x)) { ExitTrace1(x, f, s); WcaErrorMessage(e, x, INSTALLMESSAGE_ERROR | MB_OK, 1, s); goto LExit; } -#define MessageExitOnFailure2(x, e, f, s, t) if (FAILED(x)) { ExitTrace2(x, f, s, t); WcaErrorMessage(e, x, INSTALLMESSAGE_ERROR | MB_OK, 2, s, t); goto LExit; } -#define MessageExitOnFailure3(x, e, f, s, t, u) if (FAILED(x)) { ExitTrace2(x, f, s, t, u); WcaErrorMessage(e, x, INSTALLMESSAGE_ERROR | MB_OK, 3, s, t, u); goto LExit; } - -#define MessageExitOnNullWithLastError(p, x, e, s) if (NULL == p) { x = ::GetLastError(); x = HRESULT_FROM_WIN32(x); if (!FAILED(x)) { x = E_FAIL; } ExitTrace(x, "%s", s); WcaErrorMessage(e, x, MB_OK, 0); goto LExit; } -#define MessageExitOnNullWithLastError1(p, x, e, f, s) if (NULL == p) { x = ::GetLastError(); x = HRESULT_FROM_WIN32(x); if (!FAILED(x)) { x = E_FAIL; } ExitTrace(x, f, s); WcaErrorMessage(e, x, MB_OK, 1, s); goto LExit; } -#define MessageExitOnNullWithLastError2(p, x, e, f, s, t) if (NULL == p) { x = ::GetLastError(); x = HRESULT_FROM_WIN32(x); if (!FAILED(x)) { x = E_FAIL; } ExitTrace(x, f, s, t); WcaErrorMessage(e, x, MB_OK, 2, s, t); goto LExit; } - -// Generic action enum. -enum WCA_ACTION -{ - WCA_ACTION_NONE, - WCA_ACTION_INSTALL, - WCA_ACTION_UNINSTALL, -}; - -enum WCA_CASCRIPT -{ - WCA_CASCRIPT_SCHEDULED, - WCA_CASCRIPT_ROLLBACK, -}; - -enum WCA_CASCRIPT_CLOSE -{ - WCA_CASCRIPT_CLOSE_PRESERVE, - WCA_CASCRIPT_CLOSE_DELETE, -}; - -enum WCA_TODO -{ - WCA_TODO_UNKNOWN, - WCA_TODO_INSTALL, - WCA_TODO_UNINSTALL, - WCA_TODO_REINSTALL, -}; - -typedef struct WCA_CASCRIPT_STRUCT -{ - LPWSTR pwzScriptPath; - HANDLE hScriptFile; -} *WCA_CASCRIPT_HANDLE; - -void WIXAPI WcaGlobalInitialize( - __in HINSTANCE hInst - ); -void WIXAPI WcaGlobalFinalize(); - -HRESULT WIXAPI WcaInitialize( - __in MSIHANDLE hInstall, - __in_z PCSTR szCustomActionLogName - ); -UINT WIXAPI WcaFinalize( - __in UINT iReturnValue - ); -BOOL WIXAPI WcaIsInitialized(); - -MSIHANDLE WIXAPI WcaGetInstallHandle(); -MSIHANDLE WIXAPI WcaGetDatabaseHandle(); - -const char* WIXAPI WcaGetLogName(); - -void WIXAPI WcaSetReturnValue( - __in UINT iReturnValue - ); -BOOL WIXAPI WcaCancelDetected(); - -const int LOG_BUFFER = 2048; -enum LOGLEVEL -{ - LOGMSG_TRACEONLY, // Never written to the log file (except in DEBUG builds) - LOGMSG_VERBOSE, // Written to log when LOGVERBOSE - LOGMSG_STANDARD // Written to log whenever informational logging is enabled -}; - -void __cdecl WcaLog( - __in LOGLEVEL llv, - __in_z __format_string PCSTR fmt, ... - ); -BOOL WIXAPI WcaDisplayAssert( - __in LPCSTR sz - ); -void __cdecl WcaLogError( - __in HRESULT hr, - __in LPCSTR szMessage, - ... - ); - -UINT WIXAPI WcaProcessMessage( - __in INSTALLMESSAGE eMessageType, - __in MSIHANDLE hRecord - ); -UINT __cdecl WcaErrorMessage( - __in int iError, - __in HRESULT hrError, - __in UINT uiType, - __in DWORD cArgs, - ... - ); -HRESULT WIXAPI WcaProgressMessage( - __in UINT uiCost, - __in BOOL fExtendProgressBar - ); - -BOOL WIXAPI WcaIsInstalling( - __in INSTALLSTATE isInstalled, - __in INSTALLSTATE isAction - ); -BOOL WIXAPI WcaIsReInstalling( - __in INSTALLSTATE isInstalled, - __in INSTALLSTATE isAction - ); -BOOL WIXAPI WcaIsUninstalling( - __in INSTALLSTATE isInstalled, - __in INSTALLSTATE isAction - ); - -HRESULT WIXAPI WcaSetComponentState( - __in_z LPCWSTR wzComponent, - __in INSTALLSTATE isState - ); - -HRESULT WIXAPI WcaTableExists( - __in_z LPCWSTR wzTable - ); - -HRESULT WIXAPI WcaOpenView( - __in_z LPCWSTR wzSql, - __out MSIHANDLE* phView - ); -HRESULT WIXAPI WcaExecuteView( - __in MSIHANDLE hView, - __in MSIHANDLE hRec - ); -HRESULT WIXAPI WcaOpenExecuteView( - __in_z LPCWSTR wzSql, - __out MSIHANDLE* phView - ); -HRESULT WIXAPI WcaFetchRecord( - __in MSIHANDLE hView, - __out MSIHANDLE* phRec - ); -HRESULT WIXAPI WcaFetchSingleRecord( - __in MSIHANDLE hView, - __out MSIHANDLE* phRec - ); - -HRESULT WIXAPI WcaGetProperty( - __in_z LPCWSTR wzProperty, - __inout LPWSTR* ppwzData - ); -HRESULT WIXAPI WcaGetFormattedProperty( - __in_z LPCWSTR wzProperty, - __out LPWSTR* ppwzData - ); -HRESULT WIXAPI WcaGetFormattedString( - __in_z LPCWSTR wzString, - __out LPWSTR* ppwzData - ); -HRESULT WIXAPI WcaGetIntProperty( - __in_z LPCWSTR wzProperty, - __inout int* piData - ); -HRESULT WIXAPI WcaGetTargetPath( - __in_z LPCWSTR wzFolder, - __out LPWSTR* ppwzData - ); -HRESULT WIXAPI WcaSetProperty( - __in_z LPCWSTR wzPropertyName, - __in_z LPCWSTR wzPropertyValue - ); -HRESULT WIXAPI WcaSetIntProperty( - __in_z LPCWSTR wzPropertyName, - __in int nPropertyValue - ); -BOOL WIXAPI WcaIsPropertySet( - __in LPCSTR szProperty - ); -BOOL WIXAPI WcaIsUnicodePropertySet( - __in LPCWSTR wzProperty - ); - -HRESULT WIXAPI WcaGetRecordInteger( - __in MSIHANDLE hRec, - __in UINT uiField, - __inout int* piData - ); -HRESULT WIXAPI WcaGetRecordString( - __in MSIHANDLE hRec, - __in UINT uiField, - __inout LPWSTR* ppwzData - ); -HRESULT WIXAPI WcaGetRecordFormattedInteger( - __in MSIHANDLE hRec, - __in UINT uiField, - __out int* piData - ); -HRESULT WIXAPI WcaGetRecordFormattedString( - __in MSIHANDLE hRec, - __in UINT uiField, - __inout LPWSTR* ppwzData - ); - -HRESULT WIXAPI WcaAllocStream( - __deref_out_bcount_part(cbData, 0) BYTE** ppbData, - __in DWORD cbData - ); -HRESULT WIXAPI WcaFreeStream( - __in BYTE* pbData - ); - -HRESULT WIXAPI WcaGetRecordStream( - __in MSIHANDLE hRecBinary, - __in UINT uiField, - __deref_out_bcount_full(*pcbData) BYTE** ppbData, - __out DWORD* pcbData - ); -HRESULT WIXAPI WcaSetRecordString( - __in MSIHANDLE hRec, - __in UINT uiField, - __in_z LPCWSTR wzData - ); -HRESULT WIXAPI WcaSetRecordInteger( - __in MSIHANDLE hRec, - __in UINT uiField, - __in int iValue - ); - -HRESULT WIXAPI WcaDoDeferredAction( - __in_z LPCWSTR wzAction, - __in_z LPCWSTR wzCustomActionData, - __in UINT uiCost - ); -DWORD WIXAPI WcaCountOfCustomActionDataRecords( - __in_z LPCWSTR wzData - ); - -HRESULT WIXAPI WcaReadStringFromCaData( - __deref_in LPWSTR* ppwzCustomActionData, - __deref_out_z LPWSTR* ppwzString - ); -HRESULT WIXAPI WcaReadIntegerFromCaData( - __deref_in LPWSTR* ppwzCustomActionData, - __out int* piResult - ); -HRESULT WIXAPI WcaReadStreamFromCaData( - __deref_in LPWSTR* ppwzCustomActionData, - __deref_out_bcount(*pcbData) BYTE** ppbData, - __out DWORD_PTR* pcbData - ); -HRESULT WIXAPI WcaWriteStringToCaData( - __in_z LPCWSTR wzString, - __deref_inout_z LPWSTR* ppwzCustomActionData - ); -HRESULT WIXAPI WcaWriteIntegerToCaData( - __in int i, - __deref_out_z_opt LPWSTR* ppwzCustomActionData - ); -HRESULT WIXAPI WcaWriteStreamToCaData( - __in_bcount(cbData) const BYTE* pbData, - __in DWORD cbData, - __deref_inout_z_opt LPWSTR* ppwzCustomActionData - ); - -HRESULT __cdecl WcaAddTempRecord( - __inout MSIHANDLE* phTableView, - __inout MSIHANDLE* phColumns, - __in_z LPCWSTR wzTable, - __out_opt MSIDBERROR* pdbError, - __in UINT uiUniquifyColumn, - __in UINT cColumns, - ... - ); - -HRESULT WIXAPI WcaDumpTable( - __in_z LPCWSTR wzTable - ); - -HRESULT WIXAPI WcaDeferredActionRequiresReboot(); -BOOL WIXAPI WcaDidDeferredActionRequireReboot(); - -HRESULT WIXAPI WcaCaScriptCreateKey( - __out LPWSTR* ppwzScriptKey - ); - -HRESULT WIXAPI WcaCaScriptCreate( - __in WCA_ACTION action, - __in WCA_CASCRIPT script, - __in BOOL fImpersonated, - __in_z LPCWSTR wzScriptKey, - __in BOOL fAppend, - __out WCA_CASCRIPT_HANDLE* phScript - ); - -HRESULT WIXAPI WcaCaScriptOpen( - __in WCA_ACTION action, - __in WCA_CASCRIPT script, - __in BOOL fImpersonated, - __in_z LPCWSTR wzScriptKey, - __out WCA_CASCRIPT_HANDLE* phScript - ); - -void WIXAPI WcaCaScriptClose( - __in_opt WCA_CASCRIPT_HANDLE hScript, - __in WCA_CASCRIPT_CLOSE closeOperation - ); - -HRESULT WIXAPI WcaCaScriptReadAsCustomActionData( - __in WCA_CASCRIPT_HANDLE hScript, - __out LPWSTR* ppwzCustomActionData - ); - -HRESULT WIXAPI WcaCaScriptWriteString( - __in WCA_CASCRIPT_HANDLE hScript, - __in_z LPCWSTR wzValue - ); - -HRESULT WIXAPI WcaCaScriptWriteNumber( - __in WCA_CASCRIPT_HANDLE hScript, - __in DWORD dwValue - ); - -void WIXAPI WcaCaScriptFlush( - __in WCA_CASCRIPT_HANDLE hScript - ); - -void WIXAPI WcaCaScriptCleanup( - __in_z LPCWSTR wzProductCode, - __in BOOL fImpersonated - ); - -HRESULT WIXAPI QuietExec( - __inout_z LPWSTR wzCommand, - __in DWORD dwTimeout - ); - -WCA_TODO WIXAPI WcaGetComponentToDo( - __in_z LPCWSTR wzComponentId - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/wcawow64.h b/scripts/windows/installer/WiXSDK/inc/wcawow64.h deleted file mode 100644 index f714107b85..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/wcawow64.h +++ /dev/null @@ -1,30 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Windows Installer XML CustomAction utility library for Wow64 API-related functionality. -// -//------------------------------------------------------------------------------------------------- - -#include "wcautil.h" - -#ifdef __cplusplus -extern "C" { -#endif - -HRESULT WIXAPI WcaInitializeWow64(); -BOOL WIXAPI WcaIsWow64Process(); -BOOL WIXAPI WcaIsWow64Initialized(); -HRESULT WIXAPI WcaDisableWow64FSRedirection(); -HRESULT WIXAPI WcaRevertWow64FSRedirection(); -HRESULT WIXAPI WcaFinalizeWow64(); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/wcawrapquery.h b/scripts/windows/installer/WiXSDK/inc/wcawrapquery.h deleted file mode 100644 index ac831fc8af..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/wcawrapquery.h +++ /dev/null @@ -1,141 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Windows Installer XML CustomAction utility library wrappers meant to wrap an MSI view as -// opened by an immediate custom action and transmit it to a deferred custom action -// -//------------------------------------------------------------------------------------------------- - -#include "wcautil.h" - -// Enumerations -enum eWrapQueryAction -{ - wqaTableBegin = 1, - wqaTableFinish, - wqaRowBegin, - wqaRowFinish -}; - -enum eColumnDataType -{ - cdtString = 1, - cdtInt, - cdtStream, - cdtUnknown -}; - -enum eFormatMaskColumn -{ - efmcColumn1 = 1, - efmcColumn2 = 1 << 1, - efmcColumn3 = 1 << 2, - efmcColumn4 = 1 << 3, - efmcColumn5 = 1 << 4, - efmcColumn6 = 1 << 5, - efmcColumn7 = 1 << 6, - efmcColumn8 = 1 << 7, - efmcColumn9 = 1 << 8, - efmcColumn10 = 1 << 9, - efmcColumn11 = 1 << 10, - efmcColumn12 = 1 << 11, - efmcColumn13 = 1 << 12, - efmcColumn14 = 1 << 13, - efmcColumn15 = 1 << 14, - efmcColumn16 = 1 << 15, - efmcColumn17 = 1 << 16, - efmcColumn18 = 1 << 17, - efmcColumn19 = 1 << 18, - efmcColumn20 = 1 << 19, - efmcColumn21 = 1 << 20, - efmcColumn22 = 1 << 21, - efmcColumn23 = 1 << 22, - efmcColumn24 = 1 << 23, - efmcColumn25 = 1 << 24, - efmcColumn26 = 1 << 25, - efmcColumn27 = 1 << 26, - efmcColumn28 = 1 << 27, - efmcColumn29 = 1 << 28, - efmcColumn30 = 1 << 29, - efmcColumn31 = 1 << 30, - efmcColumn32 = 1 << 31, -}; - -// Keeps track of the query instance for the reading CA (deferred CA) -typedef struct WCA_WRAPQUERY_STRUCT -{ - // These are used to size our dynamic arrays below - DWORD dwColumns, dwRows, dwNextIndex; - - // Dynamic arrays of column schema information - eColumnDataType *pcdtColumnType; - LPWSTR *ppwzColumnNames; - - // Dynamic array of raw record data - MSIHANDLE *phRecords; -} *WCA_WRAPQUERY_HANDLE; - -// Wrap a query -// Setting the pfFormatMask enables control over which fields will be formatted, and which will be left unchanged -// Setting dwComponentColumn to something other than 0xFFFFFFFF tells WcaWrapQuery to add two additional columns to the right side of the table -// - ISInstalled and ISAction - which map to the ComponentState of the component (the component is found in the column specified) -// Note that if a component is NULL, the component state columns will also be left null, and it will be up to the deferred CA to fail or ignore the case appropriately -// Setting dwDirectoryColumn to something other than 0xFFFFFFFF tells WcaWrapQuery to add two more additional columns to the right side of the table -// - SourcePath and TargetPath - which map to the Directory's Source and Target Path (the directory is found in the column specified) -// Note that if a directory is NULL, the directory source/target path columns will also be left null, and it will be up to the deferred CA to fail or ignore the case appropriately -HRESULT WIXAPI WcaWrapQuery( - __in_z LPCWSTR pwzQuery, - __inout LPWSTR * ppwzCustomActionData, - __in_opt DWORD dwFormatMask, - __in_opt DWORD dwComponentColumn, - __in_opt DWORD dwDirectoryColumn - ); -// This wraps an empty table query into the custom action data - this is a way to indicate to the deferred custom action that a necessary table doesn't exist, or its query returned no results -HRESULT WIXAPI WcaWrapEmptyQuery( - __inout LPWSTR * ppwzCustomActionData - ); - -// Open a new unwrap query operation, with data from the ppwzCustomActionData string -HRESULT WIXAPI WcaBeginUnwrapQuery( - __out WCA_WRAPQUERY_HANDLE * phWrapQuery, - __inout LPWSTR * ppwzCustomActionData - ); - -// Get the number of records in a query being unwrapped -DWORD WIXAPI WcaGetQueryRecords( - __in const WCA_WRAPQUERY_HANDLE hWrapQuery - ); - -// This function resets a query back to its first row, so that the next fetch returns the first record -void WIXAPI WcaFetchWrappedReset( - __in WCA_WRAPQUERY_HANDLE hWrapQuery - ); -// Fetch the next record in this query -// NOTE: the MSIHANDLE returned by this function should not be released, as it is the same handle used by the query object to maintain the item. -// so, don't use this function with PMSIHANDLE objects! -HRESULT WIXAPI WcaFetchWrappedRecord( - __in WCA_WRAPQUERY_HANDLE hWrapQuery, - __out MSIHANDLE* phRec - ); - -// Fetch the next record in the query where the string value in column dwComparisonColumn equals the value pwzExpectedValue -// NOTE: the MSIHANDLE returned by this function should not be released, as it is the same handle used by the query object to maintain the item. -// so, don't use this function with PMSIHANDLE objects! -HRESULT WIXAPI WcaFetchWrappedRecordWhereString( - __in WCA_WRAPQUERY_HANDLE hWrapQuery, - __in DWORD dwComparisonColumn, - __in_z LPCWSTR pwzExpectedValue, - __out MSIHANDLE* phRec - ); - -// Release a query ID (frees memory, and frees the ID for a new query) -void WIXAPI WcaFinishUnwrapQuery( - __in_opt WCA_WRAPQUERY_HANDLE hWrapQuery - ); diff --git a/scripts/windows/installer/WiXSDK/inc/wiutil.h b/scripts/windows/installer/WiXSDK/inc/wiutil.h deleted file mode 100644 index 123340d249..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/wiutil.h +++ /dev/null @@ -1,367 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Header for Windows Installer helper functions. -// -//------------------------------------------------------------------------------------------------- - -#ifdef __cplusplus -extern "C" { -#endif - -// constants - -#define IDNOACTION 0 -#define WIU_MB_OKIGNORECANCELRETRY 0xE - -#define MAX_DARWIN_KEY 73 -#define MAX_DARWIN_COLUMN 255 - -#define WIU_LOG_DEFAULT INSTALLLOGMODE_FATALEXIT | INSTALLLOGMODE_ERROR | INSTALLLOGMODE_WARNING | \ - INSTALLLOGMODE_USER | INSTALLLOGMODE_INFO | INSTALLLOGMODE_RESOLVESOURCE | \ - INSTALLLOGMODE_OUTOFDISKSPACE | INSTALLLOGMODE_ACTIONSTART | \ - INSTALLLOGMODE_ACTIONDATA | INSTALLLOGMODE_COMMONDATA | INSTALLLOGMODE_PROPERTYDUMP - -#define ReleaseMsi(h) if (h) { ::MsiCloseHandle(h); } -#define ReleaseNullMsi(h) if (h) { ::MsiCloseHandle(h); h = NULL; } - - -enum WIU_RESTART -{ - WIU_RESTART_NONE, - WIU_RESTART_REQUIRED, - WIU_RESTART_INITIATED, -}; - -enum WIU_MSI_EXECUTE_MESSAGE_TYPE -{ - WIU_MSI_EXECUTE_MESSAGE_NONE, - WIU_MSI_EXECUTE_MESSAGE_PROGRESS, - WIU_MSI_EXECUTE_MESSAGE_ERROR, - WIU_MSI_EXECUTE_MESSAGE_MSI_MESSAGE, - WIU_MSI_EXECUTE_MESSAGE_MSI_FILES_IN_USE, -}; - - -// structures - -typedef struct _WIU_MSI_EXECUTE_MESSAGE -{ - WIU_MSI_EXECUTE_MESSAGE_TYPE type; - DWORD dwAllowedResults; - - DWORD cData; - LPCWSTR* rgwzData; - - INT nResultRecommendation; // recommended return result for this message based on analysis of real world installs. - - union - { - struct - { - DWORD dwPercentage; - } progress; - struct - { - DWORD dwErrorCode; - LPCWSTR wzMessage; - } error; - struct - { - INSTALLMESSAGE mt; - LPCWSTR wzMessage; - } msiMessage; - struct - { - DWORD cFiles; - LPCWSTR* rgwzFiles; - } msiFilesInUse; - }; -} WIU_MSI_EXECUTE_MESSAGE; - -typedef struct _WIU_MSI_PROGRESS -{ - DWORD dwTotal; - DWORD dwCompleted; - DWORD dwStep; - BOOL fMoveForward; - BOOL fEnableActionData; - BOOL fScriptInProgress; -} WIU_MSI_PROGRESS; - - -typedef int (*PFN_MSIEXECUTEMESSAGEHANDLER)( - __in WIU_MSI_EXECUTE_MESSAGE* pMessage, - __in_opt LPVOID pvContext - ); - -typedef struct _WIU_MSI_EXECUTE_CONTEXT -{ - BOOL fRollback; - PFN_MSIEXECUTEMESSAGEHANDLER pfnMessageHandler; - LPVOID pvContext; - WIU_MSI_PROGRESS rgMsiProgress[64]; - DWORD dwCurrentProgressIndex; - - INSTALLUILEVEL previousInstallUILevel; - HWND hwndPreviousParentWindow; - INSTALLUI_HANDLERW pfnPreviousExternalUI; - INSTALLUI_HANDLER_RECORD pfnPreviousExternalUIRecord; - - BOOL fSetPreviousExternalUIRecord; - BOOL fSetPreviousExternalUI; -} WIU_MSI_EXECUTE_CONTEXT; - - -// typedefs -typedef UINT (WINAPI *PFN_MSIENABLELOGW)( - __in DWORD dwLogMode, - __in_z LPCWSTR szLogFile, - __in DWORD dwLogAttributes - ); -typedef UINT (WINAPI *PFN_MSIGETPRODUCTINFOW)( - __in LPCWSTR szProductCode, - __in LPCWSTR szProperty, - __out_ecount_opt(*pcchValue) LPWSTR szValue, - __inout LPDWORD pcchValue - ); -typedef INSTALLSTATE (WINAPI *PFN_MSIGETCOMPONENTPATHW)( - __in LPCWSTR szProduct, - __in LPCWSTR szComponent, - __out_ecount_opt(*pcchBuf) LPWSTR lpPathBuf, - __inout_opt LPDWORD pcchBuf - ); -typedef INSTALLSTATE (WINAPI *PFN_MSILOCATECOMPONENTW)( - __in LPCWSTR szComponent, - __out_ecount_opt(*pcchBuf) LPWSTR lpPathBuf, - __inout_opt LPDWORD pcchBuf - ); -typedef UINT (WINAPI *PFN_MSIGETPRODUCTINFOEXW)( - __in LPCWSTR szProductCode, - __in_opt LPCWSTR szUserSid, - __in MSIINSTALLCONTEXT dwContext, - __in LPCWSTR szProperty, - __out_ecount_opt(*pcchValue) LPWSTR szValue, - __inout_opt LPDWORD pcchValue - ); -typedef INSTALLSTATE (WINAPI *PFN_MSIQUERYFEATURESTATEW)( - __in LPCWSTR szProduct, - __in LPCWSTR szFeature - ); -typedef UINT (WINAPI *PFN_MSIGETPATCHINFOEXW)( - __in_z LPCWSTR wzPatchCode, - __in_z LPCWSTR wzProductCode, - __in_z_opt LPCWSTR wzUserSid, - __in MSIINSTALLCONTEXT dwContext, - __in_z LPCWSTR wzProperty, - __out_opt LPWSTR wzValue, - __inout DWORD* pcchValue - ); -typedef UINT (WINAPI *PFN_MSIDETERMINEPATCHSEQUENCEW)( - __in_z LPCWSTR wzProductCode, - __in_z_opt LPCWSTR wzUserSid, - __in MSIINSTALLCONTEXT context, - __in DWORD cPatchInfo, - __in PMSIPATCHSEQUENCEINFOW pPatchInfo - ); -typedef UINT (WINAPI *PFN_MSIINSTALLPRODUCTW)( - __in LPCWSTR szPackagePath, - __in_opt LPCWSTR szCommandLine - ); -typedef UINT (WINAPI *PFN_MSICONFIGUREPRODUCTEXW)( - __in LPCWSTR szProduct, - __in int iInstallLevel, - __in INSTALLSTATE eInstallState, - __in_opt LPCWSTR szCommandLine - ); -typedef UINT (WINAPI *PFN_MSIREMOVEPATCHESW)( - __in_z LPCWSTR wzPatchList, - __in_z LPCWSTR wzProductCode, - __in INSTALLTYPE eUninstallType, - __in_z_opt LPCWSTR szPropertyList - ); -typedef INSTALLUILEVEL (WINAPI *PFN_MSISETINTERNALUI)( - __in INSTALLUILEVEL dwUILevel, - __inout_opt HWND *phWnd - ); -typedef UINT (WINAPI *PFN_MSISETEXTERNALUIRECORD)( - __in_opt INSTALLUI_HANDLER_RECORD puiHandler, - __in DWORD dwMessageFilter, - __in_opt LPVOID pvContext, - __out_opt PINSTALLUI_HANDLER_RECORD ppuiPrevHandler - ); -typedef INSTALLUI_HANDLERW (WINAPI *PFN_MSISETEXTERNALUIW)( - __in_opt INSTALLUI_HANDLERW puiHandler, - __in DWORD dwMessageFilter, - __in_opt LPVOID pvContext - ); -typedef UINT (WINAPI *PFN_MSIENUMPRODUCTSW)( - __in DWORD iProductIndex, - __out_ecount(MAX_GUID_CHARS + 1) LPWSTR lpProductBuf - ); -typedef UINT (WINAPI *PFN_MSIENUMPRODUCTSEXW)( - __in_z_opt LPCWSTR wzProductCode, - __in_z_opt LPCWSTR wzUserSid, - __in DWORD dwContext, - __in DWORD dwIndex, - __out_opt WCHAR wzInstalledProductCode[39], - __out_opt MSIINSTALLCONTEXT *pdwInstalledContext, - __out_opt LPWSTR wzSid, - __inout_opt LPDWORD pcchSid - ); - -typedef UINT (WINAPI *PFN_MSIENUMRELATEDPRODUCTSW)( - __in LPCWSTR lpUpgradeCode, - __reserved DWORD dwReserved, - __in DWORD iProductIndex, - __out_ecount(MAX_GUID_CHARS + 1) LPWSTR lpProductBuf - ); -typedef UINT (WINAPI *PFN_MSISOURCELISTADDSOURCEEXW)( - __in LPCWSTR szProductCodeOrPatchCode, - __in_opt LPCWSTR szUserSid, - __in MSIINSTALLCONTEXT dwContext, - __in DWORD dwOptions, - __in LPCWSTR szSource, - __in_opt DWORD dwIndex - ); - - -HRESULT DAPI WiuInitialize( - ); -void DAPI WiuUninitialize( - ); -void DAPI WiuFunctionOverride( - __in_opt PFN_MSIENABLELOGW pfnMsiEnableLogW, - __in_opt PFN_MSIGETCOMPONENTPATHW pfnMsiGetComponentPathW, - __in_opt PFN_MSILOCATECOMPONENTW pfnMsiLocateComponentW, - __in_opt PFN_MSIQUERYFEATURESTATEW pfnMsiQueryFeatureStateW, - __in_opt PFN_MSIGETPRODUCTINFOW pfnMsiGetProductInfoW, - __in_opt PFN_MSIGETPRODUCTINFOEXW pfnMsiGetProductInfoExW, - __in_opt PFN_MSIINSTALLPRODUCTW pfnMsiInstallProductW, - __in_opt PFN_MSICONFIGUREPRODUCTEXW pfnMsiConfigureProductExW, - __in_opt PFN_MSISETINTERNALUI pfnMsiSetInternalUI, - __in_opt PFN_MSISETEXTERNALUIW pfnMsiSetExternalUIW, - __in_opt PFN_MSIENUMRELATEDPRODUCTSW pfnMsiEnumRelatedProductsW, - __in_opt PFN_MSISETEXTERNALUIRECORD pfnMsiSetExternalUIRecord, - __in_opt PFN_MSISOURCELISTADDSOURCEEXW pfnMsiSourceListAddSourceExW - ); -HRESULT DAPI WiuGetComponentPath( - __in_z LPCWSTR wzProductCode, - __in_z LPCWSTR wzComponentId, - __out INSTALLSTATE* pInstallState, - __out_z LPWSTR* psczValue - ); -HRESULT DAPI WiuLocateComponent( - __in_z LPCWSTR wzComponentId, - __out INSTALLSTATE* pInstallState, - __out_z LPWSTR* psczValue - ); -HRESULT DAPI WiuQueryFeatureState( - __in_z LPCWSTR wzProduct, - __in_z LPCWSTR wzFeature, - __out INSTALLSTATE* pInstallState - ); -HRESULT DAPI WiuGetProductInfo( - __in_z LPCWSTR wzProductCode, - __in_z LPCWSTR wzProperty, - __out LPWSTR* psczValue - ); -HRESULT DAPI WiuGetProductInfoEx( - __in_z LPCWSTR wzProductCode, - __in_z_opt LPCWSTR wzUserSid, - __in MSIINSTALLCONTEXT dwContext, - __in_z LPCWSTR wzProperty, - __out LPWSTR* psczValue - ); -HRESULT DAPI WiuGetProductProperty( - __in MSIHANDLE hProduct, - __in_z LPCWSTR wzProperty, - __out LPWSTR* psczValue - ); -HRESULT DAPI WiuGetPatchInfoEx( - __in_z LPCWSTR wzPatchCode, - __in_z LPCWSTR wzProductCode, - __in_z_opt LPCWSTR wzUserSid, - __in MSIINSTALLCONTEXT dwContext, - __in_z LPCWSTR wzProperty, - __out LPWSTR* psczValue - ); -HRESULT DAPI WiuDeterminePatchSequence( - __in_z LPCWSTR wzProductCode, - __in_z_opt LPCWSTR wzUserSid, - __in MSIINSTALLCONTEXT context, - __in PMSIPATCHSEQUENCEINFOW pPatchInfo, - __in DWORD cPatchInfo - ); -HRESULT DAPI WiuEnumProducts( - __in DWORD iProductIndex, - __out_ecount(MAX_GUID_CHARS + 1) LPWSTR wzProductCode - ); -HRESULT DAPI WiuEnumProductsEx( - __in_z_opt LPCWSTR wzProductCode, - __in_z_opt LPCWSTR wzUserSid, - __in DWORD dwContext, - __in DWORD dwIndex, - __out_opt WCHAR wzInstalledProductCode[39], - __out_opt MSIINSTALLCONTEXT *pdwInstalledContext, - __out_opt LPWSTR wzSid, - __inout_opt LPDWORD pcchSid - ); -HRESULT DAPI WiuEnumRelatedProducts( - __in_z LPCWSTR wzUpgradeCode, - __in DWORD iProductIndex, - __out_ecount(MAX_GUID_CHARS + 1) LPWSTR wzProductCode - ); -HRESULT DAPI WiuEnableLog( - __in DWORD dwLogMode, - __in_z LPCWSTR wzLogFile, - __in DWORD dwLogAttributes - ); -HRESULT DAPI WiuInitializeExternalUI( - __in PFN_MSIEXECUTEMESSAGEHANDLER pfnMessageHandler, - __in INSTALLUILEVEL internalUILevel, - __in HWND hwndParent, - __in LPVOID pvContext, - __in BOOL fRollback, - __in WIU_MSI_EXECUTE_CONTEXT* pExecuteContext - ); -void DAPI WiuUninitializeExternalUI( - __in WIU_MSI_EXECUTE_CONTEXT* pExecuteContext - ); -HRESULT DAPI WiuConfigureProductEx( - __in_z LPCWSTR wzProduct, - __in int iInstallLevel, - __in INSTALLSTATE eInstallState, - __in_z LPCWSTR wzCommandLine, - __out WIU_RESTART* pRestart - ); -HRESULT DAPI WiuInstallProduct( - __in_z LPCWSTR wzPackagPath, - __in_z LPCWSTR wzCommandLine, - __out WIU_RESTART* pRestart - ); -HRESULT DAPI WiuRemovePatches( - __in_z LPCWSTR wzPatchList, - __in_z LPCWSTR wzProductCode, - __in_z LPCWSTR wzPropertyList, - __out WIU_RESTART* pRestart - ); -HRESULT DAPI WiuSourceListAddSourceEx( - __in_z LPCWSTR wzProductCodeOrPatchCode, - __in_z_opt LPCWSTR wzUserSid, - __in MSIINSTALLCONTEXT dwContext, - __in DWORD dwCode, - __in_z LPCWSTR wzSource, - __in_opt DWORD dwIndex - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/inc/wuautil.h b/scripts/windows/installer/WiXSDK/inc/wuautil.h deleted file mode 100644 index 59c2853089..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/wuautil.h +++ /dev/null @@ -1,31 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// Header for Windows Update Agent helpers. -// -//------------------------------------------------------------------------------------------------- - -#pragma once - - -#if defined(__cplusplus) -extern "C" { -#endif - -HRESULT DAPI WuaPauseAutomaticUpdates(); - -HRESULT DAPI WuaResumeAutomaticUpdates(); - -HRESULT DAPI WuaRestartRequired( - __out BOOL* pfRestartRequired - ); - -#if defined(__cplusplus) -} -#endif \ No newline at end of file diff --git a/scripts/windows/installer/WiXSDK/inc/xmlutil.h b/scripts/windows/installer/WiXSDK/inc/xmlutil.h deleted file mode 100644 index bef0d8a8c5..0000000000 --- a/scripts/windows/installer/WiXSDK/inc/xmlutil.h +++ /dev/null @@ -1,178 +0,0 @@ -#pragma once -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -// -// -// XML helper functions. -// -//------------------------------------------------------------------------------------------------- - -// constant XML CLSIDs and IIDs -extern __declspec(selectany) const CLSID XmlUtil_CLSID_DOMDocument = {0x2933BF90, 0x7B36, 0x11d2, {0xB2, 0x0E, 0x00, 0xC0, 0x4F, 0x98, 0x3E, 0x60}}; -extern __declspec(selectany) const CLSID XmlUtil_CLSID_DOMDocument20 = {0xF6D90F11, 0x9C73, 0x11D3, {0xB3, 0x2E, 0x00, 0xC0, 0x4F, 0x99, 0x0B, 0xB4}}; -extern __declspec(selectany) const CLSID XmlUtil_CLSID_DOMDocument26 = {0xf5078f1b, 0xc551, 0x11d3, {0x89, 0xb9, 0x00, 0x00, 0xf8, 0x1f, 0xe2, 0x21}}; -extern __declspec(selectany) const CLSID XmlUtil_CLSID_DOMDocument30 = {0xf5078f32, 0xc551, 0x11d3, {0x89, 0xb9, 0x00, 0x00, 0xf8, 0x1f, 0xe2, 0x21}}; -extern __declspec(selectany) const CLSID XmlUtil_CLSID_DOMDocument40 = {0x88d969c0, 0xf192, 0x11d4, {0xa6, 0x5f, 0x00, 0x40, 0x96, 0x32, 0x51, 0xe5}}; -extern __declspec(selectany) const CLSID XmlUtil_CLSID_DOMDocument50 = {0x88d969e5, 0xf192, 0x11d4, {0xa6, 0x5f, 0x00, 0x40, 0x96, 0x32, 0x51, 0xe5}}; -extern __declspec(selectany) const CLSID XmlUtil_CLSID_DOMDocument60 = {0x88d96a05, 0xf192, 0x11d4, {0xa6, 0x5f, 0x00, 0x40, 0x96, 0x32, 0x51, 0xe5}}; -extern __declspec(selectany) const CLSID XmlUtil_CLSID_XMLSchemaCache = {0x88d969c2, 0xf192, 0x11d4, {0xa6, 0x5f, 0x00, 0x40, 0x96, 0x32, 0x51, 0xe5}}; - -extern __declspec(selectany) const IID XmlUtil_IID_IXMLDOMDocument = {0x2933BF81, 0x7B36, 0x11D2, {0xB2, 0x0E, 0x00, 0xC0, 0x4F, 0x98, 0x3E, 0x60}}; -extern __declspec(selectany) const IID XmlUtil_IID_IXMLDOMDocument2 = {0x2933BF95, 0x7B36, 0x11D2, {0xB2, 0x0E, 0x00, 0xC0, 0x4F, 0x98, 0x3E, 0x60}}; -extern __declspec(selectany) const IID XmlUtil_IID_IXMLDOMSchemaCollection = {0x373984C8, 0xB845, 0x449B, {0x91, 0xE7, 0x45, 0xAC, 0x83, 0x03, 0x6A, 0xDE}}; - -enum XML_LOAD_ATTRIBUTE -{ - XML_LOAD_PRESERVE_WHITESPACE = 1, -}; - - -#ifdef __cplusplus -extern "C" { -#endif - -HRESULT DAPI XmlInitialize(); -void DAPI XmlUninitialize(); - -HRESULT DAPI XmlCreateElement( - __in IXMLDOMDocument *pixdDocument, - __in_z LPCWSTR wzElementName, - __out IXMLDOMElement **ppixnElement - ); -HRESULT DAPI XmlCreateDocument( - __in_opt LPCWSTR pwzElementName, - __out IXMLDOMDocument** ppixdDocument, - __out_opt IXMLDOMElement** ppixeRootElement = NULL - ); -HRESULT DAPI XmlLoadDocument( - __in_z LPCWSTR wzDocument, - __out IXMLDOMDocument** ppixdDocument - ); -HRESULT DAPI XmlLoadDocumentEx( - __in_z LPCWSTR wzDocument, - __in DWORD dwAttributes, - __out IXMLDOMDocument** ppixdDocument - ); -HRESULT DAPI XmlLoadDocumentFromFile( - __in_z LPCWSTR wzPath, - __out IXMLDOMDocument** ppixdDocument - ); -HRESULT DAPI XmlLoadDocumentFromBuffer( - __in_bcount(cbSource) const BYTE* pbSource, - __in DWORD cbSource, - __out IXMLDOMDocument** ppixdDocument - ); -HRESULT DAPI XmlLoadDocumentFromFileEx( - __in_z LPCWSTR wzPath, - __in DWORD dwAttributes, - __out IXMLDOMDocument** ppixdDocument - ); -HRESULT DAPI XmlSelectSingleNode( - __in IXMLDOMNode* pixnParent, - __in_z LPCWSTR wzXPath, - __out IXMLDOMNode **ppixnChild - ); -HRESULT DAPI XmlSetAttribute( - __in IXMLDOMNode* pixnNode, - __in_z LPCWSTR pwzAttribute, - __in_z LPCWSTR pwzAttributeValue - ); -HRESULT DAPI XmlCreateTextNode( - __in IXMLDOMDocument *pixdDocument, - __in_z LPCWSTR wzText, - __out IXMLDOMText **ppixnTextNode - ); -HRESULT DAPI XmlGetText( - __in IXMLDOMNode* pixnNode, - __deref_out_z BSTR* pbstrText - ); -HRESULT DAPI XmlGetAttribute( - __in IXMLDOMNode* pixnNode, - __in_z LPCWSTR pwzAttribute, - __deref_out_z BSTR* pbstrAttributeValue - ); -HRESULT DAPI XmlGetAttributeEx( - __in IXMLDOMNode* pixnNode, - __in_z LPCWSTR wzAttribute, - __deref_out_z LPWSTR* psczAttributeValue - ); -HRESULT DAPI XmlGetYesNoAttribute( - __in IXMLDOMNode* pixnNode, - __in_z LPCWSTR wzAttribute, - __out BOOL* pfYes - ); -HRESULT DAPI XmlGetAttributeNumber( - __in IXMLDOMNode* pixnNode, - __in_z LPCWSTR pwzAttribute, - __out DWORD* pdwValue - ); -HRESULT DAPI XmlGetAttributeNumberBase( - __in IXMLDOMNode* pixnNode, - __in_z LPCWSTR pwzAttribute, - __in int nBase, - __out DWORD* pdwValue - ); -HRESULT DAPI XmlGetAttributeLargeNumber( - __in IXMLDOMNode* pixnNode, - __in_z LPCWSTR pwzAttribute, - __out DWORD64* pdw64Value - ); -HRESULT DAPI XmlGetNamedItem( - __in IXMLDOMNamedNodeMap *pixnmAttributes, - __in_opt LPCWSTR wzName, - __out IXMLDOMNode **ppixnNamedItem - ); -HRESULT DAPI XmlSetText( - __in IXMLDOMNode* pixnNode, - __in_z LPCWSTR pwzText - ); -HRESULT DAPI XmlSetTextNumber( - __in IXMLDOMNode *pixnNode, - __in DWORD dwValue - ); -HRESULT DAPI XmlCreateChild( - __in IXMLDOMNode* pixnParent, - __in_z LPCWSTR pwzElementType, - __out IXMLDOMNode** ppixnChild - ); -HRESULT DAPI XmlRemoveAttribute( - __in IXMLDOMNode* pixnNode, - __in_z LPCWSTR pwzAttribute - ); -HRESULT DAPI XmlSelectNodes( - __in IXMLDOMNode* pixnParent, - __in_z LPCWSTR wzXPath, - __out IXMLDOMNodeList **ppixnChild - ); -HRESULT DAPI XmlNextAttribute( - __in IXMLDOMNamedNodeMap* pixnnm, - __out IXMLDOMNode** pixnAttribute, - __deref_opt_out_z_opt BSTR* pbstrAttribute - ); -HRESULT DAPI XmlNextElement( - __in IXMLDOMNodeList* pixnl, - __out IXMLDOMNode** pixnElement, - __deref_opt_out_z_opt BSTR* pbstrElement - ); -HRESULT DAPI XmlRemoveChildren( - __in IXMLDOMNode* pixnSource, - __in_z LPCWSTR pwzXPath - ); -HRESULT DAPI XmlSaveDocument( - __in IXMLDOMDocument* pixdDocument, - __inout LPCWSTR wzPath - ); -HRESULT DAPI XmlSaveDocumentToBuffer( - __in IXMLDOMDocument* pixdDocument, - __deref_out_bcount(*pcbDest) BYTE** ppbDest, - __out DWORD* pcbDest - ); - -#ifdef __cplusplus -} -#endif diff --git a/scripts/windows/installer/WiXSDK/vs2010/lib/x86/balutil.lib b/scripts/windows/installer/WiXSDK/vs2010/lib/x86/balutil.lib deleted file mode 100644 index 395bdd6277..0000000000 Binary files a/scripts/windows/installer/WiXSDK/vs2010/lib/x86/balutil.lib and /dev/null differ diff --git a/scripts/windows/installer/WiXSDK/vs2010/lib/x86/deputil.lib b/scripts/windows/installer/WiXSDK/vs2010/lib/x86/deputil.lib deleted file mode 100644 index a50ac90476..0000000000 Binary files a/scripts/windows/installer/WiXSDK/vs2010/lib/x86/deputil.lib and /dev/null differ diff --git a/scripts/windows/installer/WiXSDK/vs2010/lib/x86/dutil.lib b/scripts/windows/installer/WiXSDK/vs2010/lib/x86/dutil.lib deleted file mode 100644 index 01218ae9ad..0000000000 Binary files a/scripts/windows/installer/WiXSDK/vs2010/lib/x86/dutil.lib and /dev/null differ diff --git a/scripts/windows/installer/WiXSDK/vs2010/lib/x86/wcautil.lib b/scripts/windows/installer/WiXSDK/vs2010/lib/x86/wcautil.lib deleted file mode 100644 index e46cbd4d5d..0000000000 Binary files a/scripts/windows/installer/WiXSDK/vs2010/lib/x86/wcautil.lib and /dev/null differ diff --git a/scripts/windows/installer/WiXSDK/vs2012/lib/x86/balutil.lib b/scripts/windows/installer/WiXSDK/vs2012/lib/x86/balutil.lib deleted file mode 100644 index 2a91dde774..0000000000 Binary files a/scripts/windows/installer/WiXSDK/vs2012/lib/x86/balutil.lib and /dev/null differ diff --git a/scripts/windows/installer/WiXSDK/vs2012/lib/x86/deputil.lib b/scripts/windows/installer/WiXSDK/vs2012/lib/x86/deputil.lib deleted file mode 100644 index 01e37e7e52..0000000000 Binary files a/scripts/windows/installer/WiXSDK/vs2012/lib/x86/deputil.lib and /dev/null differ diff --git a/scripts/windows/installer/WiXSDK/vs2012/lib/x86/dutil.lib b/scripts/windows/installer/WiXSDK/vs2012/lib/x86/dutil.lib deleted file mode 100644 index 09344c7718..0000000000 Binary files a/scripts/windows/installer/WiXSDK/vs2012/lib/x86/dutil.lib and /dev/null differ diff --git a/scripts/windows/installer/WiXSDK/vs2012/lib/x86/wcautil.lib b/scripts/windows/installer/WiXSDK/vs2012/lib/x86/wcautil.lib deleted file mode 100644 index dce658c30f..0000000000 Binary files a/scripts/windows/installer/WiXSDK/vs2012/lib/x86/wcautil.lib and /dev/null differ diff --git a/scripts/windows/installer/WiXSDK/vs2013/lib/x86/balutil.lib b/scripts/windows/installer/WiXSDK/vs2013/lib/x86/balutil.lib deleted file mode 100644 index 1a46d16c42..0000000000 Binary files a/scripts/windows/installer/WiXSDK/vs2013/lib/x86/balutil.lib and /dev/null differ diff --git a/scripts/windows/installer/WiXSDK/vs2013/lib/x86/deputil.lib b/scripts/windows/installer/WiXSDK/vs2013/lib/x86/deputil.lib deleted file mode 100644 index cd372adf78..0000000000 Binary files a/scripts/windows/installer/WiXSDK/vs2013/lib/x86/deputil.lib and /dev/null differ diff --git a/scripts/windows/installer/WiXSDK/vs2013/lib/x86/dutil.lib b/scripts/windows/installer/WiXSDK/vs2013/lib/x86/dutil.lib deleted file mode 100644 index 529651fd04..0000000000 Binary files a/scripts/windows/installer/WiXSDK/vs2013/lib/x86/dutil.lib and /dev/null differ diff --git a/scripts/windows/installer/WiXSDK/vs2013/lib/x86/wcautil.lib b/scripts/windows/installer/WiXSDK/vs2013/lib/x86/wcautil.lib deleted file mode 100644 index 4a43e90f78..0000000000 Binary files a/scripts/windows/installer/WiXSDK/vs2013/lib/x86/wcautil.lib and /dev/null differ diff --git a/scripts/windows/installer/build.bat b/scripts/windows/installer/build.bat deleted file mode 100755 index b936db2db3..0000000000 --- a/scripts/windows/installer/build.bat +++ /dev/null @@ -1,92 +0,0 @@ -@echo off - -set MSBUILD="%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" - - -IF "%1"=="" GOTO :BUILD -IF "%1"=="clean" GOTO :CLEAN - -:BUILD - -if not exist Release md Release - -echo Building WiXBalExtension... -pushd WiXBalExtension -Call Build -popd - -rem GOTO :Installer - -echo Building custom action collection 32-bit library (WiXHelper project) -%MSBUILD% WiXHelper\WiXHelper.vcxproj /t:Rebuild /p:Configuration="Release" /p:Platform=Win32 /p:DefineConstants="TRACE" /clp:ErrorsOnly -if %errorlevel% neq 0 ( - echo Build failed. - rem pause - goto :EOF -) - - -rem We don't have a 64 bit msi package, so I will command this -rem echo Building custom action collection 64-bit library (WiXHelper project) -rem %MSBUILD% WiXHelper\WiXHelper.vcxproj /t:Rebuild /p:Configuration="Release" /p:Platform=x64 /p:DefineConstants="TRACE" /clp:ErrorsOnly -rem if %errorlevel% neq 0 ( -rem echo Build failed. -rem pause -rem goto :EOF -rem ) - - -:Installer - -echo Building Meteor installer package... -%MSBUILD% MeteorSetup.sln /t:Rebuild /p:Configuration="Release" /p:Platform="x86" /p:DefineConstants="TRACE" /clp:ErrorsOnly -if %errorlevel% neq 0 ( - echo Build failed - rem pause - goto :EOF -) - - -goto :EOF - -REM ***************************************************************** -REM End of Main -REM ***************************************************************** - - -:CLEAN -IF EXIST WiXHelper\*.sdf DEL /Q WiXHelper\*.sdf -IF EXIST WiXHelper\*.suo DEL /Q /A:H WiXHelper\*.suo -IF EXIST WiXBalExtension\*.sdf DEL /Q WiXBalExtension\*.sdf -IF EXIST WiXBalExtension\*.suo DEL /Q /A:H WiXBalExtension\*.suo - -Call :DeleteDir "ipch" -Call :DeleteDir "WiXHelper\ipch" -Call :DeleteDir "WiXHelper\bin" -Call :DeleteDir "WiXHelper\obj" -Call :DeleteDir "WiXInstaller\bin" -Call :DeleteDir "WiXInstaller\obj" -Call :DeleteDir "WiXBalExtension\ipch" -Call :DeleteDir "WiXBalExtension\wixstdba\Release" -Call :DeleteDir "WiXBalExtension\wixstdba\Debug" -Call :DeleteDir "WiXBalExtension\wixlib\obj" -Call :DeleteDir "WiXBalExtension\wixext\obj" -Call :DeleteDir "WiXBalExtension\wixext\bin" -Call :DeleteDir "WiXBalExtension\bafunctions\Release" -Call :DeleteDir "WiXBalExtension\bafunctions\Debug" -Call :DeleteDir "WiXBalExtension\build\Xsd" - -for /f "usebackq delims=" %%I in (`dir /s /b WiXBalExtension\build\*`) do if not %%~nxI==WixBalExtensionExt.dll del /Q "%%I" -goto :EOF - - - -REM ***************************************************************** -REM Delete/create directory -REM ***************************************************************** -:DeleteDir -rd %1% /q/s 2>nul 1>nul -goto :EOF - - -