From a560e2411c0fdacc5ef07ca5d08cf5c4e3ee4105 Mon Sep 17 00:00:00 2001 From: anders_k Date: Sat, 12 Jul 2014 11:08:37 +0000 Subject: [PATCH] !makensis on POSIX does not support -OUTPUTCHARSET git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6521 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/makenssi.cpp | 2 +- Source/script.cpp | 49 ++++++++++++++------------------------------- 2 files changed, 16 insertions(+), 35 deletions(-) diff --git a/Source/makenssi.cpp b/Source/makenssi.cpp index d7d393c2..7dd5026b 100644 --- a/Source/makenssi.cpp +++ b/Source/makenssi.cpp @@ -626,7 +626,7 @@ static inline int makensismain(int argc, TCHAR **argv) argpos++; } - if (argpos dr( new_dir_reader() ); dr->read(dir); - for (dir_reader::iterator files_itr = dr->files().begin(); files_itr != dr->files().end(); files_itr++) { - if (!dir_reader::matches(*files_itr, spec)) - continue; + if (!dir_reader::matches(*files_itr, spec)) continue; tstring incfile = basedir + *files_itr; - - if (includeScript(incfile.c_str(), enc) != PS_OK) { + if (includeScript(incfile.c_str(), enc) != PS_OK) return PS_ERROR; - } - - included++; + else + included++; } - - if (included) - return PS_OK; + if (included) return PS_OK; // search include dirs TCHAR *incdir = include_dirs.get(); int incdirs = include_dirs.getnum(); - for (int i = 0; i < incdirs; i++, incdir += _tcslen(incdir) + 1) { tstring curincdir = tstring(incdir) + PLATFORM_PATH_SEPARATOR_STR + dir; boost::scoped_ptr dr( new_dir_reader() ); dr->read(curincdir); - for (dir_reader::iterator incdir_itr = dr->files().begin(); incdir_itr != dr->files().end(); incdir_itr++) { - if (!dir_reader::matches(*incdir_itr, spec)) - continue; + if (!dir_reader::matches(*incdir_itr, spec)) continue; tstring incfile = tstring(incdir) + PLATFORM_PATH_SEPARATOR_STR + basedir + *incdir_itr; - - if (includeScript(incfile.c_str(), enc) != PS_OK) { + if (includeScript(incfile.c_str(), enc) != PS_OK) return PS_ERROR; - } - - included++; + else + included++; } - - if (included) - return PS_OK; - + if (included) return PS_OK; } // nothing found