fixed bug #1434215 - #define local leaks into path settings
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4539 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
5812fa78d2
commit
aaef4e35eb
3 changed files with 7 additions and 6 deletions
|
@ -142,6 +142,11 @@ Help(opts.GenerateHelpText(defenv))
|
|||
# build configuration
|
||||
SConscript('SCons/config.py')
|
||||
|
||||
# add prefixes defines
|
||||
if defenv['PLATFORM'] != 'win32':
|
||||
defenv.Append(NSIS_CPPDEFINES = [('PREFIX_CONF', '"%s"' % defenv['PREFIX_CONF'])])
|
||||
defenv.Append(NSIS_CPPDEFINES = [('PREFIX_DATA', '"%s"' % defenv['PREFIX_DATA'])])
|
||||
|
||||
# write configuration into sconf.h
|
||||
f = open(File('#Source/exehead/sconf.h').abspath, 'w')
|
||||
for i in defenv['NSIS_CPPDEFINES']:
|
||||
|
@ -172,10 +177,6 @@ defenv.Execute(Delete('$ZIPDISTDIR'))
|
|||
defenv.Execute(Delete('$INSTDISTDIR'))
|
||||
defenv.Execute(Delete('$TESTDISTDIR'))
|
||||
|
||||
if defenv['PLATFORM'] != 'win32':
|
||||
defenv.Append(NSIS_CPPDEFINES = [('PREFIX_CONF', defenv['PREFIX_CONF'])])
|
||||
defenv.Append(NSIS_CPPDEFINES = [('PREFIX_DATA', defenv['PREFIX_DATA'])])
|
||||
|
||||
def Distribute(files, names, component, path, subpath, alias, install_alias=None):
|
||||
if isinstance(files, (str, type(File('SConstruct')))):
|
||||
files = [files]
|
||||
|
|
|
@ -482,7 +482,7 @@ void CEXEBuild::initialize(const char *makensis_path)
|
|||
#ifndef NSIS_CONFIG_CONST_DATA_PATH
|
||||
nsis_dir = get_executable_dir(makensis_path);
|
||||
#else
|
||||
nsis_dir = CONST_STR(PREFIX_DATA);
|
||||
nsis_dir = PREFIX_DATA;
|
||||
#endif
|
||||
}
|
||||
definedlist.add("NSISDIR", nsis_dir.c_str());
|
||||
|
|
|
@ -398,7 +398,7 @@ int main(int argc, char **argv)
|
|||
#ifndef NSIS_CONFIG_CONST_DATA_PATH
|
||||
main_conf = get_executable_dir(argv[0]);
|
||||
#else
|
||||
main_conf = CONST_STR(PREFIX_CONF);
|
||||
main_conf = PREFIX_CONF;
|
||||
#endif
|
||||
else main_conf = env_var;
|
||||
main_conf += PLATFORM_PATH_SEPARATOR_STR;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue