Jim Park's Unicode NSIS merging - Step 1 : switch to TCHARs where relevant.

Compiler output is identical before & after this step

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/branches/wizou@6036 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
wizou 2010-03-24 17:22:56 +00:00
parent 4e48722b63
commit 752d7d239a
209 changed files with 9698 additions and 7658 deletions

View file

@ -1,3 +1,5 @@
// Unicode support by Jim Park -- 11/16/2007
#include "Platform.h"
#include "icon.h"
#include "util.h"
@ -15,9 +17,9 @@ extern FILE *g_output;
#define SIZEOF_RSRC_ICON_GROUP_ENTRY 14
static FILE * open_icon(const char* filename, IconGroupHeader& igh)
static FILE * open_icon(const TCHAR* filename, IconGroupHeader& igh)
{
FILE* f = FOPEN(filename, "rb");
FILE* f = FOPEN(filename, _T("rb"));
if (!f)
throw runtime_error("can't open file");
@ -81,7 +83,7 @@ IconGroup load_icon_res(CResourceEditor* re, WORD id)
return result;
}
IconGroup load_icon_file(const char* filename)
IconGroup load_icon_file(const TCHAR* filename)
{
IconGroupHeader iconHeader;
IconGroup result;
@ -150,6 +152,7 @@ typedef struct
unsigned size_index;
} IconPair;
typedef vector<IconPair> IconPairs;
static bool compare_icon(Icon a, Icon b)
@ -389,7 +392,7 @@ int generate_unicons_offsets(LPBYTE exeHeader, size_t exeHeaderSize, LPBYTE unin
if (offset > exeHeaderSize)
{
throw runtime_error("invalid icon offset (possibly compressed icon)");
throw runtime_error(_T("invalid icon offset (possibly compressed icon)"));
}
DWORD real_size = re.GetResourceSizeA(RT_ICON, MAKEINTRESOURCE(icon_index), NSIS_DEFAULT_LANG);
@ -413,7 +416,7 @@ int generate_unicons_offsets(LPBYTE exeHeader, size_t exeHeaderSize, LPBYTE unin
catch (const exception& e)
{
if (g_display_errors)
fprintf(g_output, "\nError generating uninstaller icon: %s -- failing!\n", e.what());
fprintf(g_output, _T("\nError generating uninstaller icon: %s -- failing!\n"), e.what());
return 0;
}