echo '<?xml version="1.0"?>
<!--
   Generated by WixTool 2.0 Pre-release
   http://wixtool.sourceforge.net/

   Copyright(C) 1996-2004 by 5Group
-->
<Wix xmlns="http://xblast.sf.net">
	<Product xmlns="http://schemas.microsoft.com/wix/2003/01/wi" Id="5841D606-19F3-4524-ABD4-F199FBC23BDC" UpgradeCode="3055C306-E13F-4B17-BEF4-F710F0DD8B9E" Name="XBlast TNT" Language="1033" Version="2.10.0" Manufacturer="XBlast Team">
		<Package Id="4C020C55-4378-43A0-907B-CF7D4D391B16" Description="Noname Windows Installer package" Comments="This is my new Windows Installer installation" Manufacturer="My Company" InstallerVersion="200" Compressed="yes"/>
		<Media Id="1" Cabinet="Data1.cab" EmbedCab="yes"/>
		<Directory Id="TARGETDIR" Name="SourceDir">
			<Directory Id="ProgramFilesFolder" Name="PFDir">
				<Directory Id="MainDir" Name="XBlast" LongName="XBlast TNT">
					<Component Id="MainComponent" Guid="A6EDDA1C-E832-4D91-818A-E3BB393FA8DC" DiskId="1">
						<CreateFolder/>
						<!-- Add some files here... -->              
	    <Shortcut Id="startmenuFoobar10" Directory="ProgramMenuDir" Name="XBlast"
                LongName="XBlast TNT" Target="MainFeature" WorkingDirectory='INSTALLDIR'
                Icon="xblast.ico" IconIndex="0" />
              <Shortcut Id="desktopFoobar10" Directory="DesktopFolder" Name="XBlast TNT"
                LongName="XBlast TNT" Target="MainFeature" WorkingDirectory='INSTALLDIR'
                Icon="xblast.ico" IconIndex="0" />
						<File Id="xblast.exe" Name="xblast.exe" LongName="xblast.exe" src="xblast.exe"/>
                        </Component>
					<Directory Id="level" Name="level">
                        <Component Guid="D43DBE90-ED72-4850-A136-E22E608BF966" Id="level" DiskId="1">
                            <CreateFolder/>
