Added NSIS_CONFIG_LOG_ODS that makes the log use OutputDebugString instead of install.log.

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3194 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2003-11-24 14:22:50 +00:00
parent c49208b861
commit ac025c139c
6 changed files with 49 additions and 10 deletions

View file

@ -11,8 +11,10 @@
#include "ui.h"
#ifdef NSIS_CONFIG_LOG
#ifndef NSIS_CONFIG_LOG_ODS
char g_log_file[1024];
#endif
#endif
#ifdef NSIS_SUPPORT_NAMED_USERVARS
// *** DO NOT DECLARE MORE VARIABLES INSIDE THIS PRAGMAS ***
@ -722,11 +724,12 @@ char * NSISCALL validate_filename(char *in) {
}
#ifdef NSIS_CONFIG_LOG
char log_text[4096];
int log_dolog;
char log_text[NSIS_MAX_STRLEN*4];
#ifndef NSIS_CONFIG_LOG_ODS
void NSISCALL log_write(int close)
{
extern char g_log_file[1024];
static HANDLE fp=INVALID_HANDLE_VALUE;
if (close)
{
@ -753,7 +756,22 @@ void NSISCALL log_write(int close)
}
}
}
#endif//!NSIS_CONFIG_LOG_ODS
void log_printf(char *format, ...)
{
va_list val;
va_start(val,format);
wvsprintf(log_text,format,val);
va_end(val);
#ifdef NSIS_CONFIG_LOG_ODS
if (log_dolog)
OutputDebugString(log_text);
#else
log_write(0);
#endif
}
#endif//NSIS_CONFIG_LOG
WIN32_FIND_DATA * NSISCALL file_exists(char *buf)
{