Please bear with me if I am missing anything obvious since I recently started 
experimenting WIX 3.0 for building patches.

I understand that we can generate patches using either PCP file or WIX 
directly. I decided to go with the latter approach but I am running into some 
issues with it. The main one being how do we build an MSP that targets multiple 
SKUs of the same product? I followed 2 methods for this and both of them fail 
on me!

*         I thought TargetProductCodes in the Patch element serves this 
purpose. So, I built an MSP with the product codes for all SKUs in the 
TargetProductCodes element and generated the MSP by using the Select version. 
The MSP built without any issues but when I tried to verify if the patch 
applies through Orca, it only applies for SELECT but not for any other SKUs. 
First of all, is this the right purpose of the TargetProductCodes and is this 
the right way to do it? Here's how I specified the product codes -
<TargetProductCodes Replace="yes">
        <!-- SELECT -->
        <TargetProductCode Id="{FFXXXXXX-...}" />
        <!-- DEM -->
        <TargetProductCode Id="{35XXXXXX-...}" />
        <!-- EVAL -->
        <TargetProductCode Id="{BEXXXXXX-...}" />
</TargetProductCodes>

*         Another way I tried was I expanded the released and updated versions 
for all SKUs of the MSI, then generated a diff for each one of them. Once I had 
these diffs, I called PYRO.exe (as shown below) to generate the MSP. Here's an 
excerpt from the script.

$(O)\$(PATCH_DEFINITION_FILE).wixobj: $(PATCH_DEFINITION_FILE).wxs

                echo BUILDMSG2: Compiling - $@

                $(WIX3_BIN)\candle.exe -nologo -out $@ 
$(PATCH_DEFINITION_FILE).wxs



$(O)\$(PATCH_DEFINITION_FILE).wixmsp: $(O)\$(PATCH_DEFINITION_FILE).wixobj 
$(LOC_FILE_DIR)\$(MSIPATCHCULTURE).wxl

                echo BUILDMSG2: Linking - $@

                $(WIX3_BIN)\light.exe -nologo -cultures:$(MSIPATCHCULTURE) -loc 
$(LOC_FILE_DIR)\$(MSIPATCHCULTURE).wxl -out $@ 
$(O)\$(PATCH_DEFINITION_FILE).wixobj



echo BUILDMSG2: Expanding SELECT...

$(O)\SelCD\$(PATCH_TARGET_MSI): 
$(RTM_BIN_PATH)\$(BUILDTYPE)\$(BUILDCPUDIR)\SelectCDImage\$(PATCH_TARGET_MSI_RELATIVE_DIRECTORY)\$(CPUTYPE)\$(PATCH_TARGET_MSI)

                echo BUILDMSG2: Generating admin RTM image - $@

                msiexec -quiet -a 
$(RTM_BIN_PATH)\$(BUILDTYPE)\$(BUILDCPUDIR)\SelectCDImage\$(PATCH_TARGET_MSI_RELATIVE_DIRECTORY)\$(CPUTYPE)\$(PATCH_TARGET_MSI)
 TARGETDIR=$(MAKEDIR)\$(O)\SelCD



$(O)\USelCd\$(PATCH_TARGET_MSI): 
$(INETROOT)\target\$(BUILDTYPE)\$(CPUTYPE)\SelectCDImage\$(PATCH_TARGET_MSI_RELATIVE_DIRECTORY)\$(CPUTYPE)\$(PATCH_TARGET_MSI)

                echo BUILDMSG2: Generating admin QFE image - $@

                msiexec -quiet -a 
$(INETROOT)\target\$(BUILDTYPE)\$(CPUTYPE)\SelectCDImage\$(PATCH_TARGET_MSI_RELATIVE_DIRECTORY)\$(CPUTYPE)\$(PATCH_TARGET_MSI)
 TARGETDIR=$(MAKEDIR)\$(O)\USelCd



$(O)\SelectDiff.wixmst: $(O)\SelCD\$(PATCH_TARGET_MSI) 
$(O)\USelCd\$(PATCH_TARGET_MSI)

                echo BUILDMSG2: Generating diff - $@

                $(WIX3_BIN)\torch.exe -nologo -p -xo -ax $(O)\SelectDiffBin 
