diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2013-01-15 16:21:22 +0100 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2013-01-15 20:05:56 +0100 |
commit | 58f5bf41354155490a405fcd1276e2a1ce0828f4 (patch) | |
tree | 3a940d43ed47fdf16fd34878570115a034426736 /tools/wixl/msi.vala | |
parent | 8c0528a7338d860dd7bb025b154f3dd9798201ae (diff) | |
download | msitools-58f5bf41354155490a405fcd1276e2a1ce0828f4.tar.gz msitools-58f5bf41354155490a405fcd1276e2a1ce0828f4.tar.xz msitools-58f5bf41354155490a405fcd1276e2a1ce0828f4.zip |
wixl: add support for registry key parent, name and value
<DirectoryRef Id="TARGETDIR">
<Component Id="CRegistryEntries" Guid="*">
<RegistryKey Root='HKLM' Key='Software\Acme\Foobar 1.0'>
<RegistryValue Type='string' Name='InstallDir' Value='[INSTALLDIR]'/>
<RegistryValue Type='integer' Name='Flag' Value='0'/>
</RegistryKey>
</Component>
</DirectoryRef>
Diffstat (limited to 'tools/wixl/msi.vala')
-rw-r--r-- | tools/wixl/msi.vala | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/wixl/msi.vala b/tools/wixl/msi.vala index b847720..10bdccd 100644 --- a/tools/wixl/msi.vala +++ b/tools/wixl/msi.vala @@ -378,15 +378,17 @@ namespace Wixl { static construct { name = "Registry"; sql_create = "CREATE TABLE `Registry` (`Registry` CHAR(72) NOT NULL, `Root` INT NOT NULL, `Key` CHAR(255) NOT NULL LOCALIZABLE, `Name` CHAR(255) LOCALIZABLE, `Value` CHAR(0) LOCALIZABLE, `Component_` CHAR(72) NOT NULL PRIMARY KEY `Registry`)"; - sql_insert = "INSERT INTO `Registry` (`Registry`, `Root`, `Key`, `Component_`) VALUES (?, ?, ?, ?)"; + sql_insert = "INSERT INTO `Registry` (`Registry`, `Root`, `Key`, `Component_`, `Name`, `Value`) VALUES (?, ?, ?, ?, ?, ?)"; } - public void add (string Registry, int Root, string Key, string Component) throws GLib.Error { - var rec = new Libmsi.Record (4); + public void add (string Registry, int Root, string Key, string Component, string? Name, string? Value) throws GLib.Error { + var rec = new Libmsi.Record (6); if (!rec.set_string (1, Registry) || !rec.set_int (2, Root) || !rec.set_string (3, Key) || - !rec.set_string (4, Component)) + !rec.set_string (4, Component) || + (Name != null && !rec.set_string (5, Name)) || + (Value != null && !rec.set_string (6, Value))) throw new Wixl.Error.FAILED ("failed to add record"); records.append (rec); |