Add Python script and update VSIX generator rules to pre-generate the Atmel Studio cache files required to make the extension visible.

pull/1469/head
Dean Camera 12 years ago
parent 8e11439f91
commit 132de6ed22

@ -0,0 +1 @@
This module requires the ASF Project Generator to be extracted into this directory (i.e. with the Python scripts in the current folder). The project generator can be extracted from the release versions of Atmel Studio's ASF extension.

@ -1,5 +1,6 @@
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"> <Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
<Default Extension="vsixmanifest" ContentType="text/xml"/> <Default Extension="vsixmanifest" ContentType="text/xml"/>
<Default Extension="cache" ContentType="text/xml"/>
<Default Extension="png" ContentType="application/octet-stream"/> <Default Extension="png" ContentType="application/octet-stream"/>
<Default Extension="txt" ContentType="text/plain"/> <Default Extension="txt" ContentType="text/plain"/>
<Default Extension="xml" ContentType="text/xml"/> <Default Extension="xml" ContentType="text/xml"/>

@ -0,0 +1,20 @@
"""
LUFA Library
Copyright (C) Dean Camera, 2013.
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
"""
import sys
import os
sys.path.append("ProjectGenerator")
try:
from asf_avrstudio5_interface import PythonFacade
except ImportError:
print "The ASF project generator is missing."
p = PythonFacade(os.path.abspath(__file__))
p.check_extension_database_sanity(sys.argv[1])
p.generate_extension_cache_files(sys.argv[1])

@ -48,7 +48,12 @@ generate_xml: $(TEMP_MANIFEST_XML)
@rm $(TEMP_MANIFEST_XML) @rm $(TEMP_MANIFEST_XML)
generate_vsix: $(EXTENSION_OUTPUT_XML) $(MODULE_OUTPUT_XML) generate_caches: $(EXTENSION_OUTPUT_XML)
@echo "Generating ASF cache files..."
@python generate_caches.py $(LUFA_ROOT)/../
@echo "ASF cache files generated."
generate_vsix: $(EXTENSION_OUTPUT_XML) $(MODULE_OUTPUT_XML) generate_caches
@echo "Archiving Content..." @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 @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
@ -61,7 +66,7 @@ generate_vsix: $(EXTENSION_OUTPUT_XML) $(MODULE_OUTPUT_XML)
@xsltproc --stringparam lufa-version "$(LUFA_VERSION_NUM)" XSLT/lufa_asfmanifest_transform.xslt VSIX/asf-manifest.xml > $(LUFA_ROOT)/../asf-manifest.xml @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..." @echo "Generating Atmel Studio VSIX Extension file..."
@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 @cd $(LUFA_ROOT)/../ && zip LUFA.vsix -q contents.zip exampleProjects.xml content.xml.cache License.txt Preview.png PreviewThumb.png "[Content_Types].xml" extension.vsixmanifest asf-manifest.xml extension.xml
@echo "Atmel Studio VSIX Extension file generated." @echo "Atmel Studio VSIX Extension file generated."
check_filenames: $(TEMP_MANIFEST_XML) check_filenames: $(TEMP_MANIFEST_XML)
@ -71,4 +76,4 @@ check_filenames: $(TEMP_MANIFEST_XML)
fi; \ fi; \
done; done;
.PHONY: all clean generate_xml generate_vsix check_filenames .PHONY: all clean generate_xml check_filenames generate_caches generate_vsix
Loading…
Cancel
Save