Default OutFile determined by NSI script filename
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6106 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
c59db4bb1e
commit
1421a3e315
3 changed files with 9 additions and 0 deletions
|
@ -2349,6 +2349,12 @@ int CEXEBuild::UpdatePEHeader()
|
||||||
return PS_OK;
|
return PS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CEXEBuild::set_default_output_filename(const tstring& filename)
|
||||||
|
{
|
||||||
|
if (build_output_filename[0] == 0)
|
||||||
|
_tcsnccpy(build_output_filename,filename.c_str(),1024-1);
|
||||||
|
}
|
||||||
|
|
||||||
int CEXEBuild::check_write_output_errors() const
|
int CEXEBuild::check_write_output_errors() const
|
||||||
{
|
{
|
||||||
if (has_called_write_output)
|
if (has_called_write_output)
|
||||||
|
|
|
@ -105,6 +105,8 @@ class CEXEBuild {
|
||||||
#endif //NSIS_CONFIG_PLUGIN_SUPPORT
|
#endif //NSIS_CONFIG_PLUGIN_SUPPORT
|
||||||
|
|
||||||
|
|
||||||
|
void set_default_output_filename(const tstring& filename);
|
||||||
|
|
||||||
// process a script (you can process as many scripts as you want,
|
// process a script (you can process as many scripts as you want,
|
||||||
// it is as if they are concatenated)
|
// it is as if they are concatenated)
|
||||||
int process_script(FILE *filepointer, const TCHAR *filename, BOOL unicode);
|
int process_script(FILE *filepointer, const TCHAR *filename, BOOL unicode);
|
||||||
|
|
|
@ -516,6 +516,7 @@ int _tmain(int argc, TCHAR **argv)
|
||||||
if (change_to_script_dir(build, script_file))
|
if (change_to_script_dir(build, script_file))
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
build.set_default_output_filename(remove_file_extension(sfile)+_T(".exe"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (build.display_script)
|
if (build.display_script)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue