Oh yeah, also note, this depends on you having a file named
CustomAction.config in your project. I great improvement would be to have
it check for the file's existence before including it. :-)
YMMV.
Chris
On Tue, May 20, 2008 at 5:49 PM, Christopher Karper <
[EMAIL PROTECTED]> wrote:
> I've got the DTF wrapper bit running as a simple exec task by adding the
> following to the end of my project file for the CA dll.
>
> It uses the project output and appends an _Sfx to it to mark it as the
> wrapped version. It's brute force, and it steals from the wix.targets
> file....
> Pay special attention to the DTFBin Property. you can find a better way to
> populate it, or just change it to point to your installation. I had to
> build the DTF myself and disable a bunch of the signing to get this to work,
> since MakeSfxCA.exe wasn't included in the binary distro for this release.
>
> It's uglybut hey, if someone wants to use it/improve it, be my guest.
>
> Chris
>
> --------
>
> <Target Name="AfterBuild">
> <CallTarget Targets="MakeSfxCA" />
> </Target>
>
> <!--
> From the Wix.targets file - CMK
>
> Several properties must be set in the main project file, before using
> this .targets file.
> However, if the properties are not set, we pick some defaults.
> -->
> <PropertyGroup>
>
> <!-- Not a good way, but it works for me. This should use
> registry search, the same way the wix.targets does -->
> <DTFBin>c:\Program Files (x86)\Windows Installer XML
> v3\sdk\</DTFBin>
>
> <Configuration Condition=" '$(Configuration)' == ''
> ">Debug</Configuration>
> <Platform Condition=" '$(Platform)'=='' ">AnyCPU</Platform>
> <OutputPath Condition=" '$(OutputPath)' == ''
> ">bin\$(Configuration)\</OutputPath>
> <!-- Ensure any OutputPath has a trailing slash, so it can be
> concatenated -->
> <OutputPath Condition=" '$(OutputPath)' != '' and
> !HasTrailingSlash('$(OutputPath)') ">$(OutputPath)\</OutputPath>
> <_OriginalOutputType>$(OutputType)</_OriginalOutputType>
> <OutputType Condition=" '$(OutputType)' == ''
> ">Library</OutputType>
> </PropertyGroup>
> <PropertyGroup>
> <!-- Example, bin\Debug\ -->
> <OutDir Condition=" '$(OutDir)' == '' ">$(OutputPath)</OutDir>
> <!-- Ensure OutDir has a trailing slash, so it can be concatenated
> -->
> <OutDir Condition=" '$(OutDir)' != '' and
> !HasTrailingSlash('$(OutDir)') ">$(OutDir)\</OutDir>
>
> <!-- Example, MyCA -->
> <ProjectName Condition=" '$(ProjectName)' == ''
> ">$(MSBuildProjectName)</ProjectName>
>
> <!-- Example, MyCA.csproj -->
> <ProjectFileName Condition=" '$(ProjectFileName)' == ''
> ">$(MSBuildProjectFile)</ProjectFileName>
>
> <!-- Example, .csproj -->
> <ProjectExt Condition=" '$(ProjectExt)' == ''
> ">$(MSBuildProjectExtension)</ProjectExt>
>
> <!-- Example, c:\MyProjects\MyCA\ -->
> <ProjectDir Condition=" '$(ProjectDir)' == ''
> ">$(MSBuildProjectDirectory)\</ProjectDir>
>
> <!-- Example, c:\MyProjects\MyCA\MyCA.csproj -->
> <ProjectPath Condition=" '$(ProjectPath)' == ''
> ">$(ProjectDir)$(ProjectFileName)</ProjectPath>
>
> <!-- Example, MyCA -->
> <TargetName Condition=" '$(TargetName)' == ''
> ">$(OutputName)</TargetName>
>
> <!-- Example, MyCA.dll -->
> <TargetFileName Condition=" '$(TargetFileName)' == ''
> ">$(TargetName)$(TargetExt)</TargetFileName>
>
> <!-- Example, MyCA_Sfx.dll -->
> <TargetSfxName Condition=" '$(TargetSfxName)' == ''
> ">$(TargetName)_Sfx$(TargetExt)</TargetSfxName>
>
> <!-- Example, x86, x64 -->
> <TargetArchitecture Condition=" '$(TargetArchitecture)' == ''
> ">x86</TargetArchitecture>
>
> <!-- Example, c:\MyProjects\MyCA\bin\Debug\ -->
> <FullOutDir Condition=" '$(FullOutDir)' == ''
> ">$(ProjectDir)$(OutDir)</FullOutDir>
> </PropertyGroup>
>
> <Target Name="MakeSfxCA">
> <Exec Command=""$(DTFbin)MakeSfxCA.exe"
> "$(FullOutDir)$(TargetSfxName)"
> "$(DTFbin)$(TargetArchitecture)\SfxCA.dll"
> "$(FullOutDir)$(TargetFileName)"
> "$(ProjectDir)CustomAction.config"
> "$(DTFbin)Microsoft.Deployment.WindowsInstaller.dll"
> "$(DTFbin)Microsoft.Deployment.Resources.dll"" />
> </Target>
>
>
>
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users