aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/StudioIntegration/VSIX/generate_caches.py
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2013-04-14 10:31:43 +0000
committerDean Camera <dean@fourwalledcubicle.com>2013-04-14 10:31:43 +0000
commitf2d7f6f67485aab42f4be5d99e391e16beaed6f1 (patch)
treef7d81fc42655822ca7325d1850dd04cb017ada1e /LUFA/StudioIntegration/VSIX/generate_caches.py
parentf3a8263842ca30f10eff56353c1e78c1f9436f95 (diff)
downloadlufa-f2d7f6f67485aab42f4be5d99e391e16beaed6f1.tar.gz
lufa-f2d7f6f67485aab42f4be5d99e391e16beaed6f1.tar.bz2
lufa-f2d7f6f67485aab42f4be5d99e391e16beaed6f1.zip
Move XDK cache generation Python script into the VSIX related packing directory.
Diffstat (limited to 'LUFA/StudioIntegration/VSIX/generate_caches.py')
-rw-r--r--LUFA/StudioIntegration/VSIX/generate_caches.py38
1 files changed, 38 insertions, 0 deletions
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]))