Initial community commit
@@ -0,0 +1,814 @@
|
||||
// ExceptionHandler.cpp Version 1.4
|
||||
//
|
||||
// Copyright © 1998 Bruce Dawson
|
||||
//
|
||||
// This source file contains the exception handler for recording error
|
||||
// information after crashes. See ExceptionHandler.h for information
|
||||
// on how to hook it in.
|
||||
//
|
||||
// Author: Bruce Dawson
|
||||
// brucedawson@cygnus-software.com
|
||||
//
|
||||
// Modified by: Hans Dietrich
|
||||
// hdietrich2@hotmail.com
|
||||
//
|
||||
// Version 1.4: - Added invocation of XCrashReport.exe
|
||||
//
|
||||
// Version 1.3: - Added minidump output
|
||||
//
|
||||
// Version 1.1: - reformatted output for XP-like error report
|
||||
// - added ascii output to stack dump
|
||||
//
|
||||
// A paper by the original author can be found at:
|
||||
// http://www.cygnus-software.com/papers/release_debugging.html
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Disable warnings generated by the Windows header files.
|
||||
#pragma warning(disable : 4514)
|
||||
#pragma warning(disable : 4201)
|
||||
|
||||
#define _WIN32_WINDOWS 0x0500 // for IsDebuggerPresent
|
||||
|
||||
#include "windows.h"
|
||||
#include <tchar.h>
|
||||
#include "GetWinVer.h"
|
||||
#include "miniversion.h"
|
||||
#include "../nu/ns_wc.h"
|
||||
|
||||
#include "minidump.h"
|
||||
#include ".\settings.h"
|
||||
#include "api__gen_crasher.h"
|
||||
|
||||
extern char *winampVersion;
|
||||
extern Settings settings;
|
||||
|
||||
#ifndef _countof
|
||||
#define _countof(array) (sizeof(array)/sizeof(array[0]))
|
||||
#endif
|
||||
|
||||
const int NumCodeBytes = 16; // Number of code bytes to record.
|
||||
const int MaxStackDump = 3072; // Maximum number of DWORDS in stack dumps.
|
||||
const int StackColumns = 4; // Number of columns in stack dump.
|
||||
|
||||
#define ONEK 1024
|
||||
#define SIXTYFOURK (64*ONEK)
|
||||
#define ONEM (ONEK*ONEK)
|
||||
#define ONEG (ONEK*ONEK*ONEK)
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// lstrrchr (avoid the C Runtime )
|
||||
static TCHAR * lstrrchr(LPCTSTR string, int ch)
|
||||
{
|
||||
TCHAR *start = (TCHAR *)string;
|
||||
|
||||
while (string && *string++) /* find end of string */
|
||||
;
|
||||
/* search towards front */
|
||||
while (--string != start && *string != (TCHAR) ch)
|
||||
;
|
||||
|
||||
if (*string == (TCHAR) ch) /* char found ? */
|
||||
return (TCHAR *)string;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// hprintf behaves similarly to printf, with a few vital differences.
|
||||
// It uses wvsprintf to do the formatting, which is a system routine,
|
||||
// thus avoiding C run time interactions. For similar reasons it
|
||||
// uses WriteFile rather than fwrite.
|
||||
// The one limitation that this imposes is that wvsprintf, and
|
||||
// therefore hprintf, cannot handle floating point numbers.
|
||||
|
||||
// Too many calls to WriteFile can take a long time, causing
|
||||
// confusing delays when programs crash. Therefore I implemented
|
||||
// a simple buffering scheme for hprintf
|
||||
|
||||
#define HPRINTF_BUFFER_SIZE (8*1024) // must be at least 2048
|
||||
static wchar_t hprintf_buffer[HPRINTF_BUFFER_SIZE]; // wvsprintf never prints more than one K.
|
||||
static int hprintf_index = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// hflush
|
||||
static void hflush(HANDLE LogFile)
|
||||
{
|
||||
if (hprintf_index > 0)
|
||||
{
|
||||
DWORD NumBytes = 0;
|
||||
WriteFile(LogFile, hprintf_buffer, lstrlenW(hprintf_buffer)*2, &NumBytes, 0);
|
||||
hprintf_index = 0;
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// hprintf
|
||||
static void hprintf(HANDLE LogFile, const wchar_t *Format, ...)
|
||||
{
|
||||
if (hprintf_index > (HPRINTF_BUFFER_SIZE-1024))
|
||||
{
|
||||
DWORD NumBytes = 0;
|
||||
WriteFile(LogFile, hprintf_buffer, lstrlen(hprintf_buffer)*2, &NumBytes, 0);
|
||||
hprintf_index = 0;
|
||||
}
|
||||
|
||||
va_list arglist;
|
||||
va_start( arglist, Format);
|
||||
hprintf_index += vswprintf(&hprintf_buffer[hprintf_index], Format, arglist);
|
||||
va_end( arglist);
|
||||
}
|
||||
|
||||
#include <strsafe.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// DumpMiniDump
|
||||
static BOOL DumpMiniDump(HANDLE hFile, PEXCEPTION_POINTERS excpInfo)
|
||||
{
|
||||
if (excpInfo == NULL)
|
||||
{
|
||||
// Generate exception to get proper context in dump
|
||||
__try
|
||||
{
|
||||
//OutputDebugString(_T("raising exception\r\n"));
|
||||
RaiseException(EXCEPTION_BREAKPOINT, 0, 0, NULL);
|
||||
}
|
||||
__except(DumpMiniDump(hFile, GetExceptionInformation()), EXCEPTION_CONTINUE_EXECUTION)
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//OutputDebugString(_T("writing minidump\r\n"));
|
||||
MINIDUMP_EXCEPTION_INFORMATION eInfo = {0};
|
||||
eInfo.ThreadId = GetCurrentThreadId();
|
||||
eInfo.ExceptionPointers = excpInfo;
|
||||
eInfo.ClientPointers = FALSE;
|
||||
|
||||
// try to load dbghelpdll
|
||||
HMODULE hm = NULL;
|
||||
// first from app folder
|
||||
wchar_t szDbgHelpPath[_MAX_PATH] = {0};
|
||||
|
||||
if (GetModuleFileNameW( NULL, szDbgHelpPath, _MAX_PATH ))
|
||||
{
|
||||
wchar_t *pSlash = wcsrchr( szDbgHelpPath, L'\\' );
|
||||
if (pSlash)
|
||||
{
|
||||
StringCchCopy( pSlash+1, _MAX_PATH, L"dbghelp.dll");
|
||||
hm = LoadLibraryW( szDbgHelpPath );
|
||||
}
|
||||
}
|
||||
if (!hm)
|
||||
{
|
||||
// load any version we can
|
||||
hm = LoadLibraryW(L"dbghelp.dll");
|
||||
}
|
||||
|
||||
if (hm)
|
||||
{
|
||||
BOOL (WINAPI* MiniDumpWriteDump)(
|
||||
HANDLE hProcess,
|
||||
DWORD ProcessId,
|
||||
HANDLE hFile,
|
||||
MINIDUMP_TYPE DumpType,
|
||||
PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,
|
||||
PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam,
|
||||
PMINIDUMP_CALLBACK_INFORMATION CallbackParam
|
||||
) = NULL;
|
||||
//OutputDebugString(_T("Found dbghelp.dll, searching for MiniDumpWriteDump\r\n"));
|
||||
*(FARPROC*)&MiniDumpWriteDump = GetProcAddress(hm, "MiniDumpWriteDump");
|
||||
if (MiniDumpWriteDump)
|
||||
{
|
||||
//OutputDebugString(_T("Calling MiniDumpWriteDump\r\n"));
|
||||
BOOL ret = MiniDumpWriteDump(
|
||||
GetCurrentProcess(),
|
||||
GetCurrentProcessId(),
|
||||
hFile,
|
||||
(MINIDUMP_TYPE)settings.dumpType,
|
||||
excpInfo ? &eInfo : NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
//OutputDebugString(_T("MiniDumpWriteDump finished\r\n"));
|
||||
if (!ret)
|
||||
{
|
||||
DWORD le = GetLastError();
|
||||
wchar_t tmp[256] = {0};
|
||||
StringCchPrintfW(tmp, 256, L"call failed with error code: %d", le);
|
||||
//OutputDebugString(tmp);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// FormatTime
|
||||
//
|
||||
// Format the specified FILETIME to output in a human readable format,
|
||||
// without using the C run time.
|
||||
static void FormatTime(LPTSTR output, FILETIME TimeToPrint)
|
||||
{
|
||||
output[0] = _T('\0');
|
||||
WORD Date, Time;
|
||||
if (FileTimeToLocalFileTime(&TimeToPrint, &TimeToPrint) &&
|
||||
FileTimeToDosDateTime(&TimeToPrint, &Date, &Time))
|
||||
{
|
||||
StringCchPrintf(output, 100, _T("%d/%d/%d %02d:%02d:%02d"),
|
||||
(Date / 32) & 15, Date & 31, (Date / 512) + 1980,
|
||||
(Time >> 11), (Time >> 5) & 0x3F, (Time & 0x1F) * 2);
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// DumpModuleInfo
|
||||
//
|
||||
// Print information about a code module (DLL or EXE) such as its size,
|
||||
// location, time stamp, etc.
|
||||
static bool DumpModuleInfo(HANDLE LogFile, HINSTANCE ModuleHandle, int nModuleNo)
|
||||
{
|
||||
bool rc = false;
|
||||
wchar_t szModName[MAX_PATH*2] = {0};
|
||||
__try
|
||||
{
|
||||
if (GetModuleFileName(ModuleHandle, szModName, MAX_PATH*2) > 0)
|
||||
{
|
||||
// If GetModuleFileName returns greater than zero then this must
|
||||
// be a valid code module address. Therefore we can try to walk
|
||||
// our way through its structures to find the link time stamp.
|
||||
IMAGE_DOS_HEADER *DosHeader = (IMAGE_DOS_HEADER*)ModuleHandle;
|
||||
if (IMAGE_DOS_SIGNATURE != DosHeader->e_magic)
|
||||
return false;
|
||||
|
||||
IMAGE_NT_HEADERS *NTHeader = (IMAGE_NT_HEADERS*)((char *)DosHeader
|
||||
+ DosHeader->e_lfanew);
|
||||
if (IMAGE_NT_SIGNATURE != NTHeader->Signature)
|
||||
return false;
|
||||
|
||||
// open the code module file so that we can get its file date and size
|
||||
HANDLE ModuleFile = CreateFile(szModName, GENERIC_READ,
|
||||
FILE_SHARE_READ, 0, OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL, 0);
|
||||
|
||||
TCHAR TimeBuffer[100] = {0};
|
||||
DWORD FileSize = 0;
|
||||
if (ModuleFile != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
FileSize = GetFileSize(ModuleFile, 0);
|
||||
FILETIME LastWriteTime;
|
||||
if (GetFileTime(ModuleFile, 0, 0, &LastWriteTime))
|
||||
{
|
||||
FormatTime(TimeBuffer, LastWriteTime);
|
||||
}
|
||||
CloseHandle(ModuleFile);
|
||||
}
|
||||
hprintf(LogFile, _T("Module %d\r\n"), nModuleNo);
|
||||
hprintf(LogFile, _T("%s\r\n"), szModName);
|
||||
hprintf(LogFile, _T("Image Base: 0x%08x Image Size: 0x%08x\r\n"),
|
||||
NTHeader->OptionalHeader.ImageBase,
|
||||
NTHeader->OptionalHeader.SizeOfImage),
|
||||
|
||||
hprintf(LogFile, _T("Checksum: 0x%08x Time Stamp: 0x%08x\r\n"),
|
||||
NTHeader->OptionalHeader.CheckSum,
|
||||
NTHeader->FileHeader.TimeDateStamp);
|
||||
|
||||
hprintf(LogFile, _T("File Size: %-10d File Time: %s\r\n"),
|
||||
FileSize, TimeBuffer);
|
||||
|
||||
hprintf(LogFile, _T("Version Information:\r\n"));
|
||||
|
||||
CMiniVersion ver(szModName);
|
||||
TCHAR szBuf[200] = {0};
|
||||
WORD dwBuf[4] = {0};
|
||||
|
||||
ver.GetCompanyName(szBuf, _countof(szBuf)-1);
|
||||
hprintf(LogFile, _T(" Company: %s\r\n"), szBuf);
|
||||
|
||||
ver.GetProductName(szBuf, _countof(szBuf)-1);
|
||||
hprintf(LogFile, _T(" Product: %s\r\n"), szBuf);
|
||||
|
||||
ver.GetFileDescription(szBuf, _countof(szBuf)-1);
|
||||
hprintf(LogFile, _T(" FileDesc: %s\r\n"), szBuf);
|
||||
|
||||
ver.GetFileVersion(dwBuf);
|
||||
hprintf(LogFile, _T(" FileVer: %d.%d.%d.%d\r\n"),
|
||||
dwBuf[0], dwBuf[1], dwBuf[2], dwBuf[3]);
|
||||
|
||||
ver.GetProductVersion(dwBuf);
|
||||
hprintf(LogFile, _T(" ProdVer: %d.%d.%d.%d\r\n"),
|
||||
dwBuf[0], dwBuf[1], dwBuf[2], dwBuf[3]);
|
||||
|
||||
ver.Release();
|
||||
|
||||
hprintf(LogFile, _T("\r\n"));
|
||||
|
||||
rc = true;
|
||||
}
|
||||
}
|
||||
// Handle any exceptions by continuing from this point.
|
||||
__except(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
//OutputDebugString(L"DumpModuleInfo exception");
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// DumpModuleList
|
||||
//
|
||||
// Scan memory looking for code modules (DLLs or EXEs). VirtualQuery is used
|
||||
// to find all the blocks of address space that were reserved or committed,
|
||||
// and ShowModuleInfo will display module information if they are code
|
||||
// modules.
|
||||
static void DumpModuleList(HANDLE LogFile)
|
||||
{
|
||||
SYSTEM_INFO SystemInfo;
|
||||
GetSystemInfo(&SystemInfo);
|
||||
|
||||
//OutputDebugString(L"Dumping modules list");
|
||||
const size_t PageSize = SystemInfo.dwPageSize;
|
||||
|
||||
// Set NumPages to the number of pages in the 4GByte address space,
|
||||
// while being careful to avoid overflowing ints
|
||||
const size_t NumPages = 4 * size_t(ONEG / PageSize);
|
||||
size_t pageNum = 0;
|
||||
void *LastAllocationBase = 0;
|
||||
|
||||
int nModuleNo = 1;
|
||||
|
||||
while (pageNum < NumPages)
|
||||
{
|
||||
MEMORY_BASIC_INFORMATION MemInfo;
|
||||
if (VirtualQuery((void *)(pageNum * PageSize), &MemInfo, sizeof(MemInfo)))
|
||||
{
|
||||
if (MemInfo.RegionSize > 0)
|
||||
{
|
||||
// Adjust the page number to skip over this block of memory
|
||||
pageNum += MemInfo.RegionSize / PageSize;
|
||||
if (MemInfo.State == MEM_COMMIT && MemInfo.AllocationBase > LastAllocationBase)
|
||||
{
|
||||
// Look for new blocks of committed memory, and try
|
||||
// recording their module names - this will fail
|
||||
// gracefully if they aren't code modules
|
||||
LastAllocationBase = MemInfo.AllocationBase;
|
||||
|
||||
if (DumpModuleInfo(LogFile, (HINSTANCE)LastAllocationBase, nModuleNo))
|
||||
{
|
||||
nModuleNo++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
pageNum += SIXTYFOURK / PageSize;
|
||||
}
|
||||
else
|
||||
pageNum += SIXTYFOURK / PageSize;
|
||||
|
||||
// If VirtualQuery fails we advance by 64K because that is the
|
||||
// granularity of address space doled out by VirtualAlloc()
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// DumpSystemInformation
|
||||
//
|
||||
// Record information about the user's system, such as processor type, amount
|
||||
// of memory, etc.
|
||||
static void DumpSystemInformation(HANDLE LogFile)
|
||||
{
|
||||
FILETIME CurrentTime;
|
||||
GetSystemTimeAsFileTime(&CurrentTime);
|
||||
TCHAR szTimeBuffer[100] = {0};
|
||||
FormatTime(szTimeBuffer, CurrentTime);
|
||||
|
||||
hprintf(LogFile, _T("Error occurred at %s.\r\n"), szTimeBuffer);
|
||||
|
||||
TCHAR szModuleName[MAX_PATH*2] = {0};
|
||||
if (GetModuleFileName(0, szModuleName, _countof(szModuleName)-2) <= 0)
|
||||
StringCbCopy(szModuleName, sizeof(szModuleName), _T("Unknown"));
|
||||
|
||||
TCHAR szUserName[200] = {0};
|
||||
DWORD UserNameSize = _countof(szUserName)-2;
|
||||
if (!GetUserName(szUserName, &UserNameSize))
|
||||
StringCbCopy(szUserName, sizeof(szUserName), _T("Unknown"));
|
||||
|
||||
hprintf(LogFile, _T("%s, run by %s.\r\n"), szModuleName, szUserName);
|
||||
|
||||
// print out operating system
|
||||
TCHAR szWinVer[50] = {0}, szMajorMinorBuild[50] = {0};
|
||||
int nWinVer = 0;
|
||||
GetWinVer(szWinVer, &nWinVer, szMajorMinorBuild);
|
||||
hprintf(LogFile, _T("Operating system: %s (%s).\r\n"),
|
||||
szWinVer, szMajorMinorBuild);
|
||||
|
||||
SYSTEM_INFO SystemInfo;
|
||||
GetSystemInfo(&SystemInfo);
|
||||
hprintf(LogFile, _T("%d processor(s), type %d.\r\n"),
|
||||
SystemInfo.dwNumberOfProcessors, SystemInfo.dwProcessorType);
|
||||
|
||||
MEMORYSTATUS MemInfo;
|
||||
MemInfo.dwLength = sizeof(MemInfo);
|
||||
GlobalMemoryStatus(&MemInfo);
|
||||
|
||||
// Print out info on memory, rounded up.
|
||||
hprintf(LogFile, _T("%d%% memory in use.\r\n"), MemInfo.dwMemoryLoad);
|
||||
hprintf(LogFile, _T("%d MBytes physical memory.\r\n"), (MemInfo.dwTotalPhys +
|
||||
ONEM - 1) / ONEM);
|
||||
hprintf(LogFile, _T("%d MBytes physical memory free.\r\n"),
|
||||
(MemInfo.dwAvailPhys + ONEM - 1) / ONEM);
|
||||
hprintf(LogFile, _T("%d MBytes paging file.\r\n"), (MemInfo.dwTotalPageFile +
|
||||
ONEM - 1) / ONEM);
|
||||
hprintf(LogFile, _T("%d MBytes paging file free.\r\n"),
|
||||
(MemInfo.dwAvailPageFile + ONEM - 1) / ONEM);
|
||||
hprintf(LogFile, _T("%d MBytes user address space.\r\n"),
|
||||
(MemInfo.dwTotalVirtual + ONEM - 1) / ONEM);
|
||||
hprintf(LogFile, _T("%d MBytes user address space free.\r\n"),
|
||||
(MemInfo.dwAvailVirtual + ONEM - 1) / ONEM);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// GetExceptionDescription
|
||||
//
|
||||
// Translate the exception code into something human readable
|
||||
static const TCHAR *GetExceptionDescription(DWORD ExceptionCode)
|
||||
{
|
||||
struct ExceptionNames
|
||||
{
|
||||
DWORD ExceptionCode;
|
||||
TCHAR * ExceptionName;
|
||||
};
|
||||
|
||||
#if 0 // from winnt.h
|
||||
#define STATUS_WAIT_0 ((DWORD )0x00000000L)
|
||||
#define STATUS_ABANDONED_WAIT_0 ((DWORD )0x00000080L)
|
||||
#define STATUS_USER_APC ((DWORD )0x000000C0L)
|
||||
#define STATUS_TIMEOUT ((DWORD )0x00000102L)
|
||||
#define STATUS_PENDING ((DWORD )0x00000103L)
|
||||
#define STATUS_SEGMENT_NOTIFICATION ((DWORD )0x40000005L)
|
||||
#define STATUS_GUARD_PAGE_VIOLATION ((DWORD )0x80000001L)
|
||||
#define STATUS_DATATYPE_MISALIGNMENT ((DWORD )0x80000002L)
|
||||
#define STATUS_BREAKPOINT ((DWORD )0x80000003L)
|
||||
#define STATUS_SINGLE_STEP ((DWORD )0x80000004L)
|
||||
#define STATUS_ACCESS_VIOLATION ((DWORD )0xC0000005L)
|
||||
#define STATUS_IN_PAGE_ERROR ((DWORD )0xC0000006L)
|
||||
#define STATUS_INVALID_HANDLE ((DWORD )0xC0000008L)
|
||||
#define STATUS_NO_MEMORY ((DWORD )0xC0000017L)
|
||||
#define STATUS_ILLEGAL_INSTRUCTION ((DWORD )0xC000001DL)
|
||||
#define STATUS_NONCONTINUABLE_EXCEPTION ((DWORD )0xC0000025L)
|
||||
#define STATUS_INVALID_DISPOSITION ((DWORD )0xC0000026L)
|
||||
#define STATUS_ARRAY_BOUNDS_EXCEEDED ((DWORD )0xC000008CL)
|
||||
#define STATUS_FLOAT_DENORMAL_OPERAND ((DWORD )0xC000008DL)
|
||||
#define STATUS_FLOAT_DIVIDE_BY_ZERO ((DWORD )0xC000008EL)
|
||||
#define STATUS_FLOAT_INEXACT_RESULT ((DWORD )0xC000008FL)
|
||||
#define STATUS_FLOAT_INVALID_OPERATION ((DWORD )0xC0000090L)
|
||||
#define STATUS_FLOAT_OVERFLOW ((DWORD )0xC0000091L)
|
||||
#define STATUS_FLOAT_STACK_CHECK ((DWORD )0xC0000092L)
|
||||
#define STATUS_FLOAT_UNDERFLOW ((DWORD )0xC0000093L)
|
||||
#define STATUS_INTEGER_DIVIDE_BY_ZERO ((DWORD )0xC0000094L)
|
||||
#define STATUS_INTEGER_OVERFLOW ((DWORD )0xC0000095L)
|
||||
#define STATUS_PRIVILEGED_INSTRUCTION ((DWORD )0xC0000096L)
|
||||
#define STATUS_STACK_OVERFLOW ((DWORD )0xC00000FDL)
|
||||
#define STATUS_CONTROL_C_EXIT ((DWORD )0xC000013AL)
|
||||
#define STATUS_FLOAT_MULTIPLE_FAULTS ((DWORD )0xC00002B4L)
|
||||
#define STATUS_FLOAT_MULTIPLE_TRAPS ((DWORD )0xC00002B5L)
|
||||
#define STATUS_ILLEGAL_VLM_REFERENCE ((DWORD )0xC00002C0L)
|
||||
#endif
|
||||
|
||||
ExceptionNames ExceptionMap[] =
|
||||
{
|
||||
{0x40010005, _T("a Control-C")},
|
||||
{0x40010008, _T("a Control-Break")},
|
||||
{0x80000002, _T("a Datatype Misalignment")},
|
||||
{0x80000003, _T("a Breakpoint")},
|
||||
{0xc0000005, _T("an Access Violation")},
|
||||
{0xc0000006, _T("an In Page Error")},
|
||||
{0xc0000017, _T("a No Memory")},
|
||||
{0xc000001d, _T("an Illegal Instruction")},
|
||||
{0xc0000025, _T("a Noncontinuable Exception")},
|
||||
{0xc0000026, _T("an Invalid Disposition")},
|
||||
{0xc000008c, _T("a Array Bounds Exceeded")},
|
||||
{0xc000008d, _T("a Float Denormal Operand")},
|
||||
{0xc000008e, _T("a Float Divide by Zero")},
|
||||
{0xc000008f, _T("a Float Inexact Result")},
|
||||
{0xc0000090, _T("a Float Invalid Operation")},
|
||||
{0xc0000091, _T("a Float Overflow")},
|
||||
{0xc0000092, _T("a Float Stack Check")},
|
||||
{0xc0000093, _T("a Float Underflow")},
|
||||
{0xc0000094, _T("an Integer Divide by Zero")},
|
||||
{0xc0000095, _T("an Integer Overflow")},
|
||||
{0xc0000096, _T("a Privileged Instruction")},
|
||||
{0xc00000fD, _T("a Stack Overflow")},
|
||||
{0xc0000142, _T("a DLL Initialization Failed")},
|
||||
{0xe06d7363, _T("a Microsoft C++ Exception")},
|
||||
};
|
||||
|
||||
for (int i = 0; i < _countof(ExceptionMap); i++)
|
||||
if (ExceptionCode == ExceptionMap[i].ExceptionCode)
|
||||
return ExceptionMap[i].ExceptionName;
|
||||
|
||||
return _T("an Unknown exception type");
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// GetFilePart
|
||||
static TCHAR * GetFilePart(LPCTSTR source)
|
||||
{
|
||||
TCHAR *result = lstrrchr(source, _T('\\'));
|
||||
if (result)
|
||||
result++;
|
||||
else
|
||||
result = (TCHAR *)source;
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef _M_IX86
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// DumpStack
|
||||
static void DumpStack(HANDLE LogFile, DWORD *pStack)
|
||||
{
|
||||
hprintf(LogFile, _T("\r\n\r\nStack:\r\n"));
|
||||
|
||||
__try
|
||||
{
|
||||
// Esp contains the bottom of the stack, or at least the bottom of
|
||||
// the currently used area.
|
||||
DWORD* pStackTop;
|
||||
|
||||
__asm
|
||||
{
|
||||
// Load the top (highest address) of the stack from the
|
||||
// thread information block. It will be found there in
|
||||
// Win9x and Windows NT.
|
||||
mov eax, fs:[4]
|
||||
mov pStackTop, eax
|
||||
}
|
||||
|
||||
if (pStackTop > pStack + MaxStackDump)
|
||||
pStackTop = pStack + MaxStackDump;
|
||||
|
||||
int Count = 0;
|
||||
|
||||
DWORD* pStackStart = pStack;
|
||||
|
||||
int nDwordsPrinted = 0;
|
||||
|
||||
while (pStack + 1 <= pStackTop)
|
||||
{
|
||||
if ((Count % StackColumns) == 0)
|
||||
{
|
||||
pStackStart = pStack;
|
||||
nDwordsPrinted = 0;
|
||||
hprintf(LogFile, _T("0x%08x: "), pStack);
|
||||
}
|
||||
hprintf(LogFile, _T("%08x "), pStack);
|
||||
if ((++Count % StackColumns) == 0 || pStack + 2 > pStackTop)
|
||||
{
|
||||
nDwordsPrinted++;
|
||||
int n = nDwordsPrinted;
|
||||
while (n < 4)
|
||||
{
|
||||
hprintf(LogFile, _T(" "));
|
||||
n++;
|
||||
}
|
||||
|
||||
for (int i = 0; i < nDwordsPrinted; i++)
|
||||
{
|
||||
DWORD dwStack = *pStackStart;
|
||||
for (int j = 0; j < 4; j++)
|
||||
{
|
||||
char c = (char)(dwStack & 0xFF);
|
||||
if (c < 0x20 || c > 0x7E)
|
||||
c = '.';
|
||||
#ifdef _UNICODE
|
||||
WCHAR w = (WCHAR)c;
|
||||
hprintf(LogFile, _T("%c"), w);
|
||||
#else
|
||||
hprintf(LogFile, _T("%c"), c);
|
||||
#endif
|
||||
dwStack = dwStack >> 8;
|
||||
}
|
||||
pStackStart++;
|
||||
}
|
||||
|
||||
hprintf(LogFile, _T("\r\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
// hprintf(LogFile, _T("%08x "), *pStack);
|
||||
nDwordsPrinted++;
|
||||
}
|
||||
pStack++;
|
||||
}
|
||||
hprintf(LogFile, _T("\r\n"));
|
||||
}
|
||||
__except(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
hprintf(LogFile, _T("Exception encountered during stack dump.\r\n"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// DumpRegisters
|
||||
static void DumpRegisters(HANDLE LogFile, PCONTEXT Context)
|
||||
{
|
||||
// Print out the register values in an XP error window compatible format.
|
||||
hprintf(LogFile, _T("\r\n"));
|
||||
hprintf(LogFile, _T("Context:\r\n"));
|
||||
hprintf(LogFile, _T("EDI: 0x%08x ESI: 0x%08x EAX: 0x%08x\r\n"),
|
||||
Context->Edi, Context->Esi, Context->Eax);
|
||||
hprintf(LogFile, _T("EBX: 0x%08x ECX: 0x%08x EDX: 0x%08x\r\n"),
|
||||
Context->Ebx, Context->Ecx, Context->Edx);
|
||||
hprintf(LogFile, _T("EIP: 0x%08x EBP: 0x%08x SegCs: 0x%08x\r\n"),
|
||||
Context->Eip, Context->Ebp, Context->SegCs);
|
||||
hprintf(LogFile, _T("EFlags: 0x%08x ESP: 0x%08x SegSs: 0x%08x\r\n"),
|
||||
Context->EFlags, Context->Esp, Context->SegSs);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
BOOL CreateLog(PEXCEPTION_POINTERS pExceptPtrs, LPCWSTR lpszMessage)
|
||||
{
|
||||
HANDLE hLogFile = CreateFile(settings.logPath, GENERIC_WRITE, 0, 0,
|
||||
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_WRITE_THROUGH, 0);
|
||||
|
||||
if (hLogFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
//OutputDebugString(_T("Error creating exception report\r\n"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// add BOM
|
||||
WORD wBOM = 0xFEFF;
|
||||
DWORD num = 0;
|
||||
WriteFile(hLogFile, &wBOM, sizeof(WORD), &num, NULL);
|
||||
// Append to the error log
|
||||
SetFilePointer(hLogFile, 0, 0, FILE_END);
|
||||
|
||||
wchar_t line[1024] = {0};
|
||||
wchar_t msgBody[4*1024] = {0};
|
||||
wchar_t winampVersionWide[1024] = {0};
|
||||
MultiByteToWideCharSZ(CP_ACP, 0, winampVersion, -1, winampVersionWide, 1024);
|
||||
StringCchPrintf(line, 1024, L"Winamp client version: %s\r\n", winampVersionWide);
|
||||
StringCchCopy(msgBody, 4*1024, line);
|
||||
|
||||
PEXCEPTION_RECORD Exception = pExceptPtrs->ExceptionRecord;
|
||||
PCONTEXT Context = pExceptPtrs->ContextRecord;
|
||||
|
||||
TCHAR szCrashModulePathName[MAX_PATH*2] = {0};
|
||||
|
||||
TCHAR *pszCrashModuleFileName = _T("Unknown");
|
||||
|
||||
#ifdef _M_IX86
|
||||
MEMORY_BASIC_INFORMATION MemInfo;
|
||||
|
||||
// VirtualQuery can be used to get the allocation base associated with a
|
||||
// code address, which is the same as the ModuleHandle. This can be used
|
||||
// to get the filename of the module that the crash happened in.
|
||||
|
||||
if (VirtualQuery((void*)Context->Eip, &MemInfo, sizeof(MemInfo)) &&
|
||||
(GetModuleFileName((HINSTANCE)MemInfo.AllocationBase,
|
||||
szCrashModulePathName,
|
||||
sizeof(szCrashModulePathName)-2) > 0))
|
||||
{
|
||||
//OutputDebugString(szCrashModulePathName);
|
||||
pszCrashModuleFileName = GetFilePart(szCrashModulePathName);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Print out the beginning of the error log in a Win95 error window
|
||||
// compatible format.
|
||||
TCHAR szModuleName[MAX_PATH*2] = {0};
|
||||
if (GetModuleFileName(0, szModuleName, _countof(szModuleName)-2) <= 0)
|
||||
StringCbCopy(szModuleName, sizeof(szModuleName), _T("Unknown"));
|
||||
|
||||
TCHAR *pszFilePart = GetFilePart(szModuleName);
|
||||
|
||||
// Extract the file name portion and remove it's file extension
|
||||
TCHAR szFileName[MAX_PATH*2] = {0};
|
||||
StringCbCopy(szFileName, sizeof(szFileName), pszFilePart);
|
||||
TCHAR *lastperiod = lstrrchr(szFileName, _T('.'));
|
||||
if (lastperiod)
|
||||
lastperiod[0] = 0;
|
||||
|
||||
#ifdef _M_IX86
|
||||
StringCchPrintf(line, 1024, L"%s caused %s (0x%08x) \r\nin module %s at %04x:%08x.\r\n\r\n",
|
||||
szFileName, GetExceptionDescription(Exception->ExceptionCode),
|
||||
Exception->ExceptionCode,
|
||||
pszCrashModuleFileName, Context->SegCs, Context->Eip);
|
||||
#endif
|
||||
StringCchCat(msgBody, 4*1024, line);
|
||||
|
||||
StringCchPrintf(line, 1024, L"Exception handler called in %s.\r\n", lpszMessage);
|
||||
StringCchCat(msgBody, 4*1024, line);
|
||||
|
||||
hprintf(hLogFile, L"%s", msgBody);
|
||||
wchar_t *p = msgBody, *end = msgBody + wcslen(msgBody);
|
||||
while(p != end)
|
||||
{
|
||||
if (*p == L'\r') *p = 1;
|
||||
if (*p == L'\n') *p = 2;
|
||||
p++;
|
||||
|
||||
}
|
||||
settings.WriteBody(msgBody);
|
||||
|
||||
if (settings.logSystem)
|
||||
{
|
||||
DumpSystemInformation(hLogFile);
|
||||
|
||||
// If the exception was an access violation, print out some additional
|
||||
// information, to the error log and the debugger.
|
||||
if (Exception->ExceptionCode == STATUS_ACCESS_VIOLATION &&
|
||||
Exception->NumberParameters >= 2)
|
||||
{
|
||||
TCHAR szDebugMessage[1000] = {0};
|
||||
const TCHAR* readwrite = _T("Read from");
|
||||
if (Exception->ExceptionInformation[0])
|
||||
readwrite = _T("Write to");
|
||||
StringCchPrintf(szDebugMessage, 1000, _T("%s location %08x caused an access violation.\r\n"),
|
||||
readwrite, Exception->ExceptionInformation[1]);
|
||||
hprintf(hLogFile, _T("%s"), szDebugMessage);
|
||||
}
|
||||
}
|
||||
if (settings.logRegistry)
|
||||
{
|
||||
#ifdef _M_IX86
|
||||
DumpRegisters(hLogFile, Context);
|
||||
#endif
|
||||
|
||||
// Print out the bytes of code at the instruction pointer. Since the
|
||||
// crash may have been caused by an instruction pointer that was bad,
|
||||
// this code needs to be wrapped in an exception handler, in case there
|
||||
// is no memory to read. If the dereferencing of code[] fails, the
|
||||
// exception handler will print '??'.
|
||||
#ifdef _M_IX86
|
||||
hprintf(hLogFile, _T("\r\nBytes at CS:EIP:\r\n"));
|
||||
BYTE * code = (BYTE *)Context->Eip;
|
||||
for (int codebyte = 0; codebyte < NumCodeBytes; codebyte++)
|
||||
{
|
||||
__try
|
||||
{
|
||||
hprintf(hLogFile, _T("%02x "), code[codebyte]);
|
||||
|
||||
}
|
||||
__except(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
hprintf(hLogFile, _T("?? "));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (settings.logStack)
|
||||
{
|
||||
// Time to print part or all of the stack to the error log. This allows
|
||||
// us to figure out the call stack, parameters, local variables, etc.
|
||||
|
||||
// Esp contains the bottom of the stack, or at least the bottom of
|
||||
// the currently used area
|
||||
|
||||
#ifdef _M_IX86
|
||||
DWORD* pStack = (DWORD *)Context->Esp;
|
||||
DumpStack(hLogFile, pStack);
|
||||
#endif
|
||||
}
|
||||
if (settings.logModule)
|
||||
{
|
||||
DumpModuleList(hLogFile);
|
||||
}
|
||||
|
||||
hprintf(hLogFile, _T("\r\n===== [end of log file] =====\r\n"));
|
||||
hflush(hLogFile);
|
||||
CloseHandle(hLogFile);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL CreateDump(PEXCEPTION_POINTERS pExceptPtrs)
|
||||
{
|
||||
BOOL retCode = FALSE;
|
||||
|
||||
// Create the file
|
||||
//OutputDebugString(_T("CreateFile: "));
|
||||
//OutputDebugString(settings.dumpPath);
|
||||
HANDLE hMiniDumpFile = CreateFile(
|
||||
settings.dumpPath,
|
||||
GENERIC_WRITE,
|
||||
0,
|
||||
NULL,
|
||||
CREATE_ALWAYS,
|
||||
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_WRITE_THROUGH,
|
||||
NULL);
|
||||
|
||||
// Write the minidump to the file
|
||||
if (hMiniDumpFile != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
retCode = DumpMiniDump(hMiniDumpFile, pExceptPtrs);
|
||||
// Close file
|
||||
CloseHandle(hMiniDumpFile);
|
||||
if (!retCode) DeleteFile(settings.dumpPath);
|
||||
}
|
||||
return retCode;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// ExceptionHandler.h Version 1.1
|
||||
//
|
||||
// Copyright © 1998 Bruce Dawson
|
||||
//
|
||||
// Author: Bruce Dawson
|
||||
// brucedawson@cygnus-software.com
|
||||
//
|
||||
// Modified by: Hans Dietrich
|
||||
// hdietrich2@hotmail.com
|
||||
//
|
||||
// A paper by the original author can be found at:
|
||||
// http://www.cygnus-software.com/papers/release_debugging.html
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef EXCEPTIONHANDLER_H
|
||||
#define EXCEPTIONHANDLER_H
|
||||
|
||||
BOOL CreateLog(PEXCEPTION_POINTERS pExceptPtrs, LPCWSTR lpszMessage);
|
||||
BOOL CreateDump(PEXCEPTION_POINTERS pExceptPtrs);
|
||||
|
||||
// We forward declare PEXCEPTION_POINTERS so that the function
|
||||
// prototype doesn't needlessly require windows.h.
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,195 @@
|
||||
// GetWinVer.cpp Version 1.1
|
||||
//
|
||||
// Copyright (C) 2001-2003 Hans Dietrich
|
||||
//
|
||||
// This software is released into the public domain.
|
||||
// You are free to use it in any way you like, except
|
||||
// that you may not sell this source code.
|
||||
//
|
||||
// This software is provided "as is" with no expressed
|
||||
// or implied warranty. I accept no liability for any
|
||||
// damage or loss of business that this software may cause.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//#include "tchar.h"
|
||||
#include "GetWinVer.h"
|
||||
|
||||
// from winbase.h
|
||||
#ifndef VER_PLATFORM_WIN32s
|
||||
#define VER_PLATFORM_WIN32s 0
|
||||
#endif
|
||||
#ifndef VER_PLATFORM_WIN32_WINDOWS
|
||||
#define VER_PLATFORM_WIN32_WINDOWS 1
|
||||
#endif
|
||||
#ifndef VER_PLATFORM_WIN32_NT
|
||||
#define VER_PLATFORM_WIN32_NT 2
|
||||
#endif
|
||||
#ifndef VER_PLATFORM_WIN32_CE
|
||||
#define VER_PLATFORM_WIN32_CE 3
|
||||
#endif
|
||||
|
||||
/*
|
||||
This table has been assembled from Usenet postings, personal
|
||||
observations, and reading other people's code. Please feel
|
||||
free to add to it or correct it.
|
||||
|
||||
|
||||
dwPlatFormID dwMajorVersion dwMinorVersion dwBuildNumber
|
||||
95 1 4 0 950
|
||||
95 SP1 1 4 0 >950 && <=1080
|
||||
95 OSR2 1 4 <10 >1080
|
||||
98 1 4 10 1998
|
||||
98 SP1 1 4 10 >1998 && <2183
|
||||
98 SE 1 4 10 >=2183
|
||||
ME 1 4 90 3000
|
||||
|
||||
NT 3.51 2 3 51
|
||||
NT 4 2 4 0 1381
|
||||
2000 2 5 0 2195
|
||||
XP 2 5 1 2600
|
||||
2003 Server 2 5 2 3790
|
||||
VISTA 2 6 0 6000
|
||||
7 2 6 1 7600
|
||||
8 2 6 2 9200
|
||||
8.1 2 6 3 9600
|
||||
10 2 10 0 10240
|
||||
11 2 11 0 22000
|
||||
|
||||
CE 3
|
||||
|
||||
*/
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// GetWinVer
|
||||
BOOL GetWinVer(LPWSTR pszVersion, int *nVersion, LPWSTR pszMajorMinorBuild)
|
||||
{
|
||||
if (!pszVersion || !nVersion || !pszMajorMinorBuild)
|
||||
return FALSE;
|
||||
lstrcpy(pszVersion, WUNKNOWNSTR);
|
||||
*nVersion = WUNKNOWN;
|
||||
|
||||
DWORD (WINAPI *RtlGetVersion)(LPOSVERSIONINFOEXW);
|
||||
OSVERSIONINFOEXW osinfo;
|
||||
*(FARPROC*)&RtlGetVersion = GetProcAddress(GetModuleHandleW(L"ntdll"), "RtlGetVersion");
|
||||
if (!RtlGetVersion) {
|
||||
return FALSE;
|
||||
}
|
||||
osinfo.dwOSVersionInfoSize = sizeof(osinfo);
|
||||
if (RtlGetVersion(&osinfo)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
DWORD dwPlatformId = osinfo.dwPlatformId;
|
||||
DWORD dwMajorVersion = osinfo.dwMajorVersion;
|
||||
DWORD dwMinorVersion = osinfo.dwMinorVersion;
|
||||
DWORD dwBuildNumber = osinfo.dwBuildNumber & 0xFFFF; // Win 95 needs this
|
||||
|
||||
wsprintfW(pszMajorMinorBuild, L"%u.%u.%u", dwMajorVersion, dwMinorVersion, dwBuildNumber);
|
||||
|
||||
if ((dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) && (dwMajorVersion == 4))
|
||||
{
|
||||
if ((dwMinorVersion < 10) && (dwBuildNumber == 950))
|
||||
{
|
||||
lstrcpy(pszVersion, W95STR);
|
||||
*nVersion = W95;
|
||||
}
|
||||
else if ((dwMinorVersion < 10) &&
|
||||
((dwBuildNumber > 950) && (dwBuildNumber <= 1080)))
|
||||
{
|
||||
lstrcpy(pszVersion, W95SP1STR);
|
||||
*nVersion = W95SP1;
|
||||
}
|
||||
else if ((dwMinorVersion < 10) && (dwBuildNumber > 1080))
|
||||
{
|
||||
lstrcpy(pszVersion, W95OSR2STR);
|
||||
*nVersion = W95OSR2;
|
||||
}
|
||||
else if ((dwMinorVersion == 10) && (dwBuildNumber == 1998))
|
||||
{
|
||||
lstrcpy(pszVersion, W98STR);
|
||||
*nVersion = W98;
|
||||
}
|
||||
else if ((dwMinorVersion == 10) &&
|
||||
((dwBuildNumber > 1998) && (dwBuildNumber < 2183)))
|
||||
{
|
||||
lstrcpy(pszVersion, W98SP1STR);
|
||||
*nVersion = W98SP1;
|
||||
}
|
||||
else if ((dwMinorVersion == 10) && (dwBuildNumber >= 2183))
|
||||
{
|
||||
lstrcpy(pszVersion, W98SESTR);
|
||||
*nVersion = W98SE;
|
||||
}
|
||||
else if (dwMinorVersion == 90)
|
||||
{
|
||||
lstrcpy(pszVersion, WMESTR);
|
||||
*nVersion = WME;
|
||||
}
|
||||
}
|
||||
else if (dwPlatformId == VER_PLATFORM_WIN32_NT)
|
||||
{
|
||||
if ((dwMajorVersion == 3) && (dwMinorVersion == 51))
|
||||
{
|
||||
lstrcpy(pszVersion, WNT351STR);
|
||||
*nVersion = WNT351;
|
||||
}
|
||||
else if ((dwMajorVersion == 4) && (dwMinorVersion == 0))
|
||||
{
|
||||
lstrcpy(pszVersion, WNT4STR);
|
||||
*nVersion = WNT4;
|
||||
}
|
||||
else if ((dwMajorVersion == 5) && (dwMinorVersion == 0))
|
||||
{
|
||||
lstrcpy(pszVersion, W2KSTR);
|
||||
*nVersion = W2K;
|
||||
}
|
||||
else if ((dwMajorVersion == 5) && (dwMinorVersion == 1))
|
||||
{
|
||||
lstrcpy(pszVersion, WXPSTR);
|
||||
*nVersion = WXP;
|
||||
}
|
||||
else if ((dwMajorVersion == 5) && (dwMinorVersion == 2))
|
||||
{
|
||||
lstrcpy(pszVersion, W2003SERVERSTR);
|
||||
*nVersion = W2003SERVER;
|
||||
}
|
||||
else if ((dwMajorVersion == 6) && (dwMinorVersion == 0))
|
||||
{
|
||||
lstrcpy(pszVersion, WVSTR);
|
||||
*nVersion = WV;
|
||||
}
|
||||
else if ((dwMajorVersion == 6) && (dwMinorVersion == 1))
|
||||
{
|
||||
lstrcpy(pszVersion, W7STR);
|
||||
*nVersion = W7;
|
||||
}
|
||||
else if ((dwMajorVersion == 6) && (dwMinorVersion == 2))
|
||||
{
|
||||
lstrcpy(pszVersion, W8STR);
|
||||
*nVersion = W8;
|
||||
}
|
||||
else if ((dwMajorVersion == 6) && (dwMinorVersion == 3))
|
||||
{
|
||||
lstrcpy(pszVersion, W81STR);
|
||||
*nVersion = W81;
|
||||
}
|
||||
else if ((dwMajorVersion == 10) && (dwMinorVersion == 0) && (dwBuildNumber < 22000))
|
||||
{
|
||||
lstrcpy(pszVersion, W10STR);
|
||||
*nVersion = W10;
|
||||
}
|
||||
else if ((dwMajorVersion == 10) && (dwMinorVersion == 0) && (dwBuildNumber >= 22000))
|
||||
{
|
||||
lstrcpy(pszVersion, W11STR);
|
||||
*nVersion = W11;
|
||||
}
|
||||
}
|
||||
else if (dwPlatformId == VER_PLATFORM_WIN32_CE)
|
||||
{
|
||||
lstrcpy(pszVersion, WCESTR);
|
||||
*nVersion = WCE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
// GetWinVer.h Version 1.1
|
||||
//
|
||||
// Copyright (C) 2001-2003 Hans Dietrich
|
||||
//
|
||||
// This software is released into the public domain.
|
||||
// You are free to use it in any way you like, except
|
||||
// that you may not sell this source code.
|
||||
//
|
||||
// This software is provided "as is" with no expressed
|
||||
// or implied warranty. I accept no liability for any
|
||||
// damage or loss of business that this software may cause.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#include <windows.h>
|
||||
|
||||
#ifndef GETWINVER_H
|
||||
#define GETWINVER_H
|
||||
|
||||
#define WUNKNOWNSTR L"Windows [Unknown version]"
|
||||
|
||||
#define W95STR L"Windows 95"
|
||||
#define W95SP1STR L"Windows 95 SP1"
|
||||
#define W95OSR2STR L"Windows 95 OSR2"
|
||||
#define W98STR L"Windows 98"
|
||||
#define W98SP1STR L"Windows 98 SP1"
|
||||
#define W98SESTR L"Windows 98 SE"
|
||||
#define WMESTR L"Windows ME"
|
||||
|
||||
#define WNT351STR L"Windows NT 3.51"
|
||||
#define WNT4STR L"Windows NT 4"
|
||||
#define W2KSTR L"Windows 2000"
|
||||
#define WXPSTR L"Windows XP"
|
||||
#define W2003SERVERSTR L"Windows 2003 Server"
|
||||
#define WVSTR L"Windows Vista"
|
||||
#define W7STR L"Windows 7"
|
||||
#define W8STR L"Windows 8"
|
||||
#define W81STR L"Windows 8.1"
|
||||
#define W10STR L"Windows 10"
|
||||
#define W11STR L"Windows 11"
|
||||
|
||||
#define WCESTR L"Windows CE"
|
||||
|
||||
|
||||
#define WUNKNOWN 0
|
||||
#define W9XFIRST 1
|
||||
#define W95 1
|
||||
#define W95SP1 2
|
||||
#define W95OSR2 3
|
||||
#define W98 4
|
||||
#define W98SP1 5
|
||||
#define W98SE 6
|
||||
#define WME 7
|
||||
#define W9XLAST 99
|
||||
|
||||
#define WNTFIRST 101
|
||||
#define WNT351 101
|
||||
#define WNT4 102
|
||||
#define W2K 103
|
||||
#define WXP 104
|
||||
#define W2003SERVER 105
|
||||
#define WV 106
|
||||
#define W7 107
|
||||
#define W8 108
|
||||
#define W81 109
|
||||
#define W10 110
|
||||
#define W11 111
|
||||
|
||||
#define WNTLAST 199
|
||||
|
||||
#define WCEFIRST 201
|
||||
#define WCE 201
|
||||
#define WCELAST 299
|
||||
|
||||
BOOL GetWinVer(LPWSTR pszVersion, int *nVersion, LPWSTR pszMajorMinorBuild);
|
||||
|
||||
#endif //GETWINVER_H
|
||||
@@ -0,0 +1,267 @@
|
||||
// MiniVersion.cpp Version 1.1
|
||||
//
|
||||
// Author: Hans Dietrich
|
||||
// hdietrich2@hotmail.com
|
||||
//
|
||||
// This software is released into the public domain.
|
||||
// You are free to use it in any way you like, except
|
||||
// that you may not sell this source code.
|
||||
//
|
||||
// This software is provided "as is" with no expressed
|
||||
// or implied warranty. I accept no liability for any
|
||||
// damage or loss of business that this software may cause.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "MiniVersion.h"
|
||||
#include <strsafe.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// ctor
|
||||
CMiniVersion::CMiniVersion(LPCTSTR lpszPath)
|
||||
{
|
||||
ZeroMemory(m_szPath, sizeof(m_szPath));
|
||||
|
||||
if (lpszPath && lpszPath[0] != 0)
|
||||
{
|
||||
lstrcpyn(m_szPath, lpszPath, sizeof(m_szPath)-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
m_pData = NULL;
|
||||
m_dwHandle = 0;
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
m_wFileVersion[i] = 0;
|
||||
m_wProductVersion[i] = 0;
|
||||
}
|
||||
|
||||
m_dwFileFlags = 0;
|
||||
m_dwFileOS = 0;
|
||||
m_dwFileType = 0;
|
||||
m_dwFileSubtype = 0;
|
||||
|
||||
ZeroMemory(m_szCompanyName, sizeof(m_szCompanyName));
|
||||
ZeroMemory(m_szProductName, sizeof(m_szProductName));
|
||||
ZeroMemory(m_szFileDescription, sizeof(m_szFileDescription));
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Init
|
||||
BOOL CMiniVersion::Init()
|
||||
{
|
||||
DWORD dwHandle;
|
||||
DWORD dwSize;
|
||||
BOOL rc;
|
||||
|
||||
dwSize = ::GetFileVersionInfoSize((LPCTSTR)m_szPath, &dwHandle);
|
||||
if (dwSize == 0)
|
||||
return FALSE;
|
||||
|
||||
m_pData = new BYTE [dwSize + 1];
|
||||
ZeroMemory(m_pData, dwSize+1);
|
||||
|
||||
rc = ::GetFileVersionInfo((LPCTSTR)m_szPath, dwHandle, dwSize, m_pData);
|
||||
if (!rc)
|
||||
return FALSE;
|
||||
|
||||
// get fixed info
|
||||
|
||||
VS_FIXEDFILEINFO FixedInfo;
|
||||
|
||||
if (GetFixedInfo(FixedInfo))
|
||||
{
|
||||
m_wFileVersion[0] = HIWORD(FixedInfo.dwFileVersionMS);
|
||||
m_wFileVersion[1] = LOWORD(FixedInfo.dwFileVersionMS);
|
||||
m_wFileVersion[2] = HIWORD(FixedInfo.dwFileVersionLS);
|
||||
m_wFileVersion[3] = LOWORD(FixedInfo.dwFileVersionLS);
|
||||
|
||||
m_wProductVersion[0] = HIWORD(FixedInfo.dwProductVersionMS);
|
||||
m_wProductVersion[1] = LOWORD(FixedInfo.dwProductVersionMS);
|
||||
m_wProductVersion[2] = HIWORD(FixedInfo.dwProductVersionLS);
|
||||
m_wProductVersion[3] = LOWORD(FixedInfo.dwProductVersionLS);
|
||||
|
||||
m_dwFileFlags = FixedInfo.dwFileFlags;
|
||||
m_dwFileOS = FixedInfo.dwFileOS;
|
||||
m_dwFileType = FixedInfo.dwFileType;
|
||||
m_dwFileSubtype = FixedInfo.dwFileSubtype;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
|
||||
// get string info
|
||||
|
||||
GetStringInfo(_T("CompanyName"), m_szCompanyName, MAX_PATH*2);
|
||||
GetStringInfo(_T("FileDescription"), m_szFileDescription, MAX_PATH*2);
|
||||
GetStringInfo(_T("ProductName"), m_szProductName, MAX_PATH*2);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Release
|
||||
void CMiniVersion::Release()
|
||||
{
|
||||
// do this manually, because we can't use objects requiring
|
||||
// a dtor within an exception handler
|
||||
if (m_pData)
|
||||
delete [] m_pData;
|
||||
m_pData = NULL;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// GetFileVersion
|
||||
BOOL CMiniVersion::GetFileVersion(WORD * pwVersion)
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
*pwVersion++ = m_wFileVersion[i];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// GetProductVersion
|
||||
BOOL CMiniVersion::GetProductVersion(WORD * pwVersion)
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
*pwVersion++ = m_wProductVersion[i];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// GetFileFlags
|
||||
BOOL CMiniVersion::GetFileFlags(DWORD& rdwFlags)
|
||||
{
|
||||
rdwFlags = m_dwFileFlags;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// GetFileOS
|
||||
BOOL CMiniVersion::GetFileOS(DWORD& rdwOS)
|
||||
{
|
||||
rdwOS = m_dwFileOS;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// GetFileType
|
||||
BOOL CMiniVersion::GetFileType(DWORD& rdwType)
|
||||
{
|
||||
rdwType = m_dwFileType;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// GetFileSubtype
|
||||
BOOL CMiniVersion::GetFileSubtype(DWORD& rdwType)
|
||||
{
|
||||
rdwType = m_dwFileSubtype;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// GetCompanyName
|
||||
BOOL CMiniVersion::GetCompanyName(LPTSTR lpszCompanyName, int nSize)
|
||||
{
|
||||
if (!lpszCompanyName)
|
||||
return FALSE;
|
||||
ZeroMemory(lpszCompanyName, nSize);
|
||||
lstrcpyn(lpszCompanyName, m_szCompanyName, nSize-1);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// GetFileDescription
|
||||
BOOL CMiniVersion::GetFileDescription(LPTSTR lpszFileDescription, int nSize)
|
||||
{
|
||||
if (!lpszFileDescription)
|
||||
return FALSE;
|
||||
ZeroMemory(lpszFileDescription, nSize);
|
||||
lstrcpyn(lpszFileDescription, m_szFileDescription, nSize-1);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// GetProductName
|
||||
BOOL CMiniVersion::GetProductName(LPTSTR lpszProductName, int nSize)
|
||||
{
|
||||
if (!lpszProductName)
|
||||
return FALSE;
|
||||
ZeroMemory(lpszProductName, nSize);
|
||||
lstrcpyn(lpszProductName, m_szProductName, nSize-1);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// protected methods
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// GetFixedInfo
|
||||
BOOL CMiniVersion::GetFixedInfo(VS_FIXEDFILEINFO& rFixedInfo)
|
||||
{
|
||||
BOOL rc;
|
||||
UINT nLength;
|
||||
VS_FIXEDFILEINFO *pFixedInfo = NULL;
|
||||
|
||||
if (!m_pData)
|
||||
return FALSE;
|
||||
|
||||
if (m_pData)
|
||||
rc = ::VerQueryValue(m_pData, _T("\\"), (void **) &pFixedInfo, &nLength);
|
||||
else
|
||||
rc = FALSE;
|
||||
|
||||
if (rc)
|
||||
memcpy (&rFixedInfo, pFixedInfo, sizeof (VS_FIXEDFILEINFO));
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// GetStringInfo
|
||||
BOOL CMiniVersion::GetStringInfo(LPCTSTR lpszKey, LPTSTR lpszReturnValue, unsigned int cchBuffer)
|
||||
{
|
||||
BOOL rc;
|
||||
DWORD *pdwTranslation;
|
||||
UINT nLength;
|
||||
LPTSTR lpszValue;
|
||||
|
||||
if (m_pData == NULL)
|
||||
return FALSE;
|
||||
|
||||
if (!lpszReturnValue)
|
||||
return FALSE;
|
||||
|
||||
if (!lpszKey)
|
||||
return FALSE;
|
||||
|
||||
*lpszReturnValue = 0;
|
||||
|
||||
rc = ::VerQueryValue(m_pData, _T("\\VarFileInfo\\Translation"),
|
||||
(void**) &pdwTranslation, &nLength);
|
||||
if (!rc)
|
||||
return FALSE;
|
||||
|
||||
TCHAR szKey[2000] = {0};
|
||||
StringCchPrintf(szKey, 2000, _T("\\StringFileInfo\\%04x%04x\\%s"), LOWORD (*pdwTranslation), HIWORD (*pdwTranslation), lpszKey);
|
||||
|
||||
rc = ::VerQueryValue(m_pData, szKey, (void**) &lpszValue, &nLength);
|
||||
|
||||
if (!rc)
|
||||
return FALSE;
|
||||
|
||||
StringCchCopy(lpszReturnValue,cchBuffer, lpszValue);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
// MiniVersion.h Version 1.1
|
||||
//
|
||||
// Author: Hans Dietrich
|
||||
// hdietrich2@hotmail.com
|
||||
//
|
||||
// This software is released into the public domain.
|
||||
// You are free to use it in any way you like, except
|
||||
// that you may not sell this source code.
|
||||
//
|
||||
// This software is provided "as is" with no expressed
|
||||
// or implied warranty. I accept no liability for any
|
||||
// damage or loss of business that this software may cause.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef MINIVERSION_H
|
||||
#define MINIVERSION_H
|
||||
|
||||
#include <windows.h>
|
||||
#include <TCHAR.h>
|
||||
|
||||
class CMiniVersion
|
||||
{
|
||||
// constructors
|
||||
public:
|
||||
CMiniVersion(LPCTSTR lpszPath = NULL);
|
||||
BOOL Init();
|
||||
void Release();
|
||||
|
||||
// operations
|
||||
public:
|
||||
|
||||
// attributes
|
||||
public:
|
||||
// fixed info
|
||||
BOOL GetFileVersion(WORD *pwVersion);
|
||||
BOOL GetProductVersion(WORD* pwVersion);
|
||||
BOOL GetFileFlags(DWORD& rdwFlags);
|
||||
BOOL GetFileOS(DWORD& rdwOS);
|
||||
BOOL GetFileType(DWORD& rdwType);
|
||||
BOOL GetFileSubtype(DWORD& rdwType);
|
||||
|
||||
// string info
|
||||
BOOL GetCompanyName(LPTSTR lpszCompanyName, int nSize);
|
||||
BOOL GetFileDescription(LPTSTR lpszFileDescription, int nSize);
|
||||
BOOL GetProductName(LPTSTR lpszProductName, int nSize);
|
||||
|
||||
// implementation
|
||||
protected:
|
||||
BOOL GetFixedInfo(VS_FIXEDFILEINFO& rFixedInfo);
|
||||
BOOL GetStringInfo(LPCTSTR lpszKey, LPTSTR lpszValue, unsigned int cchBuffer);
|
||||
|
||||
BYTE* m_pData;
|
||||
DWORD m_dwHandle;
|
||||
WORD m_wFileVersion[4];
|
||||
WORD m_wProductVersion[4];
|
||||
DWORD m_dwFileFlags;
|
||||
DWORD m_dwFileOS;
|
||||
DWORD m_dwFileType;
|
||||
DWORD m_dwFileSubtype;
|
||||
|
||||
TCHAR m_szPath[MAX_PATH*2];
|
||||
TCHAR m_szCompanyName[MAX_PATH*2];
|
||||
TCHAR m_szProductName[MAX_PATH*2];
|
||||
TCHAR m_szFileDescription[MAX_PATH*2];
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#endif
|
||||
@@ -0,0 +1,3 @@
|
||||
gen_crasher ver 1.0b
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef NULLSOFT_APIH
|
||||
#define NULLSOFT_APIH
|
||||
|
||||
#include <api/service/api_service.h>
|
||||
extern api_service *serviceManager;
|
||||
#define WASABI_API_SVC serviceManager
|
||||
|
||||
|
||||
#include <api/application/api_application.h>
|
||||
#define WASABI_API_APP applicationApi
|
||||
|
||||
|
||||
#include <api/syscb/api_syscb.h>
|
||||
#define WASABI_API_SYSCB sysCallbackApi
|
||||
|
||||
#include <api/service/waServiceFactory.h>
|
||||
|
||||
#include "../Agave/Language/api_language.h"
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,308 @@
|
||||
#include <shlwapi.h>
|
||||
#include "..\..\..\nu\ns_wc.h"
|
||||
#include "config.h"
|
||||
#include <strsafe.h>
|
||||
|
||||
///////////////////
|
||||
///
|
||||
/// UNICODE VERSION
|
||||
///
|
||||
/////
|
||||
ConfigW::ConfigW()
|
||||
{
|
||||
emptyBOM = FALSE;
|
||||
buff[0] = 0;
|
||||
buffA = NULL;
|
||||
fileName = NULL;
|
||||
defSection = NULL;
|
||||
}
|
||||
|
||||
ConfigW::ConfigW(const wchar_t *ini, const wchar_t *section)
|
||||
{
|
||||
emptyBOM = FALSE;
|
||||
buff[0] = 0;
|
||||
buffA = NULL;
|
||||
fileName = NULL;
|
||||
defSection = NULL;
|
||||
if (SetIniFile(ini)) SetSection(section);
|
||||
}
|
||||
|
||||
ConfigW::~ConfigW()
|
||||
{
|
||||
if (fileName) free(fileName);
|
||||
if (defSection) free(defSection);
|
||||
if (buffA) free(buffA);
|
||||
if (emptyBOM) RemoveEmptyFile();
|
||||
}
|
||||
|
||||
void ConfigW::Flush(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
BOOL ConfigW::Write(const wchar_t *section, const wchar_t *name, const wchar_t *value)
|
||||
{
|
||||
return (fileName) ? WritePrivateProfileString(section, name, value, fileName) : FALSE;
|
||||
}
|
||||
|
||||
BOOL ConfigW::Write(const wchar_t *section, const wchar_t *name, double value)
|
||||
{
|
||||
wchar_t tmp[48] = {0};
|
||||
if (S_OK != StringCchPrintf(tmp, 48, L"%g", value)) return FALSE;
|
||||
return Write(section, name, tmp);
|
||||
}
|
||||
|
||||
BOOL ConfigW::Write(const wchar_t *section, const wchar_t *name, long long value)
|
||||
{
|
||||
wchar_t tmp[32] = {0};
|
||||
if (S_OK != StringCchPrintf(tmp, 32, L"%I64d", value)) return FALSE;
|
||||
return Write(section,name, tmp);
|
||||
}
|
||||
|
||||
BOOL ConfigW::Write(const wchar_t *section, const wchar_t *name, int value)
|
||||
{
|
||||
wchar_t tmp[16] = {0};
|
||||
if (S_OK != StringCchPrintf(tmp, 16, L"%d", value)) return FALSE;
|
||||
return Write(section,name, tmp);
|
||||
}
|
||||
|
||||
BOOL ConfigW::Write(const wchar_t *section, const wchar_t *name, const char *value)
|
||||
{
|
||||
int len = (int)strlen(value) + 1;
|
||||
wchar_t *tmp = (wchar_t*)malloc(len*sizeof(wchar_t));
|
||||
if (!tmp) return FALSE;
|
||||
|
||||
BOOL ret = FALSE;
|
||||
if (MultiByteToWideCharSZ(CP_ACP, 0, value, -1, tmp, len))
|
||||
{
|
||||
ret = Write(section,name, tmp);
|
||||
}
|
||||
free(tmp);
|
||||
return ret;
|
||||
}
|
||||
|
||||
BOOL ConfigW::Write(const wchar_t *name, int value)
|
||||
{
|
||||
if(!defSection) return FALSE;
|
||||
return Write(defSection, name, value);
|
||||
}
|
||||
|
||||
BOOL ConfigW::Write(const wchar_t *name, long long value)
|
||||
{
|
||||
if(!defSection) return FALSE;
|
||||
return Write(defSection, name, value);
|
||||
}
|
||||
|
||||
BOOL ConfigW::Write(const wchar_t *name, double value)
|
||||
{
|
||||
if(!defSection) return FALSE;
|
||||
return Write(defSection, name, value);
|
||||
}
|
||||
|
||||
BOOL ConfigW::Write(const wchar_t *name, const wchar_t *value)
|
||||
{
|
||||
if(!defSection) return FALSE;
|
||||
return Write(defSection, name, value);
|
||||
}
|
||||
|
||||
BOOL ConfigW::Write(const wchar_t *name, const char value)
|
||||
{
|
||||
if(!defSection) return FALSE;
|
||||
return Write(defSection, name, value);
|
||||
}
|
||||
|
||||
int ConfigW::ReadInt(const wchar_t *section, const wchar_t *name, int defvalue)
|
||||
{
|
||||
if (!fileName) return defvalue;
|
||||
return GetPrivateProfileInt(section, name, defvalue, fileName);
|
||||
}
|
||||
|
||||
long long ConfigW::ReadInt64(const wchar_t *section, const wchar_t *name, long long defvalue)
|
||||
{
|
||||
if (!fileName) return defvalue;
|
||||
wchar_t tmp[32] = {0};
|
||||
if (S_OK != StringCchPrintf(tmp, 32, L"%I64d", defvalue)) return defvalue;
|
||||
const wchar_t *ret = ReadStringW(section, name, tmp);
|
||||
return _wtoi64(ret);
|
||||
}
|
||||
|
||||
double ConfigW::ReadDouble(const wchar_t *section, const wchar_t *name, double defvalue)
|
||||
{
|
||||
if (!fileName) return defvalue;
|
||||
wchar_t tmp[32] = {0};
|
||||
if (S_OK != StringCchPrintf(tmp, 32, L"%g", defvalue)) return defvalue;
|
||||
const wchar_t *ret = ReadStringW(section, name, tmp);
|
||||
return _wtof(ret);
|
||||
}
|
||||
|
||||
const char* ConfigW::ReadStringA(const wchar_t *section, const wchar_t *name, const char *defvalue)
|
||||
{
|
||||
if (buffA) free(buffA);
|
||||
if (!fileName) return defvalue;
|
||||
|
||||
int len = (int)strlen(defvalue) + 1;
|
||||
wchar_t *tmp = (wchar_t*)malloc(len *sizeof(wchar_t));
|
||||
if (!tmp) return defvalue;
|
||||
|
||||
if (!MultiByteToWideCharSZ(CP_ACP, 0, defvalue, -1, tmp, len))
|
||||
{
|
||||
free(tmp);
|
||||
return defvalue;
|
||||
}
|
||||
const wchar_t *ret = ReadStringW(section, name, tmp);
|
||||
if (!ret || lstrcmp(ret, tmp) == 0)
|
||||
{
|
||||
free(tmp);
|
||||
return defvalue;
|
||||
}
|
||||
free(tmp);
|
||||
|
||||
len = (int)lstrlen(ret) + 1;
|
||||
|
||||
buffA = (char*)malloc(len*sizeof(char));
|
||||
if (!buffA) return defvalue;
|
||||
if (WideCharToMultiByteSZ(CP_ACP, 0, ret, -1, buffA, len, NULL, NULL))
|
||||
{
|
||||
free(buffA);
|
||||
buffA = NULL;
|
||||
return defvalue;
|
||||
}
|
||||
return buffA;
|
||||
}
|
||||
|
||||
const wchar_t* ConfigW::ReadStringW(const wchar_t *section, const wchar_t *name, const wchar_t *defvalue)
|
||||
{
|
||||
if (!fileName) return defvalue;
|
||||
static wchar_t def[] = L"_$~$_";
|
||||
buff[0] = 0;
|
||||
int len = GetPrivateProfileString(section, name, def, buff, BUFF_SIZE, fileName);
|
||||
if (!len || !lstrcmp(def,buff)) return defvalue;
|
||||
buff[BUFF_SIZE-1]=0;
|
||||
return buff;
|
||||
}
|
||||
|
||||
int ConfigW::ReadInt(const wchar_t *name, int defvalue)
|
||||
{
|
||||
if(!defSection) return defvalue;
|
||||
return ReadInt(defSection, name, defvalue);
|
||||
}
|
||||
|
||||
long long ConfigW::ReadInt64(const wchar_t *name, long long defvalue)
|
||||
{
|
||||
if(!defSection) return defvalue;
|
||||
return ReadInt64(defSection, name, defvalue);
|
||||
}
|
||||
|
||||
double ConfigW::ReadDouble(const wchar_t *name, double defvalue)
|
||||
{
|
||||
if(!defSection) return defvalue;
|
||||
return ReadDouble(defSection, name, defvalue);
|
||||
}
|
||||
|
||||
const char* ConfigW::ReadStringA(const wchar_t *name, const char *defvalue)
|
||||
{
|
||||
if(!defSection) return defvalue;
|
||||
return ReadStringA(defSection, name, defvalue);
|
||||
}
|
||||
|
||||
const wchar_t* ConfigW::ReadStringW(const wchar_t *name, const wchar_t *defvalue)
|
||||
{
|
||||
if(!defSection) return defvalue;
|
||||
return ReadStringW(defSection, name, defvalue);
|
||||
}
|
||||
|
||||
BOOL ConfigW::SetSection(const wchar_t *section)
|
||||
{
|
||||
if (defSection)
|
||||
{
|
||||
free(defSection);
|
||||
defSection = NULL;
|
||||
}
|
||||
size_t len;
|
||||
len = lstrlen(section) + 1;
|
||||
defSection = (wchar_t*)malloc(len*sizeof(wchar_t));
|
||||
if (NULL == defSection)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (S_OK != StringCchCopy(defSection, len, section))
|
||||
{
|
||||
free(defSection);
|
||||
defSection = NULL;
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL ConfigW::SetIniFile(const wchar_t *file)
|
||||
{
|
||||
if (fileName)
|
||||
{
|
||||
if (emptyBOM) RemoveEmptyFile();
|
||||
free(fileName);
|
||||
fileName = NULL;
|
||||
}
|
||||
size_t len;
|
||||
len = lstrlen(file) + 1;
|
||||
fileName = (wchar_t*)malloc(len*sizeof(wchar_t));
|
||||
if (NULL == fileName) return FALSE;
|
||||
|
||||
if (S_OK != StringCchCopy(fileName, len, file))
|
||||
{
|
||||
free(fileName);
|
||||
fileName = NULL;
|
||||
return FALSE;
|
||||
}
|
||||
if (fileName) CreateFileWithBOM();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
const wchar_t* ConfigW::GetSection(void)
|
||||
{
|
||||
return defSection;
|
||||
}
|
||||
|
||||
const wchar_t* ConfigW::GetFile(void)
|
||||
{
|
||||
return fileName;
|
||||
}
|
||||
|
||||
void ConfigW::CreateFileWithBOM(void)
|
||||
{
|
||||
// benski> this doesn't seem to be working on win9x
|
||||
HANDLE hFile = CreateFile(fileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if (INVALID_HANDLE_VALUE == hFile)
|
||||
{
|
||||
WORD wBOM = 0xFEFF;
|
||||
DWORD num = 0;
|
||||
hFile = CreateFile(fileName, GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
WriteFile(hFile, &wBOM, sizeof(WORD), &num, NULL);
|
||||
emptyBOM = TRUE;
|
||||
}
|
||||
CloseHandle(hFile);
|
||||
}
|
||||
|
||||
void ConfigW::RemoveEmptyFile(void)
|
||||
{
|
||||
emptyBOM = FALSE;
|
||||
HANDLE hFile = CreateFile(fileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if (INVALID_HANDLE_VALUE == hFile) return;
|
||||
DWORD fsize;
|
||||
fsize = GetFileSize(hFile, NULL);
|
||||
CloseHandle(hFile);
|
||||
if (fsize == 2) DeleteFile(fileName);
|
||||
return;
|
||||
}
|
||||
|
||||
BOOL ConfigW::IsFileExist(void)
|
||||
{
|
||||
HANDLE hFile = CreateFile(fileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
BOOL exist = (INVALID_HANDLE_VALUE != hFile);
|
||||
if (exist)
|
||||
{
|
||||
exist = (GetFileSize(hFile, NULL) != 2);
|
||||
CloseHandle(hFile);
|
||||
}
|
||||
return exist;
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
#ifndef NULLSOFT_CONFIG_H_
|
||||
#define NULLSOFT_CONFIG_H_
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <memory.h>
|
||||
|
||||
#define BUFF_SIZE 8192
|
||||
|
||||
class ConfigW
|
||||
{
|
||||
public:
|
||||
ConfigW();
|
||||
ConfigW(const wchar_t *ini, const wchar_t *section);
|
||||
~ConfigW();
|
||||
|
||||
public:
|
||||
void Flush(void);
|
||||
|
||||
BOOL Write(const wchar_t *name, double value);
|
||||
BOOL Write(const wchar_t *section, const wchar_t *name, double value);
|
||||
BOOL Write(const wchar_t *name, long long value);
|
||||
BOOL Write(const wchar_t *section, const wchar_t *name, long long value);
|
||||
BOOL Write(const wchar_t *name, int value);
|
||||
BOOL Write(const wchar_t *section, const wchar_t *name, int value);
|
||||
BOOL Write(const wchar_t *name, const wchar_t *value);
|
||||
BOOL Write(const wchar_t *section, const wchar_t *name, const wchar_t *value);
|
||||
BOOL Write(const wchar_t *name, const char value);
|
||||
BOOL Write(const wchar_t *section, const wchar_t *name, const char *value);
|
||||
|
||||
int ReadInt(const wchar_t *name, int defvalue);
|
||||
long long ReadInt64(const wchar_t *name, long long defvalue);
|
||||
double ReadDouble(const wchar_t *name, double defvalue);
|
||||
const char* ReadStringA(const wchar_t *name, const char *defvalue);
|
||||
const wchar_t* ReadStringW(const wchar_t *name, const wchar_t *defvalue);
|
||||
int ReadInt(const wchar_t *section, const wchar_t *name, int defvalue);
|
||||
long long ReadInt64(const wchar_t *section, const wchar_t *name, long long defvalue);
|
||||
double ReadDouble(const wchar_t *section, const wchar_t *name, double defvalue);
|
||||
const char* ReadStringA(const wchar_t *section, const wchar_t *name, const char *defvalue);
|
||||
const wchar_t* ReadStringW(const wchar_t *section, const wchar_t *name, const wchar_t *defvalue);
|
||||
|
||||
BOOL SetSection(const wchar_t *section);
|
||||
BOOL SetIniFile(const wchar_t *file);
|
||||
BOOL IsFileExist(void);
|
||||
|
||||
const wchar_t* GetSection(void);
|
||||
const wchar_t* GetFile(void);
|
||||
private:
|
||||
HANDLE CreateFileHandle();
|
||||
void CreateFileWithBOM(void);
|
||||
void RemoveEmptyFile(void);
|
||||
private:
|
||||
BOOL emptyBOM;
|
||||
wchar_t buff[BUFF_SIZE];
|
||||
char *buffA;
|
||||
wchar_t *fileName;
|
||||
wchar_t *defSection;
|
||||
};
|
||||
|
||||
#endif //NULLSOFT_CONFIG_H_
|
||||
@@ -0,0 +1,457 @@
|
||||
#include ".\configdlg.h"
|
||||
#include ".\smtpdlg.h"
|
||||
#include ".\resource.h"
|
||||
#include <shlobj.h>
|
||||
#include ".\miniVersion.h"
|
||||
#include ".\getwinver.h"
|
||||
#include ".\settings.h"
|
||||
#include ".\minidump.h"
|
||||
#include ".\main.h"
|
||||
#include <strsafe.h>
|
||||
#include "api__gen_crasher.h"
|
||||
|
||||
extern Settings settings;
|
||||
|
||||
BOOL CALLBACK ConfigDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static wchar_t *path;
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
HWND hwCombo = GetDlgItem(hwndDlg, IDC_CMB_DMPTYPE);
|
||||
|
||||
// detect windows version
|
||||
wchar_t strBuff[2048] = {0}, winVer[32] = {0}, build[32] = {0};
|
||||
int nWinVer = 0;
|
||||
GetWinVer(winVer, &nWinVer, build);
|
||||
StringCchPrintf(strBuff, 2048, L"%s (%s)", winVer, build);
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_LBL_OSVERSION), strBuff);
|
||||
|
||||
// discover dbghlp.dll
|
||||
HMODULE hm = NULL;
|
||||
// first in app folder
|
||||
if (GetModuleFileName( NULL, strBuff, _MAX_PATH ))
|
||||
{
|
||||
wchar_t *pSlash = wcsrchr( strBuff, L'\\' );
|
||||
if (pSlash)
|
||||
{
|
||||
StringCchCopy(pSlash+1, 2048 - (pSlash + 1 - strBuff), L"dbghelp.dll" );
|
||||
hm = LoadLibraryW( strBuff );
|
||||
}
|
||||
}
|
||||
if (!hm)
|
||||
{
|
||||
// load any version we can
|
||||
hm = LoadLibraryW(L"dbghelp.dll");
|
||||
}
|
||||
|
||||
if (hm)
|
||||
{
|
||||
GetModuleFileName(hm, strBuff, 2048);
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_LBL_DLLPATH), strBuff);
|
||||
// try to get dll version
|
||||
CMiniVersion ver(strBuff);
|
||||
if(ver.Init())
|
||||
{
|
||||
WORD dwBuf[4] = {0};
|
||||
ver.GetProductVersion(dwBuf);
|
||||
StringCchPrintf(strBuff, 2048, L"%d.%d.%d.%d", dwBuf[0], dwBuf[1], dwBuf[2], dwBuf[3]);
|
||||
}
|
||||
else
|
||||
{
|
||||
WASABI_API_LNGSTRINGW_BUF(IDS_UNABLE_TO_LOAD, strBuff, 128);
|
||||
}
|
||||
ver.Release();
|
||||
|
||||
BOOL (WINAPI* MiniDumpWriteDump)(
|
||||
HANDLE hProcess,
|
||||
DWORD ProcessId,
|
||||
HANDLE hFile,
|
||||
MINIDUMP_TYPE DumpType,
|
||||
PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,
|
||||
PMINIDUMP_EXCEPTION_INFORMATION UserStreamParam,
|
||||
PMINIDUMP_EXCEPTION_INFORMATION CallbackParam
|
||||
) = NULL;
|
||||
*(FARPROC*)&MiniDumpWriteDump = GetProcAddress(hm, "MiniDumpWriteDump");
|
||||
|
||||
wchar_t temp[256] = {0};
|
||||
StringCchPrintfW(temp, 256, L"%s [%s]", strBuff, WASABI_API_LNGSTRINGW(MiniDumpWriteDump ? IDS_LOADED_OK : IDS_UNABLE_TO_LOAD));
|
||||
SetDlgItemText(hwndDlg, IDC_LBL_DLLVERSION, temp);
|
||||
|
||||
FreeLibrary(hm);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_LBL_DLLPATH), WASABI_API_LNGSTRINGW(IDS_NOT_FOUND));
|
||||
wchar_t temp[256] = {0}, temp2[128] = {0};
|
||||
StringCchPrintfW(temp, 256, L"%s [%s]", WASABI_API_LNGSTRINGW(IDS_UNKNOWN), WASABI_API_LNGSTRINGW_BUF(IDS_UNABLE_TO_LOAD, temp2, 128));
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_LBL_DLLVERSION), temp);
|
||||
}
|
||||
// set combobox with values
|
||||
WPARAM pos;
|
||||
pos = SendMessage(hwCombo, CB_ADDSTRING, 0, (LPARAM) L"MiniDumpNormal");
|
||||
SendMessage(hwCombo, CB_SETITEMDATA, pos, 0x00000000);
|
||||
pos = SendMessage(hwCombo, CB_ADDSTRING, 0, (LPARAM) L"MiniDumpWithDataSegs");
|
||||
SendMessage(hwCombo, CB_SETITEMDATA, pos, 0x00000001);
|
||||
pos = SendMessage(hwCombo, CB_ADDSTRING, 0, (LPARAM) L"MiniDumpWithFullMemory");
|
||||
SendMessage(hwCombo, CB_SETITEMDATA, pos, 0x00000002);
|
||||
pos = SendMessage(hwCombo, CB_ADDSTRING, 0, (LPARAM) L"MiniDumpWithHandleData (Not Supported: Windows Me/98/95)");
|
||||
SendMessage(hwCombo, CB_SETITEMDATA, pos, 0x00000004);
|
||||
pos = SendMessage(hwCombo, CB_ADDSTRING, 0, (LPARAM) L"MiniDumpFilterMemory");
|
||||
SendMessage(hwCombo, CB_SETITEMDATA, pos, 0x00000008);
|
||||
pos = SendMessage(hwCombo, CB_ADDSTRING, 0, (LPARAM) L"MiniDumpScanMemory");
|
||||
SendMessage(hwCombo, CB_SETITEMDATA, pos, 0x00000010);
|
||||
pos = SendMessage(hwCombo, CB_ADDSTRING, 0, (LPARAM) L"MiniDumpWithUnloadedModules (Not Supported: DbgHelp 5.1 and earlier)");
|
||||
SendMessage(hwCombo, CB_SETITEMDATA, pos, 0x00000020);
|
||||
pos = SendMessage(hwCombo, CB_ADDSTRING, 0, (LPARAM) L"MiniDumpWithIndirectlyReferencedMemory (Not Supported: DbgHelp 5.1 and earlier)");
|
||||
SendMessage(hwCombo, CB_SETITEMDATA, pos, 0x00000040);
|
||||
pos = SendMessage(hwCombo, CB_ADDSTRING, 0, (LPARAM) L"MiniDumpFilterModulePaths (Not Supported: DbgHelp 5.1 and earlier)");
|
||||
SendMessage(hwCombo, CB_SETITEMDATA, pos, 0x00000080);
|
||||
pos = SendMessage(hwCombo, CB_ADDSTRING, 0, (LPARAM) L"MiniDumpWithProcessThreadData (Not Supported: DbgHelp 5.1 and earlier)");
|
||||
SendMessage(hwCombo, CB_SETITEMDATA, pos, 0x00000100);
|
||||
pos = SendMessage(hwCombo, CB_ADDSTRING, 0, (LPARAM) L"MiniDumpWithPrivateReadWriteMemory (Not Supported: DbgHelp 5.1 and earlier)");
|
||||
SendMessage(hwCombo, CB_SETITEMDATA, pos, 0x00000200);
|
||||
pos = SendMessage(hwCombo, CB_ADDSTRING, 0, (LPARAM) L"MiniDumpWithoutOptionalData (Not Supported: DbgHelp 6.1 and earlier)");
|
||||
SendMessage(hwCombo, CB_SETITEMDATA, pos, 0x00000400);
|
||||
pos = SendMessage(hwCombo, CB_ADDSTRING, 0, (LPARAM) L"MiniDumpWithFullMemoryInfo (Not Supported: DbgHelp 6.1 and earlier)");
|
||||
SendMessage(hwCombo, CB_SETITEMDATA, pos, 0x00000800);
|
||||
pos = SendMessage(hwCombo, CB_ADDSTRING, 0, (LPARAM) L"MiniDumpWithThreadInfo (Not Supported: DbgHelp 6.1 and earlier)");
|
||||
SendMessage(hwCombo, CB_SETITEMDATA, pos, 0x00001000);
|
||||
pos = SendMessage(hwCombo, CB_ADDSTRING, 0, (LPARAM) L"MiniDumpWithCodeSegs (Not Supported: DbgHelp 6.1 and earlier)");
|
||||
SendMessage(hwCombo, CB_SETITEMDATA, pos, 0x00002000);
|
||||
|
||||
// read settings
|
||||
settings.Load();
|
||||
CheckDlgButton(hwndDlg, IDC_CHK_CREATELOG, settings.createLOG);
|
||||
CheckDlgButton(hwndDlg, IDC_CHK_CREATEDMP, settings.createDMP);
|
||||
CheckDlgButton(hwndDlg, IDC_CHK_RESTART, settings.autoRestart);
|
||||
CheckDlgButton(hwndDlg, IDC_CHK_SILENT, settings.silentMode);
|
||||
CheckDlgButton(hwndDlg, IDC_CHK_SEND, settings.sendData);
|
||||
CheckDlgButton(hwndDlg, IDC_CHK_COMPRESS, settings.zipData);
|
||||
CheckDlgButton(hwndDlg, IDC_RB_USECLIENT, settings.sendByClient);
|
||||
CheckDlgButton(hwndDlg, IDC_RB_USESMTP, settings.sendBySMTP);
|
||||
|
||||
CreatePathFromFullName(&path, settings.zipPath);
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_EDT_PATH), path);
|
||||
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_EDT_ZIPNAME), GetFileName(settings.zipPath));
|
||||
|
||||
SelectComboBoxItem(hwCombo, settings.dumpType);
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_EDT_DMPPATH), GetFileName(settings.dumpPath));
|
||||
|
||||
CheckDlgButton(hwndDlg, IDC_CHK_LOGSYSTEM, settings.logSystem);
|
||||
CheckDlgButton(hwndDlg, IDC_CHK_LOGREGISTRY, settings.logRegistry);
|
||||
CheckDlgButton(hwndDlg, IDC_CHK_LOGSTACK, settings.logStack);
|
||||
CheckDlgButton(hwndDlg, IDC_CHK_LOGMODULE, settings.logModule);
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_EDT_LOGPATH), GetFileName(settings.logPath));
|
||||
|
||||
UpdateSend(hwndDlg, settings.sendData);
|
||||
UpdateZip(hwndDlg, settings.zipData);
|
||||
UpdateCreateDmp(hwndDlg, settings.createDMP);
|
||||
UpdateCreateLog(hwndDlg, settings.createLOG);
|
||||
}
|
||||
break;
|
||||
case WM_DESTROY:
|
||||
{
|
||||
wchar_t buf[1024] = {0};
|
||||
int len, pathlen;
|
||||
|
||||
HWND hwCombo;
|
||||
settings.createLOG = (SendMessage(GetDlgItem(hwndDlg, IDC_CHK_CREATELOG), BM_GETCHECK, 0,0) == BST_CHECKED);
|
||||
settings.createDMP = (SendMessage(GetDlgItem(hwndDlg, IDC_CHK_CREATEDMP), BM_GETCHECK, 0,0) == BST_CHECKED);
|
||||
settings.autoRestart = (SendMessage(GetDlgItem(hwndDlg, IDC_CHK_RESTART), BM_GETCHECK, 0,0) == BST_CHECKED);
|
||||
settings.silentMode = (SendMessage(GetDlgItem(hwndDlg, IDC_CHK_SILENT), BM_GETCHECK, 0,0) == BST_CHECKED);
|
||||
settings.sendData = (SendMessage(GetDlgItem(hwndDlg, IDC_CHK_SEND), BM_GETCHECK, 0,0) == BST_CHECKED);
|
||||
settings.sendByClient = (SendMessage(GetDlgItem(hwndDlg, IDC_RB_USECLIENT), BM_GETCHECK, 0,0) == BST_CHECKED);
|
||||
settings.sendBySMTP = !settings.sendByClient;
|
||||
settings.zipData = (SendMessage(GetDlgItem(hwndDlg, IDC_CHK_COMPRESS), BM_GETCHECK, 0,0) == BST_CHECKED);
|
||||
|
||||
len = GetWindowText(GetDlgItem(hwndDlg, IDC_EDT_PATH), buf, 1024);
|
||||
if (path) free(path);
|
||||
path = NULL;
|
||||
if (len)
|
||||
{
|
||||
int cpyLen;
|
||||
path = (wchar_t*)malloc((len +1)*2);
|
||||
cpyLen = (buf[len-1] == L'\\') ? len -1: len;
|
||||
StringCchCopyN(path, len + 1, buf, cpyLen);
|
||||
}
|
||||
pathlen = (path) ? (int)lstrlen(path) + 1 : 0;
|
||||
|
||||
if (settings.zipPath) free(settings.zipPath);
|
||||
settings.zipPath = NULL;
|
||||
len = GetWindowText(GetDlgItem(hwndDlg, IDC_EDT_ZIPNAME), buf, 1024);
|
||||
if (len)
|
||||
{
|
||||
if (pathlen)
|
||||
{
|
||||
len += pathlen;
|
||||
settings.zipPath = (wchar_t*)malloc((len + 1)*2);
|
||||
StringCchPrintf(settings.zipPath, len+1, L"%s\\%s", path, buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
settings.zipPath = (wchar_t*)malloc((len + 1)*2);
|
||||
StringCchCopy(settings.zipPath, len+1, buf);
|
||||
}
|
||||
}
|
||||
else // because path is based on the zipPath just write path
|
||||
{
|
||||
if (pathlen)
|
||||
{
|
||||
len = pathlen;
|
||||
settings.zipPath = (wchar_t*)malloc((len + 1)*2);
|
||||
StringCchPrintf(settings.zipPath, len+1, L"%s\\", path);
|
||||
}
|
||||
}
|
||||
|
||||
hwCombo = GetDlgItem(hwndDlg, IDC_CMB_DMPTYPE);
|
||||
settings.dumpType = (int) SendMessage(hwCombo, CB_GETITEMDATA, SendMessage(hwCombo, CB_GETCURSEL, 0, 0), 0);
|
||||
|
||||
if (settings.dumpPath) free(settings.dumpPath);
|
||||
settings.dumpPath = NULL;
|
||||
len = GetWindowText(GetDlgItem(hwndDlg, IDC_EDT_DMPNAME), buf, 1024);
|
||||
if (len)
|
||||
{
|
||||
if (pathlen)
|
||||
{
|
||||
len += pathlen;
|
||||
settings.dumpPath = (wchar_t*)malloc((len + 1)*2);
|
||||
StringCchPrintf(settings.dumpPath, len+1, L"%s\\%s", path, buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
settings.dumpPath = (wchar_t*)malloc((len + 1)*2);
|
||||
StringCchCopy(settings.dumpPath, len+1, buf);
|
||||
}
|
||||
}
|
||||
|
||||
settings.logSystem = (SendMessage(GetDlgItem(hwndDlg, IDC_CHK_LOGSYSTEM), BM_GETCHECK, 0,0) == BST_CHECKED);
|
||||
settings.logRegistry = (SendMessage(GetDlgItem(hwndDlg, IDC_CHK_LOGREGISTRY), BM_GETCHECK, 0,0) == BST_CHECKED);
|
||||
settings.logStack = (SendMessage(GetDlgItem(hwndDlg, IDC_CHK_LOGSTACK), BM_GETCHECK, 0,0) == BST_CHECKED);
|
||||
settings.logModule = (SendMessage(GetDlgItem(hwndDlg, IDC_CHK_LOGMODULE), BM_GETCHECK, 0,0) == BST_CHECKED);
|
||||
|
||||
if (settings.logPath) free(settings.logPath);
|
||||
settings.logPath = NULL;
|
||||
len = GetWindowText(GetDlgItem(hwndDlg, IDC_EDT_LOGNAME), buf, 1024);
|
||||
if (len)
|
||||
{
|
||||
if (pathlen)
|
||||
{
|
||||
len += pathlen;
|
||||
settings.logPath = (wchar_t*)malloc((len + 1)*2);
|
||||
StringCchPrintf(settings.logPath, len+1, L"%s\\%s", path, buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
settings.logPath = (wchar_t*)malloc((len + 1)*2);
|
||||
StringCchCopy(settings.logPath, len+1, buf);
|
||||
}
|
||||
}
|
||||
|
||||
if (!settings.Save())
|
||||
{
|
||||
wchar_t title[32] = {0};
|
||||
MessageBox(NULL, WASABI_API_LNGSTRINGW(IDS_UNABLE_TO_SAVE_SETTINGS),
|
||||
WASABI_API_LNGSTRINGW_BUF(IDS_SAVE_ERROR,title,32), MB_OK);
|
||||
}
|
||||
|
||||
if(path) free(path);
|
||||
path = NULL;
|
||||
break;
|
||||
}
|
||||
case WM_COMMAND:
|
||||
int ctrl = LOWORD(wParam);
|
||||
switch (ctrl)
|
||||
{
|
||||
case IDC_CHK_CREATELOG:
|
||||
case IDC_CHK_CREATEDMP:
|
||||
case IDC_CHK_SEND:
|
||||
case IDC_CHK_COMPRESS:
|
||||
if (HIWORD(wParam) == BN_CLICKED)
|
||||
{
|
||||
BOOL enabled = (SendMessage((HWND) lParam, BM_GETCHECK, 0,0) == BST_CHECKED);
|
||||
if (ctrl == IDC_CHK_CREATELOG) UpdateCreateLog(hwndDlg, enabled);
|
||||
else if (ctrl == IDC_CHK_CREATEDMP) UpdateCreateDmp(hwndDlg, enabled);
|
||||
else if (ctrl == IDC_CHK_SEND) UpdateSend(hwndDlg, enabled);
|
||||
else if (ctrl == IDC_CHK_COMPRESS) UpdateZip(hwndDlg, enabled);
|
||||
}
|
||||
break;
|
||||
case IDC_RB_USESMTP:
|
||||
case IDC_RB_USECLIENT:
|
||||
if (HIWORD(wParam) == BN_CLICKED) UpdateSendType(hwndDlg, (ctrl == IDC_RB_USESMTP));
|
||||
break;
|
||||
case IDC_BTN_PATH:
|
||||
{
|
||||
wchar_t szFile[2048] = {0}; // buffer for file name
|
||||
GetWindowText(GetDlgItem(hwndDlg, IDC_EDT_PATH), szFile, 2048);
|
||||
if (OpenFolderDialog(NULL, szFile))SetWindowText(GetDlgItem(hwndDlg, IDC_EDT_PATH), szFile);
|
||||
}
|
||||
break;
|
||||
case IDC_BTN_SMTP:
|
||||
WASABI_API_DIALOGBOXW(IDD_DLG_SMTP, hwndDlg, (DLGPROC)smtpDlgProc);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
//settings.smtpUser;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int SelectComboBoxItem(const HWND hwCombo, int data)
|
||||
{
|
||||
int count = (int) SendMessage(hwCombo, CB_GETCOUNT , 0, 0);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
if (data == (int) SendMessage(hwCombo, CB_GETITEMDATA, i, 0))
|
||||
return (int) SendMessage(hwCombo, CB_SETCURSEL, i, 0);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void UpdateZip(HWND hwndDlg, BOOL enabled)
|
||||
{
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_GRP_ZIP), enabled);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_LBL_ZIPNAME), enabled);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_EDT_ZIPNAME), enabled);
|
||||
}
|
||||
|
||||
void UpdateSendType(HWND hwndDlg, BOOL enabled)
|
||||
{
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_BTN_SMTP), enabled);
|
||||
}
|
||||
|
||||
void UpdateSend(HWND hwndDlg, BOOL enabled)
|
||||
{
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_RB_USECLIENT), enabled);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_RB_USESMTP), enabled);
|
||||
BOOL stmpPressed = (SendMessage(GetDlgItem(hwndDlg,IDC_RB_USESMTP), BM_GETCHECK, 0,0) == BST_CHECKED);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_BTN_SMTP), enabled && stmpPressed);
|
||||
}
|
||||
|
||||
void UpdateCreateDmp(HWND hwndDlg, BOOL enabled)
|
||||
{
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_LBL_OSVERSION_CAPTION), enabled);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_LBL_DLLPATH_CAPTION), enabled);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_LBL_DLLVERSION_CAPTION), enabled);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_LBL_OSVERSION), enabled);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_LBL_DLLPATH), enabled);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_LBL_DLLVERSION), enabled);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_LBL_DMPTYPE), enabled);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_CMB_DMPTYPE), enabled);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_LBL_DMPNAME), enabled);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_EDT_DMPNAME), enabled);
|
||||
}
|
||||
|
||||
void UpdateCreateLog(HWND hwndDlg, BOOL enabled)
|
||||
{
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_GRP_LOG), enabled);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_LOGSYSTEM), enabled);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_LOGREGISTRY), enabled);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_LOGSTACK), enabled);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_LOGMODULE), enabled);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_LBL_LOGNAME), enabled);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_EDT_LOGNAME), enabled);
|
||||
}
|
||||
|
||||
BOOL CALLBACK browseEnumProc(HWND hwnd, LPARAM lParam)
|
||||
{
|
||||
wchar_t cl[32] = {0};
|
||||
GetClassNameW(hwnd, cl, ARRAYSIZE(cl));
|
||||
if (!lstrcmpiW(cl, WC_TREEVIEW))
|
||||
{
|
||||
PostMessage(hwnd, TVM_ENSUREVISIBLE, 0, (LPARAM)TreeView_GetSelection(hwnd));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int CALLBACK WINAPI BrowseCallbackProc( HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData)
|
||||
{
|
||||
switch (uMsg)
|
||||
{
|
||||
case BFFM_INITIALIZED:
|
||||
{
|
||||
//SetWindowText(hwnd, getString(IDS_P_SELECT_LANGDIR,NULL,0));
|
||||
SendMessage(hwnd, BFFM_SETSELECTION, 1, (LPARAM)lpData);
|
||||
|
||||
// this is not nice but it fixes the selection not working correctly on all OSes
|
||||
EnumChildWindows(hwnd, browseEnumProc, 0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL OpenFolderDialog(HWND parent, LPWSTR pathBuffer)
|
||||
{
|
||||
if (!pathBuffer) return FALSE;
|
||||
|
||||
// Return value for the function
|
||||
BOOL ret = TRUE;
|
||||
|
||||
// Set up the params
|
||||
BROWSEINFO browseInfo = {0};
|
||||
browseInfo.hwndOwner = parent;
|
||||
browseInfo.lpfn = BrowseCallbackProc;
|
||||
browseInfo.lParam = (LPARAM)pathBuffer;
|
||||
browseInfo.lpszTitle = WASABI_API_LNGSTRINGW(IDS_SELECT_FOLDER_FOR_ERROR_INFO);
|
||||
browseInfo.ulFlags = BIF_NEWDIALOGSTYLE;
|
||||
|
||||
// Show the dialog
|
||||
LPITEMIDLIST itemIDList = SHBrowseForFolder(&browseInfo);
|
||||
|
||||
// Did user press cancel?
|
||||
if (!itemIDList)
|
||||
ret = FALSE;
|
||||
|
||||
// Is everything so far?
|
||||
if (ret != FALSE)
|
||||
{
|
||||
// Get the path from the returned ITEMIDLIST
|
||||
if (!SHGetPathFromIDList(itemIDList, pathBuffer))
|
||||
ret = FALSE;
|
||||
|
||||
// Now we need to free the ITEMIDLIST the shell allocated
|
||||
LPMALLOC shellMalloc;
|
||||
HRESULT hr;
|
||||
|
||||
// Get pointer to the shell's malloc interface
|
||||
hr = SHGetMalloc(&shellMalloc);
|
||||
|
||||
// Did it work?
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
shellMalloc->Free(itemIDList);
|
||||
shellMalloc->Release();
|
||||
ret = TRUE;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void CreatePathFromFullName(wchar_t **path, const wchar_t *fullname)
|
||||
{
|
||||
if (*path) free(*path);
|
||||
*path = NULL;
|
||||
if (!fullname) return;
|
||||
const wchar_t *end = wcsrchr(fullname, L'\\');
|
||||
if (!end || end == fullname) return;
|
||||
int len = (int)(end - fullname + 1);
|
||||
if (len == 3) len++;
|
||||
|
||||
*path = (wchar_t*)malloc(len*2);
|
||||
StringCchCopyN(*path, len, fullname, len -1);
|
||||
}
|
||||
|
||||
const wchar_t* GetFileName(const wchar_t *fullname)
|
||||
{
|
||||
if (!fullname) return NULL;
|
||||
const wchar_t *start = wcsrchr(fullname, L'\\');
|
||||
if (start && start != fullname) start = CharNext(start);
|
||||
|
||||
return start;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
#include <windows.h>
|
||||
|
||||
int SelectComboBoxItem(const HWND hwCombo, int data);
|
||||
BOOL OpenFolderDialog(HWND parent, LPWSTR pathBuffer);
|
||||
BOOL CALLBACK ConfigDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
void UpdateSendType(HWND hwndDlg, BOOL enabled);
|
||||
void UpdateSend(HWND hwndDlg, BOOL enabled);
|
||||
void UpdateCreateDmp(HWND hwndDlg, BOOL enabled);
|
||||
void UpdateCreateLog(HWND hwndDlg, BOOL enabled);
|
||||
void UpdateZip(HWND hwndDlg, BOOL enabled);
|
||||
|
||||
void CreatePathFromFullName(wchar_t **path, const wchar_t *fullname);
|
||||
const wchar_t* GetFileName(const wchar_t *fullname);
|
||||
@@ -0,0 +1,101 @@
|
||||
#include ".\crashdlg.h"
|
||||
#include ".\configdlg.h"
|
||||
#include ".\resource.h"
|
||||
#include ".\settings.h"
|
||||
#include "exceptionhandler.h"
|
||||
#include <strsafe.h>
|
||||
|
||||
extern Settings settings;
|
||||
extern PEXCEPTION_POINTERS gExceptionInfo;
|
||||
|
||||
BOOL CALLBACK CrashDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(lParam);
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// as we're loading things, make sure we've got a decent icon size to use in the second usage
|
||||
HICON hIcon = (HICON)LoadImage(GetModuleHandle(NULL),MAKEINTRESOURCE(102),IMAGE_ICON,48,48,LR_SHARED);
|
||||
SetClassLongPtr(hwndDlg, GCLP_HICON, (LONG_PTR)hIcon);
|
||||
|
||||
HWND hwndPrg = GetDlgItem(hwndDlg, IDC_PRG_COLLECT);
|
||||
SendMessage(hwndPrg, PBM_SETRANGE, 0, MAKELPARAM(0,100));
|
||||
SendMessage(hwndPrg, PBM_SETPOS, 0, 0);
|
||||
|
||||
// this will make sure that we've got the logo shown even when using a localised version
|
||||
SendDlgItemMessage(hwndDlg,IDC_BMP_LOGO,STM_SETIMAGE,IMAGE_ICON,(LPARAM)hIcon);
|
||||
|
||||
SetDlgItemText(hwndDlg, IDC_LBL_STEP, L"Analyzing settings...");
|
||||
settings.ClearTempData();
|
||||
|
||||
wchar_t waPath[2*_MAX_PATH] = {0};
|
||||
if (GetModuleFileName( NULL, waPath, 2*_MAX_PATH ))
|
||||
{
|
||||
settings.WriteWinamp(waPath);
|
||||
}
|
||||
|
||||
SetTimer(hwndDlg, 123, 1000, NULL);
|
||||
break;
|
||||
}
|
||||
case WM_TIMER:
|
||||
if (wParam == 123)
|
||||
{
|
||||
KillTimer(hwndDlg,wParam);
|
||||
HWND hwndPrg = GetDlgItem(hwndDlg, IDC_PRG_COLLECT);
|
||||
SetDlgItemText(hwndDlg, IDC_LBL_STEP, L"Generating log file...");
|
||||
SendMessage(hwndPrg, PBM_SETPOS, 30, 0);
|
||||
UpdateWindow(hwndDlg);
|
||||
if (settings.createLOG) settings.WriteLogCollectResult(CreateLog(gExceptionInfo, L"Winamp"));
|
||||
SetDlgItemText(hwndDlg, IDC_LBL_STEP, L"Generating dump file...");
|
||||
SendMessage(hwndPrg, PBM_SETPOS, 50, 0);
|
||||
UpdateWindow(hwndDlg);
|
||||
if (settings.createDMP) settings.WriteDmpCollectResult(CreateDump(gExceptionInfo));
|
||||
SetDlgItemText(hwndDlg, IDC_LBL_STEP, L"Starting error reporter...");
|
||||
SendMessage(hwndPrg, PBM_SETPOS, 90, 0);
|
||||
UpdateWindow(hwndDlg);
|
||||
STARTUPINFO si = {0};
|
||||
si.cb = sizeof(si);
|
||||
si.dwFlags = STARTF_USESHOWWINDOW;
|
||||
si.wShowWindow = SW_SHOW;
|
||||
|
||||
PROCESS_INFORMATION pi = {0};
|
||||
wchar_t reporter[512] = {0}, waPlugPath[MAX_PATH] = {0}, cmd[512] = {0}, *waPath = 0;
|
||||
GetModuleFileName( NULL, waPlugPath, MAX_PATH);
|
||||
CreatePathFromFullName(&waPath, waPlugPath);
|
||||
StringCchPrintf(reporter, 512, L"%s\\reporter.exe", waPath);
|
||||
StringCchPrintf(cmd, 512, L" \"%s\"", settings.GetPath());
|
||||
|
||||
if (CreateProcess(
|
||||
reporter, // name of executable module
|
||||
cmd, // command line string
|
||||
NULL, // process attributes
|
||||
NULL, // thread attributes
|
||||
FALSE, // handle inheritance option
|
||||
0, // creation flags
|
||||
NULL, // new environment block
|
||||
NULL, // current directory name
|
||||
&si, // startup information
|
||||
&pi)) // process information
|
||||
{
|
||||
SetDlgItemText(hwndDlg, IDC_LBL_STEP, L"Done.");
|
||||
SetTimer(hwndDlg, 126, 200, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetDlgItemText(hwndDlg, IDC_LBL_STEP, L"Error. Unable to run reporter.");
|
||||
SetTimer(hwndDlg, 126, 3000, NULL);
|
||||
}
|
||||
|
||||
SendMessage(hwndPrg, PBM_SETPOS, 100, 0);
|
||||
UpdateWindow(hwndDlg);
|
||||
}
|
||||
else if (wParam == 126)
|
||||
{
|
||||
KillTimer(hwndDlg,wParam);
|
||||
DestroyWindow(hwndDlg);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
#include <windows.h>
|
||||
#include <commctrl.h>
|
||||
|
||||
BOOL CALLBACK CrashDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
@@ -0,0 +1,364 @@
|
||||
// SendEmail.cpp Version 1.0
|
||||
//
|
||||
// Author: Hans Dietrich
|
||||
// hdietrich2@hotmail.com
|
||||
//
|
||||
// This software is released into the public domain.
|
||||
// You are free to use it in any way you like, except
|
||||
// that you may not sell this source code.
|
||||
//
|
||||
// This software is provided "as is" with no expressed
|
||||
// or implied warranty. I accept no liability for any
|
||||
// damage or loss of business that this software may cause.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Notes on compiling: this does not use MFC. Set precompiled header
|
||||
// option to "Not using precompiled headers".
|
||||
//
|
||||
// This code assumes that a default mail client has been set up.
|
||||
|
||||
#include ".\sendemail.h"
|
||||
#include <crtdbg.h>
|
||||
#include <io.h>
|
||||
#pragma warning(disable: 4228)
|
||||
#include <mapi.h>
|
||||
#pragma warning(default: 4228)
|
||||
|
||||
#pragma warning(disable:4127) // for _ASSERTE
|
||||
|
||||
#ifndef _countof
|
||||
#define _countof(array) (sizeof(array)/sizeof(array[0]))
|
||||
#endif
|
||||
|
||||
|
||||
BOOL SendEmail(HWND hWnd, // parent window, must not be NULL
|
||||
LPCTSTR lpszTo, // must NOT be NULL or empty
|
||||
LPCTSTR lpszToName, // may be NULL
|
||||
LPCTSTR lpszSubject, // may be NULL
|
||||
LPCTSTR lpszMessage, // may be NULL
|
||||
LPCTSTR lpszAttachment) // may be NULL
|
||||
{
|
||||
|
||||
_ASSERTE(lpszTo && lpszTo[0] != _T('\0'));
|
||||
if (lpszTo == NULL || lpszTo[0] == _T('\0'))
|
||||
return FALSE;
|
||||
|
||||
// ===== LOAD MAPI DLL =====
|
||||
|
||||
HMODULE hMapi = ::LoadLibraryA("MAPI32.DLL");
|
||||
|
||||
_ASSERTE(hMapi);
|
||||
if (hMapi == NULL)
|
||||
{
|
||||
::MessageBox(NULL,
|
||||
_T("Failed to load MAPI32.DLL."),
|
||||
_T("CrashRep"),
|
||||
MB_OK|MB_ICONSTOP);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// get proc address for MAPISendMail
|
||||
ULONG (PASCAL *lpfnSendMail)(ULONG, ULONG, MapiMessage*, FLAGS, ULONG);
|
||||
(FARPROC&)lpfnSendMail = GetProcAddress(hMapi, "MAPISendMail");
|
||||
_ASSERTE(lpfnSendMail);
|
||||
if (lpfnSendMail == NULL)
|
||||
{
|
||||
::MessageBox(NULL,
|
||||
_T("Invalid MAPI32.DLL, cannot find MAPISendMail."),
|
||||
_T("CrashRep"),
|
||||
MB_OK|MB_ICONSTOP);
|
||||
::FreeLibrary(hMapi);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// ===== SET UP MAPI STRUCTS =====
|
||||
|
||||
// ===== file description (for the attachment) =====
|
||||
|
||||
MapiFileDesc fileDesc;
|
||||
memset(&fileDesc, 0, sizeof(fileDesc));
|
||||
|
||||
// ----- attachment path
|
||||
TCHAR szTempName[_MAX_PATH*2];
|
||||
memset(szTempName, 0, sizeof(szTempName));
|
||||
if (lpszAttachment && lpszAttachment[0] != _T('\0'))
|
||||
lstrcpyn(szTempName, lpszAttachment, _countof(szTempName)-2);
|
||||
|
||||
#ifdef _UNICODE
|
||||
char szTempNameA[_MAX_PATH*2];
|
||||
memset(szTempNameA, 0, sizeof(szTempNameA));
|
||||
_wcstombsz(szTempNameA, szTempName, _countof(szTempNameA)-2);
|
||||
#endif
|
||||
|
||||
// ----- attachment title
|
||||
TCHAR szTitle[_MAX_PATH*2];
|
||||
memset(szTitle, 0, sizeof(szTitle));
|
||||
if (lpszAttachment && lpszAttachment[0] != _T('\0'))
|
||||
lstrcpyn(szTitle, GetFilePart(lpszAttachment), _countof(szTitle)-2);
|
||||
|
||||
#ifdef _UNICODE
|
||||
char szTitleA[_MAX_PATH*2];
|
||||
memset(szTitleA, 0, sizeof(szTitleA));
|
||||
_wcstombsz(szTitleA, szTitle, _countof(szTitleA)-2);
|
||||
#endif
|
||||
|
||||
fileDesc.nPosition = (ULONG)-1;
|
||||
#ifdef _UNICODE
|
||||
fileDesc.lpszPathName = szTempNameA;
|
||||
fileDesc.lpszFileName = szTitleA;
|
||||
#else
|
||||
fileDesc.lpszPathName = szTempName;
|
||||
fileDesc.lpszFileName = szTitle;
|
||||
#endif
|
||||
|
||||
// ===== recipient =====
|
||||
|
||||
MapiRecipDesc recip;
|
||||
memset(&recip, 0, sizeof(recip));
|
||||
|
||||
// ----- name
|
||||
TCHAR szRecipName[_MAX_PATH*2];
|
||||
memset(szRecipName, 0, sizeof(szRecipName));
|
||||
if (lpszToName && lpszToName[0] != _T('\0'))
|
||||
lstrcpyn(szRecipName, lpszToName, _countof(szRecipName)-2);
|
||||
#ifdef _UNICODE
|
||||
char szRecipNameA[_MAX_PATH*2];
|
||||
memset(szRecipNameA, 0, sizeof(szRecipNameA));
|
||||
_wcstombsz(szRecipNameA, szRecipName, _countof(szRecipNameA)-2);
|
||||
#endif
|
||||
|
||||
if (lpszToName && lpszToName[0] != _T('\0'))
|
||||
{
|
||||
#ifdef _UNICODE
|
||||
recip.lpszName = szRecipNameA;
|
||||
#else
|
||||
recip.lpszName = szRecipName;
|
||||
#endif
|
||||
}
|
||||
|
||||
// ----- address
|
||||
TCHAR szAddress[_MAX_PATH*2];
|
||||
memset(szAddress, 0, sizeof(szAddress));
|
||||
lstrcpyn(szAddress, lpszTo, _countof(szAddress)-2);
|
||||
#ifdef _UNICODE
|
||||
char szAddressA[_MAX_PATH*2];
|
||||
memset(szAddressA, 0, sizeof(szAddressA));
|
||||
_wcstombsz(szAddressA, szAddress, _countof(szAddressA)-2);
|
||||
#endif
|
||||
|
||||
#ifdef _UNICODE
|
||||
recip.lpszAddress = szAddressA;
|
||||
#else
|
||||
recip.lpszAddress = szAddress;
|
||||
#endif
|
||||
|
||||
recip.ulRecipClass = MAPI_TO;
|
||||
|
||||
// ===== message =====
|
||||
|
||||
MapiMessage message;
|
||||
memset(&message, 0, sizeof(message));
|
||||
|
||||
// ----- recipient
|
||||
message.nRecipCount = 1;
|
||||
message.lpRecips = &recip;
|
||||
|
||||
// ----- attachment
|
||||
if (lpszAttachment && lpszAttachment[0] != _T('\0'))
|
||||
{
|
||||
message.nFileCount = 1;
|
||||
message.lpFiles = &fileDesc;
|
||||
}
|
||||
|
||||
// ----- subject
|
||||
TCHAR szSubject[_MAX_PATH*2];
|
||||
memset(szSubject, 0, sizeof(szSubject));
|
||||
if (lpszSubject && lpszSubject[0] != _T('\0'))
|
||||
lstrcpyn(szSubject, lpszSubject, _countof(szSubject)-2);
|
||||
#ifdef _UNICODE
|
||||
char szSubjectA[_MAX_PATH*2];
|
||||
memset(szSubjectA, 0, sizeof(szSubjectA));
|
||||
_wcstombsz(szSubjectA, szSubject, _countof(szSubjectA)-2);
|
||||
#endif
|
||||
|
||||
if (lpszSubject && lpszSubject[0] != _T('\0'))
|
||||
{
|
||||
#ifdef _UNICODE
|
||||
message.lpszSubject = szSubjectA;
|
||||
#else
|
||||
message.lpszSubject = szSubject;
|
||||
#endif
|
||||
}
|
||||
|
||||
// ----- message
|
||||
// message may be large, so allocate buffer
|
||||
TCHAR *pszMessage = NULL;
|
||||
int nMessageSize = 0;
|
||||
if (lpszMessage)
|
||||
{
|
||||
nMessageSize = lstrlen(lpszMessage);
|
||||
if (nMessageSize > 0)
|
||||
{
|
||||
pszMessage = new TCHAR [nMessageSize + 10];
|
||||
_ASSERTE(pszMessage);
|
||||
memset(pszMessage, 0, nMessageSize + 10);
|
||||
lstrcpy(pszMessage, lpszMessage);
|
||||
}
|
||||
}
|
||||
|
||||
char *pszMessageA = NULL;
|
||||
#ifdef _UNICODE
|
||||
if (nMessageSize > 0)
|
||||
{
|
||||
pszMessageA = new char [nMessageSize + 10];
|
||||
_ASSERTE(pszMessageA);
|
||||
memset(pszMessageA, 0, nMessageSize + 10);
|
||||
}
|
||||
_wcstombsz(pszMessageA, pszMessage, nMessageSize+2);
|
||||
#endif
|
||||
|
||||
if (nMessageSize > 0)
|
||||
{
|
||||
#ifdef _UNICODE
|
||||
message.lpszNoteText = pszMessageA;
|
||||
#else
|
||||
message.lpszNoteText = pszMessage;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
// ===== SETUP FINISHED, READY TO SEND =====
|
||||
|
||||
|
||||
// some extra precautions are required to use MAPISendMail as it
|
||||
// tends to enable the parent window in between dialogs (after
|
||||
// the login dialog, but before the send note dialog).
|
||||
|
||||
::SetCapture(hWnd);
|
||||
::SetFocus(NULL);
|
||||
::EnableWindow(hWnd, FALSE);
|
||||
|
||||
ULONG nError = lpfnSendMail(0,
|
||||
(LPARAM)hWnd,
|
||||
&message,
|
||||
MAPI_LOGON_UI | MAPI_DIALOG,
|
||||
0);
|
||||
|
||||
#ifdef _DEBUG
|
||||
TCHAR *cp = NULL;
|
||||
switch (nError)
|
||||
{
|
||||
case SUCCESS_SUCCESS: cp = _T("SUCCESS_SUCCESS"); break;
|
||||
case MAPI_E_USER_ABORT: cp = _T("MAPI_E_USER_ABORT"); break;
|
||||
case MAPI_E_FAILURE: cp = _T("MAPI_E_FAILURE"); break;
|
||||
case MAPI_E_LOGON_FAILURE: cp = _T("MAPI_E_LOGON_FAILURE"); break;
|
||||
case MAPI_E_DISK_FULL: cp = _T("MAPI_E_DISK_FULL"); break;
|
||||
case MAPI_E_INSUFFICIENT_MEMORY: cp = _T("MAPI_E_INSUFFICIENT_MEMORY"); break;
|
||||
case MAPI_E_ACCESS_DENIED: cp = _T("MAPI_E_ACCESS_DENIED"); break;
|
||||
case MAPI_E_TOO_MANY_SESSIONS: cp = _T("MAPI_E_TOO_MANY_SESSIONS"); break;
|
||||
case MAPI_E_TOO_MANY_FILES: cp = _T("MAPI_E_TOO_MANY_FILES"); break;
|
||||
case MAPI_E_TOO_MANY_RECIPIENTS: cp = _T("MAPI_E_TOO_MANY_RECIPIENTS"); break;
|
||||
case MAPI_E_ATTACHMENT_NOT_FOUND: cp = _T("MAPI_E_ATTACHMENT_NOT_FOUND"); break;
|
||||
case MAPI_E_ATTACHMENT_OPEN_FAILURE: cp = _T("MAPI_E_ATTACHMENT_OPEN_FAILURE"); break;
|
||||
case MAPI_E_ATTACHMENT_WRITE_FAILURE: cp = _T("MAPI_E_ATTACHMENT_WRITE_FAILURE"); break;
|
||||
case MAPI_E_UNKNOWN_RECIPIENT: cp = _T("MAPI_E_UNKNOWN_RECIPIENT"); break;
|
||||
case MAPI_E_BAD_RECIPTYPE: cp = _T("MAPI_E_BAD_RECIPTYPE"); break;
|
||||
case MAPI_E_NO_MESSAGES: cp = _T("MAPI_E_NO_MESSAGES"); break;
|
||||
case MAPI_E_INVALID_MESSAGE: cp = _T("MAPI_E_INVALID_MESSAGE"); break;
|
||||
case MAPI_E_TEXT_TOO_LARGE: cp = _T("MAPI_E_TEXT_TOO_LARGE"); break;
|
||||
case MAPI_E_INVALID_SESSION: cp = _T("MAPI_E_INVALID_SESSION"); break;
|
||||
case MAPI_E_TYPE_NOT_SUPPORTED: cp = _T("MAPI_E_TYPE_NOT_SUPPORTED"); break;
|
||||
case MAPI_E_AMBIGUOUS_RECIPIENT: cp = _T("MAPI_E_AMBIGUOUS_RECIPIENT"); break;
|
||||
case MAPI_E_MESSAGE_IN_USE: cp = _T("MAPI_E_MESSAGE_IN_USE"); break;
|
||||
case MAPI_E_NETWORK_FAILURE: cp = _T("MAPI_E_NETWORK_FAILURE"); break;
|
||||
case MAPI_E_INVALID_EDITFIELDS: cp = _T("MAPI_E_INVALID_EDITFIELDS"); break;
|
||||
case MAPI_E_INVALID_RECIPS: cp = _T("MAPI_E_INVALID_RECIPS"); break;
|
||||
case MAPI_E_NOT_SUPPORTED: cp = _T("MAPI_E_NOT_SUPPORTED"); break;
|
||||
default: cp = _T("unknown error"); break;
|
||||
}
|
||||
|
||||
if (nError == SUCCESS_SUCCESS)
|
||||
{
|
||||
OutputDebugString(_T("MAPISendMail ok\r\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
OutputDebugString(L"ERROR - MAPISendMail failed: ");
|
||||
OutputDebugString(cp);
|
||||
OutputDebugString(L"\r\n");
|
||||
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
// ===== SEND COMPLETE, CLEAN UP =====
|
||||
|
||||
// after returning from the MAPISendMail call, the window must be
|
||||
// re-enabled and focus returned to the frame to undo the workaround
|
||||
// done before the MAPI call.
|
||||
|
||||
::ReleaseCapture();
|
||||
::EnableWindow(hWnd, TRUE);
|
||||
::SetActiveWindow(NULL);
|
||||
::SetActiveWindow(hWnd);
|
||||
::SetFocus(hWnd);
|
||||
|
||||
if (pszMessage)
|
||||
delete [] pszMessage;
|
||||
pszMessage = NULL;
|
||||
|
||||
if (pszMessageA)
|
||||
delete [] pszMessageA;
|
||||
pszMessageA = NULL;
|
||||
|
||||
if (hMapi)
|
||||
::FreeLibrary(hMapi);
|
||||
hMapi = NULL;
|
||||
|
||||
BOOL bRet = TRUE;
|
||||
if (nError != SUCCESS_SUCCESS) // &&
|
||||
//nError != MAPI_USER_ABORT &&
|
||||
//nError != MAPI_E_LOGIN_FAILURE)
|
||||
{
|
||||
bRet = FALSE;
|
||||
}
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
const wchar_t* GetFilePart(LPCWSTR lpszFile)
|
||||
{
|
||||
const wchar_t *result = wcsrchr(lpszFile, _T('\\'));
|
||||
if (result)
|
||||
result++;
|
||||
else
|
||||
result = (wchar_t *) lpszFile;
|
||||
return result;
|
||||
}
|
||||
|
||||
int xwcstombsz(char* mbstr, const wchar_t* wcstr, size_t count)
|
||||
{
|
||||
if (count == 0 && mbstr != NULL)
|
||||
return 0;
|
||||
|
||||
int result = ::WideCharToMultiByte(CP_ACP, 0, wcstr, -1,
|
||||
mbstr, (int)count, NULL, NULL);
|
||||
_ASSERTE(mbstr == NULL || result <= (int)count);
|
||||
if (result > 0)
|
||||
mbstr[result-1] = 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
int xmbstowcsz(wchar_t* wcstr, const char* mbstr, size_t count)
|
||||
{
|
||||
if (count == 0 && wcstr != NULL)
|
||||
return 0;
|
||||
|
||||
int result = ::MultiByteToWideChar(CP_ACP, 0, mbstr, -1,
|
||||
wcstr, (int)count);
|
||||
_ASSERTE(wcstr == NULL || result <= (int)count);
|
||||
if (result > 0)
|
||||
wcstr[result-1] = 0;
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
// SendEmail.h Version 1.0
|
||||
//
|
||||
// Author: Hans Dietrich
|
||||
// hdietrich2@hotmail.com
|
||||
//
|
||||
// This software is released into the public domain.
|
||||
// You are free to use it in any way you like, except
|
||||
// that you may not sell this source code.
|
||||
//
|
||||
// This software is provided "as is" with no expressed
|
||||
// or implied warranty. I accept no liability for any
|
||||
// damage or loss of business that this software may cause.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef SENDEMAIL_H
|
||||
#define SENDEMAIL_H
|
||||
|
||||
#include <tchar.h>
|
||||
#include <windows.h>
|
||||
|
||||
const wchar_t* GetFilePart(LPCWSTR lpszFile);
|
||||
|
||||
BOOL SendEmail(HWND hWnd, // parent window, must not be NULL
|
||||
LPCTSTR lpszTo, // must NOT be NULL or empty
|
||||
LPCTSTR lpszToName, // may be NULL
|
||||
LPCTSTR lpszSubject, // may be NULL
|
||||
LPCTSTR lpszMessage, // may be NULL
|
||||
LPCTSTR lpszAttachment); // may be NULL
|
||||
|
||||
|
||||
#define _wcstombsz xwcstombsz
|
||||
#define _mbstowcsz xmbstowcsz
|
||||
|
||||
int xwcstombsz(char* mbstr, const wchar_t* wcstr, size_t count);
|
||||
int xmbstowcsz(wchar_t* wcstr, const char* mbstr, size_t count);
|
||||
|
||||
#endif //SENDEMAIL_H
|
||||
@@ -0,0 +1,119 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#define APSTUDIO_HIDDEN_SYMBOLS
|
||||
#include "windows.h"
|
||||
#undef APSTUDIO_HIDDEN_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
ICON_XP ICON "..\\..\\..\\..\\Winamp\\resource\\WinampIcon.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_DLG_SILENT DIALOGEX 0, 0, 187, 42
|
||||
STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "Winamp Error Reporter"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
ICON ICON_XP,IDC_STATIC,8,6,21,20,SS_REALSIZEIMAGE
|
||||
LTEXT "",IDC_LBL_STEP,48,6,127,10
|
||||
CONTROL "",IDC_PRG_COLLECT,"msctls_progress32",WS_BORDER,49,19,127,9
|
||||
PUSHBUTTON "&Open Report Folder...",IDC_BUTTON1,47,21,87,13,NOT WS_VISIBLE
|
||||
DEFPUSHBUTTON "&Close",IDC_BUTTON2,138,21,39,13,NOT WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
|
||||
"#include ""windows.h""\r\n"
|
||||
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""version.rc2""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_DLG_SILENT, DIALOG
|
||||
BEGIN
|
||||
BOTTOMMARGIN, 39
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// RT_MANIFEST
|
||||
//
|
||||
//The manifest is commented out because it is no longer needed (it was need for VC6 files)
|
||||
//
|
||||
//1 RT_MANIFEST "manifest.xml"
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#include "version.rc2"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29424.173
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "feedback", "feedback.vcxproj", "{A845D04C-A95E-424C-BFA8-D7706DBA78BF}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A845D04C-A95E-424C-BFA8-D7706DBA78BF}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{A845D04C-A95E-424C-BFA8-D7706DBA78BF}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{A845D04C-A95E-424C-BFA8-D7706DBA78BF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A845D04C-A95E-424C-BFA8-D7706DBA78BF}.Debug|x64.Build.0 = Debug|x64
|
||||
{A845D04C-A95E-424C-BFA8-D7706DBA78BF}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{A845D04C-A95E-424C-BFA8-D7706DBA78BF}.Release|Win32.Build.0 = Release|Win32
|
||||
{A845D04C-A95E-424C-BFA8-D7706DBA78BF}.Release|x64.ActiveCfg = Release|x64
|
||||
{A845D04C-A95E-424C-BFA8-D7706DBA78BF}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {2C383520-1961-4F68-B42C-3172B6341FB8}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,321 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="feedback"
|
||||
ProjectGUID="{A845D04C-A95E-424C-BFA8-D7706DBA78BF}"
|
||||
RootNamespace="feedback"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderThrough="precomp.h"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
ForcedIncludeFiles="precomp.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="comctl32.lib msvcrtd.lib libcpmtd.lib rpcrt4.lib"
|
||||
OutputFile="$(ProgramFiles)\winamp\reporter.exe"
|
||||
GenerateManifest="false"
|
||||
IgnoreDefaultLibraryNames="libcmtd"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/feedback.pdb"
|
||||
SubSystem="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
AdditionalManifestFiles="manifest.xml"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfATL="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
FavorSizeOrSpeed="2"
|
||||
AdditionalIncludeDirectories="."
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS"
|
||||
StringPooling="true"
|
||||
BufferSecurityCheck="false"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="precomp.h"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
ForcedIncludeFiles="precomp.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="comctl32.lib libcpmt.lib rpcrt4.lib"
|
||||
OutputFile="$(ProgramFiles)\winamp\reporter.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateManifest="false"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
EntryPointSymbol=""
|
||||
RandomizedBaseAddress="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
AdditionalManifestFiles="manifest.xml"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\main.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\operations.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\precomp.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\silent.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\main.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\precomp.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Resource.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\feedback.rc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\manifest.xml"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Settings"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\config.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\config.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\settings.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\settings.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="zip"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\xzip\XZip.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\xzip\XZip.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="smtp"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\smtp\Base64.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\smtp\Base64.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\smtp\Smtp.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\smtp\Smtp.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="email"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\email\SendEmail.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\email\SendEmail.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
@@ -0,0 +1,253 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{A845D04C-A95E-424C-BFA8-D7706DBA78BF}</ProjectGuid>
|
||||
<RootNamespace>feedback</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<TargetName>reporter</TargetName>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<TargetName>reporter</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<TargetName>reporter</TargetName>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<TargetName>reporter</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg">
|
||||
<VcpkgEnabled>false</VcpkgEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<VcpkgConfiguration>Debug</VcpkgConfiguration>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4091;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>comctl32.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\
|
||||
xcopy /Y /D $(IntDir)$(TargetName).pdb ..\..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4091;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>comctl32.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\
|
||||
xcopy /Y /D $(IntDir)$(TargetName).pdb ..\..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4091;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>comctl32.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4091;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>comctl32.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\config.cpp" />
|
||||
<ClCompile Include="..\settings.cpp" />
|
||||
<ClCompile Include="email\SendEmail.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="operations.cpp" />
|
||||
<ClCompile Include="silent.cpp" />
|
||||
<ClCompile Include="smtp\Base64.cpp" />
|
||||
<ClCompile Include="smtp\Smtp.cpp" />
|
||||
<ClCompile Include="xzip\XZip.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\config.h" />
|
||||
<ClInclude Include="..\settings.h" />
|
||||
<ClInclude Include="email\SendEmail.h" />
|
||||
<ClInclude Include="main.h" />
|
||||
<ClInclude Include="Resource.h" />
|
||||
<ClInclude Include="smtp\Base64.h" />
|
||||
<ClInclude Include="smtp\Smtp.h" />
|
||||
<ClInclude Include="xzip\XZip.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="feedback.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Xml Include="manifest.xml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClCompile Include="smtp\Base64.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\config.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="operations.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="email\SendEmail.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\settings.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="silent.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="smtp\Smtp.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="xzip\XZip.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="smtp\Base64.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\config.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="main.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="email\SendEmail.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\settings.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="smtp\Smtp.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="xzip\XZip.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{de803cce-7a8d-46da-97a8-cb794b2ef154}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Ressource Files">
|
||||
<UniqueIdentifier>{6cea30eb-0534-44ec-af7c-340d8047d962}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{a281ea66-f75c-47a9-90b7-61a031b4ea22}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="feedback.rc">
|
||||
<Filter>Ressource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Xml Include="manifest.xml">
|
||||
<Filter>Ressource Files</Filter>
|
||||
</Xml>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,79 @@
|
||||
// feedback.cpp : Defines the entry point for the application.
|
||||
//
|
||||
#include ".\main.h"
|
||||
#include <commctrl.h>
|
||||
#include <strsafe.h>
|
||||
Settings settings;
|
||||
|
||||
int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpszCmdLine, int nCmdShow)
|
||||
{
|
||||
wchar_t *argv[2] = {0};
|
||||
int argc = 0;
|
||||
if (lpszCmdLine && wcslen(lpszCmdLine) >0) argc = ParseCommandLine(lpszCmdLine, NULL);
|
||||
if (argc != 1)
|
||||
{
|
||||
MSGBOXPARAMSW msgbx = {sizeof(MSGBOXPARAMS),0};
|
||||
msgbx.lpszText = L"Winamp Error Reporter\nCopyright © 2005-2014 Winamp SA";
|
||||
msgbx.lpszCaption = L"About...";
|
||||
msgbx.lpszIcon = MAKEINTRESOURCEW(ICON_XP);
|
||||
msgbx.hInstance = GetModuleHandle(0);
|
||||
msgbx.dwStyle = MB_USERICON;
|
||||
MessageBoxIndirectW(&msgbx);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ParseCommandLine(lpszCmdLine, argv);
|
||||
settings.SetPath(argv[0]);
|
||||
|
||||
if (!settings.Load())
|
||||
{
|
||||
MessageBox(NULL, L"Unable to load settings.", L"Error", MB_OK);
|
||||
return 0;
|
||||
}
|
||||
|
||||
INITCOMMONCONTROLSEX icex = {sizeof(icex), ICC_WIN95_CLASSES};
|
||||
InitCommonControlsEx(&icex);
|
||||
DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_DLG_SILENT), NULL, (DLGPROC)SilentDlgProc, (LPARAM)hInstance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ParseCommandLine(wchar_t *cmdline, wchar_t **argv)
|
||||
{
|
||||
wchar_t *bufp;
|
||||
int argc;
|
||||
argc = 0;
|
||||
for ( bufp = cmdline; *bufp; )
|
||||
{
|
||||
/* Skip leading whitespace */
|
||||
while ( isspace(*bufp) ) ++bufp;
|
||||
/* Skip over argument */
|
||||
if ( *bufp == L'"' )
|
||||
{
|
||||
++bufp;
|
||||
if ( *bufp )
|
||||
{
|
||||
if ( argv ) argv[argc] = bufp;
|
||||
++argc;
|
||||
}
|
||||
/* Skip over word */
|
||||
while ( *bufp && (*bufp != L'"') ) ++bufp;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( *bufp )
|
||||
{
|
||||
if ( argv ) argv[argc] = bufp;
|
||||
++argc;
|
||||
}
|
||||
/* Skip over word */
|
||||
while ( *bufp && ! isspace(*bufp) ) ++bufp;
|
||||
}
|
||||
if ( *bufp )
|
||||
{
|
||||
if ( argv ) *bufp = L'\0';
|
||||
++bufp;
|
||||
}
|
||||
}
|
||||
if ( argv ) argv[argc] = NULL;
|
||||
return(argc);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifndef FEEDBACK_H
|
||||
#define FEEDBACK_H
|
||||
|
||||
#include <windows.h>
|
||||
#include "resource.h"
|
||||
|
||||
#include "..\settings.h"
|
||||
|
||||
extern Settings settings;
|
||||
|
||||
static int ParseCommandLine(wchar_t *cmdline, wchar_t **argv);
|
||||
|
||||
BOOL CALLBACK SilentDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
BOOL ZipData(void);
|
||||
BOOL SendData(HWND hwnd);
|
||||
BOOL Restart(void);
|
||||
|
||||
#endif FEEDBACK_H
|
||||
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
|
||||
<assemblyIdentity
|
||||
version="1.11.0.0"
|
||||
processorArchitecture="X86"
|
||||
name="Nullsoft.Error Reporter"
|
||||
type="win32"
|
||||
/>
|
||||
<description>Nullsoft Error Reporter</description>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="X86"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel
|
||||
level="asInvoker"
|
||||
/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
<asmv3:application>
|
||||
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
|
||||
<dpiAware>true</dpiAware>
|
||||
</asmv3:windowsSettings>
|
||||
</asmv3:application>
|
||||
</assembly>
|
||||
@@ -0,0 +1,163 @@
|
||||
#include ".\main.h"
|
||||
#include ".\xzip\xzip.h"
|
||||
#include ".\smtp\smtp.h"
|
||||
#include ".\email\sendemail.h"
|
||||
#include <strsafe.h>
|
||||
|
||||
const wchar_t* GetFileName(const wchar_t *fullname)
|
||||
{
|
||||
if (!fullname) return NULL;
|
||||
const wchar_t *start = wcsrchr(fullname, L'\\');
|
||||
if (start && start != fullname) start = CharNext(start);
|
||||
|
||||
return start;
|
||||
}
|
||||
|
||||
BOOL ZipData(void)
|
||||
{
|
||||
BOOL retCode = FALSE;
|
||||
HZIP hz = CreateZip(settings.zipPath, 0, ZIP_FILENAME);
|
||||
if (hz)
|
||||
{
|
||||
retCode = TRUE;
|
||||
if (settings.createLOG && settings.ReadLogCollectResult()) retCode = (ZR_OK == ZipAdd(hz, GetFileName(settings.logPath), settings.logPath, 0, ZIP_FILENAME));
|
||||
if (retCode && settings.createDMP && settings.ReadDmpCollectResult()) retCode = (ZR_OK == ZipAdd(hz, GetFileName(settings.dumpPath), settings.dumpPath, 0, ZIP_FILENAME));
|
||||
}
|
||||
CloseZip(hz);
|
||||
return retCode;
|
||||
}
|
||||
|
||||
LPCTSTR BuildSubjectString(LPCTSTR subject)
|
||||
{
|
||||
static wchar_t subject_str[512] = {L"Winamp Error Report"};
|
||||
wchar_t uid_str[64] = {0}, path[MAX_PATH] = {0};
|
||||
if (GetModuleFileName(0, path, MAX_PATH))
|
||||
{
|
||||
PathRemoveFileSpec(path);
|
||||
wchar_t *p = path + wcslen(path) - 1;
|
||||
while(p && *p && *p != L'\\')
|
||||
{
|
||||
p = CharPrev(path, p);
|
||||
}
|
||||
if (p) *p = 0;
|
||||
PathAppend(path, L"winamp.exe");
|
||||
|
||||
HKEY hkey = NULL;
|
||||
if (RegCreateKeyEx(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Nullsoft\\Winamp", 0, 0, 0, KEY_READ, NULL, &hkey, NULL) == ERROR_SUCCESS)
|
||||
{
|
||||
DWORD s = 512, t = REG_SZ;
|
||||
if (RegQueryValueEx(hkey, path, 0, &t, (LPBYTE)uid_str, &s) != ERROR_SUCCESS || t != REG_SZ) uid_str[0] = 0;
|
||||
RegCloseKey(hkey);
|
||||
}
|
||||
}
|
||||
|
||||
// if it fails then we'll need to make something...
|
||||
if (!uid_str[0])
|
||||
{
|
||||
GUID guid;
|
||||
UuidCreate(&guid);
|
||||
StringCbPrintf(uid_str, ARRAYSIZE(uid_str), L"%08X%04X%04X%02X%02X%02X%02X%02X%02X%02X%02X",
|
||||
(int)guid.Data1, (int)guid.Data2, (int)guid.Data3, (int)guid.Data4[0],
|
||||
(int)guid.Data4[1], (int)guid.Data4[2], (int)guid.Data4[3],
|
||||
(int)guid.Data4[4], (int)guid.Data4[5], (int)guid.Data4[6], (int)guid.Data4[7]);
|
||||
}
|
||||
|
||||
if (StringCchPrintfW(subject_str, ARRAYSIZE(subject_str), L"%s [%s]", subject, uid_str) == S_OK)
|
||||
return subject_str;
|
||||
else
|
||||
return subject;
|
||||
}
|
||||
|
||||
BOOL SendData(HWND hwnd)
|
||||
{
|
||||
BOOL retCode = FALSE;
|
||||
const wchar_t *subject = L"Winamp Error Report";
|
||||
const wchar_t *senderName = L"Winamp Error Reporter";
|
||||
const wchar_t *recipientAddress = L"bug@winamp.com";
|
||||
const wchar_t *recipientName = L"Nullsoft Bug Reporting";
|
||||
wchar_t *msgInfo = _wcsdup(settings.ReadBody());
|
||||
|
||||
wchar_t *p = msgInfo, *end = p + wcslen(msgInfo);
|
||||
while(p != end)
|
||||
{
|
||||
if (*p == 1) *p = L'\r';
|
||||
if (*p == 2) *p = L'\n';
|
||||
p++;
|
||||
}
|
||||
|
||||
if (settings.sendBySMTP)
|
||||
{
|
||||
CSmtp smtp;
|
||||
CSmtpMessage msg;
|
||||
CSmtpMessageBody body;
|
||||
CSmtpAttachment attach;
|
||||
|
||||
msg.Subject = BuildSubjectString(subject);
|
||||
|
||||
// Who the message is from
|
||||
msg.Sender.Name = senderName;
|
||||
msg.Sender.Address = settings.smtpAddress;
|
||||
msg.Recipient.Address = recipientAddress;
|
||||
msg.Recipient.Name = recipientName;
|
||||
if(settings.zipData )
|
||||
{
|
||||
attach.FileName = settings.zipPath;
|
||||
msg.Attachments.Add(attach);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (settings.createLOG && settings.ReadLogCollectResult()) attach.FileName = settings.logPath;
|
||||
msg.Attachments.Add(attach);
|
||||
if (settings.createDMP && settings.ReadDmpCollectResult()) attach.FileName = settings.dumpPath;
|
||||
msg.Attachments.Add(attach);
|
||||
}
|
||||
|
||||
// smtp.m_wSmtpPort = settings.smtpPort; - not working for some reasons
|
||||
if (settings.smtpAuth)
|
||||
{
|
||||
smtp.m_strUser = settings.smtpUser;
|
||||
smtp.m_strPass = settings.smtpPwd;;
|
||||
}
|
||||
|
||||
body = L"This message was generated by Winamp Error Reporter v1.09.\r\nPlease check attachments for viruses.\r\n";
|
||||
body.Data.append(L"\r\n");
|
||||
body.Data.append(msgInfo);
|
||||
|
||||
msg.Message.Add(body);
|
||||
retCode = smtp.Connect(settings.smtpServer);
|
||||
if ( retCode )
|
||||
{
|
||||
// Send the message and close the connection afterwards
|
||||
retCode = (smtp.SendMessage(msg) == 0);
|
||||
smtp.Close();
|
||||
}
|
||||
}
|
||||
else if(settings.sendByClient)
|
||||
{
|
||||
retCode = SendEmail(hwnd, recipientAddress, recipientName, BuildSubjectString(subject), msgInfo, settings.zipPath);
|
||||
}
|
||||
|
||||
return retCode;
|
||||
}
|
||||
|
||||
BOOL Restart(void)
|
||||
{
|
||||
STARTUPINFO si = {0};
|
||||
si.cb = sizeof(si);
|
||||
si.dwFlags = STARTF_USESHOWWINDOW;
|
||||
si.wShowWindow = SW_SHOW;
|
||||
|
||||
PROCESS_INFORMATION pi = {0};
|
||||
return CreateProcess(
|
||||
settings.ReadWinamp(), // name of executable module
|
||||
NULL, // command line string
|
||||
NULL, // process attributes
|
||||
NULL, // thread attributes
|
||||
FALSE, // handle inheritance option
|
||||
0, // creation flags
|
||||
NULL, // new environment block
|
||||
NULL, // current directory name
|
||||
&si, // startup information
|
||||
&pi // process information
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by feedback.rc
|
||||
//
|
||||
#define IDC_MYICON 2
|
||||
#define IDD_DLG_SILENT 102
|
||||
#define IDS_APP_TITLE 103
|
||||
#define IDM_ABOUT 104
|
||||
#define IDM_EXIT 105
|
||||
#define ICON_XP 108
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDR_RT_MANIFEST1 133
|
||||
#define IDC_PRG_COLLECT 1000
|
||||
#define IDC_LBL_STEP 1001
|
||||
#define IDC_BUTTON1 1003
|
||||
#define IDC_BUTTON2 1004
|
||||
#define IDC_STATIC -1
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NO_MFC 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 134
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1005
|
||||
#define _APS_NEXT_SYMED_VALUE 110
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,134 @@
|
||||
#include ".\main.h"
|
||||
#include <commctrl.h>
|
||||
#include <shlobj.h>
|
||||
#include "resource.h"
|
||||
|
||||
BOOL CALLBACK SilentDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
HICON hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(ICON_XP));
|
||||
SetClassLongPtr(hwndDlg, GCLP_HICON, (LONG_PTR)hIcon);
|
||||
|
||||
HWND hwndPrg = GetDlgItem(hwndDlg, IDC_PRG_COLLECT);
|
||||
SendMessage(hwndPrg, PBM_SETRANGE, 0, MAKELPARAM(0,100));
|
||||
SendMessage(hwndPrg, PBM_SETPOS, 0, 0);
|
||||
SetDlgItemText(hwndDlg, IDC_LBL_STEP, L"Starting reporter...");
|
||||
ShowWindow(GetDlgItem(hwndDlg, IDC_BUTTON1), SW_HIDE);
|
||||
ShowWindow(GetDlgItem(hwndDlg, IDC_BUTTON2), SW_HIDE);
|
||||
UpdateWindow(hwndDlg);
|
||||
|
||||
if ((settings.createLOG && !settings.ReadLogCollectResult()) &&
|
||||
(settings.createDMP && !settings.ReadDmpCollectResult()) )
|
||||
{
|
||||
SetDlgItemText(hwndDlg, IDC_LBL_STEP, L"Error. Data was not generated.");
|
||||
SendMessage(hwndPrg, PBM_SETPOS, 100, 0);
|
||||
UpdateWindow(hwndDlg);
|
||||
SetTimer(hwndDlg, 126, 2000, NULL);
|
||||
break;
|
||||
}
|
||||
SetTimer(hwndDlg, 123, 500, NULL);
|
||||
break;
|
||||
}
|
||||
case WM_COMMAND:
|
||||
switch(LOWORD(wParam))
|
||||
{
|
||||
case IDC_BUTTON1:
|
||||
{
|
||||
BOOL ret = FALSE;
|
||||
wchar_t file[MAX_PATH] = {0};
|
||||
lstrcpyn(file, settings.zipPath, MAX_PATH);
|
||||
|
||||
LPSHELLFOLDER pDesktopFolder = 0;
|
||||
if(SUCCEEDED(SHGetDesktopFolder(&pDesktopFolder)))
|
||||
{
|
||||
LPITEMIDLIST filepidl = 0;
|
||||
HRESULT hr = pDesktopFolder->ParseDisplayName(NULL,0,file,0,&filepidl,0);
|
||||
if(FAILED(hr)){ pDesktopFolder->Release(); ret = FALSE; }
|
||||
else
|
||||
{
|
||||
if(SUCCEEDED(SHOpenFolderAndSelectItems(filepidl,0,NULL,NULL))){
|
||||
ret = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ret == FALSE)
|
||||
{
|
||||
SetDlgItemText(hwndDlg, IDC_LBL_STEP, L"Error. Unable to locate crash report.");
|
||||
UpdateWindow(hwndDlg);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case IDCANCEL:
|
||||
case IDC_BUTTON2:
|
||||
SetTimer(hwndDlg, 126, 1, NULL);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case WM_TIMER:
|
||||
if (wParam == 123)
|
||||
{
|
||||
KillTimer(hwndDlg, wParam);
|
||||
HWND hwndPrg;
|
||||
hwndPrg = GetDlgItem(hwndDlg, IDC_PRG_COLLECT);
|
||||
SendMessage(hwndPrg, PBM_SETPOS, 20, 0);
|
||||
if (settings.zipData)
|
||||
{
|
||||
SetDlgItemText(hwndDlg, IDC_LBL_STEP, L"Packing results...");
|
||||
if(!ZipData())
|
||||
{
|
||||
SetDlgItemText(hwndDlg, IDC_LBL_STEP, L"Error. Unable to pack results.");
|
||||
SendMessage(hwndPrg, PBM_SETPOS, 100, 0);
|
||||
UpdateWindow(hwndDlg);
|
||||
SetTimer(hwndDlg, 126, 2000, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
SendMessage(hwndPrg, PBM_SETPOS, 40, 0);
|
||||
UpdateWindow(hwndDlg);
|
||||
if (settings.sendData)
|
||||
{
|
||||
SetDlgItemText(hwndDlg, IDC_LBL_STEP, L"Sending results...");
|
||||
UpdateWindow(hwndDlg);
|
||||
if(!SendData(hwndDlg))
|
||||
{
|
||||
SetDlgItemText(hwndDlg, IDC_LBL_STEP, L"Error. Unable to send crash report.");
|
||||
SendMessage(hwndPrg, PBM_SETPOS, 100, 0);
|
||||
ShowWindow(GetDlgItem(hwndDlg, IDC_BUTTON1), SW_SHOW);
|
||||
ShowWindow(GetDlgItem(hwndDlg, IDC_BUTTON2), SW_SHOW);
|
||||
ShowWindow(GetDlgItem(hwndDlg, IDC_PRG_COLLECT), SW_HIDE);
|
||||
UpdateWindow(hwndDlg);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (settings.autoRestart)
|
||||
{
|
||||
SetDlgItemText(hwndDlg, IDC_LBL_STEP, L"Restarting Winamp...");
|
||||
SendMessage(hwndPrg, PBM_SETPOS, 80, 0);
|
||||
UpdateWindow(hwndDlg);
|
||||
if(!Restart())
|
||||
{
|
||||
SetDlgItemText(hwndDlg, IDC_LBL_STEP, L"Error. Unable to restart Winamp.");
|
||||
SendMessage(hwndPrg, PBM_SETPOS, 100, 0);
|
||||
UpdateWindow(hwndDlg);
|
||||
SetTimer(hwndDlg, 126, 2000, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
SetDlgItemText(hwndDlg, IDC_LBL_STEP, L"Done.");
|
||||
SendMessage(hwndPrg, PBM_SETPOS, 100, 0);
|
||||
UpdateWindow(hwndDlg);
|
||||
SetTimer(hwndDlg, 126, 1000, NULL);
|
||||
}
|
||||
else if (wParam == 126)
|
||||
{
|
||||
KillTimer(hwndDlg, wParam);
|
||||
EndDialog(hwndDlg, TRUE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
@@ -0,0 +1,320 @@
|
||||
// CBase64.cpp: implementation of the CBase64 class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "Base64.h"
|
||||
|
||||
// Digits...
|
||||
static char Base64Digits[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
|
||||
BOOL CBase64::m_Init = FALSE;
|
||||
char CBase64::m_DecodeTable[256];
|
||||
|
||||
#ifndef PAGESIZE
|
||||
#define PAGESIZE 4096
|
||||
#endif
|
||||
|
||||
#ifndef ROUNDTOPAGE
|
||||
#define ROUNDTOPAGE(a) (((a/4096)+1)*4096)
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Construction/Destruction
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
CBase64::CBase64()
|
||||
: m_pDBuffer(NULL),
|
||||
m_pEBuffer(NULL),
|
||||
m_nDBufLen(0),
|
||||
m_nEBufLen(0),
|
||||
m_nDDataLen(0),
|
||||
m_nEDataLen(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CBase64::~CBase64()
|
||||
{
|
||||
if(m_pDBuffer != NULL)
|
||||
delete [] m_pDBuffer;
|
||||
|
||||
if(m_pEBuffer != NULL)
|
||||
delete [] m_pEBuffer;
|
||||
}
|
||||
|
||||
LPCSTR CBase64::DecodedMessage() const
|
||||
{
|
||||
return (LPCSTR) m_pDBuffer;
|
||||
}
|
||||
|
||||
LPCSTR CBase64::EncodedMessage() const
|
||||
{
|
||||
return (LPCSTR) m_pEBuffer;
|
||||
}
|
||||
|
||||
void CBase64::AllocEncode(DWORD nSize)
|
||||
{
|
||||
if(m_nEBufLen < nSize)
|
||||
{
|
||||
if(m_pEBuffer != NULL)
|
||||
delete [] m_pEBuffer;
|
||||
|
||||
m_nEBufLen = ROUNDTOPAGE(nSize);
|
||||
m_pEBuffer = new BYTE[m_nEBufLen];
|
||||
}
|
||||
|
||||
::ZeroMemory(m_pEBuffer, m_nEBufLen);
|
||||
m_nEDataLen = 0;
|
||||
}
|
||||
|
||||
void CBase64::AllocDecode(DWORD nSize)
|
||||
{
|
||||
if(m_nDBufLen < nSize)
|
||||
{
|
||||
if(m_pDBuffer != NULL)
|
||||
delete [] m_pDBuffer;
|
||||
|
||||
m_nDBufLen = ROUNDTOPAGE(nSize);
|
||||
m_pDBuffer = new BYTE[m_nDBufLen];
|
||||
}
|
||||
|
||||
::ZeroMemory(m_pDBuffer, m_nDBufLen);
|
||||
m_nDDataLen = 0;
|
||||
}
|
||||
|
||||
void CBase64::SetEncodeBuffer(const PBYTE pBuffer, DWORD nBufLen)
|
||||
{
|
||||
DWORD i = 0;
|
||||
|
||||
AllocEncode(nBufLen);
|
||||
while(i < nBufLen)
|
||||
{
|
||||
if(!_IsBadMimeChar(pBuffer[i]))
|
||||
{
|
||||
m_pEBuffer[m_nEDataLen] = pBuffer[i];
|
||||
m_nEDataLen++;
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
void CBase64::SetDecodeBuffer(const PBYTE pBuffer, DWORD nBufLen)
|
||||
{
|
||||
AllocDecode(nBufLen);
|
||||
::CopyMemory(m_pDBuffer, pBuffer, nBufLen);
|
||||
m_nDDataLen = nBufLen;
|
||||
}
|
||||
|
||||
void CBase64::Encode(const PBYTE pBuffer, DWORD nBufLen)
|
||||
{
|
||||
SetDecodeBuffer(pBuffer, nBufLen);
|
||||
AllocEncode(nBufLen * 2);
|
||||
|
||||
TempBucket Raw;
|
||||
DWORD nIndex = 0;
|
||||
|
||||
while((nIndex + 3) <= nBufLen)
|
||||
{
|
||||
Raw.Clear();
|
||||
::CopyMemory(&Raw, m_pDBuffer + nIndex, 3);
|
||||
Raw.nSize = 3;
|
||||
_EncodeToBuffer(Raw, m_pEBuffer + m_nEDataLen);
|
||||
nIndex += 3;
|
||||
m_nEDataLen += 4;
|
||||
}
|
||||
|
||||
if(nBufLen > nIndex)
|
||||
{
|
||||
Raw.Clear();
|
||||
Raw.nSize = (BYTE) (nBufLen - nIndex);
|
||||
::CopyMemory(&Raw, m_pDBuffer + nIndex, nBufLen - nIndex);
|
||||
_EncodeToBuffer(Raw, m_pEBuffer + m_nEDataLen);
|
||||
m_nEDataLen += 4;
|
||||
}
|
||||
}
|
||||
|
||||
void CBase64::Encode(LPCSTR szMessage)
|
||||
{
|
||||
if(szMessage != NULL)
|
||||
CBase64::Encode((const PBYTE)szMessage, lstrlenA(szMessage));
|
||||
}
|
||||
|
||||
void CBase64::Decode(const PBYTE pBuffer, DWORD dwBufLen)
|
||||
{
|
||||
if(!CBase64::m_Init)
|
||||
_Init();
|
||||
|
||||
SetEncodeBuffer(pBuffer, dwBufLen);
|
||||
|
||||
AllocDecode(dwBufLen);
|
||||
|
||||
TempBucket Raw;
|
||||
|
||||
DWORD nIndex = 0;
|
||||
|
||||
while((nIndex + 4) <= m_nEDataLen)
|
||||
{
|
||||
Raw.Clear();
|
||||
Raw.nData[0] = CBase64::m_DecodeTable[m_pEBuffer[nIndex]];
|
||||
Raw.nData[1] = CBase64::m_DecodeTable[m_pEBuffer[nIndex + 1]];
|
||||
Raw.nData[2] = CBase64::m_DecodeTable[m_pEBuffer[nIndex + 2]];
|
||||
Raw.nData[3] = CBase64::m_DecodeTable[m_pEBuffer[nIndex + 3]];
|
||||
|
||||
if(Raw.nData[2] == 255)
|
||||
Raw.nData[2] = 0;
|
||||
if(Raw.nData[3] == 255)
|
||||
Raw.nData[3] = 0;
|
||||
|
||||
Raw.nSize = 4;
|
||||
_DecodeToBuffer(Raw, m_pDBuffer + m_nDDataLen);
|
||||
nIndex += 4;
|
||||
m_nDDataLen += 3;
|
||||
}
|
||||
|
||||
// If nIndex < m_nEDataLen, then we got a decode message without padding.
|
||||
// We may want to throw some kind of warning here, but we are still required
|
||||
// to handle the decoding as if it was properly padded.
|
||||
if(nIndex < m_nEDataLen)
|
||||
{
|
||||
Raw.Clear();
|
||||
for(DWORD i = nIndex; i < m_nEDataLen; i++)
|
||||
{
|
||||
Raw.nData[i - nIndex] = CBase64::m_DecodeTable[m_pEBuffer[i]];
|
||||
Raw.nSize++;
|
||||
if(Raw.nData[i - nIndex] == 255)
|
||||
Raw.nData[i - nIndex] = 0;
|
||||
}
|
||||
|
||||
_DecodeToBuffer(Raw, m_pDBuffer + m_nDDataLen);
|
||||
m_nDDataLen += (m_nEDataLen - nIndex);
|
||||
}
|
||||
}
|
||||
|
||||
void CBase64::Decode(LPCSTR szMessage)
|
||||
{
|
||||
if(szMessage != NULL)
|
||||
CBase64::Decode((const PBYTE)szMessage, lstrlenA(szMessage));
|
||||
}
|
||||
|
||||
DWORD CBase64::_DecodeToBuffer(const TempBucket &Decode, PBYTE pBuffer)
|
||||
{
|
||||
TempBucket Data;
|
||||
DWORD nCount = 0;
|
||||
|
||||
_DecodeRaw(Data, Decode);
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
pBuffer[i] = Data.nData[i];
|
||||
if(pBuffer[i] != 255)
|
||||
nCount++;
|
||||
}
|
||||
|
||||
return nCount;
|
||||
}
|
||||
|
||||
|
||||
void CBase64::_EncodeToBuffer(const TempBucket &Decode, PBYTE pBuffer)
|
||||
{
|
||||
TempBucket Data;
|
||||
|
||||
_EncodeRaw(Data, Decode);
|
||||
|
||||
for(int i = 0; i < 4; i++)
|
||||
pBuffer[i] = Base64Digits[Data.nData[i]];
|
||||
|
||||
switch(Decode.nSize)
|
||||
{
|
||||
case 1:
|
||||
pBuffer[2] = '=';
|
||||
case 2:
|
||||
pBuffer[3] = '=';
|
||||
}
|
||||
}
|
||||
|
||||
void CBase64::_DecodeRaw(TempBucket &Data, const TempBucket &Decode)
|
||||
{
|
||||
BYTE nTemp;
|
||||
|
||||
Data.nData[0] = Decode.nData[0];
|
||||
Data.nData[0] <<= 2;
|
||||
|
||||
nTemp = Decode.nData[1];
|
||||
nTemp >>= 4;
|
||||
nTemp &= 0x03;
|
||||
Data.nData[0] |= nTemp;
|
||||
|
||||
Data.nData[1] = Decode.nData[1];
|
||||
Data.nData[1] <<= 4;
|
||||
|
||||
nTemp = Decode.nData[2];
|
||||
nTemp >>= 2;
|
||||
nTemp &= 0x0F;
|
||||
Data.nData[1] |= nTemp;
|
||||
|
||||
Data.nData[2] = Decode.nData[2];
|
||||
Data.nData[2] <<= 6;
|
||||
nTemp = Decode.nData[3];
|
||||
nTemp &= 0x3F;
|
||||
Data.nData[2] |= nTemp;
|
||||
}
|
||||
|
||||
void CBase64::_EncodeRaw(TempBucket &Data, const TempBucket &Decode)
|
||||
{
|
||||
BYTE nTemp;
|
||||
|
||||
Data.nData[0] = Decode.nData[0];
|
||||
Data.nData[0] >>= 2;
|
||||
|
||||
Data.nData[1] = Decode.nData[0];
|
||||
Data.nData[1] <<= 4;
|
||||
nTemp = Decode.nData[1];
|
||||
nTemp >>= 4;
|
||||
Data.nData[1] |= nTemp;
|
||||
Data.nData[1] &= 0x3F;
|
||||
|
||||
Data.nData[2] = Decode.nData[1];
|
||||
Data.nData[2] <<= 2;
|
||||
|
||||
nTemp = Decode.nData[2];
|
||||
nTemp >>= 6;
|
||||
|
||||
Data.nData[2] |= nTemp;
|
||||
Data.nData[2] &= 0x3F;
|
||||
|
||||
Data.nData[3] = Decode.nData[2];
|
||||
Data.nData[3] &= 0x3F;
|
||||
}
|
||||
|
||||
BOOL CBase64::_IsBadMimeChar(BYTE nData)
|
||||
{
|
||||
switch(nData)
|
||||
{
|
||||
case '\r': case '\n': case '\t': case ' ' :
|
||||
case '\b': case '\a': case '\f': case '\v':
|
||||
return TRUE;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void CBase64::_Init()
|
||||
{ // Initialize Decoding table.
|
||||
|
||||
int i;
|
||||
|
||||
for(i = 0; i < 256; i++)
|
||||
CBase64::m_DecodeTable[i] = -2;
|
||||
|
||||
for(i = 0; i < 64; i++)
|
||||
{
|
||||
CBase64::m_DecodeTable[Base64Digits[i]] = (CHAR)i;
|
||||
CBase64::m_DecodeTable[Base64Digits[i]|0x80] = (CHAR)i;
|
||||
}
|
||||
|
||||
CBase64::m_DecodeTable['='] = -1;
|
||||
CBase64::m_DecodeTable['='|0x80] = -1;
|
||||
|
||||
CBase64::m_Init = TRUE;
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
// CBase64.h: interface for the CBase64 class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_CBase64_H__B2E45717_0625_11D2_A80A_00C04FB6794C__INCLUDED_)
|
||||
#define AFX_CBase64_H__B2E45717_0625_11D2_A80A_00C04FB6794C__INCLUDED_
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#define lCONTEXT char
|
||||
#define PlCONTEXT lCONTEXT*
|
||||
|
||||
|
||||
|
||||
class CBase64
|
||||
{
|
||||
// Internal bucket class.
|
||||
class TempBucket
|
||||
{
|
||||
public:
|
||||
BYTE nData[4];
|
||||
BYTE nSize;
|
||||
void Clear() { ::ZeroMemory(nData, 4); nSize = 0; };
|
||||
};
|
||||
|
||||
PBYTE m_pDBuffer;
|
||||
PBYTE m_pEBuffer;
|
||||
DWORD m_nDBufLen;
|
||||
DWORD m_nEBufLen;
|
||||
DWORD m_nDDataLen;
|
||||
DWORD m_nEDataLen;
|
||||
|
||||
public:
|
||||
CBase64();
|
||||
virtual ~CBase64();
|
||||
|
||||
public:
|
||||
virtual void Encode(const PBYTE, DWORD);
|
||||
virtual void Decode(const PBYTE, DWORD);
|
||||
virtual void Encode(LPCSTR sMessage);
|
||||
virtual void Decode(LPCSTR sMessage);
|
||||
|
||||
virtual LPCSTR DecodedMessage() const;
|
||||
virtual LPCSTR EncodedMessage() const;
|
||||
|
||||
virtual void AllocEncode(DWORD);
|
||||
virtual void AllocDecode(DWORD);
|
||||
virtual void SetEncodeBuffer(const PBYTE pBuffer, DWORD nBufLen);
|
||||
virtual void SetDecodeBuffer(const PBYTE pBuffer, DWORD nBufLen);
|
||||
|
||||
protected:
|
||||
virtual void _EncodeToBuffer(const TempBucket &Decode, PBYTE pBuffer);
|
||||
virtual ULONG _DecodeToBuffer(const TempBucket &Decode, PBYTE pBuffer);
|
||||
virtual void _EncodeRaw(TempBucket &, const TempBucket &);
|
||||
virtual void _DecodeRaw(TempBucket &, const TempBucket &);
|
||||
virtual BOOL _IsBadMimeChar(BYTE);
|
||||
|
||||
static char m_DecodeTable[256];
|
||||
static BOOL m_Init;
|
||||
void _Init();
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_CBase64_H__B2E45717_0625_11D2_A80A_00C04FB6794C__INCLUDED_)
|
||||
@@ -0,0 +1,245 @@
|
||||
// Smtp.h: interface for the CSmtp class.
|
||||
//
|
||||
// Written by Robert Simpson (robert@blackcastlesoft.com)
|
||||
// Created 11/1/2000
|
||||
// Version 1.7 -- Last Modified 06/18/2001
|
||||
// See smtp.cpp for details of this revision
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_SMTP_H__F5ACA8FA_AF73_11D4_907D_0080C6F7C752__INCLUDED_)
|
||||
#define AFX_SMTP_H__F5ACA8FA_AF73_11D4_907D_0080C6F7C752__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#pragma comment(lib,"wsock32.lib")
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <winsock.h>
|
||||
#include <string>
|
||||
#include "Base64.h"
|
||||
|
||||
// Some ATL string conversion enhancements
|
||||
// ATL's string conversions allocate memory on the stack, which can
|
||||
// be undesirable if converting huge strings. These enhancements
|
||||
// provide for a pre-allocated memory block to be used as the
|
||||
// destination for the string conversion.
|
||||
#define _W2A(dst,src) AtlW2AHelper(dst,src,lstrlenW(src)+1)
|
||||
#define _A2W(dst,src) AtlA2WHelper(dst,src,lstrlenA(src)+1)
|
||||
|
||||
typedef std::wstring StringW;
|
||||
typedef std::string StringA;
|
||||
|
||||
#ifdef _UNICODE
|
||||
typedef StringW String;
|
||||
#define _W2T(dst,src) lstrcpyW(dst,src)
|
||||
#define _T2W(dst,src) lstrcpyW(dst,src)
|
||||
#define _T2A(dst,src) _W2A(dst,src)
|
||||
#define _A2T(dst,src) _A2W(dst,src)
|
||||
#else
|
||||
typedef StringA String;
|
||||
#define _W2T(dst,src) _W2A(dst,src)
|
||||
#define _T2W(dst,src) _A2W(dst,src)
|
||||
#define _T2A(dst,src) lstrcpyA(dst,src)
|
||||
#define _A2T(dst,src) lstrcpyA(dst,src)
|
||||
#endif
|
||||
|
||||
// When the SMTP server responds to a command, this is the
|
||||
// maximum size of a response I expect back.
|
||||
#ifndef CMD_RESPONSE_SIZE
|
||||
#define CMD_RESPONSE_SIZE 1024
|
||||
#endif
|
||||
|
||||
// The CSmtp::SendCmd() function will send blocks no larger than this value
|
||||
// Any outgoing data larger than this value will trigger an SmtpProgress()
|
||||
// event for all blocks sent.
|
||||
#ifndef CMD_BLOCK_SIZE
|
||||
#define CMD_BLOCK_SIZE 1024
|
||||
#endif
|
||||
|
||||
// Default mime version is 1.0 of course
|
||||
#ifndef MIME_VERSION
|
||||
#define MIME_VERSION _T("1.0")
|
||||
#endif
|
||||
|
||||
// This is the message that would appear in an e-mail client that doesn't support
|
||||
// multipart messages
|
||||
#ifndef MULTIPART_MESSAGE
|
||||
#define MULTIPART_MESSAGE _T("This is a multipart message in MIME format")
|
||||
#endif
|
||||
|
||||
// Default message body encoding
|
||||
#ifndef MESSAGE_ENCODING
|
||||
#define MESSAGE_ENCODING _T("text/plain")
|
||||
#endif
|
||||
|
||||
// Default character set
|
||||
#ifndef MESSAGE_CHARSET
|
||||
#define MESSAGE_CHARSET _T("iso-8859-1")
|
||||
#endif
|
||||
|
||||
// Some forward declares
|
||||
class CSmtp;
|
||||
class CSmtpAddress;
|
||||
class CSmtpMessage;
|
||||
class CSmtpAttachment;
|
||||
class CSmtpMessageBody;
|
||||
class CSmtpMimePart;
|
||||
|
||||
// These are the only 4 encoding methods currently supported
|
||||
typedef enum EncodingEnum
|
||||
{
|
||||
encodeGuess,
|
||||
encode7Bit,
|
||||
encode8Bit,
|
||||
encodeQuotedPrintable,
|
||||
encodeBase64
|
||||
};
|
||||
|
||||
// This code supports three types of mime-types, and can optionally guess a mime type
|
||||
// based on message content.
|
||||
typedef enum MimeTypeEnum
|
||||
{
|
||||
mimeGuess,
|
||||
mimeMixed,
|
||||
mimeAlternative,
|
||||
mimeRelated
|
||||
};
|
||||
|
||||
// Attachments and message bodies inherit from this class
|
||||
// It allows each part of a multipart MIME message to have its own attributes
|
||||
class CSmtpMimePart
|
||||
{
|
||||
public:
|
||||
String Encoding; // Content encoding. Leave blank to let the system discover it
|
||||
String Charset; // Character set for text attachments
|
||||
String ContentId; // Unique content ID, leave blank to let the system handle it
|
||||
EncodingEnum TransferEncoding; // How to encode for transferring to the server
|
||||
};
|
||||
|
||||
// This class represents a user's text name and corresponding email address
|
||||
class CSmtpAddress
|
||||
{
|
||||
public: // Constructors
|
||||
CSmtpAddress(LPCTSTR pszAddress = NULL, LPCTSTR pszName = NULL);
|
||||
|
||||
public: // Operators
|
||||
const CSmtpAddress& operator=(LPCTSTR pszAddress);
|
||||
const CSmtpAddress& operator=(const String& strAddress);
|
||||
|
||||
public: // Member Variables
|
||||
String Name;
|
||||
String Address;
|
||||
};
|
||||
|
||||
// This class represents a file attachment
|
||||
class CSmtpAttachment : public CSmtpMimePart
|
||||
{
|
||||
public: // Constructors
|
||||
CSmtpAttachment(LPCTSTR pszFilename = NULL, LPCTSTR pszAltName = NULL, BOOL bIsInline = FALSE, LPCTSTR pszEncoding = NULL, LPCTSTR pszCharset = MESSAGE_CHARSET, EncodingEnum encode = encodeGuess);
|
||||
|
||||
public: // Operators
|
||||
const CSmtpAttachment& operator=(LPCTSTR pszFilename);
|
||||
const CSmtpAttachment& operator=(const String& strFilename);
|
||||
|
||||
public: // Member Variables
|
||||
String FileName; // Fully-qualified path and filename of this attachment
|
||||
String AltName; // Optional, an alternate name for the file to use when sending
|
||||
BOOL Inline; // Is this an inline attachment?
|
||||
};
|
||||
|
||||
// Multiple message body part support
|
||||
class CSmtpMessageBody : public CSmtpMimePart
|
||||
{
|
||||
public: // Constructors
|
||||
CSmtpMessageBody(LPCTSTR pszBody = NULL, LPCTSTR pszEncoding = MESSAGE_ENCODING, LPCTSTR pszCharset = MESSAGE_CHARSET, EncodingEnum encode = encodeGuess);
|
||||
|
||||
public: // Operators
|
||||
const CSmtpMessageBody& operator=(LPCTSTR pszBody);
|
||||
const CSmtpMessageBody& operator=(const String& strBody);
|
||||
|
||||
public: // Member Variables
|
||||
String Data; // Message body;
|
||||
};
|
||||
|
||||
// This class represents a single message that can be sent via CSmtp
|
||||
class CSmtpMessage
|
||||
{
|
||||
public: // Constructors
|
||||
CSmtpMessage();
|
||||
|
||||
public: // Member Variables
|
||||
CSmtpAddress Sender; // Who the message is from
|
||||
CSmtpAddress Recipient; // The intended recipient
|
||||
String Subject; // The message subject
|
||||
CSimpleArray<CSmtpMessageBody> Message; // An array of message bodies
|
||||
CSimpleArray<CSmtpAddress> CC; // Carbon Copy recipients
|
||||
CSimpleArray<CSmtpAddress> BCC; // Blind Carbon Copy recipients
|
||||
CSimpleArray<CSmtpAttachment> Attachments; // An array of attachments
|
||||
CSimpleMap<String,String> Headers; // Optional headers to include in the message
|
||||
SYSTEMTIME Timestamp; // Timestamp of the message
|
||||
MimeTypeEnum MimeType; // Type of MIME message this is
|
||||
String MessageId; // Optional message ID
|
||||
|
||||
private: // Private Member Variables
|
||||
int GMTOffset; // GMT timezone offset value
|
||||
|
||||
public: // Public functions
|
||||
void Parse(String& strDest);
|
||||
|
||||
private: // Private functions to finalize the message headers & parse the message
|
||||
EncodingEnum GuessEncoding(LPBYTE pByte, DWORD dwLen);
|
||||
void EncodeMessage(EncodingEnum code, String& strMsg, String& strMethod, LPBYTE pByte = NULL, DWORD dwSize = 0);
|
||||
void Make7Bit(String& strDest, String& strSrc);
|
||||
void CommitHeaders();
|
||||
void BreakMessage(String& strDest, String& strSrc, int nLength = 76);
|
||||
void EncodeQuotedPrintable(String& strDest, String& strSrc);
|
||||
};
|
||||
|
||||
// The main class for connecting to a SMTP server and sending mail.
|
||||
class CSmtp
|
||||
{
|
||||
public: // Constructors
|
||||
CSmtp();
|
||||
virtual ~CSmtp();
|
||||
|
||||
public: // Member Variables. Feel free to modify these to change the system's behavior
|
||||
BOOL m_bExtensions; // Use ESMTP extensions (TRUE)
|
||||
DWORD m_dwCmdTimeout; // Timeout for issuing each command (30 seconds)
|
||||
WORD m_wSmtpPort; // Port to communicate via SMTP (25)
|
||||
String m_strUser; // Username for authentication
|
||||
String m_strPass; // Password for authentication
|
||||
|
||||
private: // Private Member Variables
|
||||
SOCKET m_hSocket; // Socket being used to communicate to the SMTP server
|
||||
String m_strResult; // String result from a SendCmd()
|
||||
BOOL m_bConnected; // Connected to SMTP server
|
||||
BOOL m_bUsingExtensions;// Whether this SMTP server uses ESMTP extensions
|
||||
|
||||
public: // These represent the primary public functionality of this class
|
||||
BOOL Connect(LPTSTR pszServer);
|
||||
int SendMessage(CSmtpMessage& msg);
|
||||
int SendMessage(CSmtpAddress& addrFrom, CSmtpAddress& addrTo, LPCTSTR pszSubject, LPTSTR pszMessage, LPVOID pvAttachments = NULL, DWORD dwAttachmentCount = 0);
|
||||
int SendMessage(LPTSTR pszAddrFrom, LPTSTR pszAddrTo, LPTSTR pszSubject, LPTSTR pszMessage, LPVOID pvAttachments = NULL, DWORD dwAttachmentCount = 0);
|
||||
void Close();
|
||||
|
||||
public: // These represent the overridable methods for receiving events from this class
|
||||
virtual int SmtpWarning(int nWarning, LPTSTR pszWarning);
|
||||
virtual int SmtpError(int nCode, LPTSTR pszErr);
|
||||
virtual void SmtpCommandResponse(LPTSTR pszCmd, int nResponse, LPTSTR pszResponse);
|
||||
virtual BOOL SmtpProgress(LPSTR pszBuffer, DWORD dwSent, DWORD dwTotal);
|
||||
|
||||
private: // These functions are used privately to conduct a SMTP session
|
||||
int SendCmd(LPTSTR pszCmd);
|
||||
int SendAuthentication();
|
||||
int SendHello();
|
||||
int SendQuitCmd();
|
||||
int SendFrom(LPTSTR pszFrom);
|
||||
int SendTo(LPTSTR pszTo);
|
||||
int SendData(CSmtpMessage &msg);
|
||||
int RaiseWarning(int nWarning);
|
||||
int RaiseError(int nError);
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_SMTP_H__F5ACA8FA_AF73_11D4_907D_0080C6F7C752__INCLUDED_)
|
||||
@@ -0,0 +1,39 @@
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
#include "..\..\..\..\Winamp/buildType.h"
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION WINAMP_PRODUCTVER
|
||||
PRODUCTVERSION WINAMP_PRODUCTVER
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Winamp SA"
|
||||
VALUE "FileDescription", "Winamp Error Reporter"
|
||||
VALUE "FileVersion", STR_WINAMP_PRODUCTVER
|
||||
VALUE "InternalName", "Winamp Error Reporter"
|
||||
VALUE "LegalCopyright", "Copyright © 2005-2023 Winamp SA"
|
||||
VALUE "LegalTrademarks", "Nullsoft and Winamp are trademarks of Winamp SA"
|
||||
VALUE "OriginalFilename", "feedback.exe"
|
||||
VALUE "ProductName", "Winamp"
|
||||
VALUE "ProductVersion", STR_WINAMP_PRODUCTVER
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
@@ -0,0 +1,324 @@
|
||||
// XZip.h Version 1.1
|
||||
//
|
||||
// Authors: Mark Adler et al. (see below)
|
||||
//
|
||||
// Modified by: Lucian Wischik
|
||||
// lu@wischik.com
|
||||
//
|
||||
// Version 1.0 - Turned C files into just a single CPP file
|
||||
// - Made them compile cleanly as C++ files
|
||||
// - Gave them simpler APIs
|
||||
// - Added the ability to zip/unzip directly in memory without
|
||||
// any intermediate files
|
||||
//
|
||||
// Modified by: Hans Dietrich
|
||||
// hdietrich2@hotmail.com
|
||||
//
|
||||
// Version 1.1: - Added Unicode support to CreateZip() and ZipAdd()
|
||||
// - Changed file names to avoid conflicts with Lucian's files
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Lucian Wischik's comments:
|
||||
// --------------------------
|
||||
// THIS FILE is almost entirely based upon code by info-zip.
|
||||
// It has been modified by Lucian Wischik.
|
||||
// The original code may be found at http://www.info-zip.org
|
||||
// The original copyright text follows.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Original authors' comments:
|
||||
// ---------------------------
|
||||
// This is version 2002-Feb-16 of the Info-ZIP copyright and license. The
|
||||
// definitive version of this document should be available at
|
||||
// ftp://ftp.info-zip.org/pub/infozip/license.html indefinitely.
|
||||
//
|
||||
// Copyright (c) 1990-2002 Info-ZIP. All rights reserved.
|
||||
//
|
||||
// For the purposes of this copyright and license, "Info-ZIP" is defined as
|
||||
// the following set of individuals:
|
||||
//
|
||||
// Mark Adler, John Bush, Karl Davis, Harald Denker, Jean-Michel Dubois,
|
||||
// Jean-loup Gailly, Hunter Goatley, Ian Gorman, Chris Herborth, Dirk Haase,
|
||||
// Greg Hartwig, Robert Heath, Jonathan Hudson, Paul Kienitz,
|
||||
// David Kirschbaum, Johnny Lee, Onno van der Linden, Igor Mandrichenko,
|
||||
// Steve P. Miller, Sergio Monesi, Keith Owens, George Petrov, Greg Roelofs,
|
||||
// Kai Uwe Rommel, Steve Salisbury, Dave Smith, Christian Spieler,
|
||||
// Antoine Verheijen, Paul von Behren, Rich Wales, Mike White
|
||||
//
|
||||
// This software is provided "as is", without warranty of any kind, express
|
||||
// or implied. In no event shall Info-ZIP or its contributors be held liable
|
||||
// for any direct, indirect, incidental, special or consequential damages
|
||||
// arising out of the use of or inability to use this software.
|
||||
//
|
||||
// Permission is granted to anyone to use this software for any purpose,
|
||||
// including commercial applications, and to alter it and redistribute it
|
||||
// freely, subject to the following restrictions:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice,
|
||||
// definition, disclaimer, and this list of conditions.
|
||||
//
|
||||
// 2. Redistributions in binary form (compiled executables) must reproduce
|
||||
// the above copyright notice, definition, disclaimer, and this list of
|
||||
// conditions in documentation and/or other materials provided with the
|
||||
// distribution. The sole exception to this condition is redistribution
|
||||
// of a standard UnZipSFX binary as part of a self-extracting archive;
|
||||
// that is permitted without inclusion of this license, as long as the
|
||||
// normal UnZipSFX banner has not been removed from the binary or disabled.
|
||||
//
|
||||
// 3. Altered versions--including, but not limited to, ports to new
|
||||
// operating systems, existing ports with new graphical interfaces, and
|
||||
// dynamic, shared, or static library versions--must be plainly marked
|
||||
// as such and must not be misrepresented as being the original source.
|
||||
// Such altered versions also must not be misrepresented as being
|
||||
// Info-ZIP releases--including, but not limited to, labeling of the
|
||||
// altered versions with the names "Info-ZIP" (or any variation thereof,
|
||||
// including, but not limited to, different capitalizations),
|
||||
// "Pocket UnZip", "WiZ" or "MacZip" without the explicit permission of
|
||||
// Info-ZIP. Such altered versions are further prohibited from
|
||||
// misrepresentative use of the Zip-Bugs or Info-ZIP e-mail addresses or
|
||||
// of the Info-ZIP URL(s).
|
||||
//
|
||||
// 4. Info-ZIP retains the right to use the names "Info-ZIP", "Zip", "UnZip",
|
||||
// "UnZipSFX", "WiZ", "Pocket UnZip", "Pocket Zip", and "MacZip" for its
|
||||
// own source and binary releases.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef XZIP_H
|
||||
#define XZIP_H
|
||||
|
||||
// ZIP functions -- for creating zip files
|
||||
// This file is a repackaged form of the Info-Zip source code available
|
||||
// at www.info-zip.org. The original copyright notice may be found in
|
||||
// zip.cpp. The repackaging was done by Lucian Wischik to simplify its
|
||||
// use in Windows/C++.
|
||||
|
||||
#ifndef XUNZIP_H
|
||||
DECLARE_HANDLE(HZIP); // An HZIP identifies a zip file that is being created
|
||||
#endif
|
||||
|
||||
typedef DWORD ZRESULT; // result codes from any of the zip functions. Listed later.
|
||||
|
||||
// flag values passed to some functions
|
||||
#define ZIP_HANDLE 1
|
||||
#define ZIP_FILENAME 2
|
||||
#define ZIP_MEMORY 3
|
||||
#define ZIP_FOLDER 4
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// CreateZip()
|
||||
//
|
||||
// Purpose: Create a zip archive file
|
||||
//
|
||||
// Parameters: z - archive file name if flags is ZIP_FILENAME; for other
|
||||
// uses see below
|
||||
// len - for memory (ZIP_MEMORY) should be the buffer size;
|
||||
// for other uses, should be 0
|
||||
// flags - indicates usage, see below; for files, this will be
|
||||
// ZIP_FILENAME
|
||||
//
|
||||
// Returns: HZIP - non-zero if zip archive created ok, otherwise 0
|
||||
//
|
||||
HZIP CreateZip(void *z, unsigned int len, DWORD flags);
|
||||
// CreateZip - call this to start the creation of a zip file.
|
||||
// As the zip is being created, it will be stored somewhere:
|
||||
// to a pipe: CreateZip(hpipe_write, 0,ZIP_HANDLE);
|
||||
// in a file (by handle): CreateZip(hfile, 0,ZIP_HANDLE);
|
||||
// in a file (by name): CreateZip("c:\\test.zip", 0,ZIP_FILENAME);
|
||||
// in memory: CreateZip(buf, len,ZIP_MEMORY);
|
||||
// or in pagefile memory: CreateZip(0, len,ZIP_MEMORY);
|
||||
// The final case stores it in memory backed by the system paging file,
|
||||
// where the zip may not exceed len bytes. This is a bit friendlier than
|
||||
// allocating memory with new[]: it won't lead to fragmentation, and the
|
||||
// memory won't be touched unless needed.
|
||||
// Note: because pipes don't allow random access, the structure of a zipfile
|
||||
// created into a pipe is slightly different from that created into a file
|
||||
// or memory. In particular, the compressed-size of the item cannot be
|
||||
// stored in the zipfile until after the item itself. (Also, for an item added
|
||||
// itself via a pipe, the uncompressed-size might not either be known until
|
||||
// after.) This is not normally a problem. But if you try to unzip via a pipe
|
||||
// as well, then the unzipper will not know these things about the item until
|
||||
// after it has been unzipped. Therefore: for unzippers which don't just write
|
||||
// each item to disk or to a pipe, but instead pre-allocate memory space into
|
||||
// which to unzip them, then either you have to create the zip not to a pipe,
|
||||
// or you have to add items not from a pipe, or at least when adding items
|
||||
// from a pipe you have to specify the length.
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// ZipAdd()
|
||||
//
|
||||
// Purpose: Add a file to a zip archive
|
||||
//
|
||||
// Parameters: hz - handle to an open zip archive
|
||||
// dstzn - name used inside the zip archive to identify the file
|
||||
// src - for a file (ZIP_FILENAME) this specifies the filename
|
||||
// to be added to the archive; for other uses, see below
|
||||
// len - for memory (ZIP_MEMORY) this specifies the buffer
|
||||
// length; for other uses, this should be 0
|
||||
// flags - indicates usage, see below; for files, this will be
|
||||
// ZIP_FILENAME
|
||||
//
|
||||
// Returns: ZRESULT - ZR_OK if success, otherwise some other value
|
||||
//
|
||||
ZRESULT ZipAdd(HZIP hz, const TCHAR *dstzn, void *src, unsigned int len, DWORD flags);
|
||||
// ZipAdd - call this for each file to be added to the zip.
|
||||
// dstzn is the name that the file will be stored as in the zip file.
|
||||
// The file to be added to the zip can come
|
||||
// from a pipe: ZipAdd(hz,"file.dat", hpipe_read,0,ZIP_HANDLE);
|
||||
// from a file: ZipAdd(hz,"file.dat", hfile,0,ZIP_HANDLE);
|
||||
// from a fname: ZipAdd(hz,"file.dat", "c:\\docs\\origfile.dat",0,ZIP_FILENAME);
|
||||
// from memory: ZipAdd(hz,"subdir\\file.dat", buf,len,ZIP_MEMORY);
|
||||
// (folder): ZipAdd(hz,"subdir", 0,0,ZIP_FOLDER);
|
||||
// Note: if adding an item from a pipe, and if also creating the zip file itself
|
||||
// to a pipe, then you might wish to pass a non-zero length to the ZipAdd
|
||||
// function. This will let the zipfile store the items size ahead of the
|
||||
// compressed item itself, which in turn makes it easier when unzipping the
|
||||
// zipfile into a pipe.
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// CloseZip()
|
||||
//
|
||||
// Purpose: Close an open zip archive
|
||||
//
|
||||
// Parameters: hz - handle to an open zip archive
|
||||
//
|
||||
// Returns: ZRESULT - ZR_OK if success, otherwise some other value
|
||||
//
|
||||
ZRESULT CloseZip(HZIP hz);
|
||||
// CloseZip - the zip handle must be closed with this function.
|
||||
|
||||
|
||||
ZRESULT ZipGetMemory(HZIP hz, void **buf, unsigned long *len);
|
||||
// ZipGetMemory - If the zip was created in memory, via ZipCreate(0,ZIP_MEMORY),
|
||||
// then this function will return information about that memory block.
|
||||
// buf will receive a pointer to its start, and len its length.
|
||||
// Note: you can't add any more after calling this.
|
||||
|
||||
|
||||
unsigned int FormatZipMessage(ZRESULT code, char *buf,unsigned int len);
|
||||
// FormatZipMessage - given an error code, formats it as a string.
|
||||
// It returns the length of the error message. If buf/len points
|
||||
// to a real buffer, then it also writes as much as possible into there.
|
||||
|
||||
|
||||
|
||||
// These are the result codes:
|
||||
#define ZR_OK 0x00000000 // nb. the pseudo-code zr-recent is never returned,
|
||||
#define ZR_RECENT 0x00000001 // but can be passed to FormatZipMessage.
|
||||
// The following come from general system stuff (e.g. files not openable)
|
||||
#define ZR_GENMASK 0x0000FF00
|
||||
#define ZR_NODUPH 0x00000100 // couldn't duplicate the handle
|
||||
#define ZR_NOFILE 0x00000200 // couldn't create/open the file
|
||||
#define ZR_NOALLOC 0x00000300 // failed to allocate some resource
|
||||
#define ZR_WRITE 0x00000400 // a general error writing to the file
|
||||
#define ZR_NOTFOUND 0x00000500 // couldn't find that file in the zip
|
||||
#define ZR_MORE 0x00000600 // there's still more data to be unzipped
|
||||
#define ZR_CORRUPT 0x00000700 // the zipfile is corrupt or not a zipfile
|
||||
#define ZR_READ 0x00000800 // a general error reading the file
|
||||
// The following come from mistakes on the part of the caller
|
||||
#define ZR_CALLERMASK 0x00FF0000
|
||||
#define ZR_ARGS 0x00010000 // general mistake with the arguments
|
||||
#define ZR_NOTMMAP 0x00020000 // tried to ZipGetMemory, but that only works on mmap zipfiles, which yours wasn't
|
||||
#define ZR_MEMSIZE 0x00030000 // the memory size is too small
|
||||
#define ZR_FAILED 0x00040000 // the thing was already failed when you called this function
|
||||
#define ZR_ENDED 0x00050000 // the zip creation has already been closed
|
||||
#define ZR_MISSIZE 0x00060000 // the indicated input file size turned out mistaken
|
||||
#define ZR_PARTIALUNZ 0x00070000 // the file had already been partially unzipped
|
||||
#define ZR_ZMODE 0x00080000 // tried to mix creating/opening a zip
|
||||
// The following come from bugs within the zip library itself
|
||||
#define ZR_BUGMASK 0xFF000000
|
||||
#define ZR_NOTINITED 0x01000000 // initialisation didn't work
|
||||
#define ZR_SEEK 0x02000000 // trying to seek in an unseekable file
|
||||
#define ZR_NOCHANGE 0x04000000 // changed its mind on storage, but not allowed
|
||||
#define ZR_FLATE 0x05000000 // an internal error in the de/inflation code
|
||||
|
||||
|
||||
|
||||
// e.g.
|
||||
//
|
||||
// (1) Traditional use, creating a zipfile from existing files
|
||||
// HZIP hz = CreateZip("c:\\temp.zip",0,ZIP_FILENAME);
|
||||
// ZipAdd(hz,"src1.txt", "c:\\src1.txt",0,ZIP_FILENAME);
|
||||
// ZipAdd(hz,"src2.bmp", "c:\\src2_origfn.bmp",0,ZIP_FILENAME);
|
||||
// CloseZip(hz);
|
||||
//
|
||||
// (2) Memory use, creating an auto-allocated mem-based zip file from various sources
|
||||
// HZIP hz = CreateZip(0,100000,ZIP_MEMORY);
|
||||
// // adding a conventional file...
|
||||
// ZipAdd(hz,"src1.txt", "c:\\src1.txt",0,ZIP_FILENAME);
|
||||
// // adding something from memory...
|
||||
// char buf[1000]; for (int i=0; i<1000; i++) buf[i]=(char)(i&0x7F);
|
||||
// ZipAdd(hz,"file.dat", buf,1000,ZIP_MEMORY);
|
||||
// // adding something from a pipe...
|
||||
// HANDLE hread,hwrite; CreatePipe(&hread,&write,NULL,0);
|
||||
// HANDLE hthread = CreateThread(ThreadFunc,(void*)hwrite);
|
||||
// ZipAdd(hz,"unz3.dat", hread,0,ZIP_HANDLE);
|
||||
// WaitForSingleObject(hthread,INFINITE);
|
||||
// CloseHandle(hthread); CloseHandle(hread);
|
||||
// ... meanwhile DWORD CALLBACK ThreadFunc(void *dat)
|
||||
// { HANDLE hwrite = (HANDLE)dat;
|
||||
// char buf[1000]={17};
|
||||
// DWORD writ; WriteFile(hwrite,buf,1000,&writ,NULL);
|
||||
// CloseHandle(hwrite);
|
||||
// return 0;
|
||||
// }
|
||||
// // and now that the zip is created, let's do something with it:
|
||||
// void *zbuf; unsigned long zlen; ZipGetMemory(hz,&zbuf,&zlen);
|
||||
// HANDLE hfz = CreateFile("test2.zip",GENERIC_WRITE,CREATE_ALWAYS);
|
||||
// DWORD writ; WriteFile(hfz,zbuf,zlen,&writ,NULL);
|
||||
// CloseHandle(hfz);
|
||||
// CloseZip(hz);
|
||||
//
|
||||
// (3) Handle use, for file handles and pipes
|
||||
// HANDLE hzread,hzwrite; CreatePipe(&hzread,&hzwrite);
|
||||
// HANDLE hthread = CreateThread(ZipReceiverThread,(void*)hread);
|
||||
// HZIP hz = ZipCreate(hzwrite,ZIP_HANDLE);
|
||||
// // ... add to it
|
||||
// CloseZip(hz);
|
||||
// CloseHandle(hzwrite);
|
||||
// WaitForSingleObject(hthread,INFINITE);
|
||||
// CloseHandle(hthread);
|
||||
// ... meanwhile DWORD CALLBACK ThreadFunc(void *dat)
|
||||
// { HANDLE hread = (HANDLE)dat;
|
||||
// char buf[1000] = {0};
|
||||
// while (true)
|
||||
// { DWORD red = 0; ReadFile(hread,buf,1000,&red,NULL);
|
||||
// // ... and do something with this zip data we're receiving
|
||||
// if (red==0) break;
|
||||
// }
|
||||
// CloseHandle(hread);
|
||||
// return 0;
|
||||
// }
|
||||
//
|
||||
|
||||
|
||||
// Now we indulge in a little skullduggery so that the code works whether
|
||||
// the user has included just zip or both zip and unzip.
|
||||
// Idea: if header files for both zip and unzip are present, then presumably
|
||||
// the cpp files for zip and unzip are both present, so we will call
|
||||
// one or the other of them based on a dynamic choice. If the header file
|
||||
// for only one is present, then we will bind to that particular one.
|
||||
HZIP CreateZipZ(void *z,unsigned int len,DWORD flags);
|
||||
ZRESULT CloseZipZ(HZIP hz);
|
||||
unsigned int FormatZipMessageZ(ZRESULT code, char *buf,unsigned int len);
|
||||
bool IsZipHandleZ(HZIP hz);
|
||||
#define CreateZip CreateZipZ
|
||||
|
||||
#ifdef XUNZIP_H
|
||||
#undef CloseZip
|
||||
#define CloseZip(hz) (IsZipHandleZ(hz)?CloseZipZ(hz):CloseZipU(hz))
|
||||
#else
|
||||
#define CloseZip CloseZipZ
|
||||
#define FormatZipMessage FormatZipMessageZ
|
||||
#endif
|
||||
|
||||
|
||||
#endif //XZIP_H
|
||||
@@ -0,0 +1,193 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""version.rc2""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_CRASHDLG DIALOGEX 0, 0, 187, 42
|
||||
STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_FIXEDSYS | DS_NOFAILCREATE | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_NOPARENTNOTIFY
|
||||
CAPTION "Winamp Error Reporter"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
ICON 102,IDC_BMP_LOGO,8,6,21,20,SS_REALSIZEIMAGE
|
||||
LTEXT "",IDC_LBL_STEP,48,6,127,10
|
||||
CONTROL "",IDC_PRG_COLLECT,"msctls_progress32",WS_BORDER,48,19,127,9
|
||||
END
|
||||
|
||||
IDD_CONFIG DIALOGEX 0, 0, 273, 246
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
EXSTYLE WS_EX_CONTROLPARENT
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "General",IDC_GRP_GENERAL,0,0,273,64
|
||||
CONTROL "Auto Restart",IDC_CHK_RESTART,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,12,90,10
|
||||
CONTROL "Compress results",IDC_CHK_COMPRESS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,24,90,10
|
||||
CONTROL "Create Dump File",IDC_CHK_CREATEDMP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,36,90,10
|
||||
CONTROL "Create Log File",IDC_CHK_CREATELOG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,49,90,10
|
||||
GROUPBOX "",IDC_GRP_EMAIL,101,13,165,45
|
||||
CONTROL "Send Data",IDC_CHK_SEND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,106,12,46,10
|
||||
CONTROL "Using default email program",IDC_RB_USECLIENT,"Button",BS_AUTORADIOBUTTON,106,27,105,10
|
||||
CONTROL "Using SMTP server",IDC_RB_USESMTP,"Button",BS_AUTORADIOBUTTON,106,41,75,10
|
||||
PUSHBUTTON "SMTP Settings...",IDC_BTN_SMTP,185,39,75,13
|
||||
GROUPBOX "Dump File",IDC_GRP_DUMP,0,67,273,66
|
||||
LTEXT "OS version:",IDC_LBL_OSVERSION_CAPTION,6,78,38,8
|
||||
LTEXT "",IDC_LBL_OSVERSION,48,78,218,8
|
||||
LTEXT "Dll path:",IDC_LBL_DLLPATH_CAPTION,6,90,38,8
|
||||
LTEXT "",IDC_LBL_DLLPATH,48,90,218,8,SS_PATHELLIPSIS
|
||||
LTEXT "Dll version:",IDC_LBL_DLLVERSION_CAPTION,6,102,38,8
|
||||
LTEXT "unknown [unable to load]",IDC_LBL_DLLVERSION,48,102,219,8
|
||||
LTEXT "Type:",IDC_LBL_DMPTYPE,6,116,20,8
|
||||
COMBOBOX IDC_CMB_DMPTYPE,30,114,237,84,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
GROUPBOX "Log File",IDC_GRP_LOG,0,136,273,28
|
||||
CONTROL "System info",IDC_CHK_LOGSYSTEM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,149,53,10
|
||||
CONTROL "Stack data",IDC_CHK_LOGSTACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,63,149,50,10
|
||||
CONTROL "Registry state",IDC_CHK_LOGREGISTRY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,117,149,62,10
|
||||
CONTROL "Loaded modules",IDC_CHK_LOGMODULE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,183,149,67,10
|
||||
LTEXT "Save report in:",IDC_LBL_PATH,6,180,50,8
|
||||
EDITTEXT IDC_EDT_PATH,60,178,188,12,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "...",IDC_BTN_PATH,249,178,19,12
|
||||
GROUPBOX "File Paths",IDC_GRP_ZIP,1,168,272,76
|
||||
LTEXT "Zip filename:",IDC_LBL_ZIPNAME,6,196,50,8
|
||||
EDITTEXT IDC_EDT_ZIPNAME,60,194,208,12,ES_AUTOHSCROLL
|
||||
LTEXT "Dump filename:",IDC_LBL_DMPNAME,6,212,50,8
|
||||
EDITTEXT IDC_EDT_DMPNAME,60,210,208,12,ES_AUTOHSCROLL
|
||||
LTEXT "Log filename:",IDC_LBL_LOGNAME,6,229,50,8
|
||||
EDITTEXT IDC_EDT_LOGNAME,60,227,208,12,ES_AUTOHSCROLL
|
||||
CONTROL "Do not ask questions",IDC_CHK_SILENT,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_DISABLED | WS_TABSTOP,281,0,90,10
|
||||
END
|
||||
|
||||
IDD_DLG_SMTP DIALOGEX 0, 0, 180, 155
|
||||
STYLE DS_SETFONT | DS_SETFOREGROUND | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
CAPTION "SMTP Settings"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "Server Details",IDC_GRP_AUTH2,5,5,170,63,BS_LEFT
|
||||
LTEXT "Server:",IDC_LBL_SERVER,12,18,54,8
|
||||
EDITTEXT IDC_EDT_SERVER,70,16,100,12,ES_AUTOHSCROLL
|
||||
LTEXT "Port:",IDC_LBL_PORT,12,33,54,8
|
||||
EDITTEXT IDC_EDT_PORT,70,32,21,12,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT
|
||||
LTEXT "Sender Address:",IDC_LBL_ADDRESS,12,50,54,8
|
||||
EDITTEXT IDC_EDT_ADDRESS,70,48,100,14,ES_AUTOHSCROLL
|
||||
GROUPBOX "Authentication",IDC_GRP_AUTH,5,71,170,62,BS_LEFT
|
||||
CONTROL "Server requires authentication",IDC_CHK_AUTH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,84,116,9
|
||||
LTEXT "User:",IDC_LBL_USER,11,100,34,8
|
||||
EDITTEXT IDC_EDT_USER,49,97,120,12,ES_AUTOHSCROLL
|
||||
LTEXT "Password:",IDC_LBL_PWD,11,116,34,8
|
||||
EDITTEXT IDC_EDT_PWD,49,113,120,12,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "Close",IDCANCEL,125,137,50,13
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_CRASHDLG, DIALOG
|
||||
BEGIN
|
||||
BOTTOMMARGIN, 39
|
||||
END
|
||||
|
||||
IDD_DLG_SMTP, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 5
|
||||
RIGHTMARGIN, 175
|
||||
TOPMARGIN, 5
|
||||
BOTTOMMARGIN, 150
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_ERROR_FEEDBACK "Error Feedback"
|
||||
IDS_UNKNOWN "unknown"
|
||||
IDS_LOADED_OK "loaded"
|
||||
IDS_UNABLE_TO_LOAD "unable to load"
|
||||
IDS_NOT_FOUND "not found"
|
||||
IDS_UNABLE_TO_SAVE_SETTINGS "Unable to save error feedback settings"
|
||||
IDS_SAVE_ERROR "Save Error"
|
||||
IDS_SELECT_FOLDER_FOR_ERROR_INFO
|
||||
"Select folder where the error information will be saved to"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_NULLSOFT_ERROR_FEEDBACK "Nullsoft Error Feedback v%s"
|
||||
65535 "{092A97EF-7DC0-41a7-80D1-90DEEB18F12D}"
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#include "version.rc2"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29424.173
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen_crasher", "gen_crasher.vcxproj", "{A029F791-2838-4D16-BC92-C8E04D677948}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A029F791-2838-4D16-BC92-C8E04D677948}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{A029F791-2838-4D16-BC92-C8E04D677948}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{A029F791-2838-4D16-BC92-C8E04D677948}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A029F791-2838-4D16-BC92-C8E04D677948}.Debug|x64.Build.0 = Debug|x64
|
||||
{A029F791-2838-4D16-BC92-C8E04D677948}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{A029F791-2838-4D16-BC92-C8E04D677948}.Release|Win32.Build.0 = Release|Win32
|
||||
{A029F791-2838-4D16-BC92-C8E04D677948}.Release|x64.ActiveCfg = Release|x64
|
||||
{A029F791-2838-4D16-BC92-C8E04D677948}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {A8CBA02D-A7C5-4784-BC88-C554B8121167}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,290 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{A029F791-2838-4D16-BC92-C8E04D677948}</ProjectGuid>
|
||||
<RootNamespace>gen_crasher</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
<EmbedManifest>true</EmbedManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg">
|
||||
<VcpkgEnabled>false</VcpkgEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<VcpkgConfiguration>Debug</VcpkgConfiguration>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_DEBUG;_WINDOWS;_USRDLL;GEN_CRASHER_EXPORTS;_WIN32_IE=0x0A00;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>shlwapi.lib;Version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\
|
||||
xcopy /Y /D $(IntDir)$(TargetName).pdb ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message>
|
||||
</PostBuildEvent>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;_DEBUG;WIN64;_WINDOWS;_USRDLL;GEN_CRASHER_EXPORTS;_WIN32_IE=0x0A00;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>shlwapi.lib;Version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\
|
||||
xcopy /Y /D $(IntDir)$(TargetName).pdb ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message>
|
||||
</PostBuildEvent>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<AdditionalIncludeDirectories>..\..\..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;NDEBUG;_WINDOWS;_USRDLL;GEN_CRASHER_EXPORTS;_WIN32_IE=0x0A00;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>shlwapi.lib;Version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<TurnOffAssemblyGeneration>true</TurnOffAssemblyGeneration>
|
||||
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message>
|
||||
</PostBuildEvent>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<AdditionalIncludeDirectories>..\..\..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;NDEBUG;WIN64;_WINDOWS;_USRDLL;GEN_CRASHER_EXPORTS;_WIN32_IE=0x0A00;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>shlwapi.lib;Version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<TurnOffAssemblyGeneration>true</TurnOffAssemblyGeneration>
|
||||
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message>
|
||||
</PostBuildEvent>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Wasabi\Wasabi.vcxproj">
|
||||
<Project>{3e0bfa8a-b86a-42e9-a33f-ec294f823f7f}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="feedback\feedback.vcxproj">
|
||||
<Project>{a845d04c-a95e-424c-bfa8-d7706dba78bf}</Project>
|
||||
<CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\nu\ServiceWatcher.cpp" />
|
||||
<ClCompile Include="config.cpp" />
|
||||
<ClCompile Include="configDlg.cpp" />
|
||||
<ClCompile Include="crashDlg.cpp" />
|
||||
<ClCompile Include="ExceptionHandler.cpp" />
|
||||
<ClCompile Include="GetWinVer.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="MiniVersion.cpp" />
|
||||
<ClCompile Include="settings.cpp" />
|
||||
<ClCompile Include="smtpDlg.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\Winamp\wa_ipc.h" />
|
||||
<ClInclude Include="api__gen_crasher.h" />
|
||||
<ClInclude Include="config.h" />
|
||||
<ClInclude Include="configDlg.h" />
|
||||
<ClInclude Include="crashDlg.h" />
|
||||
<ClInclude Include="ExceptionHandler.h" />
|
||||
<ClInclude Include="GetWinVer.h" />
|
||||
<ClInclude Include="main.h" />
|
||||
<ClInclude Include="minidump.h" />
|
||||
<ClInclude Include="MiniVersion.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="settings.h" />
|
||||
<ClInclude Include="smtpDlg.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="gen_crasher.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClCompile Include="config.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="configDlg.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="crashDlg.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ExceptionHandler.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GetWinVer.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="MiniVersion.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="settings.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="smtpDlg.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\nu\ServiceWatcher.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="api__gen_crasher.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="config.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="configDlg.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="crashDlg.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ExceptionHandler.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="GetWinVer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="main.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="minidump.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="MiniVersion.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="settings.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="smtpDlg.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\Winamp\wa_ipc.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{387133cc-523c-4c1f-8215-3de0d29784a3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Ressource Files">
|
||||
<UniqueIdentifier>{1515be17-59cd-45ca-abc3-a3b3e66c36b9}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{89f5adbb-9d33-4588-b2cb-942e0cc75987}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="gen_crasher.rc">
|
||||
<Filter>Ressource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,140 @@
|
||||
// Winamp error feedback plugin
|
||||
// Copyright (C) 2005 Nullsoft
|
||||
|
||||
//#define PLUGIN_DESC "Nullsoft Error Feedback"
|
||||
#define PLUGIN_VER L"1.16"
|
||||
|
||||
#include ".\main.h"
|
||||
#include "configDlg.h"
|
||||
#include "crashDlg.h"
|
||||
#include "api__gen_crasher.h"
|
||||
#include "../nu/ServiceWatcher.h"
|
||||
|
||||
ServiceWatcher watcher;
|
||||
Settings settings;
|
||||
prefsDlgRecW prefItem = {0};
|
||||
char *winampVersion;
|
||||
static wchar_t prefsTitle[64];
|
||||
|
||||
// wasabi based services for localisation support
|
||||
api_service *WASABI_API_SVC = 0;
|
||||
api_language *WASABI_API_LNG = 0;
|
||||
api_syscb *WASABI_API_SYSCB = 0;
|
||||
api_application *WASABI_API_APP = 0;
|
||||
HINSTANCE WASABI_API_LNG_HINST = 0, WASABI_API_ORIG_HINST = 0;
|
||||
|
||||
int init(void);
|
||||
void config(void);
|
||||
void quit(void);
|
||||
|
||||
extern "C" winampGeneralPurposePlugin plugin =
|
||||
{
|
||||
GPPHDR_VER_U,
|
||||
"nullsoft(gen_crasher.dll)",
|
||||
init,
|
||||
config,
|
||||
quit,
|
||||
};
|
||||
|
||||
extern "C" __declspec(dllexport) winampGeneralPurposePlugin * winampGetGeneralPurposePlugin() { return &plugin; }
|
||||
|
||||
int init(void)
|
||||
{
|
||||
if (!settings.IsOk()) return GEN_INIT_FAILURE;
|
||||
|
||||
// loader so that we can get the localisation service api for use
|
||||
WASABI_API_SVC = (api_service*)SendMessage(plugin.hwndParent, WM_WA_IPC, 0, IPC_GET_API_SERVICE);
|
||||
if (!WASABI_API_SVC || WASABI_API_SVC == (api_service *)1)
|
||||
return GEN_INIT_FAILURE;
|
||||
|
||||
waServiceFactory *sf = WASABI_API_SVC->service_getServiceByGuid(applicationApiServiceGuid);
|
||||
if (sf) WASABI_API_SYSCB = reinterpret_cast<api_syscb*>(sf->getInterface());
|
||||
|
||||
watcher.WatchWith(WASABI_API_SVC);
|
||||
watcher.WatchFor(&WASABI_API_LNG, languageApiGUID);
|
||||
WASABI_API_SYSCB->syscb_registerCallback(&watcher);
|
||||
|
||||
sf = WASABI_API_SVC->service_getServiceByGuid(applicationApiServiceGuid);
|
||||
if (sf) WASABI_API_APP = reinterpret_cast<api_application*>(sf->getInterface());
|
||||
|
||||
// need to have this initialised before we try to do anything with localisation features
|
||||
WASABI_API_START_LANG(plugin.hDllInstance,GenCrasherLangGUID);
|
||||
|
||||
static wchar_t szDescription[256];
|
||||
swprintf(szDescription, ARRAYSIZE(szDescription),
|
||||
WASABI_API_LNGSTRINGW(IDS_NULLSOFT_ERROR_FEEDBACK), PLUGIN_VER);
|
||||
plugin.description = (char*)szDescription;
|
||||
|
||||
//register prefs screen
|
||||
prefItem.dlgID = IDD_CONFIG;
|
||||
prefItem.name = WASABI_API_LNGSTRINGW_BUF(IDS_ERROR_FEEDBACK,prefsTitle,64);
|
||||
prefItem.proc = (void*) ConfigDlgProc;
|
||||
prefItem.hInst = WASABI_API_LNG_HINST;
|
||||
prefItem.where = -1;
|
||||
SendMessageA(plugin.hwndParent, WM_WA_IPC, (WPARAM) &prefItem, IPC_ADD_PREFS_DLGW);
|
||||
winampVersion = (char *)SendMessageA(plugin.hwndParent,WM_WA_IPC,0,IPC_GETVERSIONSTRING);
|
||||
return GEN_INIT_SUCCESS;
|
||||
}
|
||||
|
||||
void config(void)
|
||||
{
|
||||
SendMessage(plugin.hwndParent,WM_WA_IPC,(WPARAM)&prefItem,IPC_OPENPREFSTOPAGE);
|
||||
}
|
||||
|
||||
void quit(void)
|
||||
{
|
||||
watcher.StopWatching();
|
||||
watcher.Clear();
|
||||
|
||||
waServiceFactory *sf = WASABI_API_SVC->service_getServiceByGuid(languageApiGUID);
|
||||
if (sf) sf->releaseInterface(WASABI_API_LNG);
|
||||
WASABI_API_LNG=0;
|
||||
}
|
||||
|
||||
int StartHandler(wchar_t* iniPath)
|
||||
{
|
||||
settings.SetPath(iniPath);
|
||||
if (!settings.Load())
|
||||
{
|
||||
if (!(settings.CreateDefault(iniPath) && settings.Save()))
|
||||
{
|
||||
//OutputDebugString(L"Feedback plugin - unable to read settings. Error feedback disabled.\r\n");
|
||||
}
|
||||
}
|
||||
SetUnhandledExceptionFilter(FeedBackFilter);
|
||||
//OutputDebugString(L"Error FeedBack started.\r\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
PEXCEPTION_POINTERS gExceptionInfo;
|
||||
|
||||
LONG WINAPI FeedBackFilter( struct _EXCEPTION_POINTERS *pExceptionInfo )
|
||||
{
|
||||
if (alreadyProccessing) return EXCEPTION_CONTINUE_EXECUTION;
|
||||
|
||||
alreadyProccessing = TRUE;
|
||||
gExceptionInfo = pExceptionInfo;
|
||||
|
||||
// show user dialog
|
||||
HWND hwnd;
|
||||
if (WASABI_API_LNG)
|
||||
hwnd = WASABI_API_CREATEDIALOGPARAMW(IDD_CRASHDLG, NULL, CrashDlgProc, (LPARAM)WASABI_API_ORIG_HINST);
|
||||
else
|
||||
#ifdef _M_IX86
|
||||
hwnd = CreateDialogParam(plugin.hDllInstance, MAKEINTRESOURCE(IDD_CRASHDLG), NULL, CrashDlgProc, (LPARAM)plugin.hDllInstance);
|
||||
#endif
|
||||
#ifdef _M_X64
|
||||
hwnd = CreateDialogParam(plugin.hDllInstance, MAKEINTRESOURCE(IDD_CRASHDLG), NULL, (DLGPROC)CrashDlgProc, (LPARAM)plugin.hDllInstance);
|
||||
#endif
|
||||
|
||||
SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE);
|
||||
while (IsWindow(hwnd))
|
||||
{
|
||||
MSG msg;
|
||||
if (!GetMessage(&msg, NULL, 0, 0)) break;
|
||||
if (IsDialogMessage(hwnd, &msg)) continue;
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
return EXCEPTION_EXECUTE_HANDLER;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef NULLSOFT_CRASHER_MAIN_H
|
||||
#define NULLSOFT_CRASHER_MAIN_H
|
||||
|
||||
#include <windows.h>
|
||||
#include <dbghelp.h>
|
||||
#include "resource.h"
|
||||
#define NO_IVIDEO_DECLARE
|
||||
#include "..\winamp\wa_ipc.h"
|
||||
#include "settings.h"
|
||||
#include "../winamp/gen.h"
|
||||
|
||||
extern Settings settings;
|
||||
extern prefsDlgRecW prefItem;
|
||||
extern char *winampVersion;
|
||||
extern "C" winampGeneralPurposePlugin plugin;
|
||||
|
||||
extern "C" __declspec(dllexport) int StartHandler(wchar_t* iniPath);
|
||||
extern "C" LONG WINAPI FeedBackFilter( struct _EXCEPTION_POINTERS *pExceptionInfo );
|
||||
|
||||
//typedef struct _EXCEPTION_POINTERS EXCEPTION_POINTERS, *PEXCEPTION_POINTERS;
|
||||
|
||||
static BOOL alreadyProccessing;
|
||||
|
||||
#endif // NULLSOFT_CRASHER_MAIN_H
|
||||
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
#include <dbghelp.h>
|
||||
/*
|
||||
typedef struct _MINIDUMP_EXCEPTION_INFORMATION
|
||||
{
|
||||
DWORD ThreadId;
|
||||
PEXCEPTION_POINTERS ExceptionPointers;
|
||||
BOOL ClientPointers;
|
||||
} MINIDUMP_EXCEPTION_INFORMATION, *PMINIDUMP_EXCEPTION_INFORMATION;
|
||||
|
||||
typedef enum _MINIDUMP_TYPE
|
||||
{
|
||||
MiniDumpNormal = 0x00000000,
|
||||
MiniDumpWithDataSegs = 0x00000001,
|
||||
MiniDumpWithFullMemory = 0x00000002,
|
||||
MiniDumpWithHandleData = 0x00000004,
|
||||
MiniDumpFilterMemory = 0x00000008,
|
||||
MiniDumpScanMemory = 0x00000010,
|
||||
MiniDumpWithUnloaded = 0x00000020,
|
||||
MiniDumpWithIndirectlyReferencedMemory = 0x00000040,
|
||||
MiniDumpFilterModulePaths = 0x00000080,
|
||||
MiniDumpWithProcessThreadData = 0x00000100,
|
||||
MiniDumpWithPrivateReadWriteMemory = 0x00000200,
|
||||
MiniDumpWithoutOptionalData = 0x00000400,
|
||||
MiniDumpWithFullMemoryInfo = 0x00000800,
|
||||
MiniDumpWithThreadInfo = 0x00001000,
|
||||
MiniDumpWithCodeSegs = 0x00002000
|
||||
} MINIDUMP_TYPE;
|
||||
*/
|
||||
@@ -0,0 +1,96 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by gen_crasher.rc
|
||||
//
|
||||
#define IDS_ERROR_FEEDBACK 1
|
||||
#define IDS_UNKNOWN 2
|
||||
#define IDS_LOADED_OK 3
|
||||
#define IDS_UNABLE_TO_LOAD 4
|
||||
#define IDS_NOT_FOUND 5
|
||||
#define IDS_UNABLE_TO_SAVE_SETTINGS 6
|
||||
#define IDS_SAVE_ERROR 7
|
||||
#define IDS_SELECT_FOLDER_FOR_ERROR_INFO 8
|
||||
#define IDD_CRASHDLG 101
|
||||
#define IDD_CONFIG 102
|
||||
#define IDD_DLG_SMTP 103
|
||||
#define IDC_CHK_CREATEDMP 1003
|
||||
#define IDC_EDT_DMPPATH 1004
|
||||
#define IDC_EDT_DMPNAME 1004
|
||||
#define IDC_BTN_DMPPATH 1005
|
||||
#define IDC_BTN_PATH 1005
|
||||
#define IDC_CMB_DMPTYPE 1006
|
||||
#define IDC_CHK_CREATELOG 1007
|
||||
#define IDC_EDT_LOGPATH 1008
|
||||
#define IDC_EDT_LOGNAME 1008
|
||||
#define IDC_BUTTON2 1009
|
||||
#define IDC_BTN_LOGPATH 1009
|
||||
#define IDC_EDT_PATH 1009
|
||||
#define IDC_RB_USECLIENT 1010
|
||||
#define IDC_CHK_LOGSYSTEM 1011
|
||||
#define IDC_CHK_LOGFILE 1012
|
||||
#define IDC_CHK_LOGREGISTRY 1012
|
||||
#define IDC_CHK_LOGMACHINE 1013
|
||||
#define IDC_CHK_LOGSTACK 1013
|
||||
#define IDC_CHK_RESTART 1014
|
||||
#define IDC_CHK_SILENT 1015
|
||||
#define IDC_CHK_SEND 1016
|
||||
#define IDC_USESMTP 1017
|
||||
#define IDC_RB_USESMTP 1017
|
||||
#define IDC_EDT_SERVER 1018
|
||||
#define IDC_EDT_ZIPNAME 1018
|
||||
#define IDC_EDT_USER 1019
|
||||
#define IDC_EDT_PWD 1020
|
||||
#define IDC_CHK_LOGMODULE 1021
|
||||
#define IDC_EDT_PORT 1021
|
||||
#define IDC_GRP_DUMP 1022
|
||||
#define IDC_GRP_GENERAL 1023
|
||||
#define IDC_GRP_LOG 1024
|
||||
#define IDC_GRP_EMAIL 1025
|
||||
#define IDC_LBL_SERVER 1026
|
||||
#define IDC_GRP_ZIP 1026
|
||||
#define IDC_LBL_USER 1027
|
||||
#define IDC_LBL_PWD 1028
|
||||
#define IDC_LBL_DMPTYPE 1029
|
||||
#define IDC_LBL_PORT 1029
|
||||
#define IDC_LBL_DMPPATH 1030
|
||||
#define IDC_LBL_DMPNAME 1030
|
||||
#define IDC_LBL_LOGPATH 1031
|
||||
#define IDC_LBL_LOGNAME 1031
|
||||
#define IDC_LBL_OSVERSION_CAPTION 1032
|
||||
#define IDC_LBL_DLLPATH_CAPTION 1033
|
||||
#define IDC_LBL_DLLVERSION_CAPTION 1034
|
||||
#define IDC_LBL_OSVERSION 1035
|
||||
#define IDC_LBL_DLLPATH 1036
|
||||
#define IDC_LBL_DLLVERSION 1037
|
||||
#define IDC_CHK_COMPRESS 1040
|
||||
#define IDC_BTN_SMTP 1041
|
||||
#define IDC_LBL_ZIPNAME 1042
|
||||
#define IDC_LBL_PATH 1043
|
||||
#define IDC_LBL_INFO 1045
|
||||
#define IDC_LBL_STEP 1046
|
||||
#define IDC_BMP_LOGO 1047
|
||||
#define IDC_EDIT1 1048
|
||||
#define IDC_EDT_ADDRESS 1048
|
||||
#define IDC_CHK_AUTH 1049
|
||||
#define IDC_GRP_AUTH 1050
|
||||
#define IDC_LBL_ADDRESS 1051
|
||||
#define IDC_GRP_AUTH2 1052
|
||||
#define IDC_TITLELBL 1101
|
||||
#define IDC_WORKLBL 1102
|
||||
#define IDC_PROGRESS1 1103
|
||||
#define IDC_PRG_COLLECT 1103
|
||||
#define IDC_PROGRESS2 1104
|
||||
#define IDC_PROGRESS3 1105
|
||||
#define IDS_NULLSOFT_ERROR_FEEDBACK 65534
|
||||
#define IDS_STRING107 65535
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 108
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1052
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,251 @@
|
||||
#include ".\settings.h"
|
||||
#include <shlwapi.h>
|
||||
#include <strsafe.h>
|
||||
|
||||
Settings::Settings(void)
|
||||
{
|
||||
dumpPath = NULL;
|
||||
logPath = NULL;
|
||||
smtpServer = NULL;
|
||||
smtpUser = NULL;
|
||||
smtpPwd = NULL;
|
||||
path = NULL;
|
||||
smtpAddress = NULL;
|
||||
updatePath = TRUE;
|
||||
createDMP = TRUE;
|
||||
createLOG = TRUE;
|
||||
autoRestart = FALSE;
|
||||
silentMode = TRUE;
|
||||
sendData = TRUE;
|
||||
zipData = TRUE;
|
||||
zipPath = NULL;
|
||||
sendByClient = TRUE;
|
||||
sendBySMTP = FALSE;
|
||||
smtpPort = 25;
|
||||
smtpAuth = TRUE;
|
||||
dumpType = 0;
|
||||
logSystem = TRUE;
|
||||
logRegistry = TRUE;
|
||||
logStack = TRUE;
|
||||
logModule = TRUE;
|
||||
}
|
||||
|
||||
Settings::~Settings(void)
|
||||
{
|
||||
if (dumpPath) free(dumpPath);
|
||||
if (logPath) free(logPath);
|
||||
if (smtpServer) free(smtpServer);
|
||||
if (smtpUser) free(smtpUser);
|
||||
if (smtpPwd) free(smtpPwd);
|
||||
if (path) free(path);
|
||||
if (smtpAddress) free(smtpAddress);
|
||||
}
|
||||
|
||||
void Settings::SetPath(wchar_t *iniPath)
|
||||
{
|
||||
size_t size = lstrlen(iniPath);
|
||||
if (path) free(path);
|
||||
path = NULL;
|
||||
path = (wchar_t*)malloc((size + 1) * sizeof(wchar_t));
|
||||
StringCchCopy(path, size+1, iniPath);
|
||||
wchar_t iniFile[MAX_PATH*2] = {0};
|
||||
size += 14 * sizeof(wchar_t);
|
||||
CreateDirectory(iniPath, NULL);
|
||||
StringCchPrintf(iniFile, size, L"%s\\feedback.ini", iniPath);
|
||||
cfg.SetIniFile(iniFile);
|
||||
}
|
||||
|
||||
const wchar_t* Settings::GetPath(void)
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
||||
BOOL Settings::Load(void)
|
||||
{
|
||||
if (!cfg.IsFileExist()) return FALSE;
|
||||
cfg.SetSection(L"General");
|
||||
updatePath = cfg.ReadInt(L"UpdatePath", TRUE);
|
||||
if (updatePath) return FALSE;
|
||||
createDMP = cfg.ReadInt(L"CreateDmp", TRUE);
|
||||
createLOG = cfg.ReadInt(L"CreateLog", TRUE);
|
||||
autoRestart = cfg.ReadInt(L"AutoRestart", FALSE);
|
||||
silentMode = cfg.ReadInt(L"SilentMode", TRUE);
|
||||
sendData = cfg.ReadInt(L"SendData", TRUE);
|
||||
|
||||
cfg.SetSection(L"Send");
|
||||
sendByClient = cfg.ReadInt(L"UseClient", TRUE);
|
||||
sendBySMTP = cfg.ReadInt(L"UseSMTP", FALSE);
|
||||
smtpPort = cfg.ReadInt(L"Port", 25);
|
||||
smtpAuth = cfg.ReadInt(L"ReqAuth", TRUE);
|
||||
CreateStrCopy(&smtpAddress, cfg.ReadStringW(L"Address", L"bug@winamp.com"));
|
||||
CreateStrCopy(&smtpServer, cfg.ReadStringW(L"Server", NULL));
|
||||
CreateStrCopy(&smtpUser, cfg.ReadStringW(L"User", NULL));
|
||||
CreateStrCopy(&smtpPwd, cfg.ReadStringW(L"Pwd", NULL));
|
||||
|
||||
cfg.SetSection(L"Zip");
|
||||
zipData = cfg.ReadInt(L"ZipData", TRUE);
|
||||
CreateStrCopy(&zipPath, cfg.ReadStringW(L"Path", NULL));
|
||||
|
||||
cfg.SetSection(L"Dump");
|
||||
dumpType = cfg.ReadInt(L"Type", 0);
|
||||
CreateStrCopy(&dumpPath, cfg.ReadStringW(L"Path", NULL));
|
||||
|
||||
cfg.SetSection(L"Log");
|
||||
logSystem = cfg.ReadInt(L"System", TRUE);
|
||||
logRegistry = cfg.ReadInt(L"Registry", TRUE);
|
||||
logStack = cfg.ReadInt(L"Stack", TRUE);
|
||||
logModule = cfg.ReadInt(L"Module", TRUE);
|
||||
CreateStrCopy(&logPath, cfg.ReadStringW(L"Path", NULL));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void Settings::CreateStrCopy(wchar_t **dest, const wchar_t* source)
|
||||
{
|
||||
if (*dest) free(*dest);
|
||||
*dest = NULL;
|
||||
if (source)
|
||||
{
|
||||
size_t len = lstrlen(source) + 1;
|
||||
*dest = (wchar_t*) malloc(len*sizeof(wchar_t));
|
||||
StringCchCopy(*dest, len, source);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL Settings::Save(void)
|
||||
{
|
||||
BOOL error = FALSE;
|
||||
if (FALSE == cfg.SetSection(L"General")) error = TRUE;
|
||||
if (FALSE == cfg.Write(L"UpdatePath", FALSE)) error = TRUE;
|
||||
if (FALSE == cfg.Write(L"CreateDmp", createDMP)) error = TRUE;
|
||||
if (FALSE == cfg.Write(L"CreateLog", createLOG)) error = TRUE;
|
||||
if (FALSE == cfg.Write(L"AutoRestart", autoRestart)) error = TRUE;
|
||||
if (FALSE == cfg.Write(L"SilentMode", silentMode)) error = TRUE;
|
||||
if (FALSE == cfg.Write(L"SendData", sendData)) error = TRUE;
|
||||
if (FALSE == cfg.SetSection(L"Send")) error = TRUE;
|
||||
if (FALSE == cfg.Write(L"UseClient", sendByClient)) error = TRUE;
|
||||
if (FALSE == cfg.Write(L"UseSMTP", sendBySMTP)) error = TRUE;
|
||||
if (FALSE == cfg.Write(L"Port", smtpPort)) error = TRUE;
|
||||
if (FALSE == cfg.Write(L"Server", smtpServer)) error = TRUE;
|
||||
if (FALSE == cfg.Write(L"Address", smtpAddress)) error = TRUE;
|
||||
if (FALSE == cfg.Write(L"ReqAuth", smtpAuth)) error = TRUE;
|
||||
if (FALSE == cfg.Write(L"User", smtpUser)) error = TRUE;
|
||||
if (FALSE == cfg.Write(L"Pwd", smtpPwd)) error = TRUE;
|
||||
if (FALSE == cfg.SetSection(L"Zip")) error = TRUE;
|
||||
if (FALSE == cfg.Write(L"ZipData", zipData)) error = TRUE;
|
||||
if (FALSE == cfg.Write(L"Path", zipPath)) error = TRUE;
|
||||
if (FALSE == cfg.SetSection(L"Dump")) error = TRUE;
|
||||
if (FALSE == cfg.Write(L"Type", dumpType)) error = TRUE;
|
||||
if (FALSE == cfg.Write(L"Path", dumpPath)) error = TRUE;
|
||||
if (FALSE == cfg.SetSection(L"Log")) error = TRUE;
|
||||
if (FALSE == cfg.Write(L"System", logSystem)) error = TRUE;
|
||||
if (FALSE == cfg.Write(L"Registry", logRegistry)) error = TRUE;
|
||||
if (FALSE == cfg.Write(L"Stack", logStack)) error = TRUE;
|
||||
if (FALSE == cfg.Write(L"Module", logModule)) error = TRUE;
|
||||
if (FALSE == cfg.Write(L"Path", logPath)) error = TRUE;
|
||||
return !error;
|
||||
}
|
||||
|
||||
BOOL Settings::CreateDefault(wchar_t* iniPath)
|
||||
{
|
||||
wchar_t temp[MAX_PATH] = {0};
|
||||
int len;
|
||||
|
||||
createDMP = TRUE;
|
||||
createLOG = TRUE;
|
||||
autoRestart = FALSE;
|
||||
silentMode = TRUE;
|
||||
sendData = TRUE;
|
||||
// zip
|
||||
PathCombine(temp, iniPath, L"report.zip");
|
||||
len = (int)wcslen(temp) + 1;
|
||||
zipData = TRUE;
|
||||
zipPath = (wchar_t*) malloc(len*2);
|
||||
StringCchCopy(zipPath, len, temp);
|
||||
// send
|
||||
sendByClient = TRUE;
|
||||
sendBySMTP = FALSE;
|
||||
smtpPort = 25;
|
||||
smtpAddress = (wchar_t*) malloc(32*2);
|
||||
StringCchCopy(smtpAddress, 32, L"bug@winamp.com");
|
||||
smtpAuth = TRUE;
|
||||
smtpServer = NULL;
|
||||
smtpUser = NULL;
|
||||
smtpPwd = NULL;
|
||||
// dump
|
||||
PathCombine(temp, iniPath, L"_crash.dmp");
|
||||
len = (int)wcslen(temp) + 1;
|
||||
dumpType = NULL;
|
||||
dumpPath = (wchar_t*) malloc(len*2);
|
||||
StringCchCopy(dumpPath, len, temp);
|
||||
// log
|
||||
logSystem = TRUE;
|
||||
logRegistry = TRUE;
|
||||
logStack = TRUE;
|
||||
logModule = TRUE;
|
||||
PathCombine(temp, iniPath, L"_crash.log");
|
||||
len = (int)wcslen(temp) + 1;
|
||||
logPath = (wchar_t*) malloc(len*2);
|
||||
StringCchCopy(logPath, len, temp);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL Settings::IsOk(void)
|
||||
{
|
||||
return (logPath != NULL && dumpPath != NULL);
|
||||
}
|
||||
|
||||
void Settings::ClearTempData(void)
|
||||
{
|
||||
cfg.Write(L"Temp", L"TS", L"");
|
||||
cfg.Write(L"Temp", L"LOG", L"0");
|
||||
cfg.Write(L"Temp", L"DMP", L"0");
|
||||
}
|
||||
|
||||
void Settings::WriteErrorTS(const wchar_t *time)
|
||||
{
|
||||
cfg.Write(L"Temp", L"TS", time);
|
||||
}
|
||||
|
||||
void Settings::WriteLogCollectResult(BOOL result)
|
||||
{
|
||||
cfg.Write(L"Temp", L"LOG", result);
|
||||
}
|
||||
|
||||
void Settings::WriteDmpCollectResult(BOOL result)
|
||||
{
|
||||
cfg.Write(L"Temp", L"DMP", result);
|
||||
}
|
||||
|
||||
void Settings::WriteWinamp(const wchar_t *winamp)
|
||||
{
|
||||
cfg.Write(L"Temp", L"WA", winamp);
|
||||
}
|
||||
|
||||
const wchar_t* Settings::ReadErrorTS(void)
|
||||
{
|
||||
return cfg.ReadStringW(L"Temp", L"TS", L"");
|
||||
}
|
||||
|
||||
BOOL Settings::ReadLogCollectResult(void)
|
||||
{
|
||||
return cfg.ReadInt(L"Temp", L"LOG", 0);
|
||||
}
|
||||
BOOL Settings::ReadDmpCollectResult(void)
|
||||
{
|
||||
return cfg.ReadInt(L"Temp", L"DMP", 0);
|
||||
}
|
||||
|
||||
const wchar_t* Settings::ReadWinamp(void)
|
||||
{
|
||||
return cfg.ReadStringW(L"Temp", L"WA", L"");
|
||||
}
|
||||
|
||||
void Settings::WriteBody(const wchar_t *body)
|
||||
{
|
||||
cfg.Write(L"Temp", L"Body", body);
|
||||
}
|
||||
|
||||
const wchar_t* Settings::ReadBody(void)
|
||||
{
|
||||
return cfg.ReadStringW(L"Temp", L"Body", L"");
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
#pragma once
|
||||
|
||||
#include "config.h"
|
||||
|
||||
class Settings
|
||||
{
|
||||
public:
|
||||
Settings(void);
|
||||
~Settings(void);
|
||||
|
||||
public:
|
||||
void SetPath(wchar_t *iniPath);
|
||||
BOOL Load(void);
|
||||
BOOL Save(void);
|
||||
BOOL CreateDefault(wchar_t* iniPath);
|
||||
BOOL IsOk(void);
|
||||
const wchar_t* GetPath(void);
|
||||
|
||||
protected:
|
||||
void CreateStrCopy(wchar_t **dest, const wchar_t* source);
|
||||
private:
|
||||
ConfigW cfg;
|
||||
wchar_t* path;
|
||||
|
||||
public:
|
||||
// general
|
||||
BOOL updatePath;
|
||||
BOOL createDMP;
|
||||
BOOL createLOG;
|
||||
BOOL autoRestart;
|
||||
BOOL silentMode;
|
||||
BOOL sendData;
|
||||
//zip
|
||||
BOOL zipData;
|
||||
wchar_t* zipPath;
|
||||
// send
|
||||
BOOL sendByClient;
|
||||
BOOL sendBySMTP;
|
||||
int smtpPort;
|
||||
wchar_t *smtpServer;
|
||||
wchar_t *smtpAddress;
|
||||
BOOL smtpAuth;
|
||||
wchar_t *smtpUser;
|
||||
wchar_t *smtpPwd;
|
||||
// dump
|
||||
int dumpType;
|
||||
wchar_t *dumpPath;
|
||||
// log
|
||||
BOOL logSystem;
|
||||
BOOL logRegistry;
|
||||
BOOL logStack;
|
||||
BOOL logModule;
|
||||
wchar_t *logPath;
|
||||
// tmp
|
||||
void ClearTempData(void);
|
||||
void WriteErrorTS(const wchar_t *time);
|
||||
void WriteLogCollectResult(BOOL result);
|
||||
void WriteDmpCollectResult(BOOL result);
|
||||
void WriteWinamp(const wchar_t *winamp);
|
||||
void WriteBody(const wchar_t *body);
|
||||
|
||||
const wchar_t* ReadErrorTS(void);
|
||||
BOOL ReadLogCollectResult(void);
|
||||
BOOL ReadDmpCollectResult(void);
|
||||
const wchar_t* ReadWinamp(void);
|
||||
const wchar_t* ReadBody(void);
|
||||
};
|
||||
@@ -0,0 +1,127 @@
|
||||
#include ".\smtpdlg.h"
|
||||
#include ".\resource.h"
|
||||
#include ".\settings.h"
|
||||
|
||||
#include <strsafe.h>
|
||||
|
||||
extern Settings settings;
|
||||
|
||||
void UpdateAuth(HWND hwndDlg, BOOL enabled)
|
||||
{
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_LBL_USER), enabled);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_EDT_USER), enabled);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_LBL_PWD), enabled);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_EDT_PWD), enabled);
|
||||
}
|
||||
|
||||
BOOL CALLBACK smtpDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
wchar_t num[16] = {0};
|
||||
CenterDialog(hwndDlg);
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_EDT_SERVER), settings.smtpServer);
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_EDT_USER), settings.smtpUser);
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_EDT_PWD), settings.smtpPwd);
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_EDT_PORT), _itow(settings.smtpPort, num, 10));
|
||||
SetWindowText(GetDlgItem(hwndDlg, IDC_EDT_ADDRESS), settings.smtpAddress);
|
||||
CheckDlgButton(hwndDlg, IDC_CHK_AUTH, settings.smtpAuth);
|
||||
UpdateAuth(hwndDlg, settings.smtpAuth);
|
||||
break;
|
||||
}
|
||||
case WM_DESTROY:
|
||||
{
|
||||
wchar_t buf[1024] = {0};
|
||||
int len;
|
||||
if (settings.smtpServer) free(settings.smtpServer);
|
||||
settings.smtpServer = NULL;
|
||||
len = GetWindowText(GetDlgItem(hwndDlg, IDC_EDT_SERVER), buf, 1024);
|
||||
if (len)
|
||||
{
|
||||
settings.smtpServer = (wchar_t*)malloc((len + 1)*2);
|
||||
StringCchCopy(settings.smtpServer, len+1, buf);
|
||||
}
|
||||
|
||||
len = GetWindowText(GetDlgItem(hwndDlg, IDC_EDT_PORT), buf, 1024);
|
||||
if (len) settings.smtpPort = _wtoi(buf);
|
||||
|
||||
if (settings.smtpUser) free(settings.smtpUser);
|
||||
settings.smtpUser = NULL;
|
||||
len = GetWindowText(GetDlgItem(hwndDlg, IDC_EDT_USER), buf, 1024);
|
||||
if (len)
|
||||
{
|
||||
settings.smtpUser = (wchar_t*)malloc((len + 1)*2);
|
||||
StringCchCopy(settings.smtpUser, len+1, buf);
|
||||
}
|
||||
|
||||
if (settings.smtpPwd) free(settings.smtpPwd);
|
||||
settings.smtpPwd = NULL;
|
||||
len = GetWindowText(GetDlgItem(hwndDlg, IDC_EDT_PWD), buf, 1024);
|
||||
if (len)
|
||||
{
|
||||
settings.smtpPwd = (wchar_t*)malloc((len + 1)*2);
|
||||
StringCchCopy(settings.smtpPwd, len+1, buf);
|
||||
}
|
||||
|
||||
if (settings.smtpAddress) free(settings.smtpAddress);
|
||||
settings.smtpAddress = NULL;
|
||||
len = GetWindowText(GetDlgItem(hwndDlg, IDC_EDT_ADDRESS), buf, 1024);
|
||||
if (len)
|
||||
{
|
||||
settings.smtpAddress = (wchar_t*)malloc((len + 1)*2);
|
||||
StringCchCopy(settings.smtpAddress, len+1, buf);
|
||||
}
|
||||
settings.smtpAuth = (SendMessage(GetDlgItem(hwndDlg, IDC_CHK_AUTH), BM_GETCHECK, 0,0) == BST_CHECKED);
|
||||
settings.Save();
|
||||
break;
|
||||
}
|
||||
case WM_COMMAND:
|
||||
switch(LOWORD(wParam))
|
||||
{
|
||||
case IDC_CHK_AUTH:
|
||||
UpdateAuth(hwndDlg, (SendMessage((HWND) lParam, BM_GETCHECK, 0,0) == BST_CHECKED));
|
||||
break;
|
||||
case IDCANCEL:
|
||||
EndDialog(hwndDlg, 0);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void CenterDialog(HWND hwndDlg)
|
||||
{
|
||||
HWND hwndOwner;
|
||||
RECT rc, rcDlg, rcOwner;
|
||||
if ((hwndOwner = GetParent(hwndDlg)) == NULL)
|
||||
{
|
||||
hwndOwner = GetDesktopWindow();
|
||||
}
|
||||
|
||||
GetWindowRect(hwndOwner, &rcOwner);
|
||||
GetWindowRect(hwndDlg, &rcDlg);
|
||||
CopyRect(&rc, &rcOwner);
|
||||
|
||||
// Offset the owner and dialog box rectangles so that
|
||||
// right and bottom values represent the width and
|
||||
// height, and then offset the owner again to discard
|
||||
// space taken up by the dialog box.
|
||||
|
||||
OffsetRect(&rcDlg, -rcDlg.left, -rcDlg.top);
|
||||
OffsetRect(&rc, -rc.left, -rc.top);
|
||||
OffsetRect(&rc, -rcDlg.right, -rcDlg.bottom);
|
||||
|
||||
// The new position is the sum of half the remaining
|
||||
// space and the owner's original position.
|
||||
|
||||
SetWindowPos(hwndDlg,
|
||||
HWND_TOP,
|
||||
rcOwner.left + (rc.right / 2),
|
||||
rcOwner.top + (rc.bottom / 2),
|
||||
0, 0, // ignores size arguments
|
||||
SWP_NOSIZE);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
#include <windows.h>
|
||||
|
||||
void CenterDialog(HWND hwndDlg);
|
||||
BOOL CALLBACK smtpDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
@@ -0,0 +1,39 @@
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
#include "..\..\..\Winamp/buildType.h"
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,16,0,0
|
||||
PRODUCTVERSION WINAMP_PRODUCTVER
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Winamp SA"
|
||||
VALUE "FileDescription", "Winamp General Purpose Plug-in"
|
||||
VALUE "FileVersion", "1,16,0,0"
|
||||
VALUE "InternalName", "Nullsoft Winamp Error Feedback Plug-in"
|
||||
VALUE "LegalCopyright", "Copyright © 2005-2023 Winamp SA"
|
||||
VALUE "LegalTrademarks", "Nullsoft and Winamp are trademarks of Winamp SA"
|
||||
VALUE "OriginalFilename", "gen_crasher.dll"
|
||||
VALUE "ProductName", "Winamp"
|
||||
VALUE "ProductVersion", STR_WINAMP_PRODUCTVER
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
@@ -0,0 +1,561 @@
|
||||
#include "precomp__gen_ff.h"
|
||||
|
||||
#include <api/core/api_core.h>
|
||||
#include "main.h"
|
||||
#include "AlbumArt.h"
|
||||
#include "wa2frontend.h"
|
||||
#include <api.h>
|
||||
#include <tataki/bitmap/bitmap.h>
|
||||
#include <api\wnd\notifmsg.h>
|
||||
#include <api/script/scriptmgr.h>
|
||||
#include <api/script/script.h>
|
||||
|
||||
#define ALBUMART_MAX_THREADS 4
|
||||
|
||||
const wchar_t albumArtXuiObjectStr[] = L"AlbumArt"; // This is the xml tag
|
||||
char albumArtXuiSvcName[] = "Album Art XUI object"; // this is the name of the xuiservice
|
||||
|
||||
AlbumArtScriptController _albumartController;
|
||||
AlbumArtScriptController *albumartController = &_albumartController;
|
||||
|
||||
BEGIN_SERVICES( wa2AlbumArt_Svcs );
|
||||
DECLARE_SERVICE( XuiObjectCreator<AlbumArtXuiSvc> );
|
||||
END_SERVICES( wa2AlbumArt_Svcs, _wa2AlbumArt_Svcs );
|
||||
|
||||
// --------------------------------------------------------
|
||||
// Maki Script Object
|
||||
// --------------------------------------------------------
|
||||
|
||||
// -- Functions table -------------------------------------
|
||||
function_descriptor_struct AlbumArtScriptController::exportedFunction[] = {
|
||||
{L"refresh", 0, (void *)AlbumArt::script_vcpu_refresh },
|
||||
{L"onAlbumArtLoaded", 1, (void *)AlbumArt::script_vcpu_onAlbumArtLoaded },
|
||||
{L"isLoading", 0, (void *)AlbumArt::script_vcpu_isLoading },
|
||||
};
|
||||
|
||||
const wchar_t *AlbumArtScriptController::getClassName()
|
||||
{
|
||||
return L"AlbumArtLayer";
|
||||
}
|
||||
|
||||
const wchar_t *AlbumArtScriptController::getAncestorClassName()
|
||||
{
|
||||
return L"Layer";
|
||||
}
|
||||
|
||||
ScriptObject *AlbumArtScriptController::instantiate()
|
||||
{
|
||||
AlbumArt *a = new AlbumArt;
|
||||
|
||||
ASSERT( a != NULL );
|
||||
|
||||
return a->getScriptObject();
|
||||
}
|
||||
|
||||
void AlbumArtScriptController::destroy( ScriptObject *o )
|
||||
{
|
||||
AlbumArt *a = static_cast<AlbumArt *>( o->vcpu_getInterface( albumArtGuid ) );
|
||||
|
||||
ASSERT( a != NULL );
|
||||
|
||||
delete a;
|
||||
}
|
||||
|
||||
void *AlbumArtScriptController::encapsulate( ScriptObject *o )
|
||||
{
|
||||
return NULL; // no encapsulation yet
|
||||
}
|
||||
|
||||
void AlbumArtScriptController::deencapsulate( void *o )
|
||||
{}
|
||||
|
||||
int AlbumArtScriptController::getNumFunctions()
|
||||
{
|
||||
return sizeof( exportedFunction ) / sizeof( function_descriptor_struct );
|
||||
}
|
||||
|
||||
const function_descriptor_struct *AlbumArtScriptController::getExportedFunctions()
|
||||
{
|
||||
return exportedFunction;
|
||||
}
|
||||
|
||||
GUID AlbumArtScriptController::getClassGuid()
|
||||
{
|
||||
return albumArtGuid;
|
||||
}
|
||||
|
||||
|
||||
XMLParamPair AlbumArt::params[] =
|
||||
{
|
||||
{ALBUMART_NOTFOUNDIMAGE, L"NOTFOUNDIMAGE"},
|
||||
{ALBUMART_SOURCE, L"SOURCE"},
|
||||
{ALBUMART_VALIGN, L"VALIGN"},
|
||||
{ALBUMART_ALIGN, L"ALIGN"},
|
||||
{ALBUMART_STRETCHED, L"STRETCHED"},
|
||||
{ALBUMART_NOREFRESH, L"NOAUTOREFRESH"},
|
||||
};
|
||||
|
||||
class AlbumArtThreadContext
|
||||
{
|
||||
public:
|
||||
AlbumArtThreadContext( const wchar_t *_filename, AlbumArt *_wnd )
|
||||
{
|
||||
/* lazy load these two handles */
|
||||
if ( !_wnd->hMainThread )
|
||||
_wnd->hMainThread = WASABI_API_APP->main_getMainThreadHandle();
|
||||
|
||||
if ( !_wnd->thread_semaphore )
|
||||
_wnd->thread_semaphore = CreateSemaphore( 0, ALBUMART_MAX_THREADS, ALBUMART_MAX_THREADS, 0 );
|
||||
|
||||
wnd = _wnd;
|
||||
iterator = wnd->iterator;
|
||||
h = w = 0;
|
||||
bits = 0;
|
||||
filename = _wcsdup( _filename );
|
||||
}
|
||||
|
||||
void FreeBits()
|
||||
{
|
||||
if ( bits )
|
||||
WASABI_API_MEMMGR->sysFree( bits );
|
||||
|
||||
bits = 0;
|
||||
}
|
||||
|
||||
~AlbumArtThreadContext()
|
||||
{
|
||||
if ( wnd )
|
||||
{
|
||||
if ( wnd->thread_semaphore )
|
||||
ReleaseSemaphore( wnd->thread_semaphore, 1, 0 );
|
||||
|
||||
wnd->isLoading--;
|
||||
}
|
||||
|
||||
free( filename );
|
||||
}
|
||||
|
||||
static void CALLBACK AlbumArtNotifyAPC( ULONG_PTR p );
|
||||
bool LoadArt();
|
||||
|
||||
int h;
|
||||
int w;
|
||||
ARGB32 *bits;
|
||||
LONG iterator;
|
||||
wchar_t *filename;
|
||||
AlbumArt *wnd;
|
||||
};
|
||||
|
||||
|
||||
AlbumArt::AlbumArt()
|
||||
{
|
||||
getScriptObject()->vcpu_setInterface( albumArtGuid, ( void * )static_cast<AlbumArt *>( this ) );
|
||||
getScriptObject()->vcpu_setClassName( L"AlbumArtLayer" );
|
||||
getScriptObject()->vcpu_setController( albumartController );
|
||||
|
||||
WASABI_API_MEDIACORE->core_addCallback( 0, this );
|
||||
|
||||
w = 0;
|
||||
h = 0;
|
||||
iterator = 0;
|
||||
bits = 0;
|
||||
hMainThread = 0;
|
||||
thread_semaphore = 0;
|
||||
artBitmap = 0;
|
||||
valign = 0;
|
||||
align = 0;
|
||||
stretched = false;
|
||||
missing_art_image = L"winamp.cover.notfound"; // default to this.
|
||||
src_file = L"";
|
||||
forceRefresh = false;
|
||||
noAutoRefresh = false;
|
||||
noMakiCallback = false;
|
||||
isLoading = 0;
|
||||
|
||||
/* register XML parameters */
|
||||
xuihandle = newXuiHandle();
|
||||
|
||||
CreateXMLParameters( xuihandle );
|
||||
}
|
||||
|
||||
void AlbumArt::CreateXMLParameters( int master_handle )
|
||||
{
|
||||
//ALBUMART_PARENT::CreateXMLParameters(master_handle);
|
||||
int numParams = sizeof( params ) / sizeof( params[ 0 ] );
|
||||
hintNumberOfParams( xuihandle, numParams );
|
||||
|
||||
for ( int i = 0; i < numParams; i++ )
|
||||
addParam( xuihandle, params[ i ], XUI_ATTRIBUTE_IMPLIED );
|
||||
}
|
||||
|
||||
|
||||
AlbumArt::~AlbumArt()
|
||||
{
|
||||
WASABI_API_SYSCB->syscb_deregisterCallback( static_cast<MetadataCallbackI *>( this ) );
|
||||
WASABI_API_MEDIACORE->core_delCallback( 0, this );
|
||||
|
||||
// wait for all of our threads to finish
|
||||
InterlockedIncrement( &iterator ); // our kill switch (will invalidate iterator on all outstanding threads)
|
||||
if ( thread_semaphore )
|
||||
{
|
||||
for ( int i = 0; i < ALBUMART_MAX_THREADS; i++ )
|
||||
{
|
||||
if ( WaitForMultipleObjectsEx( 1, &thread_semaphore, FALSE, INFINITE, TRUE ) != WAIT_OBJECT_0 )
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
delete artBitmap;
|
||||
|
||||
if ( bits )
|
||||
WASABI_API_MEMMGR->sysFree( bits );
|
||||
|
||||
if ( thread_semaphore )
|
||||
CloseHandle( thread_semaphore );
|
||||
|
||||
if ( hMainThread )
|
||||
CloseHandle( hMainThread );
|
||||
}
|
||||
|
||||
bool AlbumArt::layer_isInvalid()
|
||||
{
|
||||
return !bits;
|
||||
}
|
||||
|
||||
void CALLBACK AlbumArtThreadContext::AlbumArtNotifyAPC( ULONG_PTR p )
|
||||
{
|
||||
AlbumArtThreadContext *context = (AlbumArtThreadContext *)p;
|
||||
if ( context->wnd->iterator == context->iterator )
|
||||
context->wnd->ArtLoaded( context->w, context->h, context->bits );
|
||||
else
|
||||
context->FreeBits();
|
||||
|
||||
delete context;
|
||||
}
|
||||
|
||||
bool AlbumArtThreadContext::LoadArt()
|
||||
{
|
||||
if ( wnd->iterator != iterator )
|
||||
return false;
|
||||
|
||||
if ( AGAVE_API_ALBUMART->GetAlbumArt( filename, L"cover", &w, &h, &bits ) != ALBUMART_SUCCESS )
|
||||
{
|
||||
bits = 0;
|
||||
w = 0;
|
||||
h = 0;
|
||||
}
|
||||
|
||||
if ( wnd->iterator == iterator ) // make sure we're still valid
|
||||
{
|
||||
QueueUserAPC( AlbumArtNotifyAPC, wnd->hMainThread, (ULONG_PTR)this );
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
FreeBits();
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static int AlbumArtThreadPoolFunc( HANDLE handle, void *user_data, intptr_t id )
|
||||
{
|
||||
AlbumArtThreadContext *context = (AlbumArtThreadContext *)user_data;
|
||||
if ( context->LoadArt() == false )
|
||||
{
|
||||
delete context;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void AlbumArt::ArtLoaded( int _w, int _h, ARGB32 *_bits )
|
||||
{
|
||||
if ( bits )
|
||||
WASABI_API_MEMMGR->sysFree( bits );
|
||||
|
||||
if ( artBitmap )
|
||||
{
|
||||
delete artBitmap;
|
||||
artBitmap = 0;
|
||||
}
|
||||
|
||||
bits = _bits;
|
||||
w = _w;
|
||||
h = _h;
|
||||
|
||||
if ( !bits )
|
||||
{
|
||||
SkinBitmap *albumart = missing_art_image.getBitmap();
|
||||
if ( albumart )
|
||||
{
|
||||
w = albumart->getWidth();
|
||||
h = albumart->getHeight();
|
||||
}
|
||||
}
|
||||
|
||||
deleteRegion();
|
||||
makeRegion();
|
||||
notifyParent( ChildNotify::AUTOWHCHANGED );
|
||||
invalidate();
|
||||
|
||||
// notify maki scripts that albumart has been found or not
|
||||
if ( !noMakiCallback && _bits )
|
||||
{
|
||||
AlbumArt::script_vcpu_onAlbumArtLoaded( SCRIPT_CALL, this->getScriptObject(), MAKE_SCRIPT_BOOLEAN( (int)bits ) );
|
||||
}
|
||||
}
|
||||
|
||||
void AlbumArt::onSetVisible( int show )
|
||||
{
|
||||
if ( show )
|
||||
{
|
||||
corecb_onUrlChange( wa2.GetCurrentFile() );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( bits )
|
||||
{
|
||||
WASABI_API_MEMMGR->sysFree( bits );
|
||||
|
||||
delete artBitmap;
|
||||
artBitmap = 0;
|
||||
}
|
||||
|
||||
bits = 0;
|
||||
}
|
||||
}
|
||||
|
||||
int AlbumArt::corecb_onUrlChange( const wchar_t *filename )
|
||||
{
|
||||
// Martin> if we call this from maki we want to do a refresh regardless of the albumartlayer being visible or not
|
||||
if ( forceRefresh || ( !noAutoRefresh && isVisible() ) )
|
||||
{
|
||||
isLoading++;
|
||||
|
||||
// Martin > do a check for a specific file, defined via source param
|
||||
if ( WCSICMP( src_file, L"" ) )
|
||||
filename = src_file;
|
||||
|
||||
InterlockedIncrement( &iterator );
|
||||
AlbumArtThreadContext *context = new AlbumArtThreadContext( filename, this );
|
||||
|
||||
// make sure we have an available thread free (wait for one if we don't)
|
||||
while ( WaitForMultipleObjectsEx( 1, &thread_semaphore, FALSE, INFINITE, TRUE ) != WAIT_OBJECT_0 )
|
||||
{}
|
||||
|
||||
// int vis__ = isVisible();
|
||||
WASABI_API_THREADPOOL->RunFunction( 0, AlbumArtThreadPoolFunc, context, 0, api_threadpool::FLAG_LONG_EXECUTION );
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int AlbumArt::onInit()
|
||||
{
|
||||
int r = ALBUMART_PARENT::onInit();
|
||||
WASABI_API_SYSCB->syscb_registerCallback( static_cast<MetadataCallbackI *>( this ) );
|
||||
|
||||
AlbumArt::corecb_onUrlChange( wa2.GetCurrentFile() );
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
int AlbumArt::skincb_onColorThemeChanged( const wchar_t *newcolortheme )
|
||||
{
|
||||
ALBUMART_PARENT::skincb_onColorThemeChanged( newcolortheme );
|
||||
invalidate();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
SkinBitmap *AlbumArt::getBitmap()
|
||||
{
|
||||
if ( artBitmap )
|
||||
return artBitmap;
|
||||
|
||||
if ( bits )
|
||||
{
|
||||
artBitmap = new HQSkinBitmap( bits, w, h ); //TH WDP2-212
|
||||
|
||||
return artBitmap;
|
||||
}
|
||||
|
||||
return missing_art_image.getBitmap();
|
||||
}
|
||||
|
||||
void AlbumArt::layer_adjustDest( RECT *r )
|
||||
{
|
||||
if ( !w || !h )
|
||||
return;
|
||||
|
||||
if ( stretched )
|
||||
return;
|
||||
|
||||
//getClientRect(r);
|
||||
// maintain 'square' stretching
|
||||
int dstW = r->right - r->left;
|
||||
int dstH = r->bottom - r->top;
|
||||
double aspX = (double)( dstW ) / (double)w;
|
||||
double aspY = (double)( dstH ) / (double)h;
|
||||
double asp = min( aspX, aspY );
|
||||
int newW = (int)( w * asp );
|
||||
int newH = (int)( h * asp );
|
||||
|
||||
// Align
|
||||
int offsetX = ( dstW - newW ) / 2;
|
||||
if ( align == 1 )
|
||||
offsetX *= 2;
|
||||
else if ( align == -1 )
|
||||
offsetX = 0;
|
||||
|
||||
// Valign
|
||||
int offsetY = ( dstH - newH ) / 2;
|
||||
if ( valign == 1 )
|
||||
offsetY *= 2;
|
||||
else if ( valign == -1 )
|
||||
offsetY = 0;
|
||||
|
||||
r->left += offsetX;
|
||||
r->right = r->left + newW;
|
||||
r->top += offsetY;
|
||||
r->bottom = r->top + newH;
|
||||
|
||||
// This prevents parts of the image being cut off (if the img has the same dimensions as the rect) on moving/clicking winamp
|
||||
// (they will just flicker, but at least they won't stay now)
|
||||
// benski> CUT!!! no no no no no this is very bad because this gets called inside layer::onPaint
|
||||
//invalidate();
|
||||
}
|
||||
/*
|
||||
int AlbumArt::getWidth()
|
||||
{
|
||||
RECT r;
|
||||
getClientRect(&r);
|
||||
getDest(&r);
|
||||
return r.right-r.left;
|
||||
}
|
||||
|
||||
int AlbumArt::getHeight()
|
||||
{
|
||||
RECT r;
|
||||
getClientRect(&r);
|
||||
getDest(&r);
|
||||
return r.bottom-r.top;
|
||||
}
|
||||
*/
|
||||
/*
|
||||
int AlbumArt::onPaint(Canvas *canvas)
|
||||
{
|
||||
ALBUMART_PARENT::onPaint(canvas);
|
||||
if (bits)
|
||||
{
|
||||
SkinBitmap albumart(bits, w, h);
|
||||
RECT dst;
|
||||
getBufferPaintDest(&dst);
|
||||
albumart.stretchToRectAlpha(canvas, &dst, getPaintingAlpha());
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
*/
|
||||
int AlbumArt::setXuiParam( int _xuihandle, int attrid, const wchar_t *name, const wchar_t *strval )
|
||||
{
|
||||
if ( xuihandle != _xuihandle )
|
||||
return ALBUMART_PARENT::setXuiParam( _xuihandle, attrid, name, strval );
|
||||
|
||||
switch ( attrid )
|
||||
{
|
||||
case ALBUMART_NOTFOUNDIMAGE:
|
||||
missing_art_image = strval;
|
||||
if ( !bits )
|
||||
{
|
||||
noMakiCallback = true;
|
||||
ArtLoaded( 0, 0, 0 );
|
||||
noMakiCallback = false;
|
||||
}
|
||||
break;
|
||||
case ALBUMART_SOURCE:
|
||||
src_file = strval;
|
||||
AlbumArt::corecb_onUrlChange( wa2.GetCurrentFile() ); // This Param should _always_ hold our current file
|
||||
break;
|
||||
case ALBUMART_VALIGN:
|
||||
if ( !WCSICMP( strval, L"top" ) )
|
||||
valign = -1;
|
||||
else if ( !WCSICMP( strval, L"bottom" ) )
|
||||
valign = 1;
|
||||
else
|
||||
valign = 0;
|
||||
|
||||
deferedInvalidate();
|
||||
break;
|
||||
case ALBUMART_ALIGN:
|
||||
if ( !WCSICMP( strval, L"left" ) )
|
||||
align = -1;
|
||||
else if ( !WCSICMP( strval, L"right" ) )
|
||||
align = 1;
|
||||
else
|
||||
align = 0;
|
||||
|
||||
deferedInvalidate();
|
||||
break;
|
||||
case ALBUMART_STRETCHED:
|
||||
if ( !WCSICMP( strval, L"0" ) || !WCSICMP( strval, L"" ) )
|
||||
stretched = false;
|
||||
else
|
||||
stretched = true;
|
||||
|
||||
deferedInvalidate();
|
||||
break;
|
||||
case ALBUMART_NOREFRESH:
|
||||
if ( !WCSICMP( strval, L"0" ) || !WCSICMP( strval, L"" ) )
|
||||
noAutoRefresh = false;
|
||||
else
|
||||
noAutoRefresh = true;
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
void AlbumArt::metacb_ArtUpdated( const wchar_t *filename )
|
||||
{
|
||||
// it'd be nice to do this, but we can't guarantee that our file didn't get updated in the process
|
||||
//const wchar_t *curFn = wa2.GetCurrentFile();
|
||||
// if (curFn && filename && *filename && *curFn && !_wcsicmp(filename, curFn))
|
||||
AlbumArt::corecb_onUrlChange( wa2.GetCurrentFile() );
|
||||
}
|
||||
|
||||
|
||||
scriptVar AlbumArt::script_vcpu_refresh( SCRIPT_FUNCTION_PARAMS, ScriptObject *o )
|
||||
{
|
||||
SCRIPT_FUNCTION_INIT;
|
||||
AlbumArt *a = static_cast<AlbumArt *>( o->vcpu_getInterface( albumArtGuid ) );
|
||||
if ( a )
|
||||
{
|
||||
a->forceRefresh = true;
|
||||
a->corecb_onUrlChange( wa2.GetCurrentFile() );
|
||||
a->forceRefresh = false;
|
||||
}
|
||||
RETURN_SCRIPT_VOID;
|
||||
}
|
||||
|
||||
scriptVar AlbumArt::script_vcpu_isLoading( SCRIPT_FUNCTION_PARAMS, ScriptObject *o )
|
||||
{
|
||||
SCRIPT_FUNCTION_INIT;
|
||||
AlbumArt *a = static_cast<AlbumArt *>( o->vcpu_getInterface( albumArtGuid ) );
|
||||
if ( a )
|
||||
{
|
||||
return MAKE_SCRIPT_BOOLEAN( !!a->isLoading );
|
||||
}
|
||||
|
||||
return MAKE_SCRIPT_BOOLEAN( false );
|
||||
}
|
||||
|
||||
scriptVar AlbumArt::script_vcpu_onAlbumArtLoaded( SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar success )
|
||||
{
|
||||
SCRIPT_FUNCTION_INIT
|
||||
PROCESS_HOOKS1( o, albumartController, success );
|
||||
SCRIPT_FUNCTION_CHECKABORTEVENT;
|
||||
SCRIPT_EXEC_EVENT1( o, success );
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
#ifndef NULLSOFT_GEN_FF_ALBUMART_H
|
||||
#define NULLSOFT_GEN_FF_ALBUMART_H
|
||||
#include <api/wnd/wndclass/bufferpaintwnd.h>
|
||||
#include <api/skin/widgets/layer.h>
|
||||
#include <api/syscb/callbacks/metacb.h>
|
||||
//#include <api/syscb/callbacks/corecbi.h>
|
||||
|
||||
//#define ALBUMART_PARENT GuiObjectWnd
|
||||
//#define ALBUMART_PARENT BufferPaintWnd
|
||||
#define ALBUMART_PARENT Layer
|
||||
|
||||
// {6DCB05E4-8AC4-48c2-B193-49F0910EF54A}
|
||||
static const GUID albumArtGuid =
|
||||
{ 0x6dcb05e4, 0x8ac4, 0x48c2, { 0xb1, 0x93, 0x49, 0xf0, 0x91, 0xe, 0xf5, 0x4a } };
|
||||
|
||||
|
||||
class AlbumArtScriptController : public LayerScriptController
|
||||
{
|
||||
public:
|
||||
|
||||
virtual const wchar_t *getClassName();
|
||||
virtual const wchar_t *getAncestorClassName();
|
||||
virtual ScriptObjectController *getAncestorController() { return layerController; }
|
||||
virtual int getNumFunctions();
|
||||
virtual const function_descriptor_struct *getExportedFunctions();
|
||||
virtual GUID getClassGuid();
|
||||
virtual ScriptObject *instantiate();
|
||||
virtual void destroy(ScriptObject *o);
|
||||
virtual void *encapsulate(ScriptObject *o);
|
||||
virtual void deencapsulate(void *o);
|
||||
|
||||
private:
|
||||
|
||||
static function_descriptor_struct exportedFunction[];
|
||||
|
||||
};
|
||||
|
||||
extern AlbumArtScriptController *albumartController;
|
||||
|
||||
class AlbumArtThreadContext;
|
||||
|
||||
class AlbumArt : public ALBUMART_PARENT,
|
||||
public CoreCallbackI, /* to get song change updates */
|
||||
public MetadataCallbackI /* to find out when album art changes */
|
||||
// public SkinCallbackI /* to get color theme changes */
|
||||
{
|
||||
public:
|
||||
AlbumArt();
|
||||
~AlbumArt();
|
||||
|
||||
protected:
|
||||
void metacb_ArtUpdated(const wchar_t *filename);
|
||||
virtual int corecb_onUrlChange(const wchar_t *filename);
|
||||
virtual int onInit();
|
||||
//virtual int onBufferPaint(BltCanvas *canvas, int w, int h);
|
||||
int setXuiParam(int _xuihandle, int attrid, const wchar_t *name, const wchar_t *strval);
|
||||
int skincb_onColorThemeChanged(const wchar_t *newcolortheme);
|
||||
|
||||
bool LoadArt(AlbumArtThreadContext *context, HANDLE thread_to_notify);
|
||||
/* Layer */
|
||||
SkinBitmap *getBitmap();
|
||||
bool layer_isInvalid();
|
||||
void onSetVisible(int show);
|
||||
/*
|
||||
virtual int getWidth();
|
||||
virtual int getHeight();
|
||||
*/
|
||||
/*static */void CreateXMLParameters(int master_handle);
|
||||
private:
|
||||
void layer_adjustDest(RECT *r);
|
||||
|
||||
int w,h;
|
||||
int valign; // 0 = center, 1 = bottom, -1 = top
|
||||
int align; // 0 = center, 1 = right, -1 = left
|
||||
bool stretched;
|
||||
bool forceRefresh;
|
||||
bool noAutoRefresh;
|
||||
bool noMakiCallback;
|
||||
volatile int isLoading;
|
||||
|
||||
void ArtLoaded(int _w, int _h, ARGB32 *_bits);
|
||||
StringW src_file;
|
||||
ARGB32 *bits;
|
||||
SkinBitmap *artBitmap;
|
||||
AutoSkinBitmap missing_art_image;
|
||||
volatile LONG iterator;
|
||||
HANDLE thread_semaphore, hMainThread;
|
||||
|
||||
friend class AlbumArtThreadContext;
|
||||
private:
|
||||
/* XML Parameters */
|
||||
enum
|
||||
{
|
||||
ALBUMART_NOTFOUNDIMAGE,
|
||||
ALBUMART_SOURCE,
|
||||
ALBUMART_VALIGN,
|
||||
ALBUMART_ALIGN,
|
||||
ALBUMART_STRETCHED,
|
||||
ALBUMART_NOREFRESH
|
||||
};
|
||||
static XMLParamPair params[];
|
||||
int xuihandle;
|
||||
|
||||
public:
|
||||
static scriptVar script_vcpu_refresh(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
|
||||
static scriptVar script_vcpu_onAlbumArtLoaded(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar success);
|
||||
static scriptVar script_vcpu_isLoading(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
|
||||
};
|
||||
|
||||
extern const wchar_t albumArtXuiObjectStr[];
|
||||
extern char albumArtXuiSvcName[];
|
||||
class AlbumArtXuiSvc : public XuiObjectSvc<AlbumArt, albumArtXuiObjectStr, albumArtXuiSvcName> {};
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,307 @@
|
||||
#include "precomp__gen_ff.h"
|
||||
#include "main.h"
|
||||
#include "../Agave/Language/api_language.h"
|
||||
#include "../../..\Components\wac_network\wac_network_http_receiver_api.h"
|
||||
#include "../nu/AutoWide.h"
|
||||
#include "../nu/AutoChar.h"
|
||||
#include "../nu/AutoCharFn.h"
|
||||
#include "wa2frontend.h"
|
||||
#include "resource.h"
|
||||
#include "../nu/ns_wc.h"
|
||||
#include "../nu/refcount.h"
|
||||
#include "api/skin/widgets/xuidownloadslist.h"
|
||||
|
||||
#include <shlobj.h>
|
||||
#include <shlwapi.h>
|
||||
#include <api/script/objects/systemobj.h>
|
||||
|
||||
extern wchar_t *INI_DIR;
|
||||
|
||||
static void createDirForFileW(wchar_t *str)
|
||||
{
|
||||
wchar_t *p = str;
|
||||
if ((p[0] ==L'\\' || p[0] ==L'/') && (p[1] ==L'\\' || p[1] ==L'/'))
|
||||
{
|
||||
p += 2;
|
||||
while (p && *p && *p !=L'\\' && *p !=L'/') p++;
|
||||
if (!p || !*p) return ;
|
||||
p++;
|
||||
while (p && *p && *p !=L'\\' && *p !=L'/') p++;
|
||||
}
|
||||
else
|
||||
{
|
||||
while (p && *p && *p !=L'\\' && *p !=L'/') p++;
|
||||
}
|
||||
|
||||
while (p && *p)
|
||||
{
|
||||
while (p && *p !=L'\\' && *p !=L'/' && *p) p = CharNextW(p);
|
||||
if (p && *p)
|
||||
{
|
||||
wchar_t lp = *p;
|
||||
*p = 0;
|
||||
CreateDirectoryW(str, NULL);
|
||||
*p++ = lp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static wchar_t* defaultPathToStore()
|
||||
{
|
||||
static wchar_t pathToStore[MAX_PATH] = {0};
|
||||
if(FAILED(SHGetFolderPathW(NULL, CSIDL_MYMUSIC, NULL, SHGFP_TYPE_CURRENT, pathToStore)))
|
||||
{
|
||||
if(FAILED(SHGetFolderPathW(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, pathToStore)))
|
||||
{
|
||||
lstrcpynW(pathToStore, L"C:\\My Music", MAX_PATH);
|
||||
}
|
||||
}
|
||||
return pathToStore;
|
||||
}
|
||||
|
||||
static void GetPathToStore(wchar_t path_to_store[MAX_PATH])
|
||||
{
|
||||
GetPrivateProfileStringW( L"gen_ml_config", L"extractpath", defaultPathToStore(), path_to_store, MAX_PATH, (const wchar_t *)SendMessageW( plugin.hwndParent, WM_WA_IPC, 0, IPC_GETMLINIFILEW ) );
|
||||
}
|
||||
|
||||
void Winamp2FrontEnd::getDownloadPath(wchar_t path2store[MAX_PATH])
|
||||
{
|
||||
GetPathToStore(path2store);
|
||||
}
|
||||
|
||||
void Winamp2FrontEnd::setDownloadPath(const wchar_t * path2store)
|
||||
{
|
||||
WritePrivateProfileStringA( "gen_ml_config", "extractpath", AutoChar( path2store, CP_UTF8 ), (const char *)SendMessageW( plugin.hwndParent, WM_WA_IPC, 0, IPC_GETMLINIFILE ) );
|
||||
}
|
||||
|
||||
class DownloadCallback : public Countable<ifc_downloadManagerCallback>
|
||||
{
|
||||
public:
|
||||
DownloadCallback( const wchar_t *destination_filepath, bool storeInMl = true, bool notifyDownloadsList = true )
|
||||
{
|
||||
WCSCPYN( this->destination_filepath, destination_filepath, MAX_PATH );
|
||||
|
||||
this->storeInMl = storeInMl;
|
||||
this->notifyDownloadsList = notifyDownloadsList;
|
||||
}
|
||||
|
||||
|
||||
void OnFinish( DownloadToken token );
|
||||
|
||||
void OnError( DownloadToken token, int error )
|
||||
{
|
||||
if ( notifyDownloadsList )
|
||||
DownloadsList::onDownloadError( token, error );
|
||||
|
||||
Release();
|
||||
}
|
||||
|
||||
void OnCancel( DownloadToken token )
|
||||
{
|
||||
if ( notifyDownloadsList )
|
||||
DownloadsList::onDownloadCancel( token );
|
||||
|
||||
Release();
|
||||
}
|
||||
void OnTick( DownloadToken token )
|
||||
{
|
||||
if ( notifyDownloadsList )
|
||||
DownloadsList::onDownloadTick( token );
|
||||
}
|
||||
|
||||
const wchar_t *getPreferredFilePath()
|
||||
{
|
||||
return destination_filepath;
|
||||
}
|
||||
|
||||
bool getStoreInML()
|
||||
{
|
||||
return storeInMl;
|
||||
}
|
||||
REFERENCE_COUNT_IMPLEMENTATION;
|
||||
|
||||
protected:
|
||||
RECVS_DISPATCH;
|
||||
|
||||
private:
|
||||
bool storeInMl;
|
||||
bool notifyDownloadsList;
|
||||
wchar_t destination_filepath[ MAX_PATH ];
|
||||
};
|
||||
|
||||
// TODO: benski> this is a big hack. we should have a MIME manager in Winamp
|
||||
struct
|
||||
{
|
||||
const char *mime; const char *ext;
|
||||
}
|
||||
hack_mimes[] = { {"audio/mpeg", ".mp3"} };
|
||||
|
||||
void DownloadCallback::OnFinish(DownloadToken token)
|
||||
{
|
||||
api_httpreceiver *http = WAC_API_DOWNLOADMANAGER->GetReceiver(token);
|
||||
if (http)
|
||||
{
|
||||
const char *extension = 0;
|
||||
const char *headers = http->getallheaders();
|
||||
// we're trying to figure out wtf kind of file this is
|
||||
|
||||
if (!extension) // just adding this if to make this easier to re-arrange
|
||||
{
|
||||
// 1) check if there's a content-disposition, it might have an extension
|
||||
const char *content_disposition = http->getheader("content-disposition");
|
||||
if (content_disposition)
|
||||
{
|
||||
const char *content_filename = strstr(content_disposition, "filename=");
|
||||
if (content_filename && *content_filename)
|
||||
{
|
||||
content_filename+=9;
|
||||
extension = PathFindExtensionA(content_filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!extension)
|
||||
{
|
||||
// 2) check MIME type for something good
|
||||
const char *content_type = http->getheader("content-type");
|
||||
if (content_type)
|
||||
{
|
||||
for (int i=0;i!=sizeof(hack_mimes)/sizeof(hack_mimes[0]);i++)
|
||||
{
|
||||
if (!strcmp(hack_mimes[i].mime, content_type))
|
||||
{
|
||||
extension=hack_mimes[i].ext;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const char *url = http->get_url();
|
||||
if (!extension)
|
||||
{
|
||||
// 3) check if URL has an extension
|
||||
|
||||
if (url) // umm, we better have a URL :) but worth a check
|
||||
{
|
||||
extension = PathFindExtensionA(url);
|
||||
}
|
||||
}
|
||||
|
||||
if (!extension)
|
||||
{
|
||||
// 4) ask for winamp's default extension and use that (most likely mp3)
|
||||
extension=".mp3"; // TODO: actually use the setting and not hardcode this :)
|
||||
}
|
||||
|
||||
// then we rename the file
|
||||
wchar_t temppath[MAX_PATH-14] = {0};
|
||||
wchar_t filename[MAX_PATH] = {0};
|
||||
|
||||
GetTempPathW(MAX_PATH-14, temppath);
|
||||
GetTempFileNameW(temppath, L"atf", 0, filename);
|
||||
PathRemoveExtensionW(filename);
|
||||
PathAddExtensionW(filename, AutoWide(extension));
|
||||
|
||||
const wchar_t *downloadDest = WAC_API_DOWNLOADMANAGER->GetLocation(token);
|
||||
MoveFileW(downloadDest, filename);
|
||||
|
||||
// then we build a filename with ATF
|
||||
wchar_t formatted_filename[MAX_PATH] = {0}, path_to_store[MAX_PATH] = {0};
|
||||
if (!WCSICMP(this->getPreferredFilePath(), L""))
|
||||
GetPathToStore(path_to_store);
|
||||
else
|
||||
WCSCPYN(path_to_store, this->getPreferredFilePath(), MAX_PATH);
|
||||
|
||||
// TODO: benski> this is very temporary
|
||||
char temp_filename[MAX_PATH] = {0}, *t = temp_filename,
|
||||
*tfn = PathFindFileNameA(url);
|
||||
|
||||
while(tfn && *tfn)
|
||||
{
|
||||
if(*tfn == '%')
|
||||
{
|
||||
if(_strnicmp(tfn,"%20",3))
|
||||
{
|
||||
*t = *tfn;
|
||||
}
|
||||
else{
|
||||
*t = ' ';
|
||||
tfn = CharNextA(tfn);
|
||||
tfn = CharNextA(tfn);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
*t = *tfn;
|
||||
}
|
||||
tfn = CharNextA(tfn);
|
||||
t = CharNextA(t);
|
||||
}
|
||||
|
||||
*t = 0;
|
||||
|
||||
PathCombineW(formatted_filename, path_to_store, AutoWide(temp_filename));
|
||||
createDirForFileW(formatted_filename);
|
||||
|
||||
// then move the file there
|
||||
if (!MoveFileW(filename, formatted_filename))
|
||||
{
|
||||
CopyFileW(filename, formatted_filename, FALSE);
|
||||
DeleteFileW(filename);
|
||||
}
|
||||
|
||||
//Std::messageBox(formatted_filename, filename, 0);
|
||||
if (this->getStoreInML() && PathFileExistsW(formatted_filename))
|
||||
{
|
||||
// then add to the media library :)
|
||||
// TOOD: benski> use api_mldb because it's more thread-friendly than SendMessageW
|
||||
HWND library = wa2.getMediaLibrary();
|
||||
LMDB_FILE_ADD_INFOW fi = {const_cast<wchar_t *>(formatted_filename), -1, -1};
|
||||
SendMessageW(library, WM_ML_IPC, (WPARAM)&fi, ML_IPC_DB_ADDORUPDATEFILEW);
|
||||
PostMessage(library, WM_ML_IPC, 0, ML_IPC_DB_SYNCDB);
|
||||
}
|
||||
|
||||
if (notifyDownloadsList)
|
||||
DownloadsList::onDownloadEnd(token, const_cast<wchar_t *>(formatted_filename));
|
||||
|
||||
SystemObject::onDownloadFinished(AutoWide(url), true, formatted_filename);
|
||||
|
||||
Release();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (notifyDownloadsList)
|
||||
DownloadsList::onDownloadEnd(token, NULL);
|
||||
|
||||
Release();
|
||||
}
|
||||
|
||||
int Winamp2FrontEnd::DownloadFile( const char *url, const wchar_t *destfilepath, bool addToMl, bool notifyDownloadsList )
|
||||
{
|
||||
DownloadCallback *callback = new DownloadCallback( destfilepath, addToMl, notifyDownloadsList );
|
||||
DownloadToken dt = WAC_API_DOWNLOADMANAGER->Download( url, callback );
|
||||
|
||||
// Notify <DownloadsList/>
|
||||
if ( notifyDownloadsList )
|
||||
DownloadsList::onDownloadStart( url, dt );
|
||||
|
||||
return 0;
|
||||
/*
|
||||
HTTPRETRIEVEFILEW func = (HTTPRETRIEVEFILEW) SendMessageW(hwnd_winamp, WM_WA_IPC, 0, IPC_GETHTTPGETTERW);
|
||||
if (func || func == (HTTPRETRIEVEFILEW)1)
|
||||
return func(NULL, url, destfilename, title);
|
||||
else
|
||||
return 0;
|
||||
*/
|
||||
}
|
||||
|
||||
#define CBCLASS DownloadCallback
|
||||
START_DISPATCH;
|
||||
REFERENCE_COUNTED;
|
||||
VCB( IFC_DOWNLOADMANAGERCALLBACK_ONFINISH, OnFinish )
|
||||
VCB( IFC_DOWNLOADMANAGERCALLBACK_ONTICK, OnTick )
|
||||
VCB( IFC_DOWNLOADMANAGERCALLBACK_ONERROR, OnError )
|
||||
VCB( IFC_DOWNLOADMANAGERCALLBACK_ONCANCEL, OnCancel )
|
||||
END_DISPATCH;
|
||||
#undef CBCLASS
|
||||
@@ -0,0 +1,6 @@
|
||||
- unzip skindirectory.zip into your Winamp2 Skins directory. for now, gen_ff will manually load an
|
||||
unzipped mmd3.
|
||||
- unzip plugindirectory in the ... wa2 plugin directory :) these are the xml and png files for default
|
||||
objects look, skins rely on that for fallback, it's also where we put the new art if we need
|
||||
any (ie static bucketitems will go there eventually instead of being resources)
|
||||
|
||||
@@ -0,0 +1,276 @@
|
||||
#include <precomp.h>
|
||||
#include "WinampConfigScriptObject.h"
|
||||
|
||||
// {B2AD3F2B-31ED-4e31-BC6D-E9951CD555BB}
|
||||
static const GUID winampConfigScriptGuid =
|
||||
{ 0xb2ad3f2b, 0x31ed, 0x4e31, { 0xbc, 0x6d, 0xe9, 0x95, 0x1c, 0xd5, 0x55, 0xbb } };
|
||||
|
||||
// {FC17844E-C72B-4518-A068-A8F930A5BA80}
|
||||
static const GUID winampConfigGroupScriptGuid =
|
||||
{ 0xfc17844e, 0xc72b, 0x4518, { 0xa0, 0x68, 0xa8, 0xf9, 0x30, 0xa5, 0xba, 0x80 } };
|
||||
|
||||
static WinampConfigScriptController _winampConfigController;
|
||||
ScriptObjectController *winampConfigController = &_winampConfigController;
|
||||
|
||||
static WinampConfigGroupScriptController _winampConfigGroupController;
|
||||
ScriptObjectController *winampConfigGroupController = &_winampConfigGroupController;
|
||||
|
||||
BEGIN_SERVICES(WinampConfig_svcs);
|
||||
DECLARE_SERVICETSINGLE(svc_scriptObject, WinampConfigScriptObjectSvc);
|
||||
END_SERVICES(WinampConfig_svcs, _WinampConfig_svcs);
|
||||
|
||||
#ifdef _X86_
|
||||
extern "C"
|
||||
{
|
||||
int _link_WinampConfig_svcs;
|
||||
}
|
||||
#else
|
||||
extern "C"
|
||||
{
|
||||
int __link_WinampConfig_svcs;
|
||||
}
|
||||
#endif
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
// Service
|
||||
|
||||
ScriptObjectController *WinampConfigScriptObjectSvc::getController(int n)
|
||||
{
|
||||
switch (n)
|
||||
{
|
||||
case 0:
|
||||
return winampConfigController;
|
||||
case 1:
|
||||
return winampConfigGroupController;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// -- Functions table -------------------------------------
|
||||
function_descriptor_struct WinampConfigScriptController::exportedFunction[] =
|
||||
{
|
||||
{L"getGroup", 1, (void*)WinampConfig::script_vcpu_getGroup },
|
||||
};
|
||||
|
||||
// --------------------------------------------------------
|
||||
|
||||
const wchar_t *WinampConfigScriptController::getClassName()
|
||||
{
|
||||
return L"WinampConfig";
|
||||
}
|
||||
|
||||
const wchar_t *WinampConfigScriptController::getAncestorClassName()
|
||||
{
|
||||
return L"Object";
|
||||
}
|
||||
|
||||
ScriptObject *WinampConfigScriptController::instantiate()
|
||||
{
|
||||
WinampConfig *wc = new WinampConfig;
|
||||
ASSERT(wc != NULL);
|
||||
return wc->getScriptObject();
|
||||
}
|
||||
|
||||
void WinampConfigScriptController::destroy(ScriptObject *o)
|
||||
{
|
||||
WinampConfig *wc = static_cast<WinampConfig *>(o->vcpu_getInterface(winampConfigScriptGuid));
|
||||
if (wc)
|
||||
delete wc;
|
||||
}
|
||||
|
||||
void *WinampConfigScriptController::encapsulate(ScriptObject *o)
|
||||
{
|
||||
return NULL; // no encapsulation yet
|
||||
}
|
||||
|
||||
void WinampConfigScriptController::deencapsulate(void *o)
|
||||
{
|
||||
}
|
||||
|
||||
int WinampConfigScriptController::getNumFunctions()
|
||||
{
|
||||
return sizeof(exportedFunction) / sizeof(function_descriptor_struct);
|
||||
}
|
||||
|
||||
const function_descriptor_struct *WinampConfigScriptController::getExportedFunctions()
|
||||
{
|
||||
return exportedFunction;
|
||||
}
|
||||
|
||||
GUID WinampConfigScriptController::getClassGuid()
|
||||
{
|
||||
return winampConfigScriptGuid;
|
||||
}
|
||||
|
||||
/* ------------- */
|
||||
|
||||
WinampConfig::WinampConfig()
|
||||
{
|
||||
getScriptObject()->vcpu_setInterface(winampConfigScriptGuid, (void *)static_cast<WinampConfig *>(this));
|
||||
getScriptObject()->vcpu_setClassName(L"WinampConfig");
|
||||
getScriptObject()->vcpu_setController(winampConfigController);
|
||||
|
||||
waServiceFactory *sf = WASABI_API_SVC->service_getServiceByGuid(Agave::AgaveConfigGUID);
|
||||
if (sf)
|
||||
config = (Agave::api_config *)sf->getInterface();
|
||||
}
|
||||
|
||||
WinampConfig::~WinampConfig()
|
||||
{
|
||||
waServiceFactory *sf = WASABI_API_SVC->service_getServiceByGuid(Agave::AgaveConfigGUID);
|
||||
if (sf)
|
||||
sf->releaseInterface(config);
|
||||
}
|
||||
|
||||
scriptVar WinampConfig::script_vcpu_getGroup(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar groupguid)
|
||||
{
|
||||
SCRIPT_FUNCTION_INIT
|
||||
|
||||
const wchar_t *g = GET_SCRIPT_STRING(groupguid);
|
||||
GUID _g = nsGUID::fromCharW(g);
|
||||
|
||||
WinampConfig *wc = static_cast<WinampConfig *>(o->vcpu_getInterface(winampConfigScriptGuid));
|
||||
if (wc)
|
||||
{
|
||||
Agave::ifc_configgroup *group = wc->config->GetGroup(_g);
|
||||
if (group)
|
||||
{
|
||||
WinampConfigGroup *winampConfigGroup = new WinampConfigGroup(group);
|
||||
return MAKE_SCRIPT_OBJECT(winampConfigGroup->getScriptObject());
|
||||
}
|
||||
}
|
||||
RETURN_SCRIPT_NULL;
|
||||
}
|
||||
|
||||
/* ------------- */
|
||||
|
||||
// -- Functions table -------------------------------------
|
||||
function_descriptor_struct WinampConfigGroupScriptController::exportedFunction[] =
|
||||
{
|
||||
{L"getBool", 1, (void*)WinampConfigGroup::script_vcpu_getBool },
|
||||
{L"getString", 1, (void*)WinampConfigGroup::script_vcpu_getString },
|
||||
{L"getInt", 1, (void*)WinampConfigGroup::script_vcpu_getInt },
|
||||
{L"setBool", 2, (void*)WinampConfigGroup::script_vcpu_setBool },
|
||||
};
|
||||
// --------------------------------------------------------
|
||||
|
||||
const wchar_t *WinampConfigGroupScriptController::getClassName()
|
||||
{
|
||||
return L"WinampConfigGroup";
|
||||
}
|
||||
|
||||
const wchar_t *WinampConfigGroupScriptController::getAncestorClassName()
|
||||
{
|
||||
return L"Object";
|
||||
}
|
||||
|
||||
ScriptObject *WinampConfigGroupScriptController::instantiate()
|
||||
{
|
||||
WinampConfigGroup *wc = new WinampConfigGroup;
|
||||
ASSERT(wc != NULL);
|
||||
return wc->getScriptObject();
|
||||
}
|
||||
|
||||
void WinampConfigGroupScriptController::destroy(ScriptObject *o)
|
||||
{
|
||||
WinampConfigGroup *wc = static_cast<WinampConfigGroup *>(o->vcpu_getInterface(winampConfigGroupScriptGuid));
|
||||
if (wc)
|
||||
delete wc;
|
||||
}
|
||||
|
||||
void *WinampConfigGroupScriptController::encapsulate(ScriptObject *o)
|
||||
{
|
||||
return NULL; // no encapsulation yet
|
||||
}
|
||||
|
||||
void WinampConfigGroupScriptController::deencapsulate(void *o)
|
||||
{
|
||||
}
|
||||
|
||||
int WinampConfigGroupScriptController::getNumFunctions()
|
||||
{
|
||||
return sizeof(exportedFunction) / sizeof(function_descriptor_struct);
|
||||
}
|
||||
|
||||
const function_descriptor_struct *WinampConfigGroupScriptController::getExportedFunctions()
|
||||
{
|
||||
return exportedFunction;
|
||||
}
|
||||
|
||||
GUID WinampConfigGroupScriptController::getClassGuid()
|
||||
{
|
||||
return winampConfigGroupScriptGuid;
|
||||
}
|
||||
|
||||
/* ------------- */
|
||||
|
||||
WinampConfigGroup::WinampConfigGroup()
|
||||
{
|
||||
getScriptObject()->vcpu_setInterface(winampConfigGroupScriptGuid, (void *)static_cast<WinampConfigGroup *>(this));
|
||||
getScriptObject()->vcpu_setClassName(L"WinampConfigGroup");
|
||||
getScriptObject()->vcpu_setController(winampConfigGroupController);
|
||||
configGroup = 0;
|
||||
}
|
||||
|
||||
WinampConfigGroup::WinampConfigGroup(Agave::ifc_configgroup *_configGroup)
|
||||
{
|
||||
getScriptObject()->vcpu_setInterface(winampConfigGroupScriptGuid, (void *)static_cast<WinampConfigGroup *>(this));
|
||||
getScriptObject()->vcpu_setClassName(L"WinampConfigGroup");
|
||||
getScriptObject()->vcpu_setController(winampConfigGroupController);
|
||||
configGroup = _configGroup;
|
||||
}
|
||||
|
||||
Agave::ifc_configitem *WinampConfigGroup::GetItem(ScriptObject *o, scriptVar itemname)
|
||||
{
|
||||
const wchar_t *item = GET_SCRIPT_STRING(itemname);
|
||||
WinampConfigGroup *group = static_cast<WinampConfigGroup *>(o->vcpu_getInterface(winampConfigGroupScriptGuid));
|
||||
if (group)
|
||||
{
|
||||
Agave::ifc_configitem *configitem = group->configGroup->GetItem(item);
|
||||
return configitem;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
scriptVar WinampConfigGroup::script_vcpu_getBool(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar itemname)
|
||||
{
|
||||
SCRIPT_FUNCTION_INIT
|
||||
Agave::ifc_configitem *configitem = GetItem(o, itemname);
|
||||
if (configitem)
|
||||
return MAKE_SCRIPT_BOOLEAN(configitem->GetBool());
|
||||
|
||||
RETURN_SCRIPT_ZERO;
|
||||
}
|
||||
|
||||
scriptVar WinampConfigGroup::script_vcpu_getString(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar itemname)
|
||||
{
|
||||
SCRIPT_FUNCTION_INIT
|
||||
Agave::ifc_configitem *configitem = GetItem(o, itemname);
|
||||
if (configitem)
|
||||
return MAKE_SCRIPT_STRING(configitem->GetString());
|
||||
|
||||
RETURN_SCRIPT_ZERO;
|
||||
}
|
||||
|
||||
scriptVar WinampConfigGroup::script_vcpu_getInt(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar itemname)
|
||||
{
|
||||
SCRIPT_FUNCTION_INIT
|
||||
Agave::ifc_configitem *configitem = GetItem(o, itemname);
|
||||
if (configitem)
|
||||
return MAKE_SCRIPT_INT(configitem->GetInt());
|
||||
|
||||
RETURN_SCRIPT_ZERO;
|
||||
}
|
||||
|
||||
scriptVar WinampConfigGroup::script_vcpu_setBool(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar itemname, scriptVar value)
|
||||
{
|
||||
SCRIPT_FUNCTION_INIT
|
||||
const wchar_t *item = GET_SCRIPT_STRING(itemname);
|
||||
WinampConfigGroup *group = static_cast<WinampConfigGroup *>(o->vcpu_getInterface(winampConfigGroupScriptGuid));
|
||||
if (group)
|
||||
{
|
||||
Agave::ifc_configitem *configitem = group->configGroup->GetItem(item);
|
||||
if (configitem)
|
||||
configitem->SetBool(!!GET_SCRIPT_BOOLEAN(value));
|
||||
}
|
||||
RETURN_SCRIPT_VOID;
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
#ifndef NULLSOFT_GEN_FF_WINAMPCONFIGSCRIPTOBJECT_H
|
||||
#define NULLSOFT_GEN_FF_WINAMPCONFIGSCRIPTOBJECT_H
|
||||
|
||||
#include <api/script/objects/rootobj.h>
|
||||
#include <api/script/script.h>
|
||||
#include <api/script/objects/rootobject.h>
|
||||
#include <api/service/svcs/svc_scriptobji.h>
|
||||
namespace Agave
|
||||
{
|
||||
#include "../Agave/Config/api_config.h"
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
// ScriptObject Service
|
||||
class WinampConfigScriptObjectSvc : public svc_scriptObjectI
|
||||
{
|
||||
public:
|
||||
WinampConfigScriptObjectSvc() {};
|
||||
virtual ~WinampConfigScriptObjectSvc() {};
|
||||
|
||||
static const char *getServiceName() { return "Winamp Config script object"; }
|
||||
virtual ScriptObjectController *getController(int n);
|
||||
};
|
||||
|
||||
class WinampConfigScriptController : public ScriptObjectControllerI
|
||||
{
|
||||
public:
|
||||
virtual const wchar_t *getClassName();
|
||||
virtual const wchar_t *getAncestorClassName();
|
||||
virtual ScriptObjectController *getAncestorController() { return rootScriptObjectController; }
|
||||
virtual int getNumFunctions();
|
||||
virtual const function_descriptor_struct *getExportedFunctions();
|
||||
virtual GUID getClassGuid();
|
||||
virtual ScriptObject *instantiate();
|
||||
virtual void destroy(ScriptObject *o);
|
||||
virtual void *encapsulate(ScriptObject *o);
|
||||
virtual void deencapsulate(void *o);
|
||||
|
||||
private:
|
||||
static function_descriptor_struct exportedFunction[];
|
||||
};
|
||||
|
||||
extern ScriptObjectController *winampConfigController;
|
||||
extern ScriptObjectController *winampConfigGroupController;
|
||||
|
||||
#define WINAMPCONFIG_PARENT RootObjectInstance
|
||||
|
||||
class WinampConfig : public WINAMPCONFIG_PARENT
|
||||
{
|
||||
public:
|
||||
WinampConfig();
|
||||
~WinampConfig();
|
||||
public:
|
||||
virtual const wchar_t *vcpu_getClassName() { return L"WinampConfig"; }
|
||||
virtual ScriptObjectController *vcpu_getController() { return winampConfigController; }
|
||||
|
||||
static scriptVar script_vcpu_getGroup(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar n);
|
||||
|
||||
Agave::api_config *config;
|
||||
};
|
||||
|
||||
class WinampConfigGroupScriptController : public ScriptObjectControllerI {
|
||||
public:
|
||||
virtual const wchar_t *getClassName();
|
||||
virtual const wchar_t *getAncestorClassName();
|
||||
virtual ScriptObjectController *getAncestorController() { return rootScriptObjectController; }
|
||||
virtual int getNumFunctions();
|
||||
virtual const function_descriptor_struct *getExportedFunctions();
|
||||
virtual GUID getClassGuid();
|
||||
virtual ScriptObject *instantiate();
|
||||
virtual void destroy(ScriptObject *o);
|
||||
virtual void *encapsulate(ScriptObject *o);
|
||||
virtual void deencapsulate(void *o);
|
||||
|
||||
private:
|
||||
static function_descriptor_struct exportedFunction[];
|
||||
};
|
||||
|
||||
#define WINAMPCONFIGGROUP_PARENT RootObjectInstance
|
||||
class WinampConfigGroup : public WINAMPCONFIGGROUP_PARENT
|
||||
{
|
||||
public:
|
||||
WinampConfigGroup();
|
||||
WinampConfigGroup(Agave::ifc_configgroup *_configGroup);
|
||||
|
||||
public:
|
||||
virtual const wchar_t *vcpu_getClassName() { return L"WinampConfigGroup"; }
|
||||
virtual ScriptObjectController *vcpu_getController() { return winampConfigGroupController; }
|
||||
|
||||
static Agave::ifc_configitem *GetItem(ScriptObject *o, scriptVar n); // helper function
|
||||
static scriptVar script_vcpu_getBool(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar n);
|
||||
static scriptVar script_vcpu_getString(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar n);
|
||||
static scriptVar script_vcpu_getInt(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar n);
|
||||
static scriptVar script_vcpu_setBool(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar itemname, scriptVar value);
|
||||
|
||||
Agave::ifc_configgroup *configGroup;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef NULLSOFT_GEN_FF_API_H
|
||||
#define NULLSOFT_GEN_FF_API_H
|
||||
|
||||
#include <api/memmgr/api_memmgr.h>
|
||||
extern api_memmgr *memmgrApi;
|
||||
#define WASABI_API_MEMMGR memmgrApi
|
||||
|
||||
#include <api/skin/api_colorthemes.h>
|
||||
#define WASABI_API_COLORTHEMES colorThemesApi
|
||||
|
||||
#include <api/skin/api_palette.h>
|
||||
extern api_palette *paletteManagerApi;
|
||||
#define WASABI_API_PALETTE paletteManagerApi
|
||||
|
||||
#include "../nu/threadpool/api_threadpool.h"
|
||||
extern api_threadpool *threadPoolApi;
|
||||
#define WASABI_API_THREADPOOL threadPoolApi
|
||||
|
||||
|
||||
#endif // !NULLSOFT_GEN_FF_API_H
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 828 B |
|
After Width: | Height: | Size: 807 B |
|
After Width: | Height: | Size: 826 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
@@ -0,0 +1,200 @@
|
||||
#include "precomp__gen_ff.h"
|
||||
#include "embedwndguid.h"
|
||||
#include "wa2wndembed.h"
|
||||
#include "wa2frontend.h"
|
||||
#include "wa2cfgitems.h"
|
||||
#include <bfc/string/stringW.h>
|
||||
|
||||
extern void initFFApi();
|
||||
|
||||
EmbedWndGuidMgr embedWndGuidMgr;
|
||||
|
||||
EmbedWndGuid::EmbedWndGuid(embedWindowState *_ws)
|
||||
{
|
||||
hwnd = NULL;
|
||||
guid = INVALID_GUID;
|
||||
if (_ws == NULL) return ;
|
||||
|
||||
ws = _ws;
|
||||
hwnd = ws->me;
|
||||
embedWndGuidMgr.getGuid(this);
|
||||
}
|
||||
|
||||
EmbedWndGuid::EmbedWndGuid(EmbedWndGuid *wg)
|
||||
{
|
||||
hwnd = NULL;
|
||||
guid = INVALID_GUID;
|
||||
if (wg == NULL) return ;
|
||||
|
||||
ws = wg->getEmbedWindowState();
|
||||
hwnd = ws->me;
|
||||
guid = wg->getGuid();
|
||||
}
|
||||
|
||||
GUID EmbedWndGuidMgr::getGuid(embedWindowState *ws)
|
||||
{
|
||||
foreach(table)
|
||||
EmbedWndGuid *ewg = table.getfor();
|
||||
if (ewg->getEmbedWindowState() == ws)
|
||||
{
|
||||
return ewg->getGuid();
|
||||
}
|
||||
endfor;
|
||||
return INVALID_GUID;
|
||||
}
|
||||
|
||||
GUID EmbedWndGuidMgr::getGuid(EmbedWndGuid *wg)
|
||||
{
|
||||
if (wg == NULL) return INVALID_GUID;
|
||||
// if we aren't loaded yet, init wasabi, otherwise ignore
|
||||
initFFApi();
|
||||
|
||||
int gotit = 0;
|
||||
int nowrite = 0;
|
||||
wchar_t windowTitle[256] = L"";
|
||||
HWND child;
|
||||
|
||||
GUID newGuid = INVALID_GUID;
|
||||
|
||||
if (wg->getEmbedWindowState()->flags & EMBED_FLAGS_GUID)
|
||||
{
|
||||
newGuid = GET_EMBED_GUID(wg->getEmbedWindowState());
|
||||
nowrite=1;
|
||||
goto bypass;
|
||||
}
|
||||
|
||||
if (wa2.isVis(wg->getEmbedWindowState()->me))
|
||||
{
|
||||
newGuid = avs_guid;
|
||||
nowrite = 1;
|
||||
extern int disable_send_visrandom;
|
||||
extern _bool visrandom;
|
||||
wa2.pollVisRandom();
|
||||
goto bypass;
|
||||
}
|
||||
|
||||
child = GetWindow(wg->getEmbedWindowState()->me, GW_CHILD);
|
||||
if (child == wa2.getMediaLibrary())
|
||||
{ newGuid = library_guid; nowrite = 1; goto bypass; }
|
||||
|
||||
if (!gotit)
|
||||
{
|
||||
foreach(table)
|
||||
EmbedWndGuid *ewg = table.getfor();
|
||||
if (ewg->getEmbedWindowState() == wg->getEmbedWindowState())
|
||||
{
|
||||
wg->setGuid(ewg->getGuid());
|
||||
gotit = 1;
|
||||
break;
|
||||
}
|
||||
endfor;
|
||||
}
|
||||
|
||||
if (!gotit)
|
||||
{
|
||||
// not found, look for window title in saved table
|
||||
GetWindowTextW(wg->getEmbedWindowState()->me, windowTitle, 256);
|
||||
if (*windowTitle)
|
||||
{
|
||||
wchar_t str[256] = L"";
|
||||
StringW configString = windowTitle;
|
||||
configString += L"_guid";
|
||||
WASABI_API_CONFIG->getStringPrivate(configString, str, 256, L"");
|
||||
if (*str)
|
||||
{
|
||||
wg->setGuid(nsGUID::fromCharW(str));
|
||||
table.addItem(new EmbedWndGuid(wg));
|
||||
gotit = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!gotit)
|
||||
{
|
||||
// not found in saved table, or no title for the window, assign a new guid
|
||||
if (!_wcsicmp(windowTitle, L"AVS"))
|
||||
{ newGuid = avs_guid; nowrite = 1; }
|
||||
else
|
||||
CoCreateGuid(&newGuid);
|
||||
|
||||
bypass:
|
||||
|
||||
wg->setGuid(newGuid);
|
||||
|
||||
// save a copy of the element
|
||||
table.addItem(new EmbedWndGuid(wg));
|
||||
|
||||
// write the guid in the saved table
|
||||
if (*windowTitle && !nowrite)
|
||||
{
|
||||
wchar_t str[256] = {0};
|
||||
nsGUID::toCharW(newGuid, str);
|
||||
StringW configString = windowTitle;
|
||||
configString += L"_guid";
|
||||
WASABI_API_CONFIG->setStringPrivate(configString, str);
|
||||
}
|
||||
}
|
||||
return wg->getGuid();
|
||||
}
|
||||
|
||||
embedWindowState *EmbedWndGuidMgr::getEmbedWindowState(GUID g)
|
||||
{
|
||||
foreach(table)
|
||||
EmbedWndGuid *ewg = table.getfor();
|
||||
if (ewg->getGuid() == g)
|
||||
{
|
||||
embedWindowState *ews = ewg->getEmbedWindowState();
|
||||
if (wa2.isValidEmbedWndState(ews))
|
||||
return ews;
|
||||
}
|
||||
endfor;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void EmbedWndGuidMgr::retireEmbedWindowState(embedWindowState *ws)
|
||||
{
|
||||
foreach(table)
|
||||
EmbedWndGuid *ewg = table.getfor();
|
||||
if (ewg->getEmbedWindowState() == ws)
|
||||
{
|
||||
delete table.getfor();
|
||||
table.removeByPos(foreach_index);
|
||||
break;
|
||||
}
|
||||
endfor;
|
||||
}
|
||||
|
||||
int EmbedWndGuidMgr::testGuid(GUID g)
|
||||
{
|
||||
// if (g == library_guid) return 1;
|
||||
// if (g == avs_guid) return 1;
|
||||
foreach(table)
|
||||
EmbedWndGuid *ewg = table.getfor();
|
||||
if (ewg->getGuid() == g)
|
||||
{
|
||||
if (!wa2.isValidEmbedWndState(ewg->getEmbedWindowState())) retireEmbedWindowState(ewg->getEmbedWindowState());
|
||||
else return 1;
|
||||
}
|
||||
endfor;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int EmbedWndGuidMgr::getNumWindowStates()
|
||||
{
|
||||
return table.getNumItems();
|
||||
}
|
||||
|
||||
GUID EmbedWndGuidMgr::enumWindowState(int n, embedWindowState **ws)
|
||||
{
|
||||
EmbedWndGuid *ewg = table.enumItem(n);
|
||||
if (ewg)
|
||||
{
|
||||
embedWindowState *ews = ewg->getEmbedWindowState();
|
||||
if (wa2.isValidEmbedWndState(ews))
|
||||
{
|
||||
if (ws) *ws = ews;
|
||||
return ewg->getGuid();
|
||||
}
|
||||
}
|
||||
return INVALID_GUID;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
#ifndef _EMBEDWNDGUID_H
|
||||
#define _EMBEDWNDGUID_H
|
||||
|
||||
#include "../winamp/wa_ipc.h"
|
||||
|
||||
class EmbedWndGuid
|
||||
{
|
||||
public:
|
||||
EmbedWndGuid(EmbedWndGuid *wg);
|
||||
EmbedWndGuid(embedWindowState *ws);
|
||||
GUID getGuid() { return guid; }
|
||||
embedWindowState *getEmbedWindowState() { return ws; }
|
||||
void setGuid(GUID g) { guid = g; }
|
||||
HWND getHWND() { return hwnd; }
|
||||
void setHWND(HWND w) { hwnd = w; }
|
||||
|
||||
|
||||
private:
|
||||
GUID guid;
|
||||
embedWindowState *ws;
|
||||
HWND hwnd;
|
||||
};
|
||||
|
||||
class EmbedWndGuidMgr
|
||||
{
|
||||
public:
|
||||
GUID getGuid(EmbedWndGuid *wg);
|
||||
GUID getGuid(embedWindowState *ws);
|
||||
embedWindowState *getEmbedWindowState(GUID g);
|
||||
int testGuid(GUID g);
|
||||
void retireEmbedWindowState(embedWindowState *ws);
|
||||
int getNumWindowStates();
|
||||
GUID enumWindowState(int n, embedWindowState **ws=NULL);
|
||||
|
||||
private:
|
||||
PtrList<EmbedWndGuid> table;
|
||||
|
||||
};
|
||||
|
||||
extern EmbedWndGuidMgr embedWndGuidMgr;
|
||||
|
||||
#endif // _EMBEDWNDGUID_H
|
||||
@@ -0,0 +1,535 @@
|
||||
#include "precomp__gen_ff.h"
|
||||
#include "gen_ff_ipc.h"
|
||||
#include "ff_ipc.h"
|
||||
#include "../winamp/wa_ipc.h"
|
||||
#include "wa2frontend.h"
|
||||
#include <tataki/color/skinclr.h>
|
||||
#include <api/wnd/wndclass/buttwnd.h>
|
||||
#include <api/wndmgr/skinwnd.h>
|
||||
#include <tataki/blending/blending.h>
|
||||
#include <api/skin/skinparse.h>
|
||||
#include <api/wnd/wndtrack.h>
|
||||
#include "wa2wndembed.h"
|
||||
#include "embedwndguid.h"
|
||||
#include <tataki/canvas/bltcanvas.h>
|
||||
#include "../nu/AutoChar.h"
|
||||
#include "../nu/AutoWide.h"
|
||||
ColorThemeMonitor *colorThemeMonitor = NULL;
|
||||
|
||||
HBITMAP CreateBitmapDIB(int w, int h, int planes, int bpp, void *data)
|
||||
{
|
||||
#if 0
|
||||
return CreateBitmap(w, h, planes, bpp, data);
|
||||
#else
|
||||
void *bits=0;
|
||||
BITMAPINFO bmi={0,};
|
||||
bmi.bmiHeader.biSize=sizeof(BITMAPINFOHEADER);
|
||||
bmi.bmiHeader.biWidth = w;
|
||||
bmi.bmiHeader.biHeight = -h;
|
||||
bmi.bmiHeader.biPlanes = 1;
|
||||
bmi.bmiHeader.biBitCount = bpp;
|
||||
bmi.bmiHeader.biSizeImage = w*h*(bpp/8);
|
||||
bmi.bmiHeader.biCompression=BI_RGB;
|
||||
|
||||
HBITMAP bm=CreateDIBSection(0,&bmi,0,&bits,NULL,0);
|
||||
|
||||
if (bm && bits) memcpy(bits,data,w*h*(bpp/8));
|
||||
return bm;
|
||||
#endif
|
||||
}
|
||||
|
||||
HWND ff_ipc_getContentWnd(HWND w) {
|
||||
HWND ret = w;
|
||||
|
||||
ifc_window *wnd = windowTracker->rootWndFromHwnd(w); // TODO: API_WNDMGR->
|
||||
if (wnd) {
|
||||
ifc_window *dp = wnd->getDesktopParent();
|
||||
if (dp) {
|
||||
Layout *l = static_cast<Layout *>(dp->getInterface(layoutGuid));
|
||||
if (l) {
|
||||
Container *c = l->getParentContainer();
|
||||
if (c) {
|
||||
GUID g = c->getDefaultContent();
|
||||
if (g != INVALID_GUID) {
|
||||
if (g == playerWndGuid)
|
||||
ret = wa2.getMainWindow();
|
||||
else if (g == pleditWndGuid)
|
||||
ret = wa2.getWnd(IPC_GETWND_PE);
|
||||
else if (g == videoWndGuid)
|
||||
ret = wa2.getWnd(IPC_GETWND_VIDEO);
|
||||
else {
|
||||
embedWindowState *ews = embedWndGuidMgr.getEmbedWindowState(g);
|
||||
if (ews)
|
||||
ret = ews->me;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void ff_ipc_getSkinColor(ff_skincolor *cs)
|
||||
{
|
||||
if (cs == NULL) return;
|
||||
cs->color = RGBTOBGR(SkinColor(AutoWide(cs->colorname)));
|
||||
}
|
||||
#define USE_WIN32_ALPHABLEND
|
||||
static void ButtonSetup(ButtonWnd &_w)
|
||||
{
|
||||
_w.setVirtual(0);
|
||||
_w.setStartHidden(1);
|
||||
_w.setParent(WASABI_API_WND->main_getRootWnd());
|
||||
_w.init(WASABI_API_WND->main_getRootWnd());
|
||||
_w.setCloaked(1);
|
||||
_w.setVisible(1);
|
||||
}
|
||||
|
||||
static void DoButtonBlit(ButtonWnd &_w, int w, int h, int state, const wchar_t *overlayelement, int xpos, int ypos, BltCanvas *c)
|
||||
{
|
||||
if (state == BUTTONSTATE_PUSHED) _w.setPushed(1);
|
||||
else _w.setPushed(0);
|
||||
_w.resize(0, 0, w, h);
|
||||
_w.deferedInvalidate();
|
||||
_w.paint(NULL, NULL);
|
||||
Canvas *cv = NULL;
|
||||
cv = _w.getFrameBuffer();
|
||||
if (cv != NULL) {
|
||||
BltCanvas *bltcanvas = static_cast<BltCanvas *>(cv); // hackish
|
||||
#ifdef USE_WIN32_ALPHABLEND
|
||||
bltcanvas->/*getSkinBitmap()->*/blitAlpha(c, xpos, ypos);
|
||||
#else
|
||||
bltcanvas->getSkinBitmap()->blitAlpha(c, xpos, ypos);
|
||||
#endif
|
||||
}
|
||||
if (overlayelement && *overlayelement) {
|
||||
AutoSkinBitmap b(overlayelement);
|
||||
SkinBitmap *sb = b.getBitmap();
|
||||
int shift = (state == BUTTONSTATE_PUSHED) ? 1 : 0;
|
||||
sb->blitAlpha(c, xpos+(w-sb->getWidth())/2+shift, ypos+(h-sb->getHeight())/2+shift);
|
||||
}
|
||||
}
|
||||
|
||||
void blitButtonToCanvas(int w, int h, int state, const wchar_t *overlayelement, int xpos, int ypos, BltCanvas *c)
|
||||
{
|
||||
ButtonWnd _w;
|
||||
ButtonSetup(_w);
|
||||
DoButtonBlit(_w, w, h, state, overlayelement, xpos, ypos, c);
|
||||
|
||||
}
|
||||
|
||||
static HBITMAP generateButtonBitmap(int w, int h, int state, const wchar_t *overlayelement=NULL) {
|
||||
BltCanvas c(w, h);
|
||||
blitButtonToCanvas(w,h,state,overlayelement,0,0,&c);
|
||||
SysCanvas cc;
|
||||
c.blit(0, 0, &cc, 0, 0, w, h);
|
||||
return CreateBitmapDIB(w, h, 1, 32, c.getBits());
|
||||
}
|
||||
|
||||
COLORREF getWindowBackground(COLORREF *wb)
|
||||
{
|
||||
static String last_skin, last_theme;
|
||||
static COLORREF last_windowbackground = 0x00000000;
|
||||
|
||||
COLORREF windowbackground = 0x00000000;
|
||||
|
||||
// window background (used to set the bg color for the dialog)
|
||||
if (!WASABI_API_SKIN->skin_getColorElementRef(L"wasabi.window.background"))
|
||||
{
|
||||
String curskin = AutoChar(WASABI_API_SKIN->getSkinName());
|
||||
String curtheme = AutoChar(WASABI_API_SKIN->colortheme_getColorSet());
|
||||
if (!last_skin.iscaseequal(curskin) || !last_theme.iscaseequal(curtheme)) {
|
||||
last_skin = curskin;
|
||||
last_theme = curtheme;
|
||||
// extract the window color from an active piece of skin
|
||||
SkinWnd w(L"$$$.some.purposedly.undefined.group.$$$", NULL, 0, NULL, 1, 1);
|
||||
ifc_window *wnd = w.getWindow();
|
||||
if (wnd != NULL) {
|
||||
ifc_window *wh = wnd->findWindowByInterface(windowHolderGuid);
|
||||
if (wh != NULL) {
|
||||
wnd = wnd->getDesktopParent();
|
||||
if (w.isNewContainer()) {
|
||||
wnd->setCloaked(1);
|
||||
wnd->setVisible(1);
|
||||
wnd->resize(0, 0, 320, 200);
|
||||
wnd->paint();
|
||||
}
|
||||
BltCanvas *canvas = static_cast<BltCanvas *>(wnd->getFrameBuffer());
|
||||
if (!canvas) goto basetexture; // eek :-D
|
||||
int x=0, y=0;
|
||||
RECT r;
|
||||
wh->getClientRect(&r);
|
||||
x = r.left + (r.right-r.left)/2; y = r.top + (r.bottom-r.top)/2;
|
||||
COLORREF *bits = (COLORREF *)canvas->getBits();
|
||||
int w, h;
|
||||
canvas->getDim(&w, &h, NULL);
|
||||
if (w == 0 || h == 0)
|
||||
windowbackground = 0; // black by default
|
||||
else
|
||||
windowbackground = bits[y*w+x];
|
||||
}
|
||||
}
|
||||
w.destroy();
|
||||
if (windowbackground == 0x00000000) {
|
||||
basetexture:
|
||||
// try for wasabi.basetexture ...
|
||||
int _w, _h, _x, _y;
|
||||
ARGB32 *b = WASABI_API_SKIN->imgldr_requestSkinBitmap(L"wasabi.basetexture", NULL, &_x, &_y, NULL, NULL, &_w, &_h, 1);
|
||||
if (b != NULL) {
|
||||
windowbackground = b[_w*_y+_x];
|
||||
WASABI_API_SKIN->imgldr_releaseSkinBitmap(b);
|
||||
} else {
|
||||
// no idea... we'll just set the default windows color
|
||||
windowbackground = GetSysColor(COLOR_WINDOWFRAME);
|
||||
}
|
||||
}
|
||||
last_windowbackground = windowbackground;
|
||||
} else {
|
||||
windowbackground = last_windowbackground;
|
||||
}
|
||||
if (wb) *wb=windowbackground;
|
||||
return windowbackground;
|
||||
} else {
|
||||
COLORREF c = RGBTOBGR(SkinColor(L"wasabi.window.background"));
|
||||
if (wb) *wb = c;
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
||||
inline int lumidiff(int a, int b) {
|
||||
int r1 = (a & 0xFF0000) >> 16;
|
||||
int r2 = (b & 0xFF0000) >> 16;
|
||||
int g1 = (a & 0xFF00) >> 8;
|
||||
int g2 = (b & 0xFF00) >> 8;
|
||||
int b1 = a & 0xFF;
|
||||
int b2 = b & 0xFF;
|
||||
return MIN((ABS(r1-r2), ABS(g1-g2)), ABS(b1-b2));
|
||||
}
|
||||
|
||||
HBITMAP ff_genwa2skinbitmap()
|
||||
{
|
||||
int interpolate = 0;
|
||||
if (SkinParser::getSkinVersion()*10 < 10) interpolate = 1;
|
||||
|
||||
BltCanvas c(132, 75);
|
||||
COLORREF windowbackground = 0;
|
||||
COLORREF wbg=getWindowBackground(&windowbackground);
|
||||
|
||||
COLORREF *ptr=(COLORREF *)c.getBits();
|
||||
c.fillBits(wbg);
|
||||
|
||||
// set up bg color for the picky pixel parser heh
|
||||
int x;
|
||||
for (x = 47; x < 132; x ++) ptr[x]=ptr[x+132]=RGB(0,198,255);
|
||||
|
||||
ButtonWnd _w;
|
||||
ButtonSetup(_w);
|
||||
|
||||
DoButtonBlit(_w, 47,15,0,NULL,0,0,&c);
|
||||
DoButtonBlit(_w, 47,15,1,NULL,0,15,&c);
|
||||
|
||||
DoButtonBlit(_w, 14,14,0,L"wasabi.button.label.arrow.up",0,31,&c);
|
||||
DoButtonBlit(_w, 14,14,0,L"wasabi.button.label.arrow.down",14,31,&c);
|
||||
DoButtonBlit(_w, 14,14,1,L"wasabi.button.label.arrow.up",28,31,&c);
|
||||
DoButtonBlit(_w, 14,14,1,L"wasabi.button.label.arrow.down",42,31,&c);
|
||||
|
||||
DoButtonBlit(_w, 14,14,0,L"wasabi.button.label.arrow.left",0,45,&c);
|
||||
DoButtonBlit(_w, 14,14,0,L"wasabi.button.label.arrow.right",14,45,&c);
|
||||
DoButtonBlit(_w, 14,14,1,L"wasabi.button.label.arrow.left",28,45,&c);
|
||||
DoButtonBlit(_w, 14,14,1,L"wasabi.button.label.arrow.right",42,45,&c);
|
||||
|
||||
DoButtonBlit(_w, 14,28,0,L"wasabi.scrollbar.vertical.grip",56,31,&c);
|
||||
DoButtonBlit(_w, 14,28,1,L"wasabi.scrollbar.vertical.grip",70,31,&c);
|
||||
|
||||
DoButtonBlit(_w, 28,14,0,L"wasabi.scrollbar.horizontal.grip",84,31,&c);
|
||||
DoButtonBlit(_w, 28,14,1,L"wasabi.scrollbar.horizontal.grip",84,45,&c);
|
||||
|
||||
// item background (background to edits, listviews etc)
|
||||
if (WASABI_API_SKIN->skin_getColorElementRef(L"wasabi.list.background"))
|
||||
ptr[48] = RGBTOBGR(SkinColor(L"wasabi.list.background"));
|
||||
else
|
||||
ptr[48] = WASABI_API_SKIN->skin_getBitmapColor(L"wasabi.list.background"); // RGBTOBGR(SkinColor(L"wasabi.edit.background"));
|
||||
|
||||
COLORREF listbkg = ptr[48];
|
||||
|
||||
// item foreground (text color of edit/listview, etc)
|
||||
if (WASABI_API_SKIN->skin_getColorElementRef(L"wasabi.list.text"))
|
||||
ptr[50] = RGBTOBGR(SkinColor(L"wasabi.list.text"));
|
||||
else {
|
||||
int c = RGBTOBGR(SkinColor(L"wasabi.edit.text"));
|
||||
ptr[50] = c;
|
||||
}
|
||||
|
||||
if (interpolate) {
|
||||
int c = ptr[50];
|
||||
c = lumidiff(c, listbkg) < 0x1F ? Blenders::BLEND_AVG(ptr[50], 0xFF7F7F7F) : c;
|
||||
c = lumidiff(c, listbkg) < 0x1F ? Blenders::BLEND_AVG(ptr[50], 0xFF101010) : c;
|
||||
ptr[50] = c | 0xFF000000;
|
||||
}
|
||||
|
||||
ptr[52] = wbg;
|
||||
|
||||
ptr[54] = RGBTOBGR(SkinColor(SKINCOLOR_BUTTON_TEXT));
|
||||
|
||||
// window text color
|
||||
if (!interpolate && WASABI_API_SKIN->skin_getColorElementRef(L"wasabi.window.text"))
|
||||
ptr[56] = RGBTOBGR(SkinColor(L"wasabi.window.text"));
|
||||
else {
|
||||
ptr[56] = RGBTOBGR(SkinColor(SKINCOLOR_LIST_ITEMTEXT)); //"wasabi.textbar.text");//
|
||||
}
|
||||
|
||||
|
||||
// color of dividers and sunken borders
|
||||
if (!interpolate && WASABI_API_SKIN->skin_getColorElementRef(L"wasabi.border.sunken"))
|
||||
ptr[58] = RGBTOBGR(SkinColor(L"wasabi.border.sunken"));
|
||||
else {
|
||||
int a = MAX((windowbackground & 0xFF0000) >> 16, MAX((windowbackground & 0xFF00) >> 8, windowbackground & 0xFF));
|
||||
ptr[58] = Blenders::BLEND_AVG(windowbackground, a > 0xE0 ? 0xFF000000: 0xFFFFFFFF);
|
||||
}
|
||||
|
||||
// listview header background color
|
||||
COLORREF col = RGBTOBGR(SkinColor(SKINCOLOR_LIST_COLUMNBKG));
|
||||
if (interpolate) {
|
||||
int a = MAX((col & 0xFF0000) >> 16, MAX((col & 0xFF00) >> 8, col & 0xFF));
|
||||
col = a < 0x1F ? Blenders::BLEND_AVG(windowbackground, 0xFF000000) : col;
|
||||
}
|
||||
ptr[62] = col;
|
||||
|
||||
// listview header text color
|
||||
ptr[64] = RGBTOBGR(SkinColor(SKINCOLOR_LIST_COLUMNTEXT));
|
||||
|
||||
// listview header frame top color
|
||||
if (!interpolate && WASABI_API_SKIN->skin_getColorElementRef(L"wasabi.list.column.frame.top"))
|
||||
ptr[66] = RGBTOBGR(SkinColor(L"wasabi.list.column.frame.top"));
|
||||
else
|
||||
ptr[66] = Blenders::BLEND_AVG(col, 0xFFFFFFFF);//listview header frame top color
|
||||
|
||||
// listview header frame middle color
|
||||
if (!interpolate && WASABI_API_SKIN->skin_getColorElementRef(L"wasabi.list.column.frame.middle"))
|
||||
ptr[68] = RGBTOBGR(SkinColor(L"wasabi.list.column.frame.middle"));
|
||||
else
|
||||
ptr[68] = Blenders::BLEND_AVG(col, 0xFF2F2F2F);
|
||||
|
||||
// listview header frame bottom color
|
||||
if (!interpolate && WASABI_API_SKIN->skin_getColorElementRef(L"wasabi.list.column.frame.bottom"))
|
||||
ptr[70] = RGBTOBGR(SkinColor(L"wasabi.list.column.frame.bottom"));
|
||||
else
|
||||
ptr[70] = Blenders::BLEND_AVG(col, 0xFF000000);
|
||||
|
||||
// listview header empty color
|
||||
COLORREF empty;
|
||||
if (!interpolate && WASABI_API_SKIN->skin_getColorElementRef(L"wasabi.list.column.empty"))
|
||||
empty = RGBTOBGR(SkinColor(L"wasabi.list.column.empty"));
|
||||
else
|
||||
empty = Blenders::BLEND_AVG(col, 0xFF000000);
|
||||
ptr[72] = empty;
|
||||
|
||||
// scrollbar foreground color
|
||||
if (!interpolate && WASABI_API_SKIN->skin_getColorElementRef(L"wasabi.scrollbar.foreground"))
|
||||
ptr[74] = RGBTOBGR(SkinColor(L"wasabi.scrollbar.foreground"));
|
||||
else
|
||||
ptr[74] = empty;
|
||||
|
||||
// scrollbar background color
|
||||
if (!interpolate && WASABI_API_SKIN->skin_getColorElementRef(L"wasabi.scrollbar.background"))
|
||||
ptr[76] = RGBTOBGR(SkinColor(L"wasabi.scrollbar.background"));
|
||||
else
|
||||
ptr[76] = empty;
|
||||
|
||||
// inverse scrollbar foreground color
|
||||
if (!interpolate && WASABI_API_SKIN->skin_getColorElementRef(L"wasabi.scrollbar.foreground.inverted"))
|
||||
ptr[78] = RGBTOBGR(SkinColor(L"wasabi.scrollbar.foreground.inverted"));
|
||||
else
|
||||
ptr[78] = col;
|
||||
|
||||
// inverse scrollbar background color
|
||||
if (!interpolate && WASABI_API_SKIN->skin_getColorElementRef(L"wasabi.scrollbar.background.inverted"))
|
||||
ptr[80] = RGBTOBGR(SkinColor(L"wasabi.scrollbar.background.inverted"));
|
||||
else
|
||||
ptr[80] = empty;
|
||||
|
||||
// scrollbar dead area color
|
||||
ptr[82] = windowbackground;
|
||||
|
||||
// listview/treeview selection bar text color
|
||||
COLORREF selfg;
|
||||
|
||||
if (WASABI_API_SKIN->skin_getColorElementRef(L"wasabi.list.text.selected"))
|
||||
selfg = RGBTOBGR(SkinColor(L"wasabi.list.text.selected"));
|
||||
else
|
||||
if (WASABI_API_SKIN->skin_getColorElementRef(L"wasabi.list.text"))
|
||||
selfg = RGBTOBGR(SkinColor(L"wasabi.list.text"));
|
||||
else
|
||||
selfg = SkinColor(L"wasabi.edit.text");
|
||||
|
||||
ptr[84] = selfg;
|
||||
|
||||
|
||||
// listview/treeview selection bar back color
|
||||
COLORREF selbg;
|
||||
if (WASABI_API_SKIN->skin_getColorElementRef(L"wasabi.list.text.selected.background"))
|
||||
selbg = RGBTOBGR(SkinColor(L"wasabi.list.text.selected.background"));
|
||||
else {
|
||||
if (WASABI_API_SKIN->skin_getColorElementRef(L"wasabi.list.item.selected"))
|
||||
selbg = RGBTOBGR(SkinColor(L"wasabi.list.item.selected"));
|
||||
else
|
||||
selbg = RGBTOBGR(SkinColor(SKINCOLOR_TREE_SELITEMBKG));
|
||||
selbg = lumidiff(selbg, listbkg) < 0x2F ? Blenders::BLEND_AVG(windowbackground, 0xFF7F7F7F) : selbg;
|
||||
selbg = lumidiff(selbg, listbkg) < 0x2F ? Blenders::BLEND_AVG(listbkg, 0xFF7F7F7F) : selbg;
|
||||
selbg = lumidiff(selbg, listbkg) < 0x2F ? Blenders::BLEND_AVG(windowbackground, 0xFFF0F0F0) : selbg;
|
||||
selbg = lumidiff(selbg, listbkg) < 0x2F ? Blenders::BLEND_AVG(listbkg, 0xFFF0F0F0) : selbg;
|
||||
selbg = lumidiff(selbg, listbkg) < 0x2F ? Blenders::BLEND_AVG(col, 0xFFF0F0F0) : selbg;
|
||||
selbg = lumidiff(selbg, listbkg) < 0x2F ? Blenders::BLEND_AVG(col, 0xFF101010) : selbg;
|
||||
selbg = lumidiff(selbg, selfg) < 0x1F ? Blenders::BLEND_AVG(selbg, 0xFF101010) : selbg;
|
||||
selbg = lumidiff(selbg, selfg) < 0x1F ? Blenders::BLEND_AVG(selbg, 0xFFF0F0F0) : selbg;
|
||||
}
|
||||
ptr[86] = ptr[60] = (selbg | 0xFF000000);
|
||||
|
||||
// listview/treeview selection bar text color (inactive)
|
||||
if (!interpolate && WASABI_API_SKIN->skin_getColorElementRef(L"wasabi.list.text.selected.inactive"))
|
||||
ptr[88] = RGBTOBGR(SkinColor(L"wasabi.list.text.selected.inactive"));
|
||||
else
|
||||
ptr[88] = selfg;
|
||||
|
||||
// listview/treeview selection bar back color (inactive)
|
||||
if (!interpolate && WASABI_API_SKIN->skin_getColorElementRef(L"wasabi.list.text.selected.background.inactive"))
|
||||
ptr[90] = RGBTOBGR(SkinColor(L"wasabi.list.text.selected.background.inactive"));
|
||||
else
|
||||
ptr[90] = Blenders::BLEND_ADJ1(selbg, 0xFF000000, 210);
|
||||
|
||||
// alternate item background
|
||||
if (WASABI_API_SKIN->skin_getColorElementRef(L"wasabi.list.background.alternate"))
|
||||
ptr[92] = RGBTOBGR(SkinColor(L"wasabi.list.background.alternate"));
|
||||
else
|
||||
ptr[92] = ptr[48];
|
||||
|
||||
// alternate item foreground
|
||||
if (WASABI_API_SKIN->skin_getColorElementRef(L"wasabi.list.text.alternate"))
|
||||
{
|
||||
ptr[50] = RGBTOBGR(SkinColor(L"wasabi.list.text.alternate"));
|
||||
if (interpolate) {
|
||||
int c = ptr[94];
|
||||
c = lumidiff(c, listbkg) < 0x1F ? Blenders::BLEND_AVG(ptr[94], 0xFF7F7F7F) : c;
|
||||
c = lumidiff(c, listbkg) < 0x1F ? Blenders::BLEND_AVG(ptr[94], 0xFF101010) : c;
|
||||
ptr[94] = c | 0xFF000000;
|
||||
}
|
||||
}
|
||||
else {
|
||||
ptr[94] = ptr[50];
|
||||
}
|
||||
|
||||
return CreateBitmapDIB(132, 75, 1, 32, c.getBits());
|
||||
}
|
||||
|
||||
void ff_ipc_genSkinBitmap(ff_skinbitmap *sb) {
|
||||
if (sb == NULL) return;
|
||||
switch (sb->id) {
|
||||
case SKINBITMAP_BUTTON: {
|
||||
HBITMAP bmp = generateButtonBitmap(sb->w, sb->h, sb->state);
|
||||
sb->bitmap = bmp;
|
||||
break;
|
||||
}
|
||||
case SKINBITMAP_SCROLLBARVBUTTON: {
|
||||
HBITMAP bmp = generateButtonBitmap(sb->w, sb->h, sb->state, L"wasabi.scrollbar.vertical.grip");
|
||||
sb->bitmap = bmp;
|
||||
break;
|
||||
}
|
||||
case SKINBITMAP_SCROLLBARHBUTTON: {
|
||||
HBITMAP bmp = generateButtonBitmap(sb->w, sb->h, sb->state, L"wasabi.scrollbar.horizontal.grip");
|
||||
sb->bitmap = bmp;
|
||||
break;
|
||||
}
|
||||
case SKINBITMAP_SCROLLBARUPBUTTON: {
|
||||
HBITMAP bmp = generateButtonBitmap(sb->w, sb->h, sb->state, L"wasabi.button.label.arrow.up");
|
||||
sb->bitmap = bmp;
|
||||
break;
|
||||
}
|
||||
case SKINBITMAP_SCROLLBARDOWNBUTTON: {
|
||||
HBITMAP bmp = generateButtonBitmap(sb->w, sb->h, sb->state, L"wasabi.button.label.arrow.down");
|
||||
sb->bitmap = bmp;
|
||||
break;
|
||||
}
|
||||
case SKINBITMAP_SCROLLBARLEFTBUTTON: {
|
||||
HBITMAP bmp = generateButtonBitmap(sb->w, sb->h, sb->state, L"wasabi.button.label.arrow.left");
|
||||
sb->bitmap = bmp;
|
||||
break;
|
||||
}
|
||||
case SKINBITMAP_SCROLLBAR_FF_UPBUTTON: {
|
||||
HBITMAP bmp = generateButtonBitmap(sb->w, sb->h, SCROLLBARSTATE_NORMAL,
|
||||
((sb->state==SCROLLBARSTATE_PRESSED)?L"wasabi.scrollbar.vertical.left.pressed":
|
||||
((sb->state==SCROLLBARSTATE_HOVER)?L"wasabi.scrollbar.vertical.left.hover":
|
||||
L"wasabi.scrollbar.vertical.left")));
|
||||
sb->bitmap = bmp;
|
||||
break;
|
||||
}
|
||||
case SKINBITMAP_SCROLLBAR_FF_DOWNBUTTON: {
|
||||
HBITMAP bmp = generateButtonBitmap(sb->w, sb->h, SCROLLBARSTATE_NORMAL,
|
||||
((sb->state==SCROLLBARSTATE_PRESSED)?L"wasabi.scrollbar.vertical.right.pressed":
|
||||
((sb->state==SCROLLBARSTATE_HOVER)?L"wasabi.scrollbar.vertical.right.hover":
|
||||
L"wasabi.scrollbar.vertical.right")));
|
||||
sb->bitmap = bmp;
|
||||
break;
|
||||
}
|
||||
case SKINBITMAP_SCROLLBAR_FF_LEFTBUTTON: {
|
||||
HBITMAP bmp = generateButtonBitmap(sb->w, sb->h, SCROLLBARSTATE_NORMAL,
|
||||
((sb->state==SCROLLBARSTATE_PRESSED)?L"wasabi.scrollbar.horizontal.left.pressed":
|
||||
((sb->state==SCROLLBARSTATE_HOVER)?L"wasabi.scrollbar.horizontal.left.hover":
|
||||
L"wasabi.scrollbar.horizontal.left")));
|
||||
sb->bitmap = bmp;
|
||||
break;
|
||||
}
|
||||
case SKINBITMAP_SCROLLBAR_FF_RIGHTBUTTON: {
|
||||
HBITMAP bmp = generateButtonBitmap(sb->w, sb->h, SCROLLBARSTATE_NORMAL,
|
||||
((sb->state==SCROLLBARSTATE_PRESSED)?L"wasabi.scrollbar.horizontal.right.pressed":
|
||||
((sb->state==SCROLLBARSTATE_HOVER)?L"wasabi.scrollbar.horizontal.right.hover":
|
||||
L"wasabi.scrollbar.horizontal.right")));
|
||||
sb->bitmap = bmp;
|
||||
break;
|
||||
}
|
||||
case SKINBITMAP_SCROLLBAR_FF_BARHBUTTON: {
|
||||
HBITMAP bmp = generateButtonBitmap(sb->w, sb->h, SCROLLBARSTATE_NORMAL,
|
||||
((sb->state==SCROLLBARSTATE_PRESSED)?L"wasabi.scrollbar.horizontal.button.pressed":
|
||||
((sb->state==SCROLLBARSTATE_HOVER)?L"wasabi.scrollbar.horizontal.button.hover":
|
||||
L"wasabi.scrollbar.horizontal.button")));
|
||||
sb->bitmap = bmp;
|
||||
break;
|
||||
}
|
||||
case SKINBITMAP_SCROLLBAR_FF_BARVBUTTON: {
|
||||
HBITMAP bmp = generateButtonBitmap(sb->w, sb->h, SCROLLBARSTATE_NORMAL,
|
||||
((sb->state==SCROLLBARSTATE_PRESSED)?L"wasabi.scrollbar.vertical.button.pressed":
|
||||
((sb->state==SCROLLBARSTATE_HOVER)?L"wasabi.scrollbar.vertical.button.hover":
|
||||
L"wasabi.scrollbar.vertical.button.pressed")));
|
||||
sb->bitmap = bmp;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#if 0 // debug
|
||||
|
||||
HDC ddc = GetDC(NULL);
|
||||
HDC sdc = CreateCompatibleDC(ddc);
|
||||
SelectObject(sdc, sb->bitmap);
|
||||
|
||||
BitBlt(ddc, 100, 100, sb->w, sb->h, sdc, 0, 0, SRCCOPY);
|
||||
|
||||
DeleteObject(sdc);
|
||||
ReleaseDC(NULL, ddc);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
ColorThemeMonitor::ColorThemeMonitor() {
|
||||
WASABI_API_SYSCB->syscb_registerCallback(this);
|
||||
}
|
||||
|
||||
ColorThemeMonitor::~ColorThemeMonitor() {
|
||||
WASABI_API_SYSCB->syscb_deregisterCallback(this);
|
||||
}
|
||||
|
||||
int ColorThemeMonitor::skincb_onColorThemeChanged( const wchar_t *colortheme )
|
||||
{
|
||||
SendMessageW( wa2.getMainWindow(), WM_WA_IPC, (WPARAM) colortheme, IPC_FF_ONCOLORTHEMECHANGED );
|
||||
return 1;
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
#ifndef _FF_IPC_H
|
||||
#define _FF_IPC_H
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
// ----- IPC_FF_GETSKINCOLOR : Ask for a skin color -- the color is filtered for the current theme -----
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
|
||||
#define IPC_FF_GETSKINCOLOR IPC_FF_FIRST + 1 // data = ff_skincolor struct with .colorname, fills in .color
|
||||
|
||||
typedef struct {
|
||||
char colorname[256];
|
||||
COLORREF color;
|
||||
} ff_skincolor;
|
||||
|
||||
// List of default colors as of june 30, 2003. see freeform/xml/wasabi/xml/system-colors.xml for latest/complete list
|
||||
|
||||
// Trees
|
||||
#define SKINCOLOR_TREE_ITEMTEXT "wasabi.tree.text"
|
||||
#define SKINCOLOR_TREE_SELITEMBKG L"wasabi.tree.selected"
|
||||
#define SKINCOLOR_TREE_HILITEDROP "wasabi.tree.hiliteddrop"
|
||||
|
||||
// Lists
|
||||
#define SKINCOLOR_LIST_ITEMTEXT L"wasabi.list.text"
|
||||
#define SKINCOLOR_LIST_SELITEMBKG "wasabi.list.item.selected"
|
||||
#define SKINCOLOR_LIST_FOCUSITEMBKG "wasabi.list.item.focused"
|
||||
#define SKINCOLOR_LIST_COLUMNBKG L"wasabi.list.column.background"
|
||||
#define SKINCOLOR_LIST_COLUMNTEXT L"wasabi.list.column.text"
|
||||
#define SKINCOLOR_LIST_SELITEMTEXT "wasabi.list.item.selected.fg"
|
||||
#define SKINCOLOR_LIST_COLUMNSEPARATOR "wasabi.list.column.separator"
|
||||
|
||||
// Buttons
|
||||
#define SKINCOLOR_BUTTON_TEXT L"wasabi.button.text"
|
||||
#define SKINCOLOR_BUTTON_HILITETEXT "wasabi.button.hiliteText"
|
||||
#define SKINCOLOR_BUTTON_DIMMEDTEXT "wasabi.button.dimmedText"
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
// ----- IPC_FF_GENSKINBITMAP: Ask gen_ff to create a bitmap of various skin elements -----
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
// NOTE: You should free the hbitmap eventually using DeleteObject
|
||||
|
||||
#define IPC_FF_GENSKINBITMAP IPC_FF_FIRST + 2 // data = ff_skinbitmap with bitmap .id .w .h and .state, fills in .bitmap
|
||||
|
||||
typedef struct {
|
||||
int id; // see below
|
||||
int w, h;
|
||||
int state; // id specific, see below
|
||||
HBITMAP bitmap;
|
||||
} ff_skinbitmap;
|
||||
|
||||
// Bitmap IDs :
|
||||
|
||||
#define SKINBITMAP_BUTTON 0 // Generate a button bitmap. states are as follows :
|
||||
|
||||
#define BUTTONSTATE_NORMAL 0
|
||||
#define BUTTONSTATE_PUSHED 1
|
||||
|
||||
#define SKINBITMAP_SCROLLBARUPBUTTON 1 // Generate a scrollbar up button bitmap. states are button states
|
||||
#define SKINBITMAP_SCROLLBARDOWNBUTTON 2 // Generate a scrollbar down button bitmap. states are button states
|
||||
#define SKINBITMAP_SCROLLBARLEFTBUTTON 3 // Generate a scrollbar left button bitmap. states are button states
|
||||
#define SKINBITMAP_SCROLLBARRIGHTBUTTON 4 // Generate a scrollbar right button bitmap. states are button states
|
||||
#define SKINBITMAP_SCROLLBARVBUTTON 5 // Generate a scrollbar vertical button bitmap. states are button states
|
||||
#define SKINBITMAP_SCROLLBARHBUTTON 6 // Generate a scrollbar horizontal button bitmap. states are button states
|
||||
|
||||
#define SKINBITMAP_SCROLLBAR_FF_UPBUTTON 7 // Generate a freeform scrollbar up button bitmap. states are scrollbar states
|
||||
#define SKINBITMAP_SCROLLBAR_FF_DOWNBUTTON 8 // Generate a freeform scrollbar down button bitmap. states are scrollbar states
|
||||
#define SKINBITMAP_SCROLLBAR_FF_LEFTBUTTON 9 // Generate a freeform scrollbar left button bitmap. states are scrollbar states
|
||||
#define SKINBITMAP_SCROLLBAR_FF_RIGHTBUTTON 10 // Generate a freeform scrollbar right button bitmap. states are scrollbar states
|
||||
#define SKINBITMAP_SCROLLBAR_FF_BARHBUTTON 11 // Generate a freeform scrollbar vertical button bitmap. states are scrollbar states
|
||||
#define SKINBITMAP_SCROLLBAR_FF_BARVBUTTON 12 // Generate a freeform scrollbar horizontal button bitmap. states are scrollbar states
|
||||
|
||||
#define SCROLLBARSTATE_NORMAL 0
|
||||
#define SCROLLBARSTATE_PRESSED 1
|
||||
#define SCROLLBARSTATE_HOVER 2
|
||||
|
||||
// -----------------------------------------------------------------------------------------------
|
||||
// ----- IPC_FF_ONCOLORTHEMECHANGED: CALLBACK - sent when the skin's color theme has changed -----
|
||||
// -----------------------------------------------------------------------------------------------
|
||||
|
||||
#define IPC_FF_ONCOLORTHEMECHANGED IPC_FF_FIRST + 3 // data = name of the new color theme (const char *)
|
||||
#define IPC_FF_ISMAINWND IPC_FF_FIRST + 4 // data = hwnd, returns 1 if hwnd is main window or any of its windowshade
|
||||
#define IPC_FF_GETCONTENTWND IPC_FF_FIRST + 5 // data = HWND, returns the wa2 window that is embedded in the window's container (ie if hwnd is the pledit windowshade hwnd, it returns the wa2 pledit hwnd). if no content is found (ie, the window has nothing embedded) it returns the parameter you gave it
|
||||
#define IPC_FF_NOTIFYHOTKEY IPC_FF_FIRST + 6 // data = const char * to hotkey description
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,174 @@
|
||||
#include "precomp__gen_ff.h"
|
||||
#include "fsmonitor.h"
|
||||
|
||||
#define tag L"wa5_fsmonitorclass"
|
||||
|
||||
LRESULT CALLBACK fsMonitorWndProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
extern HINSTANCE hInstance;
|
||||
//------------------------------------------------------------------------
|
||||
FullScreenMonitor::FullScreenMonitor()
|
||||
{
|
||||
m_go_fs_timer_set = 0;
|
||||
m_cancel_fs_timer_set = 0;
|
||||
m_fs = 0;
|
||||
WNDCLASSW wc;
|
||||
if (!GetClassInfoW( hInstance, tag, &wc ))
|
||||
{
|
||||
MEMSET( &wc, 0, sizeof( wc ) );
|
||||
wc.lpfnWndProc = fsMonitorWndProc;
|
||||
wc.hInstance = hInstance; // hInstance of DLL
|
||||
wc.lpszClassName = tag; // our window class name
|
||||
wc.style = 0;
|
||||
|
||||
int _r = RegisterClassW( &wc );
|
||||
ASSERTPR( _r, "cannot create fsmonitor wndclass" );
|
||||
}
|
||||
|
||||
hWnd = CreateWindowExW( 0, tag, L"", 0, 0, 0, 1, 1, NULL, NULL, hInstance, NULL );
|
||||
|
||||
ASSERT( hWnd );
|
||||
|
||||
SetWindowLongPtrW( hWnd, GWLP_USERDATA, (LONG_PTR) this );
|
||||
|
||||
APPBARDATA abd;
|
||||
|
||||
abd.cbSize = sizeof( APPBARDATA );
|
||||
abd.hWnd = hWnd;
|
||||
abd.uCallbackMessage = APPBAR_CALLBACK;
|
||||
|
||||
SHAppBarMessage( ABM_NEW, &abd );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
FullScreenMonitor::~FullScreenMonitor()
|
||||
{
|
||||
APPBARDATA abd;
|
||||
|
||||
abd.cbSize = sizeof( APPBARDATA );
|
||||
abd.hWnd = hWnd;
|
||||
|
||||
SHAppBarMessage( ABM_REMOVE, &abd );
|
||||
|
||||
if (IsWindow( hWnd ))
|
||||
DestroyWindow( hWnd );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
void FullScreenMonitor::registerCallback( FSCallback *cb )
|
||||
{
|
||||
if (m_callbacks.haveItem( cb )) return;
|
||||
m_callbacks.addItem( cb );
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
void FullScreenMonitor::unregisterCallback( FSCallback *cb )
|
||||
{
|
||||
m_callbacks.removeItem( cb );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
void FullScreenMonitor::onGoFullscreen()
|
||||
{
|
||||
if (m_cancel_fs_timer_set)
|
||||
{
|
||||
timerclient_killTimer( 2 );
|
||||
m_cancel_fs_timer_set = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
timerclient_setTimer( 1, 250 );
|
||||
m_go_fs_timer_set = 1;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
void FullScreenMonitor::onCancelFullscreen()
|
||||
{
|
||||
if (m_go_fs_timer_set)
|
||||
{
|
||||
timerclient_killTimer( 1 );
|
||||
m_go_fs_timer_set = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
timerclient_setTimer( 2, 250 );
|
||||
m_cancel_fs_timer_set = 1;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
void FullScreenMonitor::sendGoFSCallbacks()
|
||||
{
|
||||
foreach( m_callbacks );
|
||||
m_callbacks.getfor()->onGoFullscreen();
|
||||
endfor;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
void FullScreenMonitor::sendCancelFSCallbacks()
|
||||
{
|
||||
foreach( m_callbacks );
|
||||
m_callbacks.getfor()->onCancelFullscreen();
|
||||
endfor;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
void FullScreenMonitor::timerclient_timerCallback( int id )
|
||||
{
|
||||
if (id == 1)
|
||||
{
|
||||
timerclient_killTimer( 1 );
|
||||
m_go_fs_timer_set = 0;
|
||||
sendGoFSCallbacks();
|
||||
}
|
||||
else if (id == 2)
|
||||
{
|
||||
timerclient_killTimer( 2 );
|
||||
m_cancel_fs_timer_set = 0;
|
||||
sendCancelFSCallbacks();
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
int FullScreenMonitor::wndProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
switch (uMsg)
|
||||
{
|
||||
case APPBAR_CALLBACK:
|
||||
{
|
||||
switch (wParam)
|
||||
{
|
||||
case ABN_FULLSCREENAPP:
|
||||
//DebugString("ABN_FULLSCREENAPP\n");
|
||||
if (lParam && !m_fs)
|
||||
{
|
||||
m_fs = 1;
|
||||
onGoFullscreen();
|
||||
}
|
||||
else if (!lParam && m_fs)
|
||||
{
|
||||
m_fs = 0;
|
||||
onCancelFullscreen();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return DefWindowProc( hwnd, uMsg, wParam, lParam );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
LRESULT CALLBACK fsMonitorWndProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
#ifdef WIN32
|
||||
FullScreenMonitor *gThis = (FullScreenMonitor *) GetWindowLongPtrW( hwnd, GWLP_USERDATA );
|
||||
if (!gThis)
|
||||
return DefWindowProc( hwnd, uMsg, wParam, lParam );
|
||||
else
|
||||
return gThis->wndProc( hwnd, uMsg, wParam, lParam );
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
#ifndef _FS_MONITOR_H
|
||||
#define _FS_MONITOR_H
|
||||
|
||||
#include <bfc/ptrlist.h>
|
||||
#include <api/timer/timerclient.h>
|
||||
|
||||
class FSCallback {
|
||||
public:
|
||||
virtual void onGoFullscreen()=0;
|
||||
virtual void onCancelFullscreen()=0;
|
||||
};
|
||||
|
||||
class FullScreenMonitor : public TimerClientDI {
|
||||
public:
|
||||
FullScreenMonitor();
|
||||
virtual ~FullScreenMonitor();
|
||||
|
||||
void registerCallback(FSCallback *cb);
|
||||
void unregisterCallback(FSCallback *cb);
|
||||
|
||||
int isFullScreen() { return m_fs; }
|
||||
|
||||
int wndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
void timerclient_timerCallback(int id);
|
||||
|
||||
private:
|
||||
void onGoFullscreen();
|
||||
void onCancelFullscreen();
|
||||
void sendGoFSCallbacks();
|
||||
void sendCancelFSCallbacks();
|
||||
PtrList<FSCallback> m_callbacks;
|
||||
HWND hWnd;
|
||||
int m_fs;
|
||||
int m_go_fs_timer_set;
|
||||
int m_cancel_fs_timer_set;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1 @@
|
||||
#include "../Winamp/gen.h"
|
||||
@@ -0,0 +1,543 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""gen_ff.rc2""\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_PREFS_GENERAL DIALOGEX 0, 0, 261, 228
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
GROUPBOX "Desktop Alpha Blending",IDC_STATIC_DA1,4,3,256,48
|
||||
LTEXT "Desktop Alpha Blending allows some skins to display subtle shadows, smoothed edges, and other visual enhancements.",IDC_STATIC,9,15,244,16
|
||||
CONTROL "Enable Desktop Alpha Blending (when requested by the skin)",IDC_CHECK_DESKTOPALPHA,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,35,210,10
|
||||
GROUPBOX "Timers Resolution : 33ms",IDC_STATIC_TIMERRES,4,54,256,37
|
||||
CONTROL "Slider1",IDC_SLIDER_TIMERRESOLUTION,"msctls_trackbar32",TBS_AUTOTICKS | TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,9,66,190,10
|
||||
PUSHBUTTON "Optimize...",IDC_BUTTON_AUTOTIMERRES,201,63,52,13
|
||||
LTEXT "Smoother",IDC_STATIC,12,76,32,8
|
||||
RTEXT "Choppier",IDC_STATIC,165,76,30,8
|
||||
GROUPBOX "Text Scroll Speed : Average",IDC_STATIC_TICKER,4,94,256,34
|
||||
CONTROL "Slider1",IDC_SLIDER_TICKERSPEED,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,9,105,111,10
|
||||
LTEXT "Faster",IDC_STATIC,11,114,22,8
|
||||
LTEXT "Slower",IDC_STATIC,100,114,23,8,0,WS_EX_RIGHT
|
||||
LTEXT "Move text by",IDC_STATIC,145,106,44,8
|
||||
EDITTEXT IDC_EDIT_INCREMENT,190,104,30,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "",IDC_SPIN_INCREMENT,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,209,103,10,14
|
||||
LTEXT "pixels",IDC_STATIC,225,106,19,8
|
||||
GROUPBOX "Miscellaneous",IDC_STATIC,4,131,256,86
|
||||
CONTROL "Enable tooltips",IDC_CHECK_TOOLTIPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,144,65,10
|
||||
CONTROL "Dock windows at ",IDC_CHECK_DOCKING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,156,67,11
|
||||
EDITTEXT IDC_EDIT_DOCKDISTANCE,79,155,30,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "",IDC_SPIN_DOCKDISTANCE,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,97,154,10,14
|
||||
LTEXT "pixels",IDC_STATIC,111,157,18,8
|
||||
CONTROL "Dock toolbars at ",IDC_CHECK_DOCKING2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,170,67,11
|
||||
EDITTEXT IDC_EDIT_DOCKDISTANCE2,79,169,30,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "",IDC_SPIN_DOCKDISTANCE2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,97,168,11,14
|
||||
LTEXT "pixels",IDC_STATIC,111,171,18,8
|
||||
LTEXT "Wait",IDC_STATIC,11,186,16,8
|
||||
EDITTEXT IDC_EDIT_SHOWTIME,30,184,35,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "",IDC_SPIN_SHOWTIME,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,50,183,10,14
|
||||
LTEXT "ms before showing docked toolbars",IDC_STATIC,70,186,114,8
|
||||
LTEXT "Wait",IDC_STATIC,11,201,16,8
|
||||
EDITTEXT IDC_EDIT_HIDETIME,30,199,35,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "",IDC_SPIN_HIDETIME,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,49,198,10,14
|
||||
LTEXT "ms before hiding docked toolbars",IDC_STATIC,70,201,106,8
|
||||
END
|
||||
|
||||
IDD_PREFS DIALOGEX 0, 0, 271, 246
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
CONTROL "Tab1",IDC_TAB1,"SysTabControl32",WS_TABSTOP,0,0,271,246
|
||||
END
|
||||
|
||||
IDD_PREFS_THEMES DIALOGEX 0, 0, 261, 228
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
LISTBOX IDC_LIST1,4,6,256,203,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "&Set Theme",IDC_BUTTON_SETTHEME,210,212,50,13
|
||||
END
|
||||
|
||||
IDD_ABOUT DIALOGEX 0, 0, 278, 175
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION
|
||||
CAPTION "About"
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,220,157,50,13
|
||||
CONTROL "",IDC_STATIC_GROUP,"Static",SS_BLACKFRAME | SS_SUNKEN,7,7,263,146
|
||||
END
|
||||
|
||||
IDD_AUTOTIMERRES DIALOGEX 0, 0, 195, 90
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Auto Detection of Optimum Timers Resolution"
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Go",IDOK,85,70,50,13
|
||||
PUSHBUTTON "Cancel",IDCANCEL,138,70,50,13
|
||||
CTEXT "Auto detection works best if other applications are not saturating the CPU.\n\nBefore you continue, please start playing a song.\n\nPress Go when ready.\n(animations will temporarily slow down)",IDC_TXT,7,7,181,57
|
||||
END
|
||||
|
||||
IDD_CUSTOMSCALE DIALOGEX 0, 0, 165, 70
|
||||
STYLE DS_SYSMODAL | DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
CAPTION "Custom Scale"
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "Scale : 100%",IDC_STATIC_SCALE,7,7,151,37
|
||||
CONTROL "Slider1",IDC_SLIDER_CUSTOMSCALE,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,13,17,139,11
|
||||
LTEXT "10%",IDC_STATIC,17,30,18,8
|
||||
LTEXT "300%",IDC_STATIC,130,30,21,8
|
||||
DEFPUSHBUTTON "OK",IDOK,54,50,50,13
|
||||
PUSHBUTTON "Cancel",IDCANCEL,108,50,50,13
|
||||
END
|
||||
|
||||
IDD_PREFS_FONTS DIALOGEX 0, 0, 261, 228
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
CONTROL "Use FreeType TrueType font rendering for older skins",IDC_CHECK_FREETYPETTF,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,4,191,10
|
||||
LTEXT "Charmap Encoding :",IDC_STATIC_CHARMAP,15,18,65,8
|
||||
COMBOBOX IDC_COMBO_CHARMAP,85,16,170,235,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
GROUPBOX "Alternate Fonts",IDC_STATIC_ALTFONTS,4,33,256,40
|
||||
CONTROL "Use the alternate fonts if the skin defines them",IDC_CHECK_ALTFONTS,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,45,169,10
|
||||
CONTROL "Keep primary font in strings that contain only 7-bit characters",IDC_CHECK_NO_ALT_7BIT_OVERRIDE,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,58,215,10
|
||||
GROUPBOX "Font Mapper",IDC_STATIC,4,76,256,105
|
||||
CONTROL "Use skin font mapper",IDC_CHECK_USEFONTMAPPER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,88,85,10
|
||||
PUSHBUTTON "Configure skin font mapping...",IDC_BUTTON_FONTMAPPER,133,86,120,13
|
||||
CONTROL "Allow use of bitmap fonts that have not been mapped",IDC_CHECK_ALLOWBITMAPFONTS,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,101,188,10
|
||||
LTEXT "Replace with :",IDC_STATIC,17,128,46,8
|
||||
GROUPBOX "TrueType Replacement for Winamp Charset bitmap fonts",IDC_STATIC_TTFOVERRIDE,10,114,244,62
|
||||
COMBOBOX IDC_COMBO_TTFOVERRIDE,67,126,179,151,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "Slider1",IDC_SLIDER_SCALETTFOVERRIDE,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,16,142,231,10
|
||||
LTEXT "Decrease size",IDC_STATIC_DECREASESIZE,20,151,46,8
|
||||
CTEXT "100%",IDC_STATIC_TTFSCALE,118,151,31,8
|
||||
LTEXT "Increase size",IDC_STATIC_INCREASESIZE,201,151,42,8
|
||||
CONTROL "Keep bitmap font in strings that contain only 7-bit characters",IDC_NO_7BIT_OVERRIDE,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,162,210,10
|
||||
GROUPBOX "Default / Fallback Font",IDC_STATIC,4,185,256,43
|
||||
LTEXT "If a font was not specified or cannot be found, use this font at this scale :",IDC_STATIC,10,196,243,8
|
||||
COMBOBOX IDC_COMBO_DEFAULTFONT,9,209,100,151,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "Slider1",IDC_SLIDER_SCALEDEFAULTFONT,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,116,206,139,10
|
||||
LTEXT "Decrease size",IDC_STATIC_DECREASESIZE2,119,214,46,8
|
||||
CTEXT "100%",IDC_STATIC_SCALEDEFAULTFONT,172,214,31,8
|
||||
LTEXT "Increase size",IDC_STATIC_INCREASESIZE2,210,214,42,8
|
||||
CTEXT "100%",IDC_STATIC_SCALEDEFAULTFONT2,174,214,31,8
|
||||
END
|
||||
|
||||
IDD_PREFS_WINDOWS DIALOGEX 0, 0, 260, 228
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
GROUPBOX "Scaling",IDC_STATIC,4,3,256,76
|
||||
CONTROL "Link all windows in all skins:",IDC_CHECK_LINKALLRATIO,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,15,103,10
|
||||
CTEXT "100%",IDC_STATIC_SCALE,159,10,51,8
|
||||
LTEXT "10%",IDC_STATIC_SCALE11,124,17,16,8
|
||||
CONTROL "",IDC_SLIDER_CUSTOMSCALE,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,142,18,84,10
|
||||
LTEXT "300%",IDC_STATIC_SCALE301,227,17,20,8
|
||||
CONTROL "WindowShade scale follows Normal Window Scale",IDC_CHECK_LINKRATIO,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,28,173,10
|
||||
GROUPBOX "On Window Close/Reopen",IDC_STATIC,10,41,244,32
|
||||
COMBOBOX IDC_COMBO_SCALE,16,54,232,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
GROUPBOX "Opacity",IDC_STATIC_OPACITY,4,81,256,138
|
||||
CONTROL "Link all windows in all skins:",IDC_CHECK_LINKALLALPHA,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,92,102,10
|
||||
COMBOBOX IDC_COMBO_OPACITY,11,106,98,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "Slider1",IDC_SLIDER_CUSTOMALPHA,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,114,106,140,10
|
||||
LTEXT "Transparent",IDC_STATIC_TRANSP,117,116,40,8
|
||||
CTEXT "100%",IDC_STATIC_ALPHA,176,116,28,8
|
||||
LTEXT "Opaque",IDC_STATIC_OPAQUE,223,116,26,8
|
||||
CONTROL "WindowShade opacity follows Normal Window opacity",IDC_CHECK_LINKALPHA,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,128,186,10
|
||||
GROUPBOX "Auto Opaque",IDC_STATIC_AUTOON,10,142,244,71
|
||||
LTEXT "To use Auto Opaque on a window without linking all of them, use the context menu on that window and select Window Settings, Opacity.",IDC_STATIC_AUTOONTXT,15,153,224,18
|
||||
LTEXT "Fade in :",IDC_STATIC_FADEIN2,15,174,28,8
|
||||
CONTROL "Slider1",IDC_SLIDER_FADEIN,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,51,175,102,10
|
||||
LTEXT "250ms",IDC_STATIC_FADEIN,154,174,31,8
|
||||
LTEXT "Hold :",IDC_STATIC_HOLD2,15,186,22,8
|
||||
CONTROL "Slider1",IDC_SLIDER_HOLD,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,51,186,102,10
|
||||
LTEXT "2000ms",IDC_STATIC_HOLD,154,186,32,8
|
||||
LTEXT "Fade out :",IDC_STATIC_FADEOUT2,15,198,34,8
|
||||
CONTROL "Slider1",IDC_SLIDER_FADEOUT,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,51,198,102,10
|
||||
LTEXT "2000ms",IDC_STATIC_FADEOUT,154,198,32,8
|
||||
GROUPBOX "Extend Hover",IDC_STATIC_EXTENDBOX,183,177,64,30
|
||||
EDITTEXT IDC_EDIT_EXTEND,189,189,30,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "",IDC_SPIN_EXTEND,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,211,188,10,14
|
||||
LTEXT "pixels",IDC_STATIC_EXTEND,224,191,19,8
|
||||
END
|
||||
|
||||
IDD_CUSTOMALPHA DIALOGEX 0, 0, 165, 70
|
||||
STYLE DS_SYSMODAL | DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_TOOLWINDOW
|
||||
CAPTION "Custom Opacity"
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "Opacity : 100%",IDC_STATIC_ALPHA,7,7,151,37
|
||||
CONTROL "Slider1",IDC_SLIDER_CUSTOMALPHA,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,13,17,139,11
|
||||
LTEXT "10%",IDC_STATIC,17,30,18,8
|
||||
LTEXT "100%",IDC_STATIC,130,30,21,8
|
||||
DEFPUSHBUTTON "OK",IDOK,54,50,50,13
|
||||
PUSHBUTTON "Cancel",IDCANCEL,108,50,50,13
|
||||
END
|
||||
|
||||
IDD_FONTMAPPER DIALOGEX 0, 0, 277, 169
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Font Mapper"
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
CONTROL "List2",IDC_LIST_MAPPINGS,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP,7,7,263,80
|
||||
LTEXT "Map when using:",IDC_STATIC,9,91,35,18
|
||||
CONTROL "This skin",IDC_RADIO_THISSKIN,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,47,92,44,8
|
||||
CONTROL "All skins",IDC_RADIO_ALLSKINS,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,47,101,41,8
|
||||
LTEXT "Map font :",IDC_STATIC,9,114,33,8
|
||||
COMBOBOX IDC_COMBO_SKINFONTS,46,112,132,122,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Into :",IDC_STATIC,9,128,33,8
|
||||
COMBOBOX IDC_COMBO_FONTS,46,126,132,122,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Scale :",IDC_STATIC,9,144,23,8
|
||||
CONTROL "Slider1",IDC_SLIDER_SCALE,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,42,144,140,10
|
||||
LTEXT "Decrease size",IDC_STATIC,43,154,46,8
|
||||
LTEXT "100%",IDC_STATIC_SCALE,104,155,20,8
|
||||
LTEXT "Increase size",IDC_STATIC,138,154,42,8
|
||||
PUSHBUTTON "Delete",IDC_BUTTON_DEL,212,90,58,13
|
||||
PUSHBUTTON "Set",IDC_BUTTON_SET,212,111,58,13
|
||||
PUSHBUTTON "New",IDC_BUTTON_NEW,212,127,58,13
|
||||
DEFPUSHBUTTON "Close",IDOK,220,149,50,13
|
||||
END
|
||||
|
||||
IDD_PREFS_SKIN DIALOGEX 0, 0, 261, 228
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
LTEXT "",IDC_STATIC_GROUP,4,6,256,200,0,WS_EX_CLIENTEDGE
|
||||
CTEXT "-",IDC_STATIC_EMPTY,34,23,192,162
|
||||
PUSHBUTTON "Skin Options Menu",IDC_BUTTON_SKINSPECIFIC,74,212,114,13
|
||||
END
|
||||
|
||||
IDD_MEDIA_DOWNLOADER DIALOGEX 0, 0, 307, 59
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "Download"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
LTEXT "",IDC_URL,7,7,293,10
|
||||
LTEXT "",IDC_PROGRESS,7,28,293,8
|
||||
LTEXT "",IDC_DOWNLOADTO,7,44,293,8
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_PREFS_GENERAL, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 4
|
||||
RIGHTMARGIN, 260
|
||||
END
|
||||
|
||||
IDD_PREFS_THEMES, DIALOG
|
||||
BEGIN
|
||||
RIGHTMARGIN, 260
|
||||
END
|
||||
|
||||
IDD_ABOUT, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 270
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 170
|
||||
END
|
||||
|
||||
IDD_AUTOTIMERRES, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 188
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 83
|
||||
END
|
||||
|
||||
IDD_CUSTOMSCALE, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 158
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 63
|
||||
END
|
||||
|
||||
IDD_PREFS_FONTS, DIALOG
|
||||
BEGIN
|
||||
RIGHTMARGIN, 260
|
||||
END
|
||||
|
||||
IDD_CUSTOMALPHA, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 158
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 63
|
||||
END
|
||||
|
||||
IDD_FONTMAPPER, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 270
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 162
|
||||
END
|
||||
|
||||
IDD_MEDIA_DOWNLOADER, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 300
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 52
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Menu
|
||||
//
|
||||
|
||||
IDR_CONTROLMENU MENU
|
||||
BEGIN
|
||||
POPUP "ControlMenu"
|
||||
BEGIN
|
||||
POPUP "&Opacity"
|
||||
BEGIN
|
||||
MENUITEM "1&00%", ID_CONTROLMENU_OPACITY_100
|
||||
MENUITEM "&90%", ID_CONTROLMENU_OPACITY_90
|
||||
MENUITEM "&80%", ID_CONTROLMENU_OPACITY_80
|
||||
MENUITEM "&70%", ID_CONTROLMENU_OPACITY_70
|
||||
MENUITEM "&60%", ID_CONTROLMENU_OPACITY_60
|
||||
MENUITEM "&50%", ID_CONTROLMENU_OPACITY_50
|
||||
MENUITEM "&40%", ID_CONTROLMENU_OPACITY_40
|
||||
MENUITEM "&30%", ID_CONTROLMENU_OPACITY_30
|
||||
MENUITEM "&20%", ID_CONTROLMENU_OPACITY_20
|
||||
MENUITEM "&10%", ID_CONTROLMENU_OPACITY_10
|
||||
MENUITEM "&Custom", ID_CONTROLMENU_OPACITY_CUSTOM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Opaque on &Focus", ID_CONTROLMENU_OPACITY_AUTO100_FOCUS
|
||||
MENUITEM "Opaque on &Hover", ID_CONTROLMENU_OPACITY_AUTO100_HOVER
|
||||
END
|
||||
POPUP "&Scaling"
|
||||
BEGIN
|
||||
MENUITEM "&50%", ID_CONTROLMENU_SCALING_50
|
||||
MENUITEM "&75%", ID_CONTROLMENU_SCALING_75
|
||||
MENUITEM "&100%", ID_CONTROLMENU_SCALING_100
|
||||
MENUITEM "125%", ID_CONTROLMENU_SCALING_125
|
||||
MENUITEM "150%", ID_CONTROLMENU_SCALING_150
|
||||
MENUITEM "&200%", ID_CONTROLMENU_SCALING_200
|
||||
MENUITEM "250%", ID_CONTROLMENU_SCALING_250
|
||||
MENUITEM "&300%", ID_CONTROLMENU_SCALING_300
|
||||
MENUITEM "&Custom", ID_CONTROLMENU_SCALING_CUSTOM
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Locked", ID_CONTROLMENU_SCALING_LOCKED
|
||||
MENUITEM "&Temporary", ID_CONTROLMENU_SCALING_FOLLOWDOUBLESIZE
|
||||
END
|
||||
POPUP "Docked Toolbar"
|
||||
BEGIN
|
||||
MENUITEM "Auto-&Hide", ID_CONTROLMENU_TOOLBAR_AUTOHIDE
|
||||
MENUITEM "&Always On Top", ID_CONTROLMENU_TOOLBAR_ALWAYSONTOP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Top", ID_CONTROLMENU_TOOLBAR_TOP
|
||||
MENUITEM "Left", ID_CONTROLMENU_TOOLBAR_LEFT
|
||||
MENUITEM "Right", ID_CONTROLMENU_TOOLBAR_RIGHT
|
||||
MENUITEM "Bottom", ID_CONTROLMENU_TOOLBAR_BOTTOM
|
||||
MENUITEM "Not docked", ID_CONTROLMENU_TOOLBAR_DISABLED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Dock/Undock Windows by Dragging", ID_CONTROLMENU_TOOLBAR_AUTODOCKONDRAG
|
||||
END
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_NULLSOFT_MODERN_SKINS "Nullsoft Modern Skins Support v%s"
|
||||
65535 "{ACD05A75-030B-4943-A100-540DAD98FB00}"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEND_TO "Send to:"
|
||||
IDS_NO_THEME_AVAILABLE "No theme available"
|
||||
IDS_COLOR_THEMES "Color Themes"
|
||||
IDS_CURRENT_SKIN "Current Skin"
|
||||
IDS_NO_SKIN_LOADED "No modern skin loaded"
|
||||
IDS_MODERN_SKIN_SUPPORT_CLASSIC
|
||||
"Modern Skin support (switch to a modern skin for a much more interesting about box =)"
|
||||
IDS_MODERN_SKIN_SUPPORT "Modern Skin support"
|
||||
IDS_CUSTOM_X_PERCENT "&Custom (%d%%)..."
|
||||
IDS_CUSTOM "&Custom..."
|
||||
IDS_WINDOW_SETTINGS "Window Settings"
|
||||
IDS_SCALE_X_PERCENT "Scale : %d%%"
|
||||
IDS_OPACITY_X_PERCENT "Opacity : %d%%"
|
||||
IDS_GHK_SHOW_NOTIFICATION "Playback: Show notification"
|
||||
IDS_MODERN_SKINS "Modern Skins"
|
||||
IDS_GENERAL "General"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_ALPHA_BLENDING "Alpha Blending"
|
||||
IDS_FONT_RENDERING "Font Rendering"
|
||||
IDS_ERROR_WHILE_LOADING_SKIN_WINDOW "Error while loading skin window"
|
||||
IDS_NO_OPTIONS_AVAILABLE_FOR_THIS_SKIN
|
||||
"No Options Available For This Skin"
|
||||
IDS_AUTO_UNICODE_LATIN1_ASCII "Auto (Unicode -> Latin-1 -> ASCII)"
|
||||
IDS_FONT "Font"
|
||||
IDS_MAPPING "Mapping"
|
||||
IDS_SCALE "Scale"
|
||||
IDS_TYPE "Type"
|
||||
IDS_THIS_SKIN "This skin"
|
||||
IDS_ALL_SKINS "All skins"
|
||||
IDS_FASTER "Faster"
|
||||
IDS_FAST "Fast"
|
||||
IDS_AVERAGE "Average"
|
||||
IDS_SLOW "Slow"
|
||||
IDS_SLOWER "Slower"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_FAILED_TO_DETECT_OPTIMAL_RESOLUTION
|
||||
"\n\nFailed to detect optimal resolution.\n\nThis machine may be very slow, or the CPU may be otherwise too busy for auto-detection to work."
|
||||
IDS_AUTO_DETECTING "\n\nAuto detecting...\n\nNow trying %dms."
|
||||
IDS_PREPARING_AUTO_DETECTION "\n\n\nPreparing auto detection..."
|
||||
IDS_AUTO_DETECTION_SUCCESSFUL
|
||||
"\n\nAuto detection successful.\n\nOptimum Resolution : %dms"
|
||||
IDS_ACCEPT "Accept"
|
||||
IDS_N_A "n/a"
|
||||
IDS_TIMERS_RESOLUTION "Timers Resolution : %dms"
|
||||
IDS_TEXT_SCROLL_SPEED "Text Scroll Speed : %s"
|
||||
IDS_CROSSFADER_ONLY_UNDER_OUT_DS
|
||||
"Crossfader is only supported by DirectSound Output.\nWould you like to change your Output plug-in now?"
|
||||
IDS_NOT_SUPPORTED "Not Supported"
|
||||
IDS_PLAYLIST_EDITOR "Playlist Editor"
|
||||
IDS_VIDEO "Video"
|
||||
IDS_MONO " mono"
|
||||
IDS_STEREO " stereo"
|
||||
IDS_X_CHANNELS " %d Channels"
|
||||
IDS_BY_SPACE "by "
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_COULD_NOT_FIND_WINAMP "Could not find Winamp!"
|
||||
IDS_ERROR "Error"
|
||||
IDS_WINAMP_NOT_FOUND "Winamp not found"
|
||||
IDS_VISUALIZATIONS "Visualizations"
|
||||
IDS_MEDIA_LIBRARY "Media Library"
|
||||
IDS_NO_SET "no set"
|
||||
IDS_SLOT_X_X "Slot %d (%s)"
|
||||
IDS_COLOR_EDITOR "Color Editor"
|
||||
IDS_SKIN_SETTINGS "Skin Settings\tAlt+C"
|
||||
IDS_WEB_BROWSER "Web Browser\tAlt+X"
|
||||
IDS_ALBUM_ART "Album Art\tAlt+A"
|
||||
IDS_NO_VISUALISATION "No visualization"
|
||||
IDS_SPECTRUM_ANALYZER "Spectrum analyzer"
|
||||
IDS_OSCILLOSCOPE "Oscilloscope"
|
||||
IDS_SKIN_LOAD_FORMAT_OLD
|
||||
"The skin you are trying to load is using an old format.\nAre you sure you want to load this skin? (It might crash!)"
|
||||
IDS_SKIN_LOAD_FORMAT_TOO_RECENT
|
||||
"The skin you are trying to load is using a format that is too recent.\nAre you sure you want to load this skin? (It might crash!)"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SKIN_LOAD_WARNING "Warning!"
|
||||
IDS_SKIN_LOAD_NOT_SUPPORTED
|
||||
"The skin you are trying to load doesn't seem to be supported."
|
||||
IDS_NO_SKIN_LOADED_ "No skin loaded"
|
||||
IDS_XUITHEME_LOAD "Load"
|
||||
IDS_XUITHEME_SAVE "Save"
|
||||
IDS_MS "ms"
|
||||
IDS_KHZ "kHz"
|
||||
IDS_KBPS "kbps"
|
||||
IDS_USELOCK "Reset window scale to global 'double size' except if it is locked"
|
||||
IDS_ALLLOCKED "All windows remember their scale, disregard global 'double size'"
|
||||
IDS_OPAQUE_FOCUS "Auto opaque on focus"
|
||||
IDS_OPAQUE_HOVER "Auto opaque on hover"
|
||||
IDS_NO_OPACITY "No auto opacity"
|
||||
IDS_LOADING "Loading..."
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#include "gen_ff.rc2"
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#error this file is not editable by Microsoft Visual C++
|
||||
#endif //APSTUDIO_INVOKED
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Data
|
||||
//
|
||||
|
||||
//IDB_MB_TAB_NORMAL RCDATA DISCARDABLE "bitmaps\\mb-unselected.png"
|
||||
//IDB_MB_TAB_HILITED RCDATA DISCARDABLE "bitmaps\\mb-hilited.png"
|
||||
//IDB_MB_TAB_SELECTED RCDATA DISCARDABLE "bitmaps\\mb-selected.png"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
#include "..\..\..\Winamp/buildType.h"
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,55,0,0
|
||||
PRODUCTVERSION WINAMP_PRODUCTVER
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Winamp SA"
|
||||
VALUE "FileDescription", "Winamp General Purpose Plug-in"
|
||||
VALUE "FileVersion", "1,55,0,0"
|
||||
VALUE "InternalName", "Nullsoft Modern Skins Support"
|
||||
VALUE "LegalCopyright", "Copyright © 2003-2023 Winamp SA"
|
||||
VALUE "LegalTrademarks", "Nullsoft and Winamp are trademarks of Winamp SA"
|
||||
VALUE "OriginalFilename", "gen_ff.dll"
|
||||
VALUE "ProductName", "Winamp"
|
||||
VALUE "ProductVersion", STR_WINAMP_PRODUCTVER
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
@@ -0,0 +1,204 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29424.173
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen_ff", "gen_ff.vcxproj", "{0A75D6C7-6F14-4032-BBCC-7A234E626A56}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{DABE6307-F8DD-416D-9DAC-673E2DECB73F} = {DABE6307-F8DD-416D-9DAC-673E2DECB73F}
|
||||
{4F4B5925-2D0B-48DB-BBB0-D321B14EF621} = {4F4B5925-2D0B-48DB-BBB0-D321B14EF621}
|
||||
{FA669B69-C4E6-48F1-B7BF-BB40B6DC0BC0} = {FA669B69-C4E6-48F1-B7BF-BB40B6DC0BC0}
|
||||
{3E0BFA8A-B86A-42E9-A33F-EC294F823F7F} = {3E0BFA8A-B86A-42E9-A33F-EC294F823F7F}
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}
|
||||
{0F9730E4-45DA-4BD2-A50A-403A4BC9751A} = {0F9730E4-45DA-4BD2-A50A-403A4BC9751A}
|
||||
{053B7CED-1A95-4473-8A58-409E93531692} = {053B7CED-1A95-4473-8A58-409E93531692}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bfc", "..\Wasabi\bfc\bfc.vcxproj", "{D0EC862E-DDDD-4F4F-934F-B75DC9062DC1}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tataki", "..\tataki\tataki.vcxproj", "{255B68B5-7EF8-45EF-A675-2D6B88147909}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{DABE6307-F8DD-416D-9DAC-673E2DECB73F} = {DABE6307-F8DD-416D-9DAC-673E2DECB73F}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetypewac", "..\freetypewac\freetypewac.vcxproj", "{2E31944B-64BE-4160-A1CF-7A31A923E204}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{DABE6307-F8DD-416D-9DAC-673E2DECB73F} = {DABE6307-F8DD-416D-9DAC-673E2DECB73F}
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Wasabi", "..\Wasabi\Wasabi.vcxproj", "{3E0BFA8A-B86A-42E9-A33F-EC294F823F7F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nsutil", "..\nsutil\nsutil.vcxproj", "{DABE6307-F8DD-416D-9DAC-673E2DECB73F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "..\freetype\freetype.vcxproj", "{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bmp", "..\bmp\bmp.vcxproj", "{3E4C3F3B-5D94-4691-AF6D-13C1E6F54501}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0F9730E4-45DA-4BD2-A50A-403A4BC9751A} = {0F9730E4-45DA-4BD2-A50A-403A4BC9751A}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\replicant\zlib\zlib.vcxproj", "{0F9730E4-45DA-4BD2-A50A-403A4BC9751A}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpeg", "..\jpeg\jpeg.vcxproj", "{74EADF6F-F023-4D8C-B03A-5258B192A5E2}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{4F4B5925-2D0B-48DB-BBB0-D321B14EF621} = {4F4B5925-2D0B-48DB-BBB0-D321B14EF621}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ijg", "..\ijg\ijg.vcxproj", "{4F4B5925-2D0B-48DB-BBB0-D321B14EF621}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "png", "..\png\png.vcxproj", "{EBA98B5E-F516-47AD-9D97-F5923283C6D8}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0F9730E4-45DA-4BD2-A50A-403A4BC9751A} = {0F9730E4-45DA-4BD2-A50A-403A4BC9751A}
|
||||
{053B7CED-1A95-4473-8A58-409E93531692} = {053B7CED-1A95-4473-8A58-409E93531692}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "..\libpng\libpng.vcxproj", "{053B7CED-1A95-4473-8A58-409E93531692}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml", "..\xml\xml.vcxproj", "{4FA2D01A-8932-45BA-9C54-E8247DD2CCAB}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "timer", "..\timer\timer.vcxproj", "{C7C45E25-5C76-4F59-AEBD-992CEC2A5C2E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{0A75D6C7-6F14-4032-BBCC-7A234E626A56}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0A75D6C7-6F14-4032-BBCC-7A234E626A56}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0A75D6C7-6F14-4032-BBCC-7A234E626A56}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{0A75D6C7-6F14-4032-BBCC-7A234E626A56}.Debug|x64.Build.0 = Debug|x64
|
||||
{0A75D6C7-6F14-4032-BBCC-7A234E626A56}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0A75D6C7-6F14-4032-BBCC-7A234E626A56}.Release|Win32.Build.0 = Release|Win32
|
||||
{0A75D6C7-6F14-4032-BBCC-7A234E626A56}.Release|x64.ActiveCfg = Release|x64
|
||||
{0A75D6C7-6F14-4032-BBCC-7A234E626A56}.Release|x64.Build.0 = Release|x64
|
||||
{D0EC862E-DDDD-4F4F-934F-B75DC9062DC1}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D0EC862E-DDDD-4F4F-934F-B75DC9062DC1}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D0EC862E-DDDD-4F4F-934F-B75DC9062DC1}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{D0EC862E-DDDD-4F4F-934F-B75DC9062DC1}.Debug|x64.Build.0 = Debug|x64
|
||||
{D0EC862E-DDDD-4F4F-934F-B75DC9062DC1}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D0EC862E-DDDD-4F4F-934F-B75DC9062DC1}.Release|Win32.Build.0 = Release|Win32
|
||||
{D0EC862E-DDDD-4F4F-934F-B75DC9062DC1}.Release|x64.ActiveCfg = Release|x64
|
||||
{D0EC862E-DDDD-4F4F-934F-B75DC9062DC1}.Release|x64.Build.0 = Release|x64
|
||||
{255B68B5-7EF8-45EF-A675-2D6B88147909}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{255B68B5-7EF8-45EF-A675-2D6B88147909}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{255B68B5-7EF8-45EF-A675-2D6B88147909}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{255B68B5-7EF8-45EF-A675-2D6B88147909}.Debug|x64.Build.0 = Debug|x64
|
||||
{255B68B5-7EF8-45EF-A675-2D6B88147909}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{255B68B5-7EF8-45EF-A675-2D6B88147909}.Release|Win32.Build.0 = Release|Win32
|
||||
{255B68B5-7EF8-45EF-A675-2D6B88147909}.Release|x64.ActiveCfg = Release|x64
|
||||
{255B68B5-7EF8-45EF-A675-2D6B88147909}.Release|x64.Build.0 = Release|x64
|
||||
{2E31944B-64BE-4160-A1CF-7A31A923E204}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{2E31944B-64BE-4160-A1CF-7A31A923E204}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{2E31944B-64BE-4160-A1CF-7A31A923E204}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{2E31944B-64BE-4160-A1CF-7A31A923E204}.Debug|x64.Build.0 = Debug|x64
|
||||
{2E31944B-64BE-4160-A1CF-7A31A923E204}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{2E31944B-64BE-4160-A1CF-7A31A923E204}.Release|Win32.Build.0 = Release|Win32
|
||||
{2E31944B-64BE-4160-A1CF-7A31A923E204}.Release|x64.ActiveCfg = Release|x64
|
||||
{2E31944B-64BE-4160-A1CF-7A31A923E204}.Release|x64.Build.0 = Release|x64
|
||||
{3E0BFA8A-B86A-42E9-A33F-EC294F823F7F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{3E0BFA8A-B86A-42E9-A33F-EC294F823F7F}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{3E0BFA8A-B86A-42E9-A33F-EC294F823F7F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{3E0BFA8A-B86A-42E9-A33F-EC294F823F7F}.Debug|x64.Build.0 = Debug|x64
|
||||
{3E0BFA8A-B86A-42E9-A33F-EC294F823F7F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{3E0BFA8A-B86A-42E9-A33F-EC294F823F7F}.Release|Win32.Build.0 = Release|Win32
|
||||
{3E0BFA8A-B86A-42E9-A33F-EC294F823F7F}.Release|x64.ActiveCfg = Release|x64
|
||||
{3E0BFA8A-B86A-42E9-A33F-EC294F823F7F}.Release|x64.Build.0 = Release|x64
|
||||
{DABE6307-F8DD-416D-9DAC-673E2DECB73F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{DABE6307-F8DD-416D-9DAC-673E2DECB73F}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{DABE6307-F8DD-416D-9DAC-673E2DECB73F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{DABE6307-F8DD-416D-9DAC-673E2DECB73F}.Debug|x64.Build.0 = Debug|x64
|
||||
{DABE6307-F8DD-416D-9DAC-673E2DECB73F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{DABE6307-F8DD-416D-9DAC-673E2DECB73F}.Release|Win32.Build.0 = Release|Win32
|
||||
{DABE6307-F8DD-416D-9DAC-673E2DECB73F}.Release|x64.ActiveCfg = Release|x64
|
||||
{DABE6307-F8DD-416D-9DAC-673E2DECB73F}.Release|x64.Build.0 = Release|x64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.Build.0 = Debug|x64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.Build.0 = Release|Win32
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.ActiveCfg = Release|x64
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.Build.0 = Release|x64
|
||||
{3E4C3F3B-5D94-4691-AF6D-13C1E6F54501}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{3E4C3F3B-5D94-4691-AF6D-13C1E6F54501}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{3E4C3F3B-5D94-4691-AF6D-13C1E6F54501}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{3E4C3F3B-5D94-4691-AF6D-13C1E6F54501}.Debug|x64.Build.0 = Debug|x64
|
||||
{3E4C3F3B-5D94-4691-AF6D-13C1E6F54501}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{3E4C3F3B-5D94-4691-AF6D-13C1E6F54501}.Release|Win32.Build.0 = Release|Win32
|
||||
{3E4C3F3B-5D94-4691-AF6D-13C1E6F54501}.Release|x64.ActiveCfg = Release|x64
|
||||
{3E4C3F3B-5D94-4691-AF6D-13C1E6F54501}.Release|x64.Build.0 = Release|x64
|
||||
{0F9730E4-45DA-4BD2-A50A-403A4BC9751A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0F9730E4-45DA-4BD2-A50A-403A4BC9751A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0F9730E4-45DA-4BD2-A50A-403A4BC9751A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{0F9730E4-45DA-4BD2-A50A-403A4BC9751A}.Debug|x64.Build.0 = Debug|x64
|
||||
{0F9730E4-45DA-4BD2-A50A-403A4BC9751A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0F9730E4-45DA-4BD2-A50A-403A4BC9751A}.Release|Win32.Build.0 = Release|Win32
|
||||
{0F9730E4-45DA-4BD2-A50A-403A4BC9751A}.Release|x64.ActiveCfg = Release|x64
|
||||
{0F9730E4-45DA-4BD2-A50A-403A4BC9751A}.Release|x64.Build.0 = Release|x64
|
||||
{74EADF6F-F023-4D8C-B03A-5258B192A5E2}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{74EADF6F-F023-4D8C-B03A-5258B192A5E2}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{74EADF6F-F023-4D8C-B03A-5258B192A5E2}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{74EADF6F-F023-4D8C-B03A-5258B192A5E2}.Debug|x64.Build.0 = Debug|x64
|
||||
{74EADF6F-F023-4D8C-B03A-5258B192A5E2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{74EADF6F-F023-4D8C-B03A-5258B192A5E2}.Release|Win32.Build.0 = Release|Win32
|
||||
{74EADF6F-F023-4D8C-B03A-5258B192A5E2}.Release|x64.ActiveCfg = Release|x64
|
||||
{74EADF6F-F023-4D8C-B03A-5258B192A5E2}.Release|x64.Build.0 = Release|x64
|
||||
{4F4B5925-2D0B-48DB-BBB0-D321B14EF621}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{4F4B5925-2D0B-48DB-BBB0-D321B14EF621}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{4F4B5925-2D0B-48DB-BBB0-D321B14EF621}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{4F4B5925-2D0B-48DB-BBB0-D321B14EF621}.Debug|x64.Build.0 = Debug|x64
|
||||
{4F4B5925-2D0B-48DB-BBB0-D321B14EF621}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{4F4B5925-2D0B-48DB-BBB0-D321B14EF621}.Release|Win32.Build.0 = Release|Win32
|
||||
{4F4B5925-2D0B-48DB-BBB0-D321B14EF621}.Release|x64.ActiveCfg = Release|x64
|
||||
{4F4B5925-2D0B-48DB-BBB0-D321B14EF621}.Release|x64.Build.0 = Release|x64
|
||||
{EBA98B5E-F516-47AD-9D97-F5923283C6D8}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{EBA98B5E-F516-47AD-9D97-F5923283C6D8}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{EBA98B5E-F516-47AD-9D97-F5923283C6D8}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{EBA98B5E-F516-47AD-9D97-F5923283C6D8}.Debug|x64.Build.0 = Debug|x64
|
||||
{EBA98B5E-F516-47AD-9D97-F5923283C6D8}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{EBA98B5E-F516-47AD-9D97-F5923283C6D8}.Release|Win32.Build.0 = Release|Win32
|
||||
{EBA98B5E-F516-47AD-9D97-F5923283C6D8}.Release|x64.ActiveCfg = Release|x64
|
||||
{EBA98B5E-F516-47AD-9D97-F5923283C6D8}.Release|x64.Build.0 = Release|x64
|
||||
{053B7CED-1A95-4473-8A58-409E93531692}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{053B7CED-1A95-4473-8A58-409E93531692}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{053B7CED-1A95-4473-8A58-409E93531692}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{053B7CED-1A95-4473-8A58-409E93531692}.Debug|x64.Build.0 = Debug|x64
|
||||
{053B7CED-1A95-4473-8A58-409E93531692}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{053B7CED-1A95-4473-8A58-409E93531692}.Release|Win32.Build.0 = Release|Win32
|
||||
{053B7CED-1A95-4473-8A58-409E93531692}.Release|x64.ActiveCfg = Release|x64
|
||||
{053B7CED-1A95-4473-8A58-409E93531692}.Release|x64.Build.0 = Release|x64
|
||||
{4FA2D01A-8932-45BA-9C54-E8247DD2CCAB}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{4FA2D01A-8932-45BA-9C54-E8247DD2CCAB}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{4FA2D01A-8932-45BA-9C54-E8247DD2CCAB}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{4FA2D01A-8932-45BA-9C54-E8247DD2CCAB}.Debug|x64.Build.0 = Debug|x64
|
||||
{4FA2D01A-8932-45BA-9C54-E8247DD2CCAB}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{4FA2D01A-8932-45BA-9C54-E8247DD2CCAB}.Release|Win32.Build.0 = Release|Win32
|
||||
{4FA2D01A-8932-45BA-9C54-E8247DD2CCAB}.Release|x64.ActiveCfg = Release|x64
|
||||
{4FA2D01A-8932-45BA-9C54-E8247DD2CCAB}.Release|x64.Build.0 = Release|x64
|
||||
{FA669B69-C4E6-48F1-B7BF-BB40B6DC0BC0}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FA669B69-C4E6-48F1-B7BF-BB40B6DC0BC0}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FA669B69-C4E6-48F1-B7BF-BB40B6DC0BC0}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{FA669B69-C4E6-48F1-B7BF-BB40B6DC0BC0}.Debug|x64.Build.0 = Debug|x64
|
||||
{FA669B69-C4E6-48F1-B7BF-BB40B6DC0BC0}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FA669B69-C4E6-48F1-B7BF-BB40B6DC0BC0}.Release|Win32.Build.0 = Release|Win32
|
||||
{FA669B69-C4E6-48F1-B7BF-BB40B6DC0BC0}.Release|x64.ActiveCfg = Release|x64
|
||||
{FA669B69-C4E6-48F1-B7BF-BB40B6DC0BC0}.Release|x64.Build.0 = Release|x64
|
||||
{C7C45E25-5C76-4F59-AEBD-992CEC2A5C2E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C7C45E25-5C76-4F59-AEBD-992CEC2A5C2E}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C7C45E25-5C76-4F59-AEBD-992CEC2A5C2E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C7C45E25-5C76-4F59-AEBD-992CEC2A5C2E}.Debug|x64.Build.0 = Debug|x64
|
||||
{C7C45E25-5C76-4F59-AEBD-992CEC2A5C2E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C7C45E25-5C76-4F59-AEBD-992CEC2A5C2E}.Release|Win32.Build.0 = Release|Win32
|
||||
{C7C45E25-5C76-4F59-AEBD-992CEC2A5C2E}.Release|x64.ActiveCfg = Release|x64
|
||||
{C7C45E25-5C76-4F59-AEBD-992CEC2A5C2E}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {5A4ED350-80C8-4501-87C2-26BBC67EAD28}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,988 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{0A75D6C7-6F14-4032-BBCC-7A234E626A56}</ProjectGuid>
|
||||
<RootNamespace>gen_ff</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
<EmbedManifest>true</EmbedManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg">
|
||||
<VcpkgEnableManifest>false</VcpkgEnableManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<VcpkgInstalledDir>
|
||||
</VcpkgInstalledDir>
|
||||
<VcpkgUseStatic>false</VcpkgUseStatic>
|
||||
<VcpkgConfiguration>Debug</VcpkgConfiguration>
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<VcpkgInstalledDir>
|
||||
</VcpkgInstalledDir>
|
||||
<VcpkgUseStatic>false</VcpkgUseStatic>
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<VcpkgInstalledDir>
|
||||
</VcpkgInstalledDir>
|
||||
<VcpkgUseStatic>false</VcpkgUseStatic>
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
<VcpkgConfiguration>Debug</VcpkgConfiguration>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<VcpkgInstalledDir>..\..\..\external_dependencies\vcpkg</VcpkgInstalledDir>
|
||||
<VcpkgUseStatic>true</VcpkgUseStatic>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.;..;..\..\..;..\..\..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;_USRDLL;GEN_FF_EXPORTS;NOSVCMGR;_WIN32_IE=0x0A00;_CRT_SECURE_NO_WARNINGS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>4100;4127;4238;4244;4267;4302;4311;4312;4651;4838;4090;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<ShowIncludes>false</ShowIncludes>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<DelayLoadDLLs>tataki.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\
|
||||
xcopy /Y /D $(IntDir)$(TargetName).pdb ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.;..;..\..\..;..\..\..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;WIN64;_DEBUG;_WINDOWS;_USRDLL;GEN_FF_EXPORTS;NOSVCMGR;_WIN32_IE=0x0A00;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4100;4127;4238;4244;4267;4302;4311;4312;4651;4838;4090;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<ShowIncludes>false</ShowIncludes>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<DelayLoadDLLs>tataki.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\
|
||||
xcopy /Y /D $(IntDir)$(TargetName).pdb ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<AdditionalIncludeDirectories>.;..;..\..\..;..\..\..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;WIN32;_WINDOWS;_USRDLL;GEN_FF_EXPORTS;NOSVCMGR;_WIN32_IE=0x0A00;_CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4100;4127;4238;4244;4267;4302;4311;4312;4651;4838;4090;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<DelayLoadDLLs>tataki.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<AdditionalIncludeDirectories>.;..;..\..\..;..\..\..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;WIN64;NDEBUG;_WINDOWS;_USRDLL;GEN_ff_EXPORTS;NOSVCMGR;_WIN32_IE=0x0A00;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4100;4127;4238;4244;4267;4302;4311;4312;4651;4838;4090;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WINVER=0x0601;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<DelayLoadDLLs>tataki.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\external_dependencies\libmp4v2\libmp4v2.vcxproj">
|
||||
<Project>{efb9b882-6a8b-463d-a8e3-a2807afc5d9f}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\tataki\tataki.vcxproj">
|
||||
<Project>{255b68b5-7ef8-45ef-a675-2d6b88147909}</Project>
|
||||
<CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Wasabi\bfc\bfc.vcxproj">
|
||||
<Project>{d0ec862e-dddd-4f4f-934f-b75dc9062dc1}</Project>
|
||||
<CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\gen_ml\menu.cpp" />
|
||||
<ClCompile Include="..\..\..\nu\HTMLContainer2.cpp" />
|
||||
<ClCompile Include="..\..\..\nu\listview.cpp" />
|
||||
<ClCompile Include="..\..\..\nu\regexp.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\apiinit.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\application\ifc_messageprocessori.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\config\api_config.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\config\api_configi.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\config\api_configx.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\config\cfglist.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\config\cfgscriptobj.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\config\config.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\config\items\attribute.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\config\items\attrstr.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\config\items\cfgitemi.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\config\items\cfgitemx.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\config\items\intarray.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\config\options.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\config\uioptions.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\core\api_core.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\dependency\api_dependent.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\dependency\api_dependentviewer.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\filereader\api_filereader.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\filereader\filereaderapi.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\filereader\local\fileread.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\font\bitmapfont.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\font\font.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\font\fontapi.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\font\win32\truetypefont_win32.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\imgldr\api_imgldr.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\imgldr\imggen\grad.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\imgldr\imggen\osedge.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\imgldr\imggen\poly.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\imgldr\imggen\solid.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\imgldr\imgldr.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\imgldr\imgldrapi.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\locales\api_locales.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\locales\api_localesi.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\locales\api_localesx.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\locales\localesmgr.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\api_maki.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\api_makii.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\api_makix.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\debugger\api_makidebug.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\debugger\debugapi.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\debugger\debuggerui.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\debugger\debugsymbols.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\debugger\disasm.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\debugger\jitd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\debugger\jitdbreak.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\debugger\sdebuggerui.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\debugger\sourcecodeline.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\debugger\vcpudebug.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\guru.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objcontroller.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objcontrollert.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\core\coreadminobj.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\core\coreobj.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\core\svc_scriptcore.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\c_browser.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\c_button.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\c_checkbox.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\c_container.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\c_dropdownlist.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\c_edit.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\c_group.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\c_guilist.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\c_guiobject.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\c_guitree.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\c_layout.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\c_menubutton.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\c_querylist.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\c_rootobj.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\c_slider.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\c_text.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\c_togglebutton.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\c_treeitem.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\h_browser.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\h_button.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\h_checkbox.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\h_container.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\h_dropdownlist.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\h_edit.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\h_group.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\h_guilist.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\h_guiobject.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\h_guitree.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\h_layout.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\h_menubutton.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\h_querylist.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\h_rootobj.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\h_slider.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\h_text.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\h_togglebutton.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\h_treeitem.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\c_script\scripthook.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\guiobj.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\guiobjectx.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\PlaylistScriptObject.cpp">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)$(TargetName)%(Filename)1.obj</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)$(TargetName)%(Filename)1.obj</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)$(TargetName)%(Filename)1.obj</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(TargetName)%(Filename)1.obj</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\rootobj.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\rootobjcb.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\rootobjcbi.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\rootobjcbx.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\rootobjcontroller.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\rootobject.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\rootobjecti.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\rootobjectx.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\sapplication.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\sbitlist.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\scolor.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\scolormgr.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\sfile.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\sgammagroup.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\sgammaset.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\slist.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\smap.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\spopup.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\sprivate.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\sregion.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\sxmldoc.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\systemobj.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objects\wacobj.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\objecttable.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\script.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\scriptmgr.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\scriptobj.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\scriptobji.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\scriptobjx.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\script\vcpu.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\api_service.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\servicei.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\svccache.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\svcenum.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\svcenumbyguid.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\svcenumt.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\svcs\svc_action.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\svcs\svc_fileread.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\svcs\svc_font.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\svcs\svc_imggen.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\svcs\svc_imgload.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\svcs\svc_minibrowser.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\svcs\svc_scriptobj.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\svcs\svc_skinfilter.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\svcs\svc_textfeed.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\svcs\svc_tooltips.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\svcs\svc_wndcreate.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\svcs\svc_xuiobject.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\svc_enum.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\waservicefactory.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\waservicefactorybase.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\waservicefactoryi.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\waservicefactoryt.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\waservicefactorytsingle.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\service\waservicefactoryx.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\api_palette.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\api_skin.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\cursormgr.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\feeds\api_textfeed.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\feeds\feedwatch.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\feeds\feedwatcherso.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\feeds\textfeed.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\gammamgr.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\groupmgr.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\groupwndcreate.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\guitree.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\nakedobject.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\objectactuator.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\regioncache.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\skin.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\skinapi.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\skinelem.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\skinfilter.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\skinfont.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\skinitem.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\skinparse.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\SkinVersion.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\animlayer.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\button.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\checkbox.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\combobox.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\compbuck2.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\customobject.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\dropdownlist.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\edit.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\fx_dmove.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\group.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\groupclickwnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\grouplist.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\grouptgbutton.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\grouptips.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\guiradiogroup.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\historyeditbox.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\layer.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\mb\iebrowser.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\mb\mainminibrowser.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\mb\mbsvc.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\mb\minibrowser.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\mb\minibrowserwnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\mb\xuibrowser.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\mouseredir.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\objdirwnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\pathpicker.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\pslider.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\sa.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\seqband.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\seqpreamp.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\seqvis.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\spanbar.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\sseeker.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\sstatus.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\stats\statswnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\stats\xuistats.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\svolbar.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\text.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\textbase.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\tgbutton.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\title.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\titlebox.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\wa2\xuiwa2slider.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuiaddparams.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuibookmarklist.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuicheckbox.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuicombobox.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuicustomobject.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuidownloadslist.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuidropdownlist.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuieditbox.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuiframe.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuigradientwnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuigrid.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuigroupxfade.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuihideobject.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuihistoryedit.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuilist.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuimenu.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuimenuso.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuiobjdirwnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuioswndhost.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuipathpicker.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuiprogressgrid.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuiradiogroup.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuirect.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuisendparams.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuistatus.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuitabsheet.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuithemeslist.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuititlebox.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuitree.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\skin\widgets\xuiwndholder.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\syscb\api_syscb.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\syscb\callbacks\browsercb.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\syscb\callbacks\corecb.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\syscb\callbacks\playlistcb.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\syscb\callbacks\skincb.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\syscb\callbacks\syscb.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\syscb\callbacks\syscbi.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\syscb\callbacks\syscbx.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\timer\timerclient.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\util\selectfile.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\util\systray.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\util\varmgr.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wac\compon.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wndmgr\alphamgr.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wndmgr\animate.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wndmgr\api_wndmgr.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wndmgr\appcmds.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wndmgr\autopopup.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wndmgr\container.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wndmgr\gc.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wndmgr\guistatuscb.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wndmgr\layout.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wndmgr\msgbox.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wndmgr\resize.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wndmgr\skinembed.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wndmgr\skinwnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wndmgr\snappnt.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wndmgr\wndmgrapi.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\api_window.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\api_wnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\basewnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\contextmenu.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\cursor.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\deactivatemgr.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\di.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\dragitemi.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\findobjectcb.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\keyboard.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\paintset.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\popexitcb.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\popexitchecker.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\popup.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\rootwnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\virtualwnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndapi.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\abstractwndhold.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\appbarwnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\blankwnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\bufferpaintwnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\buttbar.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\buttwnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\clickwnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\editwnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\editwndstring.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\embeddedxui.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\foreignwnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\framewnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\gradientwnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\guiobjwnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\labelwnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\listwnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\oswnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\oswndhost.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\qpaintwnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\rootwndholder.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\scbkgwnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\scrollbar.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\SelItemList.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\sepwnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\slider.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\status.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\svcwndhold.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\tabsheet.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\tabsheetbar.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\tooltip.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\treewnd.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\typesheet.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndclass\wndholder.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\wnd\wndtrack.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\xml\LoadXML.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\xml\XMLAutoInclude.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\xml\xmlparams.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\xml\xmlparamsi.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\xml\xmlparamsx.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\xml\xmlreader.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\api\xml\xmlwrite.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\bfc\depend.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\bfc\depview.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\bfc\draw\drawpoly.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\bfc\draw\gradient.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\bfc\std_file.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\bfc\util\findopenrect.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\bfc\util\inifile.cpp" />
|
||||
<ClCompile Include="..\..\..\Wasabi\bfc\util\timefmt.cpp" />
|
||||
<ClCompile Include="AlbumArt.cpp" />
|
||||
<ClCompile Include="embedwndguid.cpp">
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN64;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ff_ipc.cpp">
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN64;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="fsmonitor.cpp">
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN64;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main.cpp">
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN64;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;_NDEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">WIN64;_NDEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="MediaDownloader.cpp" />
|
||||
<ClCompile Include="menuactions.cpp">
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN64;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="minibrowserCOM.cpp" />
|
||||
<ClCompile Include="prefs.cpp">
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN64;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="prefs_about.cpp" />
|
||||
<ClCompile Include="prefs_alpha.cpp" />
|
||||
<ClCompile Include="prefs_colorthemes.cpp" />
|
||||
<ClCompile Include="prefs_font.cpp" />
|
||||
<ClCompile Include="prefs_general.cpp" />
|
||||
<ClCompile Include="servicelink.cpp">
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN64;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="skininfo.cpp">
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN64;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="wa2buckitems.cpp">
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN64;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="wa2cfgitems.cpp">
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN64;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="wa2core.cpp">
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN64;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="wa2coreactions.cpp">
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN64;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="wa2frontend.cpp">
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN64;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="wa2groupdefs.cpp">
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN64;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="wa2playlist.cpp">
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN64;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="wa2pldirobj.cpp">
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN64;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="wa2pledit.cpp">
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN64;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="wa2songticker.cpp" />
|
||||
<ClCompile Include="wa2wndembed.cpp">
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN64;_DEBUG;_WINDOWS;_MBCS;_USRDLL;GEN_FF_EXPORTS</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="WinampConfigScriptObject.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\gen_ml\menu.h" />
|
||||
<CustomBuild Include="..\gen_ml\ml.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="..\..\..\Wasabi\api\apiinit.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\application\ifc_messageprocessori.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\config\api_config.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\config\api_configi.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\config\api_configx.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\config\cfglist.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\config\config.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\config\items\attribute.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\config\items\attrstr.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\config\items\cfgitem.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\config\items\cfgitemi.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\config\items\cfgitemx.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\config\items\intarray.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\config\uioptions.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\core\api_core.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\core\coreactions.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\dependency\api_dependent.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\dependency\api_dependentviewer.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\filereader\api_filereader.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\filereader\api_readercallback.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\filereader\filereaderapi.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\filereader\local\fileread.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\filereader\svc_filereadI.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\font\api_font.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\font\bitmapfont.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\font\font.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\font\fontapi.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\font\win32\truetypefont_win32.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\imgldr\api_imgldr.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\imgldr\imggen\grad.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\imgldr\imgldr.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\imgldr\imgldrapi.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\imgldr\ImgLoaderEnum.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\locales\api_locales.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\locales\api_localesi.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\locales\api_localesx.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\locales\localesmgr.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\api_maki.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\api_makii.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\api_makix.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\debugger\debugsymbols.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\debugger\sdebuggerui.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\objects\core\coreadminobj.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\objects\core\coreobj.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\objects\c_script\h_rootobj.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\objects\c_script\scripthook.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\objects\guiobj.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\objects\guiobject.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\objects\guiobjectx.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\objects\PlaylistScriptObject.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\objects\rootobj.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\objects\rootobject.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\objects\rootobjecti.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\objects\rootobjectx.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\objects\sapplication.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\objects\scolor.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\objects\scolormgr.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\objects\sfile.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\objects\sgammagroup.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\objects\sgammaset.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\objects\sprivate.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\objects\svcwnd.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\objects\sxmldoc.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\objects\timer.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\script\vcpu.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\service\svcs\svc_accessibility.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\service\svcs\svc_accroleserver.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\service\svcs\svc_action.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\service\svcs\svc_droptarget.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\service\svcs\svc_fileread.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\service\svcs\svc_filesel.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\service\svcs\svc_objectdir.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\service\svcs\svc_scriptobj.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\service\svcs\svc_textfeed.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\service\svcs\svc_wndcreate.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\service\waservicefactoryt.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\api_colorthemes.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\api_palette.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\api_skin.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\cursormgr.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\feeds\api_textfeed.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\feeds\ezfeed.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\feeds\textfeed.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\gammamgr.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\group.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\groupmgr.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\groupwndcreate.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\guitree.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\skin.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\skinapi.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\skinelem.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\skinfilter.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\skinfont.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\skinitem.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\skinparse.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\SkinVersion.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\button.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\combobox.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\compbuck2.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\customobject.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\dropdownlist.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\group.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\grouptgbutton.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\grouptips.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\guiradiogroup.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\historyeditbox.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\layer.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\mb\iebrowser.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\mb\minibrowser.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\mb\minibrowserwnd.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\mouseredir.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\objdirwnd.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\pslider.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\seqband.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\seqpreamp.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\text.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\textbase.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\wa2\xuiwa2slider.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\xuicustomobject.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\xuiframe.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\xuilist.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\xuimenu.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\xuithemeslist.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\skin\widgets\xuitree.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\syscb\callbacks\browsercb.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\syscb\callbacks\browsercbi.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\syscb\callbacks\metacb.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\syscb\callbacks\playlistcb.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\syscb\callbacks\svccbi.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\syscb\callbacks\syscb.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\syscb\callbacks\wndcb.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\timer\api_timer.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\timer\timerclient.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\timer\timermul.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\timer\tmultiplex.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\util\selectfile.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\util\systray.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\util\varmgr.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wac\compon.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wndmgr\alphamgr.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wndmgr\animate.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wndmgr\api_wndmgr.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wndmgr\appcmds.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wndmgr\autopopup.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wndmgr\container.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wndmgr\gc.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wndmgr\layout.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wndmgr\msgbox.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wndmgr\resize.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wndmgr\skinembed.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wndmgr\skinwnd.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wndmgr\snappnt.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wndmgr\wndmgrapi.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\api_window.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\api_wnd.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\basewnd.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\contextmenu.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\cursor.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\deactivatemgr.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\drag.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\dragitem.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\dragitemi.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\findobjectcb.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\keyboard.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\minibrowser.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\paintcb.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\platform\win32\bitmap.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\popexitchecker.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\popup.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\resizable.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\rootwnd.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\virtualwnd.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\wndapi.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\wndclass\abstractwndhold.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\wndclass\appbarwnd.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\wndclass\blankwnd.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\wndclass\buttbar.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\wndclass\buttwnd.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\wndclass\editwnd.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\wndclass\framewnd.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\wndclass\gradientwnd.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\wndclass\guiobjwnd.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\wndclass\labelwnd.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\wndclass\listwnd.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\wndclass\rootwndholder.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\wndclass\scbkgwnd.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\wndclass\sepwnd.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\wndclass\svcwndhold.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\wndclass\tabsheet.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\wndclass\tabsheetbar.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\wndclass\treewnd.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\wndclass\virtualhostwnd.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\wndclass\wndholder.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\wnd\wndtrack.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\xml\LoadXML.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\xml\XMLAutoInclude.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\xml\xmlparams.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\xml\xmlparamsi.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\xml\xmlparamsx.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\xml\xmlreader.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\api\xml\xmlwrite.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\bfc\depend.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\bfc\depview.h" />
|
||||
<ClInclude Include="..\..\..\Wasabi\bfc\util\findopenrect.h" />
|
||||
<CustomBuild Include="..\..\..\Winamp\FRONTEND.H">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\..\..\Winamp\wa_ipc.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="AlbumArt.h" />
|
||||
<ClInclude Include="api__gen_ff.h" />
|
||||
<ClInclude Include="embedwndguid.h" />
|
||||
<ClInclude Include="main.h" />
|
||||
<ClInclude Include="menuactions.h" />
|
||||
<ClInclude Include="minibrowserCOM.h" />
|
||||
<ClInclude Include="precomp__gen_ff.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="skininfo.h" />
|
||||
<ClInclude Include="wa2buckitems.h" />
|
||||
<ClInclude Include="wa2cfgitems.h" />
|
||||
<ClInclude Include="wa2core.h" />
|
||||
<ClInclude Include="wa2coreactions.h" />
|
||||
<ClInclude Include="wa2frontend.h" />
|
||||
<ClInclude Include="wa2groupdefs.h" />
|
||||
<ClInclude Include="wa2playlist.h" />
|
||||
<ClInclude Include="wa2pldirobj.h" />
|
||||
<ClInclude Include="wa2pledit.h" />
|
||||
<ClInclude Include="wa2songticker.h" />
|
||||
<ClInclude Include="wa2wndembed.h" />
|
||||
<ClInclude Include="wasabicfg.h" />
|
||||
<ClInclude Include="WinampConfigScriptObject.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="gen_ff.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef _GEN_FF_IPC_H
|
||||
#define _GEN_FF_IPC_H
|
||||
|
||||
#include "ff_ipc.h"
|
||||
|
||||
void ff_ipc_getSkinColor(ff_skincolor *sc);
|
||||
void ff_ipc_genSkinBitmap(ff_skinbitmap *sb);
|
||||
HBITMAP ff_genwa2skinbitmap();
|
||||
HWND ff_ipc_getContentWnd(HWND w);
|
||||
|
||||
class ColorThemeMonitor : public SkinCallbackI {
|
||||
public:
|
||||
ColorThemeMonitor();
|
||||
virtual ~ColorThemeMonitor();
|
||||
int skincb_onColorThemeChanged(const wchar_t *colortheme);
|
||||
};
|
||||
|
||||
extern ColorThemeMonitor *colorThemeMonitor;
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,29 @@
|
||||
#ifndef __GEN_FF_MAIN_H
|
||||
#define __GEN_FF_MAIN_H
|
||||
|
||||
class ifc_window;
|
||||
|
||||
extern ifc_window *plWnd;
|
||||
extern ifc_window *mbWnd;
|
||||
extern ifc_window *vidWnd;
|
||||
|
||||
#define NUMSTATICWINDOWS 3
|
||||
|
||||
#include "../playlist/api_playlists.h"
|
||||
extern api_playlists *playlistsApi;
|
||||
#define AGAVE_API_PLAYLISTS playlistsApi
|
||||
|
||||
#include "../Agave/AlbumArt/api_albumart.h"
|
||||
extern api_albumart *albumArtApi;
|
||||
#define AGAVE_API_ALBUMART albumArtApi
|
||||
|
||||
#include "../playlist/api_playlistmanager.h"
|
||||
extern api_playlistmanager *playlistManagerApi;
|
||||
#define AGAVE_API_PLAYLISTMANAGER playlistManagerApi
|
||||
|
||||
#include "../Components/wac_downloadManager/wac_downloadManager_api.h"
|
||||
|
||||
#include "../Winamp/gen.h"
|
||||
extern "C" winampGeneralPurposePlugin plugin;
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,787 @@
|
||||
#include "precomp__gen_ff.h"
|
||||
#include "menuactions.h"
|
||||
#include "wa2frontend.h"
|
||||
#include <api/skin/skinparse.h>
|
||||
#include "wa2cfgitems.h"
|
||||
#include "main.h"
|
||||
#include "resource.h"
|
||||
#include <api/locales/xlatstr.h>
|
||||
#include "../gen_ml/ml_ipc.h"
|
||||
#include "../winamp/gen.h"
|
||||
#include "../Agave/Language/api_language.h"
|
||||
#include "../gen_ml/menufucker.h"
|
||||
#include "../Winamp/strutil.h"
|
||||
|
||||
extern librarySendToMenuStruct mainSendTo;
|
||||
#define WINAMP_OPTIONS_DSIZE 40165
|
||||
extern void addWindowOptionsToContextMenu(ifc_window *w);
|
||||
extern void removeWindowOptionsFromContextMenu();
|
||||
extern ifc_window *g_controlMenuTarget;
|
||||
extern HMENU controlmenu;
|
||||
int lowest_itempos = 0;
|
||||
int highest_itempos = -1;
|
||||
int lowest_witempos = 0;
|
||||
int lowest_witempos2 = 0;
|
||||
int highest_witempos = -1;
|
||||
int highest_witempos2 = -1;
|
||||
int optionsmenu_wa = 1;
|
||||
TList<HMENU> menulist;
|
||||
TList<HMENU> wmenulist;
|
||||
int in_menu = 0;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
MenuActions::MenuActions()
|
||||
{
|
||||
registerAction(L"menu", _ACTION_MENU);
|
||||
registerAction(L"sysmenu", _ACTION_SYSMENU);
|
||||
registerAction(L"controlmenu", _ACTION_CONTROLMENU);
|
||||
registerAction(L"MENU:WA5:File", ACTION_WA5FILEMENU);
|
||||
registerAction(L"MENU:WA5:Play", ACTION_WA5PLAYMENU);
|
||||
registerAction(L"MENU:WA5:Options", ACTION_WA5OPTIONSMENU);
|
||||
registerAction(L"MENU:WA5:Windows", ACTION_WA5WINDOWSMENU);
|
||||
registerAction(L"MENU:WA5:Help", ACTION_WA5HELPMENU);
|
||||
registerAction(L"MENU:WA5:PE_File", ACTION_WA5PEFILEMENU);
|
||||
registerAction(L"MENU:WA5:PE_Playlist", ACTION_WA5PEPLAYLISTMENU);
|
||||
registerAction(L"MENU:WA5:PE_Sort", ACTION_WA5PESORTMENU);
|
||||
registerAction(L"MENU:WA5:PE_Help", ACTION_WA5PEHELPMENU);
|
||||
registerAction(L"MENU:WA5:ML_File", ACTION_WA5MLFILEMENU);
|
||||
registerAction(L"MENU:WA5:ML_View", ACTION_WA5MLVIEWMENU);
|
||||
registerAction(L"MENU:WA5:ML_Help", ACTION_WA5MLHELPMENU);
|
||||
registerAction(L"PE_Add", ACTION_PEADD);
|
||||
registerAction(L"PE_Rem", ACTION_PEREM);
|
||||
registerAction(L"PE_Sel", ACTION_PESEL);
|
||||
registerAction(L"PE_Misc", ACTION_PEMISC);
|
||||
registerAction(L"PE_List", ACTION_PELIST);
|
||||
registerAction(L"PE_ListOfLists", ACTION_PELISTOFLISTS);
|
||||
registerAction(L"VID_FS", ACTION_VIDFS);
|
||||
registerAction(L"VID_1X", ACTION_VID1X);
|
||||
registerAction(L"VID_2X", ACTION_VID2X);
|
||||
registerAction(L"VID_TV", ACTION_VIDTV);
|
||||
registerAction(L"VID_Misc", ACTION_VIDMISC);
|
||||
registerAction(L"VIS_Next", ACTION_VISNEXT);
|
||||
registerAction(L"VIS_Prev", ACTION_VISPREV);
|
||||
registerAction(L"VIS_FS", ACTION_VISFS);
|
||||
registerAction(L"VIS_CFG", ACTION_VISCFG);
|
||||
registerAction(L"VIS_Menu", ACTION_VISMENU);
|
||||
registerAction(L"trackinfo", ACTION_TRACKINFO);
|
||||
registerAction(L"trackmenu", ACTION_TRACKMENU);
|
||||
registerAction(L"ML_SendTo", ACTION_SENDTO);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
MenuActions::~MenuActions()
|
||||
{}
|
||||
|
||||
static LRESULT sendMlIpc(int msg, WPARAM param) {
|
||||
static HWND mlwnd = NULL;
|
||||
if(!IsWindow(mlwnd)) {
|
||||
int IPC_GETMLWINDOW = (INT)SendMessageW(plugin.hwndParent, WM_WA_IPC, (WPARAM)&"LibraryGetWnd", IPC_REGISTER_WINAMP_IPCMESSAGE);
|
||||
if(IPC_GETMLWINDOW > 65536) mlwnd = (HWND)SendMessageW(plugin.hwndParent,WM_WA_IPC,0,IPC_GETMLWINDOW);
|
||||
}
|
||||
if(!IsWindow(mlwnd)) return 0;
|
||||
return SendMessageW(mlwnd,WM_ML_IPC,param,msg);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
int MenuActions::onActionId(int pvtid, const wchar_t *action, const wchar_t *param /* =NULL */, int p1 /* =0 */, int p2 /* =0 */, void *data /* =NULL */, int datalen /* =0 */, ifc_window *source /* =NULL */)
|
||||
{
|
||||
SetCursor(LoadCursor(NULL, IDC_ARROW));
|
||||
RECT r = {0, 0, 0, 0};
|
||||
if (source) source->getWindowRect(&r);
|
||||
int height = r.bottom - r.top;
|
||||
int width = r.right - r.left;
|
||||
in_menu = 1;
|
||||
switch (pvtid)
|
||||
{
|
||||
case _ACTION_MENU:
|
||||
{
|
||||
if (!_wcsicmp(param, L"presets"))
|
||||
{
|
||||
wa2.triggerEQPresetMenu(p1, p2);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case _ACTION_SYSMENU:
|
||||
{
|
||||
addWindowOptionsToContextMenu(source);
|
||||
wa2.triggerPopupMenu(p1, p2);
|
||||
break;
|
||||
}
|
||||
case _ACTION_CONTROLMENU:
|
||||
{
|
||||
if (g_controlMenuTarget != NULL)
|
||||
removeWindowOptionsFromContextMenu();
|
||||
addWindowOptionsToContextMenu(g_controlMenuTarget);
|
||||
g_controlMenuTarget = source;
|
||||
|
||||
HMENU ctrlmenu = GetSubMenu(controlmenu, 0);
|
||||
DoTrackPopup(ctrlmenu, TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_RIGHTBUTTON, p1, p2, wa2.getMainWindow());
|
||||
break;
|
||||
}
|
||||
case ACTION_WA5FILEMENU:
|
||||
{
|
||||
wa2.triggerFileMenu(p1, p2, width, height);
|
||||
break;
|
||||
}
|
||||
case ACTION_WA5PLAYMENU:
|
||||
{
|
||||
wa2.triggerPlayMenu(p1, p2, width, height);
|
||||
break;
|
||||
}
|
||||
case ACTION_WA5OPTIONSMENU:
|
||||
{
|
||||
wa2.triggerOptionsMenu(p1, p2, width, height);
|
||||
break;
|
||||
}
|
||||
case ACTION_WA5WINDOWSMENU:
|
||||
{
|
||||
wa2.triggerWindowsMenu(p1, p2, width, height);
|
||||
break;
|
||||
}
|
||||
case ACTION_WA5HELPMENU:
|
||||
{
|
||||
wa2.triggerHelpMenu(p1, p2, width, height);
|
||||
break;
|
||||
}
|
||||
case ACTION_WA5PEFILEMENU:
|
||||
{
|
||||
wa2.triggerPEFileMenu(p1, p2, width, height);
|
||||
break;
|
||||
}
|
||||
case ACTION_WA5PEPLAYLISTMENU:
|
||||
{
|
||||
wa2.triggerPEPlaylistMenu(p1, p2, width, height);
|
||||
break;
|
||||
}
|
||||
case ACTION_WA5PESORTMENU:
|
||||
{
|
||||
wa2.triggerPESortMenu(p1, p2, width, height);
|
||||
break;
|
||||
}
|
||||
case ACTION_WA5PEHELPMENU:
|
||||
{
|
||||
wa2.triggerPEHelpMenu(p1, p2, width, height);
|
||||
break;
|
||||
}
|
||||
case ACTION_WA5MLFILEMENU:
|
||||
{
|
||||
wa2.triggerMLFileMenu(p1, p2, width, height);
|
||||
break;
|
||||
}
|
||||
case ACTION_WA5MLVIEWMENU:
|
||||
{
|
||||
wa2.triggerMLViewMenu(p1, p2, width, height);
|
||||
break;
|
||||
}
|
||||
case ACTION_WA5MLHELPMENU:
|
||||
{
|
||||
wa2.triggerMLHelpMenu(p1, p2, width, height);
|
||||
break;
|
||||
}
|
||||
case ACTION_PEADD:
|
||||
{
|
||||
wa2.sendPlCmd(Winamp2FrontEnd::WA2_PLEDITPOPUP_ADD, r.left, r.top, TPM_BOTTOMALIGN | TPM_LEFTALIGN);
|
||||
break;
|
||||
}
|
||||
case ACTION_PEREM:
|
||||
{
|
||||
wa2.sendPlCmd(Winamp2FrontEnd::WA2_PLEDITPOPUP_REM, r.left, r.top, TPM_BOTTOMALIGN | TPM_LEFTALIGN);
|
||||
break;
|
||||
}
|
||||
case ACTION_PESEL:
|
||||
{
|
||||
wa2.sendPlCmd(Winamp2FrontEnd::WA2_PLEDITPOPUP_SEL, r.left, r.top, TPM_BOTTOMALIGN | TPM_LEFTALIGN);
|
||||
break;
|
||||
}
|
||||
case ACTION_PEMISC:
|
||||
{
|
||||
wa2.sendPlCmd(Winamp2FrontEnd::WA2_PLEDITPOPUP_MISC, r.left, r.top, TPM_BOTTOMALIGN | TPM_LEFTALIGN);
|
||||
break;
|
||||
}
|
||||
case ACTION_PELIST:
|
||||
{
|
||||
wa2.sendPlCmd(Winamp2FrontEnd::WA2_PLEDITPOPUP_LIST, r.right, r.top, TPM_BOTTOMALIGN | TPM_RIGHTALIGN);
|
||||
break;
|
||||
}
|
||||
case ACTION_PELISTOFLISTS:
|
||||
{
|
||||
wa2.triggerPEListOfListsMenu(r.left, r.top);
|
||||
break;
|
||||
}
|
||||
case ACTION_VIDFS:
|
||||
{
|
||||
wa2.sendVidCmd(Winamp2FrontEnd::WA2_VIDCMD_FULLSCREEN);
|
||||
break;
|
||||
}
|
||||
case ACTION_VID1X:
|
||||
{
|
||||
wa2.sendVidCmd(Winamp2FrontEnd::WA2_VIDCMD_1X);
|
||||
break;
|
||||
}
|
||||
case ACTION_VID2X:
|
||||
{
|
||||
wa2.sendVidCmd(Winamp2FrontEnd::WA2_VIDCMD_2X);
|
||||
break;
|
||||
}
|
||||
case ACTION_VIDTV:
|
||||
{
|
||||
wa2.sendVidCmd(Winamp2FrontEnd::WA2_VIDCMD_LIB);
|
||||
break;
|
||||
}
|
||||
case ACTION_VIDMISC:
|
||||
{
|
||||
wa2.sendVidCmd(Winamp2FrontEnd::WA2_VIDPOPUP_MISC, r.right, r.top, TPM_BOTTOMALIGN | TPM_RIGHTALIGN);
|
||||
break;
|
||||
}
|
||||
case ACTION_VISNEXT:
|
||||
{
|
||||
wa2.visNext();
|
||||
break;
|
||||
}
|
||||
case ACTION_VISPREV:
|
||||
{
|
||||
wa2.visPrev();
|
||||
break;
|
||||
}
|
||||
case ACTION_VISFS:
|
||||
{
|
||||
wa2.visFullscreen();
|
||||
break;
|
||||
}
|
||||
case ACTION_VISCFG:
|
||||
{
|
||||
wa2.visConfig();
|
||||
break;
|
||||
}
|
||||
case ACTION_VISMENU:
|
||||
{
|
||||
wa2.visMenu();
|
||||
break;
|
||||
}
|
||||
case ACTION_TRACKMENU:
|
||||
{
|
||||
extern const wchar_t *GetMenuItemString(HMENU menu, int id, int bypos);
|
||||
#define WINAMP_TOGGLE_AUTOSCROLL 40189
|
||||
#define ID_RATING5 40396
|
||||
#define ID_RATING4 40397
|
||||
#define ID_RATING3 40398
|
||||
#define ID_RATING2 40399
|
||||
#define ID_RATING1 40400
|
||||
#define ID_RATING0 40401
|
||||
HMENU top_menu = wa2.getTopMenu();
|
||||
HMENU contextmenus = GetSubMenu(top_menu, 3);
|
||||
HMENU songinfomenu = GetSubMenu(contextmenus, 0);
|
||||
HMENU ratingmenu = GetSubMenu(songinfomenu, 5);
|
||||
int rating = wa2.getCurTrackRating();
|
||||
CheckMenuItem(ratingmenu, ID_RATING5, (rating == 5) ? MF_CHECKED : MF_UNCHECKED);
|
||||
CheckMenuItem(ratingmenu, ID_RATING4, (rating == 4) ? MF_CHECKED : MF_UNCHECKED);
|
||||
CheckMenuItem(ratingmenu, ID_RATING3, (rating == 3) ? MF_CHECKED : MF_UNCHECKED);
|
||||
CheckMenuItem(ratingmenu, ID_RATING2, (rating == 2) ? MF_CHECKED : MF_UNCHECKED);
|
||||
CheckMenuItem(ratingmenu, ID_RATING1, (rating == 1) ? MF_CHECKED : MF_UNCHECKED);
|
||||
CheckMenuItem(ratingmenu, ID_RATING0, (rating == 0) ? MF_CHECKED : MF_UNCHECKED);
|
||||
StringW olditemstr = GetMenuItemString(songinfomenu, 3, TRUE);
|
||||
RemoveMenu(songinfomenu, 3, MF_BYPOSITION);
|
||||
|
||||
LRESULT IPC_LIBRARY_SENDTOMENU = SendMessageW(plugin.hwndParent, WM_WA_IPC, (WPARAM)&"LibrarySendToMenu", IPC_REGISTER_WINAMP_IPCMESSAGE);
|
||||
HMENU menu = 0;
|
||||
memset(&mainSendTo, 0, sizeof(mainSendTo));
|
||||
if (IPC_LIBRARY_SENDTOMENU > 65536 && SendMessageW(plugin.hwndParent, WM_WA_IPC, (WPARAM)0, IPC_LIBRARY_SENDTOMENU) == 0xffffffff)
|
||||
{
|
||||
char stStr[32] = {0};
|
||||
MENUITEMINFOA mii = {sizeof(mii), MIIM_SUBMENU | MIIM_TYPE, MFT_STRING, };
|
||||
mii.hSubMenu = menu = CreatePopupMenu();
|
||||
mii.dwTypeData = WASABI_API_LNGSTRING_BUF(IDS_SEND_TO,stStr,32);
|
||||
mii.cch = strlen((char*)mii.dwTypeData);
|
||||
|
||||
InsertMenuItemA(songinfomenu, 3, TRUE, &mii);
|
||||
|
||||
mainSendTo.mode = 1;
|
||||
mainSendTo.hwnd = plugin.hwndParent; // TODO???
|
||||
mainSendTo.data_type = ML_TYPE_FILENAMESW;
|
||||
mainSendTo.build_hMenu = menu;
|
||||
}
|
||||
|
||||
menufucker_t mf = {sizeof(mf),MENU_SONGTICKER,songinfomenu,0x3000,0x4000,0};
|
||||
pluginMessage message_build = {SendMessageW(plugin.hwndParent, WM_WA_IPC, (WPARAM)&"menufucker_build", IPC_REGISTER_WINAMP_IPCMESSAGE),(intptr_t)&mf,0};
|
||||
sendMlIpc(ML_IPC_SEND_PLUGIN_MESSAGE,(WPARAM)&message_build);
|
||||
|
||||
int ret = DoTrackPopup(songinfomenu, TPM_LEFTALIGN | TPM_TOPALIGN | TPM_LEFTBUTTON | TPM_RIGHTBUTTON|TPM_RETURNCMD, p1, p2, wa2.getMainWindow());
|
||||
|
||||
pluginMessage message_result = {SendMessageW(plugin.hwndParent, WM_WA_IPC, (WPARAM)&"menufucker_result", IPC_REGISTER_WINAMP_IPCMESSAGE),(intptr_t)&mf,ret,0};
|
||||
sendMlIpc(ML_IPC_SEND_PLUGIN_MESSAGE,(WPARAM)&message_result);
|
||||
|
||||
if (menu)
|
||||
{
|
||||
if (mainSendTo.mode == 2)
|
||||
{
|
||||
mainSendTo.menu_id = ret;
|
||||
if (SendMessageW(plugin.hwndParent, WM_WA_IPC, (WPARAM)&mainSendTo, IPC_LIBRARY_SENDTOMENU) == 0xffffffff)
|
||||
{
|
||||
wchar_t buf[FILENAME_SIZE + 1] = {0};
|
||||
wchar_t *end=buf;
|
||||
size_t endSize = 0;
|
||||
const wchar_t *entry = wa2.getFileW(wa2.getCurPlaylistEntry());
|
||||
if (entry && *entry)
|
||||
{
|
||||
StringCchCopyExW(buf, FILENAME_SIZE, entry, &end, &endSize, 0);
|
||||
|
||||
mainSendTo.mode = 3;
|
||||
mainSendTo.data = buf;
|
||||
mainSendTo.data_type = ML_TYPE_FILENAMESW;
|
||||
SendMessageW(plugin.hwndParent, WM_WA_IPC, (WPARAM)&mainSendTo, IPC_LIBRARY_SENDTOMENU);
|
||||
}
|
||||
}
|
||||
}
|
||||
// remove sendto
|
||||
DeleteMenu(songinfomenu, 3, MF_BYPOSITION);
|
||||
}
|
||||
if (mainSendTo.mode)
|
||||
{
|
||||
mainSendTo.mode = 4;
|
||||
SendMessageW(plugin.hwndParent, WM_WA_IPC, (WPARAM)&mainSendTo, IPC_LIBRARY_SENDTOMENU); // cleanup
|
||||
memset(&mainSendTo, 0, sizeof(mainSendTo));
|
||||
}
|
||||
InsertMenuW(songinfomenu, 3, MF_BYPOSITION | MF_STRING, WINAMP_TOGGLE_AUTOSCROLL, olditemstr);
|
||||
if (ret) SendMessageW(wa2.getMainWindow(), WM_COMMAND, ret, 0); // TODO?
|
||||
|
||||
break;
|
||||
}
|
||||
case ACTION_SENDTO:
|
||||
{
|
||||
LRESULT IPC_LIBRARY_SENDTOMENU = SendMessageW(plugin.hwndParent, WM_WA_IPC, (WPARAM)&"LibrarySendToMenu", IPC_REGISTER_WINAMP_IPCMESSAGE);
|
||||
HMENU menu = 0;
|
||||
memset(&mainSendTo, 0, sizeof(mainSendTo));
|
||||
if (IPC_LIBRARY_SENDTOMENU > 65536 && SendMessageW(plugin.hwndParent, WM_WA_IPC, (WPARAM)0, IPC_LIBRARY_SENDTOMENU) == 0xffffffff)
|
||||
{
|
||||
menu = CreatePopupMenu();
|
||||
|
||||
mainSendTo.mode = 1;
|
||||
mainSendTo.hwnd = plugin.hwndParent; // TODO???
|
||||
mainSendTo.data_type = ML_TYPE_FILENAMESW;
|
||||
mainSendTo.build_hMenu = menu;
|
||||
}
|
||||
int ret = DoTrackPopup(menu, TPM_LEFTALIGN | TPM_TOPALIGN | TPM_LEFTBUTTON | TPM_RIGHTBUTTON|TPM_RETURNCMD, p1, p2, wa2.getMainWindow());
|
||||
if (menu)
|
||||
{
|
||||
if (mainSendTo.mode == 2)
|
||||
{
|
||||
mainSendTo.menu_id = ret;
|
||||
if (SendMessageW(plugin.hwndParent, WM_WA_IPC, (WPARAM)&mainSendTo, IPC_LIBRARY_SENDTOMENU) == 0xffffffff)
|
||||
{
|
||||
wchar_t buf[FILENAME_SIZE + 1] = {0};
|
||||
wchar_t *end=buf;
|
||||
size_t endSize = 0;
|
||||
const wchar_t *entry = wa2.getFileW(wa2.getCurPlaylistEntry());
|
||||
if (entry && *entry)
|
||||
{
|
||||
StringCchCopyExW(buf, FILENAME_SIZE, entry, &end, &endSize, 0);
|
||||
|
||||
mainSendTo.mode = 3;
|
||||
mainSendTo.data = buf;
|
||||
mainSendTo.data_type = ML_TYPE_FILENAMESW;
|
||||
SendMessageW(plugin.hwndParent, WM_WA_IPC, (WPARAM)&mainSendTo, IPC_LIBRARY_SENDTOMENU);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (mainSendTo.mode)
|
||||
{
|
||||
mainSendTo.mode = 4;
|
||||
SendMessageW(plugin.hwndParent, WM_WA_IPC, (WPARAM)&mainSendTo, IPC_LIBRARY_SENDTOMENU); // cleanup
|
||||
memset(&mainSendTo, 0, sizeof(mainSendTo));
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
case ACTION_TRACKINFO:
|
||||
{
|
||||
wa2.openTrackInfo();
|
||||
break;
|
||||
}
|
||||
}
|
||||
in_menu = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
HMENU MenuActions::makeSkinOptionsSubMenu(GUID g, int *cmdoffset)
|
||||
{
|
||||
CfgItem *item = WASABI_API_CONFIG->config_getCfgItemByGuid(g);
|
||||
if (item != NULL)
|
||||
{
|
||||
HMENU menu = CreatePopupMenu();
|
||||
int n = MIN(item->getNumAttributes(), 500);
|
||||
for (int i = 0;i < n;i++)
|
||||
{
|
||||
const wchar_t *attr = item->enumAttribute(i);
|
||||
if (attr && *attr)
|
||||
{
|
||||
HMENU submenu = NULL;
|
||||
wchar_t txt[256] = {0};
|
||||
item->getData(attr, txt, 256);
|
||||
GUID g = nsGUID::fromCharW(txt);
|
||||
if (g != INVALID_GUID)
|
||||
{ // submenu !
|
||||
submenu = makeSkinOptionsSubMenu(g, cmdoffset);
|
||||
}
|
||||
int v = item->getDataAsInt(attr, 0);
|
||||
if (WCSCASEEQLSAFE(txt, L"-"))
|
||||
{
|
||||
InsertMenu(menu, i, MF_SEPARATOR | MF_BYPOSITION, 0, NULL);
|
||||
}
|
||||
else
|
||||
InsertMenuW(menu, i, ((v && !submenu) ? MF_CHECKED : MF_UNCHECKED) | MF_STRING | MF_BYPOSITION | (submenu ? MF_POPUP : 0), submenu ? (UINT_PTR)submenu : 44000 + *cmdoffset, _(attr));
|
||||
}
|
||||
(*cmdoffset)++;
|
||||
}
|
||||
return menu;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void MenuActions::installSkinOptions(HMENU menu)
|
||||
{
|
||||
optionsmenu_wa = 0;
|
||||
HMENU omenu = NULL;
|
||||
if (menu == NULL)
|
||||
{
|
||||
optionsmenu_wa = 1;
|
||||
menu = wa2.getMenuBarMenu(Winamp2FrontEnd::WA2_MAINMENUBAR_OPTIONS);
|
||||
omenu = GetSubMenu(wa2.getPopupMenu(), 11 + wa2.adjustOptionsPopupMenu(0));
|
||||
}
|
||||
int pos2 = 12;
|
||||
int cmdoffset = 0;
|
||||
int pos = optionsmenu_wa ? wa2.adjustFFOptionsMenu(0) + 6 + NUMSTATICWINDOWS /*+ 1*//* + 9*/ : 0;
|
||||
lowest_itempos = pos;
|
||||
int insertedline = 0;
|
||||
if (menu && optionsmenuitems)
|
||||
{
|
||||
int n = MIN(optionsmenuitems->getNumAttributes(), 500);
|
||||
for (int i = 0;i < n;i++)
|
||||
{
|
||||
const wchar_t *attr = optionsmenuitems->enumAttribute(i);
|
||||
if (attr && *attr)
|
||||
{
|
||||
HMENU submenu = NULL;
|
||||
wchar_t txt[256] = {0};
|
||||
optionsmenuitems->getData(attr, txt, 256);
|
||||
GUID g = nsGUID::fromCharW(txt);
|
||||
if (g != INVALID_GUID)
|
||||
{ // submenu !
|
||||
submenu = makeSkinOptionsSubMenu(g, &cmdoffset);
|
||||
if (submenu)
|
||||
menulist.addItem(submenu);
|
||||
}
|
||||
int v = optionsmenuitems->getDataAsInt(attr, 0);
|
||||
if (optionsmenu_wa && !insertedline)
|
||||
{
|
||||
wa2.adjustFFOptionsMenu(1);
|
||||
insertedline = 1;
|
||||
InsertMenu(menu, pos++, MF_SEPARATOR | MF_BYPOSITION, 0, NULL);
|
||||
if (omenu) InsertMenu(omenu, pos2++, MF_SEPARATOR | MF_BYPOSITION, 0, NULL);
|
||||
}
|
||||
if (optionsmenu_wa) wa2.adjustFFOptionsMenu(1);
|
||||
if (WCSCASEEQLSAFE(txt, L"-"))
|
||||
{
|
||||
InsertMenu(menu, pos++, MF_SEPARATOR | MF_BYPOSITION, 0, NULL);
|
||||
if (omenu) InsertMenu(omenu, pos2++, MF_SEPARATOR | MF_BYPOSITION, 0, NULL);
|
||||
}
|
||||
else
|
||||
InsertMenuW(menu, pos++, (v ? MF_CHECKED : MF_UNCHECKED) | MF_STRING | MF_BYPOSITION | (submenu ? MF_POPUP : 0), submenu ? (UINT_PTR)submenu : 44000 + cmdoffset, _(attr));
|
||||
if (omenu) InsertMenuW(omenu, pos2++, (v ? MF_CHECKED : MF_UNCHECKED) | MF_STRING | MF_BYPOSITION | (submenu ? MF_POPUP : 0), submenu ? (UINT_PTR)submenu : 44000 + cmdoffset, _(attr));
|
||||
}
|
||||
cmdoffset++;
|
||||
}
|
||||
ffoptionstop = 44000 + cmdoffset;
|
||||
}
|
||||
// insert colorthemes submenu
|
||||
if (omenu)
|
||||
{
|
||||
PtrListQuickSorted<ColorThemeSlot, ColorThemeSlotSort> sortedthemes;
|
||||
int fn = MIN(WASABI_API_SKIN->colortheme_getNumColorSets(), 500);
|
||||
for (int t = 0;t < fn;t++)
|
||||
sortedthemes.addItem(new ColorThemeSlot(WASABI_API_SKIN->colortheme_enumColorSet(t), t));
|
||||
if (!insertedline)
|
||||
{
|
||||
wa2.adjustFFOptionsMenu(1);
|
||||
InsertMenu(menu, pos++, MF_SEPARATOR | MF_BYPOSITION, 0, NULL);
|
||||
if (omenu) InsertMenu(omenu, pos2++, MF_SEPARATOR | MF_BYPOSITION, 0, NULL);
|
||||
}
|
||||
HMENU submenu = CreatePopupMenu();
|
||||
if (WASABI_API_SKIN->colortheme_getNumColorSets() == 0)
|
||||
{
|
||||
InsertMenuW(submenu, 0, MF_GRAYED | MF_STRING | MF_BYPOSITION, 0, WASABI_API_LNGSTRINGW(IDS_NO_THEME_AVAILABLE));
|
||||
}
|
||||
else
|
||||
{
|
||||
int n = sortedthemes.getNumItems();
|
||||
for (int i = 0;i < n;i++)
|
||||
{
|
||||
const wchar_t *ct = sortedthemes.enumItem(i)->name;
|
||||
int entry = sortedthemes.enumItem(i)->entry;
|
||||
int iscurrent = WCSCASEEQLSAFE(ct, WASABI_API_SKIN->colortheme_getColorSet());
|
||||
InsertMenuW(submenu, i, (iscurrent ? MF_CHECKED : MF_UNCHECKED) | MF_STRING | MF_BYPOSITION, 44500 + entry, ct);
|
||||
}
|
||||
}
|
||||
if (optionsmenu_wa) wa2.adjustFFOptionsMenu(1);
|
||||
InsertMenuW(menu, pos++, MF_STRING | MF_BYPOSITION | (submenu ? MF_POPUP : 0), submenu ? (UINT_PTR)submenu : 44000 + cmdoffset, WASABI_API_LNGSTRINGW(IDS_COLOR_THEMES));
|
||||
if (omenu) InsertMenuW(omenu, pos2++, MF_STRING | MF_BYPOSITION | (submenu ? MF_POPUP : 0), submenu ? (UINT_PTR)submenu : 44000 + cmdoffset, WASABI_API_LNGSTRINGW(IDS_COLOR_THEMES));
|
||||
cmdoffset++;
|
||||
sortedthemes.deleteAll();
|
||||
}
|
||||
highest_itempos = pos;
|
||||
}
|
||||
|
||||
void MenuActions::removeSkinOptions()
|
||||
{
|
||||
if (highest_itempos == -1 || !optionsmenu_wa) return ;
|
||||
for (int j = 0;j < menulist.getNumItems();j++)
|
||||
DestroyMenu(menulist.enumItem(j));
|
||||
menulist.removeAll();
|
||||
|
||||
HMENU menu = wa2.getMenuBarMenu(Winamp2FrontEnd::WA2_MAINMENUBAR_OPTIONS);
|
||||
HMENU omenu = GetSubMenu(wa2.getPopupMenu(), 11 + wa2.adjustOptionsPopupMenu(0));
|
||||
if (menu && optionsmenuitems)
|
||||
{
|
||||
for (int i = lowest_itempos;i < highest_itempos;i++)
|
||||
{
|
||||
RemoveMenu(menu, lowest_itempos, MF_BYPOSITION);
|
||||
if (omenu) RemoveMenu(omenu, 12, MF_BYPOSITION);
|
||||
wa2.adjustFFOptionsMenu( -1);
|
||||
}
|
||||
}
|
||||
highest_itempos = -1;
|
||||
}
|
||||
|
||||
int MenuActions::toggleOption(int n, GUID guid, int *cmdoffset)
|
||||
{
|
||||
int _cmdoffset = 0;
|
||||
if (!cmdoffset) cmdoffset = &_cmdoffset;
|
||||
CfgItem *item = NULL;
|
||||
if (guid == INVALID_GUID)
|
||||
item = optionsmenuitems;
|
||||
else
|
||||
item = WASABI_API_CONFIG->config_getCfgItemByGuid(guid);
|
||||
|
||||
if (!item) // not sure why this happens, but it happened in a crash report so I'm going to check for it.
|
||||
return 1; // TODO: guru
|
||||
|
||||
for (int i = 0; i < item->getNumAttributes();i++)
|
||||
{
|
||||
const wchar_t *name = item->enumAttribute(i);
|
||||
if (name && *name)
|
||||
{
|
||||
wchar_t txt[256] = {0};
|
||||
item->getData(name, txt, 256);
|
||||
GUID g = nsGUID::fromCharW(txt);
|
||||
if (g != INVALID_GUID)
|
||||
{ // submenu !
|
||||
if (toggleOption(n, g, cmdoffset)) return 1;
|
||||
}
|
||||
if (*cmdoffset == n)
|
||||
{
|
||||
int newv = item->getDataAsInt(name) ? 0 : 1;
|
||||
item->setDataAsInt(name, newv);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
(*cmdoffset)++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
const wchar_t* MenuActions::localizeSkinWindowName(const wchar_t* attr)
|
||||
{
|
||||
static wchar_t tweaked_attr[96];
|
||||
ZERO(tweaked_attr);
|
||||
|
||||
// allows us to map some of the common actions to localised versions (primarily with bundled skins)
|
||||
if(!_wcsicmp(attr,L"Equalizer\tAlt+G"))
|
||||
{
|
||||
// if there's a match then we can force things to use the previous menu
|
||||
// string (fixes localisation inconsistancy without altering the scripts!)
|
||||
lstrcpynW(tweaked_attr, eqmenustring, 96);
|
||||
}
|
||||
else if(!_wcsicmp(attr,L"Skin Settings\tAlt+C"))
|
||||
{
|
||||
WASABI_API_LNGSTRINGW_BUF(IDS_SKIN_SETTINGS,tweaked_attr,96);
|
||||
}
|
||||
else if(!_wcsicmp(attr,L"Web Browser\tAlt+X"))
|
||||
{
|
||||
WASABI_API_LNGSTRINGW_BUF(IDS_WEB_BROWSER,tweaked_attr,96);
|
||||
}
|
||||
else if(!_wcsicmp(attr,L"Album Art\tAlt+A"))
|
||||
{
|
||||
WASABI_API_LNGSTRINGW_BUF(IDS_ALBUM_ART,tweaked_attr,96);
|
||||
}
|
||||
else if(!_wcsicmp(attr,L"Color Editor"))
|
||||
{
|
||||
WASABI_API_LNGSTRINGW_BUF(IDS_COLOR_EDITOR,tweaked_attr,96);
|
||||
}
|
||||
else
|
||||
{
|
||||
return attr;
|
||||
}
|
||||
return tweaked_attr;
|
||||
}
|
||||
|
||||
// FIX ME - menu weirdness going on!!
|
||||
void MenuActions::installSkinWindowOptions()
|
||||
{
|
||||
HMENU menu = wa2.getMenuBarMenu(Winamp2FrontEnd::WA2_MAINMENUBAR_WINDOWS);
|
||||
int pos = lowest_witempos = wa2.adjustFFWindowsMenu(0) + NUMSTATICWINDOWS;
|
||||
HMENU omenu = wa2.getPopupMenu();
|
||||
int pos2 = lowest_witempos2 = wa2.adjustOptionsPopupMenu(0) + 6 + NUMSTATICWINDOWS + 1;
|
||||
|
||||
MENUITEMINFOW mii = {sizeof(mii), };
|
||||
mii.fMask = MIIM_TYPE | MIIM_DATA | MIIM_ID | MIIM_STATE | MIIM_SUBMENU;
|
||||
mii.fType = MFT_STRING;
|
||||
mii.wID = 42000;
|
||||
mii.dwItemData = 0xD02; // use this as a check so we're only removing the correct items!!
|
||||
|
||||
if (menu && windowsmenuitems)
|
||||
{
|
||||
int n = MIN(windowsmenuitems->getNumAttributes(), 500);
|
||||
int cmdoffset = 0;
|
||||
for (int i = 0;i < n;i++)
|
||||
{
|
||||
const wchar_t *attr = windowsmenuitems->enumAttribute(i);
|
||||
|
||||
if (attr && *attr)
|
||||
{
|
||||
HMENU submenu = NULL;
|
||||
wchar_t txt[256] = {0};
|
||||
windowsmenuitems->getData(attr, txt, 256);
|
||||
GUID g = nsGUID::fromCharW(txt);
|
||||
if (g != INVALID_GUID)
|
||||
{ // submenu !
|
||||
submenu = makeSkinOptionsSubMenu(g, &cmdoffset);
|
||||
if (submenu)
|
||||
wmenulist.addItem(submenu);
|
||||
}
|
||||
int v = windowsmenuitems->getDataAsInt(attr, 0);
|
||||
wa2.adjustFFWindowsMenu(1);
|
||||
wa2.adjustOptionsPopupMenu(1);
|
||||
|
||||
attr = localizeSkinWindowName(attr);
|
||||
const wchar_t* t = _(attr);
|
||||
mii.dwTypeData = const_cast<wchar_t *>(t);
|
||||
|
||||
if (WCSCASEEQLSAFE(txt, L"-"))
|
||||
{
|
||||
InsertMenu(menu, pos++, MF_SEPARATOR | MF_BYPOSITION, 0, NULL);
|
||||
InsertMenu(omenu, pos2++, MF_SEPARATOR | MF_BYPOSITION, 0, NULL);
|
||||
}
|
||||
else{
|
||||
mii.cch = wcslen(mii.dwTypeData);
|
||||
mii.fState = (v ? MFS_CHECKED : 0);
|
||||
mii.wID = 42000 + cmdoffset;
|
||||
mii.hSubMenu = submenu;
|
||||
InsertMenuItemW(menu, pos++, TRUE, &mii);
|
||||
}
|
||||
InsertMenuItemW(omenu, pos2++, TRUE, &mii);
|
||||
}
|
||||
cmdoffset++;
|
||||
}
|
||||
ffwoptionstop = 42000 + cmdoffset;
|
||||
}
|
||||
highest_witempos = pos;
|
||||
highest_witempos2 = pos2;
|
||||
}
|
||||
|
||||
void MenuActions::removeSkinWindowOptions()
|
||||
{
|
||||
if (highest_witempos == -1) return ;
|
||||
for (int j = 0;j < wmenulist.getNumItems();j++)
|
||||
DestroyMenu(wmenulist.enumItem(j));
|
||||
wmenulist.removeAll();
|
||||
|
||||
HMENU menu = wa2.getMenuBarMenu(Winamp2FrontEnd::WA2_MAINMENUBAR_WINDOWS);
|
||||
HMENU omenu = wa2.getPopupMenu();
|
||||
if (menu && windowsmenuitems)
|
||||
{
|
||||
for(int i = GetMenuItemCount(menu)-1; i != 0; i--)
|
||||
{
|
||||
MENUITEMINFOW info = {sizeof(info), MIIM_DATA, 0, };
|
||||
if(GetMenuItemInfoW(menu,i,TRUE,&info))
|
||||
{
|
||||
if(info.dwItemData == 0xD02){
|
||||
RemoveMenu(menu,i,MF_BYPOSITION);
|
||||
wa2.adjustFFWindowsMenu(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = GetMenuItemCount(omenu)-1; i != 0; i--)
|
||||
{
|
||||
MENUITEMINFOW info = {sizeof(info), MIIM_DATA, 0, };
|
||||
if(GetMenuItemInfoW(omenu,i,TRUE,&info))
|
||||
{
|
||||
if(info.dwItemData == 0xD02){
|
||||
RemoveMenu(omenu,i,MF_BYPOSITION);
|
||||
wa2.adjustOptionsPopupMenu(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*for (int i = highest_witempos;i >= lowest_witempos;i--)
|
||||
{
|
||||
RemoveMenu(menu, i, MF_BYPOSITION);
|
||||
wa2.adjustFFWindowsMenu(-1);
|
||||
}
|
||||
|
||||
for (int i = highest_witempos2;i >= lowest_witempos2;i--)
|
||||
{
|
||||
RemoveMenu(menu, i, MF_BYPOSITION);
|
||||
wa2.adjustOptionsPopupMenu(-1);
|
||||
}
|
||||
/*/
|
||||
/*for (int i = lowest_witempos;i < highest_witempos;i++)
|
||||
{
|
||||
RemoveMenu(menu, lowest_witempos, MF_BYPOSITION);
|
||||
wa2.adjustFFWindowsMenu(-1);
|
||||
}
|
||||
|
||||
for (int i = lowest_witempos2;i < highest_witempos2;i++)
|
||||
{
|
||||
RemoveMenu(omenu, lowest_witempos2, MF_BYPOSITION);
|
||||
wa2.adjustOptionsPopupMenu(-1);
|
||||
}/**/
|
||||
}
|
||||
highest_witempos = -1;
|
||||
highest_witempos2 = -1;
|
||||
}
|
||||
|
||||
int MenuActions::toggleWindowOption(int n, GUID guid, int *cmdoffset)
|
||||
{
|
||||
int _cmdoffset = 0;
|
||||
if (!cmdoffset) cmdoffset = &_cmdoffset;
|
||||
CfgItem *item = NULL;
|
||||
if (guid == INVALID_GUID)
|
||||
item = windowsmenuitems;
|
||||
else
|
||||
item = WASABI_API_CONFIG->config_getCfgItemByGuid(guid);
|
||||
|
||||
for (int i = 0; i < item->getNumAttributes();i++)
|
||||
{
|
||||
const wchar_t *name = item->enumAttribute(i);
|
||||
if (name && *name)
|
||||
{
|
||||
wchar_t txt[256] = {0};
|
||||
item->getData(name, txt, 256);
|
||||
GUID g = nsGUID::fromCharW(txt);
|
||||
if (g != INVALID_GUID)
|
||||
{ // submenu !
|
||||
if (toggleWindowOption(n, g, cmdoffset)) return 1;
|
||||
}
|
||||
if (*cmdoffset == n)
|
||||
{
|
||||
int newv = item->getDataAsInt(name) ? 0 : 1;
|
||||
item->setDataAsInt(name, newv);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
(*cmdoffset)++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
#ifndef _MENUACTIONS_H
|
||||
#define _MENUACTIONS_H
|
||||
|
||||
#include <api/service/svcs/svc_action.h>
|
||||
|
||||
extern int ffoptionstop;
|
||||
extern int ffwoptionstop;
|
||||
extern int in_menu;
|
||||
|
||||
class MenuActions : public svc_actionI {
|
||||
public :
|
||||
MenuActions();
|
||||
virtual ~MenuActions();
|
||||
|
||||
static const char *getServiceName() { return "Menu Actions"; }
|
||||
virtual int onActionId(int pvtid, const wchar_t *action, const wchar_t *param=NULL, int p1=0, int p2=0, void *data=NULL, int datalen=0, ifc_window *source=NULL);
|
||||
|
||||
static void installSkinOptions(HMENU menu=NULL);
|
||||
static void removeSkinOptions();
|
||||
static int toggleOption(int n, GUID g=INVALID_GUID, int *cmdoffset=NULL);
|
||||
|
||||
static void installSkinWindowOptions();
|
||||
static void removeSkinWindowOptions();
|
||||
static int toggleWindowOption(int n, GUID g=INVALID_GUID, int *cmdoffset=NULL);
|
||||
|
||||
static HMENU makeSkinOptionsSubMenu(GUID g, int *cmdoffset);
|
||||
|
||||
static const wchar_t* localizeSkinWindowName(const wchar_t*);
|
||||
|
||||
enum {
|
||||
_ACTION_MENU = 0,
|
||||
_ACTION_SYSMENU,
|
||||
_ACTION_CONTROLMENU,
|
||||
ACTION_WA5FILEMENU,
|
||||
ACTION_WA5PLAYMENU,
|
||||
ACTION_WA5OPTIONSMENU,
|
||||
ACTION_WA5WINDOWSMENU,
|
||||
ACTION_WA5HELPMENU,
|
||||
ACTION_WA5PEFILEMENU,
|
||||
ACTION_WA5PEPLAYLISTMENU,
|
||||
ACTION_WA5PESORTMENU,
|
||||
ACTION_WA5PEHELPMENU,
|
||||
ACTION_WA5MLFILEMENU,
|
||||
ACTION_WA5MLVIEWMENU,
|
||||
ACTION_WA5MLHELPMENU,
|
||||
ACTION_PEADD,
|
||||
ACTION_PEREM,
|
||||
ACTION_PESEL,
|
||||
ACTION_PEMISC,
|
||||
ACTION_PELIST,
|
||||
ACTION_PELISTOFLISTS,
|
||||
ACTION_VIDFS,
|
||||
ACTION_VID1X,
|
||||
ACTION_VID2X,
|
||||
ACTION_VIDTV,
|
||||
ACTION_VIDMISC,
|
||||
ACTION_VISNEXT,
|
||||
ACTION_VISPREV,
|
||||
ACTION_VISRANDOM,
|
||||
ACTION_VISFS,
|
||||
ACTION_VISCFG,
|
||||
ACTION_VISMENU,
|
||||
ACTION_TRACKINFO,
|
||||
ACTION_TRACKMENU,
|
||||
ACTION_SENDTO,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
class ColorThemeSlot
|
||||
{
|
||||
public:
|
||||
ColorThemeSlot(const wchar_t *_name, int _entry) : name(_name), entry(_entry) {}
|
||||
virtual ~ColorThemeSlot() {}
|
||||
StringW name;
|
||||
int entry;
|
||||
};
|
||||
|
||||
class ColorThemeSlotSort {
|
||||
public:
|
||||
// comparator for sorting
|
||||
static int compareItem(ColorThemeSlot *p1, ColorThemeSlot *p2) {
|
||||
return wcscmp(p1->name, p2->name);
|
||||
}
|
||||
// comparator for searching
|
||||
static int compareAttrib(const wchar_t *attrib, ColorThemeSlot *item) {
|
||||
return wcscmp(attrib, item->name);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,93 @@
|
||||
#include "precomp__gen_ff.h"
|
||||
#include "minibrowserCOM.h"
|
||||
|
||||
MinibrowserCOM::MinibrowserCOM(BrowserWnd* brw)
|
||||
{
|
||||
this->brw = brw;
|
||||
}
|
||||
|
||||
HRESULT __stdcall MinibrowserCOM::GetTypeInfoCount(unsigned int FAR* pctinfo)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT __stdcall MinibrowserCOM::GetTypeInfo(unsigned int iTInfo, LCID lcid, ITypeInfo FAR* FAR* ppTInfo)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT __stdcall MinibrowserCOM::GetIDsOfNames( REFIID riid, OLECHAR FAR* FAR* rgszNames, unsigned int cNames, LCID lcid, DISPID FAR* rgDispId)
|
||||
{
|
||||
int notFound = false;
|
||||
for (unsigned int i = 0; i != cNames; i++)
|
||||
{
|
||||
if (!_wcsicmp(rgszNames[i], L"messageToMaki"))
|
||||
{
|
||||
rgDispId[i] = MINIBROWSERCOM_MAKI_MESSAGETOMAKI;
|
||||
continue;
|
||||
}
|
||||
notFound = true;
|
||||
}
|
||||
|
||||
if (!notFound)
|
||||
return S_OK;
|
||||
|
||||
return DISP_E_UNKNOWNNAME;
|
||||
}
|
||||
|
||||
HRESULT __stdcall MinibrowserCOM::Invoke(DISPID dispid, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS FAR *pdispparams, VARIANT FAR *pvarResult, EXCEPINFO FAR * pexecinfo, unsigned int FAR *puArgErr)
|
||||
{
|
||||
switch (dispid)
|
||||
{
|
||||
case MINIBROWSERCOM_MAKI_MESSAGETOMAKI:
|
||||
/* var ret = window.external.messageToMaki(str1, str2, int1, int2, int3) */
|
||||
/* keep in mind that the args are passed in reverse order! */
|
||||
|
||||
/*if (wFlags != DISPATCH_METHOD)
|
||||
return DISP_E_MEMBERNOTFOUND;*/
|
||||
if (pdispparams->cArgs != 5)
|
||||
return DISP_E_BADPARAMCOUNT;
|
||||
|
||||
const wchar_t * ret = this->brw->messageToMaki(pdispparams->rgvarg[4].bstrVal, pdispparams->rgvarg[3].bstrVal, pdispparams->rgvarg[2].iVal, pdispparams->rgvarg[1].iVal, pdispparams->rgvarg[0].iVal);
|
||||
|
||||
// (mpdeimos) we need to check this here since in JS one can omit the return value. In this case we would get a NPE here.
|
||||
if (pvarResult != NULL)
|
||||
{
|
||||
BSTR returnValue = SysAllocString(ret);
|
||||
VariantInit(pvarResult);
|
||||
V_VT(pvarResult) = VT_BSTR;
|
||||
V_BSTR(pvarResult) = returnValue;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return DISP_E_MEMBERNOTFOUND;
|
||||
}
|
||||
|
||||
STDMETHODIMP MinibrowserCOM::QueryInterface(REFIID riid, PVOID *ppvObject)
|
||||
{
|
||||
if (!ppvObject)
|
||||
return E_POINTER;
|
||||
else if (IsEqualIID(riid, IID_IDispatch))
|
||||
*ppvObject = (IDispatch *)this;
|
||||
else if (IsEqualIID(riid, IID_IUnknown))
|
||||
*ppvObject = this;
|
||||
else
|
||||
{
|
||||
*ppvObject = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
AddRef();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ULONG MinibrowserCOM::AddRef(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
ULONG MinibrowserCOM::Release(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
#include <ocidl.h>
|
||||
#include <api/skin/widgets/mb/iebrowser.h>
|
||||
|
||||
class MinibrowserCOM : IDispatch
|
||||
{
|
||||
public:
|
||||
MinibrowserCOM(BrowserWnd* brw);
|
||||
/** IUnknown */
|
||||
STDMETHOD(QueryInterface)(REFIID riid, PVOID *ppvObject);
|
||||
STDMETHOD_(ULONG, AddRef)(void);
|
||||
STDMETHOD_(ULONG, Release)(void);
|
||||
/** IDispatch */
|
||||
STDMETHOD (GetTypeInfoCount)(unsigned int FAR* pctinfo);
|
||||
STDMETHOD (GetTypeInfo)(unsigned int iTInfo, LCID lcid, ITypeInfo FAR* FAR* ppTInfo);
|
||||
STDMETHOD (GetIDsOfNames)(REFIID riid,LPOLESTR __RPC_FAR *rgszNames,UINT cNames,LCID lcid,DISPID __RPC_FAR *rgDispId);
|
||||
STDMETHOD (Invoke)(DISPID dispid, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS FAR *pdispparams, VARIANT FAR *pvarResult, EXCEPINFO FAR * pexecinfo, unsigned int FAR *puArgErr);
|
||||
|
||||
enum
|
||||
{
|
||||
MINIBROWSERCOM_MAKI_MESSAGETOMAKI = 666,
|
||||
};
|
||||
private:
|
||||
BrowserWnd* brw;
|
||||
};
|
||||
@@ -0,0 +1,7 @@
|
||||
// precomp__gen_ff.cpp : source file that includes just the standard includes
|
||||
// TheLibrary.pch will be the pre-compiled header
|
||||
// precomp.obj will contain the pre-compiled type information
|
||||
|
||||
#include "precomp__gen_ff.h"
|
||||
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
// precomp__gen_ff.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#ifndef NULLSOFT_GEN_FF_PRECOMP_H
|
||||
#define NULLSOFT_GEN_FF_PRECOMP_H
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0500
|
||||
#endif
|
||||
#ifndef WINVER
|
||||
#define WINVER 0x0501
|
||||
#endif
|
||||
|
||||
|
||||
// Most used wasabi headers
|
||||
|
||||
#include <wasabicfg.h>
|
||||
//#include <api.h>
|
||||
#include <api__gen_ff.h>
|
||||
#include <bfc/platform/platform.h>
|
||||
#include <bfc/assert.h>
|
||||
#include <bfc/common.h>
|
||||
#include <bfc/wasabi_std.h>
|
||||
#include <bfc/ptrlist.h>
|
||||
#include <bfc/stack.h>
|
||||
#include <bfc/tlist.h>
|
||||
#include <bfc/string/bfcstring.h>
|
||||
#include <bfc/string/StringW.h>
|
||||
#include <bfc/wasabi_std_wnd.h>
|
||||
#include <bfc/std_string.h>
|
||||
#include <bfc/dispatch.h>
|
||||
#include <bfc/nsGUID.h>
|
||||
#include <api/service/servicei.h>
|
||||
|
||||
#include <api/service/waservicefactory.h>
|
||||
|
||||
#include <api/config/cfgscriptobj.h>
|
||||
|
||||
#include <api/wnd/rootwnd.h>
|
||||
#include <api/wnd/basewnd.h>
|
||||
#include <api/wnd/wndclass/guiobjwnd.h>
|
||||
|
||||
#include <api/wnd/wndclass/guiobjwnd.h>
|
||||
#include <api/script/objects/guiobject.h>
|
||||
|
||||
#include <api/script/scriptobj.h>
|
||||
#include <api/script/objcontroller.h>
|
||||
#include <api/script/scriptvar.h>
|
||||
|
||||
#include "wa2core.h"
|
||||
#include "wa2frontend.h"
|
||||
#include "wa2wndembed.h"
|
||||
|
||||
#include <tataki/canvas/canvas.h>
|
||||
#include <tataki/region/region.h>
|
||||
#include <tataki/bitmap/bitmap.h>
|
||||
|
||||
#include <api/skin/skin.h>
|
||||
#include <api/skin/skinparse.h>
|
||||
#include <api/skin/widgets.h>
|
||||
|
||||
#include <api/timer/timerclient.h>
|
||||
|
||||
#include <api/skin/widgets.h>
|
||||
|
||||
|
||||
|
||||
#endif // _PRECOMP_H
|
||||
@@ -0,0 +1,136 @@
|
||||
#include "precomp__gen_ff.h"
|
||||
#include "main.h"
|
||||
#include "resource.h"
|
||||
#include "prefs.h"
|
||||
#include "wa2cfgitems.h"
|
||||
#include "wa2frontend.h"
|
||||
#include "../Agave/Language/api_language.h"
|
||||
#include "gen.h"
|
||||
#include <commctrl.h>
|
||||
#include <windowsx.h>
|
||||
|
||||
void turnonoff(HWND wnd, int *t, int n, int v) {
|
||||
for (int i=0;i<n;i++) {
|
||||
EnableWindow(GetDlgItem(wnd, t[i]), v);
|
||||
}
|
||||
}
|
||||
|
||||
extern void initFFApi();
|
||||
extern Wa2CfgItems *cfgitems;
|
||||
extern HINSTANCE hInstance;
|
||||
|
||||
_int last_page(L"Last Page", 0);
|
||||
Wa2FFOptions *ffoptions = NULL;
|
||||
HWND subWnd = NULL, tabwnd = NULL;
|
||||
int subWndId = -1;
|
||||
extern int m_are_we_loaded;
|
||||
int toggle_from_wa2 = 0;
|
||||
|
||||
void _dosetsel(HWND hwndDlg)
|
||||
{
|
||||
tabwnd = GetDlgItem(hwndDlg,IDC_TAB1);
|
||||
int sel=TabCtrl_GetCurSel(tabwnd);
|
||||
|
||||
if (sel >= 0 && (sel != last_page.getValueAsInt() || !subWnd))
|
||||
{
|
||||
last_page.setValueAsInt(sel);
|
||||
if (subWnd) DestroyWindow(subWnd);
|
||||
subWnd = NULL;
|
||||
subWndId = -1;
|
||||
|
||||
UINT t=0;
|
||||
DLGPROC p=0;
|
||||
switch (sel)
|
||||
{
|
||||
case 0: t=IDD_PREFS_GENERAL; p=ffPrefsProc1; subWndId = 0; break;
|
||||
case 1: t=IDD_PREFS_WINDOWS; p=ffPrefsProc4; subWndId = 1; break;
|
||||
case 2: t=IDD_PREFS_FONTS; p=ffPrefsProc2; subWndId = 2; break;
|
||||
case 3: t=IDD_PREFS_THEMES; p=ffPrefsProc3; subWndId = 3; break;
|
||||
case 4: t=IDD_PREFS_SKIN; p=ffPrefsProc5; subWndId = 5; break;
|
||||
}
|
||||
if (t) subWnd=WASABI_API_CREATEDIALOGW(t,hwndDlg,p);
|
||||
|
||||
if (IsWindow(subWnd))
|
||||
{
|
||||
RECT r = {0};
|
||||
GetClientRect(tabwnd,&r);
|
||||
TabCtrl_AdjustRect(tabwnd,FALSE,&r);
|
||||
SetWindowPos(subWnd,HWND_TOP,r.left,r.top,r.right-r.left,r.bottom-r.top,SWP_NOACTIVATE);
|
||||
ShowWindow(subWnd,SW_SHOWNA);
|
||||
}
|
||||
|
||||
if(!SendMessageW(plugin.hwndParent,WM_WA_IPC,IPC_ISWINTHEMEPRESENT,IPC_USE_UXTHEME_FUNC))
|
||||
{
|
||||
SendMessageW(plugin.hwndParent,WM_WA_IPC,(WPARAM)tabwnd,IPC_USE_UXTHEME_FUNC);
|
||||
SendMessageW(plugin.hwndParent,WM_WA_IPC,(WPARAM)subWnd,IPC_USE_UXTHEME_FUNC);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define TabCtrl_InsertItemW(hwnd, iItem, pitem) \
|
||||
(int)SNDMSG((hwnd), TCM_INSERTITEMW, (WPARAM)(int)(iItem), (LPARAM)(const TC_ITEMW *)(pitem))
|
||||
|
||||
// frame proc
|
||||
INT_PTR CALLBACK ffPrefsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,LPARAM lParam) {
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
if (WASABI_API_APP == NULL)
|
||||
{
|
||||
// wasabi is not initialized ! we need to init before we can access cfgitems otherwise we'd have
|
||||
// to mirror their values with winamp.ini and that'd be seriously crappy
|
||||
initFFApi();
|
||||
}
|
||||
|
||||
if (!ffoptions)
|
||||
ffoptions = new Wa2FFOptions();
|
||||
|
||||
TCITEMW item = {0};
|
||||
HWND tabwnd=GetDlgItem(hwndDlg,IDC_TAB1);
|
||||
item.mask=TCIF_TEXT;
|
||||
item.pszText=WASABI_API_LNGSTRINGW(IDS_GENERAL);
|
||||
TabCtrl_InsertItemW(tabwnd,0,&item);
|
||||
item.pszText=WASABI_API_LNGSTRINGW(IDS_WINDOW_SETTINGS);
|
||||
TabCtrl_InsertItemW(tabwnd,1,&item);
|
||||
item.pszText=WASABI_API_LNGSTRINGW(IDS_FONT_RENDERING);
|
||||
TabCtrl_InsertItemW(tabwnd,2,&item);
|
||||
if (m_are_we_loaded)
|
||||
{
|
||||
item.pszText=WASABI_API_LNGSTRINGW(IDS_COLOR_THEMES);
|
||||
TabCtrl_InsertItemW(tabwnd,3,&item);
|
||||
item.pszText=WASABI_API_LNGSTRINGW(IDS_CURRENT_SKIN);
|
||||
TabCtrl_InsertItemW(tabwnd,4,&item);
|
||||
}
|
||||
|
||||
TabCtrl_SetCurSel(tabwnd,last_page.getValueAsInt());
|
||||
_dosetsel(hwndDlg);
|
||||
}
|
||||
return 0;
|
||||
|
||||
case WM_NOTIFY:
|
||||
{
|
||||
LPNMHDR p=(LPNMHDR) lParam;
|
||||
if (p->idFrom == IDC_TAB1 && p->code == TCN_SELCHANGE)
|
||||
{
|
||||
_dosetsel(hwndDlg);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
subWnd=NULL;
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Wa2FFOptions::Wa2FFOptions() : CfgItemI(L"Winamp5", Wa2FFOptionsGuid) {
|
||||
registerAttribute(&last_page);
|
||||
}
|
||||
|
||||
int ComboBox_AddStringW(HWND list, const wchar_t *string)
|
||||
{
|
||||
return SendMessageW(list, CB_ADDSTRING, 0, (LPARAM)string);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
#ifndef _FF_PREFS_H
|
||||
#define _FF_PREFS_H
|
||||
|
||||
#include <api/config/items/cfgitemi.h>
|
||||
|
||||
extern INT_PTR CALLBACK ffPrefsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,LPARAM lParam);
|
||||
extern INT_PTR CALLBACK ffPrefsProc1(HWND hwndDlg, UINT uMsg, WPARAM wParam,LPARAM lParam);
|
||||
extern INT_PTR CALLBACK ffPrefsProc2(HWND hwndDlg, UINT uMsg, WPARAM wParam,LPARAM lParam);
|
||||
extern INT_PTR CALLBACK ffPrefsProc3(HWND hwndDlg, UINT uMsg, WPARAM wParam,LPARAM lParam);
|
||||
extern INT_PTR CALLBACK ffPrefsProc4(HWND hwndDlg, UINT uMsg, WPARAM wParam,LPARAM lParam);
|
||||
extern INT_PTR CALLBACK ffPrefsProc5(HWND hwndDlg, UINT uMsg, WPARAM wParam,LPARAM lParam);
|
||||
|
||||
void _dosetsel(HWND hwndDlg);
|
||||
HWND
|
||||
ActiveChildWindowFromPoint(HWND hwnd, POINTS cursor_s, const int *controls, size_t controlsCount);
|
||||
|
||||
#define WA2FFOPTIONS_PARENT CfgItemI
|
||||
|
||||
// {68A2EFD7-0FBB-4ef9-9D3A-590F943C2A73}
|
||||
static const GUID Wa2FFOptionsGuid =
|
||||
{ 0x68a2efd7, 0xfbb, 0x4ef9, { 0x9d, 0x3a, 0x59, 0xf, 0x94, 0x3c, 0x2a, 0x73 } };
|
||||
|
||||
class Wa2FFOptions : public WA2FFOPTIONS_PARENT {
|
||||
public:
|
||||
Wa2FFOptions ();
|
||||
};
|
||||
|
||||
extern Wa2FFOptions *ffoptions;
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,98 @@
|
||||
#include "precomp__gen_ff.h"
|
||||
#include "gen.h"
|
||||
#include "resource.h"
|
||||
#include "menuactions.h"
|
||||
#include "wa2frontend.h"
|
||||
#include "../Agave/Language/api_language.h"
|
||||
|
||||
extern const wchar_t *getSkinInfoW();
|
||||
extern int m_are_we_loaded;
|
||||
ifc_window *skin_about_group = NULL;
|
||||
|
||||
void destroyskinabout()
|
||||
{
|
||||
if (skin_about_group)
|
||||
WASABI_API_SKIN->group_destroy(skin_about_group);
|
||||
skin_about_group = NULL;
|
||||
}
|
||||
|
||||
INT_PTR CALLBACK ffPrefsProc5(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
destroyskinabout();
|
||||
if (m_are_we_loaded)
|
||||
{
|
||||
if (WASABI_API_SKIN->group_exists(L"skin.about.group"))
|
||||
{
|
||||
skin_about_group = WASABI_API_SKIN->group_create(L"skin.about.group");
|
||||
if (skin_about_group)
|
||||
{
|
||||
skin_about_group->setVirtual(0);
|
||||
HWND w = GetDlgItem(hwndDlg, IDC_STATIC_GROUP);
|
||||
skin_about_group->setStartHidden(1);
|
||||
skin_about_group->init(WASABI_API_WND->main_getRootWnd(), 1);
|
||||
SetWindowLong(skin_about_group->gethWnd(), GWL_STYLE, GetWindowLong(skin_about_group->gethWnd(), GWL_STYLE) | WS_CHILD);
|
||||
SetParent(skin_about_group->gethWnd(), w);
|
||||
SetWindowLong(w, GWL_STYLE, GetWindowLong(w, GWL_STYLE) | WS_CLIPCHILDREN);
|
||||
RECT r;
|
||||
GetClientRect(w, &r);
|
||||
skin_about_group->resize(r.left, r.top, r.right - r.left, r.bottom - r.top);
|
||||
skin_about_group->setVisible(1);
|
||||
ShowWindow(skin_about_group->gethWnd(), SW_NORMAL);
|
||||
ShowWindow(GetDlgItem(hwndDlg, IDC_STATIC_EMPTY), SW_HIDE);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetDlgItemTextA(hwndDlg, IDC_STATIC_EMPTY, WASABI_API_LNGSTRING(IDS_ERROR_WHILE_LOADING_SKIN_WINDOW));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SetDlgItemTextW(hwndDlg, IDC_STATIC_EMPTY, getSkinInfoW());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SetDlgItemTextA(hwndDlg, IDC_STATIC_EMPTY, WASABI_API_LNGSTRING(IDS_NO_SKIN_LOADED));
|
||||
}
|
||||
return 1;
|
||||
case WM_DESTROY:
|
||||
destroyskinabout();
|
||||
break;
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
case IDOK: case IDCANCEL:
|
||||
EndDialog(hwndDlg, 0);
|
||||
return 0;
|
||||
case IDC_BUTTON_SKINSPECIFIC:
|
||||
extern void unpopulateWindowsMenus();
|
||||
extern TList<HMENU> menulist;
|
||||
HMENU menu = CreatePopupMenu();
|
||||
unpopulateWindowsMenus();
|
||||
MenuActions::installSkinOptions(menu);
|
||||
menulist.addItem(menu);
|
||||
HWND w = GetDlgItem(hwndDlg, IDC_BUTTON_SKINSPECIFIC);
|
||||
RECT r;
|
||||
GetWindowRect(w, &r);
|
||||
int n = GetMenuItemCount(menu);
|
||||
if (n == 1)
|
||||
{
|
||||
HMENU submenu = GetSubMenu(menu, 0);
|
||||
if (submenu != NULL) menu = submenu;
|
||||
}
|
||||
else if (n == 0)
|
||||
{
|
||||
InsertMenuW(menu, 0, MF_BYPOSITION | MF_STRING | MF_GRAYED, 0, WASABI_API_LNGSTRINGW(IDS_NO_OPTIONS_AVAILABLE_FOR_THIS_SKIN));
|
||||
}
|
||||
//DoTrackPopup(menu, TPM_LEFTALIGN | TPM_BOTTOMALIGN | TPM_LEFTBUTTON, r.left, r.top, wa2.getMainWindow());
|
||||
TrackPopupMenu(menu, TPM_LEFTALIGN | TPM_BOTTOMALIGN | TPM_LEFTBUTTON, r.left, r.top, 0, wa2.getMainWindow(), NULL);
|
||||
MenuActions::removeSkinOptions();
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,280 @@
|
||||
#include "precomp__gen_ff.h"
|
||||
#include "resource.h"
|
||||
#include "prefs.h"
|
||||
#include "wa2cfgitems.h"
|
||||
#include <bfc/wasabi_std_wnd.h>
|
||||
#include "../Agave/Language/api_language.h"
|
||||
#include <api/skin/skinparse.h>
|
||||
#include <commctrl.h>
|
||||
void turnonoff(HWND wnd, int *t, int n, int v);
|
||||
extern int toggle_from_wa2;
|
||||
int opacity_all_on[] = {IDC_SLIDER_CUSTOMALPHA, IDC_STATIC_TRANSP, IDC_STATIC_ALPHA, IDC_STATIC_OPAQUE, IDC_COMBO_OPACITY};
|
||||
int opacity_all_off[] = {IDC_CHECK_LINKALPHA, };
|
||||
int opacity_unavail[] = {IDC_STATIC_OPACITY, IDC_CHECK_LINKALLALPHA, IDC_COMBO_OPACITY, IDC_SLIDER_CUSTOMALPHA,
|
||||
IDC_STATIC_TRANSP,IDC_STATIC_ALPHA,IDC_STATIC_OPAQUE,IDC_CHECK_LINKALPHA,IDC_STATIC_AUTOON,
|
||||
IDC_STATIC_AUTOONTXT,IDC_STATIC_FADEIN2,IDC_SLIDER_FADEIN,IDC_STATIC_FADEIN,IDC_STATIC_HOLD2,
|
||||
IDC_SLIDER_HOLD,IDC_STATIC_HOLD,IDC_STATIC_FADEOUT2,IDC_SLIDER_FADEOUT,IDC_STATIC_FADEOUT,
|
||||
IDC_STATIC_EXTENDBOX,IDC_EDIT_EXTEND,IDC_STATIC_EXTEND,IDC_SPIN_EXTEND};
|
||||
static int ratio_all_on[] = {IDC_SLIDER_CUSTOMSCALE, IDC_COMBO_SCALE, IDC_STATIC_SCALE};
|
||||
static int ratio_all_off[] = {IDC_CHECK_LINKRATIO, };
|
||||
static int spin_extend = 0;
|
||||
|
||||
static UINT get_logslider(HWND wnd) {
|
||||
int z = SendMessageW(wnd, TBM_GETPOS, 0, 0);
|
||||
long a = (long)(0.5 + 303.03 * pow(100.0, (double)z/30303.0) - 303.03);
|
||||
return a;
|
||||
}
|
||||
|
||||
void set_logslider(HWND wnd, int b) {
|
||||
long a = (long) (0.5 + 30303.0 * log((double)(b+303.0)/303.03)/log(100.0));
|
||||
SendMessageW(wnd, TBM_SETPOS, 1, a);
|
||||
}
|
||||
|
||||
int ResizeComboBoxDropDown(HWND hwndDlg, UINT id, const wchar_t * str, int width) {
|
||||
SIZE size = {0};
|
||||
HWND control = (id ? GetDlgItem(hwndDlg, id) : hwndDlg);
|
||||
HDC hdc = GetDC(control);
|
||||
// get and select parent dialog's font so that it'll calculate things correctly
|
||||
HFONT font = (HFONT)SendMessageW((id ? hwndDlg : GetParent(hwndDlg)), WM_GETFONT, 0, 0),
|
||||
oldfont = (HFONT)SelectObject(hdc, font);
|
||||
GetTextExtentPoint32W(hdc, str, lstrlenW(str)+1, &size);
|
||||
|
||||
int ret = width;
|
||||
if(size.cx > width)
|
||||
{
|
||||
if (id)
|
||||
SendDlgItemMessageW(hwndDlg, id, CB_SETDROPPEDWIDTH, size.cx, 0);
|
||||
else
|
||||
SendMessageW(hwndDlg, CB_SETDROPPEDWIDTH, size.cx, 0);
|
||||
|
||||
ret = size.cx;
|
||||
}
|
||||
|
||||
SelectObject(hdc, oldfont);
|
||||
ReleaseDC(control, hdc);
|
||||
return ret;
|
||||
}
|
||||
|
||||
INT_PTR CALLBACK ffPrefsProc4(HWND hwndDlg, UINT uMsg, WPARAM wParam,LPARAM lParam) {
|
||||
switch (uMsg) {
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
spin_extend = 0;
|
||||
|
||||
int transpavail = Wasabi::Std::Wnd::isTransparencyAvailable();
|
||||
if (!transpavail) turnonoff(hwndDlg, opacity_unavail, sizeof(opacity_unavail)/sizeof(int), 0);
|
||||
CheckDlgButton(hwndDlg, IDC_CHECK_LINKALPHA, cfg_uioptions_linkalpha.getValueAsInt());
|
||||
CheckDlgButton(hwndDlg, IDC_CHECK_LINKALLALPHA, cfg_uioptions_linkallalpha.getValueAsInt());
|
||||
Layout *main = SkinParser::getMainLayout();
|
||||
int curalpha = 255;
|
||||
if (main) {
|
||||
if (!WASABI_API_WND->rootwndIsValid(main)) { return 0; }
|
||||
curalpha = cfg_uioptions_linkedalpha.getValueAsInt();
|
||||
}
|
||||
int v = (int)((curalpha / 255.0f * 100.0f)+0.5f);
|
||||
wchar_t msStr[16] = {0};
|
||||
WASABI_API_LNGSTRINGW_BUF(IDS_MS,msStr,16);
|
||||
SendMessageW(GetDlgItem(hwndDlg,IDC_SLIDER_CUSTOMALPHA),TBM_SETRANGEMAX,0,100);
|
||||
SendMessageW(GetDlgItem(hwndDlg,IDC_SLIDER_CUSTOMALPHA),TBM_SETRANGEMIN,0,10);
|
||||
SendMessageW(GetDlgItem(hwndDlg,IDC_SLIDER_CUSTOMALPHA),TBM_SETPOS,1,v);
|
||||
|
||||
wchar_t *name = 0;
|
||||
SendDlgItemMessageW(hwndDlg, IDC_COMBO_OPACITY, CB_ADDSTRING, 0, (LPARAM)(name = WASABI_API_LNGSTRINGW(IDS_OPAQUE_FOCUS)));
|
||||
int width = ResizeComboBoxDropDown(hwndDlg, IDC_COMBO_OPACITY, name, 0);
|
||||
SendDlgItemMessageW(hwndDlg, IDC_COMBO_OPACITY, CB_SETITEMDATA, 0, 2);
|
||||
SendDlgItemMessageW(hwndDlg, IDC_COMBO_OPACITY, CB_ADDSTRING, 0, (LPARAM)(name = WASABI_API_LNGSTRINGW(IDS_OPAQUE_HOVER)));
|
||||
width = ResizeComboBoxDropDown(hwndDlg, IDC_COMBO_OPACITY, name, width);
|
||||
SendDlgItemMessageW(hwndDlg, IDC_COMBO_OPACITY, CB_SETITEMDATA, 1, 1);
|
||||
SendDlgItemMessageW(hwndDlg, IDC_COMBO_OPACITY, CB_ADDSTRING, 0, (LPARAM)(name = WASABI_API_LNGSTRINGW(IDS_NO_OPACITY)));
|
||||
ResizeComboBoxDropDown(hwndDlg, IDC_COMBO_OPACITY, name, width);
|
||||
SendDlgItemMessageW(hwndDlg, IDC_COMBO_OPACITY, CB_SETITEMDATA, 2, 0);
|
||||
|
||||
int item = 2;
|
||||
switch(cfg_uioptions_autoopacitylinked.getValueAsInt())
|
||||
{
|
||||
case 1:
|
||||
item = 1;
|
||||
break;
|
||||
case 2:
|
||||
item = 0;
|
||||
break;
|
||||
default:
|
||||
item = 2;
|
||||
break;
|
||||
}
|
||||
SendDlgItemMessageW(hwndDlg, IDC_COMBO_OPACITY, CB_SETCURSEL, item, 0);
|
||||
|
||||
SetDlgItemTextA(hwndDlg, IDC_STATIC_ALPHA, StringPrintf("%d%%", v));
|
||||
turnonoff(hwndDlg, opacity_all_on, sizeof(opacity_all_on)/sizeof(int), cfg_uioptions_linkallalpha.getValueAsInt() && transpavail);
|
||||
turnonoff(hwndDlg, opacity_all_off, sizeof(opacity_all_off)/sizeof(int), !cfg_uioptions_linkallalpha.getValueAsInt() && transpavail);
|
||||
SendMessageW(GetDlgItem(hwndDlg,IDC_SLIDER_HOLD),TBM_SETRANGEMAX,0,30303);
|
||||
SendMessageW(GetDlgItem(hwndDlg,IDC_SLIDER_HOLD),TBM_SETRANGEMIN,0,0);
|
||||
set_logslider(GetDlgItem(hwndDlg,IDC_SLIDER_HOLD),cfg_uioptions_autoopacitytime.getValueAsInt());
|
||||
SetDlgItemTextW(hwndDlg, IDC_STATIC_HOLD, StringPrintfW(L"%d%s", cfg_uioptions_autoopacitytime.getValueAsInt(),msStr));
|
||||
SendMessageW(GetDlgItem(hwndDlg,IDC_SLIDER_FADEIN),TBM_SETRANGEMAX,0,30303);
|
||||
SendMessageW(GetDlgItem(hwndDlg,IDC_SLIDER_FADEIN),TBM_SETRANGEMIN,0,0);
|
||||
set_logslider(GetDlgItem(hwndDlg,IDC_SLIDER_FADEIN),cfg_uioptions_autoopacityfadein.getValueAsInt());
|
||||
SetDlgItemTextW(hwndDlg, IDC_STATIC_FADEIN, StringPrintfW(L"%d%s", cfg_uioptions_autoopacityfadein.getValueAsInt(),msStr));
|
||||
SendMessageW(GetDlgItem(hwndDlg,IDC_SLIDER_FADEOUT),TBM_SETRANGEMAX,0,30303);
|
||||
SendMessageW(GetDlgItem(hwndDlg,IDC_SLIDER_FADEOUT),TBM_SETRANGEMIN,0,0);
|
||||
set_logslider(GetDlgItem(hwndDlg,IDC_SLIDER_FADEOUT),cfg_uioptions_autoopacityfadeout.getValueAsInt());
|
||||
SetDlgItemTextW(hwndDlg, IDC_STATIC_FADEOUT, StringPrintfW(L"%d%s", cfg_uioptions_autoopacityfadeout.getValueAsInt(),msStr));
|
||||
|
||||
SendMessageW(GetDlgItem(hwndDlg,IDC_SPIN_EXTEND),UDM_SETRANGE,0,MAKELONG(100,0));
|
||||
SetDlgItemInt(hwndDlg, IDC_EDIT_EXTEND, cfg_uioptions_extendautoopacity.getValueAsInt(), FALSE);
|
||||
|
||||
CheckDlgButton(hwndDlg, IDC_CHECK_LINKALLRATIO, cfg_uioptions_linkallratio.getValueAsInt());
|
||||
CheckDlgButton(hwndDlg, IDC_CHECK_LINKRATIO, cfg_uioptions_linkratio.getValueAsInt());
|
||||
|
||||
SendDlgItemMessageW(hwndDlg, IDC_COMBO_SCALE, CB_ADDSTRING, 0, (LPARAM)(name = WASABI_API_LNGSTRINGW(IDS_USELOCK)));
|
||||
width = ResizeComboBoxDropDown(hwndDlg, IDC_COMBO_SCALE, name, 0);
|
||||
SendDlgItemMessageW(hwndDlg, IDC_COMBO_SCALE, CB_ADDSTRING, 0, (LPARAM)(name = WASABI_API_LNGSTRINGW(IDS_ALLLOCKED)));
|
||||
ResizeComboBoxDropDown(hwndDlg, IDC_COMBO_SCALE, name, width);
|
||||
SendDlgItemMessageW(hwndDlg, IDC_COMBO_SCALE, CB_SETCURSEL, !!cfg_uioptions_uselocks.getValueAsInt(), 0);
|
||||
|
||||
int oldscale = 1;
|
||||
if (main)
|
||||
{
|
||||
if (!WASABI_API_WND->rootwndIsValid(main)) { return 0; }
|
||||
oldscale = (int)main->getRenderRatio();
|
||||
}
|
||||
int u = (int)((oldscale * 100.0f) + 0.5f);
|
||||
SendMessageW(GetDlgItem(hwndDlg, IDC_SLIDER_CUSTOMSCALE), TBM_SETRANGEMAX, 0, 300);
|
||||
SendMessageW(GetDlgItem(hwndDlg, IDC_SLIDER_CUSTOMSCALE), TBM_SETRANGEMIN, 0, 10);
|
||||
SendMessageW(GetDlgItem(hwndDlg, IDC_SLIDER_CUSTOMSCALE), TBM_SETPOS, 1, u);
|
||||
SetDlgItemTextA(hwndDlg, IDC_STATIC_SCALE, StringPrintf("%d%%", u));
|
||||
turnonoff(hwndDlg, ratio_all_on, sizeof(ratio_all_on) / sizeof(int), cfg_uioptions_linkallratio.getValueAsInt());
|
||||
turnonoff(hwndDlg, ratio_all_off, sizeof(ratio_all_off) / sizeof(int), !cfg_uioptions_linkallratio.getValueAsInt());
|
||||
|
||||
spin_extend = 1;
|
||||
return 1;
|
||||
}
|
||||
case WM_HSCROLL:
|
||||
{
|
||||
char msStr[16] = {0};
|
||||
WASABI_API_LNGSTRING_BUF(IDS_MS,msStr,16);
|
||||
HWND ctrl = (HWND)lParam;
|
||||
int t=(int)SendMessageW((HWND) lParam,TBM_GETPOS,0,0);
|
||||
if (ctrl == GetDlgItem(hwndDlg,IDC_SLIDER_CUSTOMALPHA)) {
|
||||
SetDlgItemTextA(hwndDlg, IDC_STATIC_ALPHA, StringPrintf("%d%%", t));
|
||||
int v = (int)(t / 100.0 * 255 + 0.5);
|
||||
if (v == 254) v = 255;
|
||||
cfg_uioptions_linkedalpha.setValueAsInt(v);
|
||||
}
|
||||
else if (ctrl == GetDlgItem(hwndDlg, IDC_SLIDER_HOLD)) {
|
||||
t = get_logslider(ctrl);
|
||||
SetDlgItemTextA(hwndDlg, IDC_STATIC_HOLD, StringPrintf("%d%s", t, msStr));
|
||||
cfg_uioptions_autoopacitytime.setValueAsInt(t);
|
||||
}
|
||||
else if (ctrl == GetDlgItem(hwndDlg, IDC_SLIDER_FADEIN)) {
|
||||
t = get_logslider(ctrl);
|
||||
SetDlgItemTextA(hwndDlg, IDC_STATIC_FADEIN, StringPrintf("%d%s", t, msStr));
|
||||
cfg_uioptions_autoopacityfadein.setValueAsInt(t);
|
||||
}
|
||||
else if (ctrl == GetDlgItem(hwndDlg, IDC_SLIDER_FADEOUT)) {
|
||||
int t = get_logslider(ctrl);
|
||||
SetDlgItemTextA(hwndDlg, IDC_STATIC_FADEOUT, StringPrintf("%d%s", t, msStr));
|
||||
cfg_uioptions_autoopacityfadeout.setValueAsInt(t);
|
||||
}
|
||||
else if (ctrl == GetDlgItem(hwndDlg, IDC_SLIDER_CUSTOMSCALE))
|
||||
{
|
||||
SetDlgItemTextA(hwndDlg, IDC_STATIC_SCALE, StringPrintf("%d%%", t));
|
||||
Layout *main = SkinParser::getMainLayout();
|
||||
if (main)
|
||||
{
|
||||
main->setRenderRatio((float)t / 100.0);
|
||||
if (cfg_uioptions_linkratio.getValueAsInt())
|
||||
{
|
||||
int nc = SkinParser::getNumContainers();
|
||||
for (int i = 0;i < nc;i++)
|
||||
{
|
||||
Container *c = SkinParser::enumContainer(i);
|
||||
if (c)
|
||||
{
|
||||
int nl = c->getNumLayouts();
|
||||
for (int j = 0;j < nl;j++)
|
||||
{
|
||||
Layout *l = c->enumLayout(j);
|
||||
if (l)
|
||||
{
|
||||
UpdateWindow(l->gethWnd());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WM_COMMAND:
|
||||
toggle_from_wa2 = 1;
|
||||
switch (LOWORD(wParam)) {
|
||||
case IDC_CHECK_LINKALPHA:
|
||||
cfg_uioptions_linkalpha.setValueAsInt(IsDlgButtonChecked(hwndDlg, IDC_CHECK_LINKALPHA));
|
||||
return 0;
|
||||
case IDC_CHECK_LINKALLALPHA:
|
||||
cfg_uioptions_linkallalpha.setValueAsInt(IsDlgButtonChecked(hwndDlg, IDC_CHECK_LINKALLALPHA));
|
||||
turnonoff(hwndDlg, opacity_all_on, sizeof(opacity_all_on)/sizeof(int), cfg_uioptions_linkallalpha.getValueAsInt());
|
||||
turnonoff(hwndDlg, opacity_all_off, sizeof(opacity_all_off)/sizeof(int), !cfg_uioptions_linkallalpha.getValueAsInt());
|
||||
return 0;
|
||||
case IDC_EDIT_EXTEND:
|
||||
if (HIWORD(wParam) == EN_CHANGE && spin_extend) {
|
||||
int t, a = GetDlgItemInt(hwndDlg,IDC_EDIT_EXTEND,&t,0);
|
||||
if (t) cfg_uioptions_extendautoopacity.setValueAsInt(MAX(a,0));
|
||||
if (a < 0)
|
||||
{
|
||||
char msStr[16] = {0};
|
||||
SetDlgItemTextA(hwndDlg, IDC_STATIC_HOLD,
|
||||
StringPrintf("%d%s", cfg_uioptions_autoopacitytime.getValueAsInt(),WASABI_API_LNGSTRING_BUF(IDS_MS,msStr,16)));
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
case IDC_CHECK_LINKALLRATIO:
|
||||
cfg_uioptions_linkallratio.setValueAsInt(IsDlgButtonChecked(hwndDlg, IDC_CHECK_LINKALLRATIO));
|
||||
turnonoff(hwndDlg, ratio_all_on, sizeof(ratio_all_on) / sizeof(int), cfg_uioptions_linkallratio.getValueAsInt());
|
||||
turnonoff(hwndDlg, ratio_all_off, sizeof(ratio_all_off) / sizeof(int), !cfg_uioptions_linkallratio.getValueAsInt());
|
||||
return 0;
|
||||
case IDC_COMBO_OPACITY:
|
||||
if (HIWORD(wParam) == CBN_SELCHANGE)
|
||||
{
|
||||
int sel = SendDlgItemMessageW(hwndDlg, IDC_COMBO_OPACITY, CB_GETCURSEL, 0, 0);
|
||||
if (sel != CB_ERR)
|
||||
{
|
||||
cfg_uioptions_autoopacitylinked.setValueAsInt(SendDlgItemMessageW(hwndDlg, IDC_COMBO_OPACITY, CB_GETITEMDATA, sel, 0));
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
case IDC_COMBO_SCALE:
|
||||
if (HIWORD(wParam) == CBN_SELCHANGE)
|
||||
{
|
||||
int sel = SendDlgItemMessageW(hwndDlg, IDC_COMBO_SCALE, CB_GETCURSEL, 0, 0);
|
||||
if (sel != CB_ERR)
|
||||
{
|
||||
cfg_uioptions_uselocks.setValueAsInt(!!sel);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
case IDC_CHECK_LINKRATIO:
|
||||
cfg_uioptions_linkratio.setValueAsInt(IsDlgButtonChecked(hwndDlg, IDC_CHECK_LINKRATIO));
|
||||
return 0;
|
||||
}
|
||||
case WM_DESTROY:
|
||||
spin_extend = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
const int controls[] =
|
||||
{
|
||||
IDC_SLIDER_CUSTOMALPHA,
|
||||
IDC_SLIDER_HOLD,
|
||||
IDC_SLIDER_FADEIN,
|
||||
IDC_SLIDER_FADEOUT,
|
||||
IDC_SLIDER_CUSTOMSCALE,
|
||||
};
|
||||
if (FALSE != WASABI_API_APP->DirectMouseWheel_ProcessDialogMessage(hwndDlg, uMsg, wParam, lParam, controls, ARRAYSIZE(controls)))
|
||||
return TRUE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
#include "precomp__gen_ff.h"
|
||||
#include "resource.h"
|
||||
#include <windowsx.h>
|
||||
|
||||
extern int m_are_we_loaded;
|
||||
extern int toggle_from_wa2;
|
||||
extern HWND subWnd;
|
||||
|
||||
#define ListBox_AddStringW(hwndCtl, lpsz) ((int)(DWORD)SendMessageW((hwndCtl), LB_ADDSTRING, 0L, (LPARAM)(LPCWSTR)(lpsz)))
|
||||
#define ListBox_FindStringW(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessageW((hwndCtl), LB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCWSTR)(lpszFind)))
|
||||
#define ListBox_GetTextW(hwndCtl, index, lpszBuffer) ((int)(DWORD)SendMessageW((hwndCtl), LB_GETTEXT, (WPARAM)(int)(index), (LPARAM)(LPWSTR)(lpszBuffer)))
|
||||
#define ListBox_GetItemDataW(hwndCtl, index) ((LRESULT)(ULONG_PTR)SendMessageW((hwndCtl), LB_GETITEMDATA, (WPARAM)(int)(index), 0L))
|
||||
#define ListBox_SetItemDataW(hwndCtl, index, data) ((int)(DWORD)SendMessageW((hwndCtl), LB_SETITEMDATA, (WPARAM)(int)(index), (LPARAM)(data)))
|
||||
|
||||
|
||||
static void fillColorThemesList(HWND list)
|
||||
{
|
||||
ListBox_ResetContent(list);
|
||||
if (!m_are_we_loaded) return ;
|
||||
int numsets = WASABI_API_SKIN->colortheme_getNumColorSets();
|
||||
for (int i = 0; i < numsets; i++)
|
||||
{
|
||||
const wchar_t *set = WASABI_API_SKIN->colortheme_enumColorSet(i);
|
||||
if (!_wcsnicmp(set, L"{coloredit}", 11))
|
||||
{
|
||||
int pos = ListBox_AddStringW(list, set + 11);
|
||||
ListBox_SetItemDataW(list, pos, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
ListBox_AddStringW(list, set);
|
||||
}
|
||||
}
|
||||
const wchar_t *curset = WASABI_API_SKIN->colortheme_getColorSet();
|
||||
int cur = ListBox_FindStringW(list, 0, curset);
|
||||
ListBox_SetCurSel(list, cur);
|
||||
}
|
||||
|
||||
INT_PTR CALLBACK ffPrefsProc3(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_NOTIFYFORMAT:
|
||||
return NFR_UNICODE;
|
||||
case WM_INITDIALOG:
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_BUTTON_SETTHEME), m_are_we_loaded);
|
||||
{
|
||||
HWND listWindow;
|
||||
listWindow = GetDlgItem(hwndDlg, IDC_LIST1);
|
||||
if (NULL != listWindow)
|
||||
{
|
||||
EnableWindow(listWindow, m_are_we_loaded);
|
||||
fillColorThemesList(listWindow);
|
||||
if (NULL != WASABI_API_APP)
|
||||
WASABI_API_APP->DirectMouseWheel_EnableConvertToMouseWheel(listWindow, TRUE);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
case WM_COMMAND:
|
||||
{
|
||||
toggle_from_wa2 = 1;
|
||||
int id = (int) LOWORD(wParam);
|
||||
int msg = (int)HIWORD(wParam);
|
||||
if (id == IDC_LIST1 && msg == LBN_DBLCLK || id == IDC_BUTTON_SETTHEME)
|
||||
{
|
||||
HWND ctrl = GetDlgItem(hwndDlg, IDC_LIST1);
|
||||
int sel = ListBox_GetCurSel(ctrl);
|
||||
if (sel != -1)
|
||||
{
|
||||
wchar_t newset[256 + 11] = L"";
|
||||
ListBox_GetTextW(ctrl, sel, newset);
|
||||
newset[255] = 0;
|
||||
if (*newset)
|
||||
{
|
||||
int p = ListBox_GetItemDataW(ctrl, sel);
|
||||
if (p)
|
||||
{
|
||||
WCSCPYN(newset, StringPrintfW(L"{coloredit}%s", newset), 256 + 11);
|
||||
}
|
||||
WASABI_API_SKIN->colortheme_setColorSet(newset);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
toggle_from_wa2 = 0;
|
||||
break;
|
||||
}
|
||||
case WM_DESTROY:
|
||||
subWnd = NULL;
|
||||
if (NULL != WASABI_API_APP)
|
||||
{
|
||||
HWND listWindow;
|
||||
listWindow = GetDlgItem(hwndDlg, IDC_LIST1);
|
||||
if (NULL != listWindow)
|
||||
WASABI_API_APP->DirectMouseWheel_EnableConvertToMouseWheel(listWindow, FALSE);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,860 @@
|
||||
#include "precomp__gen_ff.h"
|
||||
#include <commctrl.h>
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
#include "resource.h"
|
||||
#include <api/font/font.h>
|
||||
#include <bfc/parse/paramparser.h>
|
||||
#include "../nu/ListView.h"
|
||||
#include "prefs.h"
|
||||
#include "gen.h"
|
||||
#include "wa2cfgitems.h"
|
||||
#include <api/font/win32/truetypefont_win32.h>
|
||||
#include "../Agave/Language/api_language.h"
|
||||
|
||||
extern HWND subWnd;
|
||||
#define ComboBox_SetItemDataW(hwndCtl, index, data) ((int)(DWORD)SendMessageW((hwndCtl), CB_SETITEMDATA, (WPARAM)(int)(index), (LPARAM)(data)))
|
||||
#define ComboBox_GetLBTextLenW(hwndCtl, index) ((int)(DWORD)SendMessageW((hwndCtl), CB_GETLBTEXTLEN, (WPARAM)(int)(index), 0L))
|
||||
#define ComboBox_GetLBTextW(hwndCtl, index, lpszBuffer) ((int)(DWORD)SendMessageW((hwndCtl), CB_GETLBTEXT, (WPARAM)(int)(index), (LPARAM)(LPCWSTR)(lpszBuffer)))
|
||||
#define ComboBox_SelectStringW(hwndCtl, indexStart, lpszSelect) ((int)(DWORD)SendMessageW((hwndCtl), CB_SELECTSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCWSTR)(lpszSelect)))
|
||||
|
||||
static W_ListView mappingList;
|
||||
int fonts_loaded = 0;
|
||||
int ComboBox_AddStringW(HWND list, const wchar_t *string);
|
||||
|
||||
class font_entry
|
||||
{
|
||||
public:
|
||||
StringW filename;
|
||||
StringW face;
|
||||
};
|
||||
|
||||
class font_entry_comparator1
|
||||
{
|
||||
public:
|
||||
// comparator for sorting
|
||||
static int compareItem(font_entry *p1, font_entry* p2)
|
||||
{
|
||||
return wcscmp(p1->face, p2->face);
|
||||
}
|
||||
// comparator for searching
|
||||
static int compareAttrib(const wchar_t *attrib, font_entry *item)
|
||||
{
|
||||
return wcscmp(attrib, item->face);
|
||||
}
|
||||
};
|
||||
class font_entry_comparator2
|
||||
{
|
||||
public:
|
||||
// comparator for sorting
|
||||
static int compareItem(font_entry *p1, font_entry* p2)
|
||||
{
|
||||
return _wcsicmp(p1->filename, p2->filename);
|
||||
}
|
||||
// comparator for searching
|
||||
static int compareAttrib(const wchar_t *attrib, font_entry *item)
|
||||
{
|
||||
return _wcsicmp(attrib, item->filename);
|
||||
}
|
||||
};
|
||||
|
||||
int ResizeComboBoxDropDown(HWND hwndDlg, UINT id, const wchar_t * str, int width);
|
||||
|
||||
PtrListQuickSorted<font_entry, font_entry_comparator1> fontlist;
|
||||
PtrListQuickSorted<font_entry, font_entry_comparator2> fontlist_byfilename;
|
||||
|
||||
PtrListQuickSorted<font_entry, font_entry_comparator1> skin_fontlist;
|
||||
PtrListQuickSorted<font_entry, font_entry_comparator2> skin_fontlist_byfilename;
|
||||
|
||||
void fillFontLists(HWND list, HWND list2, int selectdefault = 1)
|
||||
{
|
||||
fontlist.deleteAll();
|
||||
fontlist_byfilename.removeAll();
|
||||
|
||||
ComboBox_ResetContent(list);
|
||||
ComboBox_ResetContent(list2);
|
||||
SendMessageW(list, CB_INITSTORAGE, 400, 32);
|
||||
SendMessageW(list2, CB_INITSTORAGE, 400, 32);
|
||||
|
||||
wchar_t *txt = WMALLOC(WA_MAX_PATH);
|
||||
Wasabi::Std::getFontPath(WA_MAX_PATH, txt);
|
||||
StringW path = txt;
|
||||
StringW deffont = cfg_options_ttfoverridefont.getValue();
|
||||
FREE(txt);
|
||||
StringPathCombine mask(path, L"*.ttf");
|
||||
WIN32_FIND_DATAW fd = {0};
|
||||
HANDLE fh;
|
||||
int width = 0, width2 = 0;
|
||||
if ((fh = FindFirstFileW(mask, &fd)) != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
StringW fullpath = fd.cFileName;
|
||||
if (_wcsicmp(fullpath, L".") && _wcsicmp(fullpath, L".."))
|
||||
{
|
||||
fullpath = StringPathCombine(path, fullpath);
|
||||
StringW fontname = TrueTypeFont_Win32::filenameToFontFace(fullpath);
|
||||
if (!fontname.isempty())
|
||||
{
|
||||
if (fontlist_byfilename.findItem(fd.cFileName)) continue;
|
||||
font_entry *fe = new font_entry;
|
||||
fe->face = fontname;
|
||||
fe->filename = fd.cFileName;
|
||||
fontlist.addItem(fe);
|
||||
fontlist_byfilename.addItem(fe);
|
||||
int idx = ComboBox_AddStringW(list, fontname);
|
||||
ComboBox_SetItemData(list, idx, fe);
|
||||
width = ResizeComboBoxDropDown(list, 0, fontname, width);
|
||||
|
||||
idx = ComboBox_AddStringW(list2, fontname);
|
||||
ComboBox_SetItemData(list2, idx, fe);
|
||||
width2 = ResizeComboBoxDropDown(list2, 0, fontname, width2);
|
||||
}
|
||||
}
|
||||
if (!FindNextFileW(fh, &fd)) break;
|
||||
}
|
||||
}
|
||||
if (fh != INVALID_HANDLE_VALUE) FindClose(fh);
|
||||
int pos = -1;
|
||||
font_entry *fe = fontlist_byfilename.findItem(deffont.v(), NULL);
|
||||
if (fe)
|
||||
{
|
||||
fontlist.sort(1);
|
||||
pos = fontlist.searchItem(fe);
|
||||
}
|
||||
ComboBox_SetCurSel(list, pos);
|
||||
}
|
||||
|
||||
|
||||
int fm_validMapping(HWND wnd)
|
||||
{
|
||||
if (ComboBox_GetCurSel(GetDlgItem(wnd, IDC_COMBO_SKINFONTS)) == -1) return 0;
|
||||
if (ComboBox_GetCurSel(GetDlgItem(wnd, IDC_COMBO_FONTS)) == -1) return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int fm_hasSelection(HWND wnd)
|
||||
{
|
||||
int n = mappingList.GetCount();
|
||||
for (int i = 0;i < n;i++)
|
||||
if (mappingList.GetSelected(i))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void fm_itemClicked(HWND wnd, int pos)
|
||||
{
|
||||
HWND combo1 = GetDlgItem(wnd, IDC_COMBO_SKINFONTS);
|
||||
HWND combo2 = GetDlgItem(wnd, IDC_COMBO_FONTS);
|
||||
|
||||
int n = mappingList.GetCount();
|
||||
for (int i = 0;i < n;i++)
|
||||
{
|
||||
if (mappingList.GetSelected(i))
|
||||
{
|
||||
wchar_t txt[4096] = {0};
|
||||
mappingList.GetText(i, 0, txt, 4096);
|
||||
ComboBox_SetCurSel(combo1, -1);
|
||||
if (skin_fontlist.findItem(txt))
|
||||
ComboBox_SelectStringW(combo1, -1, StringPrintfW(L" %s", txt));
|
||||
else
|
||||
ComboBox_SelectStringW(combo1, -1, txt);
|
||||
mappingList.GetText(i, 1, txt, 4096);
|
||||
|
||||
ComboBox_SetCurSel(combo2, -1);
|
||||
ComboBox_SelectStringW(combo2, -1, txt);
|
||||
|
||||
wchar_t type[64] = {0};
|
||||
mappingList.GetText(i, 3, type, 64);
|
||||
|
||||
CheckDlgButton(wnd, IDC_RADIO_THISSKIN, WCSCASEEQLSAFE(type, WASABI_API_LNGSTRINGW(IDS_THIS_SKIN)));
|
||||
CheckDlgButton(wnd, IDC_RADIO_ALLSKINS, !WCSCASEEQLSAFE(type, WASABI_API_LNGSTRINGW(IDS_THIS_SKIN)));
|
||||
|
||||
wchar_t scale[64] = {0};
|
||||
mappingList.GetText(i, 2, scale, 64);
|
||||
int s = WTOI(scale);
|
||||
SendMessageW(GetDlgItem(wnd, IDC_SLIDER_SCALE), TBM_SETPOS, 1, s);
|
||||
SetDlgItemTextW(wnd, IDC_STATIC_SCALE, StringPrintfW(L"%d%%", s));
|
||||
break;
|
||||
}
|
||||
}
|
||||
EnableWindow(GetDlgItem(wnd, IDC_BUTTON_SET), fm_validMapping(wnd) && fm_hasSelection(wnd));
|
||||
EnableWindow(GetDlgItem(wnd, IDC_BUTTON_NEW), fm_validMapping(wnd));
|
||||
EnableWindow(GetDlgItem(wnd, IDC_BUTTON_DEL), fm_hasSelection(wnd));
|
||||
}
|
||||
|
||||
void fm_invalidate()
|
||||
{
|
||||
Font::uninstallAll(1);
|
||||
WASABI_API_WNDMGR->wndTrackInvalidateAll();
|
||||
}
|
||||
|
||||
void fm_scanMapping(HWND ctrl, const wchar_t *id)
|
||||
{
|
||||
int global = 0;
|
||||
wchar_t t[256] = L"";
|
||||
int scale;
|
||||
StringW tmp;
|
||||
tmp.printf(L"Skin:%s/Font Mapping/%s", WASABI_API_SKIN->getSkinName(), id);
|
||||
WASABI_API_CONFIG->getStringPrivate(tmp, t, 250, L"");
|
||||
|
||||
tmp.printf(L"Skin:%s/Font Mapping/%s_scale", WASABI_API_SKIN->getSkinName(), id);
|
||||
scale = WASABI_API_CONFIG->getIntPrivate(tmp, -1);
|
||||
|
||||
if (!*t)
|
||||
{
|
||||
global = 1;
|
||||
tmp.printf(L"Font Mapping/%s", id);
|
||||
WASABI_API_CONFIG->getStringPrivate(tmp, t, 250, L"");
|
||||
tmp.printf(L"Skin:%s/Font Mapping/%s_scale", WASABI_API_SKIN->getSkinName(), id);
|
||||
scale = WASABI_API_CONFIG->getIntPrivate(tmp, -1);
|
||||
}
|
||||
if (t && *t)
|
||||
{
|
||||
if (!WCSCASESTR(t, L".ttf")) wcscat(t, L".ttf");
|
||||
font_entry *fe = fontlist_byfilename.findItem(t);
|
||||
if (fe)
|
||||
{
|
||||
int pos = mappingList.InsertItem(0, id, 0);
|
||||
mappingList.SetItemText(pos, 1, fe->face.getValue());
|
||||
mappingList.SetItemText(pos, 2, StringPrintfW(L"%d%%", scale != -1 ? scale : 100).getValue());
|
||||
mappingList.SetItemText(pos, 3, WASABI_API_LNGSTRINGW(global ? IDS_ALL_SKINS : IDS_THIS_SKIN));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void fm_rescanList(HWND lv)
|
||||
{
|
||||
mappingList.Clear();
|
||||
|
||||
wchar_t t[4096] = L"";
|
||||
WASABI_API_CONFIG->getStringPrivate(StringPrintfW(L"Skin:%s/Font Mapping/Mapped", WASABI_API_SKIN->getSkinName()), t, 4096, L"");
|
||||
ParamParser pp(t);
|
||||
for (int i = 0;i < pp.getNumItems();i++)
|
||||
{
|
||||
fm_scanMapping(lv, pp.enumItem(i));
|
||||
}
|
||||
WASABI_API_CONFIG->getStringPrivate(L"Font Mapping/Mapped", t, 4096, L"");
|
||||
ParamParser pp2(t);
|
||||
for (int i = 0;i < pp2.getNumItems();i++)
|
||||
{
|
||||
fm_scanMapping(lv, pp2.enumItem(i));
|
||||
}
|
||||
}
|
||||
|
||||
void fm_saveMappingLists(HWND wnd)
|
||||
{
|
||||
PtrListQuickSorted<StringW, StringWComparator> global_list;
|
||||
PtrListQuickSorted<StringW, StringWComparator> skin_list;
|
||||
|
||||
int n = mappingList.GetCount();
|
||||
for (int i = 0;i < n;i++)
|
||||
{
|
||||
wchar_t txt[4096] = {0};
|
||||
mappingList.GetText(i, 0, txt, 4096);
|
||||
|
||||
wchar_t type[64] = {0};
|
||||
mappingList.GetText(i, 3, type, 64);
|
||||
|
||||
if (!_wcsicmp(type, WASABI_API_LNGSTRINGW(IDS_THIS_SKIN)))
|
||||
{
|
||||
if (skin_list.findItem(txt) != NULL) continue;
|
||||
skin_list.addItem(new StringW(txt));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (global_list.findItem(txt) != NULL) continue;
|
||||
global_list.addItem(new StringW(txt));
|
||||
}
|
||||
}
|
||||
StringW s = L"";
|
||||
foreach(global_list)
|
||||
if (!s.isempty())
|
||||
s += L";";
|
||||
s += global_list.getfor()->getValue();
|
||||
endfor;
|
||||
WASABI_API_CONFIG->setStringPrivate(L"Font Mapping/Mapped", s);
|
||||
|
||||
s = L"";
|
||||
foreach(skin_list)
|
||||
if (!s.isempty()) s += L";";
|
||||
s += skin_list.getfor()->getValue();
|
||||
endfor;
|
||||
WASABI_API_CONFIG->setStringPrivate(StringPrintfW(L"Skin:%s/Font Mapping/Mapped", WASABI_API_SKIN->getSkinName()), s);
|
||||
|
||||
global_list.deleteAll();
|
||||
skin_list.deleteAll();
|
||||
}
|
||||
|
||||
void fm_delMapping(HWND wnd, int pos = -1)
|
||||
{
|
||||
HWND list = GetDlgItem(wnd, IDC_LIST_MAPPINGS);
|
||||
int n = mappingList.GetCount();
|
||||
int start = 0;
|
||||
if (pos != -1) { start = pos; n = pos + 1; }
|
||||
for (int i = start;i < n;i++)
|
||||
{
|
||||
if (pos != -1 || mappingList.GetSelected(i))
|
||||
{
|
||||
wchar_t txt[4096] = {0};
|
||||
mappingList.GetText(i, 0, txt, 4096);
|
||||
|
||||
wchar_t m[64] = {0};
|
||||
mappingList.GetText(i, 3, m, 64);
|
||||
|
||||
if (WCSCASEEQLSAFE(m, WASABI_API_LNGSTRINGW(IDS_THIS_SKIN)))
|
||||
{
|
||||
WASABI_API_CONFIG->setStringPrivate(StringPrintfW(L"Skin:%s/Font Mapping/%s", WASABI_API_SKIN->getSkinName(), txt), L"");
|
||||
WASABI_API_CONFIG->setStringPrivate(StringPrintfW(L"Skin:%s/Font Mapping/%s_scale", WASABI_API_SKIN->getSkinName(), txt), L"100");
|
||||
}
|
||||
else
|
||||
{
|
||||
WASABI_API_CONFIG->setStringPrivate(StringPrintfW(L"Font Mapping/%s", txt), L"");
|
||||
WASABI_API_CONFIG->setStringPrivate(StringPrintfW(L"Font Mapping/%s_scale", txt), L"100");
|
||||
}
|
||||
mappingList.DeleteItem(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
fm_saveMappingLists(wnd);
|
||||
fm_rescanList(list);
|
||||
fm_invalidate();
|
||||
if (pos == -1)
|
||||
{
|
||||
EnableWindow(GetDlgItem(wnd, IDC_BUTTON_DEL), 0);
|
||||
EnableWindow(GetDlgItem(wnd, IDC_BUTTON_SET), 0);
|
||||
}
|
||||
}
|
||||
|
||||
void fm_newMapping(HWND wnd)
|
||||
{
|
||||
HWND combo1 = GetDlgItem(wnd, IDC_COMBO_SKINFONTS);
|
||||
HWND combo2 = GetDlgItem(wnd, IDC_COMBO_FONTS);
|
||||
int global = !IsDlgButtonChecked(wnd, IDC_RADIO_THISSKIN);
|
||||
|
||||
int pos = ComboBox_GetCurSel(combo1);
|
||||
int l = ComboBox_GetLBTextLenW(combo1, pos);
|
||||
wchar_t *txt = WMALLOC(l + 1);
|
||||
ComboBox_GetLBTextW(combo1, pos, txt);
|
||||
if (!*txt)
|
||||
{
|
||||
FREE(txt);
|
||||
return ;
|
||||
}
|
||||
wchar_t *delme = txt;
|
||||
if (*txt == ' ') txt++;
|
||||
font_entry *fe = skin_fontlist.findItem(txt);
|
||||
if (!fe) fe = fontlist.findItem(txt);
|
||||
if (!fe) return ;
|
||||
FREE(delme);
|
||||
|
||||
|
||||
int n = mappingList.GetCount();
|
||||
int oldpos = -1;
|
||||
for (int i = 0;i < n;i++)
|
||||
{
|
||||
wchar_t txt[4096] = {0};
|
||||
mappingList.GetText(i, 0, txt, 4096);
|
||||
if (!_wcsicmp(fe->face, txt)) { oldpos = i; break; }
|
||||
}
|
||||
|
||||
if (oldpos != -1) fm_delMapping(wnd, oldpos);
|
||||
|
||||
pos = ComboBox_GetCurSel(combo2);
|
||||
l = ComboBox_GetLBTextLenW(combo2, pos);
|
||||
txt = WMALLOC(l + 1);
|
||||
ComboBox_GetLBTextW(combo2, pos, txt);
|
||||
if (!*txt)
|
||||
{
|
||||
FREE(txt);
|
||||
return ;
|
||||
}
|
||||
font_entry *femap = fontlist.findItem(txt);
|
||||
if (!femap) return ;
|
||||
FREE(txt);
|
||||
|
||||
StringW file = femap->filename;
|
||||
|
||||
int v = (int)SendMessageW(GetDlgItem(wnd, IDC_SLIDER_SCALE), TBM_GETPOS, 0, 0);
|
||||
|
||||
if (!global)
|
||||
{
|
||||
WASABI_API_CONFIG->setStringPrivate(StringPrintfW(L"Skin:%s/Font Mapping/%s", WASABI_API_SKIN->getSkinName(), fe->face), file);
|
||||
WASABI_API_CONFIG->setIntPrivate(StringPrintfW(L"Skin:%s/Font Mapping/%s_scale", WASABI_API_SKIN->getSkinName(), fe->face), v);
|
||||
}
|
||||
else
|
||||
{
|
||||
WASABI_API_CONFIG->setStringPrivate(StringPrintfW(L"Font Mapping/%s", fe->face), file);
|
||||
WASABI_API_CONFIG->setIntPrivate(StringPrintfW(L"Font Mapping/%s_scale", fe->face), v);
|
||||
}
|
||||
|
||||
fm_scanMapping(GetDlgItem(wnd, IDC_LIST_MAPPINGS), fe->face);
|
||||
fm_saveMappingLists(wnd);
|
||||
fm_invalidate();
|
||||
|
||||
if (oldpos == -1)
|
||||
{
|
||||
int n = mappingList.GetCount();
|
||||
for (int i = 0;i < n;i++)
|
||||
{
|
||||
wchar_t txt[4096] = {0};
|
||||
mappingList.GetText(i, 0, txt, 4096);
|
||||
if (!_wcsicmp(fe->face, txt)) { oldpos = i; break; }
|
||||
}
|
||||
}
|
||||
|
||||
if (oldpos != -1)
|
||||
{
|
||||
mappingList.SetSelected(oldpos);
|
||||
EnableWindow(GetDlgItem(wnd, IDC_BUTTON_DEL), 1);
|
||||
EnableWindow(GetDlgItem(wnd, IDC_BUTTON_SET), 1);
|
||||
}
|
||||
}
|
||||
|
||||
void fm_modifyMapping(HWND wnd)
|
||||
{
|
||||
int n = mappingList.GetCount();
|
||||
int i;
|
||||
for (i = 0;i < n;i++)
|
||||
{
|
||||
if (mappingList.GetSelected(i))
|
||||
{
|
||||
wchar_t txt[4096] = {0};
|
||||
mappingList.GetText(i, 0, txt, 4096);
|
||||
|
||||
wchar_t m[64] = {0};
|
||||
mappingList.GetText(i, 3, m, 64);
|
||||
|
||||
if (WCSCASEEQLSAFE(m, WASABI_API_LNGSTRINGW(IDS_THIS_SKIN)))
|
||||
WASABI_API_CONFIG->setStringPrivate(StringPrintfW(L"Skin:%s/Font Mapping/%s", WASABI_API_SKIN->getSkinName(), txt), L"");
|
||||
else
|
||||
WASABI_API_CONFIG->setStringPrivate(StringPrintfW(L"Font Mapping/%s", txt), L"");
|
||||
mappingList.DeleteItem(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == n) return ;
|
||||
fm_newMapping(wnd);
|
||||
mappingList.SetSelected(i);
|
||||
}
|
||||
|
||||
void fillFontList2(HWND list, int reset = 1)
|
||||
{
|
||||
if (reset)
|
||||
ComboBox_ResetContent(list);
|
||||
|
||||
int width = 0;
|
||||
foreach(fontlist)
|
||||
const wchar_t *str;
|
||||
int idx = ComboBox_AddStringW(list, (str = fontlist.getfor()->face.v()));
|
||||
ComboBox_SetItemDataW(list, idx, fontlist.getfor());
|
||||
width = ResizeComboBoxDropDown(list, 0, str, width);
|
||||
endfor;
|
||||
}
|
||||
|
||||
void fillSkinFontList(HWND list)
|
||||
{
|
||||
ComboBox_ResetContent(list);
|
||||
SendMessageW(list, CB_INITSTORAGE, 400, 32);
|
||||
skin_fontlist.deleteAll();
|
||||
skin_fontlist_byfilename.removeAll();
|
||||
int n = Font::getNumFontDefs();
|
||||
for (int i = 0;i < n;i++)
|
||||
{
|
||||
FontDef *fd = Font::enumFontDef(i);
|
||||
if (!fd) continue;
|
||||
if (!fd->allowmapping) continue;
|
||||
font_entry *fe = new font_entry;
|
||||
fe->filename = fd->filename;
|
||||
fe->face = fd->id;
|
||||
skin_fontlist.addItem(fe);
|
||||
skin_fontlist_byfilename.addItem(fe);
|
||||
int idx = ComboBox_AddStringW(list, StringPrintfW(L" %s", fe->face));
|
||||
ComboBox_SetItemDataW(list, idx, fe);
|
||||
}
|
||||
fillFontList2(list, 0);
|
||||
}
|
||||
|
||||
VOID CALLBACK FontMappingLoader(HWND hwndDlg, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
|
||||
{
|
||||
KillTimer(hwndDlg, idEvent);
|
||||
|
||||
HWND ctrl = GetDlgItem(hwndDlg, IDC_COMBO_FONTS);
|
||||
HWND ctrl2 = GetDlgItem(hwndDlg, IDC_COMBO_SKINFONTS);
|
||||
|
||||
fillFontList2(ctrl, 1);
|
||||
fillSkinFontList(ctrl2);
|
||||
|
||||
EnableWindow(ctrl, TRUE);
|
||||
EnableWindow(ctrl2, TRUE);
|
||||
}
|
||||
|
||||
BOOL CALLBACK fontMapperProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
HWND lv = GetDlgItem(hwndDlg, IDC_LIST_MAPPINGS);
|
||||
mappingList.setwnd(lv);
|
||||
|
||||
mappingList.AddCol(WASABI_API_LNGSTRINGW(IDS_FONT), 140);
|
||||
mappingList.AddCol(WASABI_API_LNGSTRINGW(IDS_MAPPING), 139);
|
||||
mappingList.AddCol(WASABI_API_LNGSTRINGW(IDS_SCALE), 48);
|
||||
mappingList.AddCol(WASABI_API_LNGSTRINGW(IDS_TYPE), 64);
|
||||
|
||||
HWND ctrl = GetDlgItem(hwndDlg, IDC_COMBO_FONTS);
|
||||
ComboBox_AddStringW(ctrl, WASABI_API_LNGSTRINGW(IDS_LOADING));
|
||||
ComboBox_SetCurSel(ctrl, 0);
|
||||
EnableWindow(ctrl, FALSE);
|
||||
ctrl = GetDlgItem(hwndDlg, IDC_COMBO_SKINFONTS);
|
||||
ComboBox_AddStringW(ctrl, WASABI_API_LNGSTRINGW(IDS_LOADING));
|
||||
ComboBox_SetCurSel(ctrl, 0);
|
||||
EnableWindow(ctrl, FALSE);
|
||||
SetTimer(hwndDlg, 0xC0DF, 1, FontMappingLoader);
|
||||
|
||||
fm_rescanList(lv);
|
||||
CheckDlgButton(hwndDlg, IDC_RADIO_THISSKIN, 1);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_BUTTON_DEL), 0);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_BUTTON_NEW), 0);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_BUTTON_SET), 0);
|
||||
SendMessageW(GetDlgItem(hwndDlg, IDC_SLIDER_SCALE), TBM_SETRANGEMAX, 0, 200);
|
||||
SendMessageW(GetDlgItem(hwndDlg, IDC_SLIDER_SCALE), TBM_SETRANGEMIN, 0, 25);
|
||||
SendMessageW(GetDlgItem(hwndDlg, IDC_SLIDER_SCALE), TBM_SETPOS, 1, 100);
|
||||
return 1;
|
||||
}
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
case IDCANCEL:
|
||||
EndDialog(hwndDlg, 0);
|
||||
return 0;
|
||||
case IDOK:
|
||||
EndDialog(hwndDlg, 1);
|
||||
return 0;
|
||||
case IDC_BUTTON_NEW:
|
||||
fm_newMapping(hwndDlg);
|
||||
return 0;
|
||||
case IDC_BUTTON_DEL:
|
||||
fm_delMapping(hwndDlg);
|
||||
return 0;
|
||||
case IDC_BUTTON_SET:
|
||||
fm_modifyMapping(hwndDlg);
|
||||
return 0;
|
||||
case IDC_COMBO_FONTS:
|
||||
case IDC_COMBO_SKINFONTS:
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_BUTTON_SET), fm_validMapping(hwndDlg) && fm_hasSelection(hwndDlg));
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_BUTTON_NEW), fm_validMapping(hwndDlg));
|
||||
return 0;
|
||||
}
|
||||
case WM_HSCROLL:
|
||||
{
|
||||
if ((HWND) lParam == GetDlgItem(hwndDlg, IDC_SLIDER_SCALE))
|
||||
{
|
||||
int t = (int)SendMessageW(GetDlgItem(hwndDlg, IDC_SLIDER_SCALE), TBM_GETPOS, 0, 0);
|
||||
SetDlgItemTextA(hwndDlg, IDC_STATIC_SCALE, StringPrintf("%d%%", t));
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WM_NOTIFY:
|
||||
{
|
||||
int ctrl = (int)wParam;
|
||||
NMHDR *pnmh = (NMHDR*)lParam;
|
||||
if (ctrl == IDC_LIST_MAPPINGS)
|
||||
{
|
||||
if (pnmh->code == NM_CLICK)
|
||||
{
|
||||
NMLISTVIEW *nml = (NMLISTVIEW*)lParam;
|
||||
fm_itemClicked(hwndDlg, nml->iItem);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const int controls[] =
|
||||
{
|
||||
IDC_SLIDER_SCALE,
|
||||
};
|
||||
if (FALSE != WASABI_API_APP->DirectMouseWheel_ProcessDialogMessage(hwndDlg, uMsg, wParam, lParam, controls, ARRAYSIZE(controls)))
|
||||
return TRUE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void updateBFReplacement(HWND hwndDlg)
|
||||
{
|
||||
int replace = !IsDlgButtonChecked(hwndDlg, IDC_CHECK_ALLOWBITMAPFONTS);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_COMBO_TTFOVERRIDE), (replace && fonts_loaded));
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_SLIDER_SCALETTFOVERRIDE), replace);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC_DECREASESIZE), replace);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC_TTFSCALE), replace);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC_INCREASESIZE), replace);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_NO_7BIT_OVERRIDE), replace);
|
||||
}
|
||||
|
||||
void updateFreetypeVisible(HWND hwndDlg)
|
||||
{
|
||||
if (!IsDlgButtonChecked(hwndDlg, IDC_CHECK_FREETYPETTF))
|
||||
{
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC_CHARMAP), FALSE);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_COMBO_CHARMAP), FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC_CHARMAP), TRUE);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_COMBO_CHARMAP), TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void updateAltFontsVisible(HWND hwndDlg)
|
||||
{
|
||||
if (!IsDlgButtonChecked(hwndDlg, IDC_CHECK_ALTFONTS))
|
||||
{
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_CHECK_NO_ALT_7BIT_OVERRIDE), FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_CHECK_NO_ALT_7BIT_OVERRIDE), TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
// {504060F6-7D8C-4ebe-AE1D-A8BDF5EA1881}
|
||||
static const GUID freetypeFontRendererGUID =
|
||||
{ 0x504060f6, 0x7d8c, 0x4ebe, { 0xae, 0x1d, 0xa8, 0xbd, 0xf5, 0xea, 0x18, 0x81 } };
|
||||
|
||||
VOID CALLBACK FontLoader(HWND hwndDlg, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
|
||||
{
|
||||
KillTimer(hwndDlg, idEvent);
|
||||
|
||||
HWND ctrl = GetDlgItem(hwndDlg, IDC_COMBO_TTFOVERRIDE);
|
||||
HWND ctrl2 = GetDlgItem(hwndDlg, IDC_COMBO_DEFAULTFONT);
|
||||
|
||||
fillFontLists(ctrl, ctrl2);
|
||||
|
||||
int pos = -1;
|
||||
font_entry *fe = fontlist_byfilename.findItem(cfg_options_ttfoverridefont.getValue(), NULL);
|
||||
if (fe)
|
||||
{
|
||||
fontlist.sort(1);
|
||||
pos = fontlist.searchItem(fe);
|
||||
}
|
||||
ComboBox_SetCurSel(ctrl, pos);
|
||||
|
||||
pos = -1;
|
||||
fe = fontlist_byfilename.findItem(cfg_options_defaultfont.getValue(), NULL);
|
||||
if (fe)
|
||||
{
|
||||
fontlist.sort(1);
|
||||
pos = fontlist.searchItem(fe);
|
||||
}
|
||||
ComboBox_SetCurSel(ctrl2, pos);
|
||||
|
||||
EnableWindow(ctrl, (!IsDlgButtonChecked(hwndDlg, IDC_CHECK_ALLOWBITMAPFONTS)));
|
||||
EnableWindow(ctrl2, TRUE);
|
||||
EnableWindow(ctrl2, TRUE);
|
||||
fonts_loaded = 1;
|
||||
}
|
||||
|
||||
INT_PTR CALLBACK ffPrefsProc2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
fonts_loaded = 0;
|
||||
|
||||
CheckDlgButton(hwndDlg, IDC_CHECK_ALLOWBITMAPFONTS, cfg_options_allowbitmapfonts.getValueAsInt());
|
||||
CheckDlgButton(hwndDlg, IDC_CHECK_ALTFONTS, cfg_options_altfonts.getValueAsInt());
|
||||
|
||||
// delay the loading of the font lists until after the dialog has loaded to improve ui response
|
||||
HWND ctrl = GetDlgItem(hwndDlg, IDC_COMBO_TTFOVERRIDE);
|
||||
ComboBox_AddStringW(ctrl, WASABI_API_LNGSTRINGW(IDS_LOADING));
|
||||
ComboBox_SetCurSel(ctrl, 0);
|
||||
EnableWindow(ctrl, FALSE);
|
||||
|
||||
ctrl = GetDlgItem(hwndDlg, IDC_COMBO_DEFAULTFONT);
|
||||
ComboBox_AddStringW(ctrl, WASABI_API_LNGSTRINGW(IDS_LOADING));
|
||||
ComboBox_SetCurSel(ctrl, 0);
|
||||
EnableWindow(ctrl, FALSE);
|
||||
SetTimer(hwndDlg, 0xC0DE, 1, FontLoader);
|
||||
|
||||
SendMessageW(GetDlgItem(hwndDlg, IDC_SLIDER_SCALETTFOVERRIDE), TBM_SETRANGEMAX, 0, 200);
|
||||
SendMessageW(GetDlgItem(hwndDlg, IDC_SLIDER_SCALETTFOVERRIDE), TBM_SETRANGEMIN, 0, 25);
|
||||
SendMessageW(GetDlgItem(hwndDlg, IDC_SLIDER_SCALETTFOVERRIDE), TBM_SETPOS, 1, cfg_options_ttfoverridescale.getValueAsInt());
|
||||
SetDlgItemTextA(hwndDlg, IDC_STATIC_TTFSCALE, StringPrintf("%d%%", cfg_options_ttfoverridescale.getValueAsInt()));
|
||||
SendMessageW(GetDlgItem(hwndDlg, IDC_SLIDER_SCALEDEFAULTFONT), TBM_SETRANGEMAX, 0, 200);
|
||||
SendMessageW(GetDlgItem(hwndDlg, IDC_SLIDER_SCALEDEFAULTFONT), TBM_SETRANGEMIN, 0, 25);
|
||||
SendMessageW(GetDlgItem(hwndDlg, IDC_SLIDER_SCALEDEFAULTFONT), TBM_SETPOS, 1, cfg_options_defaultfontscale.getValueAsInt());
|
||||
SetDlgItemTextA(hwndDlg, IDC_STATIC_SCALEDEFAULTFONT, StringPrintf("%d%%", cfg_options_defaultfontscale.getValueAsInt()));
|
||||
|
||||
HWND charmaps = GetDlgItem(hwndDlg, IDC_COMBO_CHARMAP);
|
||||
if (WASABI_API_SVC->service_getServiceByGuid(freetypeFontRendererGUID) == 0) // no freetype
|
||||
{
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC_FREETYPE), FALSE);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_CHECK_FREETYPETTF), FALSE);
|
||||
EnableWindow(charmaps, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
const wchar_t *v = cfg_options_fontrenderer.getValue();
|
||||
CheckDlgButton(hwndDlg, IDC_CHECK_FREETYPETTF, WCSCASEEQLSAFE(v, L"FreeType"));
|
||||
|
||||
ComboBox_AddStringW(charmaps, WASABI_API_LNGSTRINGW(IDS_AUTO_UNICODE_LATIN1_ASCII));
|
||||
ComboBox_AddStringW(charmaps, L"Unicode");
|
||||
ComboBox_AddStringW(charmaps, L"Apple Roman");
|
||||
ComboBox_AddStringW(charmaps, L"Adobe Latin-1");
|
||||
ComboBox_AddStringW(charmaps, L"Adobe Standard");
|
||||
ComboBox_AddStringW(charmaps, L"Adobe Custom");
|
||||
ComboBox_AddStringW(charmaps, L"Adobe Expert");
|
||||
ComboBox_AddStringW(charmaps, L"SJIS");
|
||||
ComboBox_AddStringW(charmaps, L"Big5");
|
||||
ComboBox_AddStringW(charmaps, L"Wansung");
|
||||
ComboBox_AddStringW(charmaps, L"Johab");
|
||||
ComboBox_SetCurSel(charmaps, cfg_options_freetypecharmap.getValueAsInt() + 1);
|
||||
}
|
||||
|
||||
CheckDlgButton(hwndDlg, IDC_NO_7BIT_OVERRIDE, cfg_options_no7bitsttfoverride.getValueAsInt());
|
||||
CheckDlgButton(hwndDlg, IDC_CHECK_NO_ALT_7BIT_OVERRIDE, cfg_options_noalt7bitsttfoverride.getValueAsInt());
|
||||
|
||||
updateBFReplacement(hwndDlg);
|
||||
updateFreetypeVisible(hwndDlg);
|
||||
updateAltFontsVisible(hwndDlg);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_BUTTON_FONTMAPPER), cfg_options_usefontmapper.getValueAsInt());
|
||||
CheckDlgButton(hwndDlg, IDC_CHECK_USEFONTMAPPER, cfg_options_usefontmapper.getValueAsInt());
|
||||
return 1;
|
||||
}
|
||||
case WM_COMMAND:
|
||||
{
|
||||
int id = (int) LOWORD(wParam);
|
||||
int msg = (int)HIWORD(wParam);
|
||||
switch (id)
|
||||
{
|
||||
case IDC_CHECK_ALLOWBITMAPFONTS:
|
||||
updateBFReplacement(hwndDlg);
|
||||
cfg_options_allowbitmapfonts.setValueAsInt(IsDlgButtonChecked(hwndDlg, IDC_CHECK_ALLOWBITMAPFONTS));
|
||||
return 0;
|
||||
case IDC_CHECK_ALTFONTS:
|
||||
updateAltFontsVisible(hwndDlg);
|
||||
cfg_options_altfonts.setValueAsInt(IsDlgButtonChecked(hwndDlg, IDC_CHECK_ALTFONTS));
|
||||
return 0;
|
||||
case IDC_CHECK_FREETYPETTF:
|
||||
updateFreetypeVisible(hwndDlg);
|
||||
if (!IsDlgButtonChecked(hwndDlg, IDC_CHECK_FREETYPETTF))
|
||||
cfg_options_fontrenderer.setValue(L"Win32 TextOut");
|
||||
else
|
||||
cfg_options_fontrenderer.setValue(L"FreeType");
|
||||
return 0;
|
||||
case IDC_NO_7BIT_OVERRIDE:
|
||||
cfg_options_no7bitsttfoverride.setValueAsInt(IsDlgButtonChecked(hwndDlg, IDC_NO_7BIT_OVERRIDE));
|
||||
return 0;
|
||||
case IDC_CHECK_NO_ALT_7BIT_OVERRIDE:
|
||||
cfg_options_noalt7bitsttfoverride.setValueAsInt(IsDlgButtonChecked(hwndDlg, IDC_CHECK_NO_ALT_7BIT_OVERRIDE));
|
||||
return 0;
|
||||
case IDC_BUTTON_FONTMAPPER:
|
||||
WASABI_API_DIALOGBOXW(IDD_FONTMAPPER, hwndDlg, fontMapperProc);
|
||||
return 0;
|
||||
case IDC_CHECK_USEFONTMAPPER:
|
||||
cfg_options_usefontmapper.setValueAsInt(IsDlgButtonChecked(hwndDlg, IDC_CHECK_USEFONTMAPPER));
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_BUTTON_FONTMAPPER), cfg_options_usefontmapper.getValueAsInt());
|
||||
return 0;
|
||||
case IDC_COMBO_TTFOVERRIDE:
|
||||
{
|
||||
if (msg == CBN_SELCHANGE)
|
||||
{
|
||||
HWND list = GetDlgItem(hwndDlg, IDC_COMBO_TTFOVERRIDE);
|
||||
int idx = ComboBox_GetCurSel(list);
|
||||
if (idx != -1)
|
||||
{
|
||||
font_entry *fe = (font_entry *)ComboBox_GetItemData(list, idx);
|
||||
if (fe && fontlist.haveItem(fe))
|
||||
{
|
||||
cfg_options_ttfoverridefont.setValue(fe->filename);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
case IDC_COMBO_DEFAULTFONT:
|
||||
{
|
||||
if (msg == CBN_SELCHANGE)
|
||||
{
|
||||
HWND list = GetDlgItem(hwndDlg, IDC_COMBO_DEFAULTFONT);
|
||||
int idx = ComboBox_GetCurSel(list);
|
||||
if (idx != -1)
|
||||
{
|
||||
font_entry *fe = (font_entry *)ComboBox_GetItemData(list, idx);
|
||||
if (fe && fontlist.haveItem(fe))
|
||||
{
|
||||
cfg_options_defaultfont.setValue(fe->filename);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
case IDC_COMBO_CHARMAP:
|
||||
{
|
||||
if (msg == CBN_SELCHANGE)
|
||||
{
|
||||
int idx = ComboBox_GetCurSel(GetDlgItem(hwndDlg, IDC_COMBO_CHARMAP));
|
||||
if (idx >= 0)
|
||||
{
|
||||
cfg_options_freetypecharmap.setValueAsInt(idx - 1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WM_HSCROLL:
|
||||
{
|
||||
if ((HWND) lParam == GetDlgItem(hwndDlg, IDC_SLIDER_SCALETTFOVERRIDE))
|
||||
{
|
||||
int t = (int)SendMessageW((HWND)lParam, TBM_GETPOS, 0, 0);
|
||||
SetDlgItemTextA(hwndDlg, IDC_STATIC_TTFSCALE, StringPrintf("%d%%", t));
|
||||
SetTimer(hwndDlg, 100, 100, NULL);
|
||||
return 0;
|
||||
}
|
||||
if ((HWND) lParam == GetDlgItem(hwndDlg, IDC_SLIDER_SCALEDEFAULTFONT))
|
||||
{
|
||||
int t = (int)SendMessageW((HWND)lParam, TBM_GETPOS, 0, 0);
|
||||
SetDlgItemTextA(hwndDlg, IDC_STATIC_SCALEDEFAULTFONT, StringPrintf("%d%%", t));
|
||||
SetTimer(hwndDlg, 101, 100, NULL);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WM_TIMER:
|
||||
{
|
||||
if (wParam == 100)
|
||||
{
|
||||
KillTimer(hwndDlg, 100);
|
||||
int t = (int)SendMessageW(GetDlgItem(hwndDlg, IDC_SLIDER_SCALETTFOVERRIDE), TBM_GETPOS, 0, 0);
|
||||
cfg_options_ttfoverridescale.setValueAsInt(t);
|
||||
}
|
||||
else if (wParam == 101)
|
||||
{
|
||||
KillTimer(hwndDlg, 101);
|
||||
int t = (int)SendMessageW(GetDlgItem(hwndDlg, IDC_SLIDER_SCALEDEFAULTFONT), TBM_GETPOS, 0, 0);
|
||||
cfg_options_defaultfontscale.setValueAsInt(t);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
case WM_DESTROY:
|
||||
subWnd = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
const int controls[] =
|
||||
{
|
||||
IDC_SLIDER_SCALETTFOVERRIDE,
|
||||
IDC_SLIDER_SCALEDEFAULTFONT,
|
||||
};
|
||||
if (FALSE != WASABI_API_APP->DirectMouseWheel_ProcessDialogMessage(hwndDlg, uMsg, wParam, lParam, controls, ARRAYSIZE(controls)))
|
||||
return TRUE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,273 @@
|
||||
#include "precomp__gen_ff.h"
|
||||
#include "resource.h"
|
||||
#include <commctrl.h>
|
||||
#include "wa2cfgitems.h"
|
||||
#include "gen.h"
|
||||
#include "prefs.h"
|
||||
#include "../Agave/Language/api_language.h"
|
||||
#include <api/skin/skinparse.h>
|
||||
|
||||
void turnonoff(HWND wnd, int *t, int n, int v);
|
||||
extern int toggle_from_wa2;
|
||||
extern HWND subWnd;
|
||||
|
||||
static int auto_res = -1;
|
||||
static int cur_res = 10;
|
||||
static DWORD cur_res_last = 0;
|
||||
static int cur_res_total = 0;
|
||||
static int cur_res_num = 0;
|
||||
static int old_res = 0;
|
||||
static int dock_dist = 0;
|
||||
static int dock_dist2 = 0;
|
||||
static int spin_inc = 0;
|
||||
static int spin_show = 0;
|
||||
static int spin_hide = 0;
|
||||
int desktopalpha_unavail[] = {IDC_STATIC_DA1, IDC_CHECK_DESKTOPALPHA};
|
||||
|
||||
static const wchar_t *getScrollTextSpeedW(float v)
|
||||
{
|
||||
int skipn = (int)((1.0f / v) - 1 + 0.5f);
|
||||
static wchar_t buf[64];
|
||||
ZERO(buf);
|
||||
switch (skipn)
|
||||
{
|
||||
case 0: return WASABI_API_LNGSTRINGW_BUF(IDS_FASTER, buf, 64);
|
||||
case 1: return WASABI_API_LNGSTRINGW_BUF(IDS_FAST, buf, 64);
|
||||
case 2: return WASABI_API_LNGSTRINGW_BUF(IDS_AVERAGE, buf, 64);
|
||||
case 3: return WASABI_API_LNGSTRINGW_BUF(IDS_SLOW, buf, 64);
|
||||
case 4: return WASABI_API_LNGSTRINGW_BUF(IDS_SLOWER, buf, 64);
|
||||
}
|
||||
return WASABI_API_LNGSTRINGW_BUF(IDS_N_A, buf, 64);
|
||||
}
|
||||
|
||||
static void nextRes(HWND dlg)
|
||||
{
|
||||
if (cur_res == 250)
|
||||
{
|
||||
cfg_uioptions_timerresolution.setValueAsInt(old_res);
|
||||
SetDlgItemTextW(dlg, IDC_TXT, WASABI_API_LNGSTRINGW(IDS_FAILED_TO_DETECT_OPTIMAL_RESOLUTION));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cur_res >= 100)
|
||||
cur_res += 5;
|
||||
else if (cur_res >= 50)
|
||||
cur_res += 2;
|
||||
else
|
||||
cur_res++;
|
||||
SetDlgItemTextW(dlg, IDC_TXT, StringPrintfW(WASABI_API_LNGSTRINGW(IDS_AUTO_DETECTING), cur_res));
|
||||
cur_res_last = Wasabi::Std::getTickCount();
|
||||
cur_res_total = 0;
|
||||
cur_res_num = 0;
|
||||
SetTimer(dlg, 1, cur_res, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static INT_PTR CALLBACK autoTimerResProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
old_res = cfg_uioptions_timerresolution.getValueAsInt();
|
||||
cur_res = -1;
|
||||
return 1;
|
||||
}
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
case IDCANCEL:
|
||||
cfg_uioptions_timerresolution.setValueAsInt(old_res);
|
||||
EndDialog(hwndDlg, 0);
|
||||
return 0;
|
||||
case IDOK:
|
||||
if (cur_res == -1)
|
||||
{
|
||||
cfg_uioptions_timerresolution.setValueAsInt(250);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDOK), FALSE);
|
||||
SetDlgItemTextW(hwndDlg, IDC_TXT, WASABI_API_LNGSTRINGW(IDS_PREPARING_AUTO_DETECTION));
|
||||
SetTimer(hwndDlg, 2, 1000, NULL);
|
||||
}
|
||||
else EndDialog(hwndDlg, IDOK);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
case WM_TIMER:
|
||||
{
|
||||
if (wParam == 1)
|
||||
{
|
||||
DWORD now = Wasabi::Std::getTickCount();
|
||||
cur_res_total += now - cur_res_last;
|
||||
cur_res_num++;
|
||||
cur_res_last = now;
|
||||
int m = 5;
|
||||
if (cur_res >= 100) m = 2;
|
||||
else if (cur_res >= 50) m = 3;
|
||||
if (cur_res_num == m)
|
||||
{
|
||||
float average = (float)cur_res_total / (float)m;
|
||||
if (average <= (float)cur_res*1.1)
|
||||
{
|
||||
auto_res = cur_res;
|
||||
cfg_uioptions_timerresolution.setValueAsInt(old_res);
|
||||
SetDlgItemTextW(hwndDlg, IDC_TXT, StringPrintfW(WASABI_API_LNGSTRINGW(IDS_AUTO_DETECTION_SUCCESSFUL), cur_res));
|
||||
SetDlgItemTextW(hwndDlg, IDOK, WASABI_API_LNGSTRINGW(IDS_ACCEPT));
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDOK), TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
nextRes(hwndDlg);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
else if (wParam == 2)
|
||||
{
|
||||
KillTimer(hwndDlg, 2);
|
||||
cur_res = 9;
|
||||
nextRes(hwndDlg);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void autoTimerRes(HWND dlg)
|
||||
{
|
||||
INT_PTR r = WASABI_API_DIALOGBOXW(IDD_AUTOTIMERRES, dlg, autoTimerResProc);
|
||||
if (r == IDOK)
|
||||
{
|
||||
cfg_uioptions_timerresolution.setValueAsInt(auto_res);
|
||||
SendMessageW(GetDlgItem(dlg, IDC_SLIDER_TIMERRESOLUTION), TBM_SETPOS, 1, auto_res);
|
||||
SetDlgItemTextW(dlg, IDC_STATIC_TIMERRES, StringPrintfW(WASABI_API_LNGSTRINGW(IDS_TIMERS_RESOLUTION), auto_res));
|
||||
}
|
||||
}
|
||||
|
||||
INT_PTR CALLBACK ffPrefsProc1(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
dock_dist = dock_dist2 = spin_inc = spin_show = spin_hide = 0;
|
||||
|
||||
CheckDlgButton(hwndDlg, IDC_CHECK_DESKTOPALPHA, cfg_uioptions_desktopalpha.getValueAsInt());
|
||||
if (!Wasabi::Std::Wnd::isDesktopAlphaAvailable()) turnonoff(hwndDlg, desktopalpha_unavail, sizeof(desktopalpha_unavail)/sizeof(int), 0);
|
||||
SendMessageW(GetDlgItem(hwndDlg, IDC_SLIDER_TIMERRESOLUTION), TBM_SETRANGEMAX, 0, 250);
|
||||
SendMessageW(GetDlgItem(hwndDlg, IDC_SLIDER_TIMERRESOLUTION), TBM_SETRANGEMIN, 0, 10);
|
||||
SendMessageW(GetDlgItem(hwndDlg, IDC_SLIDER_TIMERRESOLUTION), TBM_SETPOS, 1, cfg_uioptions_timerresolution.getValueAsInt());
|
||||
SetDlgItemTextW(hwndDlg, IDC_STATIC_TIMERRES, StringPrintfW(WASABI_API_LNGSTRINGW(IDS_TIMERS_RESOLUTION), cfg_uioptions_timerresolution.getValueAsInt()));
|
||||
CheckDlgButton(hwndDlg, IDC_CHECK_TOOLTIPS, cfg_uioptions_tooltips.getValueAsInt());
|
||||
CheckDlgButton(hwndDlg, IDC_CHECK_DOCKING, cfg_options_docking.getValueAsInt());
|
||||
CheckDlgButton(hwndDlg, IDC_CHECK_DOCKING2, cfg_options_appbarondrag.getValueAsInt());
|
||||
|
||||
SendMessageW(GetDlgItem(hwndDlg,IDC_SPIN_DOCKDISTANCE),UDM_SETRANGE,0,MAKELONG(1000,0));
|
||||
SetDlgItemInt(hwndDlg, IDC_EDIT_DOCKDISTANCE, cfg_options_dockingdistance.getValueAsInt(), 0);
|
||||
SendMessageW(GetDlgItem(hwndDlg,IDC_SPIN_DOCKDISTANCE2),UDM_SETRANGE,0,MAKELONG(1000,0));
|
||||
SetDlgItemInt(hwndDlg, IDC_EDIT_DOCKDISTANCE2, cfg_options_appbardockingdistance.getValueAsInt(), 0);
|
||||
|
||||
SetDlgItemTextA(hwndDlg, IDC_EDIT_INCREMENT, StringPrintf("%d", cfg_uioptions_textincrement.getValueAsInt()));
|
||||
SendMessageW(GetDlgItem(hwndDlg, IDC_SLIDER_TICKERSPEED), TBM_SETRANGEMAX, 0, 4);
|
||||
SendMessageW(GetDlgItem(hwndDlg, IDC_SLIDER_TICKERSPEED), TBM_SETRANGEMIN, 0, 0);
|
||||
SendMessageW(GetDlgItem(hwndDlg, IDC_SLIDER_TICKERSPEED), TBM_SETPOS, 1, (int)(1.0f / cfg_uioptions_textspeed.getValueAsDouble() - 1.0f + 0.5f));
|
||||
SetDlgItemTextW(hwndDlg, IDC_STATIC_TICKER, StringPrintfW(WASABI_API_LNGSTRINGW(IDS_TEXT_SCROLL_SPEED), getScrollTextSpeedW((float)cfg_uioptions_textspeed.getValueAsDouble())));
|
||||
|
||||
SendMessageW(GetDlgItem(hwndDlg,IDC_SPIN_SHOWTIME),UDM_SETRANGE,0,MAKELONG(9999,0));
|
||||
SetDlgItemInt(hwndDlg, IDC_EDIT_SHOWTIME, cfg_uioptions_appbarsshowtime.getValueAsInt(), 0);
|
||||
SendMessageW(GetDlgItem(hwndDlg,IDC_SPIN_HIDETIME),UDM_SETRANGE,0,MAKELONG(9999,0));
|
||||
SetDlgItemInt(hwndDlg, IDC_EDIT_HIDETIME, cfg_uioptions_appbarshidetime.getValueAsInt(), 0);
|
||||
|
||||
dock_dist = dock_dist2 = spin_inc = spin_show = spin_hide = 1;
|
||||
return 1;
|
||||
}
|
||||
case WM_COMMAND:
|
||||
toggle_from_wa2 = 1;
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
case IDC_CHECK_DESKTOPALPHA:
|
||||
cfg_uioptions_desktopalpha.setValueAsInt(IsDlgButtonChecked(hwndDlg, IDC_CHECK_DESKTOPALPHA));
|
||||
return 0;
|
||||
case IDC_BUTTON_AUTOTIMERRES:
|
||||
autoTimerRes(hwndDlg);
|
||||
return 0;
|
||||
case IDC_CHECK_TOOLTIPS:
|
||||
cfg_uioptions_tooltips.setValueAsInt(IsDlgButtonChecked(hwndDlg, IDC_CHECK_TOOLTIPS));
|
||||
return 0;
|
||||
case IDC_CHECK_DOCKING:
|
||||
cfg_options_docking.setValueAsInt(IsDlgButtonChecked(hwndDlg, IDC_CHECK_DOCKING));
|
||||
return 0;
|
||||
case IDC_CHECK_DOCKING2:
|
||||
cfg_options_appbarondrag.setValueAsInt(IsDlgButtonChecked(hwndDlg, IDC_CHECK_DOCKING2));
|
||||
return 0;
|
||||
case IDC_EDIT_DOCKDISTANCE:
|
||||
if (HIWORD(wParam) == EN_CHANGE && dock_dist)
|
||||
{
|
||||
int t, a = GetDlgItemInt(hwndDlg, IDC_EDIT_DOCKDISTANCE, &t, 0);
|
||||
if (t) cfg_options_dockingdistance.setValueAsInt(a);
|
||||
}
|
||||
return 0;
|
||||
case IDC_EDIT_DOCKDISTANCE2:
|
||||
if (HIWORD(wParam) == EN_CHANGE && dock_dist2)
|
||||
{
|
||||
int t, a = GetDlgItemInt(hwndDlg, IDC_EDIT_DOCKDISTANCE2, &t, 0);
|
||||
if (t) cfg_options_appbardockingdistance.setValueAsInt(a);
|
||||
}
|
||||
return 0;
|
||||
case IDC_EDIT_INCREMENT:
|
||||
if (HIWORD(wParam) == EN_CHANGE && spin_inc)
|
||||
{
|
||||
int t, a = GetDlgItemInt(hwndDlg, IDC_EDIT_INCREMENT, &t, 0);
|
||||
if (t) cfg_uioptions_textincrement.setValueAsInt(a);
|
||||
}
|
||||
return 0;
|
||||
case IDC_EDIT_SHOWTIME:
|
||||
if (HIWORD(wParam) == EN_CHANGE && spin_show)
|
||||
{
|
||||
int t, a = GetDlgItemInt(hwndDlg, IDC_EDIT_SHOWTIME, &t, 0);
|
||||
if (t) cfg_uioptions_appbarsshowtime.setValueAsInt(a);
|
||||
}
|
||||
return 0;
|
||||
case IDC_EDIT_HIDETIME:
|
||||
if (HIWORD(wParam) == EN_CHANGE && spin_hide)
|
||||
{
|
||||
int t, a = GetDlgItemInt(hwndDlg, IDC_EDIT_HIDETIME, &t, 0);
|
||||
if (t) cfg_uioptions_appbarshidetime.setValueAsInt(a);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
toggle_from_wa2 = 0;
|
||||
break;
|
||||
case WM_HSCROLL:
|
||||
{
|
||||
int t = (int)SendMessageW((HWND) lParam, TBM_GETPOS, 0, 0);
|
||||
HWND ctrl = (HWND) lParam;
|
||||
if (ctrl == GetDlgItem(hwndDlg, IDC_SLIDER_TIMERRESOLUTION))
|
||||
{
|
||||
cfg_uioptions_timerresolution.setValueAsInt(t);
|
||||
SetDlgItemTextW(hwndDlg, IDC_STATIC_TIMERRES, StringPrintfW(WASABI_API_LNGSTRINGW(IDS_TIMERS_RESOLUTION), cfg_uioptions_timerresolution.getValueAsInt()));
|
||||
}
|
||||
else if (ctrl == GetDlgItem(hwndDlg, IDC_SLIDER_TICKERSPEED))
|
||||
{
|
||||
cfg_uioptions_textspeed.setValueAsDouble(1.0 / (float)(t + 1));
|
||||
SetDlgItemTextW(hwndDlg, IDC_STATIC_TICKER, StringPrintfW(WASABI_API_LNGSTRINGW(IDS_TEXT_SCROLL_SPEED), getScrollTextSpeedW((float)cfg_uioptions_textspeed.getValueAsDouble())));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WM_DESTROY:
|
||||
subWnd = NULL;
|
||||
dock_dist = dock_dist2 = spin_inc = spin_show = spin_hide = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
const int controls[] =
|
||||
{
|
||||
IDC_SLIDER_TIMERRESOLUTION,
|
||||
IDC_SLIDER_TICKERSPEED,
|
||||
};
|
||||
if (FALSE != WASABI_API_APP->DirectMouseWheel_ProcessDialogMessage(hwndDlg, uMsg, wParam, lParam, controls, ARRAYSIZE(controls)))
|
||||
return TRUE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,261 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by gen_ff.rc
|
||||
//
|
||||
#define IDS_SEND_TO 1
|
||||
#define IDS_NO_THEME_AVAILABLE 2
|
||||
#define IDS_COLOR_THEMES 3
|
||||
#define IDS_CURRENT_SKIN 4
|
||||
#define IDS_NO_SKIN_LOADED 5
|
||||
#define IDS_MODERN_SKIN_SUPPORT_CLASSIC 6
|
||||
#define IDS_MODERN_SKIN_SUPPORT 7
|
||||
#define IDS_CUSTOM_X_PERCENT 8
|
||||
#define IDS_CUSTOM 9
|
||||
#define IDS_WINDOW_SETTINGS 10
|
||||
#define IDS_SCALE_X_PERCENT 11
|
||||
#define IDS_OPACITY_X_PERCENT 12
|
||||
#define IDS_GHK_SHOW_NOTIFICATION 13
|
||||
#define IDS_MODERN_SKINS 14
|
||||
#define IDS_GENERAL 15
|
||||
#define IDS_ALPHA_BLENDING 16
|
||||
#define IDS_FONT_RENDERING 17
|
||||
#define IDS_ERROR_WHILE_LOADING_SKIN_WINDOW 18
|
||||
#define IDS_NO_OPTIONS_AVAILABLE_FOR_THIS_SKIN 19
|
||||
#define IDS_AUTO_UNICODE_LATIN1_ASCII 20
|
||||
#define IDS_FONT 21
|
||||
#define IDS_MAPPING 22
|
||||
#define IDS_SCALE 23
|
||||
#define IDS_TYPE 24
|
||||
#define IDS_THIS_SKIN 25
|
||||
#define IDS_ALL_SKINS 26
|
||||
#define IDS_FASTER 27
|
||||
#define IDS_FAST 28
|
||||
#define IDS_AVERAGE 29
|
||||
#define IDS_SLOW 30
|
||||
#define IDS_SLOWER 31
|
||||
#define IDS_FAILED_TO_DETECT_OPTIMAL_RESOLUTION 32
|
||||
#define IDS_AUTO_DETECTING 33
|
||||
#define IDS_PREPARING_AUTO_DETECTION 34
|
||||
#define IDS_AUTO_DETECTION_SUCCESSFUL 35
|
||||
#define IDS_ACCEPT 36
|
||||
#define IDS_N_A 37
|
||||
#define IDS_TIMERS_RESOLUTION 38
|
||||
#define IDS_TEXT_SCROLL_SPEED 39
|
||||
#define IDS_CROSSFADER_ONLY_UNDER_OUT_DS 40
|
||||
#define IDS_NOT_SUPPORTED 41
|
||||
#define IDS_PLAYLIST_EDITOR 42
|
||||
#define IDS_VIDEO 43
|
||||
#define IDS_MONO 44
|
||||
#define IDS_STEREO 45
|
||||
#define IDS_X_CHANNELS 46
|
||||
#define IDS_BY_SPACE 47
|
||||
#define IDS_COULD_NOT_FIND_WINAMP 48
|
||||
#define IDS_ERROR 49
|
||||
#define IDS_WINAMP_NOT_FOUND 50
|
||||
#define IDS_VISUALIZATIONS 51
|
||||
#define IDS_STRING52 52
|
||||
#define IDS_MEDIA_LIBRARY 52
|
||||
#define IDS_NO_SET 53
|
||||
#define IDS_SLOT_X_X 54
|
||||
#define IDS_COLOR_EDITOR 55
|
||||
#define IDS_SKIN_SETTINGS 56
|
||||
#define IDS_WEB_BROWSER 57
|
||||
#define IDS_STRING58 58
|
||||
#define IDS_ALBUM_ART 58
|
||||
#define IDS_NO_VISUALISATION 59
|
||||
#define IDS_SPECTRUM_ANALYZER 60
|
||||
#define IDS_STRING61 61
|
||||
#define IDS_OSCILLOSCOPE 61
|
||||
#define IDS_SKIN_LOAD_FORMAT_OLD 62
|
||||
#define IDS_SKIN_LOAD_FORMAT_TOO_RECENT 63
|
||||
#define IDS_SKIN_LOAD_WARNING 64
|
||||
#define IDS_SKIN_LOAD_NOT_SUPPORTED 65
|
||||
#define IDS_NO_SKIN_LOADED_ 66
|
||||
#define IDS_XUITHEME_LOAD 67
|
||||
#define IDS_XUITHEME_SAVE 68
|
||||
#define IDS_MS 69
|
||||
#define IDS_KHZ 70
|
||||
#define IDS_STRING71 71
|
||||
#define IDS_KBPS 71
|
||||
#define IDS_USELOCK 72
|
||||
#define IDS_ALLLOCKED 73
|
||||
#define IDS_OPAQUE_FOCUS 74
|
||||
#define IDS_OPAQUE_HOVER 75
|
||||
#define IDS_NO_OPACITY 76
|
||||
#define IDS_LOADING 77
|
||||
#define IDB_PLEDIT_TAB_NORMAL 110
|
||||
#define IDB_PLEDIT_TAB_HILITED 111
|
||||
#define IDB_PLEDIT_TAB_SELECTED 112
|
||||
#define IDB_VIDEO_TAB_NORMAL 120
|
||||
#define IDB_VIDEO_TAB_HILITED 121
|
||||
#define IDB_VIDEO_TAB_SELECTED 122
|
||||
#define IDD_ABOUT 124
|
||||
#define IDR_SONGINFO 128
|
||||
#define IDB_MB_TAB_NORMAL 130
|
||||
#define IDB_MB_TAB_HILITED 131
|
||||
#define IDB_MB_TAB_SELECTED 132
|
||||
#define IDB_ML_TAB_NORMAL 133
|
||||
#define IDD_DIALOG1 133
|
||||
#define IDB_ML_TAB_HILITED 134
|
||||
#define IDD_FONTMAPPER 134
|
||||
#define IDB_ML_TAB_SELECTED 135
|
||||
#define IDB_VIS_TAB_NORMAL 136
|
||||
#define IDB_VIS_TAB_HILITED 137
|
||||
#define IDB_VIS_TAB_SELECTED 138
|
||||
#define IDD_MEDIA_DOWNLOADER 141
|
||||
#define IDD_PREFS_WINDOWS 142
|
||||
#define IDC_CHECK_DESKTOPALPHA 1002
|
||||
#define IDC_STATIC_DA1 1003
|
||||
#define IDC_STATIC_DA3 1005
|
||||
#define IDC_TAB1 1006
|
||||
#define IDC_LIST1 1007
|
||||
#define IDC_BUTTON_SETTHEME 1008
|
||||
#define IDC_VERSTR 1009
|
||||
#define IDC_CHECK_LINKALPHA 1011
|
||||
#define IDC_CHECK_LINKRATIO 1012
|
||||
#define IDC_SLIDER_TIMERRESOLUTION 1013
|
||||
#define IDC_STATIC_TIMERRES 1014
|
||||
#define IDC_CHECK_TOOLTIPS 1015
|
||||
#define IDC_CHECK_DOCKING 1016
|
||||
#define IDC_EDIT_DOCKDISTANCE 1017
|
||||
#define IDC_BUTTON_SKINSPECIFIC 1018
|
||||
#define IDC_CHECK_DOCKING2 1018
|
||||
#define IDC_SLIDER_TICKERSPEED 1019
|
||||
#define IDC_STATIC_TICKER 1020
|
||||
#define IDC_BUTTON_AUTOTIMERRES 1021
|
||||
#define IDC_EDIT_DOCKDISTANCE2 1022
|
||||
#define IDC_TXT 1023
|
||||
#define IDC_EDIT_INCREMENT 1023
|
||||
#define IDC_SLIDER_CUSTOMSCALE 1025
|
||||
#define IDC_STATIC_SCALE 1026
|
||||
#define IDC_EDIT_SHOWTIME 1027
|
||||
#define IDC_EDIT_HIDETIME 1028
|
||||
#define IDC_RECT 1186
|
||||
#define IDR_CONTROLMENU 1281
|
||||
#define IDD_PREFS_THEMES 1282
|
||||
#define IDC_CHECK_ALLOWBITMAPFONTS 1283
|
||||
#define IDD_PREFS 1284
|
||||
#define IDC_CHECK_ALTFONTS 1284
|
||||
#define IDD_AUTOTIMERRES 1285
|
||||
#define IDD_CUSTOMSCALE 1286
|
||||
#define IDC_COMBO_TTFOVERRIDE 1286
|
||||
#define IDD_PREFS_FONTS 1287
|
||||
#define IDC_STATIC_TTFOVERRIDE 1287
|
||||
#define IDC_SLIDER_SCALETTFOVERRIDE 1288
|
||||
#define IDC_STATIC_TTFSCALE 1289
|
||||
#define IDD_CUSTOMALPHA 1289
|
||||
#define IDC_CHECK_FREETYPETTF 1290
|
||||
#define IDD_PREFS_SKIN 1290
|
||||
#define IDC_COMBO_CHARMAP 1291
|
||||
#define IDC_STATIC_FREETYPE 1292
|
||||
#define IDC_STATIC_DECREASESIZE 1293
|
||||
#define IDC_STATIC_INCREASESIZE 1294
|
||||
#define IDC_NO_7BIT_OVERRIDE 1295
|
||||
#define IDC_CHECK_NO_ALT_7BIT_OVERRIDE 1296
|
||||
#define IDC_STATIC_CHARMAP 1297
|
||||
#define IDC_STATIC_ALTFONTS 1298
|
||||
#define IDC_COMBO_DEFAULTFONT 1299
|
||||
#define IDC_SLIDER_SCALEDEFAULTFONT 1300
|
||||
#define IDC_CHECK_LINKALLALPHA 1301
|
||||
#define IDC_STATIC_DECREASESIZE2 1301
|
||||
#define IDC_CHECK_LINKALLRATIO 1302
|
||||
#define IDC_STATIC_SCALEDEFAULTFONT 1302
|
||||
#define IDC_STATIC_INCREASESIZE2 1303
|
||||
#define IDC_STATIC_SCALEDEFAULTFONT2 1305
|
||||
#define IDC_RADIO_USELOCK 1306
|
||||
#define IDC_RADIO_ALLLOCKED 1307
|
||||
#define IDC_SLIDER_CUSTOMALPHA 1309
|
||||
#define IDC_STATIC_ALPHA 1311
|
||||
#define IDC_SLIDER_HOLD 1313
|
||||
#define IDC_STATIC_TRANSP 1314
|
||||
#define IDC_STATIC_OPAQUE 1315
|
||||
#define IDC_SLIDER_FADEIN 1316
|
||||
#define IDC_SLIDER_FADEOUT 1317
|
||||
#define IDC_STATIC_SCALE11 1318
|
||||
#define IDC_STATIC_HOLD 1319
|
||||
#define IDC_STATIC_FADEIN 1320
|
||||
#define IDC_STATIC_FADEOUT 1321
|
||||
#define IDC_STATIC_SCALE301 1322
|
||||
#define IDC_EDIT_EXTEND 1323
|
||||
#define IDC_STATIC_EXTEND 1324
|
||||
#define IDC_STATIC_GROUP 1326
|
||||
#define IDC_CHECK_USEFONTMAPPER 1330
|
||||
#define IDC_BUTTON_FONTMAPPER 1331
|
||||
#define IDC_LIST_MAPPINGS 1332
|
||||
#define IDC_RADIO_THISSKIN 1333
|
||||
#define IDC_RADIO_ALLSKINS 1334
|
||||
#define IDC_BUTTON_NEW 1335
|
||||
#define IDC_BUTTON_DEL 1336
|
||||
#define IDC_COMBO_SKINFONTS 1337
|
||||
#define IDC_COMBO_FONTS 1338
|
||||
#define IDC_SLIDER_SCALE 1339
|
||||
#define IDC_BUTTON_SET 1340
|
||||
#define IDC_STATIC_EMPTY 1344
|
||||
#define IDC_STATIC_OPACITY 1345
|
||||
#define IDC_STATIC_AUTOON 1346
|
||||
#define IDC_STATIC_AUTOONTXT 1347
|
||||
#define IDC_STATIC_FADEIN2 1348
|
||||
#define IDC_STATIC_FADEOUT2 1349
|
||||
#define IDC_STATIC_HOLD2 1350
|
||||
#define IDC_STATIC_EXTENDBOX 1351
|
||||
#define IDC_URL 1352
|
||||
#define IDC_PROGRESS 1353
|
||||
#define IDC_DOWNLOADTO 1354
|
||||
#define IDC_SPIN_EXTEND 1356
|
||||
#define IDC_SPIN_DOCKDISTANCE 1357
|
||||
#define IDC_SPIN_DOCKDISTANCE2 1358
|
||||
#define IDC_COMBO_SCALE 1358
|
||||
#define IDC_SPIN_INCREMENT 1359
|
||||
#define IDC_COMBO_OPACITY 1359
|
||||
#define IDC_SPIN_SHOWTIME 1360
|
||||
#define IDC_SPIN_HIDETIME 1361
|
||||
#define IDD_PREFS_GENERAL 1362
|
||||
#define WINAMP_EDIT_ID3 40188
|
||||
#define WINAMP_JUMP 40193
|
||||
#define WINAMP_JUMPFILE 40194
|
||||
#define ID_CONTROLMENU_OPACITY_10 42202
|
||||
#define ID_CONTROLMENU_OPACITY_20 42203
|
||||
#define ID_CONTROLMENU_OPACITY_30 42204
|
||||
#define ID_CONTROLMENU_OPACITY_40 42205
|
||||
#define ID_CONTROLMENU_OPACITY_50 42206
|
||||
#define ID_CONTROLMENU_OPACITY_60 42207
|
||||
#define ID_CONTROLMENU_OPACITY_70 42208
|
||||
#define ID_CONTROLMENU_OPACITY_80 42209
|
||||
#define ID_CONTROLMENU_OPACITY_90 42210
|
||||
#define ID_CONTROLMENU_OPACITY_100 42211
|
||||
#define ID_CONTROLMENU_SCALING_25 42213
|
||||
#define ID_CONTROLMENU_SCALING_50 42214
|
||||
#define ID_CONTROLMENU_SCALING_75 42215
|
||||
#define ID_CONTROLMENU_SCALING_100 42216
|
||||
#define ID_CONTROLMENU_SCALING_200 42217
|
||||
#define ID_CONTROLMENU_SCALING_250 42218
|
||||
#define ID_CONTROLMENU_SCALING_300 42219
|
||||
#define ID_CONTROLMENU_SCALING_150 42222
|
||||
#define ID_CONTROLMENU_SCALING_LOCKED 42223
|
||||
#define ID_CONTROLMENU_SCALING_CUSTOM 42224
|
||||
#define ID_CONTROLMENU_SCALING_FOLLOWDOUBLESIZE 42225
|
||||
#define ID_CONTROLMENU_OPACITY_AUTO100 42226
|
||||
#define ID_CONTROLMENU_OPACITY_AUTO100_HOVER 42226
|
||||
#define ID_CONTROLMENU_OPACITY_CUSTOM 42227
|
||||
#define ID_CONTROLMENU_OPACITY_AUTO100_FOCUS 42228
|
||||
#define ID_CONTROLMENU_TOOLBAR_TOP 42229
|
||||
#define ID_CONTROLMENU_TOOLBAR_RIGHT 42231
|
||||
#define ID_CONTROLMENU_TOOLBAR_BOTTOM 42232
|
||||
#define ID_CONTROLMENU_TOOLBAR_DISABLED 42233
|
||||
#define ID_CONTROLMENU_TOOLBAR_ALWAYSONTOP 42234
|
||||
#define ID_CONTROLMENU_TOOLBAR_AUTOHIDE 42235
|
||||
#define ID_CONTROLMENU_TOOLBAR_LEFT 42236
|
||||
#define ID_CONTROLMENU_TOOLBAR_AUTODOCKONDRAG 42237
|
||||
#define ID_CONTROLMENU_SCALING_125 42238
|
||||
#define IDS_NULLSOFT_MODERN_SKINS 65534
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 143
|
||||
#define _APS_NEXT_COMMAND_VALUE 42238
|
||||
#define _APS_NEXT_CONTROL_VALUE 1359
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,72 @@
|
||||
#include <precomp.h>
|
||||
|
||||
// these are pragmas to force a reference to objects that otherwise are entirely decoupled from the rest of the
|
||||
// program except for their static constructor code -- in this case, if the code is in a lib, the object gets
|
||||
// optimized out, and we definitly do not want that
|
||||
//
|
||||
// generally you want to add more of these pragmas for services declared through the BEGIN_SERVICES/END_SERVICES
|
||||
// macros which you want to link with
|
||||
|
||||
// color themes list xui object
|
||||
#ifdef WASABI_COMPILE_COLORTHEMES
|
||||
#pragma comment(linker, "/include:__link_ColorThemesListXuiSvc")
|
||||
#endif
|
||||
|
||||
// config script objects
|
||||
#ifdef WASABI_COMPILE_CONFIG
|
||||
#pragma comment(linker, "/include:__link_ConfigObjectSvc")
|
||||
#endif
|
||||
|
||||
// minibrowser service
|
||||
#ifdef WASABI_WIDGETS_BROWSER
|
||||
#pragma comment(linker, "/include:__link_MbSvc")
|
||||
#endif
|
||||
|
||||
// skinned tooltips
|
||||
#ifdef WASABI_WIDGETS_TOOLTIPS
|
||||
#pragma comment(linker, "/include:__link_GroupTipsSvc")
|
||||
#endif
|
||||
|
||||
// freetype font renderer
|
||||
#ifdef WASABI_FONT_RENDERER_USE_FREETYPE
|
||||
//#pragma comment(linker, "/include:__link_FreeTypeFontRenderer_Svc")
|
||||
#endif
|
||||
|
||||
// pldir svc
|
||||
#pragma comment(linker, "/include:__link_wa2PlDirObj_Svcs")
|
||||
|
||||
// pleditor xuiobject
|
||||
#pragma comment(linker, "/include:__link_Wa2PleditXuiSvc")
|
||||
|
||||
// song ticker xui object
|
||||
#pragma comment(linker, "/include:__link_wa2SongTicker_Svcs")
|
||||
|
||||
// Winamp Config script object
|
||||
#pragma comment(linker, "/include:__link_WinampConfig_svcs")
|
||||
|
||||
// progress grid xui object
|
||||
#ifdef WASABI_WIDGETS_MEDIASLIDERS
|
||||
#pragma comment(linker, "/include:__link_ProgressGridXuiSvc")
|
||||
#endif
|
||||
|
||||
// gradient xui object
|
||||
#ifdef WASABI_WIDGETS_MEDIASLIDERS
|
||||
#pragma comment(linker, "/include:__link_GradientXuiSvc")
|
||||
#endif
|
||||
|
||||
#pragma comment(linker, "/include:__link_GroupXFadeXuiSvc")
|
||||
|
||||
#pragma comment(linker, "/include:__link_GradientGen_Svc")
|
||||
|
||||
#pragma comment(linker, "/include:__link_OsEdgeGen_Svc")
|
||||
|
||||
#pragma comment(linker, "/include:__link_PolyGen_Svc")
|
||||
|
||||
#pragma comment(linker, "/include:__link_SolidGen_Svc")
|
||||
|
||||
#pragma comment(linker, "/include:__link_ScriptCore_Svc")
|
||||
|
||||
|
||||
|
||||
//#pragma comment(linker, "/include:__link_ColorEditor_Svc")
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
#include <precomp.h>
|
||||
#include "skininfo.h"
|
||||
#include "../xml/obj_xml.h"
|
||||
#include <api/xml/XMLAutoInclude.h>
|
||||
#include <api/xml/LoadXML.h>
|
||||
#include "../nu/AutoChar.h"
|
||||
#include "gen.h"
|
||||
#include "resource.h"
|
||||
#include "../Agave/Language/api_language.h"
|
||||
|
||||
SkinInfosXmlReader::SkinInfosXmlReader(const wchar_t *skinname) : SkinInfoBlock(skinname)
|
||||
{
|
||||
waServiceFactory *parserFactory = WASABI_API_SVC->service_getServiceByGuid(obj_xmlGUID);
|
||||
if (parserFactory)
|
||||
{
|
||||
obj_xml *parser = (obj_xml *)parserFactory->getInterface();
|
||||
if (parser)
|
||||
{
|
||||
{
|
||||
StringPathCombine skinPath(WASABI_API_SKIN->getSkinsPath(), skinname);
|
||||
|
||||
XMLAutoInclude include(parser, skinPath);
|
||||
parser->xmlreader_registerCallback(L"WinampAbstractionLayer",this);
|
||||
//parser->xmlreader_registerCallback(L"WinampAbstractionLayer\fSkinInfo", this);
|
||||
parser->xmlreader_registerCallback(L"WinampAbstractionLayer\fSkinInfo\f*", this);
|
||||
parser->xmlreader_registerCallback(L"WasabiXML",this);
|
||||
//parser->xmlreader_registerCallback(L"WasabiXML\fSkinInfo", this);
|
||||
parser->xmlreader_registerCallback(L"WasabiXML\fSkinInfo\f*", this);
|
||||
parser->xmlreader_open();
|
||||
|
||||
skinPath.AppendPath(L"skin.xml");
|
||||
LoadXmlFile(parser, skinPath);
|
||||
parser->xmlreader_unregisterCallback(this);
|
||||
}
|
||||
parser->xmlreader_close();
|
||||
parserFactory->releaseInterface(parser);
|
||||
parser = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SkinInfosXmlReader::xmlReaderOnStartElementCallback(const wchar_t *xmlpath, const wchar_t *xmltag, ifc_xmlreaderparams *params)
|
||||
{
|
||||
if (!_wcsicmp(xmltag, L"WinampAbstractionLayer") || !_wcsicmp(xmltag, L"WasabiXML"))
|
||||
{
|
||||
const wchar_t *version = params->getItemValue(L"version");
|
||||
if (version)
|
||||
walversion = version;
|
||||
}
|
||||
}
|
||||
|
||||
void SkinInfosXmlReader::xmlReaderOnCharacterDataCallback(const wchar_t *xmlpath, const wchar_t *xmltag, const wchar_t *s)
|
||||
{
|
||||
if (!wcscmp(xmltag, L"name")) { fullname = s;}
|
||||
else if (!wcscmp(xmltag, L"version")) { version = s;}
|
||||
else if (!wcscmp(xmltag, L"comment")) { comment = s;}
|
||||
else if (!wcscmp(xmltag, L"author")) { author = s;}
|
||||
else if (!wcscmp(xmltag, L"email")) { email = s;}
|
||||
else if (!wcscmp(xmltag, L"homepage")) { homepage = s;}
|
||||
else if (!wcscmp(xmltag, L"parentskin")) { parentskin = s;}
|
||||
else if (!wcscmp(xmltag, L"screenshot")) { screenshot = s;}
|
||||
}
|
||||
|
||||
extern int m_are_we_loaded;
|
||||
static StringW skin;
|
||||
|
||||
const wchar_t *getSkinInfoW()
|
||||
{
|
||||
static StringW skininfoW;
|
||||
|
||||
// these checks is repeated in getSkinInfo, also
|
||||
if (!m_are_we_loaded) return NULL;
|
||||
if (skin.iscaseequal(WASABI_API_SKIN->getSkinName()) && !skininfoW.isempty()) return skininfoW;
|
||||
|
||||
skininfoW = L"";
|
||||
SkinInfosXmlReader r(WASABI_API_SKIN->getSkinName());
|
||||
|
||||
/* skin name */
|
||||
const wchar_t *name = r.getFullName();
|
||||
if (name && *name)
|
||||
skininfoW += name;
|
||||
else
|
||||
skininfoW += WASABI_API_SKIN->getSkinName();
|
||||
|
||||
/* skin version */
|
||||
const wchar_t *ver = r.getVersion();
|
||||
if (ver && *ver)
|
||||
{
|
||||
skininfoW += L" v";
|
||||
skininfoW += ver;
|
||||
}
|
||||
skininfoW += L"\r\n";
|
||||
|
||||
/* skin author & e-mail */
|
||||
const wchar_t *aut = r.getAuthor();
|
||||
if (aut && *aut)
|
||||
{
|
||||
skininfoW += WASABI_API_LNGSTRINGW(IDS_BY_SPACE);
|
||||
skininfoW += aut;
|
||||
|
||||
const wchar_t *email = r.getEmail();
|
||||
if (email && *email)
|
||||
{
|
||||
skininfoW += L" (";
|
||||
skininfoW += email;
|
||||
skininfoW += L")";
|
||||
}
|
||||
skininfoW += L"\r\n";
|
||||
}
|
||||
|
||||
/* skin homepage */
|
||||
const wchar_t *web = r.getHomepage();
|
||||
if (web && *web)
|
||||
{
|
||||
skininfoW += web;
|
||||
skininfoW += L"\r\n";
|
||||
}
|
||||
skininfoW += L"\r\n";
|
||||
const wchar_t *comment = r.getComment();
|
||||
if (comment && *comment)
|
||||
skininfoW += comment;
|
||||
|
||||
skin = WASABI_API_SKIN->getSkinName();
|
||||
return skininfoW;
|
||||
}
|
||||
|
||||
const char *getSkinInfo()
|
||||
{
|
||||
static String skininfo;
|
||||
|
||||
// these checks is repeated in getSkinInfoW, also
|
||||
if (!m_are_we_loaded) return NULL;
|
||||
if (skin.iscaseequal(WASABI_API_SKIN->getSkinName()) && !skininfo.isempty()) return skininfo;
|
||||
|
||||
// get the wide character version
|
||||
const wchar_t *wideSkinInfo = getSkinInfoW();
|
||||
|
||||
// and convert
|
||||
skininfo = AutoChar(wideSkinInfo);
|
||||
return skininfo;
|
||||
}
|
||||