Initial installer code
authorSam Thursfield <samthursfield@codethink.co.uk>
Thu, 19 May 2011 10:44:35 +0000 (11:44 +0100)
committerSam Thursfield <samthursfield@codethink.co.uk>
Fri, 20 May 2011 13:59:53 +0000 (14:59 +0100)
windows/app.wxs [new file with mode: 0644]
windows/config.wxi [new file with mode: 0644]

diff --git a/windows/app.wxs b/windows/app.wxs
new file mode 100644 (file)
index 0000000..694d448
--- /dev/null
@@ -0,0 +1,67 @@
+<?xml version='1.0'?>
+<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
+  <?include .\config.wxi ?>
+
+  <Product Id='$(var.ProductGuid)'
+           Language='1033'
+           Manufacturer='$(var.Manufacturer)'
+           Name='$(var.ProductName)'
+           Version='$(var.ProductVersion)'
+           UpgradeCode='$(var.UpgradeGuid)'>
+
+    <Package Id="*"
+             Description='$(var.PackageDescription)'
+             Keywords='$(var.PackageKeywords)'
+             Manufacturer='$(var.Manufacturer)'
+             Platform='$(var.PackagePlatform)'
+             InstallerVersion='200'
+             Compressed='yes' />
+
+    <Media Id='1' Cabinet='app.cab' EmbedCab='yes' />
+
+    <Directory Id='TARGETDIR' Name='SourceDir'>
+      <Directory Id='ProgramFilesFolder' Name='PFiles'>
+        <Directory Id='INSTALLDIR' Name='Moonshot'>
+
+          <Directory Id='BINDIR' Name='bin'>
+            <Component Id='MainExe' Guid='$(var.MainExeGuid)'>
+              <File Id='MainExe'
+                    Name='$(var.MainExeFile)'
+                    DiskId='1'
+                    Source='$(var.MainExeSource)'
+                    KeyPath='yes'>
+                <Shortcut Id='startmenu'
+                          Directory='ProgramMenuDir'
+                          Name='$(var.ProductName)'
+                          WorkingDirectory='INSTALLDIR'
+                          Advertise='yes' />
+                <Shortcut Id='desktop'
+                          Directory='DesktopFolder'
+                          Name='$(var.ProductName)'
+                          WorkingDirectory='INSTALLDIR'
+                          Advertise='yes' />
+              </File>
+            </Component>
+          </Directory>
+        </Directory>
+      </Directory>
+
+      <Directory Id='ProgramMenuFolder' Name='Programs'>
+        <Directory Id='ProgramMenuDir' Name='$(var.ProductName)'>
+          <Component Id='ProgramMenuDir' Guid='$(var.ProgramMenuDirGuid)'>
+            <RemoveFolder Id='ProgramMenuDir' On='uninstall' />
+            <RegistryValue Root='HKCU' Key='Software\Moonshot' Type='string' Value='' KeyPath='yes' />
+          </Component>
+        </Directory>
+      </Directory>
+
+      <Directory Id='DesktopFolder' Name='Desktop'>
+      </Directory>
+    </Directory>
+
+    <Feature Id='Complete' Level='1'>
+        <ComponentRef Id='MainExe' />
+        <ComponentRef Id='ProgramMenuDir' />
+    </Feature>
+  </Product>
+</Wix>
diff --git a/windows/config.wxi b/windows/config.wxi
new file mode 100644 (file)
index 0000000..4c17b62
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Include>
+  <?define Manufacturer       = "JANET(UK)" ?>
+  <?define ManufacturerFolder = "Janet" ?>
+  <?define ProductName        = "Moonshot" ?>
+<!-- FIXME: update during autoconf -->
+  <?define ProductVersion     = "0.0.1" ?>
+  <?define PackageDescription = "Moonshot Installer" ?>
+  <?define PackageKeywords    = "Installer" ?>
+  <?define PackagePlatform    = "x86" ?>
+  <?define MainExeFile        = "moonshot.exe" ?>
+  <?define MainExeSource      = "src/moonshot.exe" ?>
+  <?define Language           = "1033" ?>
+<!-- GUIDs -->
+  <?define ProductGuid = "12259E08-76D6-4D9A-8BFA-D720882E8391" ?>
+  <?define UpgradeGuid = "997127DE-C0fE-4F60-89F9-F119EF4EB983" ?>
+  <?define MainExeGuid = "37D8BA2D-40E0-475D-BF50-6328A9E269FE" ?>
+  <?define ProgramMenuDirGuid = "704C1DCA-F0C4-47B3-BE52-38BE8140333F" ?>
+  <?define DesktopShortcutGuid = "cff6bda0-483f-496e-819f-0fc8874c2b9c" ?>
+</Include>
+