Latest Posts

Topic: Changes to source in third_party?

RichHolton
Avatar
Joined: 2022-09-08, 20:44
Posts: 23
Ranking
Pry about Widelands
Location: Rockford, Illinois, USA
Posted at: 2022-10-03, 16:47

I've been investigating modifying the source code to allow Widelands on Windows to use directories and filenames that include characters beyond ASCII. Windows' NTFS uses utf-16 and has functions like _wfopen that require wchar_t strings.

The changes seem to be pretty straightforward. But I notice that lua, which is the heart of eris, is using the non _w* functions -- which means it is limited to ASCII filenames (or using the old codepage system, which has limitations and complications).

Is it acceptable to make changes to the source code in third_party? If not, is there a different mechanism that I should use? Once I work out the needed changes to the Widelands source, I'd like to create a branch so the changes can be integrated if and when deemed appropriate.


Rich Holton

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1728
OS: Ubuntu MATE 22.10
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2022-10-03, 17:24

In my opinion, for non-minor, non-Widelands-specific changes it would be better to implement the feature/bugfix upstream. So you could make a pull request at https://github.com/fnuecke/eris and we'd bump the Eris version we use after that is merged.

However Eris has seen its last commit three years ago, so an upstream patch might not be accepted, in which case we can then modify our copy of it instead.


Top Quote
RichHolton
Avatar
Joined: 2022-09-08, 20:44
Posts: 23
Ranking
Pry about Widelands
Location: Rockford, Illinois, USA
Posted at: 2022-10-04, 19:35

That's probably the correct way to do it. Of course, that means that I have to think about larger Lua/Eris issues that don't apply to our situation. But still, it's the way to go.


Rich Holton

Top Quote