toolset
-
Windows Installer XML(WiX) toolset
- http://wix.sourceforge.net/
- Visual Studio .NET and PlatformSDK(or WindowsSDK)が必要らしい
-
Localize
UI
Wix3においてUIを変更する場合には外部ライブラリをリンクする必要がある。コマンドラインでビルドしている場合はLight.exeの引数を変更すればよいのだが、VotiveでWiXプロジェクトでビルドしている場合はプロジェクトツリーのReferencesを右クリックしてWixUIExtension.dllを追加すればよい。
http://blogs.msdn.com/jrock/archive/2007/10/19/how-to-use-extensions-in-votive-iis-or-ui-extensions-for-example.aspx
-
Localize Resource
- 2008/02現在Wix3の日本語リソースがない、Wix2のものは以下のソースを落とす
- http://wix.sourceforge.net/releases/2.0.5805.0/wix2-sources.zip
- zipを解凍し、wix2-sources\src\ui\wixuiのwixui_ja-jp.wxlを取り出す
- WiX2ならlight.exeを実行する際に
-loc wixui_ja-jp.wxl
というオプションを追加すればUIが日本語化できる
-
EULA
- EULA(使用許諾書)の表示がおかしいときはLicense.rtfがWordで保存されていないかチェックする。ワードパッドで保存しないと都合が悪いらしい
-
launch
- http://www.dizzymonkeydesign.com/blog/misc/adding-and-customizing-dlgs-in-wix-3/
- http://themech.net/2008/08/how-to-create-a-simple-msi-installer-using-wix/
- 元ソースはsrc\ext\UIExtension\wixlibにある、デフォルトのCheckBoxを使うと背景がグレーになってしまう問題あり
Module
- .NETアセンブリをGACに入れたい
- FileエレメントにAssembly属性の値を”.net”にする
<Component Id="MyClass.dll" Guid="C34C3881-D02A-47d9-851D-25314C154E74" DiskId="1">
<File Id="MyClass.dll" Name="MyClass.dll" KeyPath="yes" Source="$(var.Property_ProductRoot)\bin\$(var.BuildType)\ MyClass.dll" Checksum="yes" Vital="yes" Assembly=".net"/>
</Component>
- 参考: http://wix.sourceforge.net/manual-wix3/wix_xsd_file.htm
- COM.dllをregsvr32したい
- FileエレメントにSelfRegCost属性の値を1にする
<Component Id="MyCom.dll" Guid="c6cec3e3-0436-418e-99f3-7a7e67802ce2" DiskId="1">
<File Id="MyCom.dll" Name="MyCom.dll" LongName="MyCom.dll" Source="$(var.Property_SourceDir)\ MyCom.dll" SelfRegCost="1"/>
</Component>
- Cランタイムなどのマージモジュールをインストールしたい
- Mergeエレメントのインストール場所(SystemFolder)を指定し、FeatherでMergeRefでIDを参照
<DirectoryRef Id="SystemFolder">
<!-- Visual Studio .NET 2005(VS 8.0)
<Merge Id="VC80CRTx86.msm" Language="0" DiskId="1" SourceFile="$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC80_CRT_x86.msm"/>
<Merge Id="POLVC80CRTx86.msm" Language="0" DiskId="1" SourceFile="$(env.CommonProgramFiles)\Merge Modules\policy_8_0_Microsoft_VC80_CRT_x86.msm"/>
-->
<!-- Visual Studio .NET 2008(VS 9.0)
<Merge Id="VC90CRTx86.msm" Language="0" DiskId="1" SourceFile="$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC90_CRT_x86.msm"/>
<Merge Id="POLVC90CRTx86.msm" Language="0" DiskId="1" SourceFile="$(env.CommonProgramFiles)\Merge Modules\policy_9_0_Microsoft_VC90_CRT_x86.msm"/>
-->
</DirectoryRef>
<Feature Id="MYROOTFEATURE" Title="MyFeather" Level="1">
<!-- Visual Studio .NET 2005(VS 8.0)
<MergeRef Id="VC80CRTx86.msm"/>
<MergeRef Id="POLVC80CRTx86.msm"/>
-->
<!-- Visual Studio .NET 2008(VS 9.0)
<MergeRef Id="VC90CRTx86.msm"/>
<MergeRef Id="POLVC90CRTx86.msm"/>
-->
</Feature>
- CランタイムをSydeBySydeで使う
- 必要なDLLとマニフェストを入れる
<Component Id="VC90.CRT" Guid="735C05B4-C5C7-4ec4-BA35-CE52685886BA" DiskId="1">
<File Id="msvcr90.dll" Name="msvcr90.dll" LongName="msvcr90.dll" Source="$(var.Property_CrtDir)\msvcr90.dll"/>
<File Id="msvcp90.dll" Name="msvcp90.dll" LongName="msvcp90.dll" Source="$(var.Property_CrtDir)\msvcp90.dll"/>
<File Id="manifest" Name="manifest" LongName="Microsoft.VC90.CRT.manifest" Source="$(var.Property_CrtDir)\Microsoft.VC90.CRT.manifest"/>
</Component>
別の古いバージョンのアプリを削除したい
- UpgradeCodeを複数指定できるらしい
LaunchApplication
http://cml.s10.xrea.com/ej/WiX/run_program_after_install.htm
System Folder Properties
ProgramFilesFolder をはじめとする使えるフォルダ変数
http://msdn2.microsoft.com/en-us/library/Aa372057.aspx
Property | Description |
---|---|
AdminToolsFolder | The full path to the directory that contains administrative tools. |
AppDataFolder | The full path to the Roaming folder for the current user. |
CommonAppDataFolder | The full path to application data for all users. |
CommonFiles64Folder | The full path to the predefined 64-bit Common Files folder. |
CommonFilesFolder | The full path to the Common Files folder for the current user. |
DesktopFolder | The full path to the Desktop folder. |
FavoritesFolder | The full path to the Favorites folder for the current user. |
FontsFolder | The full path to the Fonts folder. |
LocalAppDataFolder | The full path to the folder that contains local (nonroaming) applications. |
MyPicturesFolder | The full path to the Pictures folder. |
PersonalFolder | The full path to the Documents folder for the current user. |
ProgramFiles64Folder | The full path to the predefined 64-bit Program Files folder. |
ProgramFilesFolder | The full path to the predefined 32-bit Program Files folder. |
ProgramMenuFolder | The full path to the Program Menu folder. |
SendToFolder | The full path to the SendTo folder for the current user. |
StartMenuFolder | The full path to the Start menu folder. |
StartupFolder | The full path to the Startup folder. |
System16Folder | The full path to folder for 16-bit system DLLs. |
System64Folder | The full path to the predefined System64 folder. |
SystemFolder | The full path to the System folder for the current user. |
TempFolder | The full path to the Temp folder. |
TemplateFolder | The full path to the Template folder for the current user. |
WindowsFolder | The full path to the Windows folder. |
WindowsVolume | The volume of the Windows folder. |