scons DEBUG=true adds DEBUG to CPPDEFINES
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6497 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
5837f4397b
commit
a81d5dfb49
4 changed files with 14 additions and 4 deletions
|
@ -201,13 +201,15 @@ Help(opts.GenerateHelpText(defenv))
|
||||||
if defenv['TARGET_ARCH'] != 'x86':
|
if defenv['TARGET_ARCH'] != 'x86':
|
||||||
defenv['UNICODE'] = True
|
defenv['UNICODE'] = True
|
||||||
|
|
||||||
|
if defenv['DEBUG']:
|
||||||
|
defenv.Append(CPPDEFINES = ['DEBUG'])
|
||||||
|
|
||||||
# add prefixes defines
|
# add prefixes defines
|
||||||
if 'NSIS_CONFIG_CONST_DATA_PATH' in defenv['NSIS_CPPDEFINES']:
|
if 'NSIS_CONFIG_CONST_DATA_PATH' in defenv['NSIS_CPPDEFINES']:
|
||||||
defenv.Append(NSIS_CPPDEFINES = [('PREFIX_CONF', '"%s"' % defenv.subst('$PREFIX_CONF'))])
|
defenv.Append(NSIS_CPPDEFINES = [('PREFIX_CONF', '"%s"' % defenv.subst('$PREFIX_CONF'))])
|
||||||
defenv.Append(NSIS_CPPDEFINES = [('PREFIX_DATA', '"%s"' % defenv.subst('$PREFIX_DATA'))])
|
defenv.Append(NSIS_CPPDEFINES = [('PREFIX_DATA', '"%s"' % defenv.subst('$PREFIX_DATA'))])
|
||||||
|
|
||||||
# Need this early for the config header files to be placed in
|
# Need this early for the config header files to be placed in
|
||||||
|
|
||||||
if defenv['UNICODE']:
|
if defenv['UNICODE']:
|
||||||
if defenv['DEBUG']:
|
if defenv['DEBUG']:
|
||||||
defenv.Replace(BUILD_PREFIX = 'build/udebug')
|
defenv.Replace(BUILD_PREFIX = 'build/udebug')
|
||||||
|
|
|
@ -740,7 +740,10 @@ int CEXEBuild::datablock_optimize(int start_offset, int first_int)
|
||||||
if (!this->build_optimize_datablock || this_len < (int) sizeof(int))
|
if (!this->build_optimize_datablock || this_len < (int) sizeof(int))
|
||||||
return start_offset;
|
return start_offset;
|
||||||
|
|
||||||
MMapBuf *db = (MMapBuf *) cur_datablock;
|
#ifdef DEBUG
|
||||||
|
assert(dynamic_cast<MMapBuf*>(cur_datablock));
|
||||||
|
#endif
|
||||||
|
MMapBuf *db = static_cast<MMapBuf*>(cur_datablock);
|
||||||
db->setro(TRUE);
|
db->setro(TRUE);
|
||||||
|
|
||||||
cached_db_size *db_sizes = (cached_db_size *) this->cur_datablock_cache->get();
|
cached_db_size *db_sizes = (cached_db_size *) this->cur_datablock_cache->get();
|
||||||
|
@ -788,7 +791,10 @@ bool CEXEBuild::datablock_finddata(IMMap&mmap, int mmstart, int size, int*ofs)
|
||||||
{
|
{
|
||||||
const int first_int = size;
|
const int first_int = size;
|
||||||
size &= ~ 0x80000000;
|
size &= ~ 0x80000000;
|
||||||
MMapBuf *db = (MMapBuf *) cur_datablock;
|
#ifdef DEBUG
|
||||||
|
assert(dynamic_cast<MMapBuf*>(cur_datablock));
|
||||||
|
#endif
|
||||||
|
MMapBuf *db = static_cast<MMapBuf*>(cur_datablock);
|
||||||
cached_db_size *db_sizes = (cached_db_size *) this->cur_datablock_cache->get();
|
cached_db_size *db_sizes = (cached_db_size *) this->cur_datablock_cache->get();
|
||||||
int db_sizes_num = this->cur_datablock_cache->getlen() / sizeof(cached_db_size);
|
int db_sizes_num = this->cur_datablock_cache->getlen() / sizeof(cached_db_size);
|
||||||
for (int i = 0; i < db_sizes_num; i++)
|
for (int i = 0; i < db_sizes_num; i++)
|
||||||
|
|
|
@ -372,7 +372,7 @@ void NSISCALL CleanUp()
|
||||||
// Clean up after plug-ins
|
// Clean up after plug-ins
|
||||||
myDelete(state_plugins_dir, DEL_DIR | DEL_RECURSE | DEL_REBOOT);
|
myDelete(state_plugins_dir, DEL_DIR | DEL_RECURSE | DEL_REBOOT);
|
||||||
#endif // NSIS_CONFIG_PLUGIN_SUPPORT
|
#endif // NSIS_CONFIG_PLUGIN_SUPPORT
|
||||||
#ifdef _DEBUG
|
#ifdef DEBUG
|
||||||
// GlobalFree(g_header); ?
|
// GlobalFree(g_header); ?
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -303,8 +303,10 @@ static inline int makensismain(int argc, TCHAR **argv)
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
signed char outputbom=1;
|
signed char outputbom=1;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
assert(CP_ACP == outputenc.GetCodepage()); // Required by CEXEBuild::notify() char* legacy handling.
|
assert(CP_ACP == outputenc.GetCodepage()); // Required by CEXEBuild::notify() char* legacy handling.
|
||||||
#endif
|
#endif
|
||||||
|
#endif //~ _WIN32
|
||||||
|
|
||||||
// Some parameters have to be parsed early so we can initialize stdout and the "host API".
|
// Some parameters have to be parsed early so we can initialize stdout and the "host API".
|
||||||
while (++argpos < argc && !initialparsefail)
|
while (++argpos < argc && !initialparsefail)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue