]> git.donarmstrong.com Git - qmk_firmware.git/blob - LUFA/StudioIntegration/VSIX/generate_caches.py
ab787e8ec3a40f3b04d087c215b659a66a69e454
[qmk_firmware.git] / LUFA / StudioIntegration / VSIX / generate_caches.py
1 """\r
2              LUFA Library\r
3      Copyright (C) Dean Camera, 2017.\r
4 \r
5   dean [at] fourwalledcubicle [dot] com\r
6            www.lufa-lib.org\r
7 """\r
8 \r
9 import sys\r
10 sys.path.append("ProjectGenerator")\r
11 \r
12 \r
13 def show_message(message):\r
14     print("[Project Generator] %s" % message)\r
15     sys.stdout.flush()\r
16 \r
17 \r
18 def main(lufa_root_path):\r
19     try:\r
20         from asf_avrstudio5_interface import PythonFacade\r
21     except ImportError:\r
22         print("Fatal Error: The ASF project generator is missing.")\r
23         return 1\r
24 \r
25     p = PythonFacade(lufa_root_path)\r
26 \r
27     show_message("Checking database sanity...")\r
28     p.check_extension_database_sanity(lufa_root_path)\r
29 \r
30     show_message("Building cache files...")\r
31     p.generate_extension_cache_files(lufa_root_path)\r
32 \r
33     show_message("Cache files created.")\r
34     return 0\r
35 \r
36 \r
37 if __name__ == "__main__":\r
38     sys.exit(main(sys.argv[1]))\r