I think I'm getting close but I'm getting an error when unpacking.
Reading the source for MakeSfxCA I found the GetPackFileMap function and
reading the description: "By default, all files will be placed in the root
of the cab. But inputs may optionally include an alternate inside-cab file
path before an equals sign."
So this implied to me that on the MakeSfxCA command line, rather than pass "
$(TargetDir)EULAs\ja-JP\Eula.rtf" I could pass "EULAs\en-US\Eula.rtf=
$(TargetDir)EULAs\ja-JP\Eula.rtf"
I beleive the log output of MakeSfxCA confirmed this:
Packaging files
MyInstallerCA.dll
CustomAction.config
Microsoft.Deployment.WindowsInstaller.dll
EULAs\ja-JP\Eula.rtf
However, when I run my installer I get the following error:
SFXCA: Extracting custom action to temporary directory: Temp\MSI28AD.tmp-\
MSI (c) (D0!6C) [23:20:00:013]: Closing MSIHANDLE (2) of type 790531 for
thread 3436
MSI (c) (D0!6C) [23:20:00:091]: Creating MSIHANDLE (3) of type 790531 for
thread 3436
*SFXCA: Failed to extract to temporary directory. Cabinet error code 11.*
Has anyone tried this before and gotten it to work? Is there a better way
to do this?
Additionally I figured out how to pack everything in my CA project ouput
directory recursively. I replaced the PackCustomAction taget in the
Wix.CA.targets file with the following. I don't recommend changing this
file since it will get overwritten on the next Wix install, I simply did
this as a shortcut to see if I could get it to work. This could be placed
in any project file or imported from a custom target though.
<Target Name="AfterBuild">
<CreateProperty Value="$(TargetDir)$(TargetCAFileName)">
<Output TaskParameter="Value"
PropertyName="TargetCAPackage"/>
</CreateProperty>
<CreateItem Include="$(TargetDir)**\*.*">
<Output TaskParameter="Include"
ItemName="AllFilesInTargetDir" />
</CreateItem>
<CreateItem Include="@(AllFilesInTargetDir)"
Condition=" '%(AllFilesInTargetDir.FullPath)' !=
'$(TargetPath)' and '%(AllFilesInTargetDir.FullPath)' !=
'$(TargetCAPackage)'" >
<Output TaskParameter="Include"
ItemName="AllDependenciesInTargetDir" />
</CreateItem>
<CreateProperty
Value="@(AllDependenciesInTargetDir->'%(RecursiveDir)%(Filename)%(Extension)=%(RecursiveDir)%(Filename)%(Extension)')"
>
<Output TaskParameter="Value"
PropertyName="AllDependenciesInTargetDirList" />
</CreateProperty>
<!-- Run the MakeSfxCA.exe CA packaging tool. -->
<Exec Command='"$(MakeSfxCA)" "$(TargetCAPackage)" "$(SfxCADll)"
"$(TargetPath)" "$(AllDependenciesInTargetDirList)"'
WorkingDirectory="$(TargetDir)" />
</Target>
On Wed, Feb 25, 2009 at 12:07 PM, Shawn Dwyer <[email protected]>wrote:
> Hi,
>
> Is there a way to get MakeSfxCA include everything in my CA project ouput
> directory recursively, maintaining folder structure? It seems to me this
> would be the simplest way of ensuring all necessary dependencies are there
> at runtime.
>
> For a simple example say I have my EULAs for each language in a
> subdirectory such as $(TargetDir)\EULAs\ja-JP\Eula.rtf. I'd like this file
> and the folder structure to be there at runtime.
>
> Of course in the above example I could simply flatten the folder structure
> and add the language as part of the file name, but my particular scenario is
> more complicated.
>
> Another example would be to get the dependencies of dependencies. For
> example Project A depends on Project B which depends on Project C. The
> output of C is automatically copied to the output directory of B, and all of
> that to the ouput directory of A. I'd like to someout get that all packaged
> up and available at runtime.
>
> Thanks,
>
> Shawn
>
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users