C# 클래스 WixSharp.Project

Represents Wix# project. This class defines the WiX/MSI entities and their relationships.

Project instance can be compiled into complete MSI or WiX source file with one of the Compiler "Build" methods.

Use Project non-default constructor or C# initializers to specify required installation components.

상속: WixSharp.WixProject
파일 보기 프로젝트 열기: Eun/WixSharp 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Actions Action[]
AutoAssignedInstallDirPath string
BackgroundImage string
BannerImage string
Binaries WixSharp.Binary[]
Certificates WixSharp.Certificate[]
ControlPanelInfo ProductInfo
CustomUI WixSharp.Controls.CustomUI
DefaultRefAssemblies List
Description string
Dirs WixSharp.Dir[]
EmbeddedUI Binary
EmitConsistentPackageId bool
Encoding System.Text.Encoding
EnvironmentVariables WixSharp.EnvironmentVariable[]
InstallScope InstallScope?
InstallerVersion int
LaunchConditions List
LicenceFile string
LocalizationFile string
MajorUpgrade MajorUpgrade
MajorUpgradeStrategy MajorUpgradeStrategy
Media Media
Package Package
Platform Platform?
ProductId Guid?
Properties Property[]
RegValues WixSharp.RegValue[]
SqlDatabases SqlDatabase[]
UI WUI
UpgradeCode Guid?
Users WixSharp.User[]
Version System.Version

Private Properties

프로퍼티 타입 설명
Preprocess void

공개 메소드들

메소드 설명
BuildMsi ( string path = null ) : string

Builds the MSI file from the specified Project instance.

BuildMsiCmd ( string path = null ) : string

Builds the WiX source file and generates batch file capable of building MSI with WiX toolset.

BuildMsm ( string path = null ) : string

Builds the MSM file from the specified Project instance.

BuildMsmCmd ( string path = null ) : string

Builds the WiX source file and generates batch file capable of building MSM with WiX toolset.

BuildWxs ( Compiler type = Compiler.OutputType.MSI, string path = null ) : string

Builds the WiX source file (*.wxs) from the specified Project instance.

CalculateProductId ( System.Guid productGuid, System.Version version ) : System.Guid

Calculates the product id.

FindDir ( string path ) : Dir

