aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/StudioIntegration
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2013-01-05 13:11:49 +0000
committerDean Camera <dean@fourwalledcubicle.com>2013-01-05 13:11:49 +0000
commitfbab86090290107b9aeeb75c6a60220c30140941 (patch)
tree62e4241f8693e2c83f263427cff4d78454884575 /LUFA/StudioIntegration
parent78e6e4f4c237123f97bbfcc2e8fc0fda01fc1bd8 (diff)
downloadlufa-fbab86090290107b9aeeb75c6a60220c30140941.tar.gz
lufa-fbab86090290107b9aeeb75c6a60220c30140941.tar.bz2
lufa-fbab86090290107b9aeeb75c6a60220c30140941.zip
Add transform to update the VSIX extension version automatically when built.
Diffstat (limited to 'LUFA/StudioIntegration')
-rw-r--r--LUFA/StudioIntegration/VSIX/extension.vsixmanifest4
-rw-r--r--LUFA/StudioIntegration/XSLT/lufa_vsmanifest_transform.xslt32
-rw-r--r--LUFA/StudioIntegration/makefile6
3 files changed, 37 insertions, 5 deletions
diff --git a/LUFA/StudioIntegration/VSIX/extension.vsixmanifest b/LUFA/StudioIntegration/VSIX/extension.vsixmanifest
index 0adf42656..0c5b00810 100644
--- a/LUFA/StudioIntegration/VSIX/extension.vsixmanifest
+++ b/LUFA/StudioIntegration/VSIX/extension.vsixmanifest
@@ -8,8 +8,8 @@
<MoreInfoUrl>http://www.lufa-lib.org</MoreInfoUrl>
<Description xml:space="preserve">LUFA USB Framework</Description>
- <Icon>LUFA\DoxygenPages\Images\LUFA_thumb.png</Icon>
- <PreviewImage>LUFA\DoxygenPages\Images\LUFA.png</PreviewImage>
+ <Icon>LUFA\DoxygenPages\Images\LUFA_thumb.png</Icon>
+ <PreviewImage>LUFA\DoxygenPages\Images\LUFA.png</PreviewImage>
<SupportedProducts>
<IsolatedShell Version="6.1">AtmelStudio</IsolatedShell>
diff --git a/LUFA/StudioIntegration/XSLT/lufa_vsmanifest_transform.xslt b/LUFA/StudioIntegration/XSLT/lufa_vsmanifest_transform.xslt
new file mode 100644
index 000000000..7f39b9e91
--- /dev/null
+++ b/LUFA/StudioIntegration/XSLT/lufa_vsmanifest_transform.xslt
@@ -0,0 +1,32 @@
+<!--
+ 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" xmlns:vs="http://schemas.microsoft.com/developer/vsx-schema/2010" version="1.0">
+ <xsl:output method="xml" omit-xml-declaration="yes"/>
+
+ <!-- Need to input the extension version for later use -->
+ <xsl:param name="extension-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 extension version to the version of LUFA being used -->
+ <xsl:template match="vs:Version">
+ <xsl:copy>
+ <xsl:value-of select="$extension-version"/>
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/LUFA/StudioIntegration/makefile b/LUFA/StudioIntegration/makefile
index 442e8fdeb..bcacde588 100644
--- a/LUFA/StudioIntegration/makefile
+++ b/LUFA/StudioIntegration/makefile
@@ -16,6 +16,7 @@ EXTENSION_OUTPUT_XML := $(LUFA_ROOT)/../extension.xml
MODULE_OUTPUT_XML := $(LUFA_ROOT)/asf.xml
XML_FILES := $(filter-out $(TEMP_MANIFEST_FILE), $(shell ls *.xml))
LUFA_VERSION_NUM := $(shell grep LUFA_VERSION_STRING $(LUFA_ROOT)/Version.h | cut -d'"' -f2)
+EXT_VERSION_NUM := $(shell date +"%y.%m.%d").$(LUFA_VERSION_NUM)
all: check_filenames generate_xml generate_vsix
@@ -45,10 +46,9 @@ generate_xml: $(TEMP_MANIFEST_XML)
@xsltproc XSLT/lufa_extension_transform.xslt $< | xsltproc XSLT/lufa_indent_transform.xslt - > $(EXTENSION_OUTPUT_XML)
@echo "Atmel Studio extension.xml file generated."
- @rm $(TEMP_MANIFEST_XML)
-
generate_vsix: $(EXTENSION_OUTPUT_XML) $(MODULE_OUTPUT_XML)
- cp VSIX/* $(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
cd $(LUFA_ROOT)/../; zip LUFA_AS_Extension.vsix -r --exclude=*StudioIntegration* *
check_filenames: $(TEMP_MANIFEST_XML)