Dominik Guder wrote:
> 
> this looks suitable for me. I'll give it a try.
> 

After a bunch of more important tasks I was able to come back to this task.
I first tried the diff solution which worked as expected and I ended with a
nant solution which removes the diff dependency. I would like to share this
here for all others who might need it.

Since wix throws an error on missing files in buildarea, only a one way
check is needed to check if all files from buildarea are present in
administrative install location (below installer dir).
In addition some files could be excluded from the check if needed.

Regards Dominik

<?xml version="1.0" encoding="utf-8" ?>
<project name="check installer" default="check-installed-files" basedir="."
xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd";>
    <description>
    </description>

        <property name="buildarea.dir" value="C:\path\to\buildarea" />
        <property name="msitarget.dir" value="_installer" />
        
        <property name="msi.file" value="ProductName.msi" />

        <target name="extract-msi" description="extract">
                <delete dir="${msitarget.dir}" />
                <exec program="msiexec.exe" verbose="true">
                        <arg value="/a" />
                        <arg value="${msi.file}" />
                        <arg 
value="TARGETDIR=${path::get-full-path(msitarget.dir)}" />
                        <arg line="/qn INSTALL=ALL" />
                </exec>
        </target>

        <target name="check-installed-files" description="check">
                <property name="check.dir" 
value="${path::combine(msitarget.dir, 'Program
Files\ProductName')}" />
                <property name="missingfiles" value="false" />
                
                <fileset id="files.deployed" basedir="${buildarea.dir}">
                        <include name="**" />
                        <exclude name="**\SomeFileToExclude.dll" />
                </fileset>

                <foreach item="File" property="filename">
                        <in>
                                <items refid="files.deployed" />
                        </in>
                        <do>
                                <property name="filepath" 
value="${string::replace(filename,
buildarea.dir + '\', '')}" />
                                <if test="${not 
file::exists(path::combine(check.dir, filepath))}" >
                                        <echo message="File '${filepath}' is 
missing in installer"
level="Error" />
                                        <property name="missingfiles" 
value="true" />
                                </if>
                        </do>
                </foreach>
                <if test="${missingfiles}">
      <echo message="Directories used:" />
      <echo message="Source files in
'${path::get-full-path(buildarea.dir)}'" />
      <echo message="Msi files in '${path::get-full-path(check.dir)}'" />
      <fail message="One or more files are missing in installer." />
                </if>
        </target>
        
</project>

-- 
View this message in context: 
http://www.nabble.com/Wix-layout-tp12592040p14581722.html
Sent from the wix-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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

Reply via email to