'>xblast.wxs
cd level
list=`ls *xal`
for i in $list ; do
if [ ${#i} -gt 8 ]; then
k=`expr substr $i 1 6`~1.xal
else
k=$i
fi
echo \<File Id=\"$i\" Name=\"$k\" LongName=\"$i\" src=\"level\\$i\"/\> >../tmp
cat ../xblast.wxs ../tmp > ../tmp2
mv ../tmp2 ../xblast.wxs		
done;
cd ..

echo '				
                        </Component>
                    </Directory>
					<Directory Id="image" Name="image">
                                             
'> tmp
cat xblast.wxs tmp > tmp2
mv tmp2 xblast.wxs
cd image
echo '

                         <Directory Id="explosion" Name="explo~1" LongName="explosion">
                            <Component Guid="6468CF00-1DDB-4E65-9E72-4C94179586B0" Id="explosion" DiskId="1">
						<CreateFolder/>

'> ../tmp
cat ../xblast.wxs ../tmp > ../tmp2
mv ../tmp2 ../xblast.wxs

cd explosion
list=`ls`
for i in $list ; do
if [ ${#i} -gt 8 ]; then
j=${#i}
h=`expr $j - 2`
k=`expr substr $i 1 6`~1.`expr substr $i $h 3`
else
k=$i
fi
echo \<File Id=\"$i\"  Name=\"$k\" LongName=\"$i\" src=\"image\\explosion\\$i\"/\> >../../tmp
cat ../../xblast.wxs ../../tmp > ../../tmp2
mv ../../tmp2 ../../xblast.wxs		
done;
cd ..
echo '
                        </Component>
                        </Directory>
                        <Directory Id="sprite" Name="sprite">
                            <Component Guid="4BE81B9C-4C79-46FF-9AE7-F21DD648BA22" Id="sprite" DiskId="1">
						<CreateFolder/>
'> ../tmp
cat ../xblast.wxs ../tmp > ../tmp2
mv ../tmp2 ../xblast.wxs
cd sprite
list=`ls`
for i in $list ; do
if [ ${#i} -gt 8 ]; then
j=${#i}
h=`expr $j - 2`
k=`expr substr $i 1 6`~1.`expr substr $i $h 3`
else
k=$i
fi
echo \<File Id=\"$i\"  Name=\"$k\" LongName=\"$i\" src=\"image\\sprite\\$i\"/\> >../../tmp
cat ../../xblast.wxs ../../tmp > ../../tmp2
mv ../../tmp2 ../../xblast.wxs		
done;
cd ..
echo '
                        </Component>
                        </Directory>
                        <Directory Id="block" Name="block">
                            <Component Guid="E50ECA52-F994-4C52-93E8-848A0C488166" Id="block" DiskId="1">
						<CreateFolder/>
'> ../tmp
cat ../xblast.wxs ../tmp > ../tmp2
mv ../tmp2 ../xblast.wxs
cd block
list=`ls`
for i in $list ; do
if [ ${#i} -gt 8 ]; then
j=${#i}
h=`expr $j - 2`
k=`expr substr $i 1 6`~1.`expr substr $i $h 3`
else
k=$i
fi
echo \<File Id=\"$i\" Name=\"$k\" LongName=\"$i\" src=\"image\\block\\$i\"/\> >../../tmp
cat ../../xblast.wxs ../../tmp > ../../tmp2
mv ../../tmp2 ../../xblast.wxs		
done;
cd ..
echo '
                        </Component>
                        </Directory>
                        <Directory Id="score" Name="score">
                            <Component Guid="C0597AA7-C8F9-4B0B-9942-E0B8AF9E1013" Id="score" DiskId="1">
						<CreateFolder/>
'> ../tmp
cat ../xblast.wxs ../tmp > ../tmp2
mv ../tmp2 ../xblast.wxs
cd score
list=`ls`
for i in $list ; do
if [ ${#i} -gt 8 ]; then
j=${#i}
h=`expr $j - 2`
k=`expr substr $i 1 6`~1.`expr substr $i $h 3`
else
k=$i
fi
echo \<File Id=\"$i\" Name=\"$k\" LongName=\"$i\" src=\"image\\score\\$i\"/\> >../../tmp
cat ../../xblast.wxs ../../tmp > ../../tmp2
mv ../../tmp2 ../../xblast.wxs		
done;
cd ..
echo '
                        </Component>
                        </Directory>
                        <Directory Id="misc" Name="misc">
                            <Component Guid="AEF21DB4-B34B-4645-95C7-BEC682DA628E" Id="misc" DiskId="1">
						<CreateFolder/>
'> ../tmp
cat ../xblast.wxs ../tmp > ../tmp2
mv ../tmp2 ../xblast.wxs
cd misc
list=`ls`
for i in $list ; do
if [ ${#i} -gt 8 ]; then
j=${#i}
h=`expr $j - 2`
k=`expr substr $i 1 6`~1.`expr substr $i $h 3`
else
k=$i
fi
echo \<File Id=\"$i\" Name=\"$k\" LongName=\"$i\" src=\"image\\misc\\$i\"/\> >../../tmp
cat ../../xblast.wxs ../../tmp > ../../tmp2
mv ../../tmp2 ../../xblast.wxs		
done;
cd ..
cd ..
cd sounds
echo '
                        </Component>
                        </Directory>
                        </Directory>
                    <Directory Id="sounds" Name="sounds">
                        <Component Guid="AE978A35-513E-4EB9-A6E7-0892373D1405" Id="sounds" DiskId="1">
						<CreateFolder/>

'> ../tmp
cat ../xblast.wxs ../tmp > ../tmp2
mv ../tmp2 ../xblast.wxs
list=`ls`
for i in $list ; do
if [ ${#i} -gt 8 ]; then
j=${#i}
h=`expr $j - 2`
k=`expr substr $i 1 6`~1.`expr substr $i $h 3`
else
k=$i
fi
echo \<File Id=\"$i\" Name=\"$k\" LongName=\"$i\" src=\"sounds\\$i\"/\> >../tmp
cat ../xblast.wxs ../tmp > ../tmp2
mv ../tmp2 ../xblast.wxs		
done;
cd ..


echo '
                        </Component>
                    </Directory>
				</Directory>
			</Directory>
		</Directory>
		<Feature Id="MainFeature" Title="Noname" Level="1">
			<ComponentRef Id="MainComponent"/>
			<ComponentRef Id="level"/>
			<ComponentRef Id="sprite"/>
			<ComponentRef Id="block"/>
			<ComponentRef Id="score"/>
			<ComponentRef Id="sounds"/>
			<ComponentRef Id="misc"/>
			<ComponentRef Id="explosion"/>
		</Feature>
	</Product>
</Wix>'> tmp
cat xblast.wxs tmp > tmp2
mv tmp2 xblast.wxs


