From 3d2d46f62fc01e2653d0251ad9703090574e7c41 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 6 Mar 2024 14:48:10 -0800 Subject: Better .nupkg names --- .../IBootstrapperEngine.cs | 501 +++++++++++++++++++++ 1 file changed, 501 insertions(+) create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperEngine.cs (limited to 'src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperEngine.cs') diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperEngine.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperEngine.cs new file mode 100644 index 00000000..1e91cd31 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperEngine.cs @@ -0,0 +1,501 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.BootstrapperApplicationApi +{ + using System; + using System.CodeDom.Compiler; + using System.Runtime.InteropServices; + using System.Text; + + /// + /// Allows calls into the bootstrapper engine. + /// + [ComImport] + [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + [Guid("6480D616-27A0-44D7-905B-81512C29C2FB")] + [GeneratedCodeAttribute("WixToolset.Bootstrapper.InteropCodeGenerator", "1.0.0.0")] + public interface IBootstrapperEngine + { + /// + /// See . + /// + void GetPackageCount( + [MarshalAs(UnmanagedType.U4)] out int pcPackages + ); + + /// + /// See . + /// + [PreserveSig] + int GetVariableNumeric( + [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, + out long pllValue + ); + + /// + /// See . + /// + [PreserveSig] + int GetVariableString( + [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, + IntPtr wzValue, + ref IntPtr pcchValue + ); + + /// + /// See . + /// + [PreserveSig] + int GetVariableVersion( + [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, + IntPtr wzValue, + ref IntPtr pcchValue + ); + + /// + /// See . + /// + [PreserveSig] + int FormatString( + [MarshalAs(UnmanagedType.LPWStr)] string wzIn, + [MarshalAs(UnmanagedType.LPWStr), Out] StringBuilder wzOut, + ref IntPtr pcchOut + ); + + /// + /// See . + /// + [PreserveSig] + int EscapeString( + [MarshalAs(UnmanagedType.LPWStr)] string wzIn, + [MarshalAs(UnmanagedType.LPWStr), Out] StringBuilder wzOut, + ref IntPtr pcchOut + ); + + /// + /// See . + /// + void EvaluateCondition( + [MarshalAs(UnmanagedType.LPWStr)] string wzCondition, + [MarshalAs(UnmanagedType.Bool)] out bool pf + ); + + /// + /// See . + /// + void Log( + [MarshalAs(UnmanagedType.U4)] LogLevel level, + [MarshalAs(UnmanagedType.LPWStr)] string wzMessage + ); + + /// + /// See . + /// + void SendEmbeddedError( + [MarshalAs(UnmanagedType.U4)] int dwErrorCode, + [MarshalAs(UnmanagedType.LPWStr)] string wzMessage, + [MarshalAs(UnmanagedType.U4)] int dwUIHint, + [MarshalAs(UnmanagedType.I4)] out int pnResult + ); + + /// + /// See . + /// + void SendEmbeddedProgress( + [MarshalAs(UnmanagedType.U4)] int dwProgressPercentage, + [MarshalAs(UnmanagedType.U4)] int dwOverallProgressPercentage, + [MarshalAs(UnmanagedType.I4)] out int pnResult + ); + + /// + /// See . + /// + void SetUpdate( + [MarshalAs(UnmanagedType.LPWStr)] string wzLocalSource, + [MarshalAs(UnmanagedType.LPWStr)] string wzDownloadSource, + [MarshalAs(UnmanagedType.U8)] long qwValue, + [MarshalAs(UnmanagedType.U4)] UpdateHashType hashType, + [MarshalAs(UnmanagedType.LPWStr)] string wzHash, + [MarshalAs(UnmanagedType.LPWStr)] string wzUpdatePackageId + ); + + /// + /// See . + /// + void SetLocalSource( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, + [MarshalAs(UnmanagedType.LPWStr)] string wzPath + ); + + /// + /// See . + /// + void SetDownloadSource( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, + [MarshalAs(UnmanagedType.LPWStr)] string wzUrl, + [MarshalAs(UnmanagedType.LPWStr)] string wzUser, + [MarshalAs(UnmanagedType.LPWStr)] string wzPassword + ); + + /// + /// See . + /// + void SetVariableNumeric( + [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, + long llValue + ); + + /// + /// See . + /// + void SetVariableString( + [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, + IntPtr wzValue, + [MarshalAs(UnmanagedType.Bool)] bool fFormatted + ); + + /// + /// See . + /// + void SetVariableVersion( + [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, + IntPtr wzValue + ); + + /// + /// See . + /// + void CloseSplashScreen(); + + /// + /// See . + /// + void Detect( + IntPtr hwndParent + ); + + /// + /// See . + /// + void Plan( + [MarshalAs(UnmanagedType.U4)] LaunchAction action + ); + + /// + /// See . + /// + [PreserveSig] + int Elevate( + IntPtr hwndParent + ); + + /// + /// See . + /// + void Apply( + IntPtr hwndParent + ); + + /// + /// See . + /// + void Quit( + [MarshalAs(UnmanagedType.U4)] int dwExitCode + ); + + /// + /// See . + /// + void LaunchApprovedExe( + IntPtr hwndParent, + [MarshalAs(UnmanagedType.LPWStr)] string wzApprovedExeForElevationId, + [MarshalAs(UnmanagedType.LPWStr)] string wzArguments, + [MarshalAs(UnmanagedType.U4)] int dwWaitForInputIdleTimeout + ); + + /// + /// Sets the URL to the update feed. + /// + void SetUpdateSource( + [MarshalAs(UnmanagedType.LPWStr)] string url + ); + + /// + /// See . + /// + void CompareVersions( + [MarshalAs(UnmanagedType.LPWStr)] string wzVersion1, + [MarshalAs(UnmanagedType.LPWStr)] string wzVersion2, + [MarshalAs(UnmanagedType.I4)] out int pnResult + ); + + /// + /// See . + /// + [PreserveSig] + int GetRelatedBundleVariable( + [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, + [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, + IntPtr wzValue, + ref IntPtr pcchValue + ); + } + + /// + /// The installation action for the bundle or current package. + /// + public enum ActionState + { + /// + /// No action. + /// + None, + + /// + /// Uninstall action. + /// + Uninstall, + + /// + /// Install action. + /// + Install, + + /// + /// Modify action. + /// + Modify, + + /// + /// Repair action. + /// + Repair, + + /// + /// Minor upgrade action. + /// + MinorUpgrade, + } + + /// + /// The action for the bundle to perform. + /// + public enum LaunchAction + { + /// + /// Invalid action. + /// + Unknown, + + /// + /// Provide help information. + /// + Help, + + /// + /// Layout the bundle on disk, normally to prepare for offline installation. + /// + Layout, + + /// + /// Same as Uninstall, except it will always remove itself from the package cache and Add/Remove Programs. + /// This should only be used to remove corrupt bundles since it might not properly clean up its packages. + /// + UnsafeUninstall, + + /// + /// Uninstall the bundle. + /// + Uninstall, + + /// + /// Cache the bundle and its packages. + /// + Cache, + + /// + /// Install the bundle. + /// + Install, + + /// + /// Modify the bundle. + /// + Modify, + + /// + /// Repair the bundle + /// + Repair, + + /// + /// Launch the update registered with and then exit without waiting for it to complete. + /// + UpdateReplace, + + /// + /// Launch the update registered with as an embedded bundle. + /// + UpdateReplaceEmbedded, + } + + /// + /// The message log level. + /// + public enum LogLevel + { + /// + /// No logging level (generic). + /// + None, + + /// + /// User messages. + /// + Standard, + + /// + /// Verbose messages. + /// + Verbose, + + /// + /// Messages for debugging. + /// + Debug, + + /// + /// Error messages. + /// + Error, + } + + /// + /// Type of hash used for update bundle. + /// + public enum UpdateHashType + { + /// + /// No hash provided. + /// + None, + + /// + /// SHA-512 based hash provided. + /// + Sha512, + } + + /// + /// Describes the state of an installation package. + /// + public enum PackageState + { + /// + /// Invalid state. + /// + Unknown, + + /// + /// The package is not on the machine (except possibly MspPackage) and should not be installed. + /// + Obsolete, + + /// + /// The package is not installed. + /// + Absent, + + /// + /// The package is installed. + /// + Present, + + /// + /// The package is on the machine but not active, so only uninstall operations are allowed. + /// + Superseded, + + /// + /// This value is no longer used. See the DetectPackageCompleteEventArgs.Cached value instead. + /// + [Obsolete("Use DetectPackageCompleteEventArgs.Cached instead.")] + Cached = Present, + } + + /// + /// Indicates the state desired for an installation package. + /// + public enum RequestState + { + /// + /// No change requested. + /// + None, + + /// + /// As long as there are no dependents, the package will be uninstalled. + /// There are some packages that can't be uninstalled, such as an ExePackage without an UninstallCommand. + /// + ForceAbsent, + + /// + /// Request the package to not be installed on the machine. + /// + Absent, + + /// + /// Request the package to be cached and not be installed on the machine. + /// + Cache, + + /// + /// Request the package to be installed on the machine. + /// + Present, + + /// + /// Force the bundle to install the package. + /// + ForcePresent, + + /// + /// Request the package to be repaired. + /// + Repair, + } + + /// + /// Indicates the state of a feature. + /// See https://learn.microsoft.com/en-us/windows/win32/api/msi/nf-msi-msiqueryfeaturestatew. + /// + public enum FeatureState + { + /// + /// Invalid state. + /// + Unknown, + + /// + /// INSTALLSTATE_ABSENT + /// + Absent, + + /// + /// INSTALLSTATE_ADVERTISED + /// + Advertised, + + /// + /// INSTALLSTATE_LOCAL + /// + Local, + + /// + /// INSTALLSTATE_SOURCE + /// + Source, + } +} -- cgit v1.2.3-55-g6feb