Skip to content

Commit

Permalink
Allow passing multiple --config-include options
Browse files Browse the repository at this point in the history
  • Loading branch information
ZimM-LostPolygon committed Oct 3, 2023
1 parent 781cdeb commit afe985f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions dear_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,9 @@ def convert_header(
"(eg \"Imgui/\"). (default: blank)")
parser.add_argument('--config-include',
help="Path to additional .h file to read configuration defines from (i.e. the file you set "
"IMGUI_USER_CONFIG to, if any).")
"IMGUI_USER_CONFIG to, if any).",
default=[],
action='append')

if len(sys.argv) == 1:
parser.print_help(sys.stderr)
Expand All @@ -605,8 +607,8 @@ def convert_header(
config_include_files.append(os.path.join(os.path.dirname(os.path.realpath(args.src)), "imconfig.h"))

# Add any user-supplied config file as well
if args.config_include is not None:
config_include_files.append(os.path.realpath(args.config_include))
for config_include in args.config_include:
config_include_files.append(os.path.realpath(config_include))

# Perform conversion
try:
Expand All @@ -623,10 +625,9 @@ def convert_header(
args.imgui_include_dir
)
except: # noqa - suppress warning about broad exception clause as it's intentionally broad
raise
print("Exception during conversion:")
traceback.print_exc()
sys.exit(1)

print("Done")
sys.exit(0)
sys.exit(0)

0 comments on commit afe985f

Please sign in to comment.