Add HV1 integration into Atmel Studio (native Help).

pull/1469/head
Dean Camera 12 years ago
parent 2cd3f843e2
commit dd723813d9

@ -0,0 +1 @@
Copy the Microsoft HV1 Docbook transform contents into this directory (i.e. with the XSLT files in the current folder). The HV1 transform proposal can be found at http://sourceforge.net/tracker/?func=detail&aid=3610290&group_id=21935&atid=373750 .

@ -0,0 +1 @@
Copy the Docbook XSLT docbook-xsl-1.78.1 release contents into this directory (i.e. with the root Docbook files in the current folder). The Docbook releases can be found at http://sourceforge.net/projects/docbook/files/docbook-xsl/ .

@ -0,0 +1,19 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>LUFA Help</title>
</head>
<body class="vendor-book">
<div class="details">
<span class="vendor">FourWalledCubicle</span>
<span class="product">LUFA</span>
<span class="name">LUFA Help</span>
<span class="locale">en-us</span>
</div>
<div class="package-list">
<div class="package">
<span class="name">LUFA</span>
<a class="current-link" href="lufa_studio_help.mshc">lufa_studio_help.mshc</a>
</div>
</div>
</body>
</html>

@ -0,0 +1,54 @@
<!--
LUFA Library
Copyright (C) Dean Camera, 2013.
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
-->
<!-- Atmel Studio HV1 Setup XHTML transform file -->
<!-- Updates a helpcontentsetup.msha document to add appropriate version
information. -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml" version="1.0">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<!-- Need to input the LUFA 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:copy-of select="@*"/>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>
<!-- Update the LUFA version to the version passed as a parameter -->
<xsl:template match="xhtml:title | xhtml:div[@class='details']/xhtml:span[@class='name']">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:value-of select="."/>
<xsl:text> (</xsl:text>
<xsl:value-of select="$extension-version"/>
<xsl:text>)</xsl:text>
</xsl:copy>
</xsl:template>
<xsl:template match="xhtml:div[@class='package']/xhtml:a">
<xsl:copy>
<xsl:copy-of select="@class"/>
<xsl:attribute name="href">
<xsl:text>lufa_help_</xsl:text>
<xsl:value-of select="$extension-version"/>
<xsl:text>.mshc</xsl:text>
</xsl:attribute>
<xsl:text>lufa_help_</xsl:text>
<xsl:value-of select="$extension-version"/>
<xsl:text>.mshc</xsl:text>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>

@ -8,4 +8,6 @@
<Default Extension="dll" ContentType="application/octet-stream" />
<Default Extension="pkgdef" ContentType="text/plain" />
<Default Extension="htm" ContentType="text/html" />
<Default Extension="msha" ContentType="text/html" />
<Default Extension="mshc" ContentType="application/octet-stream"/>
</Types>

@ -27,6 +27,7 @@
<Content>
<VsPackage>LUFA.pkgdef</VsPackage>
<CustomExtension Type="GettingStarted">GettingStarted.htm</CustomExtension>
<CustomExtension Type="MSHelp">helpcontentsetup.msha</CustomExtension>
<CustomExtension Type="asf-manifest">asf-manifest.xml</CustomExtension>
</Content>
</Vsix>

