!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
This commit is contained in:
parent
89a2cbb770
commit
a560e2411c
2 changed files with 16 additions and 35 deletions
|
@ -626,7 +626,7 @@ static inline int makensismain(int argc, TCHAR **argv)
|
||||||
argpos++;
|
argpos++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argpos<argc || (!files_processed && !cmds_processed))
|
if (argpos < argc || (!files_processed && !cmds_processed))
|
||||||
{
|
{
|
||||||
if (build.display_errors && !nousage)
|
if (build.display_errors && !nousage)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3149,7 +3149,9 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
||||||
TCHAR buf[33];
|
TCHAR buf[33];
|
||||||
compile=_T("\""), compile+=get_executable_path(g_argv0), compile+= _T("\"");
|
compile=_T("\""), compile+=get_executable_path(g_argv0), compile+= _T("\"");
|
||||||
compile+= _T(" ") OPT_STR _T("v"), wsprintf(buf,_T("%d"),get_verbosity()), compile+=buf;
|
compile+= _T(" ") OPT_STR _T("v"), wsprintf(buf,_T("%d"),get_verbosity()), compile+=buf;
|
||||||
|
#ifdef _WIN32 // POSIX does not support -OUTPUTCHARSET
|
||||||
compile+= _T(" ") OPT_STR _T("OCS "), g_outputenc.GetCPDisplayName(buf), compile+=buf;
|
compile+= _T(" ") OPT_STR _T("OCS "), g_outputenc.GetCPDisplayName(buf), compile+=buf;
|
||||||
|
#endif
|
||||||
if (*exec) compile+= _T(" "), compile+=exec;
|
if (*exec) compile+= _T(" "), compile+=exec;
|
||||||
exec=compile.c_str();
|
exec=compile.c_str();
|
||||||
}
|
}
|
||||||
|
@ -3168,7 +3170,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
||||||
else if (comp == 4);
|
else if (comp == 4);
|
||||||
else if (comp == 5)
|
else if (comp == 5)
|
||||||
{
|
{
|
||||||
TCHAR buf[50];
|
TCHAR buf[25];
|
||||||
_stprintf(buf,_T("%d"),ret);
|
_stprintf(buf,_T("%d"),ret);
|
||||||
definedlist.set(define,buf);
|
definedlist.set(define,buf);
|
||||||
}
|
}
|
||||||
|
@ -3193,7 +3195,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
||||||
bool required = true;
|
bool required = true;
|
||||||
NStreamEncoding enc(NStreamEncoding::AUTO);
|
NStreamEncoding enc(NStreamEncoding::AUTO);
|
||||||
TCHAR *f;
|
TCHAR *f;
|
||||||
unsigned int toks = line.getnumtokens() - 1;
|
unsigned int toks = line.getnumtokens() - 1, included = 0;
|
||||||
for(unsigned int tok = 0; toks;)
|
for(unsigned int tok = 0; toks;)
|
||||||
{
|
{
|
||||||
f = line.gettoken_str(++tok);
|
f = line.gettoken_str(++tok);
|
||||||
|
@ -3212,71 +3214,50 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
||||||
if (!toks || !*f) PRINTHELP();
|
if (!toks || !*f) PRINTHELP();
|
||||||
|
|
||||||
TCHAR *fc = my_convert(f);
|
TCHAR *fc = my_convert(f);
|
||||||
int included = 0;
|
|
||||||
|
|
||||||
tstring dir = get_dir_name(fc);
|
tstring dir = get_dir_name(fc);
|
||||||
tstring spec = get_file_name(fc);
|
tstring spec = get_file_name(fc);
|
||||||
tstring basedir = dir + PLATFORM_PATH_SEPARATOR_STR;
|
tstring basedir = dir + PLATFORM_PATH_SEPARATOR_STR;
|
||||||
if (dir == spec) {
|
if (dir == spec) basedir = _T(""), dir = _T("."); // no path, just file name
|
||||||
// no path, just file name
|
|
||||||
dir = _T(".");
|
|
||||||
basedir = _T("");
|
|
||||||
}
|
|
||||||
|
|
||||||
my_convert_free(fc);
|
my_convert_free(fc);
|
||||||
|
|
||||||
// search working directory
|
// search working directory
|
||||||
boost::scoped_ptr<dir_reader> dr( new_dir_reader() );
|
boost::scoped_ptr<dir_reader> dr( new_dir_reader() );
|
||||||
dr->read(dir);
|
dr->read(dir);
|
||||||
|
|
||||||
for (dir_reader::iterator files_itr = dr->files().begin();
|
for (dir_reader::iterator files_itr = dr->files().begin();
|
||||||
files_itr != dr->files().end();
|
files_itr != dr->files().end();
|
||||||
files_itr++)
|
files_itr++)
|
||||||
{
|
{
|
||||||
if (!dir_reader::matches(*files_itr, spec))
|
if (!dir_reader::matches(*files_itr, spec)) continue;
|
||||||
continue;
|
|
||||||
|
|
||||||
tstring incfile = basedir + *files_itr;
|
tstring incfile = basedir + *files_itr;
|
||||||
|
if (includeScript(incfile.c_str(), enc) != PS_OK)
|
||||||
if (includeScript(incfile.c_str(), enc) != PS_OK) {
|
|
||||||
return PS_ERROR;
|
return PS_ERROR;
|
||||||
}
|
else
|
||||||
|
included++;
|
||||||
included++;
|
|
||||||
}
|
}
|
||||||
|
if (included) return PS_OK;
|
||||||
if (included)
|
|
||||||
return PS_OK;
|
|
||||||
|
|
||||||
// search include dirs
|
// search include dirs
|
||||||
TCHAR *incdir = include_dirs.get();
|
TCHAR *incdir = include_dirs.get();
|
||||||
int incdirs = include_dirs.getnum();
|
int incdirs = include_dirs.getnum();
|
||||||
|
|
||||||
for (int i = 0; i < incdirs; i++, incdir += _tcslen(incdir) + 1) {
|
for (int i = 0; i < incdirs; i++, incdir += _tcslen(incdir) + 1) {
|
||||||
tstring curincdir = tstring(incdir) + PLATFORM_PATH_SEPARATOR_STR + dir;
|
tstring curincdir = tstring(incdir) + PLATFORM_PATH_SEPARATOR_STR + dir;
|
||||||
|
|
||||||
boost::scoped_ptr<dir_reader> dr( new_dir_reader() );
|
boost::scoped_ptr<dir_reader> dr( new_dir_reader() );
|
||||||
dr->read(curincdir);
|
dr->read(curincdir);
|
||||||
|
|
||||||
for (dir_reader::iterator incdir_itr = dr->files().begin();
|
for (dir_reader::iterator incdir_itr = dr->files().begin();
|
||||||
incdir_itr != dr->files().end();
|
incdir_itr != dr->files().end();
|
||||||
incdir_itr++)
|
incdir_itr++)
|
||||||
{
|
{
|
||||||
if (!dir_reader::matches(*incdir_itr, spec))
|
if (!dir_reader::matches(*incdir_itr, spec)) continue;
|
||||||
continue;
|
|
||||||
|
|
||||||
tstring incfile = tstring(incdir) + PLATFORM_PATH_SEPARATOR_STR + basedir + *incdir_itr;
|
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;
|
return PS_ERROR;
|
||||||
}
|
else
|
||||||
|
included++;
|
||||||
included++;
|
|
||||||
}
|
}
|
||||||
|
if (included) return PS_OK;
|
||||||
if (included)
|
|
||||||
return PS_OK;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// nothing found
|
// nothing found
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue