John just helped me to pin down the crash issue Scriptdaemon was experiencing in certain obscure situations of the INI file in OpenTTD Portable on Windows 7. Replacing the new, kernel32::GetPrivateProfileSection ForEachINIPair.nsh with the old, FileRead etc. ForEachINIPair.nsh stopped it from crashing. So I've gone back to the old ForEachINIPair macro plus a couple of extras which I should have had earlier to make it behave as expected, whitespace trimming and quotation mark parsing; this means that a line like `foo = " x"
` evaluated to `foo
` and ` " x"
` with the old ForEachINIPair macro, but with the new GetPrivateProfileSection one and my update to the old one (i.e. the current one in the repository and what will be in the next release), it'll be `foo
` and ` x
` as expected.
This means that launcher.ini can no longer be encoded in UTF-16LE, but I ahve yet to see a case where that will be necessary, anyway. At some point in the future I'll get round to making it capable of dealing with either (I'll refer back to Gringoloco's patch) but for the moment it's ASCII-only.
Now I'm happy to release a Release Candidate (but I'll wait for Simeon's . registry issue if he's quick).