2013-01-08 21:35:27 +01:00
|
|
|
"""
|
|
|
|
LUFA Library
|
|
|
|
Copyright (C) Dean Camera, 2013.
|
|
|
|
|
|
|
|
dean [at] fourwalledcubicle [dot] com
|
|
|
|
www.lufa-lib.org
|
|
|
|
"""
|
|
|
|
|
|
|
|
import sys
|
|
|
|
sys.path.append("ProjectGenerator")
|
|
|
|
|
2013-01-09 21:42:14 +01:00
|
|
|
|
2013-03-01 22:48:18 +01:00
|
|
|
def show_message(message):
|
|
|
|
print "[Project Generator] %s" % message
|
|
|
|
sys.stdout.flush()
|
|
|
|
|
|
|
|
|
|
|
|
def main(lufa_root_path):
|
2013-01-09 21:42:14 +01:00
|
|
|
try:
|
|
|
|
from asf_avrstudio5_interface import PythonFacade
|
|
|
|
except ImportError:
|
2013-01-10 21:08:31 +01:00
|
|
|
print "Fatal Error: The ASF project generator is missing."
|
2013-01-10 22:09:53 +01:00
|
|
|
return 1
|
2013-01-09 21:42:14 +01:00
|
|
|
|
2013-03-01 22:48:18 +01:00
|
|
|
p = PythonFacade(lufa_root_path)
|
2013-01-09 21:42:14 +01:00
|
|
|
|
2013-03-01 22:48:18 +01:00
|
|
|
show_message("Checking database sanity...")
|
|
|
|
p.check_extension_database_sanity(lufa_root_path)
|
2013-01-09 21:42:14 +01:00
|
|
|
|
2013-03-01 22:48:18 +01:00
|
|
|
show_message("Building cache files...")
|
|
|
|
p.generate_extension_cache_files(lufa_root_path)
|
2013-01-09 21:42:14 +01:00
|
|
|
|
2013-03-01 22:48:18 +01:00
|
|
|
show_message("Cache files created.")
|
2013-01-10 22:09:53 +01:00
|
|
|
return 0
|
2013-01-09 21:42:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2013-03-01 22:48:18 +01:00
|
|
|
sys.exit(main(sys.argv[1]))
|