Merge pull request #9340 from meteor/abernix/remove-windows-installer
Remove the source of the deprecated Windows installer.
@@ -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/"
|
||||
|
||||
4
scripts/windows/.gitignore
vendored
@@ -1,4 +0,0 @@
|
||||
*.tar.gz
|
||||
*.exe
|
||||
*.pdb
|
||||
*_.cs
|
||||
@@ -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.
|
||||
@@ -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"
|
||||
|
||||
111
scripts/windows/installer/.gitignore
vendored
@@ -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
|
||||
|
||||
@@ -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
|
||||
196
scripts/windows/installer/WiXBalExtension/.gitignore
vendored
@@ -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
|
||||
@@ -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
|
||||
@@ -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.
|
||||
@@ -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
|
||||
@@ -1,3 +0,0 @@
|
||||
wixver.cs
|
||||
wixver.h
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="WriteVersionFiles" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<MajorBuildNumber>3</MajorBuildNumber>
|
||||
<MinorBuildNumber>7</MinorBuildNumber>
|
||||
|
||||
<CppVersionFile>.\wixver.h</CppVersionFile>
|
||||
<CSharpVersionFile>.\wixver.cs</CSharpVersionFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Base>$([System.DateTime]::new(2000, 1, 1))</Base>
|
||||
<BuildNumber>$([System.Convert]::ToInt32($([System.DateTime]::Now.ToUniversalTime().Subtract($(Base)).TotalDays)))</BuildNumber>
|
||||
<BuildRevision>$([System.Convert]::ToInt32($([MSBuild]::Divide($([System.Convert]::ToInt32($([System.DateTime]::Now.ToUniversalTime().TimeOfDay.TotalSeconds))), 2))))</BuildRevision>
|
||||
|
||||
<FullBuildVersionString>$(MajorBuildNumber).$(MinorBuildNumber).$(BuildNumber).$(BuildRevision)</FullBuildVersionString>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
================================================================================================
|
||||
VersionPrint
|
||||
|
||||
Displays the versions of this build.
|
||||
================================================================================================
|
||||
-->
|
||||
<Target Name="VersionPrint">
|
||||
<Message Text="FullBuildVersionString = $(FullBuildVersionString)" />
|
||||
</Target>
|
||||
|
||||
<!--
|
||||
================================================================================================
|
||||
WriteCppVersionFile
|
||||
|
||||
Creates the wixver.h version file for C++ code.
|
||||
================================================================================================
|
||||
-->
|
||||
<Target Name="WriteCppVersionFile"
|
||||
Returns="$(CppVersionFile)">
|
||||
<ItemGroup>
|
||||
<CppVersionLines Include="
|
||||
// <auto-generated/>
|
||||
#ifndef _VERSION_FILE_H_
|
||||
#define _VERSION_FILE_H_
|
||||
|
||||
#define szVerMajorMinor "$(MajorBuildNumber).$(MinorBuildNumber)"
|
||||
#define szVerMajorMinorBuildRev "$(FullBuildVersionString)"
|
||||
#define rmj $(MajorBuildNumber)
|
||||
#define rmm $(MinorBuildNumber)
|
||||
#define rbd $(BuildNumber)
|
||||
#define rev $(BuildRevision)
|
||||
#define szVerName "BalExtensionExt Release"
|
||||
|
||||
#endif
|
||||
"/>
|
||||
</ItemGroup>
|
||||
|
||||
<WriteLinesToFile Overwrite="true"
|
||||
File="$(CppVersionFile)"
|
||||
Lines="@(CppVersionLines)" />
|
||||
<ItemGroup>
|
||||
<FileWrites Include="$(CppVersionFile)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<!--
|
||||
================================================================================================
|
||||
WriteCSharpVersionFile
|
||||
|
||||
Creates the wixver.cs version file for C# code.
|
||||
================================================================================================
|
||||
-->
|
||||
<Target Name="WriteCSharpVersionFile"
|
||||
Returns="$(CSharpVersionFile)">
|
||||
<ItemGroup>
|
||||
<CSharpLines Include="
|
||||
// <auto-generated/>
|
||||
using System.Reflection%3B
|
||||
[assembly:AssemblyVersion("$(MajorBuildNumber).0.0.0")]
|
||||
[assembly:AssemblyFileVersion("$(FullBuildVersionString)")]
|
||||
"/>
|
||||
</ItemGroup>
|
||||
|
||||
<WriteLinesToFile Overwrite="true"
|
||||
File="$(CSharpVersionFile)"
|
||||
Lines="@(CSharpLines)" />
|
||||
<ItemGroup>
|
||||
<FileWrites Include="$(CSharpVersionFile)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<!--
|
||||
================================================================================================
|
||||
WriteVersionFiles
|
||||
|
||||
Creates the wixver.* version files.
|
||||
================================================================================================
|
||||
-->
|
||||
<Target Name="WriteVersionFiles" DependsOnTargets="VersionPrint;WriteCppVersionFile;WriteCSharpVersionFile" />
|
||||
|
||||
</Project>
|
||||
@@ -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")]
|
||||
@@ -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_
|
||||
@@ -1,140 +0,0 @@
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="wix.rc" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// Common resource file for any native wix resources.
|
||||
// </summary>
|
||||
// <remarks>
|
||||
// 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"
|
||||
// </remarks>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#include <winver.h>
|
||||
#include <windows.h>
|
||||
#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
|
||||
@@ -1,346 +0,0 @@
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="BalCompiler.cs" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// The compiler for the Windows Installer XML Toolset Bal Extension.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
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;
|
||||
|
||||
/// <summary>
|
||||
/// The compiler for the Windows Installer XML Toolset Bal Extension.
|
||||
/// </summary>
|
||||
public sealed class BalCompiler : CompilerExtension
|
||||
{
|
||||
private SourceLineNumberCollection addedConditionLineNumber;
|
||||
private XmlSchema schema;
|
||||
|
||||
/// <summary>
|
||||
/// Instantiate a new BalCompiler.
|
||||
/// </summary>
|
||||
public BalCompiler()
|
||||
{
|
||||
this.addedConditionLineNumber = null;
|
||||
this.schema = LoadXmlSchemaHelper(Assembly.GetExecutingAssembly(), "Microsoft.Tools.WindowsInstallerXml.Extensions.Xsd.bal.xsd");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the schema for this extension.
|
||||
/// </summary>
|
||||
/// <value>Schema for this extension.</value>
|
||||
public override XmlSchema Schema
|
||||
{
|
||||
get { return this.schema; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes an element for the Compiler.
|
||||
/// </summary>
|
||||
/// <param name="sourceLineNumbers">Source line number for the parent element.</param>
|
||||
/// <param name="parentElement">Parent element of element to process.</param>
|
||||
/// <param name="element">Element to process.</param>
|
||||
/// <param name="contextValues">Extra information about the context in which this element is being parsed.</param>
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes an attribute for the Compiler.
|
||||
/// </summary>
|
||||
/// <param name="sourceLineNumbers">Source line number for the parent element.</param>
|
||||
/// <param name="parentElement">Parent element of element to process.</param>
|
||||
/// <param name="attribute">Attribute to process.</param>
|
||||
/// <param name="contextValues">Extra information about the context in which this element is being parsed.</param>
|
||||
public override void ParseAttribute(SourceLineNumberCollection sourceLineNumbers, XmlElement parentElement, XmlAttribute attribute, Dictionary<string, string> 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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parses a Condition element for Bundles.
|
||||
/// </summary>
|
||||
/// <param name="node">The element to parse.</param>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parses a WixExtendedBootstrapperApplication element for Bundles.
|
||||
/// </summary>
|
||||
/// <param name="node">The element to parse.</param>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="BalExtension.cs" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// The Windows Installer XML Toolset Bal extension.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
namespace Microsoft.Tools.WindowsInstallerXml.Extensions
|
||||
{
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
/// <summary>
|
||||
/// The Windows Installer XML Toolset Bal Extension.
|
||||
/// </summary>
|
||||
public sealed class BalExtension : WixExtension
|
||||
{
|
||||
private BalCompiler compilerExtension;
|
||||
private Library library;
|
||||
private TableDefinitionCollection tableDefinitions;
|
||||
|
||||
private BalPreprocessorExtension preprocessorExtension;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the optional compiler extension.
|
||||
/// </summary>
|
||||
/// <value>The optional compiler extension.</value>
|
||||
public override CompilerExtension CompilerExtension
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == this.compilerExtension)
|
||||
{
|
||||
this.compilerExtension = new BalCompiler();
|
||||
}
|
||||
|
||||
return this.compilerExtension;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the optional table definitions for this extension.
|
||||
/// </summary>
|
||||
/// <value>The optional table definitions for this extension.</value>
|
||||
public override TableDefinitionCollection TableDefinitions
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == this.tableDefinitions)
|
||||
{
|
||||
this.tableDefinitions = LoadTableDefinitionHelper(Assembly.GetExecutingAssembly(), "Microsoft.Tools.WindowsInstallerXml.Extensions.Data.tables.xml");
|
||||
}
|
||||
|
||||
return this.tableDefinitions;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the library associated with this extension.
|
||||
/// </summary>
|
||||
/// <param name="tableDefinitions">The table definitions to use while loading the library.</param>
|
||||
/// <returns>The loaded library.</returns>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the optional preprocessor extension.
|
||||
/// </summary>
|
||||
/// <value>The optional preprocessor extension.</value>
|
||||
public override PreprocessorExtension PreprocessorExtension
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == this.preprocessorExtension)
|
||||
{
|
||||
this.preprocessorExtension = new BalPreprocessorExtension();
|
||||
}
|
||||
|
||||
return this.preprocessorExtension;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="ValuePreprocessorExtension.cs" company="">
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// A WiX preprocessor extension.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
namespace Microsoft.Tools.WindowsInstallerXml.Extensions
|
||||
{
|
||||
using System;
|
||||
using Microsoft.Tools.WindowsInstallerXml;
|
||||
|
||||
/// <summary>
|
||||
/// The preprocessor extension.
|
||||
/// </summary>
|
||||
public sealed class BalPreprocessorExtension : PreprocessorExtension
|
||||
{
|
||||
private static readonly string[] prefixes = {"bal"};
|
||||
|
||||
/// <summary>
|
||||
/// Gets the variable prefixes for this extension.
|
||||
/// </summary>
|
||||
/// <value>The variable prefixes for this extension.</value>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="AssemblyInfo.cs" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// The assembly information for the Windows Installer XML Toolset Bootstrapper Application Layer Extension.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
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))]
|
||||
@@ -1,88 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<copyright file="WixBalExtension.csproj" company="Outercurve Foundation">
|
||||
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.
|
||||
</copyright>
|
||||
-->
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{6F9B6AFD-538B-4DF6-A1E8-6C224CBD7B05}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Microsoft.Tools.WindowsInstallerXml.Extensions</RootNamespace>
|
||||
<AssemblyName>WixBalExtensionExt</AssemblyName>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="wix, Version=3.0.0.0, Culture=neutral, PublicKeyToken=ce35f76fcda82bad, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>$(WIX)bin\wix.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\inc\WixDistribution.cs">
|
||||
<Link>Properties\WixDistribution.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\inc\wixver.cs">
|
||||
<Link>Properties\wixver.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="BalCompiler.cs" />
|
||||
<Compile Include="BalExtension.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="BalPreprocessorExtension.cs" />
|
||||
<MsgGenSource Include="Data\messages.xml">
|
||||
<ResourcesLogicalName>$(RootNamespace).Data.Messages.resources</ResourcesLogicalName>
|
||||
</MsgGenSource>
|
||||
<EmbeddedResource Include="Data\tables.xml">
|
||||
<LogicalName>$(RootNamespace).Data.tables.xml</LogicalName>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Xsd\bal.xsd">
|
||||
<LogicalName>$(RootNamespace).Xsd.bal.xsd</LogicalName>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<XsdGenSource Include="Xsd\bal.xsd">
|
||||
<CommonNamespace>Microsoft.Tools.WindowsInstallerXml.Serialize</CommonNamespace>
|
||||
<Namespace>Microsoft.Tools.WindowsInstallerXml.Extensions.Serialize.Bal</Namespace>
|
||||
</XsdGenSource>
|
||||
<EmbeddedResource Include="..\build\balExt.wixlib">
|
||||
<Link>Data\balExt.wixlib</Link>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -1,139 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<copyright file="bal.xsd" company="Outercurve Foundation">
|
||||
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.
|
||||
</copyright>
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
targetNamespace="http://schemas.microsoft.com/wix/BalExtension"
|
||||
xmlns="http://schemas.microsoft.com/wix/BalExtension">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
The source code schema for the Windows Installer XML Toolset Burn User Experience Extension.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
|
||||
<xs:import namespace="http://schemas.microsoft.com/wix/2006/wi" />
|
||||
|
||||
<xs:element name="Condition">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Conditions for a bundle. The condition is specified in the inner text of the element.
|
||||
</xs:documentation>
|
||||
<xs:appinfo>
|
||||
<xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="Bundle" />
|
||||
<xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="Fragment" />
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
The condition that must evaluate to true for the installation to continue.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:attribute name="Message" type="xs:string" use="required">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Set the value to the text to display when the condition fails and the installation must be terminated.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="WixExtendedBootstrapperApplication">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Configures WixExtendedBootstrapperApplication for a Bundle.
|
||||
</xs:documentation>
|
||||
<xs:appinfo>
|
||||
<xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="BootstrapperApplicationRef" />
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:complexType>
|
||||
<xs:attribute name="LaunchTarget" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>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.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="LicenseFile" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Source file of the RTF license file. Cannot be used simultaneously with LicenseUrl.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="LicenseUrl" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>URL target of the license link. Cannot be used simultaneously with LicenseFile. This attribute can be empty to hide the license link completely.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="LogoFile" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Source file of the logo graphic.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="LogoSideFile" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Source file of the side logo graphic.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="ThemeFile" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Source file of the theme XML.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="LocalizationFile" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Source file of the theme localization .wxl file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="SuppressOptionsUI" type="YesNoType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>If set to "yes", the Options button will not be shown and the user will not be able to choose an installation directory.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="SuppressDowngradeFailure" type="YesNoType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>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. </xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="SuppressRepair" type="YesNoType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>If set to "yes", the Repair button will not be shown in the maintenance-mode UI.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:attribute name="Overridable">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
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'."
|
||||
</xs:documentation>
|
||||
<xs:appinfo>
|
||||
<xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="Variable" />
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
|
||||
<xs:simpleType name="YesNoType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Values of this type will either be "yes" or "no".</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:restriction base="xs:NMTOKEN">
|
||||
<xs:enumeration value="no"/>
|
||||
<xs:enumeration value="yes"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:schema>
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<copyright file="messages.xml" company="Outercurve Foundation">
|
||||
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.
|
||||
</copyright>
|
||||
-->
|
||||
<!--
|
||||
The messages for the Windows Installer XML Toolset Bal Extension.
|
||||
-->
|
||||
<Messages Namespace="Microsoft.Tools.WindowsInstallerXml.Extensions" Resources="Data.Messages" xmlns="http://schemas.microsoft.com/genmsgs/2004/07/messages">
|
||||
<Class Name="BalErrors" ContainerName="BalErrorEventArgs" BaseContainerName="WixErrorEventArgs">
|
||||
</Class>
|
||||
</Messages>
|
||||
@@ -1,34 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<copyright file="tables.xml" company="Outercurve Foundation">
|
||||
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.
|
||||
</copyright>
|
||||
-->
|
||||
<!--
|
||||
The table definitions for the Windows Installer XML Toolset Bal Extension.
|
||||
-->
|
||||
<tableDefinitions xmlns="http://schemas.microsoft.com/wix/2006/tables">
|
||||
<tableDefinition name="WixBalCondition" bootstrapperApplicationData="yes">
|
||||
<columnDefinition name="Condition" type="string" length="255" primaryKey="yes" localizable="yes"
|
||||
category="condition" description="Expression which must evaluate to TRUE in order for install to commence."/>
|
||||
<columnDefinition name="Message" type="localized" length="255" escapeIdtCharacters="yes"
|
||||
category="formatted" description="Localizable text to display when condition fails and install must abort."/>
|
||||
</tableDefinition>
|
||||
|
||||
<tableDefinition name="WixExtbaOptions" bootstrapperApplicationData="yes">
|
||||
<columnDefinition name="SuppressOptionsUI" type="number" length="2" nullable="yes"
|
||||
maxValue="1" description="If 1, don't show Options button during install."/>
|
||||
<columnDefinition name="SuppressDowngradeFailure" type="number" length="2" nullable="yes"
|
||||
maxValue="1" description="If 1, attempts to downgrade are treated as a successful no-op."/>
|
||||
<columnDefinition name="SuppressRepair" type="number" length="2" nullable="yes"
|
||||
maxValue="1" description="If 1, don't show Repair button during maintenance."/>
|
||||
</tableDefinition>
|
||||
|
||||
<tableDefinition name="WixStdbaOverridableVariable" bootstrapperApplicationData="yes">
|
||||
<columnDefinition name="Name" type="string" length="255" primaryKey="yes"
|
||||
category="identifier" description="Variable name user can override."/>
|
||||
</tableDefinition>
|
||||
</tableDefinitions>
|
||||
@@ -1,48 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
<copyright file="BalExtension.wixproj" company="Outercurve Foundation">
|
||||
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.
|
||||
</copyright>
|
||||
-->
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{3444d952-f21c-496f-ab6b-56435bfd0787}</ProjectGuid>
|
||||
<OutputName>balExt</OutputName>
|
||||
<OutputType>Library</OutputType>
|
||||
<BindFiles>True</BindFiles>
|
||||
<Pedantic>True</Pedantic>
|
||||
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
|
||||
<Cultures>en-us</Cultures>
|
||||
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
|
||||
<OutputPath>$(Configuration)\$(Platform)</OutputPath>
|
||||
<LibBindFiles>True</LibBindFiles>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<OutputPath>..\build\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<OutputPath>..\build\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="BalExtension.wxs" />
|
||||
<Compile Include="wixstdba.wxs" />
|
||||
<Compile Include="wixstdba_x86.wxs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="wixstdba_platform.wxi" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\wixstdba\wixstdba.vcxproj">
|
||||
<Name>wixextba</Name>
|
||||
<Project>{41085a22-e6aa-4e8b-ab1b-ddee0dc89dfa}</Project>
|
||||
<Private>True</Private>
|
||||
<DoNotHarvest>True</DoNotHarvest>
|
||||
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
|
||||
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(WixTargetsPath)" />
|
||||
</Project>
|
||||
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
<copyright file="BalExtension.wxs" company="Outercurve Foundation">
|
||||
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.
|
||||
</copyright>
|
||||
-->
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<Fragment>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
@@ -1,66 +0,0 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<!--
|
||||
<copyright file="wixstdba.wxs" company="Outercurve Foundation">
|
||||
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.
|
||||
</copyright>
|
||||
-->
|
||||
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
|
||||
<!-- RTF License Payload Group -->
|
||||
<Fragment>
|
||||
<PayloadGroup Id='WixExtbaRtfLicensePayloads'>
|
||||
<Payload Name='thm.xml' Compressed='yes' SourceFile='!(wix.WixExtbaThemeXml=$(var.wixextba.ProjectDir)Resources\RtfTheme.xml)' />
|
||||
<Payload Name='thm.wxl' Compressed='yes' SourceFile='!(wix.WixExtbaThemeWxl=$(var.wixextba.ProjectDir)Resources\RtfTheme.wxl)' />
|
||||
<Payload Name='Logo.png' Compressed='yes' SourceFile='!(wix.WixExtbaLogo=$(var.wixextba.ProjectDir)Resources\Logo.png)' />
|
||||
|
||||
<Payload Name='!(wix.WixExtbaLicenseRtfName=license.rtf)' Compressed='yes' SourceFile='!(wix.WixExtbaLicenseRtf=$(var.wixextba.ProjectDir)Resources\LoremIpsumLicense.rtf)' />
|
||||
</PayloadGroup>
|
||||
|
||||
<CustomTable Id='WixExtbaInformation'>
|
||||
<Row>
|
||||
<Data Column='LicenseFile'>!(wix.WixExtbaLicenseRtfName=license.rtf)</Data>
|
||||
</Row>
|
||||
</CustomTable>
|
||||
</Fragment>
|
||||
|
||||
<!-- Hyperlink License Payload Group -->
|
||||
<Fragment>
|
||||
<PayloadGroup Id='WixExtbaHyperlinkLicensePayloads'>
|
||||
<Payload Name='thm.xml' Compressed='yes' SourceFile='!(wix.WixExtbaThemeXml=$(var.wixextba.ProjectDir)Resources\HyperlinkTheme.xml)' />
|
||||
<Payload Name='thm.wxl' Compressed='yes' SourceFile='!(wix.WixExtbaThemeWxl=$(var.wixextba.ProjectDir)Resources\HyperlinkTheme.wxl)' />
|
||||
<Payload Name='Logo.png' Compressed='yes' SourceFile='!(wix.WixExtbaLogo=$(var.wixextba.ProjectDir)Resources\Logo.png)' />
|
||||
</PayloadGroup>
|
||||
|
||||
<CustomTable Id='WixExtbaInformation'>
|
||||
<Row>
|
||||
<Data Column='LicenseUrl'>!(wix.WixExtbaLicenseUrl)</Data>
|
||||
</Row>
|
||||
</CustomTable>
|
||||
</Fragment>
|
||||
|
||||
<!-- Hyperlink2 License Payload Group -->
|
||||
<Fragment>
|
||||
<PayloadGroup Id='WixExtbaHyperlink2LicensePayloads'>
|
||||
<Payload Name='thm.xml' Compressed='yes' SourceFile='!(wix.WixExtbaThemeXml=$(var.wixextba.ProjectDir)Resources\Hyperlink2Theme.xml)' />
|
||||
<Payload Name='thm.wxl' Compressed='yes' SourceFile='!(wix.WixExtbaThemeWxl=$(var.wixextba.ProjectDir)Resources\HyperlinkTheme.wxl)' />
|
||||
<Payload Name='LogoSide.png' Compressed='yes' SourceFile='!(wix.WixExtbaLogoSide=$(var.wixextba.ProjectDir)Resources\LogoSide.png)' />
|
||||
<Payload Name='Logo.png' Compressed='yes' SourceFile='!(wix.WixExtbaLogo=$(var.wixextba.ProjectDir)Resources\Logo.png)' />
|
||||
</PayloadGroup>
|
||||
|
||||
<CustomTable Id='WixExtbaInformation'>
|
||||
<Row>
|
||||
<Data Column='LicenseUrl'>!(wix.WixExtbaLicenseUrl)</Data>
|
||||
</Row>
|
||||
</CustomTable>
|
||||
</Fragment>
|
||||
|
||||
<!-- BootstrapperApplicationData tables definition -->
|
||||
<Fragment>
|
||||
<CustomTable Id='WixExtbaInformation' BootstrapperApplicationData='yes'>
|
||||
<Column Id='LicenseFile' Category='Text' Type='string' Width='0' Nullable='yes' PrimaryKey='yes' />
|
||||
<Column Id='LicenseUrl' Category='Text' Type='string' Width='0' Nullable='yes' PrimaryKey='yes' />
|
||||
</CustomTable>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
@@ -1,32 +0,0 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<!--
|
||||
<copyright file="wixstdba_platform.wxi" company="Outercurve Foundation">
|
||||
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.
|
||||
</copyright>
|
||||
-->
|
||||
<Include xmlns='http://schemas.microsoft.com/wix/2006/wi'>
|
||||
<Fragment>
|
||||
<BootstrapperApplication Id='WixExtendedBootstrapperApplication.RtfLicense' SourceFile='$(var.wixextba.TargetDir)wixextba.dll'>
|
||||
<PayloadGroupRef Id='WixExtbaRtfLicensePayloads' />
|
||||
</BootstrapperApplication>
|
||||
</Fragment>
|
||||
|
||||
<Fragment>
|
||||
<BootstrapperApplication Id='WixExtendedBootstrapperApplication.HyperlinkLicense' SourceFile='$(var.wixextba.TargetDir)wixextba.dll'>
|
||||
<PayloadGroupRef Id='WixExtbaHyperlinkLicensePayloads' />
|
||||
</BootstrapperApplication>
|
||||
</Fragment>
|
||||
|
||||
<Fragment>
|
||||
<BootstrapperApplication Id='WixExtendedBootstrapperApplication.Hyperlink2License' SourceFile='$(var.wixextba.TargetDir)wixextba.dll'>
|
||||
<PayloadGroupRef Id='WixExtbaHyperlink2LicensePayloads' />
|
||||
</BootstrapperApplication>
|
||||
</Fragment>
|
||||
|
||||
<Fragment>
|
||||
<BootstrapperApplication Id='WixExtendedBootstrapperApplication.Foundation' SourceFile='$(var.wixextba.TargetDir)wixextba.dll' />
|
||||
</Fragment>
|
||||
</Include>
|
||||
@@ -1,13 +0,0 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<!--
|
||||
<copyright file="wixstdba_x86.wxs" company="Outercurve Foundation">
|
||||
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.
|
||||
</copyright>
|
||||
-->
|
||||
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
|
||||
<?define platform=x86 ?>
|
||||
<?include wixstdba_platform.wxi ?>
|
||||
</Wix>
|
||||
@@ -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; i<length; i++)
|
||||
w_data[i] = (wchar_t)data[i];
|
||||
#else
|
||||
if (mbstowcs(w_data, data, length) == (size_t)-1)
|
||||
{
|
||||
free(w_data);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
JSONValue *value = JSON::Parse(w_data);
|
||||
free(w_data);
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a complete JSON encoded string (UNICODE input version)
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @param wchar_t* data The JSON text
|
||||
*
|
||||
* @return JSONValue* Returns a JSON Value representing the root, or NULL on error
|
||||
*/
|
||||
JSONValue *JSON::Parse(const wchar_t *data)
|
||||
{
|
||||
// Skip any preceding whitespace, end of data = no JSON = fail
|
||||
if (!SkipWhitespace(&data))
|
||||
return NULL;
|
||||
|
||||
// We need the start of a value here now...
|
||||
JSONValue *value = JSONValue::Parse(&data);
|
||||
if (value == NULL)
|
||||
return NULL;
|
||||
|
||||
// Can be white space now and should be at the end of the string then...
|
||||
if (SkipWhitespace(&data))
|
||||
{
|
||||
delete value;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// We're now at the end of the string
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns the passed in JSONValue into a JSON encode string
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @param JSONValue* value The root value
|
||||
*
|
||||
* @return std::wstring Returns a JSON encoded string representation of the given value
|
||||
*/
|
||||
std::wstring JSON::Stringify(const JSONValue *value)
|
||||
{
|
||||
if (value != NULL)
|
||||
return value->Stringify();
|
||||
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 - "<some chars>"
|
||||
* 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;
|
||||
}
|
||||
@@ -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 <vector>
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
// Linux compile fix - from quaker66
|
||||
#ifdef __GNUC__
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
#endif
|
||||
|
||||
// Mac compile fixes - from quaker66, Lion fix by dabrahams
|
||||
#if defined(__APPLE__) && __DARWIN_C_LEVEL < 200809L || (defined(WIN32) && defined(__GNUC__)) || defined(ANDROID)
|
||||
#include <wctype.h>
|
||||
#include <wchar.h>
|
||||
|
||||
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<JSONValue*> JSONArray;
|
||||
typedef std::map<std::wstring, JSONValue*> 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
|
||||
@@ -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 <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <math.h>
|
||||
|
||||
#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;
|
||||
}
|
||||
@@ -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 <vector>
|
||||
#include <string>
|
||||
|
||||
#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
|
||||
@@ -1,77 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Theme xmlns="http://wixtoolset.org/schemas/thmutil/2010">
|
||||
<Window Width="600" Height="450" HexStyle="100a0000" FontId="0">#(loc.Caption)</Window>
|
||||
<Font Id="0" Height="-12" Weight="500" Foreground="000000" Background="FFFFFF">Segoe UI</Font>
|
||||
<Font Id="1" Height="-24" Weight="500" Foreground="000000">Segoe UI</Font>
|
||||
<Font Id="2" Height="-22" Weight="500" Foreground="666666">Segoe UI</Font>
|
||||
<Font Id="3" Height="-12" Weight="500" Foreground="000000" Background="FFFFFF">Segoe UI</Font>
|
||||
<Font Id="4" Height="-12" Weight="500" Foreground="ff0000" Background="FFFFFF" Underline="yes">Segoe UI</Font>
|
||||
|
||||
<Page Name="Help">
|
||||
<Text X="80" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Text>
|
||||
<Image X="11" Y="11" Width="64" Height="64" ImageFile="Logo.png"/>
|
||||
<Text X="11" Y="80" Width="-11" Height="32" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Text>
|
||||
<Text X="11" Y="121" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Text>
|
||||
<Button Name="HelpCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.HelpCloseButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Install">
|
||||
<Text X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Text>
|
||||
<Image X="11" Y="11" Width="165" Height="400" ImageFile="LogoSide.png"/>
|
||||
<Text X="185" Y="50" Width="-11" Height="32" FontId="2" DisablePrefix="yes">#(loc.InstallHeader)</Text>
|
||||
<Text X="185" Y="91" Width="-11" Height="64" FontId="3" DisablePrefix="yes">#(loc.InstallMessage)</Text><!-- HexStyle="0x800000" -->
|
||||
<Hypertext Name="EulaHyperlink" X="185" Y="-111" Width="-11" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallLicenseLinkText)</Hypertext>
|
||||
<Text X="185" Y="-81" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.InstallVersion)</Text>
|
||||
<Hypertext Name="UpgradeHyperlink" X="185" Y="-81" Width="-11" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallUpgradeLinkText)</Hypertext>
|
||||
<Checkbox Name="EulaAcceptCheckbox" X="185" Y="-51" Width="-11" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallAcceptCheckbox)</Checkbox>
|
||||
<Button Name="OptionsButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.InstallOptionsButton)</Button>
|
||||
<Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
|
||||
<Button Name="WelcomeCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallCloseButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Options">
|
||||
<Text X="80" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Text>
|
||||
<Image X="11" Y="11" Width="64" Height="64" ImageFile="Logo.png"/>
|
||||
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.OptionsHeader)</Text>
|
||||
<Text X="11" Y="121" Width="-11" Height="17" FontId="3">#(loc.OptionsLocationLabel)</Text>
|
||||
<Editbox Name="FolderEditbox" X="11" Y="143" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
|
||||
<Button Name="BrowseButton" X="-11" Y="142" Width="75" Height="23" TabStop="yes" FontId="3">#(loc.OptionsBrowseButton)</Button>
|
||||
|
||||
<Button Name="OptionsOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.OptionsOkButton)</Button>
|
||||
<Button Name="OptionsCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.OptionsCancelButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Progress">
|
||||
<Text X="80" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Text>
|
||||
<Image X="11" Y="11" Width="64" Height="64" ImageFile="Logo.png"/>
|
||||
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">[varProgressHeader]</Text>
|
||||
<Text X="11" Y="141" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Text>
|
||||
<Text Name="OverallProgressPackageText" X="85" Y="141" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Text>
|
||||
<Progressbar Name="OverallCalculatedProgressbar" X="11" Y="163" Width="-11" Height="20" />
|
||||
<Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Modify">
|
||||
<Text X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Text>
|
||||
<Image X="11" Y="11" Width="165" Height="400" ImageFile="LogoSide.png"/>
|
||||
<Text X="185" Y="50" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Text>
|
||||
<Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button>
|
||||
<Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button>
|
||||
<Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyCloseButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Success">
|
||||
<Text X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Text>
|
||||
<Image X="11" Y="11" Width="165" Height="400" ImageFile="LogoSide.png"/>
|
||||
<Text X="185" Y="50" Width="-11" Height="30" FontId="2" DisablePrefix="yes">[varSuccessHeader]</Text>
|
||||
<Button Name="LaunchButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>
|
||||
<Text Name="SuccessRestartText" X="185" Y="-51" Width="400" Height="34" FontId="3" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessRestartText)</Text>
|
||||
<Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
|
||||
<Button Name="SuccessCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.SuccessCloseButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Failure">
|
||||
<Text X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Title)</Text>
|
||||
<Image X="11" Y="11" Width="165" Height="400" ImageFile="LogoSide.png"/>
|
||||
<Text X="185" Y="50" Width="-11" Height="30" FontId="2" DisablePrefix="yes">[varFailureHeader]</Text>
|
||||
<Hypertext Name="FailureLogFileLink" X="185" Y="121" Width="-11" Height="68" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
|
||||
<Hypertext Name="FailureMessageText" X="185" Y="-115" Width="-11" Height="80" FontId="3" TabStop="yes" HideWhenDisabled="yes" />
|
||||
<Text Name="FailureRestartText" X="185" Y="-57" Width="-11" Height="80" FontId="3" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureRestartText)</Text>
|
||||
<Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
|
||||
<Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.FailureCloseButton)</Button>
|
||||
</Page>
|
||||
</Theme>
|
||||
@@ -1,54 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<WixLocalization Culture="en-us" Language="1033" xmlns="http://schemas.microsoft.com/wix/2006/localization">
|
||||
<String Id="Caption">[WixBundleName] Setup</String>
|
||||
<String Id="Title">[WixBundleName]</String>
|
||||
<String Id="InstallHeader">Welcome</String>
|
||||
<String Id="InstallMessage">Setup will install [WixBundleName] on your computer. Click install to continue, options to set the install directory or Close to exit.</String>
|
||||
<String Id="InstallVersion">Version [WixBundleVersion]</String>
|
||||
<String Id="InstallUpgradeLinkText">Version [WixBundleVersion] <a href="#">upgrade available</a></String>
|
||||
<String Id="ConfirmCancelMessage">Are you sure you want to cancel?</String>
|
||||
<String Id="HelpHeader">Setup Help</String>
|
||||
<String Id="HelpText">/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%.</String>
|
||||
<String Id="HelpCloseButton">&Close</String>
|
||||
<String Id="InstallLicenseLinkText">[WixBundleName] <a href="#">license terms</a>.</String>
|
||||
<String Id="InstallAcceptCheckbox">I &agree to the license terms and conditions</String>
|
||||
<String Id="InstallOptionsButton">&Options</String>
|
||||
<String Id="InstallInstallButton">&Install</String>
|
||||
<String Id="InstallCloseButton">&Close</String>
|
||||
<String Id="OptionsHeader">Setup Options</String>
|
||||
<String Id="OptionsLocationLabel">Install location:</String>
|
||||
<String Id="OptionsBrowseButton">&Browse</String>
|
||||
<String Id="OptionsOkButton">&OK</String>
|
||||
<String Id="OptionsCancelButton">&Cancel</String>
|
||||
<String Id="ProgressHeader">Setup Progress</String>
|
||||
<String Id="ProgressHeaderRepair">Repair Progress</String>
|
||||
<String Id="ProgressHeaderUninstall">Uninstall Progress</String>
|
||||
<String Id="ProgressLabel">Processing:</String>
|
||||
<String Id="OverallProgressPackageText">Initializing...</String>
|
||||
<String Id="ProgressCancelButton">&Cancel</String>
|
||||
<String Id="ModifyHeader">Modify Setup</String>
|
||||
<String Id="ModifyRepairButton">&Repair</String>
|
||||
<String Id="ModifyUninstallButton">&Uninstall</String>
|
||||
<String Id="ModifyCloseButton">&Close</String>
|
||||
<String Id="SuccessHeader">Setup Successful</String>
|
||||
<String Id="SuccessHeaderRepair">Repair Successful</String>
|
||||
<String Id="SuccessHeaderUninstall">Uninstall Successful</String>
|
||||
<String Id="SuccessLaunchButton">&Launch</String>
|
||||
<String Id="SuccessRestartText">You must restart your computer before you can use the software.</String>
|
||||
<String Id="SuccessRestartButton">&Restart</String>
|
||||
<String Id="SuccessCloseButton">&Close</String>
|
||||
<String Id="FailureHeader">Setup Failed</String>
|
||||
<String Id="FailureHeaderRepair">Repair Failed</String>
|
||||
<String Id="FailureHeaderUninstall">Uninstall Failed</String>
|
||||
<String Id="FailureHyperlinkLogText">One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the <a href="#">log file</a>.</String>
|
||||
<String Id="FailureRestartText">You must restart your computer to complete the rollback of the software.</String>
|
||||
<String Id="FailureRestartButton">&Restart</String>
|
||||
<String Id="FailureCloseButton">&Close</String>
|
||||
</WixLocalization>
|
||||
@@ -1,66 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Theme xmlns="http://wixtoolset.org/schemas/thmutil/2010">
|
||||
<Window Width="500" Height="390" HexStyle="100a0000" FontId="0">#(loc.Caption)</Window>
|
||||
<Font Id="0" Height="-12" Weight="500" Foreground="000000" Background="FFFFFF">Segoe UI</Font>
|
||||
<Font Id="1" Height="-24" Weight="500" Foreground="000000">Segoe UI</Font>
|
||||
<Font Id="2" Height="-22" Weight="500" Foreground="666666">Segoe UI</Font>
|
||||
<Font Id="3" Height="-12" Weight="500" Foreground="000000" Background="FFFFFF">Segoe UI</Font>
|
||||
<Font Id="4" Height="-12" Weight="500" Foreground="ff0000" Background="FFFFFF" Underline="yes">Segoe UI</Font>
|
||||
|
||||
<Image X="11" Y="11" Width="64" Height="64" ImageFile="Logo.png" Visible="yes"/>
|
||||
<Text X="80" Y="11" Width="-11" Height="64" FontId="1" Visible="yes" DisablePrefix="yes">#(loc.Title)</Text>
|
||||
|
||||
<Page Name="Help">
|
||||
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Text>
|
||||
<Text X="11" Y="112" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Text>
|
||||
<Button Name="HelpCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.HelpCloseButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Install">
|
||||
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.InstallHeader)</Text>
|
||||
<Text X="11" Y="121" Width="-11" Height="-129" FontId="3" DisablePrefix="yes">#(loc.InstallMessage)</Text>
|
||||
<!-- HexStyle="0x800000" -->
|
||||
<Hypertext Name="EulaHyperlink" X="11" Y="-107" Width="-11" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallLicenseLinkText)</Hypertext>
|
||||
<Text X="11" Y="-73" Width="246" Height="17" FontId="3" DisablePrefix="yes">#(loc.InstallVersion)</Text>
|
||||
<Hypertext Name="UpgradeHyperlink" X="11" Y="-73" Width="-11" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallUpgradeLinkText)</Hypertext>
|
||||
<Checkbox Name="EulaAcceptCheckbox" X="-11" Y="-41" Width="260" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallAcceptCheckbox)</Checkbox>
|
||||
<Button Name="OptionsButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.InstallOptionsButton)</Button>
|
||||
<Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
|
||||
<Button Name="WelcomeCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallCloseButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Options">
|
||||
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.OptionsHeader)</Text>
|
||||
<Text X="11" Y="121" Width="-11" Height="17" FontId="3">#(loc.OptionsLocationLabel)</Text>
|
||||
<Editbox Name="FolderEditbox" X="11" Y="143" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
|
||||
<Button Name="BrowseButton" X="-11" Y="142" Width="75" Height="23" TabStop="yes" FontId="3">#(loc.OptionsBrowseButton)</Button>
|
||||
<Button Name="OptionsOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.OptionsOkButton)</Button>
|
||||
<Button Name="OptionsCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.OptionsCancelButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Progress">
|
||||
<Text Name="ProgressHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">[varProgressHeader]</Text>
|
||||
<Text X="11" Y="121" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Text>
|
||||
<Text Name="OverallProgressPackageText" X="85" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Text>
|
||||
<Progressbar Name="OverallCalculatedProgressbar" X="11" Y="143" Width="-11" Height="15" />
|
||||
<Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Modify">
|
||||
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Text>
|
||||
<Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button>
|
||||
<Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button>
|
||||
<Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyCloseButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Success">
|
||||
<Text Name="SuccessHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">[varSuccessHeader]</Text>
|
||||
<Button Name="LaunchButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>
|
||||
<Text Name="SuccessRestartText" X="-11" Y="-51" Width="400" Height="34" FontId="3" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessRestartText)</Text>
|
||||
<Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
|
||||
<Button Name="SuccessCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.SuccessCloseButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Failure">
|
||||
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">[varFailureHeader]</Text>
|
||||
<Hypertext Name="FailureLogFileLink" X="11" Y="121" Width="-11" Height="42" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
|
||||
<Hypertext Name="FailureMessageText" X="22" Y="163" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes" />
|
||||
<Text Name="FailureRestartText" X="-11" Y="-51" Width="400" Height="34" FontId="3" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureRestartText)</Text>
|
||||
<Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
|
||||
<Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.FailureCloseButton)</Button>
|
||||
</Page>
|
||||
</Theme>
|
||||
|
Before Width: | Height: | Size: 3.0 KiB |
@@ -1,43 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<WixLocalization Culture="en-us" Language="1033" xmlns="http://schemas.microsoft.com/wix/2006/localization">
|
||||
<String Id="Caption">[WixBundleName] Setup</String>
|
||||
<String Id="Title">[WixBundleName]</String>
|
||||
<String Id="ConfirmCancelMessage">Are you sure you want to cancel?</String>
|
||||
<String Id="HelpHeader">Setup Help</String>
|
||||
<String Id="HelpText">/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%.</String>
|
||||
<String Id="HelpCloseButton">&Close</String>
|
||||
<String Id="InstallAcceptCheckbox">I &agree to the license terms and conditions</String>
|
||||
<String Id="InstallOptionsButton">&Options</String>
|
||||
<String Id="InstallInstallButton">&Install</String>
|
||||
<String Id="InstallCloseButton">&Close</String>
|
||||
<String Id="OptionsHeader">Setup Options</String>
|
||||
<String Id="OptionsLocationLabel">Install location:</String>
|
||||
<String Id="OptionsBrowseButton">&Browse</String>
|
||||
<String Id="OptionsOkButton">&OK</String>
|
||||
<String Id="OptionsCancelButton">&Cancel</String>
|
||||
<String Id="ProgressHeader">Setup Progress</String>
|
||||
<String Id="ProgressLabel">Processing:</String>
|
||||
<String Id="OverallProgressPackageText">Initializing...</String>
|
||||
<String Id="ProgressCancelButton">&Cancel</String>
|
||||
<String Id="ModifyHeader">Modify Setup</String>
|
||||
<String Id="ModifyRepairButton">&Repair</String>
|
||||
<String Id="ModifyUninstallButton">&Uninstall</String>
|
||||
<String Id="ModifyCloseButton">&Close</String>
|
||||
<String Id="SuccessHeader">Setup Successful</String>
|
||||
<String Id="SuccessLaunchButton">&Launch</String>
|
||||
<String Id="SuccessRestartText">You must restart your computer before you can use the software.</String>
|
||||
<String Id="SuccessRestartButton">&Restart</String>
|
||||
<String Id="SuccessCloseButton">&Close</String>
|
||||
<String Id="FailureHeader">Setup Failed</String>
|
||||
<String Id="FailureHyperlinkLogText">One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the <a href="#">log file</a>.</String>
|
||||
<String Id="FailureRestartText">You must restart your computer to complete the rollback of the software.</String>
|
||||
<String Id="FailureRestartButton">&Restart</String>
|
||||
<String Id="FailureCloseButton">&Close</String>
|
||||
</WixLocalization>
|
||||
@@ -1,62 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Theme xmlns="http://wixtoolset.org/schemas/thmutil/2010">
|
||||
<Window Width="500" Height="390" HexStyle="100a0000" FontId="0">#(loc.Caption)</Window>
|
||||
<Font Id="0" Height="-12" Weight="500" Foreground="000000" Background="FFFFFF">Segoe UI</Font>
|
||||
<Font Id="1" Height="-24" Weight="500" Foreground="000000">Segoe UI</Font>
|
||||
<Font Id="2" Height="-22" Weight="500" Foreground="666666">Segoe UI</Font>
|
||||
<Font Id="3" Height="-12" Weight="500" Foreground="000000" Background="FFFFFF">Segoe UI</Font>
|
||||
<Font Id="4" Height="-12" Weight="500" Foreground="ff0000" Background="FFFFFF" Underline="yes">Segoe UI</Font>
|
||||
|
||||
<Image X="11" Y="11" Width="64" Height="64" ImageFile="Logo.png" Visible="yes"/>
|
||||
<Text X="80" Y="11" Width="-11" Height="64" FontId="1" Visible="yes" DisablePrefix="yes">#(loc.Title)</Text>
|
||||
|
||||
<Page Name="Help">
|
||||
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Text>
|
||||
<Text X="11" Y="112" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Text>
|
||||
<Button Name="HelpCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.HelpCloseButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Install">
|
||||
<Text X="11" Y="80" Width="-11" Height="-70" TabStop="no" FontId="2" HexStyle="0x800000" DisablePrefix="yes" />
|
||||
<Richedit Name="EulaRichedit" X="12" Y="81" Width="-12" Height="-71" TabStop="yes" FontId="0" />
|
||||
<Checkbox Name="EulaAcceptCheckbox" X="-11" Y="-41" Width="260" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallAcceptCheckbox)</Checkbox>
|
||||
<Button Name="OptionsButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.InstallOptionsButton)</Button>
|
||||
<Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
|
||||
<Button Name="WelcomeCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallCloseButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Options">
|
||||
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.OptionsHeader)</Text>
|
||||
<Text X="11" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OptionsLocationLabel)</Text>
|
||||
<Editbox Name="FolderEditbox" X="11" Y="143" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
|
||||
<Button Name="BrowseButton" X="-11" Y="142" Width="75" Height="23" TabStop="yes" FontId="3">#(loc.OptionsBrowseButton)</Button>
|
||||
<Button Name="OptionsOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.OptionsOkButton)</Button>
|
||||
<Button Name="OptionsCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.OptionsCancelButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Progress">
|
||||
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">[varProgressHeader]</Text>
|
||||
<Text X="11" Y="121" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Text>
|
||||
<Text Name="OverallProgressPackageText" X="85" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Text>
|
||||
<Progressbar Name="OverallCalculatedProgressbar" X="11" Y="143" Width="-11" Height="15" />
|
||||
<Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Modify">
|
||||
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Text>
|
||||
<Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button>
|
||||
<Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button>
|
||||
<Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyCloseButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Success">
|
||||
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">[varSuccessHeader]</Text>
|
||||
<Button Name="LaunchButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>
|
||||
<Text Name="SuccessRestartText" X="-11" Y="-51" Width="400" Height="34" FontId="3" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessRestartText)</Text>
|
||||
<Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
|
||||
<Button Name="SuccessCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.SuccessCloseButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Failure">
|
||||
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">[varFailureHeader]</Text>
|
||||
<Hypertext Name="FailureLogFileLink" X="11" Y="121" Width="-11" Height="42" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
|
||||
<Hypertext Name="FailureMessageText" X="22" Y="163" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes" />
|
||||
<Text Name="FailureRestartText" X="-11" Y="-51" Width="400" Height="34" FontId="3" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureRestartText)</Text>
|
||||
<Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
|
||||
<Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.FailureCloseButton)</Button>
|
||||
</Page>
|
||||
</Theme>
|
||||
|
Before Width: | Height: | Size: 880 B |
@@ -1,56 +0,0 @@
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="precomp.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// Precompiled header for standard bootstrapper application.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <windows.h>
|
||||
#include <gdiplus.h>
|
||||
#include <msiquery.h>
|
||||
#include <objbase.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlwapi.h>
|
||||
#include <stdlib.h>
|
||||
#include <strsafe.h>
|
||||
|
||||
#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"
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="resource.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
//{{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
|
||||
@@ -1,61 +0,0 @@
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="wixstdba.cpp" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// Setup chainer/bootstrapper standard UI for WiX toolset.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#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();
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
;-------------------------------------------------------------------------------------------------
|
||||
; <copyright file="wixstdba.def" company="Outercurve Foundation">
|
||||
; 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.
|
||||
; </copyright>
|
||||
;
|
||||
; <summary>
|
||||
; WiX Standard Bootstrapper Application DLL entry points.
|
||||
; </summary>
|
||||
;-------------------------------------------------------------------------------------------------
|
||||
|
||||
EXPORTS
|
||||
BootstrapperApplicationCreate
|
||||
BootstrapperApplicationDestroy
|
||||
@@ -1,19 +0,0 @@
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="wixstdba.rc" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// WiX Extendend Bootstrapper Application resource file.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#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"
|
||||
@@ -1,154 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<copyright file="wixstdba.vcxproj" company="Outercurve Foundation">
|
||||
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.
|
||||
</copyright>
|
||||
-->
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{41085a22-e6aa-4e8b-ab1b-ddee0dc89dfa}</ProjectGuid>
|
||||
<RootNamespace>WixStdBA</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<ProjectName>wixextba</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
|
||||
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
|
||||
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ExtraDefinitions>
|
||||
</ExtraDefinitions>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(WiX)SDK\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;DEBUG;%(PreprocessorDefinitions);$(ExtraDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DisableSpecificWarnings>4995</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>dutil.lib;balutil.lib;comctl32.lib;msimg32.lib;gdiplus.lib;shlwapi.lib;wininet.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\WiXSDK\VS2010\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ModuleDefinitionFile>wixstdba.def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\WiXSDK\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);$(ExtraDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DisableSpecificWarnings>4995</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>dutil.lib;balutil.lib;comctl32.lib;msimg32.lib;gdiplus.lib;shlwapi.lib;wininet.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\WiXSDK\VS2010\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ModuleDefinitionFile>wixstdba.def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="JSON.cpp" />
|
||||
<ClCompile Include="JSONValue.cpp" />
|
||||
<ClCompile Include="WixStandardBootstrapperApplication.cpp" />
|
||||
<ClCompile Include="wixstdba.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\logo.png" />
|
||||
<None Include="Resources\LoremIpsumLicense.rtf" />
|
||||
<None Include="Resources\HyperlinkTheme.wxl" />
|
||||
<None Include="Resources\HyperlinkTheme.xml" />
|
||||
<None Include="Resources\RtfTheme.wxl" />
|
||||
<None Include="Resources\RtfTheme.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="wixstdba.def" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="wixstdba.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="JSON.h" />
|
||||
<ClInclude Include="JSONValue.h" />
|
||||
<ClInclude Include="precomp.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,73 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="WixStandardBootstrapperApplication.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="wixstdba.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="JSON.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="JSONValue.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="wixstdba.def">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="Resources\HyperlinkTheme.wxl">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="Resources\HyperlinkTheme.xml">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="Resources\logo.png">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="Resources\LoremIpsumLicense.rtf">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="Resources\RtfTheme.wxl">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="Resources\RtfTheme.xml">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="precomp.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="JSON.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="JSONValue.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="wixstdba.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
196
scripts/windows/installer/WiXHelper/.gitignore
vendored
@@ -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
|
||||
@@ -1,525 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <wcautil.h>
|
||||
#include <strutil.h>
|
||||
|
||||
#include <pathutil.h>
|
||||
#include <fileutil.h>
|
||||
#include <dirutil.h>
|
||||
|
||||
#include <urlmon.h>
|
||||
#include <wininet.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#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<DWORD>(100 * static_cast<double>(bytes_downloaded) / static_cast<double>(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;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
LIBRARY "WiXHelper"
|
||||
|
||||
EXPORTS
|
||||
|
||||
; DROP_QCloudDatabase
|
||||
; CREATE_QCloudDatabase
|
||||
|
||||
Download_MeteorPackage
|
||||
Extract_MeteorFiles
|
||||
BulkRemoveMeteorFiles
|
||||
@@ -1,128 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{17815519-26F7-4F37-9FAC-3FC50796C25D}</ProjectGuid>
|
||||
<RootNamespace>WiXHelper</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">bin\$(Configuration)\Win32\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">obj\$(Configuration)\Win32\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>bin\$(Configuration)\Win64\</OutDir>
|
||||
<IntDir>obj\$(Configuration)\Win64\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\WiXSDK\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CUSTOMACTIONTEST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>msi.lib;dutil.lib;wcautil.lib;Version.lib;Urlmon.lib;Wininet.lib;Userenv.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\WiXSDK\VS2010\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ModuleDefinitionFile>CustomAction.def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\WiXSDK\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CUSTOMACTIONTEST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>msi.lib;dutil.lib;wcautil.lib;Version.lib;Urlmon.lib;Wininet.lib;Userenv.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\WiXSDK\VS2010\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ModuleDefinitionFile>CustomAction.def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="CustomAction.cpp" />
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="CustomAction.def" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="targetver.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,38 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="CustomAction.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="CustomAction.def">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="targetver.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -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
|
||||
@@ -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 <windows.h>
|
||||
#include <strsafe.h>
|
||||
#include <msiquery.h>
|
||||
|
||||
// WiX Header Files:
|
||||
#include <wcautil.h>
|
||||
|
||||
|
||||
// TODO: reference additional headers your program requires here
|
||||
typedef struct _BURN_DOWNLOAD_SOURCE
|
||||
{
|
||||
LPWSTR sczUrl;
|
||||
LPWSTR sczUser;
|
||||
LPWSTR sczPassword;
|
||||
} BURN_DOWNLOAD_SOURCE;
|
||||
@@ -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
|
||||
196
scripts/windows/installer/WiXInstaller/.gitignore
vendored
@@ -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
|
||||
@@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Include>
|
||||
<?define METEOR_ProductName = "Meteor" ?>
|
||||
<?define METEOR_ProductId = "{1B1B4C6E-371D-4027-80AB-27922ABD7EE4}" ?>
|
||||
<?define METEOR_UpgradeCode = "{D6831580-7DD8-4088-9792-64E4D37FEDDC}" ?>
|
||||
<?define BUNDLE_UpgradeCode = "{D6F8653E-2F27-4FDD-9C92-66D7B4B21D79}" ?>
|
||||
|
||||
|
||||
<?define METEOR_Manufacturer = "Meteor Development Group " ?>
|
||||
<?define METEOR_ProductUrl = "https://www.meteor.com/" ?>
|
||||
<?define METEOR_UpgradeUrl = "https://www.meteor.com/" ?>
|
||||
<?define METEOR_TermsUrl = "https://www.meteor.com/terms" ?>
|
||||
<?define METEOR_PrivacyUrl = "https://www.meteor.com/privacy" ?>
|
||||
|
||||
|
||||
<?define METEOR_Theme = "Resources\Theme_Meteor.xml" ?>
|
||||
<?define METEOR_Localization = "Resources\Theme_Meteor.wxl" ?>
|
||||
|
||||
<?define METEOR_Background = "Resources\Background.png" ?>
|
||||
<?define METEOR_TopHeader = "Resources\TopHeader.png" ?>
|
||||
<?define METEOR_Logo = "Resources\meteor-logo-sm.jpg" ?>
|
||||
<?define METEOR_License = "Resources\License.htm" ?>
|
||||
|
||||
|
||||
<?define METEOR_PkgFileName = "meteor-bootstrap-os.windows.x86_32.tar.gz"?>
|
||||
|
||||
</Include>
|
||||
@@ -1,71 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProjectGuid>{e053726b-937b-40c7-8f3d-25a3226979d9}</ProjectGuid>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<OutputType>Package</OutputType>
|
||||
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
|
||||
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
|
||||
<Name>MSIPackage</Name>
|
||||
<Version>6.0.2469</Version>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<OutputPath>bin\$(Configuration)\$(Platform)\</OutputPath>
|
||||
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<InstallerPlatform>x86</InstallerPlatform>
|
||||
<SuppressIces>ICE60;ICE80</SuppressIces>
|
||||
<OutputName>SetupMeteor</OutputName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
|
||||
<OutputPath>bin\$(Configuration)\$(Platform)\</OutputPath>
|
||||
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<InstallerPlatform>x64</InstallerPlatform>
|
||||
<SuppressIces>ICE60;ICE61;ICE69;</SuppressIces>
|
||||
<OutputName>SetupMeteor</OutputName>
|
||||
<SuppressSpecificWarnings>
|
||||
</SuppressSpecificWarnings>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<WixExtension Include="WixNetFxExtension">
|
||||
<HintPath>$(WixExtDir)\WixNetFxExtension.dll</HintPath>
|
||||
<Name>WixNetFxExtension</Name>
|
||||
</WixExtension>
|
||||
<WixExtension Include="WixFirewallExtension">
|
||||
<HintPath>$(WixExtDir)\WixFirewallExtension.dll</HintPath>
|
||||
<Name>WixFirewallExtension</Name>
|
||||
</WixExtension>
|
||||
<WixExtension Include="WixUtilExtension">
|
||||
<HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
|
||||
<Name>WixUtilExtension</Name>
|
||||
</WixExtension>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Meteor_Product.wxs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Configuration.wxi">
|
||||
<Link>Configuration.wxi</Link>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<Import Project="$(WixTargetsPath)" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent />
|
||||
</PropertyGroup>
|
||||
<!--
|
||||
To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Wix.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -1,76 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This example demonstrates the use of an external theme file to create the same UI as Hyperlink2License built in to WixBalExtensionExt. It also shows the use of two folder selections and radio buttons on the options page. -->
|
||||
<Wix
|
||||
RequiredVersion="3.7.1224.0"
|
||||
xmlns="http://schemas.microsoft.com/wix/2006/wi"
|
||||
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
|
||||
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
|
||||
|
||||
<?include Configuration.wxi?>
|
||||
|
||||
<Bundle Name="$(var.METEOR_ProductName)" Version="1.0" Manufacturer="$(var.METEOR_Manufacturer)"
|
||||
UpgradeCode="$(var.BUNDLE_UpgradeCode)" AboutUrl="$(var.METEOR_ProductUrl)"
|
||||
IconSourceFile="Resources\Product.ico" Condition="(VersionNT >= v5.1)" >
|
||||
|
||||
<Update Location="$(var.METEOR_UpgradeUrl)"/>
|
||||
|
||||
<BootstrapperApplicationRef Id="WixExtendedBootstrapperApplication.HyperlinkLicense">
|
||||
<Payload SourceFile="$(var.METEOR_Background)" />
|
||||
<Payload SourceFile="$(var.METEOR_TopHeader)" />
|
||||
<Payload SourceFile="$(var.METEOR_Logo)" />
|
||||
<Payload SourceFile="$(var.METEOR_License)" Compressed="yes" />
|
||||
</BootstrapperApplicationRef>
|
||||
|
||||
|
||||
<WixVariable Id="WixExtbaLicenseUrl" Value="License.htm" />
|
||||
<WixVariable Id="WixExtbaThemeXml" Value="$(var.METEOR_Theme)" />
|
||||
<WixVariable Id="WixExtbaThemeWxl" Value="$(var.METEOR_Localization)" />
|
||||
<WixVariable Id="WixBundleElevated" Value="1"/>
|
||||
|
||||
<Variable Name="TermsUrl" Type="string" Value="$(var.METEOR_TermsUrl)" />
|
||||
<Variable Name="PrivacyUrl" Type="string" Value="$(var.METEOR_PrivacyUrl)" />
|
||||
|
||||
<Variable Name="PerMachineInstall" Type="numeric" Persisted="yes" Value="0" />
|
||||
<Variable Name="PerUserInstall" Type="numeric" Persisted="yes" Value="1" />
|
||||
<Variable Name="CreateRButton" Type="numeric" Persisted="yes" Value="1" />
|
||||
<Variable Name="SignInRButton" Type="numeric" Persisted="yes" Value="0" />
|
||||
<Variable Name="RegisterEmail" Type="string" Persisted="yes" Value="" Hidden="yes" />
|
||||
<Variable Name="RegisterUser" Type="string" Persisted="yes" Value="" Hidden="yes" />
|
||||
<Variable Name="RegisterPass" Type="string" Persisted="yes" Value="" Hidden="yes" />
|
||||
|
||||
<!-- For now I disable and hide the Skip registration checkbox -->
|
||||
<Variable Name="SkipRegistrationState" Type="string" Persisted="yes" Value="disable"/>
|
||||
<Variable Name="SkipRegistration" Type="numeric" Persisted="yes" Value="0"/>
|
||||
|
||||
<Variable Name="UserMeteorSessionFile" Type="string" Persisted="yes" Value="[LocalAppDataFolder]\.meteorsession" />
|
||||
<Variable Name="PerMachineInstallFolder" Type="string" Persisted="yes" Value="[ProgramFilesFolder][WixBundleName]" />
|
||||
<Variable Name="PerUserInstallFolder" Type="string" Persisted="yes" Value="[LocalAppDataFolder]" />
|
||||
<Variable Name="InstallFolder" Type="string" Persisted="yes" Value="[PerUserInstallFolder]" />
|
||||
|
||||
<Variable Name="InstallRegPath" Type="string" Persisted="yes" Value="SOFTWARE\$(var.METEOR_Manufacturer)\$(var.METEOR_ProductName)\Install" />
|
||||
<Variable Name="MSICustomErrFile" Type="string" Persisted="yes" Value="[WixBundleLog].err" />
|
||||
|
||||
|
||||
|
||||
<Chain DisableSystemRestore="yes">
|
||||
|
||||
<!-- Here we set MSI propertyies if user chose perUser install -->
|
||||
<MsiPackage Id="SetupMeteor_MachineInstall" Compressed="yes" InstallCondition="NOT Installed AND (PerMachineInstall = 1)"
|
||||
SourceFile="bin\$(var.Configuration)\$(var.Platform)\SetupMeteor.msi" Vital="yes" ForcePerMachine="yes" >
|
||||
<MsiProperty Name="METEOR_DIR" Value="[InstallFolder]" />
|
||||
<MsiProperty Name="INSTALL_REG_PATH" Value="[InstallRegPath]"/>
|
||||
<MsiProperty Name="MSICUSTOMERRFILE" Value="[MSICustomErrFile]" />
|
||||
<MsiProperty Name="PERMACHINE_INSTALL" Value="1" />
|
||||
</MsiPackage>
|
||||
|
||||
<!-- Here we set MSI propertyies if user chose perUser install -->
|
||||
<MsiPackage Id="SetupMeteor_UserInstall" Compressed="yes" InstallCondition="NOT Installed AND (PerUserInstall = 1)"
|
||||
SourceFile="bin\$(var.Configuration)\$(var.Platform)\SetupMeteor.msi" Vital="yes" >
|
||||
<MsiProperty Name="METEOR_DIR" Value="[InstallFolder]" />
|
||||
<MsiProperty Name="INSTALL_REG_PATH" Value="[InstallRegPath]"/>
|
||||
<MsiProperty Name="MSICUSTOMERRFILE" Value="[MSICustomErrFile]" />
|
||||
<MsiProperty Name="PERUSER_INSTALL" Value="1" />
|
||||
</MsiPackage>
|
||||
</Chain>
|
||||
</Bundle>
|
||||
</Wix>
|
||||
@@ -1,93 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix
|
||||
xmlns="http://schemas.microsoft.com/wix/2006/wi"
|
||||
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
|
||||
xmlns:fire="http://schemas.microsoft.com/wix/FirewallExtension"
|
||||
xmlns:sql="http://schemas.microsoft.com/wix/SqlExtension">
|
||||
|
||||
<?include Configuration.wxi?>
|
||||
|
||||
<Product Id="$(var.METEOR_ProductId)" Name="$(var.METEOR_ProductName)" Language="1033" Version="1.0" Manufacturer="$(var.METEOR_Manufacturer)" UpgradeCode="$(var.METEOR_UpgradeCode)">
|
||||
<Package Description="This package will install Meteor on your computer." InstallerVersion="300" Compressed="yes" InstallScope="perUser" InstallPrivileges="limited"/>
|
||||
|
||||
<!-- This will allow a new msi package to upgrade an existing older version (in case patch is not used) -->
|
||||
<MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." AllowSameVersionUpgrades="yes"/>
|
||||
|
||||
<Media Id="1" Cabinet="product.cab" EmbedCab="yes"/>
|
||||
|
||||
<Property Id="DiskPrompt" Value="$(var.METEOR_ProductName) Installation [1]"/>
|
||||
<Property Id="ARPURLINFOABOUT" Value="$(var.METEOR_ProductName)"/>
|
||||
<Property Id="ARPURLUPDATEINFO" Value="$(var.METEOR_ProductName)"/>
|
||||
<Property Id="ARPHELPLINK" Value="$(var.METEOR_ProductName)"/>
|
||||
|
||||
<?if $(var.Platform)="x86"?>
|
||||
<Binary Id="WiXHelper" SourceFile="..\WiXHelper\bin\Release\Win32\WiXHelper.dll"/>
|
||||
<?else?>
|
||||
<Binary Id="WiXHelper" SourceFile="..\WiXHelper\bin\Release\Win64\WiXHelper.dll"/>
|
||||
<?endif?>
|
||||
|
||||
<Binary Id="SevenZip" SourceFile="Resources\7za.exe" />
|
||||
|
||||
|
||||
|
||||
<Feature Id="ProductFiles" Title="Meteor Product Files" Level="1">
|
||||
<ComponentGroupRef Id="CG_MeteorConfiguration"/>
|
||||
</Feature>
|
||||
|
||||
|
||||
<!-- Directory structure -->
|
||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||
<Directory Id="METEOR_DIR">
|
||||
<Directory Id="P_METEOR_DIR" Name=".meteor" />
|
||||
</Directory>
|
||||
</Directory>
|
||||
|
||||
|
||||
<CustomAction Id="Download_MeteorPackage" BinaryKey="WiXHelper" Return="check" DllEntry="Download_MeteorPackage" />
|
||||
<CustomAction Id="Extract_MeteorFiles" BinaryKey="WiXHelper" Return="check" DllEntry="Extract_MeteorFiles" />
|
||||
<CustomAction Id="BulkRemoveMeteorFiles" BinaryKey="WiXHelper" Return="check" DllEntry="BulkRemoveMeteorFiles" />
|
||||
<CustomAction Id="SetFolderPackages" Property="METEORDIR_PACKAGES" Value="[METEOR_DIR].meteor\packages" />
|
||||
<CustomAction Id="SetFolderPkg_Meta" Property="METEORDIR_PKG_META" Value="[METEOR_DIR].meteor\package-metadata" />
|
||||
|
||||
<InstallExecuteSequence>
|
||||
<Custom Action="Download_MeteorPackage" After="InstallFiles">NOT Installed</Custom>
|
||||
<Custom Action="Extract_MeteorFiles" After="Download_MeteorPackage">NOT Installed</Custom>
|
||||
<Custom Action="SetFolderPackages" After="InstallInitialize">REMOVE~="ALL"</Custom>
|
||||
<Custom Action="SetFolderPkg_Meta" After="InstallInitialize">REMOVE~="ALL"</Custom>
|
||||
<Custom Action="BulkRemoveMeteorFiles" Before="RemoveFiles">REMOVE~="ALL"</Custom>
|
||||
</InstallExecuteSequence>
|
||||
|
||||
<UI>
|
||||
<ProgressText Action="Extract_MeteorFiles">Installing Meteor... please wait. (This may take a minute or two.)</ProgressText>
|
||||
<ProgressText Action="BulkRemoveMeteorFiles">Removing Meteor...</ProgressText>
|
||||
</UI>
|
||||
</Product>
|
||||
|
||||
|
||||
<Fragment>
|
||||
<ComponentGroup Id="CG_MeteorConfiguration">
|
||||
<Component Id="UserEnvironmentsVar" Guid="{6222C645-5576-468F-A776-9FE7BA2FF465}" Directory="TARGETDIR">
|
||||
<Condition>PERUSER_INSTALL</Condition>
|
||||
<Environment Id="UserEnvPATH" Name="PATH" Value="[P_METEOR_DIR]" Separator=";" Action="set" Part="last" Permanent="yes" System="no" />
|
||||
</Component>
|
||||
|
||||
<Component Id="SystemEnvironmentsVar" Guid="{6222C645-5576-468F-A776-9FE7BA2FF465}" Directory="TARGETDIR">
|
||||
<Condition>PERMACHINE_INSTALL</Condition>
|
||||
<Environment Id="SystemEnvPATH" Name="PATH" Value="[P_METEOR_DIR]" Separator=";" Action="set" Part="last" Permanent="yes" System="yes" />
|
||||
</Component>
|
||||
|
||||
<Component Id="UninstallMeteorFilesAndFolders" Guid="{989BB4D9-78CE-4230-A2AB-292998A88B82}" Directory="TARGETDIR">
|
||||
<RemoveFile Id="RemoveRootBatch" On="uninstall" Directory="P_METEOR_DIR" Name="meteor.bat" />
|
||||
<RemoveFolder Id="RemoveRootFolder" On="uninstall" Directory="P_METEOR_DIR" />
|
||||
</Component>
|
||||
|
||||
<Component Id="MeteorDir_Permission" Guid="{62B0F582-C3E3-45E7-A0F9-1517773340EB}" Directory="P_METEOR_DIR">
|
||||
<Condition>PERMACHINE_INSTALL</Condition>
|
||||
<CreateFolder>
|
||||
<util:PermissionEx User="Everyone" GenericAll="yes"/>
|
||||
</CreateFolder>
|
||||
</Component>
|
||||
</ComponentGroup>
|
||||
|
||||
</Fragment>
|
||||
</Wix>
|
||||
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
@@ -1,127 +0,0 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
|
||||
<meta name=Generator content="Microsoft Word 14 (filtered)">
|
||||
<style>
|
||||
<!--
|
||||
/* Font Definitions */
|
||||
@font-face
|
||||
{font-family:Calibri;
|
||||
panose-1:2 15 5 2 2 2 4 3 2 4;}
|
||||
@font-face
|
||||
{font-family:Consolas;
|
||||
panose-1:2 11 6 9 2 2 4 3 2 4;}
|
||||
/* Style Definitions */
|
||||
p.MsoNormal, li.MsoNormal, div.MsoNormal
|
||||
{margin-top:0cm;
|
||||
margin-right:0cm;
|
||||
margin-bottom:10.0pt;
|
||||
margin-left:0cm;
|
||||
line-height:115%;
|
||||
font-size:11.0pt;
|
||||
font-family:"Calibri","sans-serif";}
|
||||
.MsoChpDefault
|
||||
{font-size:11.0pt;}
|
||||
.MsoPapDefault
|
||||
{margin-bottom:10.0pt;
|
||||
line-height:115%;}
|
||||
/* Page Definitions */
|
||||
@page WordSection1
|
||||
{size:612.0pt 792.0pt;
|
||||
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
|
||||
div.WordSection1
|
||||
{page:WordSection1;}
|
||||
-->
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body lang=EN-GB style='text-justify-trim:punctuation'>
|
||||
|
||||
<div class=WordSection1>
|
||||
|
||||
<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:20.0pt;
|
||||
line-height:115%;font-family:Consolas'>[Put Your License Agreement Here]</span></b></p>
|
||||
|
||||
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
|
||||
style='font-size:9.5pt;line-height:115%;font-family:Consolas'>L</span><span
|
||||
lang=EN style='font-size:9.5pt;line-height:115%;font-family:Consolas'>orem
|
||||
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.</span></p>
|
||||
|
||||
<p class=MsoNormal style='text-autospace:none'><span lang=EN style='font-size:
|
||||
9.5pt;line-height:115%;font-family:Consolas'>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.</span></p>
|
||||
|
||||
<p class=MsoNormal style='text-autospace:none'><span lang=EN style='font-size:
|
||||
9.5pt;line-height:115%;font-family:Consolas'>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.</span></p>
|
||||
|
||||
<p class=MsoNormal style='text-autospace:none'><span lang=EN style='font-size:
|
||||
9.5pt;line-height:115%;font-family:Consolas'>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.</span></p>
|
||||
|
||||
<p class=MsoNormal style='text-autospace:none'><span lang=EN style='font-size:
|
||||
9.5pt;line-height:115%;font-family:Consolas'>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.</span></p>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 194 KiB |
@@ -1,104 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<WixLocalization Culture="en-us" Language="1033" xmlns="http://schemas.microsoft.com/wix/2006/localization">
|
||||
<String Id="Caption">Install [WixBundleName]</String>
|
||||
<String Id="Title">[WixBundleName]</String>
|
||||
<String Id="InstallHeader">Welcome to the [WixBundleName] Setup</String>
|
||||
<String Id="InstallMessage">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.</String>
|
||||
<String Id="InstallVersion">Version [WixBundleVersion]</String>
|
||||
<String Id="InstallLicenseLinkText"></String>
|
||||
<String Id="ConfirmCancelMessage">Are you sure you want to cancel?</String>
|
||||
<String Id="HelpHeader">Setup Help</String>
|
||||
<String Id="HelpText">
|
||||
/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%.
|
||||
</String>
|
||||
<String Id="HelpCloseButton">&Close</String>
|
||||
<String Id="InstallAcceptCheckbox">I &agree to the license terms and conditions</String>
|
||||
<String Id="InstallOptionsButton">&Options</String>
|
||||
<String Id="InstallInstallButton">&Install</String>
|
||||
<String Id="InstallCloseButton">&Cancel</String>
|
||||
<String Id="BackButton">< Back</String>
|
||||
<String Id="NextButton">Next ></String>
|
||||
<String Id="SkipButton">Skip this step</String>
|
||||
<String Id="Install">Install</String>
|
||||
<String Id="InstallMeteor">Install Meteor</String>
|
||||
|
||||
<String Id="InstallUpgradeLinkText">Version [WixBundleVersion] <a href="#">upgrade available</a></String>
|
||||
<String Id="CurrentUserPass">Current user password:</String>
|
||||
|
||||
<String Id="InstallDirHeader">[WixBundleName] install directory</String>
|
||||
<String Id="InstallDirMessage">Please select the way you want [WixBundleName] to be installed on your computer.</String>
|
||||
<String Id="InstallDirPathLabel">Install location:</String>
|
||||
<String Id="InstallScopeLabel">Install this application for:</String>
|
||||
<String Id="PerMachineInstallRButton">For all users on this computer (recommended)</String>
|
||||
<String Id="PerUserInstallRButton">Only for me ([LogonUser])</String>
|
||||
|
||||
<String Id="RegistrationHeader">[WixBundleName] registration</String>
|
||||
<String Id="RegistrationInfo">Sign in with your Meteor developer account or create a new one now.</String>
|
||||
<String Id="CreateRButton">Sign up for a new account</String>
|
||||
<String Id="SignInRButton">Sign in with an existing account</String>
|
||||
<String Id="RegisterEmail">Email Address</String>
|
||||
<String Id="RegisterUser">Username</String>
|
||||
<String Id="RegisterUsernameOrEmail">Username or Email</String>
|
||||
<String Id="RegisterPass">Password</String>
|
||||
<String Id="SkipRegistration">Skip [WixBundleName] registration and continue with setup</String>
|
||||
|
||||
|
||||
|
||||
<String Id="OptionsHeader">Setup Options</String>
|
||||
<String Id="OptionsInfo">Adjust setup parameters in order to your needs.</String>
|
||||
<String Id="OptionsLocationLabel">Install location:</String>
|
||||
<String Id="OptionsBrowseButton">&Browse...</String>
|
||||
<String Id="OptionsLocationLabel2">Database location:</String>
|
||||
<String Id="OptionsBrowseButton2">B&rowse...</String>
|
||||
<String Id="OptionsOkButton">&OK</String>
|
||||
<String Id="OptionsCancelButton">&Cancel</String>
|
||||
|
||||
|
||||
|
||||
|
||||
<String Id="ProgressHeader">Installing [WixBundleName]</String>
|
||||
<String Id="ProgressHeaderRepair">Repairing [WixBundleName]</String>
|
||||
<String Id="ProgressHeaderUninstall">Uninstalling [WixBundleName]</String>
|
||||
<String Id="ProgressInfo">Please wait while Setup installs [WixBundleName] on your computer.</String>
|
||||
<String Id="ProgressInfoRepair">Please wait while Setup repairs [WixBundleName] installed on your computer.</String>
|
||||
<String Id="ProgressInfoUninstall">Please wait while [WixBundleName] is removed from your computer.</String>
|
||||
<String Id="ProgressLabel">Processing:</String>
|
||||
<String Id="OverallProgressPackageText">Initializing...</String>
|
||||
<String Id="ExecuteProgressText">Initializing...</String>
|
||||
<String Id="OverallProgressText">Initializing...</String>
|
||||
<String Id="ExecuteProgressActionDataText"></String>
|
||||
<String Id="ProgressCancelButton">&Cancel</String>
|
||||
<String Id="ModifyHeader">[WixBundleName] Maintenance</String>
|
||||
<String Id="ModifyInfo">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.</String>
|
||||
<String Id="ModifyRepairButton">&Repair</String>
|
||||
<String Id="ModifyUninstallButton">&Uninstall</String>
|
||||
<String Id="ModifyCloseButton">&Close</String>
|
||||
<String Id="SuccessHeader">Meteor is now installed on your computer.</String>
|
||||
<String Id="SuccessHeaderRepair">Repair Successful</String>
|
||||
<String Id="SuccessHeaderUninstall">Meteor has been uninstalled.</String>
|
||||
<String Id="SuccessInfo">
|
||||
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.
|
||||
</String>
|
||||
<String Id="SuccessErrorInfoText">Following non critical errors occured:</String>
|
||||
<String Id="SuccessInfoRepair">Setup has finished repairing [WixBundleName] installed on your computer. The application may be launched by selecting the installed icons.</String>
|
||||
<String Id="SuccessInfoUninstall">We hope to see you again soon!</String>
|
||||
<String Id="SuccessLaunchButton">&Launch</String>
|
||||
<String Id="SuccessRestartText">You must restart your computer before you can use the software.</String>
|
||||
<String Id="SuccessRestartButton">&Restart</String>
|
||||
<String Id="SuccessCloseButton">&Close</String>
|
||||
<String Id="FailureHeader">Setup Failed</String>
|
||||
<String Id="FailureHeaderRepair">Repair Failed</String>
|
||||
<String Id="FailureHeaderUninstall">Uninstall Failed</String>
|
||||
<String Id="FailureHyperlinkLogText">One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the <a href="#">log file</a>.</String>
|
||||
<String Id="FailureRestartText">You must restart your computer to complete the rollback of the software.</String>
|
||||
<String Id="FailureRestartButton">&Restart</String>
|
||||
<String Id="FailureCloseButton">&Close</String>
|
||||
</WixLocalization>
|
||||
@@ -1,113 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Theme xmlns="http://wixtoolset.org/schemas/thmutil/2010">
|
||||
<Window Width="624" Height="388" FontId="0">#(loc.Caption)</Window>
|
||||
<Font Id="0" Height="-12" Weight="500" Foreground="000000" Background="FFFFFF" >Segoe UI</Font> <!-- Installer default font with white background-->
|
||||
<Font Id="1" Height="-14" Weight="500" Foreground="000000" Background="FFFFFF" >Segoe UI</Font> <!-- Installer default font with white background-->
|
||||
<Font Id="2" Height="-14" Weight="800" Foreground="333333" >Tahoma</Font> <!-- Page header big font -->
|
||||
<Font Id="3" Height="-22" Weight="500" Foreground="252525" >Segoe UI</Font> <!-- Big light font to dispaly product name in welcome and finish pages -->
|
||||
<Font Id="4" Height="-11" Weight="500" Foreground="000000" >Tahoma</Font>
|
||||
<Font Id="5" Height="-10" Weight="500" Foreground="000000" >Segoe UI</Font> <!-- Version number on bottom left corner of all pages -->
|
||||
<Font Id="6" Height="-12" Weight="500" Foreground="0000FF" Background="FFFFFF" >Segoe UI</Font> <!-- Installer default font with white background-->
|
||||
<Font Id="7" Height="-12" Weight="500" Foreground="000000" >Segoe UI</Font> <!-- Same as installer default font but transparent -->
|
||||
|
||||
|
||||
|
||||
<Page Name="Install">
|
||||
<!--<Text X="178" Y="20" Width="-24" Height="32" FontId="2" DisablePrefix="yes">#(loc.InstallHeader)</Text>-->
|
||||
<Hypertext X="24" Y="-100" Width="-24" Height="14" TabStop="yes" FontId="4" HideWhenDisabled="yes">#(loc.InstallLicenseLinkText)</Hypertext> -->
|
||||
<!--<Checkbox Name="EulaAcceptCheckbox" X="178" Y="202" Width="-24" Height="17" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.InstallAcceptCheckbox)</Checkbox>-->
|
||||
|
||||
<Button Name="NextButton" X="200" Y="-142" Width="-200" Height="44" TabStop="yes" FontId="3">#(loc.InstallMeteor)</Button>
|
||||
</Page>
|
||||
<Page Name="InstallDir">
|
||||
<Text X="24" Y="20" Width="-220" Height="24" FontId="2" DisablePrefix="yes">#(loc.InstallDirHeader)</Text>
|
||||
<Text X="24" Y="78" Width="-24" Height="32" FontId="1" DisablePrefix="yes">#(loc.InstallDirMessage)</Text>
|
||||
|
||||
<Text X="64" Y="130" Width="-24" Height="17" FontId="0">#(loc.InstallScopeLabel)</Text>
|
||||
<Button Name="PerMachineInstall" X="120" Y="150" Width="-24" Height="17" TabStop="yes" FontId="0" HideWhenDisabled="no" HexStyle="0x0000009">#(loc.PerMachineInstallRButton)</Button>
|
||||
<Button Name="PerUserInstall" X="120" Y="170" Width="-24" Height="17" TabStop="yes" FontId="0" HideWhenDisabled="no" HexStyle="0x0000009">#(loc.PerUserInstallRButton)</Button>
|
||||
|
||||
<Text X="64" Y="218" Width="92" Height="17" FontId="0">#(loc.InstallDirPathLabel)</Text>
|
||||
<Editbox Name="InstallFolderEditbox" X="164" Y="216" Width="-144" Height="21" TabStop="yes" FontId="0" FileSystemAutoComplete="yes" HideWhenDisabled="no" />
|
||||
<Button Name="BrowseButton" X="-64" Y="215" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="no">#(loc.OptionsBrowseButton)</Button>
|
||||
|
||||
<Button Name="BackButton" X="-256" Y="-10" Width="110" Height="23" TabStop="yes" FontId="0">#(loc.BackButton)</Button>
|
||||
<Button Name="NextButton" X="-140" Y="-10" Width="110" Height="23" TabStop="yes" FontId="0">#(loc.NextButton)</Button>
|
||||
<Button Name="CloseButton" X="-24" Y="-10" Width="110" Height="23" TabStop="yes" FontId="0">#(loc.InstallCloseButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Progress">
|
||||
<Text Name="InstallingHeader" X="24" Y="30" Width="-24" Height="75" FontId="3" DisablePrefix="yes">
|
||||
</Text>
|
||||
|
||||
<Progressbar Name="OverallCalculatedProgressbar" X="24" Y="183" Width="-24" Height="17" />
|
||||
<Text Name="ExecuteProgressActionDataText" X="24" Y="205" Width="-24" Height="52" FontId="0" DisablePrefix="yes">#(loc.ExecuteProgressActionDataText)</Text>
|
||||
|
||||
<Image X="25" Y="-20" Width="127" Height="30" ImageFile="meteor-logo-sm.jpg"/>
|
||||
<Button Name="ProgressCancelButton" X="-24" Y="-18" Width="110" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
|
||||
</Page>
|
||||
<Page Name="SvcOptions">
|
||||
|
||||
<Text X="24" Y="30" Width="600" Height="100" FontId="3" DisablePrefix="yes">
|
||||
Before getting started, please take a moment to
|
||||
create a Meteor developer account.</Text>
|
||||
|
||||
<Text X="24" Y="100" Width="-24" Height="110" FontId="1" DisablePrefix="yes">
|
||||
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.
|
||||
</Text>
|
||||
|
||||
<Button Name="CreateRButton" X="30" Y="194" Width="200" Height="17" TabStop="yes" FontId="0" HideWhenDisabled="no" HexStyle="0x0000009">#(loc.CreateRButton)</Button>
|
||||
<Button Name="SignInRButton" X="30" Y="214" Width="200" Height="17" TabStop="yes" FontId="0" HideWhenDisabled="no" HexStyle="0x0000009">#(loc.SignInRButton)</Button>
|
||||
|
||||
|
||||
<!-- for signup: -->
|
||||
<Text Name="RegisterEmailLabel" X="292" Y="194" Width="120" Height="17" FontId="0">#(loc.RegisterEmail):</Text>
|
||||
<Text Name="RegisterUserLabel" X="292" Y="222" Width="120" Height="17" FontId="0">#(loc.RegisterUser):</Text>
|
||||
<Text Name="RegisterPassLabel" X="292" Y="250" Width="120" Height="17" FontId="0">#(loc.RegisterPass):</Text>
|
||||
|
||||
<Editbox Name="RegisterEmail" X="410" Y="192" Width="180" Height="21" TabStop="yes" FontId="0">[RegisterEmail]</Editbox>
|
||||
<Editbox Name="RegisterUser" X="410" Y="220" Width="180" Height="21" TabStop="yes" FontId="0">[RegisterUser]</Editbox>
|
||||
<Editbox Name="RegisterPass" X="410" Y="248" Width="180" Height="21" TabStop="yes" FontId="0" HexStyle="0x20">[RegisterPass]</Editbox>
|
||||
|
||||
|
||||
<!-- for login: -->
|
||||
<!-- XXX For some reason, Visible="no" below doesn't work.
|
||||
instead, we set it imperatively when we switch to this
|
||||
page. See #Hidden -->
|
||||
<Text Name="LoginUsernameOrEmailLabel" Visible="no" X="292" Y="194" Width="120" Height="17" FontId="0">#(loc.RegisterUsernameOrEmail):</Text>
|
||||
<Text Name="LoginPassLabel" Visible="no" X="292" Y="222" Width="120" Height="17" FontId="0">#(loc.RegisterPass):</Text>
|
||||
|
||||
<Editbox Name="LoginUsernameOrEmail" Visible="no" X="410" Y="192" Width="180" Height="21" TabStop="yes" FontId="0">[LoginUsernameOrEmail]</Editbox>
|
||||
<Editbox Name="LoginPass" Visible="no" X="410" Y="220" Width="180" Height="21" TabStop="yes" FontId="0" HexStyle="0x20">[LoginPass]</Editbox>
|
||||
|
||||
<Image X="25" Y="-20" Width="127" Height="30" ImageFile="meteor-logo-sm.jpg"/>
|
||||
|
||||
<!-- bottom buttons: -->
|
||||
<Button Name="SkipButton" X="-140" Y="-18" Width="110" Height="23" TabStop="yes" FontId="0">#(loc.SkipButton)</Button>
|
||||
<Button Name="InstallButton" X="-24" Y="-18" Width="110" Height="23" TabStop="yes" FontId="0">Sign In</Button>
|
||||
</Page>
|
||||
<Page Name="Modify">
|
||||
<Text X="24" Y="20" Width="-220" Height="24" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Text>
|
||||
<Text X="24" Y="78" Width="-24" Height="140" FontId="1" DisablePrefix="yes">#(loc.ModifyInfo)</Text>
|
||||
<Button Name="RepairButton" X="-256" Y="-10" Width="110" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button>
|
||||
<Button Name="UninstallButton" X="-140" Y="-10" Width="110" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button>
|
||||
<Button Name="ModifyCancelButton" X="-24" Y="-10" Width="110" Height="23" TabStop="yes" FontId="0">#(loc.ModifyCloseButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Success">
|
||||
<Text Name="SuccessHeader" X="24" Y="30" Width="420" Height="50" FontId="3" DisablePrefix="yes">[varSuccessHeader]</Text>
|
||||
<Hypertext Name="SuccessInfo" X="24" Y="80" Width="-24" Height="160" FontId="1" TabStop="no" HideWhenDisabled="yes">[varSuccessInfo]</Hypertext>
|
||||
|
||||
<Image X="25" Y="-20" Width="127" Height="30" ImageFile="meteor-logo-sm.jpg"/>
|
||||
<Button Name="SuccessCancelButton" X="-24" Y="-18" Width="110" Height="23" TabStop="yes" FontId="0">#(loc.SuccessCloseButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Failure">
|
||||
<Text Name="FailureHeader" X="24" Y="20" Width="-220" Height="24" FontId="2" DisablePrefix="yes">[varFailureHeader]</Text>
|
||||
<Hypertext Name="FailureLogFileLink" X="24" Y="78" Width="-24" Height="48" FontId="1" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
|
||||
<Hypertext Name="FailureMessageText" X="24" Y="130" Width="-24" Height="48" FontId="0" TabStop="yes" HideWhenDisabled="yes"/>
|
||||
|
||||
<Text Name="FailureRestartText" X="24" Y="-100" Width="-24" Height="34" FontId="0" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureRestartText)</Text>
|
||||
<Button Name="FailureRestartButton" X="-140" Y="-10" Width="110" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
|
||||
<Button Name="FailureCloseButton" X="-24" Y="-10" Width="110" Height="23" TabStop="yes" FontId="0">#(loc.FailureCloseButton)</Button>
|
||||
</Page>
|
||||
</Theme>
|
||||
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 9.0 KiB |
@@ -1,71 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>3.8</ProductVersion>
|
||||
<ProjectGuid>7b569f5b-5d73-4e7b-be41-041a2f22a521</ProjectGuid>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<OutputType>Bundle</OutputType>
|
||||
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
|
||||
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
|
||||
<Name>SetupPackage</Name>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<OutputPath>bin\$(Configuration)\$(Platform)\</OutputPath>
|
||||
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
|
||||
<SuppressPdbOutput>True</SuppressPdbOutput>
|
||||
<SuppressAllWarnings>True</SuppressAllWarnings>
|
||||
<Pedantic>False</Pedantic>
|
||||
<OutputName>InstallMeteor</OutputName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
|
||||
<OutputPath>bin\$(Configuration)\$(Platform)\</OutputPath>
|
||||
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
|
||||
<SuppressPdbOutput>True</SuppressPdbOutput>
|
||||
<SuppressAllWarnings>True</SuppressAllWarnings>
|
||||
<Pedantic>False</Pedantic>
|
||||
<OutputName>InstallMeteor</OutputName>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Meteor_Bundle.wxs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WixExtension Include="WixNetFxExtension">
|
||||
<HintPath>$(WixExtDir)\WixNetFxExtension.dll</HintPath>
|
||||
<Name>WixNetFxExtension</Name>
|
||||
</WixExtension>
|
||||
<WixExtension Include="WixBalExtensionExt">
|
||||
<HintPath>..\WiXBalExtension\build\WixBalExtensionExt.dll</HintPath>
|
||||
<Name>WixBalExtensionExt</Name>
|
||||
</WixExtension>
|
||||
<WixExtension Include="WixUtilExtension">
|
||||
<HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
|
||||
<Name>WixUtilExtension</Name>
|
||||
</WixExtension>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Configuration.wxi" />
|
||||
<Content Include="Resources\Background.png" />
|
||||
<Content Include="Resources\Theme_Meteor.xml" />
|
||||
<Content Include="Resources\TopHeader.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\Theme_Meteor.wxl" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Resources" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(WixTargetsPath)" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>copy "$(ProjectDir)$(OutDir)$(TargetFileName)" "$(ProjectDir)..\Release\" /Y</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!--
|
||||
To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Wix.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -1,651 +0,0 @@
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="BalBaseBootstrapperApplication.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#include <windows.h>
|
||||
#include <msiquery.h>
|
||||
|
||||
#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<IBootstrapperApplication*>(this);
|
||||
}
|
||||
else if (::IsEqualIID(IID_IUnknown, riid))
|
||||
{
|
||||
*ppvObject = static_cast<IUnknown*>(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;
|
||||
};
|
||||
@@ -1,704 +0,0 @@
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="IBootstrapperApplication.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// IBootstrapperApplication implemented by a bootstrapper application and used by bootstrapper engine.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#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)();
|
||||
@@ -1,29 +0,0 @@
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="IBootstrapperBAFunction.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#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
|
||||
);
|
||||
|
||||
@@ -1,220 +0,0 @@
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="IBootstrapperEngine.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// IBoostrapperEngine implemented by engine and used by bootstrapper application.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#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;
|
||||
};
|
||||
@@ -1,151 +0,0 @@
|
||||
#pragma once
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="aclutil.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// Access Control List helper functions.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#include <aclapi.h>
|
||||
#include <sddl.h>
|
||||
|
||||
#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
|
||||
@@ -1,92 +0,0 @@
|
||||
#pragma once
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="apuputil.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// Header for Application Update helper functions.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#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
|
||||
@@ -1,158 +0,0 @@
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="atomutil.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// ATOM helper functions.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#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
|
||||
@@ -1,69 +0,0 @@
|
||||
#pragma once
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="balcondition.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// Bootstrapper Application Layer condition utility.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
#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
|
||||
@@ -1,106 +0,0 @@
|
||||
#pragma once
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="balinfo.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// Bootstrapper Application Layer package utility.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
#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
|
||||
@@ -1,75 +0,0 @@
|
||||
#pragma once
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="balretry.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// Bootstrapper Application Layer retry utility.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
#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
|
||||
@@ -1,120 +0,0 @@
|
||||
#pragma once
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="balutil.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// Burn utility library.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#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
|
||||
@@ -1,92 +0,0 @@
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="buffutil.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// Binary serialization helper functions.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#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
|
||||
@@ -1,72 +0,0 @@
|
||||
#pragma once
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="cabcutil.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// Header for cabinet creation helper functions.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#include <fci.h>
|
||||
#include <fcntl.h>
|
||||
#include <msi.h>
|
||||
|
||||
// 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
|
||||
@@ -1,66 +0,0 @@
|
||||
#pragma once
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="cabutil.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// Header for cabinet decompression helper functions
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#include <fdi.h>
|
||||
#include <sys\stat.h>
|
||||
|
||||
#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
|
||||
@@ -1,76 +0,0 @@
|
||||
#pragma once
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="certutil.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// Certificate helper functions.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#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
|
||||
@@ -1,110 +0,0 @@
|
||||
#pragma once
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="conutil.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// Console helper functions.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#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
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
#pragma once
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="cryputil.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// Cryptography helper functions.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#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
|
||||
@@ -1,153 +0,0 @@
|
||||
#pragma once
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="custommsierrors.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// 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
|
||||
@@ -1,79 +0,0 @@
|
||||
#pragma once
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="dictutil.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// Header for string dict helper functions.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#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
|
||||
@@ -1,65 +0,0 @@
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="dirutil.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// Directory helper functions.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#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
|
||||
|
||||
@@ -1,215 +0,0 @@
|
||||
#pragma once
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="dutil.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// Header for utility layer that provides standard support for asserts, exit macros
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#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<typename T> static char countofVerify(void const *, T) throw() { return 0; }
|
||||
template<typename T> 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);
|
||||
@@ -1,233 +0,0 @@
|
||||
#pragma once
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="eseutil.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// Header for Extensible Storage Engine (Jetblue) helper functions.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#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
|
||||
@@ -1,229 +0,0 @@
|
||||
#pragma once
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="fileutil.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// Header for file helper functions.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#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<DWORD64>((static_cast<DWORD64>(major & 0xFFFF) << 48) \
|
||||
| (static_cast<DWORD64>(minor & 0xFFFF) << 32) \
|
||||
| (static_cast<DWORD64>(build & 0xFFFF) << 16) \
|
||||
| (static_cast<DWORD64>(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
|
||||
@@ -1,41 +0,0 @@
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="gdiputil.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// GDI+ helper functions.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#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
|
||||
@@ -1,233 +0,0 @@
|
||||
#pragma once
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="iis7util.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// IIS7 helper functions.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
#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
|
||||
@@ -1,49 +0,0 @@
|
||||
#pragma once
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="inetutil.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// Internet utilites.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#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
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
#pragma once
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// <copyright file="iniutil.h" company="Outercurve Foundation">
|
||||
// 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.
|
||||
// </copyright>
|
||||
//
|
||||
// <summary>
|
||||
// Ini/cfg file helper functions.
|
||||
// </summary>
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
#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
|
||||