From f2d7f6f67485aab42f4be5d99e391e16beaed6f1 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 14 Apr 2013 10:31:43 +0000 Subject: Move XDK cache generation Python script into the VSIX related packing directory. --- LUFA/StudioIntegration/VSIX/generate_caches.py | 38 ++++++++++++++++++++++++++ LUFA/StudioIntegration/generate_caches.py | 38 -------------------------- LUFA/StudioIntegration/makefile | 2 +- 3 files changed, 39 insertions(+), 39 deletions(-) create mode 100644 LUFA/StudioIntegration/VSIX/generate_caches.py delete mode 100644 LUFA/StudioIntegration/generate_caches.py (limited to 'LUFA') diff --git a/LUFA/StudioIntegration/VSIX/generate_caches.py b/LUFA/StudioIntegration/VSIX/generate_caches.py new file mode 100644 index 000000000..f5b6692a9 --- /dev/null +++ b/LUFA/StudioIntegration/VSIX/generate_caches.py @@ -0,0 +1,38 @@ +""" + LUFA Library + Copyright (C) Dean Camera, 2013. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +""" + +import sys +sys.path.append("ProjectGenerator") + + +def show_message(message): + print "[Project Generator] %s" % message + sys.stdout.flush() + + +def main(lufa_root_path): + try: + from asf_avrstudio5_interface import PythonFacade + except ImportError: + print "Fatal Error: The ASF project generator is missing." + return 1 + + p = PythonFacade(lufa_root_path) + + show_message("Checking database sanity...") + p.check_extension_database_sanity(lufa_root_path) + + show_message("Building cache files...") + p.generate_extension_cache_files(lufa_root_path) + + show_message("Cache files created.") + return 0 + + +if __name__ == "__main__": + sys.exit(main(sys.argv[1])) diff --git a/LUFA/StudioIntegration/generate_caches.py b/LUFA/StudioIntegration/generate_caches.py deleted file mode 100644 index f5b6692a9..000000000 --- a/LUFA/StudioIntegration/generate_caches.py +++ /dev/null @@ -1,38 +0,0 @@ -""" - LUFA Library - Copyright (C) Dean Camera, 2013. - - dean [at] fourwalledcubicle [dot] com - www.lufa-lib.org -""" - -import sys -sys.path.append("ProjectGenerator") - - -def show_message(message): - print "[Project Generator] %s" % message - sys.stdout.flush() - - -def main(lufa_root_path): - try: - from asf_avrstudio5_interface import PythonFacade - except ImportError: - print "Fatal Error: The ASF project generator is missing." - return 1 - - p = PythonFacade(lufa_root_path) - - show_message("Checking database sanity...") - p.check_extension_database_sanity(lufa_root_path) - - show_message("Building cache files...") - p.generate_extension_cache_files(lufa_root_path) - - show_message("Cache files created.") - return 0 - - -if __name__ == "__main__": - sys.exit(main(sys.argv[1])) diff --git a/LUFA/StudioIntegration/makefile b/LUFA/StudioIntegration/makefile index 87adfc2af..555563dd4 100644 --- a/LUFA/StudioIntegration/makefile +++ b/LUFA/StudioIntegration/makefile @@ -68,7 +68,7 @@ generate_vsix: $(EXTENSION_OUTPUT_XML) $(MODULE_OUTPUT_XML) @echo "Generating ASF cache files..." @rm -f $(LUFA_ROOT)/../content.xml.cache @rm -f $(LUFA_ROOT)/../ExampleProjects.xml - @python generate_caches.py $(LUFA_ROOT)/../ + @python VSIX/generate_caches.py $(LUFA_ROOT)/../ @echo "Archiving Content..." @rm -f contents.zip -- cgit v1.2.3