diff --git a/tools/gir2pascal/gir2pascal.lpr b/tools/gir2pascal/gir2pascal.lpr index 1a519c1b6f..21b38b3dab 100644 --- a/tools/gir2pascal/gir2pascal.lpr +++ b/tools/gir2pascal/gir2pascal.lpr @@ -258,6 +258,12 @@ begin Halt; end; + FFileToConvert:=FCmdOptions.OptionValue('input'); + AddPaths(ExtractFilePath(FFileToConvert)); + + if FCmdOptions.HasOption('paths') then + AddPaths(FCmdOptions.OptionValue('paths')); + if not FCmdOptions.HasOption('no-default') then AddDefaultPaths; @@ -266,15 +272,9 @@ begin else FOutPutDirectory:=IncludeTrailingPathDelimiter(GetCurrentDir); - FFileToConvert:=FCmdOptions.OptionValue('input'); - AddPaths(ExtractFilePath(FFileToConvert)); - if FCmdOptions.HasOption('unit-prefix') then FUnitPrefix := FCmdOptions.OptionValue('unit-prefix'); - if FCmdOptions.HasOption('paths') then - AddPaths(FCmdOptions.OptionValue('paths')); - if FCmdOptions.HasOption('overwrite-files') then FOverWriteFiles:=True;