fixed some compile errors caused by removing some config.h options
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3429 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
1d53ac7649
commit
851032d22a
6 changed files with 33 additions and 9 deletions
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
int MMapFile::m_iAllocationGranularity = 0;
|
int MMapFile::m_iAllocationGranularity = 0;
|
||||||
|
|
||||||
|
#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
|
||||||
DWORD WINAPI lzmaCompressThread(LPVOID lpParameter)
|
DWORD WINAPI lzmaCompressThread(LPVOID lpParameter)
|
||||||
{
|
{
|
||||||
CLZMA *Compressor = (CLZMA *) lpParameter;
|
CLZMA *Compressor = (CLZMA *) lpParameter;
|
||||||
|
@ -24,6 +25,7 @@ DWORD WINAPI lzmaCompressThread(LPVOID lpParameter)
|
||||||
|
|
||||||
return Compressor->CompressReal();
|
return Compressor->CompressReal();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool isSimpleChar(char ch)
|
bool isSimpleChar(char ch)
|
||||||
{
|
{
|
||||||
|
@ -2347,7 +2349,9 @@ int CEXEBuild::write_output(void)
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return PS_ERROR;
|
return PS_ERROR;
|
||||||
}
|
}
|
||||||
|
#ifdef NSIS_CONFIG_CRC_SUPPORT
|
||||||
crc=CRC32(crc,&z,1);
|
crc=CRC32(crc,&z,1);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
exeheader_size_new = exeheader_size_new_aligned;
|
exeheader_size_new = exeheader_size_new_aligned;
|
||||||
}
|
}
|
||||||
|
@ -2357,7 +2361,11 @@ int CEXEBuild::write_output(void)
|
||||||
fh.nsinst[1]=FH_INT2;
|
fh.nsinst[1]=FH_INT2;
|
||||||
fh.nsinst[2]=FH_INT3;
|
fh.nsinst[2]=FH_INT3;
|
||||||
|
|
||||||
|
#ifdef NSIS_CONFIG_CRC_SUPPORT
|
||||||
fh.flags=(build_crcchk?(build_crcchk==2?FH_FLAGS_FORCE_CRC:0):FH_FLAGS_NO_CRC);
|
fh.flags=(build_crcchk?(build_crcchk==2?FH_FLAGS_FORCE_CRC:0):FH_FLAGS_NO_CRC);
|
||||||
|
#else
|
||||||
|
fh.flags=0;
|
||||||
|
#endif
|
||||||
#ifdef NSIS_CONFIG_SILENT_SUPPORT
|
#ifdef NSIS_CONFIG_SILENT_SUPPORT
|
||||||
if (build_header.flags&(CH_FLAGS_SILENT|CH_FLAGS_SILENT_LOG)) fh.flags |= FH_FLAGS_SILENT;
|
if (build_header.flags&(CH_FLAGS_SILENT|CH_FLAGS_SILENT_LOG)) fh.flags |= FH_FLAGS_SILENT;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -633,6 +633,8 @@ skipPage:
|
||||||
return HandleStaticBkColor();
|
return HandleStaticBkColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define this_page ((page*)lParam)
|
||||||
|
|
||||||
#ifdef NSIS_CONFIG_LICENSEPAGE
|
#ifdef NSIS_CONFIG_LICENSEPAGE
|
||||||
|
|
||||||
#define _RICHEDIT_VER 0x0200
|
#define _RICHEDIT_VER 0x0200
|
||||||
|
@ -647,8 +649,6 @@ DWORD CALLBACK StreamLicense(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define this_page ((page*)lParam)
|
|
||||||
|
|
||||||
static BOOL CALLBACK LicenseProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
static BOOL CALLBACK LicenseProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
page *m_this_page=g_this_page;
|
page *m_this_page=g_this_page;
|
||||||
|
|
|
@ -133,9 +133,11 @@ static int NSISCALL ExecuteEntry(entry *entry_)
|
||||||
HWND hwSectionHack = g_SectionHack;
|
HWND hwSectionHack = g_SectionHack;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
||||||
// Saves 8 bytes
|
// Saves 8 bytes
|
||||||
HWND mainHwnd = g_hwnd;
|
HWND mainHwnd = g_hwnd;
|
||||||
#define g_hwnd mainHwnd
|
#define g_hwnd mainHwnd
|
||||||
|
#endif
|
||||||
|
|
||||||
int exec_error = 0;
|
int exec_error = 0;
|
||||||
|
|
||||||
|
|
|
@ -255,10 +255,14 @@ const char * NSISCALL loadHeaders(int cl_flags)
|
||||||
return _LANG_ERRORWRITINGTEMP;
|
return _LANG_ERRORWRITINGTEMP;
|
||||||
}
|
}
|
||||||
dbd_srcpos = SetSelfFilePointer(g_filehdrsize + sizeof(firstheader));
|
dbd_srcpos = SetSelfFilePointer(g_filehdrsize + sizeof(firstheader));
|
||||||
|
#ifdef NSIS_CONFIG_CRC_SUPPORT
|
||||||
dbd_fulllen = dbd_srcpos - sizeof(h) + h.length_of_all_following_data - ((cl_flags & FH_FLAGS_NO_CRC) ? 0 : sizeof(int));
|
dbd_fulllen = dbd_srcpos - sizeof(h) + h.length_of_all_following_data - ((cl_flags & FH_FLAGS_NO_CRC) ? 0 : sizeof(int));
|
||||||
|
#else
|
||||||
|
dbd_fulllen = dbd_srcpos - sizeof(h) + h.length_of_all_following_data;
|
||||||
|
#endif//NSIS_CONFIG_CRC_SUPPORT
|
||||||
#else
|
#else
|
||||||
SetSelfFilePointer(g_filehdrsize + sizeof(firstheader));
|
SetSelfFilePointer(g_filehdrsize + sizeof(firstheader));
|
||||||
#endif
|
#endif//NSIS_COMPRESS_WHOLE
|
||||||
|
|
||||||
if (GetCompressedDataFromDataBlockToMemory(-1, data, h.length_of_header) != h.length_of_header)
|
if (GetCompressedDataFromDataBlockToMemory(-1, data, h.length_of_header) != h.length_of_header)
|
||||||
{
|
{
|
||||||
|
@ -282,9 +286,10 @@ const char * NSISCALL loadHeaders(int cl_flags)
|
||||||
g_is_uninstaller++;
|
g_is_uninstaller++;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
crc = BLOCKS_NUM;
|
// set offsets to real memory offsets rather than installer's header offset
|
||||||
while (crc--)
|
left = BLOCKS_NUM;
|
||||||
header->blocks[crc].offset += (int)data;
|
while (left--)
|
||||||
|
header->blocks[left].offset += (int)data;
|
||||||
|
|
||||||
#ifdef NSIS_COMPRESS_WHOLE
|
#ifdef NSIS_COMPRESS_WHOLE
|
||||||
header->blocks[NB_DATA].offset = dbd_pos;
|
header->blocks[NB_DATA].offset = dbd_pos;
|
||||||
|
|
|
@ -79,9 +79,11 @@ int NSISCALL my_GetDialogItemText(UINT idx, char *val)
|
||||||
|
|
||||||
int NSISCALL my_MessageBox(const char *text, UINT type) {
|
int NSISCALL my_MessageBox(const char *text, UINT type) {
|
||||||
int _type = type & 0x000FFFFF;
|
int _type = type & 0x000FFFFF;
|
||||||
|
#ifdef NSIS_CONFIG_SILENT_SUPPORT
|
||||||
// default for silent installers
|
// default for silent installers
|
||||||
if (g_exec_flags.silent && type >> 20)
|
if (g_exec_flags.silent && type >> 20)
|
||||||
return type >> 20;
|
return type >> 20;
|
||||||
|
#endif
|
||||||
// no silent or no default, just show
|
// no silent or no default, just show
|
||||||
if (g_exec_flags.rtl)
|
if (g_exec_flags.rtl)
|
||||||
_type ^= MB_RIGHT | MB_RTLREADING;
|
_type ^= MB_RIGHT | MB_RTLREADING;
|
||||||
|
|
|
@ -981,8 +981,6 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
||||||
set_uninstall_mode(1);
|
set_uninstall_mode(1);
|
||||||
case TOK_PAGE:
|
case TOK_PAGE:
|
||||||
{
|
{
|
||||||
SCRIPT_MSG("%sPage: %s", uninstall_mode?"Uninst":"", line.gettoken_str(1));
|
|
||||||
|
|
||||||
if (!uninstall_mode) {
|
if (!uninstall_mode) {
|
||||||
enable_last_page_cancel = 0;
|
enable_last_page_cancel = 0;
|
||||||
if (!stricmp(line.gettoken_str(line.getnumtokens()-1),"/ENABLECANCEL"))
|
if (!stricmp(line.gettoken_str(line.getnumtokens()-1),"/ENABLECANCEL"))
|
||||||
|
@ -1042,12 +1040,14 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
||||||
cur_page->prefunc = ns_func.add(line.gettoken_str(2),0);
|
cur_page->prefunc = ns_func.add(line.gettoken_str(2),0);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
ERROR_MSG("\nError: custom page must have a creator function!\n");
|
ERROR_MSG("Error: custom page must have a creator function!\n");
|
||||||
PRINTHELP();
|
PRINTHELP();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif//NSIS_SUPPORT_CODECALLBACKS
|
#endif//NSIS_SUPPORT_CODECALLBACKS
|
||||||
|
|
||||||
|
SCRIPT_MSG("%sPage: %s", uninstall_mode?"Uninst":"", line.gettoken_str(1));
|
||||||
|
|
||||||
#ifdef NSIS_SUPPORT_CODECALLBACKS
|
#ifdef NSIS_SUPPORT_CODECALLBACKS
|
||||||
if (cur_page->prefunc>=0)
|
if (cur_page->prefunc>=0)
|
||||||
SCRIPT_MSG(" (%s:%s)", k?"pre":"creator", line.gettoken_str(2));
|
SCRIPT_MSG(" (%s:%s)", k?"pre":"creator", line.gettoken_str(2));
|
||||||
|
@ -2918,6 +2918,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
||||||
}
|
}
|
||||||
SCRIPT_MSG("FileBufSize: %smb (%d bytes)\n",line.gettoken_str(1),build_filebuflen);
|
SCRIPT_MSG("FileBufSize: %smb (%d bytes)\n",line.gettoken_str(1),build_filebuflen);
|
||||||
return PS_OK;
|
return PS_OK;
|
||||||
|
#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
|
||||||
case TOK_SETCOMPRESSIONLEVEL:
|
case TOK_SETCOMPRESSIONLEVEL:
|
||||||
{
|
{
|
||||||
if (compressor == &lzma_compressor)
|
if (compressor == &lzma_compressor)
|
||||||
|
@ -2945,6 +2946,12 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
||||||
build_compress_dict_size <<= 20;
|
build_compress_dict_size <<= 20;
|
||||||
}
|
}
|
||||||
return PS_OK;
|
return PS_OK;
|
||||||
|
#else
|
||||||
|
case TOK_SETCOMPRESSIONLEVEL:
|
||||||
|
case TOK_SETCOMPRESSORDICTSIZE:
|
||||||
|
ERROR_MSG("Error: %s specified, NSIS_CONFIG_COMPRESSION_SUPPORT not defined.\n", line.gettoken_str(0));
|
||||||
|
return PS_ERROR;
|
||||||
|
#endif//NSIS_CONFIG_COMPRESSION_SUPPORT
|
||||||
case TOK_ADDSIZE:
|
case TOK_ADDSIZE:
|
||||||
{
|
{
|
||||||
int s;
|
int s;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue