Add ASF provider manifest file and adjust VSIX packing to compress the library contents.
authorDean Camera <dean@fourwalledcubicle.com>
Mon, 7 Jan 2013 20:39:25 +0000 (20:39 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Mon, 7 Jan 2013 20:39:25 +0000 (20:39 +0000)
LUFA/StudioIntegration/VSIX/[Content_Types].xml
LUFA/StudioIntegration/VSIX/asf-manifest.xml [new file with mode: 0644]
LUFA/StudioIntegration/VSIX/extension.vsixmanifest
LUFA/StudioIntegration/XSLT/lufa_asfmanifest_transform.xslt [new file with mode: 0644]
LUFA/StudioIntegration/makefile

index bb630d8..8a20e77 100644 (file)
@@ -1,22 +1,7 @@
 <Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">\r
   <Default Extension="vsixmanifest" ContentType="text/xml"/>\r
-\r
-  <Default Extension="jpg" ContentType="image/jpg"/>\r
   <Default Extension="png" ContentType="application/octet-stream"/>\r
-  <Default Extension="bmp" ContentType="application/octet-stream"/>\r
-\r
-  <Default Extension="c" ContentType="application/octet-stream"/>\r
-  <Default Extension="h" ContentType="application/octet-stream"/>\r
-  <Default Extension="S" ContentType="application/octet-stream"/>\r
-\r
   <Default Extension="txt" ContentType="text/plain"/>\r
-\r
-  <Default Extension="conf" ContentType="application/octet-stream"/>\r
-  <Default Extension="inf" ContentType="application/octet-stream"/>\r
-\r
   <Default Extension="xml" ContentType="text/xml"/>\r
-\r
-  <Default Extension="css" ContentType="application/octet-stream"/>\r
-  <Default Extension="html" ContentType="text/html"/>\r
-  <Default Extension="js" ContentType="application/octet-stream"/>\r
+  <Default Extension="zip" ContentType="application/octet-stream"/>\r
 </Types>\r
diff --git a/LUFA/StudioIntegration/VSIX/asf-manifest.xml b/LUFA/StudioIntegration/VSIX/asf-manifest.xml
new file mode 100644 (file)
index 0000000..511e743
--- /dev/null
@@ -0,0 +1,18 @@
+<AsfContentProvider Version="1.0.0">\r
+  <Identifier Id="0e160d5c-e331-48d9-850b-e0387912171b">\r
+    <Org>FourWalledCubicle</Org>\r
+    <ShortName>LUFA</ShortName>\r
+    <Author>Dean Camera</Author>\r
+    <Description></Description>\r
+    <FollowFolderStructure>True</FollowFolderStructure>\r
+  </Identifier>\r
+  <AsfContent Type="zip" Path="contents.zip">\r
+    <Content>\r
+      <Version></Version>\r
+      <HelpURL/>\r
+      <Locator/>\r
+      <DbXMLPath>content.xml.cache</DbXMLPath>\r
+      <Description/>\r
+    </Content>\r
+  </AsfContent>\r
+</AsfContentProvider>\r
index 8dd6de0..6be9f6a 100644 (file)
@@ -8,9 +8,9 @@
                <MoreInfoUrl>http://www.lufa-lib.org</MoreInfoUrl>\r
                <Description xml:space="preserve">LUFA USB Framework</Description>\r
 \r
-               <License>LUFA\License.txt</License>\r
-               <Icon>LUFA\DoxygenPages\Images\LUFA_thumb.png</Icon>\r
-               <PreviewImage>LUFA\DoxygenPages\Images\LUFA.png</PreviewImage>\r
+               <License>License.txt</License>\r
+               <Icon>PreviewThumb.png</Icon>\r
+               <PreviewImage>Preview.png</PreviewImage>\r
 \r
                <SupportedProducts>\r
                        <IsolatedShell Version="6.1">AtmelStudio</IsolatedShell>\r
 \r
                <SupportedFrameworkRuntimeEdition MinVersion="4.0" />\r
                <Locale>1033</Locale>\r
+\r
+           <AllUsers>true</AllUsers>\r
        </Identifier>\r
 \r
        <References/>\r
-       <Content/>\r
+\r
+       <Content>\r
+               <CustomExtension Type="asf-manifest">asf-manifest.xml</CustomExtension>\r
+       </Content>\r
 </Vsix>\r
diff --git a/LUFA/StudioIntegration/XSLT/lufa_asfmanifest_transform.xslt b/LUFA/StudioIntegration/XSLT/lufa_asfmanifest_transform.xslt
new file mode 100644 (file)
index 0000000..8cbb8af
--- /dev/null
@@ -0,0 +1,35 @@
+<!--
+             LUFA Library
+     Copyright (C) Dean Camera, 2013.
+
+  dean [at] fourwalledcubicle [dot] com
+           www.lufa-lib.org
+-->
+
+<!-- Atmel Studio framework VSIX XML transform file -->
+
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+       <xsl:output method="xml" omit-xml-declaration="yes"/>
+
+       <!-- Need to input the LUFA version for later use -->
+       <xsl:param name="lufa-version"/>
+
+       <!-- Recursively match and copy/process all nodes/attributes -->
+       <xsl:template match="@*|node()">
+               <xsl:copy>
+                       <xsl:apply-templates select="@*|node()"/>
+               </xsl:copy>
+       </xsl:template>
+
+       <!-- Update the LUFA version to the version passed as a parameter -->
+       <xsl:template match="Version">
+               <xsl:copy>
+                       <xsl:value-of select="substring($lufa-version, 1, 2)"/>
+                       <xsl:text>.</xsl:text>
+                       <xsl:value-of select="substring($lufa-version, 3, 2)"/>
+                       <xsl:text>.</xsl:text>
+                       <xsl:value-of select="substring($lufa-version, 5, 2)"/>
+               </xsl:copy>
+       </xsl:template>
+</xsl:stylesheet>
index 860b598..2e7ae56 100644 (file)
@@ -49,12 +49,19 @@ generate_xml: $(TEMP_MANIFEST_XML)
        @rm $(TEMP_MANIFEST_XML)
 
 generate_vsix: $(EXTENSION_OUTPUT_XML) $(MODULE_OUTPUT_XML)
+       @echo "Archiving Content..."
+       @cd $(LUFA_ROOT)/../ && zip contents.zip -q -9 -r --exclude=*$(notdir $(DOXYGEN_TAG_FILE_XML)) --exclude=*StudioIntegration* LUFA Bootloaders Demos Projects extension.xml README.txt
+
        @echo "Creating VSIX Dependencies..."
+       @cp $(LUFA_ROOT)/DoxygenPages/Images/LUFA_thumb.png $(LUFA_ROOT)/../PreviewThumb.png
+       @cp $(LUFA_ROOT)/DoxygenPages/Images/LUFA.png $(LUFA_ROOT)/../Preview.png
+       @cp $(LUFA_ROOT)/License.txt $(LUFA_ROOT)/../
        @cp "VSIX/[Content_Types].xml" $(LUFA_ROOT)/../
        @xsltproc --stringparam extension-version "$(EXT_VERSION_NUM)" XSLT/lufa_vsmanifest_transform.xslt VSIX/extension.vsixmanifest > $(LUFA_ROOT)/../extension.vsixmanifest
+       @xsltproc --stringparam lufa-version "$(LUFA_VERSION_NUM)" XSLT/lufa_asfmanifest_transform.xslt VSIX/asf-manifest.xml > $(LUFA_ROOT)/../asf-manifest.xml
 
        @echo "Generating Atmel Studio VSIX Extension file..."
-       @cd $(LUFA_ROOT)/../ && zip LUFA_AS_Extension.vsix -q -9 -r --exclude=*$(notdir $(DOXYGEN_TAG_FILE_XML)) --exclude=*StudioIntegration* *
+       @cd $(LUFA_ROOT)/../ && zip LUFA.vsix -q contents.zip License.txt Preview.png PreviewThumb.png "[Content_Types].xml" extension.vsixmanifest asf-manifest.xml extension.xml
        @echo "Atmel Studio VSIX Extension file generated."
 
 check_filenames: $(TEMP_MANIFEST_XML)