Print "ANSI targets are deprecated" warning if Unicode/Target attributes are never used.

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7077 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2019-02-02 20:25:07 +00:00
parent cb151c88e6
commit b9c8d57bb2
2 changed files with 6 additions and 0 deletions

View file

@ -416,6 +416,7 @@ void CEXEBuild::initialize(const TCHAR *makensis_path)
tstring uninst = stubs_dir + PLATFORM_PATH_SEPARATOR_STR + _T("uninst");
uninstaller_icon = load_icon_file(uninst.c_str());
changed_target = false;
}
@ -2568,6 +2569,8 @@ int CEXEBuild::write_output(void)
RET_UNLESS_OK( check_write_output_errors() );
has_called_write_output=true;
if (!changed_target && !build_unicode)
warning(DW_GENERIC_DEPRECATED, _T("ANSI targets are deprecated"));
#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
RET_UNLESS_OK( add_plugins_dir_initializer() );
@ -3898,6 +3901,7 @@ int CEXEBuild::change_target_architecture(TARGETTYPE tt)
#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
if (PS_OK == ec) ec = initialize_default_plugins(true);
#endif
changed_target = true;
return ec;
}

View file

@ -108,6 +108,7 @@ typedef enum {
DW_ATTRIBUTE_OVERLONGSTRING = 7060,
DW_PARSE_BADNUMBER = 7070,
DW_PARSE_LNK_HK = 7075,
DW_GENERIC_DEPRECATED = 7998,
DW_PARSE_REGPATHPREFIX = 7999,
DW_INSTFILESPAGE_NOT_USED = 8000, // reserved ..8019
DW_COMP_FINAL = 8020, // reserved ..8059
@ -441,6 +442,7 @@ class CEXEBuild {
void print_warnings();
void warninghelper(DIAGCODE dc, bool fl, const TCHAR *fmt, va_list args);
DiagState diagstate;
bool changed_target;
/** Are we defining an uninstall version of the code?
* @param un Use like a boolean to define whether in uninstall mode.