diff --git a/Source/build.cpp b/Source/build.cpp index f77ccc3c..d5061216 100644 --- a/Source/build.cpp +++ b/Source/build.cpp @@ -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; } diff --git a/Source/build.h b/Source/build.h index e523ac35..e4b8b926 100644 --- a/Source/build.h +++ b/Source/build.h @@ -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.