Refactored postbuild_cmd and !tempfile handling to help patch #280

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7025 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2018-10-24 19:01:00 +00:00
parent 1d937a6abb
commit cce4695977
6 changed files with 112 additions and 86 deletions

View file

@ -24,6 +24,7 @@ void CtoTString::Init(const char* str, UINT cp)
#if defined(_UNICODE) && !defined(_WIN32)
if (CP_ACP == cp)
{
assert(NSISRT_free_is_STDC_free());
m_wStr = NSISRT_mbtowc(str); // Should be faster than iconv
return ;
}
@ -45,6 +46,7 @@ CtoTString::~CtoTString() { free(m_wStr); m_wStr = 0; }
void TtoCString::Init(const wchar_t* str)
{
#if defined(_UNICODE) && !defined(_WIN32)
assert(NSISRT_free_is_STDC_free());
m_cStr = NSISRT_wctomb(str); // Should be faster than iconv
return ;
#endif