Closed LesNewell-SheetCam closed 4 years ago
What git settings do you have for core.autocrlf
and core.eol
? I'll check the file encoding and correct it, but you should be able to run genwxbind if you set core.eol
to lf
for this repository.
This is for my own override file, not a wxLua one. It shouldn't have been crlf so it took me quite a while to figure out what was going on.
@sheetcam, can you try the following patch:
diff --git a/wxLua/bindings/genwxbind.lua b/wxLua/bindings/genwxbind.lua
index 639df5d..ccc641a 100644
--- a/wxLua/bindings/genwxbind.lua
+++ b/wxLua/bindings/genwxbind.lua
@@ -1461,6 +1461,7 @@ function ReadOverrideFile(override_file)
end
for line in io.lines(filename) do
+ line = line:gsub("%s+$","") -- drop all trailing whitespaces not handled by io.lines
local lineData = SplitString(line, delimiters)
local isOverride = false
local isEnd = false
@@ -1545,6 +1546,7 @@ function ReadInterfaceFile(filename)
local linenumber = 0
for line in io.lines(filename) do
+ line = line:gsub("%s+$","") -- drop all trailing whitespaces not handled by io.lines
linenumber = linenumber + 1
local lineTable =
Yup, that appears to fix the problem. Thanks.
In Linux, If an override file uses Windows CR/LF line endings genwxbind fails with a lot of errors: ERROR: Expected %end. File: ./override.hpp