@ -11,11 +11,23 @@
LUFA_ROOT := ..
LUFA_VERSION_NUM := $(shell grep LUFA_VERSION_STRING $(LUFA_ROOT)/Version.h | cut -d'"' -f2)
ifneq ($(LUFA_VERSION_NUM),000000)
EXT_VERSION_NUM := $(shell date +"%y.%m.%d").$(LUFA_VERSION_NUM)
EXT_VSIX_NAME := LUFA-RELEASE-$(LUFA_VERSION_NUM).vsix
else
EXT_VERSION_NUM := 0.$(shell date +"%y%m%d.%H%M%S")
EXT_VSIX_NAME := LUFA-TESTING-$(shell date +"%y.%m.%d-%H.%M.%S").vsix
$(warning No LUFA version set - assuming a test version should be created.)
endif
DOXYGEN_TAG_FILE_XML := $(LUFA_ROOT)/Documentation/lufa_doc_tags.xml
DOXYGEN_COMBINED_XML := $(LUFA_ROOT)/Documentation/xml/lufa_doc.xml
TEMP_MANIFEST_XML := manifest.xml
EXTENSION_OUTPUT_XML := $(LUFA_ROOT)/../extension.xml
MODULE_OUTPUT_XML := $(LUFA_ROOT)/asf.xml
MSHELP_OUTPUT_XML := $(LUFA_ROOT)/../lufa_help_$(EXT_VERSION_NUM).mshc
XML_FILES := $(filter-out $(TEMP_MANIFEST_FILE), $(shell ls *.xml))
VSIX_ASSETS := $(LUFA_ROOT)/DoxygenPages/Images/LUFA_thumb.png \
$(LUFA_ROOT)/DoxygenPages/Images/LUFA.png \
@ -29,21 +41,12 @@ VSIX_ASSETS := $(LUFA_ROOT)/DoxygenPages/Images/LUFA_thumb.png \
Blob/LUFA.dll \
Blob/LUFA.pkgdef
ifneq ($(LUFA_VERSION_NUM),000000)
EXT_VERSION_NUM := $(shell date +"%y.%m.%d").$(LUFA_VERSION_NUM)
EXT_VSIX_NAME := LUFA-RELEASE-$(LUFA_VERSION_NUM).vsix
else
EXT_VERSION_NUM := 0.$(shell date +"%y%m%d.%H%M%S")
EXT_VSIX_NAME := LUFA-TESTING-$(shell date +"%y.%m.%d-%H.%M.%S").vsix
$(warning No LUFA version set - assuming a test version should be created.)
endif
all: generate_xml check_filenames generate_vsix
clean:
@rm -f $(TEMP_MANIFEST_XML) $(MODULE_OUTPUT_XML) $(EXTENSION_OUTPUT_XML) $(DOXYGEN_TAG_FILE_XML) $(DOXYGEN_COMBINED_XML)
@cd $(LUFA_ROOT)/.. && rm -f contents.zip exampleProjects.xml content.xml.cache extension.vsixmanifest asf-manifest.xml extension.xml $(notdir $(VSIX_ASSETS)) LUFA-*.vsix
@rm -f $(TEMP_MANIFEST_XML) $(MODULE_OUTPUT_XML) $(EXTENSION_OUTPUT_XML) $(DOXYGEN_TAG_FILE_XML) $(DOXYGEN_COMBINED_XML) $(MSHELP_OUTPUT_XML)
@rm -rf mshelp
@cd $(LUFA_ROOT)/.. && rm -f contents.zip exampleProjects.xml content.xml.cache extension.vsixmanifest asf-manifest.xml extension.xml helpcontentsetup.msha $(notdir $(VSIX_ASSETS)) *.vsix *.mshc
$(DOXYGEN_TAG_FILE_XML):
@$(MAKE) -C ../ doxygen DOXYGEN_OVERRIDE_PARAMS="GENERATE_TAGFILE=Documentation/lufa_doc_tags.xml GENERATE_HTML=no GENERATE_XML=yes"
@ -72,26 +75,40 @@ $(EXTENSION_OUTPUT_XML): $(TEMP_MANIFEST_XML)
@xsltproc XDK/lufa_extension_transform.xslt $< | xsltproc XDK/lufa_indent_transform.xslt - > $(EXTENSION_OUTPUT_XML)
@echo "Atmel Studio extension.xml file generated."
$(MSHELP_OUTPUT_XML): $(DOXYGEN_COMBINED_XML)
@echo Converting Doxygen XML to Docbook...
@-mkdir mshelp 2> /dev/null
@xsltproc HV1/lufa_docbook_transform.xsl $(DOXYGEN_COMBINED_XML) > mshelp/lufa_docbook.xml
@cd mshelp && xsltproc ../Docbook/mshelp/docbook.xsl lufa_docbook.xml
@echo Copying help assets...
@-mkdir mshelp/images 2> /dev/null
@cp -r $(LUFA_ROOT)/DoxygenPages/Images/* mshelp/images
@echo Archiving help content...
@cd mshelp && zip ../$(MSHELP_OUTPUT_XML) -q -0 -r *.html images
generate_xml: $(EXTENSION_OUTPUT_XML) $(MODULE_OUTPUT_XML)
generate_vsix: $(EXTENSION_OUTPUT_XML) $(MODULE_OUTPUT_XML)
generate_vsix: $(EXTENSION_OUTPUT_XML) $(MODULE_OUTPUT_XML) $(MSHELP_OUTPUT_XML)
@echo "Generating ASF cache files..."
@rm -f $(LUFA_ROOT)/../content.xml.cache
@rm -f $(LUFA_ROOT)/../ExampleProjects.xml
@python VSIX/generate_caches.py $(LUFA_ROOT)/../
@echo "Archiving Content..."
@echo "Archiving ASF content..."
@rm -f contents.zip
@cd $(LUFA_ROOT)/../ && zip contents.zip -q -0 -r --exclude=*Documentation* --exclude=*StudioIntegration* LUFA Bootloaders Demos Projects README.txt
@echo "Creating VSIX Dependencies..."
@echo "Creating VSIX dependencies..."
@cp $(VSIX_ASSETS) $(LUFA_ROOT)/..
@xsltproc --stringparam extension-version "$(EXT_VERSION_NUM)" VSIX/lufa_vsmanifest_transform.xslt VSIX/extension.vsixmanifest > $(LUFA_ROOT)/../extension.vsixmanifest
@xsltproc --stringparam lufa-version "$(LUFA_VERSION_NUM)" VSIX/lufa_asfmanifest_transform.xslt VSIX/asf-manifest.xml > $(LUFA_ROOT)/../asf-manifest.xml
@xsltproc --stringparam extension-version "$(EXT_VERSION_NUM)" HV1/lufa_helpcontentsetup_transform.xslt HV1/helpcontentsetup.msha > $(LUFA_ROOT)/../helpcontentsetup.msha
@echo "Generating Atmel Studio VSIX Extension file..."
cd $(LUFA_ROOT)/../ && zip $(EXT_VSIX_NAME) -q -9 contents.zip exampleProjects.xml content.xml.cache extension.vsixmanifest asf-manifest.xml extension.xml $(notdir $(VSIX_ASSETS))
@echo "Generating Atmel Studio VSIX file..."
cd $(LUFA_ROOT)/../ && zip $(EXT_VSIX_NAME) -q -9 contents.zip exampleProjects.xml content.xml.cache extension.vsixmanifest asf-manifest.xml extension.xml helpcontentsetup.msha $(notdir $(MSHELP_OUTPUT_XML)) $(notdir $(VSIX_ASSETS))
@echo "Atmel Studio VSIX Extension file generated."
check_filenames: $(MODULE_OUTPUT_XML)
@ -111,4 +128,4 @@ check_filenames: $(MODULE_OUTPUT_XML)
sanity_check:
python ProjectGenerator/project_generator.py -b $(LUFA_ROOT)/../ --main-ext-uuid=0e160d5c-e331-48d9-850b-e0387912171b CHECK
.PHONY: all clean generate_xml generate_vsix check_filenames
.PHONY: all clean generate_xml generate_vsix check_filenames sanity_check

Loading…
Cancel
Save