Home | History | Annotate | Download | only in site_tools

Lines Matching full:path

19 the nanopb generator by a relative path. If this script is used in another
20 application, the path to nanopb root directory has to be defined:
22 env.SetDefault(NANOPB = "path/to/nanopb")
24 Additionally, the path to protoc and the options to give to protoc can be
27 env.SetDefault(PROTOC = "path/to/protoc")
28 env.SetDefault(PROTOCFLAGS = "--plugin=protoc-gen-nanopb=path/to/protoc-gen-nanopb")
34 import os.path
41 '''Find the path to nanopb root directory.'''
46 p = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
47 if os.path.isdir(p) and os.path.isfile(os.path.join(p, 'pb.h')):
55 '''Find the path to the protoc compiler.'''
61 p1 = os.path.join(n, 'generator-bin', 'protoc' + env['PROGSUFFIX'])
62 if os.path.exists(p1):
68 # Use protoc from path
81 p1 = os.path.join(n, 'generator-bin', 'protoc' + env['PROGSUFFIX'])
88 return e('--plugin=protoc-gen-nanopb=' + os.path.join(n, 'generator', 'protoc-gen-nanopb.bat'))
90 return e('--plugin=protoc-gen-nanopb=' + os.path.join(n, 'generator', 'protoc-gen-nanopb'))
98 basename = os.path.splitext(str(source[0]))[0]
101 if os.path.exists(basename + '.options'):
119 env.SetDefault(PROTOCPATH = ['.', os.path.join(env['NANOPB'], 'generator', 'proto')])