$(O)\SelCD\$(PATCH_TARGET_MSI) $(O)\USelCd\$(PATCH_TARGET_MSI)  -out $@


echo BUILDMSG2: Expanding DEM...
$(O)\DemCd\$(PATCH_TARGET_MSI): 
$(RTM_BIN_PATH)\$(BUILDTYPE)\$(BUILDCPUDIR)\DEMCDImage\$(PATCH_TARGET_MSI_RELATIVE_DIRECTORY)\$(CPUTYPE)\$(PATCH_TARGET_MSI)
                echo BUILDMSG2: Generating admin RTM image - $@
                msiexec -quiet -a 
$(RTM_BIN_PATH)\$(BUILDTYPE)\$(BUILDCPUDIR)\DEMCDImage\$(PATCH_TARGET_MSI_RELATIVE_DIRECTORY)\$(CPUTYPE)\$(PATCH_TARGET_MSI)
 TARGETDIR=$(MAKEDIR)\$(O)\DemCd

$(O)\UDemCd\$(PATCH_TARGET_MSI): 
$(INETROOT)\target\$(BUILDTYPE)\$(CPUTYPE)\DEMCDImage\$(PATCH_TARGET_MSI_RELATIVE_DIRECTORY)\$(CPUTYPE)\$(PATCH_TARGET_MSI)
                echo BUILDMSG2: Generating admin QFE image - $@
                msiexec -quiet -a 
$(INETROOT)\target\$(BUILDTYPE)\$(CPUTYPE)\DEMCDImage\$(PATCH_TARGET_MSI_RELATIVE_DIRECTORY)\$(CPUTYPE)\$(PATCH_TARGET_MSI)
 TARGETDIR=$(MAKEDIR)\$(O)\UDemCd

$(O)\DEMDiff.wixmst: $(O)\DemCd\$(PATCH_TARGET_MSI) 
$(O)\UDemCd\$(PATCH_TARGET_MSI)
                echo BUILDMSG2: Generating diff - $@
                $(WIX3_BIN)\torch.exe -nologo -p -xo -ax $(O)\DEMDiffBin 
$(O)\DemCd\$(PATCH_TARGET_MSI) $(O)\UDemCd\$(PATCH_TARGET_MSI)  -out $@

$(O)\$(TARGETNAME).msp: $(O)\$(PATCH_DEFINITION_FILE).wixmsp 
$(O)\SelectDiff.wixmst $(O)\DEMDiff.wixmst
                                echo BUILDMSG2: Building patch - $@
                $(WIX3_BIN)\pyro.exe -nologo 
$(O)\$(PATCH_DEFINITION_FILE).wixmsp -out $@ -t RTM $(O)\SelectDiff.wixmst -t 
RTM $(O)\DEMDiff.wixmst
                                $(BINPLACE_CMD)
                But when I run this script, I get the below error for almost 
all files in the MSI. Any ideas what I am doing wrong here?
                                
1>d:\product\setup\wix\patch\server\obj\i386\urtlcd\Product.msi : error 
PYRO0317 : Two different source paths 'd:\ 
product\setup\wix\patch\server\obj\i386\USelCd\program files\Prod2007\ABC.exe' 
and 'd:\ product\setup\wix\patch\server\obj\i386\URtlCd\program 
files\Prod2007\ABC.exe' were detected for the same file identifier 
'F_ABC.exe.XXXXXXXX_XXXX_XXXX_XXXX_XXXXXXXXXXXX. You must either author these 
under Media elements with different Id attribute values or in different patches.

*         The final one I tried which I had a little success is - I defined 
each SKU target in a separate MEDIA element as the above error suggested. (It 
certainly doesn't make sense do generate a separate MSP for each SKU!)

    <Media Id="1" Cabinet="SelPatch.cab">

                <PatchBaseline Id="RTMSelect"/>

    </Media>



    <Media Id="2" Cabinet="DemPatch.cab">

<PatchBaseline Id="RTMDem"/>

    </Media>
This did generate the MSP but the size of the MSP is about 3 times more than 
the one generated for all our 6 SKUs using a PCP file (which is what we were 
doing before using WIX). And I was able to apply this patch for both the Select 
and DEM SKUs.

So, what is the right approach here?


Thanks,

Sharat Janapareddy
~ 40269

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to