aboutsummaryrefslogtreecommitdiffstats
path: root/lib/lufa/LUFA/StudioIntegration/VSIX/generate_caches.py
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2017-07-07 11:55:23 -0400
committerJack Humbert <jack.humb@gmail.com>2017-07-07 11:55:23 -0400
commit8655d4f4948b2deef7844503c8d690f23ac1a062 (patch)
treeb2c6effc9d6cd5b5b43933a1e53b8bf17e9e82cf /lib/lufa/LUFA/StudioIntegration/VSIX/generate_caches.py
parent1896c76a2928c96f9ab7947bec2ef8dd37623cff (diff)
parent60b30c036397cb5627fa374bb930794b225daa29 (diff)
downloadfirmware-8655d4f4948b2deef7844503c8d690f23ac1a062.tar.gz
firmware-8655d4f4948b2deef7844503c8d690f23ac1a062.tar.bz2
firmware-8655d4f4948b2deef7844503c8d690f23ac1a062.zip
Merge commit '60b30c036397cb5627fa374bb930794b225daa29' as 'lib/lufa'
Diffstat (limited to 'lib/lufa/LUFA/StudioIntegration/VSIX/generate_caches.py')
-rw-r--r--lib/lufa/LUFA/StudioIntegration/VSIX/generate_caches.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/lib/lufa/LUFA/StudioIntegration/VSIX/generate_caches.py b/lib/lufa/LUFA/StudioIntegration/VSIX/generate_caches.py
new file mode 100644
index 000000000..ab787e8ec
--- /dev/null
+++ b/lib/lufa/LUFA/StudioIntegration/VSIX/generate_caches.py
@@ -0,0 +1,38 @@
+"""
+ LUFA Library
+ Copyright (C) Dean Camera, 2017.
+
+ 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]))