summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-01-24 21:17:22 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2013-01-24 21:26:35 +0100
commit57007f5c1836aafdb51725e974c48e74551b93e7 (patch)
tree59be79afe0de8031fcf9788321748b2ef418a8cd /tests
parentac82ebd7518aab2ac905f5e1a2bedb9a43b830f6 (diff)
downloadmsitools-57007f5c1836aafdb51725e974c48e74551b93e7.tar.gz
msitools-57007f5c1836aafdb51725e974c48e74551b93e7.tar.xz
msitools-57007f5c1836aafdb51725e974c48e74551b93e7.zip
wixl: implement stable UUID generation
Note that the UUIDs are *not* compatible with WiX!
Diffstat (limited to 'tests')
-rw-r--r--tests/data/wixl/ComponentGUID.wxs49
-rw-r--r--tests/wixl.at13
2 files changed, 62 insertions, 0 deletions
diff --git a/tests/data/wixl/ComponentGUID.wxs b/tests/data/wixl/ComponentGUID.wxs
new file mode 100644
index 0000000..6ffbe18
--- /dev/null
+++ b/tests/data/wixl/ComponentGUID.wxs
@@ -0,0 +1,49 @@
+<?xml version='1.0' encoding='windows-1252'?>
+<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
+ <Product Name='Foobar 1.0' Id='ABCDDCBA-86C7-4D14-AEC0-86416A69ABDE' UpgradeCode='ABCDDCBA-7349-453F-94F6-BCB5110BA4FD'
+ Language='1033' Codepage='1252' Version='1.0.0' Manufacturer='Acme Ltd.'>
+
+ <Package Id='*' Keywords='Installer' Description="Acme's Foobar 1.0 Installer"
+ Comments='Foobar is a registered trademark of Acme Ltd.' Manufacturer='Acme Ltd.'
+ InstallerVersion='100' Languages='1033' Compressed='yes' SummaryCodepage='1252' />
+
+ <Media Id='1' Cabinet='Sample.cab' EmbedCab='yes' DiskPrompt="CD-ROM #1" />
+ <Property Id='DiskPrompt' Value="Acme's Foobar 1.0 Installation [1]" />
+
+ <Directory Id='TARGETDIR' Name='SourceDir'>
+ <Directory Id='ProgramFilesFolder' Name='PFiles'>
+ <Directory Id='Acme' Name='Acme'>
+ <Directory Id='INSTALLDIR' Name='Foobar 1.0'>
+ <Component Id='MainExecutable' Guid='*'>
+ <File Id='FoobarEXE' Name='FoobarAppl10.exe' DiskId='1' Source='FoobarAppl10.exe' KeyPath='yes'/>
+ </Component>
+ </Directory>
+ </Directory>
+ </Directory>
+
+ <Directory Id="ProgramMenuFolder" Name="Programs">
+ <Directory Id="ProgramMenuDir" Name="Foobar 1.0">
+ <Component Id="ProgramMenuDir" Guid="*">
+ <RemoveFolder Id='ProgramMenuDir' On='uninstall' />
+ <RegistryValue Root='HKCU' Key='Software\[Manufacturer]\[ProductName]' Type='string' Value='' KeyPath='yes' />
+ </Component>
+ </Directory>
+ </Directory>
+ </Directory>
+
+ <DirectoryRef Id='INSTALLDIR'>
+ <Component Id='Manual' Guid='*'>
+ <File Id='Manual' Name='Manual.pdf' DiskId='1' Source='Manual.pdf' KeyPath='yes'/>
+ </Component>
+ </DirectoryRef>
+
+ <Feature Id='Complete' Level='1'>
+ <ComponentRef Id='MainExecutable' />
+ <ComponentRef Id='Manual' />
+ <ComponentRef Id='ProgramMenuDir' />
+ </Feature>
+
+ <Icon Id="Foobar10.exe" SourceFile="FoobarAppl10.exe" />
+
+ </Product>
+</Wix>
diff --git a/tests/wixl.at b/tests/wixl.at
index 56edef9..c28cc78 100644
--- a/tests/wixl.at
+++ b/tests/wixl.at
@@ -28,6 +28,19 @@ AT_CHECK_WIXL([-o out.msi SampleFirst.wxs], [0], [ignore], [ignore])
AT_CHECK([test -f out.msi], [0])
AT_CLEANUP
+AT_SETUP([Stable component GUIDs])
+AT_WIXLDATA([ComponentGUID.wxs])
+AT_WIXLDATA([FoobarAppl10.exe])
+AT_WIXLDATA([Manual.pdf])
+AT_CHECK_WIXL([-o out.msi ComponentGUID.wxs], [0], [ignore], [ignore])
+# FIXME: add tons of tests on out.msi
+AT_CHECK([msiinfo export -s out.msi Component | sort | grep INSERT], [0],
+[INSERT INTO `Component` (`Component`, `ComponentId`, `Directory_`, `Attributes`, `KeyPath`) VALUES ('MainExecutable', '{8C320F7C-C521-5B19-A3C5-AF2B2ECEE71E}', 'INSTALLDIR', 0, 'FoobarEXE')
+INSERT INTO `Component` (`Component`, `ComponentId`, `Directory_`, `Attributes`, `KeyPath`) VALUES ('Manual', '{BAEE488E-70FF-566B-8A74-FE3107FDBDE2}', 'INSTALLDIR', 0, 'Manual')
+INSERT INTO `Component` (`Component`, `ComponentId`, `Directory_`, `Attributes`, `KeyPath`) VALUES ('ProgramMenuDir', '{F9F7F81C-5E64-5B7C-8018-FAF096969B88}', 'ProgramMenuDir', 4, 'reg5453B5C95074EA6F633E6D36318AFBF7')
+])
+AT_CLEANUP
+
AT_SETUP([WiX tutorial SampleFragment])
AT_WIXLDATA([SampleFragment.wxs])
AT_WIXLDATA([Manual.wxs])