Support ISO/IEC 19770-2:2105 (aka SWID Tags-2) #292

Merged
merged 0 commits into from Aug 25, 2015

Projects

None yet

3 participants

@firegiantco

No description provided.

@barnson barnson commented on an outdated diff Aug 25, 2015
src/burn/engine/registration.h
@@ -87,7 +87,8 @@ typedef struct _BURN_SOFTWARE_TAG
{
LPWSTR sczFilename;
LPWSTR sczRegid;
- LPSTR sczTag;
+ LPWSTR sczPath;
@barnson
barnson Aug 25, 2015 Member

Tabs? Tell me it ain't so...

@barnson barnson commented on an outdated diff Aug 25, 2015
src/ext/TagExtension/wixext/TagBinder.cs
string productName = null;
Version productVersion = null;
string manufacturer = null;
+ string upgradeCode = null;
+
+ Table summaryInformationTable = output.Tables["_SummaryInformation"];
+ foreach (Row summaryInformationRow in summaryInformationTable.Rows)
+ {
+ switch ((int)summaryInformationRow[0])
+ {
+ case 9: // PID_REVNUMBER
+ packageCode = (string)summaryInformationRow[1];
+ break;
@barnson
barnson Aug 25, 2015 Member

Early exit would be nice.

@barnson barnson commented on an outdated diff Aug 25, 2015
src/ext/TagExtension/wixext/TagCompiler.cs
string shortName = this.Core.GenerateShortName(fileName, false, false);
- this.Core.CreateWixSimpleReferenceRow(sourceLineNumbers, "Directory", directoryId);
+ Console.WriteLine("foo");
@barnson barnson commented on the diff Aug 25, 2015
src/ext/TagExtension/wixext/Xsd/tag.xsd
</xs:annotation>
</xs:attribute>
- <xs:attribute name="Type" type="TagTypeUnion">
@barnson
barnson Aug 25, 2015 Member

Why leave Licensed but remove Type?

@firegiantco
firegiantco Aug 25, 2015

Type is still present. Its type was changed to string (to be allowed to remove the union) and marked deprecated. Just like Licensed.

@barnson barnson commented on an outdated diff Aug 25, 2015
src/ext/TagExtension/wixext/Xsd/tag.xsd
@@ -91,58 +108,14 @@
<xs:attribute name="Regid" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
- The regid for the software id tag. A regid follows the format: "regid" + "."
- + YYYY-MM + "." + reverse domain order. The YYYY-MM is the year and month the
- domain was first owned. For example: "regid.1995-08.com.example".
+ The regid for the software manufacturer. A regid is a URI simplified for the common
+ case. Namely, if the scheme is "http://", it can be removed. Additionally, the domain
+ should be minimized as much as possible (for example, remove "www." prefix if unnecessary).
+
+ For example, the WiX toolset regid is "wixtoolset.org".
@barnson
barnson Aug 25, 2015 Member

Would that it were...

@barnson barnson and 1 other commented on an outdated diff Aug 25, 2015
src/ext/TagExtension/wixlib/TagFolder.wxs
@@ -9,15 +9,8 @@
-->
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
- <Property Id="ProductRegid" Value="!(wix.WixTagRegid=InvalidRegid)" />
-
- <DirectoryRef Id="TARGETDIR">
- <Directory Id="WixTagFolder" Name="swidtags" ComponentGuidGenerationSeed="0F673797-85FC-49D8-A0D8-B5C81C7C9CDC">
- <Directory Id="WixTagRegidFolder" Name="!(wix.WixTagRegid=InvalidRegid)" />
- </Directory>
+ <DirectoryRef Id="WixTagInstallFolder">
+ <Directory Id="WixTagFolder" Name="swidtag" ComponentGuidGenerationSeed="0F673797-85FC-49D8-A0D8-B5C81C7C9CDC" />
@barnson
barnson Aug 25, 2015 Member

Do we care it's the same as the v1 tag uniqification guid?

@firegiantco
firegiantco Aug 25, 2015

Better safe than sorry, we'll change it.

@jchoover jchoover commented on the diff Aug 25, 2015
src/libs/dutil/dirutil.cpp
@@ -349,6 +349,37 @@ extern "C" HRESULT DAPI DirEnsureDeleteEx(
/*******************************************************************
+DirDeleteEmptyDirectoriesToRoot - removes an empty directory and as many
+ of its parents as possible.
+
+ Returns: count of directories deleted.
+*******************************************************************/
+extern "C" DWORD DAPI DirDeleteEmptyDirectoriesToRoot(
+ __in_z LPCWSTR wzPath,
+ __in DWORD /*dwFlags*/
+ )
+{
+ DWORD cDeletedDirs = 0;
+ LPWSTR sczPath = NULL;
+
+ while (wzPath && *wzPath && ::RemoveDirectoryW(wzPath))
@jchoover
jchoover Aug 25, 2015 Contributor

Does it make since to at least log result from GetLastError if RemoveDirectoryFails for any error other than an expected error?

https://msdn.microsoft.com/en-us/library/windows/desktop/aa365488(v=vs.85).aspx

I see info about ReadOnly directoriey attributes, as well as crazyness with junction points/ sym links.

@barnson barnson merged commit c535cc8 into wixtoolset:develop Aug 25, 2015
@robmen robmen deleted the firegiant:4867-swidtag2 branch Aug 26, 2015
@wixbot wixbot referenced this pull request in wixtoolset/issues Dec 20, 2015
Closed

Support ISO/IEC 19770-2:2105 (aka SWID Tags-2) #4867

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment