Home » U++ TheIDE » U++ TheIDE: Installation, Compiling and Running of theide » build_info.h last line not terminated
build_info.h last line not terminated [message #51918] |
Thu, 20 June 2019 13:59 |
|
Alboni
Messages: 214 Registered: January 2012 Location: Deventer, Netherlands
|
Experienced Member |
|
|
UPP version 13389 + Visual C++ 19 + windows 7
Issue:
The last line of build_info.h doesn't always end with \r\n
This gives compiling issues when using it in certain tools like windows resource compiler.
The working fix I applied to TheIde
void CppBuilder::SaveBuildInfo(const String& package)
{
String path = AppendFileName(outdir, "build_info.h");
RealizePath(path);
FileOut info(path);
Time t = GetSysTime();
info << "#define bmYEAR " << (int)t.year << "\r\n";
info << "#define bmMONTH " << (int)t.month << "\r\n";
info << "#define bmDAY " << (int)t.day << "\r\n";
info << "#define bmHOUR " << (int)t.hour << "\r\n";
info << "#define bmMINUTE " << (int)t.minute << "\r\n";
info << "#define bmSECOND " << (int)t.second << "\r\n";
info << Format("#define bmTIME Time(%d, %d, %d, %d, %d, %d)\r\n",
(int)t.year, (int)t.month, (int)t.day, (int)t.hour, (int)t.minute, (int)t.second);
info << "#define bmMACHINE " << AsCString(GetComputerName()) << "\r\n";
info << "#define bmUSER " << AsCString(GetUserName()) << "\r\n";
if(package == mainpackage)
info << Join(SvnInfo(package), "\r\n") << "\r\n";
}
Note: I added after info << Join(SvnInfo(package), "\r\n")
[Updated on: Thu, 20 June 2019 14:35] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri Apr 26 00:32:27 CEST 2024
Total time taken to generate the page: 5.95519 seconds
|