Finds T:WixSharp.Dir corresponding to the specified path. new Project("MyProduct", new Dir("%ProgramFiles%", new Dir("My Company", new Dir("My Product", ... In the sample above the call FindDir(@"%ProgramFiles%\My Company\My Product") returns the last declared T:WixSharp.Dir.

FindFile ( Predicate match ) : WixSharp.File[]

Returns all Files of the Project matching the match pattern.

GenerateProductGuids ( ) : void

Generates all missing product Guids (e.g. UpgradeCode and ProductId).

Wix# compiler call this method just before building the MSI. However you can call it any time if you want to preview auto-generated Guids.

Project ( ) : System

Initializes a new instance of the Project class.

Project ( string name ) : System

Initializes a new instance of the Project class.

ResolveWildCards ( bool ignoreEmptyDirectories = false ) : Project

Resolves all wild card specifications if any.

This method is called by Compiler during the compilation. However it might be convenient to call it before the compilation if any files matching the wild card mask need to be handled in special way (e.g. shortcuts created). See WildCard Files example.

ResolveWildCards should be called only after T:WixSharp.WixProject.SourceBaseDir is set. Otherwise wild card paths may not be resolved correctly.

비공개 메소드들

메소드 설명
Preprocess ( ) : void

메소드 상세

BuildMsi() 공개 메소드

Builds the MSI file from the specified Project instance.
public BuildMsi ( string path = null ) : string
path string The path to the MSI file to be build.
리턴 string

BuildMsiCmd() 공개 메소드

Builds the WiX source file and generates batch file capable of building MSI with WiX toolset.
public BuildMsiCmd ( string path = null ) : string
path string The path to the batch file to be build.
리턴 string

BuildMsm() 공개 메소드

Builds the MSM file from the specified Project instance.
public BuildMsm ( string path = null ) : string
path string The path to the MSM file to be build.
리턴 string

BuildMsmCmd() 공개 메소드

Builds the WiX source file and generates batch file capable of building MSM with WiX toolset.
public BuildMsmCmd ( string path = null ) : string
path string The path to the batch file to be build.
리턴 string

BuildWxs() 공개 메소드

Builds the WiX source file (*.wxs) from the specified Project instance.
public BuildWxs ( Compiler type = Compiler.OutputType.MSI, string path = null ) : string
type Compiler The type () of the setup file to be defined in the source file (MSI vs. MSM).
path string The path to the WXS file to be build.
리턴 string

CalculateProductId() 공개 정적인 메소드

Calculates the product id.
public static CalculateProductId ( System.Guid productGuid, System.Version version ) : System.Guid
productGuid System.Guid The product GUID.
version System.Version The version.
리턴 System.Guid

FindDir() 공개 메소드

Finds T:WixSharp.Dir corresponding to the specified path. new Project("MyProduct", new Dir("%ProgramFiles%", new Dir("My Company", new Dir("My Product", ... In the sample above the call FindDir(@"%ProgramFiles%\My Company\My Product") returns the last declared T:WixSharp.Dir.
public FindDir ( string path ) : Dir
path string The path string.
리턴 Dir

FindFile() 공개 메소드

Returns all Files of the Project matching the match pattern.
public FindFile ( Predicate match ) : WixSharp.File[]
match Predicate The match pattern.
리턴 WixSharp.File[]

GenerateProductGuids() 공개 메소드

Generates all missing product Guids (e.g. UpgradeCode and ProductId).

Wix# compiler call this method just before building the MSI. However you can call it any time if you want to preview auto-generated Guids.

public GenerateProductGuids ( ) : void
리턴 void

Project() 공개 메소드

Initializes a new instance of the Project class.
public Project ( ) : System
리턴 System

Project() 공개 메소드

Initializes a new instance of the Project class.
public Project ( string name ) : System
name string The name of the project. Typically it is the name of the product to be installed.
리턴 System

ResolveWildCards() 공개 메소드

Resolves all wild card specifications if any.

This method is called by Compiler during the compilation. However it might be convenient to call it before the compilation if any files matching the wild card mask need to be handled in special way (e.g. shortcuts created). See WildCard Files example.

ResolveWildCards should be called only after T:WixSharp.WixProject.SourceBaseDir is set. Otherwise wild card paths may not be resolved correctly.
public ResolveWildCards ( bool ignoreEmptyDirectories = false ) : Project
ignoreEmptyDirectories bool if set to true empty directories are ignored and not added to the project.
리턴 Project

프로퍼티 상세

Actions 공개적으로 프로퍼티

Collection of Actionss to be performed during the installation.
public Action[] Actions
리턴 Action[]

AutoAssignedInstallDirPath 공개적으로 프로퍼티

Name (path) of the directory which was assigned T:WixSharp.Compiler.AutoGeneration.InstallDirDefaultId ID as part of XML auto-generation (see T:WixSharp.AutoGenerationOptions).
public string AutoAssignedInstallDirPath
리턴 string

BackgroundImage 공개적으로 프로퍼티

Path to the file containing the image (e.g. bmp) setup dialogs background. If not specified default image will be used.
public string BackgroundImage
리턴 string

BannerImage 공개적으로 프로퍼티

Path to the file containing the image (e.g. bmp) setup dialogs banner. If not specified default image will be used.
public string BannerImage
리턴 string

Binaries 공개적으로 프로퍼티

Collection of WiX/MSI Binary objects to be embedded into MSI database. Normally you doe not need to deal with this property as Compiler will populate it automatically.
public Binary[],WixSharp Binaries
리턴 WixSharp.Binary[]

Certificates 공개적으로 프로퍼티

Collection of Certificate to be installed.
public Certificate[],WixSharp Certificates
리턴 WixSharp.Certificate[]

ControlPanelInfo 공개적으로 프로퍼티

Set of values in 'Add/Remove Programs' of Control Panel.
public ProductInfo ControlPanelInfo
리턴 ProductInfo

CustomUI 공개적으로 프로퍼티

The custom UI definition. Use CustomUIBuilder to generate the WiX UI definition or compose WixSharp.Controls.CustomUI manually.
public CustomUI,WixSharp.Controls CustomUI
리턴 WixSharp.Controls.CustomUI

DefaultRefAssemblies 공개적으로 프로퍼티

Collection of paths to the assemblies referenced by ManagedActions.
public List DefaultRefAssemblies
리턴 List

Description 공개적으로 프로퍼티

The product full name or description.
public string Description
리턴 string

Dirs 공개적으로 프로퍼티

Collection of Dirs to be installed.
public Dir[],WixSharp Dirs
리턴 WixSharp.Dir[]

EmbeddedUI 공개적으로 프로퍼티

The Binary (assembly) implemening WiX embedded UI
public Binary,WixSharp EmbeddedUI
리턴 Binary

EmitConsistentPackageId 공개적으로 프로퍼티

Indicates whether compiler should emit consistent package Id (package code). Set EmitConsistentPackageId to 'false' (default value) if you want the WiX compilers automatically generate a new package code for each new .msi file built. Or set it to 'true' if you want Wix# to auto generate a unique consistent package code for a given combination of the product code, product version and product upgrade code.

WiX package code generation policy discourages the use of this attribute as it is a primary MSI identifier used to distinguish packages in ARP. Thus WiX tools always auto-generate the code for each build. This in turn makes it impossible to rebuild a truly identical MSIs from the same WiX code even with the same set of product code, version and upgrade code.

This very artificial limitation has severe practical impact. For example if a specific MSI file is lost it cannot be recreated even if the original source code that was used to built the lost MSI is available.

From another hand Wix# encourages using a singe GUID (Project.GUID) as a primary identifier of the product. Thus all other MSI identifiers can be derived by the compiler from the unique combination of this GUID and the product version. This also included generation of the package Id attribute controlled by the EmitConsistentPackageId.

Wix# does not changes the WiX default package code generation it just gives the opportunity to control it when required.

public bool EmitConsistentPackageId
리턴 bool

Encoding 공개적으로 프로퍼티

The Encoding to be used for MSI UI dialogs. If not specified the System.Text.Encoding.Default will be used.
public Encoding,System.Text Encoding
리턴 System.Text.Encoding

EnvironmentVariables 공개적으로 프로퍼티

Collection of EnvironmentVariables to be set during the installation.
public EnvironmentVariable[],WixSharp EnvironmentVariables
리턴 WixSharp.EnvironmentVariable[]

InstallScope 공개적으로 프로퍼티

Use this attribute if you need to specify the installation scope of this package: per-machine or per-user.
public InstallScope? InstallScope
리턴 InstallScope?

InstallerVersion 공개적으로 프로퍼티

The installer version
public int InstallerVersion
리턴 int

LaunchConditions 공개적으로 프로퍼티

Collection of the T:WixSharp.LaunchConditions associated with the setup.
public List LaunchConditions
리턴 List

LicenceFile 공개적으로 프로퍼티

Relative path to RTF file with the custom licence agreement to be displayed in the Licence dialog. If this value is not specified the default WiX licence agreement will be used.
public string LicenceFile
리턴 string

LocalizationFile 공개적으로 프로퍼티

Path to the Localization file.
public string LocalizationFile
리턴 string

MajorUpgrade 공개적으로 프로퍼티

Simplifies authoring for major upgrades, including support for preventing downgrades.
public MajorUpgrade,WixSharp MajorUpgrade
리턴 MajorUpgrade

MajorUpgradeStrategy 공개적으로 프로퍼티

Defines Major Upgrade behavior. By default it is null thus upgrade is not supported.

If you need to implement Major Upgrade define this member to appropriate MajorUpgradeStrategy instance.

public MajorUpgradeStrategy,WixSharp MajorUpgradeStrategy
리턴 MajorUpgradeStrategy

Media 공개적으로 프로퍼티

Generic T:WixSharp.WixEntity container for defining WiX Media element attributes.

These attributes describe a disk that makes up the source media for the installation.

The following is an example of defining the Package attributes. var project = new Project("My Product", new Dir(@"%ProgramFiles%\My Company\My Product", ... project.Media.AttributesDefinition = @"Id=2; CompressionLevel=mszip"; Compiler.BuildMsi(project);
public Media Media
리턴 Media

Package 공개적으로 프로퍼티

Generic T:WixSharp.WixEntity container for defining WiX Package element attributes.

These attributes are the properties about the package to be placed in the Summary Information Stream. These are visible from COM through the IStream interface, and these properties can be seen on the package in Explorer.

The following is an example of defining the Package attributes. var project = new Project("My Product", new Dir(@"%ProgramFiles%\My Company\My Product", ... project.Package.AttributesDefinition = @"AdminImage=Yes; Comments=Release Candidate; Description=Fantastic product..."; Compiler.BuildMsi(project);
public Package Package
리턴 Package

Platform 공개적으로 프로퍼티

The target platform type.
public Platform? Platform
리턴 Platform?

ProductId 공개적으로 프로퍼티

This is the value of the Id attribute of the Wix Product element. This value is unique for any given version of a product being installed.

If user doesn't specify this value Wix# engine will derive it from project Project.GUID and the product Project.Version.
public Guid? ProductId
리턴 Guid?

Properties 공개적으로 프로퍼티

Collection of WiX/MSI Property objects to be created during the installed.
public Property[] Properties
리턴 Property[]

RegValues 공개적으로 프로퍼티

Collection of RegValues to be set during the installation.
public RegValue[],WixSharp RegValues
리턴 WixSharp.RegValue[]

SqlDatabases 공개적으로 프로퍼티

Collection of WiX:SqlExtension SqlDatabase objects representing databases to be created, modifed, or interacted with during MSI execution.
public SqlDatabase[] SqlDatabases
리턴 SqlDatabase[]

UI 공개적으로 프로퍼티

Type of the MSI User Interface. This value is assigned to the UIRef WiX element during the compilation. If specified WUI.WixUI_Minimal will used.
public WUI UI
리턴 WUI

UpgradeCode 공개적으로 프로퍼티

This is the value of the UpgradeCode attribute of the Wix Product element.

Both WiX and MSI consider this element as optional even it is the only available identifier for defining relationship between different versions of the same product. Wix# in contrary enforces that value to allow any future updates of the product being installed.

If user doesn't specify this value Wix# engine will use Project.GUID as UpgradeCode.

public Guid? UpgradeCode
리턴 Guid?

Users 공개적으로 프로퍼티

Collection of Wix:UtilExtension User objects representings users 'for all kinds of things'
public User[],WixSharp Users
리턴 WixSharp.User[]

Version 공개적으로 프로퍼티

Version of the product to be installed.
public Version,System Version
리턴 System.Version