<?xml version="1.0" ?>
<package>
    <job id="postImage">
        <script language="jscript">
            <![CDATA[
        var fileSystem = new ActiveXObject("Scripting.FileSystemObject");
        var hyperlap2dRoot = fileSystem.GetFolder(".").ParentFolder.ParentFolder.ParentFolder.ParentFolder.Path;
        var installerConfig = hyperlap2dRoot + "/build/installer/config/";
        // Copy image resources
        fileSystem.CopyFile(hyperlap2dRoot + "/resources-windows/dlgbmp.bmp", installerConfig);
        fileSystem.CopyFile(hyperlap2dRoot + "/resources-windows/bannrbmp.bmp", installerConfig);
        var wxsFilePath = installerConfig + "main.wxs";
        wxsFile = fileSystem.OpenTextFile(wxsFilePath, 1);
        var contents = wxsFile.ReadAll();
        wxsFile.Close();
        // setup custom images
        contents = contents.replace("</Product>", "<WixVariable Id=\"WixUIBannerBmp\" Value=\"bannrbmp.bmp\" /></Product>");
        contents = contents.replace("</Product>", "<WixVariable Id=\"WixUIDialogBmp\" Value=\"dlgbmp.bmp\" /></Product>");

        wxsFile = fileSystem.OpenTextFile(wxsFilePath, 2, true);
        wxsFile.Write(contents);
        wxsFile.Close();
     ]]>
        </script>
    </job>
</package>