I'm using a Votive Project in VS 2005, that uses a make file to
compile the wxs file.

An abbreviated version is below:

!ifndef SRC_DIR
!error Do not call nmake.exe on this makefile directly without setting
up the environment.  Better yet, just use make.bat
!endif

#####################################
# Build Variables
#
WIX_DIR=C:\Program Files\Windows Installer XML\bin
CANDLE="$(WIX_DIR)\candle.exe"
LIGHT="$(WIX_DIR)\light.exe"
CA_DLL_SRC=$(CA_DIR)\$(FLAVOR)

CANDLE_FLAGS=\
        -nologo\
        -dBuild=$(FLAVOR)

LIGHT_FLAGS=\
        -nologo\
        -dBuild=$(FLAVOR)\
        -loc "$(SRC_DIR)$(WIX_LOC_LANG).wxl"

LIGHT_OUTPUT_DIRECTORY=$(SRC_DIR)bin\$(FLAVOR)
CANDLE_OUTPUT_DIRECTORY=$(LIGHT_OUTPUT_DIRECTORY)\BuildFiles
CABINET_CACHE=$(CANDLE_OUTPUT_DIRECTORY)\CabCache

CANDLE_SRC_FILES=\
   "$(SRC_DIR)1.wxs"\
   "$(SRC_DIR)2.wxs"\
   "$(SRC_DIR)3.wxs"

LIGHT_SRC_FILES=\
   "$(CANDLE_OUTPUT_DIRECTORY)\1.wixobj"\
   "$(CANDLE_OUTPUT_DIRECTORY)\2.wixobj"\
   "$(CANDLE_OUTPUT_DIRECTORY)\3.wixobj"

#####################################
# Build Rules
#
"$(CANDLE_OUTPUT_DIRECTORY)1.wixobj":
  "$(SRC_DIR)1.wxs"
   $(CANDLE) $(CANDLE_FLAGS) -out $@ $**

"$(CANDLE_OUTPUT_DIRECTORY)\2.wixobj":
   "$(SRC_DIR)2.wxs"
   $(CANDLE) $(CANDLE_FLAGS) -out $@ $**

"$(CANDLE_OUTPUT_DIRECTORY)\3.wixobj":
   "$(SRC_DIR)3.wxs"
   $(CANDLE) $(CANDLE_FLAGS) -out $@ $**

#####################################
# Build Targets
#
clean:
   -rd /s /q $(CABINET_CACHE)
   -rd /s /q $(CANDLE_OUTPUT_DIRECTORY)
   -del /q $(LIGHT_OUTPUT_DIRECTORY)\*.msi
   -del /q $(LIGHT_OUTPUT_DIRECTORY)\*.cab

setupdirs:
   @if not exist "$(LIGHT_OUTPUT_DIRECTORY)" mkdir $(LIGHT_OUTPUT_DIRECTORY)
   @if not exist "$(CANDLE_OUTPUT_DIRECTORY)" mkdir $(CANDLE_OUTPUT_DIRECTORY)
   @if not exist "$(CABINET_CACHE)" mkdir $(CABINET_CACHE)
   @cd $(SRC_DIR)

$(LIGHT_OUTPUT_DIRECTORY)\Product.msi : $(LIGHT_SRC_FILES)
   $(LIGHT) $(LIGHT_FLAGS) -out $@ $**

wix: setupdirs $(LIGHT_OUTPUT_DIRECTORY)\Product.msi
   @echo wix (Product.msi): - Success.

Obviously, it is modified, but mainly I just renamed the files to
1.wxs etc, and removed about 50 of them.

After rebuilding my installer, I see that what is happening is that
candle is called for each file in the sources list by nmake. Been so
long since I set this up that I didn't remember how it was built until
I went in and started looking at the project.

On 2/22/06, Michael Luke <[EMAIL PROTECTED]> wrote:
> Nicholas, I'm was so surprised to see your comment there that I just
> went to check again and, yep, the candle task throws an error trying to
> compile multiple .wxs files.
>
> Maybe you have a more complex msbuild project that you are using?
>
> Mine just looks like this:
>
> <?xml version="1.0" encoding="utf-8" ?>
> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003";
> DefaultTargets="Build">
>   <PropertyGroup>
>     <OutputName>Testing</OutputName>
>     <OutputType>Package</OutputType>
>     <ToolPath>C:\Program Files\Windows Installer XML\bin</ToolPath>
>   </PropertyGroup>
>
>   <ItemGroup>
>     <Compile Include="Configuration Database Installer\*.wxs" />
>     <WixLibrary Include="C:\Program Files\Windows Installer
> XML\bin\sca.wixlib" />
>   </ItemGroup>
>
>   <Import Project="wix.targets" />
> </Project>
>
> However, this gives me this candle error:
>
>     candle.exe : error CNDL0001: cannot specify more than one source
> file with single output file.  Either specify an output directory for
> the -out argument by ending the argument with a '\' or remove the -out
> argument to have the source files compiled to the current directory.
>
> I'd be interested to hear how you got around this.
>
> Mike
>
> [EMAIL PROTECTED] wrote:
> > Check Robs blog at:
> >
> > http://blogs.msdn.com/robmen/archive/2004/04/14/112970.aspx
> >
> > I'm not sure I understand what you mean be multiple .wxs files for a
> > single installer package. I have my current installer broken into 50+
> > wxs files, a wxl and a wxi file. Unless this is something that has
> > been changed (don't see why it would have been) in a version after the
> > one I'm using I don't see what your patch does. Just curious, and
> > fishing for a longer explanation.
> >
> > On 2/22/06, Michael Luke <[EMAIL PROTECTED]> wrote:
> >> Hi everybody,
> >>
> >> I've been using WiX a lot in a Team Build environment recently and
> >> have had to tweak the supplied wix.targets and candle.cs file to
> >> allow it to cope with multiple .wxs files in a single installer
> >> package.
> >>
> >> I suspect that this is something that others could use (indeed Simon
> >> Burgess asked the question on the wix-users list and I supplied my
> >> files offlist to help him) so I'd like to contribute the changes.
> >>
> >> What's the procedure on this project for submitting changes?
> >>
> >> Cheers,
> >>
> >> Michael Luke
> >>
> >>
> >>
> >> -------------------------------------------------------
> >> This SF.net email is sponsored by: Splunk Inc. Do you grep through
> >> log files for problems?  Stop!  Download the new AJAX search engine
> >> that makes searching your log files as easy as surfing the  web.
> >> DOWNLOAD SPLUNK!
> >>
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&;
> > dat=121642
> >> _______________________________________________
> >> WiX-devs mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/wix-devs
> >>
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep
> > through log files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.
> > DOWNLOAD SPLUNK!
> > http://sel.as-us.falkag.net/sel?cmd=k&kid3432&bid#0486&dat1642
> > _______________________________________________
> > WiX-devs mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wix-devs
>
>
>


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
WiX-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-devs

Reply via email to