From bda7dbdc0c1db910380eedc41c10ee2a25cdcd8f Mon Sep 17 00:00:00 2001 From: cxl Date: Sat, 10 Jan 2015 10:31:02 +0000 Subject: [PATCH] ide: bm macros replaced by header git-svn-id: svn://ultimatepp.org/upp/trunk@8030 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/CodeEditor/EditorBar.cpp | 2 +- uppsrc/ide/Builders/CppBuilder.cpp | 22 +++++++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/uppsrc/CodeEditor/EditorBar.cpp b/uppsrc/CodeEditor/EditorBar.cpp index 552223c89..2d51b1068 100644 --- a/uppsrc/CodeEditor/EditorBar.cpp +++ b/uppsrc/CodeEditor/EditorBar.cpp @@ -505,8 +505,8 @@ void EditorBar::Annotations(int width) EditorBar::EditorBar() { - LineNumbers(false); editor = NULL; + LineNumbers(false); bingenabled = true; hilite_if_endif = true; line_numbers = false; diff --git a/uppsrc/ide/Builders/CppBuilder.cpp b/uppsrc/ide/Builders/CppBuilder.cpp index 53464527b..ab8af6f07 100644 --- a/uppsrc/ide/Builders/CppBuilder.cpp +++ b/uppsrc/ide/Builders/CppBuilder.cpp @@ -451,6 +451,7 @@ String CppBuilder::Includes(const char *sep, const String& package, const Packag String cc; for(int i = 0; i < include.GetCount(); i++) cc << sep << GetHostPathQ(include[i]); + cc << sep << GetHostPathQ(outdir); return cc; } @@ -459,6 +460,7 @@ String CppBuilder::IncludesShort(const char *sep, const String& package, const P String cc; for(int i = 0; i < include.GetCount(); i++) cc << sep << GetHostPathShortQ(include[i]); + cc << sep << GetHostPathShortQ(outdir); return cc; } @@ -467,16 +469,22 @@ String CppBuilder::DefinesTargetTime(const char *sep, const String& package, con String cc; for(int i = 0; i < config.GetCount(); i++) cc << sep << "flag" << config[i]; - Time t = GetSysTime(); - cc << sep << "bmYEAR=" << (int)t.year; - cc << sep << "bmMONTH=" << (int)t.month; - cc << sep << "bmDAY=" << (int)t.day; - cc << sep << "bmHOUR=" << (int)t.hour; - cc << sep << "bmMINUTE=" << (int)t.minute; - cc << sep << "bmSECOND=" << (int)t.second; if(main_conf) cc << sep << "MAIN_CONF"; targettime = GetFileTime(target); + + FileOut info(AppendFileName(outdir, "build_info.h")); + 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"; return cc; }