diff options
Diffstat (limited to 'tools')
197 files changed, 9880 insertions, 0 deletions
diff --git a/tools/dbtool/aggressive.cpp b/tools/dbtool/aggressive.cpp new file mode 100644 index 0000000000..26312ea5b0 --- /dev/null +++ b/tools/dbtool/aggressive.cpp @@ -0,0 +1,59 @@ +/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+#define BLOCKSIZE 65536
+
+extern DWORD sourceFileSize;
+extern DWORD spaceProcessed;
+extern DWORD sp;
+static DWORD ofsCurrent;
+
+int WorkAggressive(int firstTime)
+{
+ int blockBytes,i;
+ BYTE *buf;
+
+ if(firstTime) {
+ if(!opts.bAggressive) return ERROR_NO_MORE_ITEMS;
+ AddToStatus(STATUS_MESSAGE,TranslateT("Performing aggressive pass"));
+ ofsCurrent=0;
+ spaceProcessed=0;
+ sp=0;
+ }
+ blockBytes=min(BLOCKSIZE+3,(int)(sourceFileSize-ofsCurrent));
+ if(blockBytes<=0) return ERROR_NO_MORE_ITEMS;
+ buf = opts.pFile+ofsCurrent;
+ blockBytes-=3;
+ for(i=0;i<blockBytes;i++) {
+ if(buf[i]) {
+ if((*(PDWORD)&buf[i]&0x00FFFFFF)!=0xDECADE)
+ AddToStatus(STATUS_WARNING,TranslateT("Aggressive: random junk at %08X: skipping"),ofsCurrent+i);
+ else {
+ //TODO: give user the option of placing manually
+ AddToStatus(STATUS_ERROR,TranslateT("Aggressive: unlinked data at %08X: can't automatically place"),ofsCurrent+i);
+ }
+ for(;i<blockBytes;i++)
+ if(buf[i]==0) {i--; break;}
+ }
+ }
+ ofsCurrent+=BLOCKSIZE;
+ spaceProcessed=ofsCurrent;
+ return ERROR_SUCCESS;
+}
diff --git a/tools/dbtool/cleaning.cpp b/tools/dbtool/cleaning.cpp new file mode 100644 index 0000000000..efbbde1640 --- /dev/null +++ b/tools/dbtool/cleaning.cpp @@ -0,0 +1,63 @@ +/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+INT_PTR CALLBACK CleaningDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ INT_PTR bReturn;
+
+ if(DoMyControlProcessing(hdlg,message,wParam,lParam,&bReturn)) return bReturn;
+ switch(message) {
+ case WM_INITDIALOG:
+ CheckDlgButton(hdlg,IDC_ERASEHISTORY,opts.bEraseHistory);
+ EnableWindow(GetDlgItem(hdlg,IDC_ERASEHISTORY),!opts.bAggressive);
+ CheckDlgButton(hdlg,IDC_MARKREAD,opts.bMarkRead);
+ CheckDlgButton(hdlg,IDC_CONVERTUTF,opts.bConvertUtf);
+ TranslateDialog(hdlg);
+ return TRUE;
+ case WZN_PAGECHANGING:
+ opts.bEraseHistory=IsDlgButtonChecked(hdlg,IDC_ERASEHISTORY)&&!opts.bAggressive;
+ opts.bMarkRead=IsDlgButtonChecked(hdlg,IDC_MARKREAD);
+ opts.bConvertUtf=IsDlgButtonChecked(hdlg,IDC_CONVERTUTF);
+ break;
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDC_BACK:
+ if(opts.bCheckOnly)
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_SELECTDB,(LPARAM)SelectDbDlgProc);
+ else
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_FILEACCESS,(LPARAM)FileAccessDlgProc);
+ break;
+ case IDOK:
+ if (!opts.hFile) {
+ opts.hFile = CreateFile( opts.filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL );
+ if ( opts.hFile == INVALID_HANDLE_VALUE ) {
+ opts.hFile = NULL;
+ opts.error = GetLastError();
+ SendMessage( GetParent(hdlg), WZM_GOTOPAGE, IDD_OPENERROR, ( LPARAM )OpenErrorDlgProc );
+ break;
+ }
+ }
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_PROGRESS,(LPARAM)ProgressDlgProc);
+ break;
+ }
+ break;
+ }
+ return FALSE;
+}
diff --git a/tools/dbtool/contactchain.cpp b/tools/dbtool/contactchain.cpp new file mode 100644 index 0000000000..dd6d50556b --- /dev/null +++ b/tools/dbtool/contactchain.cpp @@ -0,0 +1,105 @@ +/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+int WorkSettingsChain(DWORD ofsContact,DBContact *dbc,int firstTime);
+int WorkEventChain(DWORD ofsContact,DBContact *dbc,int firstTime);
+
+static DWORD ofsThisContact,ofsDestPrevContact;
+static DWORD contactCount;
+static DWORD ofsDestThis,ofsNextContact;
+static int phase;
+static DBContact dbc;
+
+static void FinishUp(void)
+{
+ if(contactCount!=dbhdr.contactCount)
+ AddToStatus(STATUS_WARNING,TranslateT("Contact count marked wrongly: correcting"));
+ dbhdr.contactCount=contactCount;
+}
+
+int WorkContactChain(int firstTime)
+{
+ int first=0;
+
+ if(firstTime) {
+ AddToStatus(STATUS_MESSAGE,TranslateT("Processing contact chain"));
+ ofsDestPrevContact=0;
+ ofsThisContact=dbhdr.ofsFirstContact;
+ contactCount=0;
+ dbhdr.ofsFirstContact=0;
+ phase=0;
+ }
+
+ switch(phase) {
+ int ret;
+ case 0:
+ if(ofsThisContact==0) {
+ FinishUp();
+ return ERROR_NO_MORE_ITEMS;
+ }
+ if(!SignatureValid(ofsThisContact,DBCONTACT_SIGNATURE)) {
+ AddToStatus(STATUS_ERROR,TranslateT("Contact chain corrupted, further entries ignored"));
+ FinishUp();
+ return ERROR_NO_MORE_ITEMS;
+ }
+ if(ReadSegment(ofsThisContact,&dbc,sizeof(dbc))!=ERROR_SUCCESS) {
+ FinishUp();
+ return ERROR_NO_MORE_ITEMS;
+ }
+ ofsNextContact=dbc.ofsNext;
+ dbc.ofsNext=0;
+ if (!opts.bCheckOnly) {
+ if((ofsDestThis=WriteSegment(WSOFS_END,&dbc,sizeof(dbc)))==WS_ERROR)
+ return ERROR_HANDLE_DISK_FULL;
+ if(ofsDestPrevContact)
+ WriteSegment(ofsDestPrevContact+offsetof(DBContact,ofsNext),&ofsDestThis,sizeof(DWORD));
+ else
+ dbhdr.ofsFirstContact=ofsDestThis;
+ } else
+ ofsDestThis = ofsThisContact; // needed in event chain worker
+ contactCount++;
+ phase++; first=1;
+ //fall thru
+ case 1:
+ ret=WorkSettingsChain(ofsDestThis,&dbc,first);
+ if(ret==ERROR_NO_MORE_ITEMS) {
+ phase++; first=1;
+ }
+ else if(ret) return ret;
+ else break;
+ //fall thru
+ case 2:
+ ret=WorkEventChain(ofsDestThis,&dbc,first);
+ if(ret==ERROR_NO_MORE_ITEMS) {
+ phase++; first=1;
+ }
+ else if(ret) return ret;
+ else break;
+ //fall thru
+ case 3:
+ if(WriteSegment(ofsDestThis,&dbc,sizeof(DBContact))==WS_ERROR)
+ return ERROR_HANDLE_DISK_FULL;
+ ofsDestPrevContact=ofsDestThis;
+ ofsThisContact=ofsNextContact;
+ phase=0;
+ break;
+ }
+ return ERROR_SUCCESS;
+}
diff --git a/tools/dbtool/database.h b/tools/dbtool/database.h new file mode 100644 index 0000000000..964ab6af25 --- /dev/null +++ b/tools/dbtool/database.h @@ -0,0 +1,178 @@ +/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2005 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+//all offsets are relative to the start of the file
+//offsets are 0 if there is nothing in the chain or this is the last in the
+//chain
+
+/* tree diagram
+
+DBHeader
+ |-->end of file (plain offset)
+ |-->first contact (DBContact)
+ | |-->next contact (DBContact)
+ | | \--> ...
+ | |-->first settings (DBContactSettings)
+ | | |-->next settings (DBContactSettings)
+ | | | \--> ...
+ | | \-->module name (DBModuleName)
+ | \-->first/last/firstunread event
+ |-->user contact (DBContact)
+ | |-->next contact=NULL
+ | |-->first settings as above
+ | \-->first/last/firstunread event as above
+ \-->first module name (DBModuleName)
+ \-->next module name (DBModuleName)
+ \--> ...
+*/
+
+#define DB_RESIZE_GRANULARITY 16384
+#define DB_THIS_VERSION 0x00000700u
+#define DB_SETTINGS_RESIZE_GRANULARITY 128
+
+#include <pshpack1.h>
+struct DBHeader {
+ BYTE signature[16]; // 'Miranda ICQ DB',0,26
+ DWORD version; //as 4 bytes, ie 1.2.3.10=0x0102030a
+ //this version is 0x00000700
+ DWORD ofsFileEnd; //offset of the end of the database - place to write
+ //new structures
+ DWORD slackSpace; //a counter of the number of bytes that have been
+ //wasted so far due to deleting structures and/or
+ //re-making them at the end. We should compact when
+ //this gets above a threshold
+ DWORD contactCount; //number of contacts in the chain,excluding the user
+ DWORD ofsFirstContact; //offset to first struct DBContact in the chain
+ DWORD ofsUser; //offset to struct DBContact representing the user
+ DWORD ofsFirstModuleName; //offset to first struct DBModuleName in the chain
+};
+
+#define DBCONTACT_SIGNATURE 0x43DECADEu
+struct DBContact {
+ DWORD signature;
+ DWORD ofsNext; //offset to the next contact in the chain. zero if
+ //this is the 'user' contact or the last contact
+ //in the chain
+ DWORD ofsFirstSettings; //offset to the first DBContactSettings in the
+ //chain for this contact.
+ DWORD eventCount; //number of events in the chain for this contact
+ DWORD ofsFirstEvent,ofsLastEvent; //offsets to the first and last DBEvent in
+ //the chain for this contact
+ DWORD ofsFirstUnreadEvent; //offset to the first (chronological) unread event
+ //in the chain, 0 if all are read
+ DWORD timestampFirstUnread; //timestamp of the event at ofsFirstUnreadEvent
+};
+
+#define DBMODULENAME_SIGNATURE 0x4DDECADEu
+struct DBModuleName {
+ DWORD signature;
+ DWORD ofsNext; //offset to the next module name in the chain
+ BYTE cbName; //number of characters in this module name
+ char name[1]; //name, no nul terminator
+};
+
+#define DBCONTACTSETTINGS_SIGNATURE 0x53DECADEu
+struct DBContactSettings {
+ DWORD signature;
+ DWORD ofsNext; //offset to the next contactsettings in the chain
+ DWORD ofsModuleName; //offset to the DBModuleName of the owner of these
+ //settings
+ DWORD cbBlob; //size of the blob in bytes. May be larger than the
+ //actual size for reducing the number of moves
+ //required using granularity in resizing
+ BYTE blob[1]; //the blob. a back-to-back sequence of DBSetting
+ //structs, the last has cbName=0
+};
+
+/* not a valid structure, content is figured out on the fly
+struct DBSetting {
+ BYTE cbName; //number of bytes in the name of this setting
+ //this =0 marks the end
+ char szName[...]; //setting name, excluding nul
+ BYTE dataType; //type of data. see m_database.h, db/contact/getsetting
+ union { //a load of types of data, length is defined by dataType
+ BYTE bVal; WORD wVal; DWORD dVal;
+ struct {
+ WORD cbString;
+ char szVal[...]; //excludes nul terminator
+ };
+ struct {
+ WORD cbBlob;
+ BYTE blobVal[...];
+ };
+ };
+};
+*/
+
+#define DBEVENT_SIGNATURE 0x45DECADEu
+struct DBEvent {
+ DWORD signature;
+ DWORD ofsPrev,ofsNext; //offset to the previous and next events in the
+ //chain. Chain is sorted chronologically
+ DWORD ofsModuleName; //offset to a DBModuleName struct of the name of
+ //the owner of this event
+ DWORD timestamp; //seconds since 00:00:00 01/01/1970
+ DWORD flags; //see m_database.h, db/event/add
+ WORD eventType; //module-defined event type
+ DWORD cbBlob; //number of bytes in the blob
+ BYTE blob[1]; //the blob. module-defined formatting
+};
+#include <poppack.h>
+
+//databasecorruption: called if any signatures are broken. very very fatal
+void DatabaseCorruption(const char *szPart);
+PBYTE DBRead(DWORD ofs,int bytesRequired,int *bytesAvail); //any preview result could be invalidated by the next call
+void DBWrite(DWORD ofs,PVOID pData,int count);
+void DBFlush(int setting);
+void DBMoveChunk(DWORD ofsDest,DWORD ofsSource,int bytes);
+DWORD CreateNewSpace(int bytes);
+void DeleteSpace(DWORD ofs,int bytes);
+void GetProfileDirectory(char *szPath,int cbPath);
+int GetDefaultProfilePath(char *szPath,int cbPath,int *specified);
+int ShouldShowProfileManager(void);
+
+#ifdef _DEBUG
+#define MAXCACHEDREADSIZE 512
+#else
+#define MAXCACHEDREADSIZE 2048 //technically 4096 would work, but I'm not going to push it
+#endif
+
+#ifdef _DEBUG
+//#define DBLOGGING
+#endif
+#ifdef DBLOGGING
+void DBLog(const char *file,int line,const char *fmt,...);
+#define logg() DBLog(__FILE__,__LINE__,"")
+#define log0(s) DBLog(__FILE__,__LINE__,s)
+#define log1(s,a) DBLog(__FILE__,__LINE__,s,a)
+#define log2(s,a,b) DBLog(__FILE__,__LINE__,s,a,b)
+#define log3(s,a,b,c) DBLog(__FILE__,__LINE__,s,a,b,c)
+#define log4(s,a,b,c,d) DBLog(__FILE__,__LINE__,s,a,b,c,d)
+#else
+#define logg()
+#define log0(s)
+#define log1(s,a)
+#define log2(s,a,b)
+#define log3(s,a,b,c)
+#define log4(s,a,b,c,d)
+#endif
\ No newline at end of file diff --git a/tools/dbtool/dbtool.dep b/tools/dbtool/dbtool.dep new file mode 100644 index 0000000000..119920ccd8 --- /dev/null +++ b/tools/dbtool/dbtool.dep @@ -0,0 +1,180 @@ +# Microsoft Developer Studio Generated Dependency File, included by dbtool.mak
+
+.\aggressive.cpp : \
+ "..\..\miranda\include\m_database.h"\
+ "..\..\miranda\include\m_system.h"\
+ "..\..\miranda\include\m_utils.h"\
+ ".\database.h"\
+ ".\dbtool.h"\
+
+
+.\contactchain.cpp : \
+ "..\..\miranda\include\m_database.h"\
+ "..\..\miranda\include\m_system.h"\
+ "..\..\miranda\include\m_utils.h"\
+ ".\database.h"\
+ ".\dbtool.h"\
+
+
+.\eventchain.cpp : \
+ "..\..\miranda\include\m_database.h"\
+ "..\..\miranda\include\m_system.h"\
+ "..\..\miranda\include\m_utils.h"\
+ ".\database.h"\
+ ".\dbtool.h"\
+
+
+.\finaltasks.cpp : \
+ "..\..\miranda\include\m_database.h"\
+ "..\..\miranda\include\m_system.h"\
+ "..\..\miranda\include\m_utils.h"\
+ ".\database.h"\
+ ".\dbtool.h"\
+
+
+.\initialchecks.cpp : \
+ "..\..\miranda\include\m_database.h"\
+ "..\..\miranda\include\m_system.h"\
+ "..\..\miranda\include\m_utils.h"\
+ ".\database.h"\
+ ".\dbtool.h"\
+
+
+.\modulechain.cpp : \
+ "..\..\miranda\include\m_database.h"\
+ "..\..\miranda\include\m_system.h"\
+ "..\..\miranda\include\m_utils.h"\
+ ".\database.h"\
+ ".\dbtool.h"\
+
+
+.\settingschain.cpp : \
+ "..\..\miranda\include\m_database.h"\
+ "..\..\miranda\include\m_system.h"\
+ "..\..\miranda\include\m_utils.h"\
+ ".\database.h"\
+ ".\dbtool.h"\
+
+
+.\user.cpp : \
+ "..\..\miranda\include\m_database.h"\
+ "..\..\miranda\include\m_system.h"\
+ "..\..\miranda\include\m_utils.h"\
+ ".\database.h"\
+ ".\dbtool.h"\
+
+
+.\cleaning.cpp : \
+ "..\..\miranda\include\m_database.h"\
+ "..\..\miranda\include\m_system.h"\
+ "..\..\miranda\include\m_utils.h"\
+ ".\database.h"\
+ ".\dbtool.h"\
+
+
+.\fileaccess.cpp : \
+ "..\..\miranda\include\m_database.h"\
+ "..\..\miranda\include\m_system.h"\
+ "..\..\miranda\include\m_utils.h"\
+ ".\database.h"\
+ ".\dbtool.h"\
+
+
+.\finished.cpp : \
+ "..\..\miranda\include\m_database.h"\
+ "..\..\miranda\include\m_system.h"\
+ "..\..\miranda\include\m_utils.h"\
+ ".\database.h"\
+ ".\dbtool.h"\
+
+
+.\openerror.cpp : \
+ "..\..\miranda\include\m_database.h"\
+ "..\..\miranda\include\m_system.h"\
+ "..\..\miranda\include\m_utils.h"\
+ ".\database.h"\
+ ".\dbtool.h"\
+
+
+.\progress.cpp : \
+ "..\..\miranda\include\m_database.h"\
+ "..\..\miranda\include\m_system.h"\
+ "..\..\miranda\include\m_utils.h"\
+ ".\database.h"\
+ ".\dbtool.h"\
+
+
+.\selectdb.cpp : \
+ "..\..\miranda\include\m_database.h"\
+ "..\..\miranda\include\m_system.h"\
+ "..\..\miranda\include\m_utils.h"\
+ ".\database.h"\
+ ".\dbtool.h"\
+
+
+.\welcome.cpp : \
+ "..\..\miranda\include\m_database.h"\
+ "..\..\miranda\include\m_system.h"\
+ "..\..\miranda\include\m_utils.h"\
+ ".\database.h"\
+ ".\dbtool.h"\
+
+
+.\disk.cpp : \
+ "..\..\miranda\include\m_database.h"\
+ "..\..\miranda\include\m_system.h"\
+ "..\..\miranda\include\m_utils.h"\
+ ".\database.h"\
+ ".\dbtool.h"\
+
+
+.\langpack.cpp : \
+ "..\..\miranda\include\m_database.h"\
+ "..\..\miranda\include\m_system.h"\
+ "..\..\miranda\include\m_utils.h"\
+ ".\database.h"\
+ ".\dbtool.h"\
+
+
+.\main.cpp : \
+ "..\..\miranda\include\m_database.h"\
+ "..\..\miranda\include\m_system.h"\
+ "..\..\miranda\include\m_utils.h"\
+ ".\database.h"\
+ ".\dbtool.h"\
+
+
+.\utf.cpp : \
+ "..\..\miranda\include\m_database.h"\
+ "..\..\miranda\include\m_system.h"\
+ "..\..\miranda\include\m_utils.h"\
+ ".\database.h"\
+ ".\dbtool.h"\
+
+
+.\wizard.cpp : \
+ "..\..\miranda\include\m_database.h"\
+ "..\..\miranda\include\m_system.h"\
+ "..\..\miranda\include\m_utils.h"\
+ ".\database.h"\
+ ".\dbtool.h"\
+
+
+.\worker.cpp : \
+ "..\..\miranda\include\m_database.h"\
+ "..\..\miranda\include\m_system.h"\
+ "..\..\miranda\include\m_utils.h"\
+ ".\database.h"\
+ ".\dbtool.h"\
+
+
+.\resource.rc : \
+ ".\dbtool.exe.manifest"\
+ ".\res\dbthdr.emf"\
+ ".\res\dbtool.emf"\
+ ".\res\dbtool.ico"\
+ ".\res\delete.ico"\
+ ".\res\profileg.ico"\
+ ".\res\profiler.ico"\
+ ".\res\profiley.ico"\
+
diff --git a/tools/dbtool/dbtool.dsp b/tools/dbtool/dbtool.dsp new file mode 100644 index 0000000000..2862ead84e --- /dev/null +++ b/tools/dbtool/dbtool.dsp @@ -0,0 +1,299 @@ +# Microsoft Developer Studio Project File - Name="dbtool" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Application" 0x0101
+
+CFG=dbtool - Win32 Debug Unicode
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "dbtool.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "dbtool.mak" CFG="dbtool - Win32 Debug Unicode"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "dbtool - Win32 Release" (based on "Win32 (x86) Application")
+!MESSAGE "dbtool - Win32 Debug" (based on "Win32 (x86) Application")
+!MESSAGE "dbtool - Win32 Debug Unicode" (based on "Win32 (x86) Application")
+!MESSAGE "dbtool - Win32 Release Unicode" (based on "Win32 (x86) Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "dbtool - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../../miranda/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "DATABASE_INDEPENDANT" /Yu"dbtool.h" /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /map /debug /machine:I386 /out:"../../miranda/bin/release/dbtool.exe"
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "dbtool - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 1
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../miranda/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "DATABASE_INDEPENDANT" /Yu"dbtool.h" /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"../../miranda/bin/debug/dbtool.exe" /pdbtype:sept
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "dbtool - Win32 Debug Unicode"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "dbtool___Win32_Debug_Unicode"
+# PROP BASE Intermediate_Dir "dbtool___Win32_Debug_Unicode"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug_Unicode"
+# PROP Intermediate_Dir "Debug_Unicode"
+# PROP Ignore_Export_Lib 1
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "DATABASE_INDEPENDANT" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../miranda/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "UNICODE" /D "DATABASE_INDEPENDANT" /Yu"dbtool.h" /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"../../miranda/bin/debug/dbtool.exe" /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"../../miranda/bin/debug unicode/dbtool.exe" /pdbtype:sept
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "dbtool - Win32 Release Unicode"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "dbtool___Win32_Release_Unicode"
+# PROP BASE Intermediate_Dir "dbtool___Win32_Release_Unicode"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release_Unicode"
+# PROP Intermediate_Dir "Release_Unicode"
+# PROP Ignore_Export_Lib 1
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "DATABASE_INDEPENDANT" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../../miranda/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "UNICODE" /D "DATABASE_INDEPENDANT" /Yu"dbtool.h" /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /map /machine:I386 /out:"../../miranda/bin/release/dbtool.exe" /ALIGN:4096 /ALIGN:4096
+# SUBTRACT BASE LINK32 /pdb:none /debug
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /map /debug /machine:I386 /out:"../../miranda/bin/release unicode/dbtool.exe"
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF
+
+# Begin Target
+
+# Name "dbtool - Win32 Release"
+# Name "dbtool - Win32 Debug"
+# Name "dbtool - Win32 Debug Unicode"
+# Name "dbtool - Win32 Release Unicode"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Group "Workers"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\aggressive.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\contactchain.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\eventchain.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\finaltasks.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\initialchecks.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\modulechain.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\settingschain.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\user.cpp
+# End Source File
+# End Group
+# Begin Group "Wizard Pages"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\cleaning.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\fileaccess.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\finished.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\openerror.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\progress.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\selectdb.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\welcome.cpp
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\disk.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\langpack.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\main.cpp
+# ADD CPP /Yc"dbtool.h"
+# End Source File
+# Begin Source File
+
+SOURCE=.\utf.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\wizard.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\worker.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\database.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\dbtool.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\res\dbthdr.emf
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\dbtool.emf
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\dbtool.ico
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\profileg.ico
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\profiler.ico
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\profiley.ico
+# End Source File
+# Begin Source File
+
+SOURCE=.\resource.rc
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\dbtool.exe.manifest
+# End Source File
+# End Target
+# End Project
diff --git a/tools/dbtool/dbtool.dsw b/tools/dbtool/dbtool.dsw new file mode 100644 index 0000000000..790aea45f4 --- /dev/null +++ b/tools/dbtool/dbtool.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "dbtool"=".\dbtool.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/tools/dbtool/dbtool.exe.manifest b/tools/dbtool/dbtool.exe.manifest new file mode 100644 index 0000000000..1b6aab686b --- /dev/null +++ b/tools/dbtool/dbtool.exe.manifest @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<assemblyIdentity
+ version="1.0.0.0"
+ processorArchitecture="X86"
+ name="Miranda.Miranda.Miranda"
+ type="win32"
+/>
+<description>Miranda</description>
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel
+ level="asInvoker"
+ uiAccess="false"/>
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+<dependency>
+ <dependentAssembly>
+ <assemblyIdentity
+ type="win32"
+ name="Microsoft.Windows.Common-Controls"
+ version="6.0.0.0"
+ processorArchitecture="X86"
+ publicKeyToken="6595b64144ccf1df"
+ language="*"
+ />
+ </dependentAssembly>
+</dependency>
+</assembly>
diff --git a/tools/dbtool/dbtool.h b/tools/dbtool/dbtool.h new file mode 100644 index 0000000000..7bade33d34 --- /dev/null +++ b/tools/dbtool/dbtool.h @@ -0,0 +1,131 @@ +/*
+Miranda Database Tool
+Copyright 2000-2011 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#if defined( UNICODE ) && !defined( _UNICODE )
+ #define _UNICODE
+#endif
+
+#include <tchar.h>
+
+#include <windows.h>
+#include <stdio.h>
+#include <stddef.h>
+#include <io.h>
+#include <stdarg.h>
+#include <process.h>
+#include <direct.h>
+#include <malloc.h>
+#include <commctrl.h>
+#include <time.h>
+
+//#include <newpluginapi.h> // Only needed to keep m_database.h happy
+#define CallService(a,b,c) 1
+
+#include "../../include/m_database.h"
+#include "database.h" // Note: This is a copy of database.h from the Miranda IM v0.3 tree.
+ // Remember to update this when releasing new dbtool versions.
+#include "resource.h"
+
+
+#define WinVerMajor() LOBYTE(LOWORD(GetVersion()))
+#define IsWinVerXPPlus() (WinVerMajor()>=5 && LOWORD(GetVersion())!=5)
+
+#define WZM_GOTOPAGE (WM_USER+1)
+#define WZN_PAGECHANGING (WM_USER+1221)
+#define WZN_CANCELCLICKED (WM_USER+1222)
+
+struct DbToolOptions {
+ TCHAR filename[MAX_PATH];
+ TCHAR workingFilename[MAX_PATH];
+ TCHAR outputFilename[MAX_PATH];
+ TCHAR backupFilename[MAX_PATH];
+ HANDLE hFile;
+ HANDLE hOutFile;
+ HANDLE hMap;
+ BYTE *pFile;
+ DWORD error;
+ int bCheckOnly,bBackup,bAggressive;
+ int bEraseHistory,bMarkRead,bConvertUtf;
+};
+
+extern HINSTANCE hInst;
+extern DbToolOptions opts;
+extern DBHeader dbhdr;
+
+int DoMyControlProcessing(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam,INT_PTR *bReturn);
+
+INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+INT_PTR CALLBACK CleaningDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+INT_PTR CALLBACK ProgressDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+INT_PTR CALLBACK FileAccessDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+INT_PTR CALLBACK WizardDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+INT_PTR CALLBACK FinishedDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+INT_PTR CALLBACK WelcomeDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+INT_PTR CALLBACK OpenErrorDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+
+struct DBSignature {
+ char name[15];
+ BYTE eof;
+};
+static struct DBSignature dbSignature={"Miranda ICQ DB",0x1A};
+
+#define SIZEOF(X) (sizeof(X)/sizeof(X[0]))
+
+#define STATUS_MESSAGE 0
+#define STATUS_WARNING 1
+#define STATUS_ERROR 2
+#define STATUS_FATAL 3
+#define STATUS_SUCCESS 4
+#define STATUS_CLASSMASK 0x0f
+int AddToStatus(DWORD flags, TCHAR* fmt,...);
+void SetProgressBar(int perThou);
+
+int PeekSegment(DWORD ofs,PVOID buf,int cbBytes);
+int ReadSegment(DWORD ofs,PVOID buf,int cbBytes);
+#define WSOFS_END 0xFFFFFFFF
+#define WS_ERROR 0xFFFFFFFF
+DWORD WriteSegment(DWORD ofs,PVOID buf,int cbBytes);
+int ReadWrittenSegment(DWORD ofs,PVOID buf,int cbBytes);
+int SignatureValid(DWORD ofs,DWORD signature);
+DWORD ConvertModuleNameOfs(DWORD ofsOld);
+void FreeModuleChain();
+
+int TranslateDialog(HWND hwndDlg);
+void LoadLangPackModule(void);
+void UnloadLangPackModule(void);
+
+char* LangPackTranslateString(const char *szEnglish, const int W);
+__inline LPSTR Translate(LPSTR source)
+{ return ( LPSTR )LangPackTranslateString( source, 0 );
+}
+
+#if defined( _UNICODE )
+ #define TranslateT(s) (TCHAR*)LangPackTranslateString((LPCSTR)_T(s),1)
+ #define TranslateTS(s) (TCHAR*)LangPackTranslateString((LPCSTR)s,1)
+#else
+ #define TranslateT(s) LangPackTranslateString(s,0)
+ #define TranslateTS(s) LangPackTranslateString(s,0)
+#endif
+
+char* Utf8DecodeCP(char* str, int codepage, wchar_t** ucs2);
+char* Utf8EncodeUcs2(const wchar_t* src);
+bool is_utf8_string(const char* str);
+
diff --git a/tools/dbtool/dbtool.mak b/tools/dbtool/dbtool.mak new file mode 100644 index 0000000000..5a3ba35c29 --- /dev/null +++ b/tools/dbtool/dbtool.mak @@ -0,0 +1,647 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on dbtool.dsp
+!IF "$(CFG)" == ""
+CFG=dbtool - Win32 Debug Unicode
+!MESSAGE No configuration specified. Defaulting to dbtool - Win32 Debug Unicode.
+!ENDIF
+
+!IF "$(CFG)" != "dbtool - Win32 Release" && "$(CFG)" != "dbtool - Win32 Debug" && "$(CFG)" != "dbtool - Win32 Debug Unicode" && "$(CFG)" != "dbtool - Win32 Release Unicode"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "dbtool.mak" CFG="dbtool - Win32 Debug Unicode"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "dbtool - Win32 Release" (based on "Win32 (x86) Application")
+!MESSAGE "dbtool - Win32 Debug" (based on "Win32 (x86) Application")
+!MESSAGE "dbtool - Win32 Debug Unicode" (based on "Win32 (x86) Application")
+!MESSAGE "dbtool - Win32 Release Unicode" (based on "Win32 (x86) Application")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+!IF "$(CFG)" == "dbtool - Win32 Release"
+
+OUTDIR=.\Release
+INTDIR=.\Release
+
+ALL : "..\..\miranda\bin\release\dbtool.exe"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\aggressive.obj"
+ -@erase "$(INTDIR)\cleaning.obj"
+ -@erase "$(INTDIR)\contactchain.obj"
+ -@erase "$(INTDIR)\dbtool.pch"
+ -@erase "$(INTDIR)\disk.obj"
+ -@erase "$(INTDIR)\eventchain.obj"
+ -@erase "$(INTDIR)\fileaccess.obj"
+ -@erase "$(INTDIR)\finaltasks.obj"
+ -@erase "$(INTDIR)\finished.obj"
+ -@erase "$(INTDIR)\initialchecks.obj"
+ -@erase "$(INTDIR)\langpack.obj"
+ -@erase "$(INTDIR)\main.obj"
+ -@erase "$(INTDIR)\modulechain.obj"
+ -@erase "$(INTDIR)\openerror.obj"
+ -@erase "$(INTDIR)\progress.obj"
+ -@erase "$(INTDIR)\resource.res"
+ -@erase "$(INTDIR)\selectdb.obj"
+ -@erase "$(INTDIR)\settingschain.obj"
+ -@erase "$(INTDIR)\user.obj"
+ -@erase "$(INTDIR)\utf.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\vc60.pdb"
+ -@erase "$(INTDIR)\welcome.obj"
+ -@erase "$(INTDIR)\wizard.obj"
+ -@erase "$(INTDIR)\worker.obj"
+ -@erase "$(OUTDIR)\dbtool.map"
+ -@erase "$(OUTDIR)\dbtool.pdb"
+ -@erase "..\..\miranda\bin\release\dbtool.exe"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MD /W3 /GX /Zi /O2 /I "../../miranda/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "DATABASE_INDEPENDANT" /Fp"$(INTDIR)\dbtool.pch" /Yu"dbtool.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+MTL=midl.exe
+MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
+RSC=rc.exe
+RSC_PROJ=/l 0x409 /fo"$(INTDIR)\resource.res" /d "NDEBUG"
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\dbtool.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\dbtool.pdb" /map:"$(INTDIR)\dbtool.map" /debug /machine:I386 /out:"../../miranda/bin/release/dbtool.exe"
+LINK32_OBJS= \
+ "$(INTDIR)\aggressive.obj" \
+ "$(INTDIR)\contactchain.obj" \
+ "$(INTDIR)\eventchain.obj" \
+ "$(INTDIR)\finaltasks.obj" \
+ "$(INTDIR)\initialchecks.obj" \
+ "$(INTDIR)\modulechain.obj" \
+ "$(INTDIR)\settingschain.obj" \
+ "$(INTDIR)\user.obj" \
+ "$(INTDIR)\cleaning.obj" \
+ "$(INTDIR)\fileaccess.obj" \
+ "$(INTDIR)\finished.obj" \
+ "$(INTDIR)\openerror.obj" \
+ "$(INTDIR)\progress.obj" \
+ "$(INTDIR)\selectdb.obj" \
+ "$(INTDIR)\welcome.obj" \
+ "$(INTDIR)\disk.obj" \
+ "$(INTDIR)\langpack.obj" \
+ "$(INTDIR)\main.obj" \
+ "$(INTDIR)\wizard.obj" \
+ "$(INTDIR)\worker.obj" \
+ "$(INTDIR)\resource.res" \
+ "$(INTDIR)\utf.obj"
+
+"..\..\miranda\bin\release\dbtool.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "dbtool - Win32 Debug"
+
+OUTDIR=.\Debug
+INTDIR=.\Debug
+
+ALL : "..\..\miranda\bin\debug\dbtool.exe"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\aggressive.obj"
+ -@erase "$(INTDIR)\cleaning.obj"
+ -@erase "$(INTDIR)\contactchain.obj"
+ -@erase "$(INTDIR)\dbtool.pch"
+ -@erase "$(INTDIR)\disk.obj"
+ -@erase "$(INTDIR)\eventchain.obj"
+ -@erase "$(INTDIR)\fileaccess.obj"
+ -@erase "$(INTDIR)\finaltasks.obj"
+ -@erase "$(INTDIR)\finished.obj"
+ -@erase "$(INTDIR)\initialchecks.obj"
+ -@erase "$(INTDIR)\langpack.obj"
+ -@erase "$(INTDIR)\main.obj"
+ -@erase "$(INTDIR)\modulechain.obj"
+ -@erase "$(INTDIR)\openerror.obj"
+ -@erase "$(INTDIR)\progress.obj"
+ -@erase "$(INTDIR)\resource.res"
+ -@erase "$(INTDIR)\selectdb.obj"
+ -@erase "$(INTDIR)\settingschain.obj"
+ -@erase "$(INTDIR)\user.obj"
+ -@erase "$(INTDIR)\utf.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\vc60.pdb"
+ -@erase "$(INTDIR)\welcome.obj"
+ -@erase "$(INTDIR)\wizard.obj"
+ -@erase "$(INTDIR)\worker.obj"
+ -@erase "$(OUTDIR)\dbtool.pdb"
+ -@erase "..\..\miranda\bin\debug\dbtool.exe"
+ -@erase "..\..\miranda\bin\debug\dbtool.ilk"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../miranda/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "DATABASE_INDEPENDANT" /Fp"$(INTDIR)\dbtool.pch" /Yu"dbtool.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+MTL=midl.exe
+MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
+RSC=rc.exe
+RSC_PROJ=/l 0x409 /fo"$(INTDIR)\resource.res" /d "_DEBUG"
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\dbtool.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /incremental:yes /pdb:"$(OUTDIR)\dbtool.pdb" /debug /machine:I386 /out:"../../miranda/bin/debug/dbtool.exe" /pdbtype:sept
+LINK32_OBJS= \
+ "$(INTDIR)\aggressive.obj" \
+ "$(INTDIR)\contactchain.obj" \
+ "$(INTDIR)\eventchain.obj" \
+ "$(INTDIR)\finaltasks.obj" \
+ "$(INTDIR)\initialchecks.obj" \
+ "$(INTDIR)\modulechain.obj" \
+ "$(INTDIR)\settingschain.obj" \
+ "$(INTDIR)\user.obj" \
+ "$(INTDIR)\cleaning.obj" \
+ "$(INTDIR)\fileaccess.obj" \
+ "$(INTDIR)\finished.obj" \
+ "$(INTDIR)\openerror.obj" \
+ "$(INTDIR)\progress.obj" \
+ "$(INTDIR)\selectdb.obj" \
+ "$(INTDIR)\welcome.obj" \
+ "$(INTDIR)\disk.obj" \
+ "$(INTDIR)\langpack.obj" \
+ "$(INTDIR)\main.obj" \
+ "$(INTDIR)\wizard.obj" \
+ "$(INTDIR)\worker.obj" \
+ "$(INTDIR)\resource.res" \
+ "$(INTDIR)\utf.obj"
+
+"..\..\miranda\bin\debug\dbtool.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "dbtool - Win32 Debug Unicode"
+
+OUTDIR=.\Debug_Unicode
+INTDIR=.\Debug_Unicode
+
+ALL : "..\..\miranda\bin\debug unicode\dbtool.exe"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\aggressive.obj"
+ -@erase "$(INTDIR)\cleaning.obj"
+ -@erase "$(INTDIR)\contactchain.obj"
+ -@erase "$(INTDIR)\dbtool.pch"
+ -@erase "$(INTDIR)\disk.obj"
+ -@erase "$(INTDIR)\eventchain.obj"
+ -@erase "$(INTDIR)\fileaccess.obj"
+ -@erase "$(INTDIR)\finaltasks.obj"
+ -@erase "$(INTDIR)\finished.obj"
+ -@erase "$(INTDIR)\initialchecks.obj"
+ -@erase "$(INTDIR)\langpack.obj"
+ -@erase "$(INTDIR)\main.obj"
+ -@erase "$(INTDIR)\modulechain.obj"
+ -@erase "$(INTDIR)\openerror.obj"
+ -@erase "$(INTDIR)\progress.obj"
+ -@erase "$(INTDIR)\resource.res"
+ -@erase "$(INTDIR)\selectdb.obj"
+ -@erase "$(INTDIR)\settingschain.obj"
+ -@erase "$(INTDIR)\user.obj"
+ -@erase "$(INTDIR)\utf.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\vc60.pdb"
+ -@erase "$(INTDIR)\welcome.obj"
+ -@erase "$(INTDIR)\wizard.obj"
+ -@erase "$(INTDIR)\worker.obj"
+ -@erase "$(OUTDIR)\dbtool.pdb"
+ -@erase "..\..\miranda\bin\debug unicode\dbtool.exe"
+ -@erase "..\..\miranda\bin\debug unicode\dbtool.ilk"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../miranda/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "UNICODE" /D "DATABASE_INDEPENDANT" /Fp"$(INTDIR)\dbtool.pch" /Yu"dbtool.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+MTL=midl.exe
+MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
+RSC=rc.exe
+RSC_PROJ=/l 0x409 /fo"$(INTDIR)\resource.res" /d "_DEBUG"
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\dbtool.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /incremental:yes /pdb:"$(OUTDIR)\dbtool.pdb" /debug /machine:I386 /out:"../../miranda/bin/debug unicode/dbtool.exe" /pdbtype:sept
+LINK32_OBJS= \
+ "$(INTDIR)\aggressive.obj" \
+ "$(INTDIR)\contactchain.obj" \
+ "$(INTDIR)\eventchain.obj" \
+ "$(INTDIR)\finaltasks.obj" \
+ "$(INTDIR)\initialchecks.obj" \
+ "$(INTDIR)\modulechain.obj" \
+ "$(INTDIR)\settingschain.obj" \
+ "$(INTDIR)\user.obj" \
+ "$(INTDIR)\cleaning.obj" \
+ "$(INTDIR)\fileaccess.obj" \
+ "$(INTDIR)\finished.obj" \
+ "$(INTDIR)\openerror.obj" \
+ "$(INTDIR)\progress.obj" \
+ "$(INTDIR)\selectdb.obj" \
+ "$(INTDIR)\welcome.obj" \
+ "$(INTDIR)\disk.obj" \
+ "$(INTDIR)\langpack.obj" \
+ "$(INTDIR)\main.obj" \
+ "$(INTDIR)\wizard.obj" \
+ "$(INTDIR)\worker.obj" \
+ "$(INTDIR)\resource.res" \
+ "$(INTDIR)\utf.obj"
+
+"..\..\miranda\bin\debug unicode\dbtool.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "dbtool - Win32 Release Unicode"
+
+OUTDIR=.\Release_Unicode
+INTDIR=.\Release_Unicode
+
+ALL : "..\..\miranda\bin\release unicode\dbtool.exe"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\aggressive.obj"
+ -@erase "$(INTDIR)\cleaning.obj"
+ -@erase "$(INTDIR)\contactchain.obj"
+ -@erase "$(INTDIR)\dbtool.pch"
+ -@erase "$(INTDIR)\disk.obj"
+ -@erase "$(INTDIR)\eventchain.obj"
+ -@erase "$(INTDIR)\fileaccess.obj"
+ -@erase "$(INTDIR)\finaltasks.obj"
+ -@erase "$(INTDIR)\finished.obj"
+ -@erase "$(INTDIR)\initialchecks.obj"
+ -@erase "$(INTDIR)\langpack.obj"
+ -@erase "$(INTDIR)\main.obj"
+ -@erase "$(INTDIR)\modulechain.obj"
+ -@erase "$(INTDIR)\openerror.obj"
+ -@erase "$(INTDIR)\progress.obj"
+ -@erase "$(INTDIR)\resource.res"
+ -@erase "$(INTDIR)\selectdb.obj"
+ -@erase "$(INTDIR)\settingschain.obj"
+ -@erase "$(INTDIR)\user.obj"
+ -@erase "$(INTDIR)\utf.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\vc60.pdb"
+ -@erase "$(INTDIR)\welcome.obj"
+ -@erase "$(INTDIR)\wizard.obj"
+ -@erase "$(INTDIR)\worker.obj"
+ -@erase "$(OUTDIR)\dbtool.map"
+ -@erase "$(OUTDIR)\dbtool.pdb"
+ -@erase "..\..\miranda\bin\release unicode\dbtool.exe"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MD /W3 /GX /Zi /O2 /I "../../miranda/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "UNICODE" /D "DATABASE_INDEPENDANT" /Fp"$(INTDIR)\dbtool.pch" /Yu"dbtool.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+MTL=midl.exe
+MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
+RSC=rc.exe
+RSC_PROJ=/l 0x409 /fo"$(INTDIR)\resource.res" /d "NDEBUG"
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\dbtool.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\dbtool.pdb" /map:"$(INTDIR)\dbtool.map" /debug /machine:I386 /out:"../../miranda/bin/release unicode/dbtool.exe"
+LINK32_OBJS= \
+ "$(INTDIR)\aggressive.obj" \
+ "$(INTDIR)\contactchain.obj" \
+ "$(INTDIR)\eventchain.obj" \
+ "$(INTDIR)\finaltasks.obj" \
+ "$(INTDIR)\initialchecks.obj" \
+ "$(INTDIR)\modulechain.obj" \
+ "$(INTDIR)\settingschain.obj" \
+ "$(INTDIR)\user.obj" \
+ "$(INTDIR)\cleaning.obj" \
+ "$(INTDIR)\fileaccess.obj" \
+ "$(INTDIR)\finished.obj" \
+ "$(INTDIR)\openerror.obj" \
+ "$(INTDIR)\progress.obj" \
+ "$(INTDIR)\selectdb.obj" \
+ "$(INTDIR)\welcome.obj" \
+ "$(INTDIR)\disk.obj" \
+ "$(INTDIR)\langpack.obj" \
+ "$(INTDIR)\main.obj" \
+ "$(INTDIR)\wizard.obj" \
+ "$(INTDIR)\worker.obj" \
+ "$(INTDIR)\resource.res" \
+ "$(INTDIR)\utf.obj"
+
+"..\..\miranda\bin\release unicode\dbtool.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ENDIF
+
+
+!IF "$(NO_EXTERNAL_DEPS)" != "1"
+!IF EXISTS("dbtool.dep")
+!INCLUDE "dbtool.dep"
+!ELSE
+!MESSAGE Warning: cannot find "dbtool.dep"
+!ENDIF
+!ENDIF
+
+
+!IF "$(CFG)" == "dbtool - Win32 Release" || "$(CFG)" == "dbtool - Win32 Debug" || "$(CFG)" == "dbtool - Win32 Debug Unicode" || "$(CFG)" == "dbtool - Win32 Release Unicode"
+SOURCE=.\aggressive.cpp
+
+"$(INTDIR)\aggressive.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\contactchain.cpp
+
+"$(INTDIR)\contactchain.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\eventchain.cpp
+
+"$(INTDIR)\eventchain.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\finaltasks.cpp
+
+"$(INTDIR)\finaltasks.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\initialchecks.cpp
+
+"$(INTDIR)\initialchecks.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\modulechain.cpp
+
+"$(INTDIR)\modulechain.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\settingschain.cpp
+
+"$(INTDIR)\settingschain.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\user.cpp
+
+"$(INTDIR)\user.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\cleaning.cpp
+
+"$(INTDIR)\cleaning.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\fileaccess.cpp
+
+"$(INTDIR)\fileaccess.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\finished.cpp
+
+"$(INTDIR)\finished.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\openerror.cpp
+
+"$(INTDIR)\openerror.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\progress.cpp
+
+"$(INTDIR)\progress.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\selectdb.cpp
+
+"$(INTDIR)\selectdb.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\welcome.cpp
+
+"$(INTDIR)\welcome.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\disk.cpp
+
+"$(INTDIR)\disk.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\langpack.cpp
+
+"$(INTDIR)\langpack.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\main.cpp
+
+!IF "$(CFG)" == "dbtool - Win32 Release"
+
+CPP_SWITCHES=/nologo /MD /W3 /GX /Zi /O2 /I "../../miranda/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "DATABASE_INDEPENDANT" /Fp"$(INTDIR)\dbtool.pch" /Yc"dbtool.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+"$(INTDIR)\main.obj" "$(INTDIR)\dbtool.pch" : $(SOURCE) "$(INTDIR)"
+ $(CPP) @<<
+ $(CPP_SWITCHES) $(SOURCE)
+<<
+
+
+!ELSEIF "$(CFG)" == "dbtool - Win32 Debug"
+
+CPP_SWITCHES=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../miranda/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "DATABASE_INDEPENDANT" /Fp"$(INTDIR)\dbtool.pch" /Yc"dbtool.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+
+"$(INTDIR)\main.obj" "$(INTDIR)\dbtool.pch" : $(SOURCE) "$(INTDIR)"
+ $(CPP) @<<
+ $(CPP_SWITCHES) $(SOURCE)
+<<
+
+
+!ELSEIF "$(CFG)" == "dbtool - Win32 Debug Unicode"
+
+CPP_SWITCHES=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../miranda/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "UNICODE" /D "DATABASE_INDEPENDANT" /Fp"$(INTDIR)\dbtool.pch" /Yc"dbtool.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+
+"$(INTDIR)\main.obj" "$(INTDIR)\dbtool.pch" : $(SOURCE) "$(INTDIR)"
+ $(CPP) @<<
+ $(CPP_SWITCHES) $(SOURCE)
+<<
+
+
+!ELSEIF "$(CFG)" == "dbtool - Win32 Release Unicode"
+
+CPP_SWITCHES=/nologo /MD /W3 /GX /Zi /O2 /I "../../miranda/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "UNICODE" /D "DATABASE_INDEPENDANT" /Fp"$(INTDIR)\dbtool.pch" /Yc"dbtool.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+"$(INTDIR)\main.obj" "$(INTDIR)\dbtool.pch" : $(SOURCE) "$(INTDIR)"
+ $(CPP) @<<
+ $(CPP_SWITCHES) $(SOURCE)
+<<
+
+
+!ENDIF
+
+SOURCE=.\utf.cpp
+
+"$(INTDIR)\utf.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\wizard.cpp
+
+"$(INTDIR)\wizard.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\worker.cpp
+
+"$(INTDIR)\worker.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\resource.rc
+
+"$(INTDIR)\resource.res" : $(SOURCE) "$(INTDIR)"
+ $(RSC) $(RSC_PROJ) $(SOURCE)
+
+
+
+!ENDIF
+
diff --git a/tools/dbtool/dbtool.sln b/tools/dbtool/dbtool.sln new file mode 100644 index 0000000000..91c2b49b28 --- /dev/null +++ b/tools/dbtool/dbtool.sln @@ -0,0 +1,27 @@ +Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dbtool", "dbtool.vcproj", "{EEDDE5B0-C023-40C2-96A5-1D1F4B11B791}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ Debug = Debug
+ Debug Unicode = Debug Unicode
+ Release = Release
+ Release Unicode = Release Unicode
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {EEDDE5B0-C023-40C2-96A5-1D1F4B11B791}.Debug.ActiveCfg = Debug|Win32
+ {EEDDE5B0-C023-40C2-96A5-1D1F4B11B791}.Debug.Build.0 = Debug|Win32
+ {EEDDE5B0-C023-40C2-96A5-1D1F4B11B791}.Debug Unicode.ActiveCfg = Debug Unicode|Win32
+ {EEDDE5B0-C023-40C2-96A5-1D1F4B11B791}.Debug Unicode.Build.0 = Debug Unicode|Win32
+ {EEDDE5B0-C023-40C2-96A5-1D1F4B11B791}.Release.ActiveCfg = Release|Win32
+ {EEDDE5B0-C023-40C2-96A5-1D1F4B11B791}.Release.Build.0 = Release|Win32
+ {EEDDE5B0-C023-40C2-96A5-1D1F4B11B791}.Release Unicode.ActiveCfg = Release Unicode|Win32
+ {EEDDE5B0-C023-40C2-96A5-1D1F4B11B791}.Release Unicode.Build.0 = Release Unicode|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/tools/dbtool/dbtool.vcproj b/tools/dbtool/dbtool.vcproj new file mode 100644 index 0000000000..6f15b1903d --- /dev/null +++ b/tools/dbtool/dbtool.vcproj @@ -0,0 +1,1074 @@ +<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="dbtool"
+ ProjectGUID="{EEDDE5B0-C023-40C2-96A5-1D1F4B11B791}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../miranda/include"
+ PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="3"
+ PrecompiledHeaderThrough="dbtool.h"
+ BrowseInformationFile="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ LinkIncremental="2"
+ SuppressStartupBanner="TRUE"
+ GenerateDebugInformation="TRUE"
+ SubSystem="2"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/dbtool.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ GlobalOptimizations="TRUE"
+ InlineFunctionExpansion="1"
+ FavorSizeOrSpeed="2"
+ AdditionalIncludeDirectories="../../miranda/include"
+ PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="3"
+ PrecompiledHeaderThrough="dbtool.h"
+ AssemblerOutput="3"
+ BrowseInformationFile="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="TRUE"
+ AdditionalDependencies="vc7to6.lib comctl32.lib"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="../../miranda/lib"
+ IgnoreAllDefaultLibraries="TRUE"
+ GenerateDebugInformation="TRUE"
+ GenerateMapFile="TRUE"
+ MapFileName="$(OutDir)/$(ProjectName).map"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/dbtool.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Debug Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="1">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../miranda/include"
+ PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="TRUE"
+ UsePrecompiledHeader="3"
+ PrecompiledHeaderThrough="dbtool.h"
+ BrowseInformationFile="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="TRUE"
+ AdditionalDependencies="comctl32.lib"
+ LinkIncremental="2"
+ SuppressStartupBanner="TRUE"
+ GenerateDebugInformation="TRUE"
+ SubSystem="2"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/dbtool.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="1"
+ WholeProgramOptimization="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ GlobalOptimizations="TRUE"
+ FavorSizeOrSpeed="2"
+ OmitFramePointers="FALSE"
+ OptimizeForProcessor="0"
+ AdditionalIncludeDirectories="../../miranda/include"
+ PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="TRUE"
+ UsePrecompiledHeader="3"
+ PrecompiledHeaderThrough="dbtool.h"
+ AssemblerOutput="4"
+ BrowseInformationFile="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="TRUE"
+ AdditionalDependencies="vc7to6.lib comctl32.lib"
+ AdditionalLibraryDirectories="../../miranda/lib"
+ IgnoreAllDefaultLibraries="TRUE"
+ GenerateDebugInformation="TRUE"
+ GenerateMapFile="TRUE"
+ MapFileName="$(OutDir)/$(ProjectName).map"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/dbtool.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+ <File
+ RelativePath="disk.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\langpack.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ ExceptionHandling="TRUE"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="main.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ UsePrecompiledHeader="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ UsePrecompiledHeader="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ UsePrecompiledHeader="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ UsePrecompiledHeader="1"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="wizard.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="worker.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ <Filter
+ Name="Workers"
+ Filter="">
+ <File
+ RelativePath="aggressive.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="contactchain.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="eventchain.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="finaltasks.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="initialchecks.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="modulechain.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="settingschain.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="user.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Wizard Pages"
+ Filter="">
+ <File
+ RelativePath="cleaning.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="fileaccess.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="finished.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="openerror.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="progress.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="selectdb.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="welcome.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl">
+ <File
+ RelativePath="database.h">
+ </File>
+ <File
+ RelativePath="dbtool.h">
+ </File>
+ <File
+ RelativePath=".\resource.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+ <File
+ RelativePath="res\dbthdr.emf">
+ </File>
+ <File
+ RelativePath="res\dbtool.emf">
+ </File>
+ <File
+ RelativePath="res\dbtool.ico">
+ </File>
+ <File
+ RelativePath=".\res\delete.ico">
+ </File>
+ <File
+ RelativePath="res\profileg.ico">
+ </File>
+ <File
+ RelativePath="res\profiler.ico">
+ </File>
+ <File
+ RelativePath="res\profiley.ico">
+ </File>
+ <File
+ RelativePath="resource.rc">
+ </File>
+ </Filter>
+ <File
+ RelativePath="dbtool.exe.manifest">
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/tools/dbtool/dbtool_10.vcxproj b/tools/dbtool/dbtool_10.vcxproj new file mode 100644 index 0000000000..be66c50775 --- /dev/null +++ b/tools/dbtool/dbtool_10.vcxproj @@ -0,0 +1,560 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug Unicode|Win32">
+ <Configuration>Debug Unicode</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug Unicode|x64">
+ <Configuration>Debug Unicode</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <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 Unicode|Win32">
+ <Configuration>Release Unicode</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release Unicode|x64">
+ <Configuration>Release Unicode</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">
+ <ProjectName>dbtool</ProjectName>
+ <ProjectGuid>{A2E9DA24-95E4-4414-94AF-488A382E276A}</ProjectGuid>
+ <RootNamespace>dbtool</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" Label="Configuration">
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|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 Unicode|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|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 Unicode|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)'=='Debug Unicode|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>
+ <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>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">$(SolutionDir)$(Configuration)64\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">$(SolutionDir)$(Configuration)64\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">true</IgnoreImportLibrary>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Debug/dbtool.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../miranda/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>dbtool.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>.\Debug/dbtool.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../miranda/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>dbtool.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27*%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Release/dbtool.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../miranda/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>false</ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>dbtool.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27X86%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)$(ProjectName).map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>.\Release/dbtool.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../miranda/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>false</ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>dbtool.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27*%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)$(ProjectName).map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Debug/dbtool.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../miranda/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>dbtool.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>.\Debug/dbtool.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../miranda/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>dbtool.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27*%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Release/dbtool.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../miranda/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>false</ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>dbtool.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27X86%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <SubSystem>Windows</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>.\Release/dbtool.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../miranda/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>false</ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>dbtool.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27*%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ <SubSystem>Windows</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="disk.cpp" />
+ <ClCompile Include="langpack.cpp" />
+ <ClCompile Include="main.cpp">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+ </ClCompile>
+ <ClCompile Include="utf.cpp" />
+ <ClCompile Include="wizard.cpp" />
+ <ClCompile Include="worker.cpp" />
+ <ClCompile Include="aggressive.cpp" />
+ <ClCompile Include="contactchain.cpp" />
+ <ClCompile Include="eventchain.cpp" />
+ <ClCompile Include="finaltasks.cpp" />
+ <ClCompile Include="initialchecks.cpp" />
+ <ClCompile Include="modulechain.cpp" />
+ <ClCompile Include="settingschain.cpp" />
+ <ClCompile Include="user.cpp" />
+ <ClCompile Include="cleaning.cpp" />
+ <ClCompile Include="fileaccess.cpp" />
+ <ClCompile Include="finished.cpp" />
+ <ClCompile Include="openerror.cpp" />
+ <ClCompile Include="progress.cpp" />
+ <ClCompile Include="selectdb.cpp" />
+ <ClCompile Include="welcome.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="database.h" />
+ <ClInclude Include="dbtool.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="res\dbthdr.emf" />
+ <None Include="res\dbtool.emf" />
+ <None Include="res\dbtool.ico" />
+ <None Include="res\profileg.ico" />
+ <None Include="res\profiler.ico" />
+ <None Include="res\profiley.ico" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="resource.rc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/tools/dbtool/dbtool_10.vcxproj.filters b/tools/dbtool/dbtool_10.vcxproj.filters new file mode 100644 index 0000000000..1a3e2bf55e --- /dev/null +++ b/tools/dbtool/dbtool_10.vcxproj.filters @@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{72e8c0e0-409e-4656-8598-9a0c769f0e34}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+ </Filter>
+ <Filter Include="Source Files\Workers">
+ <UniqueIdentifier>{c81aa4f4-b471-4488-909a-ab503857cb18}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Source Files\Wizard Pages">
+ <UniqueIdentifier>{eccf4f04-aceb-441f-924b-ead9bbb92168}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{12ab2eb9-15e3-4147-ae4a-847ddc95c531}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{07c47951-e20f-43c5-912f-ea300b807935}</UniqueIdentifier>
+ <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="disk.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="langpack.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="main.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="wizard.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="worker.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="aggressive.cpp">
+ <Filter>Source Files\Workers</Filter>
+ </ClCompile>
+ <ClCompile Include="contactchain.cpp">
+ <Filter>Source Files\Workers</Filter>
+ </ClCompile>
+ <ClCompile Include="eventchain.cpp">
+ <Filter>Source Files\Workers</Filter>
+ </ClCompile>
+ <ClCompile Include="finaltasks.cpp">
+ <Filter>Source Files\Workers</Filter>
+ </ClCompile>
+ <ClCompile Include="initialchecks.cpp">
+ <Filter>Source Files\Workers</Filter>
+ </ClCompile>
+ <ClCompile Include="modulechain.cpp">
+ <Filter>Source Files\Workers</Filter>
+ </ClCompile>
+ <ClCompile Include="settingschain.cpp">
+ <Filter>Source Files\Workers</Filter>
+ </ClCompile>
+ <ClCompile Include="user.cpp">
+ <Filter>Source Files\Workers</Filter>
+ </ClCompile>
+ <ClCompile Include="cleaning.cpp">
+ <Filter>Source Files\Wizard Pages</Filter>
+ </ClCompile>
+ <ClCompile Include="fileaccess.cpp">
+ <Filter>Source Files\Wizard Pages</Filter>
+ </ClCompile>
+ <ClCompile Include="finished.cpp">
+ <Filter>Source Files\Wizard Pages</Filter>
+ </ClCompile>
+ <ClCompile Include="openerror.cpp">
+ <Filter>Source Files\Wizard Pages</Filter>
+ </ClCompile>
+ <ClCompile Include="progress.cpp">
+ <Filter>Source Files\Wizard Pages</Filter>
+ </ClCompile>
+ <ClCompile Include="selectdb.cpp">
+ <Filter>Source Files\Wizard Pages</Filter>
+ </ClCompile>
+ <ClCompile Include="welcome.cpp">
+ <Filter>Source Files\Wizard Pages</Filter>
+ </ClCompile>
+ <ClCompile Include="utf.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="database.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="dbtool.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="res\dbthdr.emf">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\dbtool.emf">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\dbtool.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\profileg.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\profiler.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\profiley.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="resource.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/tools/dbtool/dbtool_8.vcproj b/tools/dbtool/dbtool_8.vcproj new file mode 100644 index 0000000000..3230ef52c7 --- /dev/null +++ b/tools/dbtool/dbtool_8.vcproj @@ -0,0 +1,628 @@ +<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="dbtool"
+ ProjectGUID="{A2E9DA24-95E4-4414-94AF-488A382E276A}"
+ RootNamespace="dbtool"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="Debug/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../miranda/include"
+ PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="Release/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="1"
+ FavorSizeOrSpeed="2"
+ OmitFramePointers="true"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../miranda/include"
+ PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ AssemblerOutput="3"
+ BrowseInformationFile="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="comctl32.lib"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalManifestDependencies="type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'"
+ GenerateDebugInformation="true"
+ GenerateMapFile="true"
+ MapFileName="$(OutDir)/$(ProjectName).map"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="Debug/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../miranda/include"
+ PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="Release/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="1"
+ FavorSizeOrSpeed="2"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../miranda/include"
+ PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ AssemblerOutput="3"
+ BrowseInformationFile="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="comctl32.lib"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalManifestDependencies="type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'"
+ GenerateDebugInformation="true"
+ GenerateMapFile="true"
+ MapFileName="$(OutDir)/$(ProjectName).map"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="disk.cpp"
+ >
+ </File>
+ <File
+ RelativePath="langpack.cpp"
+ >
+ </File>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="wizard.cpp"
+ >
+ </File>
+ <File
+ RelativePath="worker.cpp"
+ >
+ </File>
+ <Filter
+ Name="Workers"
+ >
+ <File
+ RelativePath="aggressive.cpp"
+ >
+ </File>
+ <File
+ RelativePath="contactchain.cpp"
+ >
+ </File>
+ <File
+ RelativePath="eventchain.cpp"
+ >
+ </File>
+ <File
+ RelativePath="finaltasks.cpp"
+ >
+ </File>
+ <File
+ RelativePath="initialchecks.cpp"
+ >
+ </File>
+ <File
+ RelativePath="modulechain.cpp"
+ >
+ </File>
+ <File
+ RelativePath="settingschain.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\user.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Wizard Pages"
+ >
+ <File
+ RelativePath="cleaning.cpp"
+ >
+ </File>
+ <File
+ RelativePath="fileaccess.cpp"
+ >
+ </File>
+ <File
+ RelativePath="finished.cpp"
+ >
+ </File>
+ <File
+ RelativePath="openerror.cpp"
+ >
+ </File>
+ <File
+ RelativePath="progress.cpp"
+ >
+ </File>
+ <File
+ RelativePath="selectdb.cpp"
+ >
+ </File>
+ <File
+ RelativePath="welcome.cpp"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="database.h"
+ >
+ </File>
+ <File
+ RelativePath="dbtool.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath="res\dbthdr.emf"
+ >
+ </File>
+ <File
+ RelativePath="res\dbtool.emf"
+ >
+ </File>
+ <File
+ RelativePath="res\dbtool.ico"
+ >
+ </File>
+ <File
+ RelativePath="res\profileg.ico"
+ >
+ </File>
+ <File
+ RelativePath="res\profiler.ico"
+ >
+ </File>
+ <File
+ RelativePath="res\profiley.ico"
+ >
+ </File>
+ <File
+ RelativePath="resource.rc"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath="dbtool.exe.manifest"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/tools/dbtool/dbtool_9.vcproj b/tools/dbtool/dbtool_9.vcproj new file mode 100644 index 0000000000..700451cd2b --- /dev/null +++ b/tools/dbtool/dbtool_9.vcproj @@ -0,0 +1,989 @@ +<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="dbtool"
+ ProjectGUID="{A2E9DA24-95E4-4414-94AF-488A382E276A}"
+ RootNamespace="dbtool"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="Debug/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../miranda/include"
+ PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="comctl32.lib"
+ AdditionalManifestDependencies="type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)64"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)64/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName="Debug/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../miranda/include"
+ PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="comctl32.lib"
+ AdditionalManifestDependencies="type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="Release/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="1"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="2"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../miranda/include"
+ PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ FloatingPointModel="2"
+ RuntimeTypeInfo="false"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="comctl32.lib"
+ AdditionalManifestDependencies="type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)64"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)64/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName="Release/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="1"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="2"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../miranda/include"
+ PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ FloatingPointModel="2"
+ RuntimeTypeInfo="false"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="comctl32.lib"
+ AdditionalManifestDependencies="type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="Debug/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../miranda/include"
+ PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="comctl32.lib"
+ AdditionalManifestDependencies="type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug Unicode|x64"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)64"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)64/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName="Debug/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../miranda/include"
+ PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="comctl32.lib"
+ AdditionalManifestDependencies="type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"
+ GenerateDebugInformation="true"
+ RandomizedBaseAddress="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName="Release/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="1"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="2"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../miranda/include"
+ PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ FloatingPointModel="2"
+ RuntimeTypeInfo="false"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="comctl32.lib"
+ AdditionalManifestDependencies="type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release Unicode|x64"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)64"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)64/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName="Release/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="1"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="2"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../miranda/include"
+ PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ FloatingPointModel="2"
+ RuntimeTypeInfo="false"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="comctl32.lib"
+ AdditionalManifestDependencies="type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <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;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="disk.cpp"
+ >
+ </File>
+ <File
+ RelativePath="langpack.cpp"
+ >
+ </File>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\utf.cpp"
+ >
+ </File>
+ <File
+ RelativePath="wizard.cpp"
+ >
+ </File>
+ <File
+ RelativePath="worker.cpp"
+ >
+ </File>
+ <Filter
+ Name="Workers"
+ >
+ <File
+ RelativePath="aggressive.cpp"
+ >
+ </File>
+ <File
+ RelativePath="contactchain.cpp"
+ >
+ </File>
+ <File
+ RelativePath="eventchain.cpp"
+ >
+ </File>
+ <File
+ RelativePath="finaltasks.cpp"
+ >
+ </File>
+ <File
+ RelativePath="initialchecks.cpp"
+ >
+ </File>
+ <File
+ RelativePath="modulechain.cpp"
+ >
+ </File>
+ <File
+ RelativePath="settingschain.cpp"
+ >
+ </File>
+ <File
+ RelativePath="user.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Wizard Pages"
+ >
+ <File
+ RelativePath="cleaning.cpp"
+ >
+ </File>
+ <File
+ RelativePath="fileaccess.cpp"
+ >
+ </File>
+ <File
+ RelativePath="finished.cpp"
+ >
+ </File>
+ <File
+ RelativePath="openerror.cpp"
+ >
+ </File>
+ <File
+ RelativePath="progress.cpp"
+ >
+ </File>
+ <File
+ RelativePath="selectdb.cpp"
+ >
+ </File>
+ <File
+ RelativePath="welcome.cpp"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="database.h"
+ >
+ </File>
+ <File
+ RelativePath="dbtool.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath="res\dbthdr.emf"
+ >
+ </File>
+ <File
+ RelativePath="res\dbtool.emf"
+ >
+ </File>
+ <File
+ RelativePath="res\dbtool.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\delete.ico"
+ >
+ </File>
+ <File
+ RelativePath="res\profileg.ico"
+ >
+ </File>
+ <File
+ RelativePath="res\profiler.ico"
+ >
+ </File>
+ <File
+ RelativePath="res\profiley.ico"
+ >
+ </File>
+ <File
+ RelativePath="resource.rc"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/tools/dbtool/disk.cpp b/tools/dbtool/disk.cpp new file mode 100644 index 0000000000..685f86569f --- /dev/null +++ b/tools/dbtool/disk.cpp @@ -0,0 +1,112 @@ +/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+extern DWORD spaceProcessed,sourceFileSize;
+
+int SignatureValid(DWORD ofs,DWORD signature)
+{
+ DWORD sig;
+
+ if(ofs+sizeof(sig)>=sourceFileSize) {
+ AddToStatus(STATUS_ERROR,TranslateT("Invalid offset found (database truncated?)"));
+ return 0;
+ }
+
+ sig = *(DWORD*)(opts.pFile+ofs);
+
+ return sig==signature;
+}
+
+int PeekSegment(DWORD ofs,PVOID buf,int cbBytes)
+{
+ DWORD bytesRead;
+
+ if(ofs>=sourceFileSize) {
+ AddToStatus(STATUS_ERROR,TranslateT("Invalid offset found"));
+ return ERROR_SEEK;
+ }
+
+ if (ofs+cbBytes>sourceFileSize)
+ bytesRead = sourceFileSize - ofs;
+ else
+ bytesRead = cbBytes;
+
+ if(bytesRead==0) {
+ AddToStatus(STATUS_ERROR,TranslateT("Error reading, database truncated? (%u)"),GetLastError());
+ return ERROR_READ_FAULT;
+ }
+
+ CopyMemory(buf, opts.pFile+ofs, bytesRead);
+
+ if((int)bytesRead<cbBytes) return ERROR_HANDLE_EOF;
+ return ERROR_SUCCESS;
+}
+
+int ReadSegment(DWORD ofs,PVOID buf,int cbBytes)
+{
+ int ret;
+
+ ret=PeekSegment(ofs,buf,cbBytes);
+ if(ret!=ERROR_SUCCESS && ret!=ERROR_HANDLE_EOF) return ret;
+
+ if(opts.bAggressive) {
+ if (ofs+cbBytes>sourceFileSize) {
+ AddToStatus(STATUS_WARNING,TranslateT("Can't write to working file, aggressive mode may be too aggressive now"));
+ ZeroMemory(opts.pFile+ofs,sourceFileSize-ofs);
+ }
+ else
+ ZeroMemory(opts.pFile+ofs,cbBytes);
+ }
+ spaceProcessed+=cbBytes;
+ return ERROR_SUCCESS;
+}
+
+DWORD WriteSegment(DWORD ofs,PVOID buf,int cbBytes)
+{
+ DWORD bytesWritten;
+ if(opts.bCheckOnly) return 0xbfbfbfbf;
+ if(ofs==WSOFS_END) {
+ ofs=dbhdr.ofsFileEnd;
+ dbhdr.ofsFileEnd+=cbBytes;
+ }
+ SetFilePointer(opts.hOutFile,ofs,NULL,FILE_BEGIN);
+ WriteFile(opts.hOutFile,buf,cbBytes,&bytesWritten,NULL);
+ if((int)bytesWritten<cbBytes) {
+ AddToStatus(STATUS_FATAL,TranslateT("Can't write to output file - disk full? (%u)"),GetLastError());
+ return WS_ERROR;
+ }
+ return ofs;
+}
+
+
+int ReadWrittenSegment(DWORD ofs,PVOID buf,int cbBytes)
+{
+ DWORD bytesRead;
+ if(opts.bCheckOnly) return 0xbfbfbfbf;
+ if(ofs + cbBytes > dbhdr.ofsFileEnd )
+ return ERROR_SEEK;
+
+ SetFilePointer(opts.hOutFile,ofs,NULL,FILE_BEGIN);
+ ReadFile(opts.hOutFile,buf,cbBytes,&bytesRead,NULL);
+ if((int)bytesRead<cbBytes)
+ return ERROR_READ_FAULT;
+
+ return ERROR_SUCCESS;
+}
diff --git a/tools/dbtool/docs/dbtool-license.txt b/tools/dbtool/docs/dbtool-license.txt new file mode 100644 index 0000000000..45645b4b53 --- /dev/null +++ b/tools/dbtool/docs/dbtool-license.txt @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/tools/dbtool/docs/dbtool-readme.txt b/tools/dbtool/docs/dbtool-readme.txt new file mode 100644 index 0000000000..26721a0d6c --- /dev/null +++ b/tools/dbtool/docs/dbtool-readme.txt @@ -0,0 +1,27 @@ + Miranda Database Tool
+ ~~~~~~~~~~~~~~~~~~~~~
+
+ www: http://www.miranda-im.org
+ e-mail: info@miranda-im.org
+
+
+This is a thingy for compacting wasted space in your Miranda database and
+fixing inconsistencies that may have been introduced.
+
+To keep it simple and robust, Miranda will not by itself reclaim any blank
+space created by deleting information from its profile databases, so this tool
+will do that for you. It can also fix some problems that may occur in rare
+circumstances. Since it also re-writes the database in a more sensible order
+(a bit like defragmenting your hard disk) you may find that you get a speed
+improvement in Miranda by running your database through this tool.
+
+Todo: There is no support for any command line parameters to allow for
+unattended operation yet, and it would be helpful if there was better
+integration with Miranda to allow compaction when necessary. It's also
+possible to fix a larger range of faults than it currently can do, but that
+requires significantly more work.
+
+This programme is copyrighted by Richard Hughes 2001,2002,2003 and is covered
+under the terms of the GNU General Public License.
+
+Source code is available from the Miranda IM website.
diff --git a/tools/dbtool/eventchain.cpp b/tools/dbtool/eventchain.cpp new file mode 100644 index 0000000000..c48ab1b821 --- /dev/null +++ b/tools/dbtool/eventchain.cpp @@ -0,0 +1,363 @@ +/*
+Miranda Database Tool
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2011 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+static BOOL backLookup;
+static DWORD ofsThisEvent,ofsPrevEvent;
+static DWORD ofsDestPrevEvent;
+static DWORD eventCount;
+static DWORD lastTimestamp;
+static DWORD ofsFirstUnread,timestampFirstUnread;
+static DWORD memsize = 0;
+static DBEvent* memblock = NULL;
+static DBEvent* dbePrevEvent = NULL;
+
+static void ConvertOldEvent( DBEvent*& dbei )
+{
+ int msglen = (int)strlen(( char* )dbei->blob) + 1, msglenW = 0;
+ if ( msglen != (int) dbei->cbBlob ) {
+ int i, count = (( dbei->cbBlob - msglen ) / sizeof( WCHAR ));
+ WCHAR* p = ( WCHAR* )&dbei->blob[ msglen ];
+ for ( i=0; i < count; i++ ) {
+ if ( p[i] == 0 ) {
+ msglenW = i;
+ break;
+ } } }
+ else {
+ if( !is_utf8_string(( char* )dbei->blob) )
+ dbei->flags &= ~DBEF_UTF;
+ }
+
+ if ( msglenW > 0 && msglenW <= msglen ) {
+ char* utf8str = Utf8EncodeUcs2(( WCHAR* )&dbei->blob[ msglen ] );
+ dbei->cbBlob = (DWORD)strlen( utf8str )+1;
+ dbei->flags |= DBEF_UTF;
+ if (offsetof(DBEvent,blob)+dbei->cbBlob > memsize) {
+ memsize = offsetof(DBEvent,blob)+dbei->cbBlob;
+ memblock = (DBEvent*)realloc(memblock, memsize);
+ dbei = memblock;
+ }
+ memcpy( &dbei->blob, utf8str, dbei->cbBlob );
+ free(utf8str);
+} }
+
+static void WriteOfsNextToPrevious(DWORD ofsPrev,DBContact *dbc,DWORD ofsNext)
+{
+ if(ofsPrev)
+ WriteSegment(ofsPrev+offsetof(DBEvent,ofsNext),&ofsNext,sizeof(DWORD));
+ else
+ dbc->ofsFirstEvent=ofsNext;
+}
+
+static void FinishUp(DWORD ofsLast,DBContact *dbc)
+{
+ WriteOfsNextToPrevious(ofsLast,dbc,0);
+ if(eventCount!=dbc->eventCount)
+ AddToStatus(STATUS_WARNING,TranslateT("Event count marked wrongly: correcting"));
+ dbc->eventCount=eventCount;
+ dbc->ofsLastEvent=ofsLast;
+ if(opts.bMarkRead) {
+ dbc->ofsFirstUnreadEvent=0;
+ dbc->timestampFirstUnread=0;
+ }
+ else {
+ dbc->ofsFirstUnreadEvent=ofsFirstUnread;
+ dbc->timestampFirstUnread=timestampFirstUnread;
+ }
+ if (memsize && memblock) {
+ free(memblock);
+ memsize = 0;
+ memblock = NULL;
+ }
+}
+
+static DWORD WriteEvent(DBEvent *dbe)
+{
+ DWORD ofs = WriteSegment( WSOFS_END, dbe, offsetof(DBEvent,blob)+dbe->cbBlob );
+ if ( ofs == WS_ERROR ) {
+ free( memblock );
+ memblock = NULL;
+ memsize = 0;
+ return 0;
+ }
+ return ofs;
+}
+
+int WorkEventChain(DWORD ofsContact,DBContact *dbc,int firstTime)
+{
+ DBEvent *dbeNew,dbeOld;
+ DBEvent *dbePrev = NULL;
+ DWORD ofsDestThis;
+ int isUnread=0;
+
+ if(firstTime) {
+ dbePrevEvent = NULL;
+ ofsPrevEvent=0;
+ ofsDestPrevEvent=0;
+ ofsThisEvent=dbc->ofsFirstEvent;
+ eventCount=0;
+ backLookup=0;
+ lastTimestamp=0;
+ ofsFirstUnread=timestampFirstUnread=0;
+ if(opts.bEraseHistory) {
+ dbc->eventCount=0;
+ dbc->ofsFirstEvent=0;
+ dbc->ofsLastEvent=0;
+ dbc->ofsFirstUnreadEvent=0;
+ dbc->timestampFirstUnread=0;
+ return ERROR_NO_MORE_ITEMS;
+ } }
+
+ if(ofsThisEvent==0) {
+ FinishUp(ofsDestPrevEvent,dbc);
+ return ERROR_NO_MORE_ITEMS;
+ }
+ if(!SignatureValid(ofsThisEvent,DBEVENT_SIGNATURE))
+ {
+ DWORD ofsNew = 0;
+ DWORD ofsTmp = dbc->ofsLastEvent;
+
+ if (!backLookup && ofsTmp) {
+ backLookup = 1;
+ while(SignatureValid(ofsTmp,DBEVENT_SIGNATURE))
+ {
+ if(PeekSegment(ofsTmp,&dbeOld,sizeof(dbeOld))!=ERROR_SUCCESS)
+ break;
+ ofsNew = ofsTmp;
+ ofsTmp = dbeOld.ofsPrev;
+ }
+ }
+ if (ofsNew) {
+ AddToStatus(STATUS_WARNING,TranslateT("Event chain corrupted, trying to recover..."));
+ ofsThisEvent = ofsNew;
+ } else {
+ AddToStatus(STATUS_ERROR,TranslateT("Event chain corrupted, further entries ignored"));
+ FinishUp(ofsDestPrevEvent,dbc);
+ return ERROR_NO_MORE_ITEMS;
+ }
+ }
+
+ if(PeekSegment(ofsThisEvent,&dbeOld,sizeof(dbeOld))!=ERROR_SUCCESS) {
+ FinishUp(ofsDestPrevEvent,dbc);
+ return ERROR_NO_MORE_ITEMS;
+ }
+
+ if(firstTime) {
+ if(!(dbeOld.flags&DBEF_FIRST)) {
+ AddToStatus(STATUS_WARNING,TranslateT("First event not marked as such: correcting"));
+ dbeOld.flags|=DBEF_FIRST;
+ }
+ dbeOld.ofsPrev=ofsContact;
+ lastTimestamp=dbeOld.timestamp;
+ }
+ else if(dbeOld.flags&DBEF_FIRST) {
+ AddToStatus(STATUS_WARNING,TranslateT("Event marked as first which is not: correcting"));
+ dbeOld.flags&=~DBEF_FIRST;
+ }
+
+ if(dbeOld.flags&~(DBEF_FIRST|DBEF_READ|DBEF_SENT|DBEF_RTL|DBEF_UTF)) {
+ AddToStatus(STATUS_WARNING,TranslateT("Extra flags found in event: removing"));
+ dbeOld.flags&=(DBEF_FIRST|DBEF_READ|DBEF_SENT|DBEF_RTL|DBEF_UTF);
+ }
+
+ if(!(dbeOld.flags&(DBEF_READ|DBEF_SENT))) {
+ if(opts.bMarkRead) dbeOld.flags|=DBEF_READ;
+ else if(ofsFirstUnread==0) {
+ if(dbc->ofsFirstUnreadEvent!=ofsThisEvent || dbc->timestampFirstUnread!=dbeOld.timestamp)
+ AddToStatus(STATUS_WARNING,TranslateT("First unread event marked wrong: fixing"));
+ isUnread=1;
+ } }
+
+ if(dbeOld.cbBlob>1024*1024 || dbeOld.cbBlob==0) {
+ AddToStatus(STATUS_ERROR,TranslateT("Infeasibly large event blob: skipping"));
+ ofsThisEvent=dbeOld.ofsNext;
+ return ERROR_SUCCESS;
+ }
+
+ if ( dbePrevEvent && dbeOld.timestamp == lastTimestamp ) {
+ int len = offsetof(DBEvent,blob)+dbePrevEvent->cbBlob;
+ dbePrev = (DBEvent*)malloc(len);
+ memcpy(dbePrev, dbePrevEvent, len);
+ }
+
+ if (offsetof(DBEvent,blob)+dbeOld.cbBlob > memsize) {
+ memsize = offsetof(DBEvent,blob)+dbeOld.cbBlob;
+ memblock = (DBEvent*)realloc(memblock, memsize);
+ }
+ dbeNew=memblock;
+
+ if(ReadSegment(ofsThisEvent,dbeNew,offsetof(DBEvent,blob)+dbeOld.cbBlob)!=ERROR_SUCCESS) {
+ FinishUp(ofsDestPrevEvent,dbc);
+ return ERROR_NO_MORE_ITEMS;
+ }
+
+ if((dbeNew->ofsModuleName=ConvertModuleNameOfs(dbeOld.ofsModuleName))==0) {
+ ofsThisEvent=dbeOld.ofsNext;
+ return ERROR_SUCCESS;
+ }
+
+ if(!firstTime && dbeOld.ofsPrev!=ofsPrevEvent)
+ AddToStatus(STATUS_WARNING,TranslateT("Event not backlinked correctly: fixing"));
+
+ dbeNew->flags=dbeOld.flags;
+ dbeNew->ofsPrev=ofsDestPrevEvent;
+ dbeNew->ofsNext=0;
+
+ if ( dbeOld.eventType == EVENTTYPE_MESSAGE && opts.bConvertUtf )
+ ConvertOldEvent(dbeNew);
+
+ if ( dbePrev )
+ {
+ if ( dbePrev->cbBlob == dbeNew->cbBlob &&
+ dbePrev->ofsModuleName == dbeNew->ofsModuleName &&
+ dbePrev->eventType == dbeNew->eventType &&
+ (dbePrev->flags & DBEF_SENT) == (dbeNew->flags & DBEF_SENT) &&
+ !memcmp( dbePrev->blob, dbeNew->blob, dbeNew->cbBlob )
+ ) {
+ AddToStatus(STATUS_WARNING,TranslateT("Duplicate event was found: skipping"));
+ if (dbc->eventCount)
+ dbc->eventCount--;
+ free(dbePrev);
+ // ofsDestPrevEvent is still the same!
+ ofsPrevEvent=ofsThisEvent;
+ ofsThisEvent=dbeOld.ofsNext;
+ return ERROR_SUCCESS;
+ }
+ free(dbePrev);
+ }
+ else if ( !firstTime && dbeNew->timestamp < lastTimestamp )
+ {
+ DWORD found = 0;
+ DBEvent dbeTmp;
+ DWORD ofsTmp;
+
+ if (opts.bCheckOnly)
+ {
+ if (!opts.bAggressive)
+ {
+ ofsTmp = dbeOld.ofsPrev;
+ while(PeekSegment(ofsTmp,&dbeTmp,sizeof(dbeTmp))==ERROR_SUCCESS)
+ {
+ if (dbeTmp.ofsPrev == ofsContact) {
+ found = 1;
+ break;
+ }
+ if (dbeTmp.timestamp < dbeNew->timestamp) {
+ found = 2;
+ break;
+ }
+ ofsTmp = dbeTmp.ofsPrev;
+ }
+ }
+ AddToStatus(STATUS_WARNING,TranslateT("Event position in chain is not correct"));
+ }
+ else
+ {
+ ofsTmp = ofsDestPrevEvent;
+ while(ReadWrittenSegment(ofsTmp,&dbeTmp,sizeof(dbeTmp))==ERROR_SUCCESS)
+ {
+ if (dbeTmp.ofsPrev == ofsContact) {
+ found = 1;
+ break;
+ }
+ if (dbeTmp.timestamp < dbeNew->timestamp) {
+ found = 2;
+ break;
+ }
+ ofsTmp = dbeTmp.ofsPrev;
+ }
+ if (found)
+ AddToStatus(STATUS_WARNING,TranslateT("Event position in chain is not correct: fixing"));
+ else
+ AddToStatus(STATUS_WARNING,TranslateT("Event position in chain is not correct: unable to fix"));
+ }
+
+ // insert before FIRST
+ if (found == 1 && !opts.bCheckOnly) {
+ dbeNew->flags|=DBEF_FIRST;
+ dbeNew->ofsPrev=ofsContact;
+ dbeNew->ofsNext=dbc->ofsFirstEvent;
+
+ ofsDestThis = WriteEvent(dbeNew);
+ if ( !ofsDestThis )
+ return ERROR_HANDLE_DISK_FULL;
+
+ if ( isUnread && timestampFirstUnread >= dbeNew->timestamp ) {
+ ofsFirstUnread=ofsDestThis;
+ timestampFirstUnread=dbeNew->timestamp;
+ }
+ // fix first event
+ WriteOfsNextToPrevious(0,dbc,ofsDestThis);
+ // fix next event
+ WriteSegment(dbeNew->ofsNext+offsetof(DBEvent,ofsPrev),&ofsDestThis,sizeof(DWORD));
+ dbeTmp.flags &=~DBEF_FIRST;
+ WriteSegment(dbeNew->ofsNext+offsetof(DBEvent,flags),&dbeTmp.flags,sizeof(DWORD));
+ }
+ else if (found == 2 && !opts.bCheckOnly) {
+
+ dbeNew->ofsPrev=ofsTmp;
+ dbeNew->ofsNext=dbeTmp.ofsNext;
+
+ ofsDestThis = WriteEvent(dbeNew);
+ if ( !ofsDestThis )
+ return ERROR_HANDLE_DISK_FULL;
+
+ if ( isUnread && timestampFirstUnread >= dbeNew->timestamp ) {
+ ofsFirstUnread=ofsDestThis;
+ timestampFirstUnread=dbeNew->timestamp;
+ }
+ // fix previous event
+ WriteOfsNextToPrevious(dbeNew->ofsPrev,dbc,ofsDestThis);
+ // fix next event
+ WriteSegment(dbeNew->ofsNext+offsetof(DBEvent,ofsPrev),&ofsDestThis,sizeof(DWORD));
+ }
+
+ if (found) {
+ eventCount++;
+ // ofsDestPrevEvent is still the same!
+ ofsPrevEvent=ofsThisEvent;
+ ofsThisEvent=dbeOld.ofsNext;
+ return ERROR_SUCCESS;
+ }
+ }
+
+ lastTimestamp=dbeNew->timestamp;
+ dbePrevEvent = dbeNew;
+
+ ofsDestThis = WriteEvent(dbeNew);
+ if ( !ofsDestThis )
+ return ERROR_HANDLE_DISK_FULL;
+
+ if ( isUnread ) {
+ ofsFirstUnread=ofsDestThis;
+ timestampFirstUnread=dbeOld.timestamp;
+ }
+
+ eventCount++;
+ WriteOfsNextToPrevious(ofsDestPrevEvent,dbc,ofsDestThis);
+
+ ofsDestPrevEvent=ofsDestThis;
+ ofsPrevEvent=ofsThisEvent;
+ ofsThisEvent=dbeOld.ofsNext;
+ return ERROR_SUCCESS;
+}
diff --git a/tools/dbtool/fileaccess.cpp b/tools/dbtool/fileaccess.cpp new file mode 100644 index 0000000000..2fdd16c082 --- /dev/null +++ b/tools/dbtool/fileaccess.cpp @@ -0,0 +1,69 @@ +/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+INT_PTR CALLBACK FileAccessDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ INT_PTR bReturn;
+
+ if(DoMyControlProcessing(hdlg,message,wParam,lParam,&bReturn)) return bReturn;
+ switch(message) {
+ case WM_INITDIALOG:
+ CheckDlgButton(hdlg,IDC_CHECKONLY,opts.bCheckOnly);
+ CheckDlgButton(hdlg,IDC_BACKUP,opts.bBackup);
+ CheckDlgButton(hdlg,IDC_AGGRESSIVE,opts.bAggressive);
+ SendMessage(hdlg,WM_COMMAND,MAKEWPARAM(IDC_CHECKONLY,BN_CLICKED),0);
+ TranslateDialog(hdlg);
+ return TRUE;
+ case WZN_PAGECHANGING:
+ opts.bCheckOnly=IsDlgButtonChecked(hdlg,IDC_CHECKONLY);
+ opts.bAggressive=IsDlgButtonChecked(hdlg,IDC_AGGRESSIVE);
+ if(opts.bCheckOnly) opts.bBackup=0;
+ else opts.bBackup=IsDlgButtonChecked(hdlg,IDC_BACKUP);
+ break;
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDC_BACK:
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_SELECTDB,(LPARAM)SelectDbDlgProc);
+ break;
+ case IDOK:
+ if(opts.bCheckOnly) {
+ if (!opts.hFile) {
+ opts.hFile = CreateFile( opts.filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL );
+ if ( opts.hFile == INVALID_HANDLE_VALUE ) {
+ opts.hFile = NULL;
+ opts.error = GetLastError();
+ SendMessage( GetParent(hdlg), WZM_GOTOPAGE, IDD_OPENERROR, ( LPARAM )OpenErrorDlgProc );
+ break;
+ }
+ }
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_PROGRESS,(LPARAM)ProgressDlgProc);
+ }
+ else
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_CLEANING,(LPARAM)CleaningDlgProc);
+ break;
+ case IDC_CHECKONLY:
+ EnableWindow(GetDlgItem(hdlg,IDC_BACKUP),!IsDlgButtonChecked(hdlg,IDC_CHECKONLY));
+ EnableWindow(GetDlgItem(hdlg,IDC_STBACKUP),!IsDlgButtonChecked(hdlg,IDC_CHECKONLY));
+ break;
+ }
+ break;
+ }
+ return FALSE;
+}
diff --git a/tools/dbtool/finaltasks.cpp b/tools/dbtool/finaltasks.cpp new file mode 100644 index 0000000000..b7a99a5189 --- /dev/null +++ b/tools/dbtool/finaltasks.cpp @@ -0,0 +1,78 @@ +/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+extern int errorCount;
+
+int WorkFinalTasks(int firstTime)
+{
+ FreeModuleChain();
+ AddToStatus(STATUS_MESSAGE,TranslateT("Processing final tasks"));
+ dbhdr.slackSpace=0;
+ if(WriteSegment(0,&dbhdr,sizeof(dbhdr))==WS_ERROR)
+ return ERROR_WRITE_FAULT;
+ if (opts.hFile) {
+ CloseHandle(opts.hFile);
+ opts.hFile = NULL;
+ }
+ if ( opts.hOutFile ) {
+ CloseHandle(opts.hOutFile);
+ opts.hOutFile = NULL;
+ }
+ if (opts.pFile) {
+ UnmapViewOfFile(opts.pFile);
+ opts.pFile = NULL;
+ }
+ if (opts.hMap) {
+ CloseHandle(opts.hMap);
+ opts.hMap = NULL;
+ }
+ if(errorCount && !opts.bBackup && !opts.bCheckOnly) {
+ extern time_t ts;
+ time_t dlg_ts = time(NULL);
+ if ( IDYES == MessageBox( NULL,
+ TranslateT("Errors were encountered, however you selected not to backup the original database. It is strongly recommended that you do so in case important data was omitted. Do you wish to keep a backup of the original database?"),
+ TranslateT("Miranda Database Tool"), MB_YESNO ))
+ opts.bBackup = 1;
+ ts += time(NULL) - dlg_ts;
+ }
+ if(opts.bBackup) {
+ int i;
+ TCHAR dbPath[MAX_PATH],dbFile[MAX_PATH];
+ _tcscpy( dbPath, opts.filename );
+ TCHAR* str2 = _tcsrchr( dbPath, '\\' );
+ if ( str2 != NULL ) {
+ _tcscpy( dbFile, str2+1 );
+ *str2 = 0;
+ }
+ else {
+ _tcscpy( dbFile, dbPath );
+ dbPath[0] = 0;
+ }
+ for(i=1;;i++) {
+ if(i==1) wsprintf(opts.backupFilename,TranslateT("%s\\Backup of %s"),dbPath,dbFile);
+ else wsprintf(opts.backupFilename,TranslateT("%s\\Backup (%d) of %s"),dbPath,i,dbFile);
+ if(_taccess(opts.backupFilename,0)==-1) break;
+ }
+ MoveFile(opts.filename,opts.backupFilename) || AddToStatus(STATUS_WARNING,TranslateT("Unable to rename original file"));
+ }
+ else if(!opts.bCheckOnly) DeleteFile(opts.filename) || AddToStatus(STATUS_WARNING,TranslateT("Unable to delete original file"));
+ if(!opts.bCheckOnly) MoveFile(opts.outputFilename,opts.filename) || AddToStatus(STATUS_WARNING,TranslateT("Unable to rename output file"));
+ return ERROR_NO_MORE_ITEMS;
+}
diff --git a/tools/dbtool/finished.cpp b/tools/dbtool/finished.cpp new file mode 100644 index 0000000000..f39219730d --- /dev/null +++ b/tools/dbtool/finished.cpp @@ -0,0 +1,82 @@ +/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+#define WM_LAUNCHMIRANDA (WM_USER+1)
+INT_PTR CALLBACK FinishedDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ INT_PTR bReturn;
+
+ if(DoMyControlProcessing(hdlg,message,wParam,lParam,&bReturn)) return bReturn;
+ switch(message) {
+ case WM_INITDIALOG:
+ EnableWindow(GetDlgItem(GetParent(hdlg),IDC_BACK),FALSE);
+ SetDlgItemText(GetParent(hdlg),IDCANCEL,TranslateT("&Finish"));
+ SetWindowLong(GetDlgItem(hdlg,IDC_DBFILE),GWL_STYLE,GetWindowLong(GetDlgItem(hdlg,IDC_DBFILE),GWL_STYLE)|SS_PATHELLIPSIS);
+ SetDlgItemText( hdlg, IDC_DBFILE, opts.filename );
+ if(opts.bBackup) {
+ ShowWindow(GetDlgItem(hdlg,IDC_STBACKUP),TRUE);
+ SetWindowLong(GetDlgItem(hdlg,IDC_BACKUPFILE),GWL_STYLE,GetWindowLong(GetDlgItem(hdlg,IDC_BACKUPFILE),GWL_STYLE)|SS_PATHELLIPSIS);
+ SetDlgItemText(hdlg,IDC_BACKUPFILE,opts.backupFilename);
+ }
+ else ShowWindow(GetDlgItem(hdlg,IDC_STBACKUP),FALSE);
+ TranslateDialog(hdlg);
+ return TRUE;
+ case WM_LAUNCHMIRANDA:
+ if(IsDlgButtonChecked(hdlg,IDC_LAUNCHMIRANDA)) {
+ TCHAR dbFile[MAX_PATH],dbPath[MAX_PATH],*str2;
+ _tcscpy(dbPath,opts.filename);
+ str2 = _tcsrchr(dbPath,'\\');
+ if ( str2 == NULL ) {
+ _tcscpy( dbFile, dbPath );
+ dbPath[ 0 ] = 0;
+ }
+ else {
+ _tcscpy( dbFile, str2+1 );
+ *str2 = 0;
+ }
+ str2 = _tcsrchr( dbFile, '.' );
+ if ( str2 != NULL )
+ *str2 = 0;
+ _tcscat( dbPath, _T("\\miranda32.exe"));
+ if ( GetFileAttributes( dbPath ) == INVALID_FILE_ATTRIBUTES ) {
+ GetModuleFileName( NULL, dbPath, SIZEOF( dbPath ));
+ if (( str2 = _tcsrchr( dbPath, '\\' )) != NULL )
+ *str2 = 0;
+ else
+ dbPath[0] = 0;
+ _tcscat( dbPath, _T("\\miranda32.exe"));
+ }
+ ShellExecute( hdlg, NULL, dbPath, dbFile, _T(""), 0 );
+ }
+ break;
+ case WZN_CANCELCLICKED:
+ SendMessage(hdlg,WM_LAUNCHMIRANDA,0,0);
+ break;
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDOK:
+ SendMessage(hdlg,WM_LAUNCHMIRANDA,0,0);
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_SELECTDB,(LPARAM)SelectDbDlgProc);
+ break;
+ }
+ break;
+ }
+ return FALSE;
+}
diff --git a/tools/dbtool/initialchecks.cpp b/tools/dbtool/initialchecks.cpp new file mode 100644 index 0000000000..aa9a5527fa --- /dev/null +++ b/tools/dbtool/initialchecks.cpp @@ -0,0 +1,81 @@ +/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+extern DWORD sourceFileSize,spaceUsed;
+
+int WorkInitialChecks(int firstTime)
+{
+ DWORD bytesRead;
+
+ sourceFileSize=GetFileSize(opts.hFile,NULL);
+ if(sourceFileSize==0) {
+ AddToStatus(STATUS_WARNING,TranslateT("Database is newly created and has no data to process"));
+ AddToStatus(STATUS_SUCCESS,TranslateT("Processing completed successfully"));
+ return ERROR_INVALID_DATA;
+ }
+ ReadFile(opts.hFile,&dbhdr,sizeof(dbhdr),&bytesRead,NULL);
+ if(bytesRead<sizeof(dbhdr)) {
+ AddToStatus(STATUS_FATAL,TranslateT("Database is corrupted and too small to contain any recoverable data"));
+ return ERROR_BAD_FORMAT;
+ }
+ if(memcmp(dbhdr.signature,&dbSignature,sizeof(dbhdr.signature))) {
+ AddToStatus(STATUS_FATAL,TranslateT("Database signature is corrupted, automatic repair is impossible"));
+ return ERROR_BAD_FORMAT;
+ }
+ if(dbhdr.version!=0x00000700) {
+ AddToStatus(STATUS_FATAL,TranslateT("Database is marked as belonging to an unknown version of Miranda"));
+ return ERROR_BAD_FORMAT;
+ }
+ _tcscpy(opts.workingFilename,opts.filename);
+
+ if(opts.bCheckOnly) {
+ _tcscpy( opts.outputFilename, TranslateT("<check only>"));
+ opts.hOutFile=INVALID_HANDLE_VALUE;
+ }
+ else {
+ _tcscpy(opts.outputFilename,opts.filename);
+ *_tcsrchr(opts.outputFilename,'.')=0;
+ _tcscat(opts.outputFilename,TranslateT(" (Output).dat"));
+ opts.hOutFile = CreateFile(opts.outputFilename,GENERIC_WRITE,FILE_SHARE_READ,NULL,CREATE_ALWAYS,FILE_FLAG_SEQUENTIAL_SCAN,NULL);
+ if ( opts.hOutFile == INVALID_HANDLE_VALUE ) {
+ AddToStatus(STATUS_FATAL,TranslateT("Can't create output file (%u)"),GetLastError());
+ return ERROR_ACCESS_DENIED;
+ }
+ }
+
+ opts.hMap = CreateFileMapping(opts.hFile, NULL, opts.bAggressive?PAGE_WRITECOPY:PAGE_READONLY, 0, 0, NULL);
+
+ if (opts.hMap)
+ opts.pFile = (BYTE*)MapViewOfFile(opts.hMap, opts.bAggressive?FILE_MAP_COPY:FILE_MAP_READ, 0, 0 ,0);
+ else {
+ AddToStatus(STATUS_FATAL,TranslateT("Can't create file mapping (%u)"),GetLastError());
+ return ERROR_ACCESS_DENIED;
+ }
+
+ if (!opts.pFile) {
+ AddToStatus(STATUS_FATAL,TranslateT("Can't create map view of file (%u)"),GetLastError());
+ return ERROR_ACCESS_DENIED;
+ }
+ if(ReadSegment(0,&dbhdr,sizeof(dbhdr))!=ERROR_SUCCESS) return ERROR_READ_FAULT;
+ if(WriteSegment(0,&dbhdr,sizeof(dbhdr))==WS_ERROR) return ERROR_HANDLE_DISK_FULL;
+ spaceUsed=dbhdr.ofsFileEnd-dbhdr.slackSpace;
+ dbhdr.ofsFileEnd=sizeof(dbhdr);
+ return ERROR_NO_MORE_ITEMS;
+}
diff --git a/tools/dbtool/langpack.cpp b/tools/dbtool/langpack.cpp new file mode 100644 index 0000000000..85df5cdf22 --- /dev/null +++ b/tools/dbtool/langpack.cpp @@ -0,0 +1,392 @@ +/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2011 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "dbtool.h"
+
+struct LangPackEntry {
+ unsigned linePos;
+ DWORD englishHash;
+ char *english; //not currently used, the hash does everything
+ char *local;
+ wchar_t *wlocal;
+};
+
+struct LangPackStruct {
+ TCHAR filename[MAX_PATH];
+ char language[64];
+ char lastModifiedUsing[64];
+ char authors[256];
+ char authorEmail[128];
+ struct LangPackEntry *entry;
+ int entryCount;
+ LCID localeID;
+ UINT defaultANSICp;
+} static langPack;
+
+static void TrimString(char *str)
+{
+ size_t start, len = strlen(str);
+ while(str[0] && (unsigned char)str[len-1] <= ' ') str[--len] = 0;
+ for (start = 0; str[start] && (unsigned char)str[start] <= ' '; start++);
+ memmove(str, str + start, len - start + 1);
+}
+
+static void TrimStringSimple(char *str)
+{
+ size_t len = strlen(str);
+ if (str[len-1] == '\n') str[--len] = '\0';
+ if (str[len-1] == '\r') str[len-1] = '\0';
+}
+
+static int IsEmpty(char *str)
+{
+ int i = 0;
+
+ while (str[i])
+ {
+ if (str[i] != ' ' && str[i] != '\r' && str[i] != '\n')
+ return 0;
+ i++;
+ }
+ return 1;
+}
+
+void ConvertBackslashes(char *str, UINT fileCp)
+{
+ char *pstr;
+ for (pstr = str; *pstr; pstr = CharNextExA(fileCp, pstr, 0))
+ {
+ if( *pstr == '\\' )
+ {
+ switch( pstr[1] )
+ {
+ case 'n': *pstr = '\n'; break;
+ case 't': *pstr = '\t'; break;
+ case 'r': *pstr = '\r'; break;
+ default: *pstr = pstr[1]; break;
+ }
+ memmove(pstr+1, pstr+2, strlen(pstr+2) + 1);
+ }
+ }
+}
+
+#ifdef _DEBUG
+#pragma optimize( "gt", on )
+#endif
+
+// MurmurHash2
+unsigned int __fastcall hash(const void * key, unsigned int len)
+{
+ // 'm' and 'r' are mixing constants generated offline.
+ // They're not really 'magic', they just happen to work well.
+ const unsigned int m = 0x5bd1e995;
+ const int r = 24;
+
+ // Initialize the hash to a 'random' value
+ unsigned int h = len;
+
+ // Mix 4 bytes at a time into the hash
+ const unsigned char * data = (const unsigned char *)key;
+
+ while(len >= 4)
+ {
+ unsigned int k = *(unsigned int *)data;
+
+ k *= m;
+ k ^= k >> r;
+ k *= m;
+
+ h *= m;
+ h ^= k;
+
+ data += 4;
+ len -= 4;
+ }
+
+ // Handle the last few bytes of the input array
+ switch(len)
+ {
+ case 3: h ^= data[2] << 16;
+ case 2: h ^= data[1] << 8;
+ case 1: h ^= data[0];
+ h *= m;
+ };
+
+ // Do a few final mixes of the hash to ensure the last few
+ // bytes are well-incorporated.
+ h ^= h >> 13;
+ h *= m;
+ h ^= h >> 15;
+
+ return h;
+}
+
+unsigned int __fastcall hashstrW(const char * key)
+{
+ if (key == NULL) return 0;
+ const unsigned int len = (unsigned int)wcslen((const wchar_t*)key);
+ char* buf = (char*)alloca(len + 1);
+ for (unsigned i = 0; i <= len ; ++i)
+ buf[i] = key[i << 1];
+ return hash(buf, len);
+}
+
+__inline unsigned int hashstr(const char * key)
+{
+ if (key == NULL) return 0;
+ const unsigned int len = (unsigned int)strlen((const char*)key);
+ return hash(key, len);
+}
+
+#ifdef _DEBUG
+#pragma optimize( "", on )
+#endif
+
+static int SortLangPackHashesProc(struct LangPackEntry *arg1,struct LangPackEntry *arg2)
+{
+ if(arg1->englishHash<arg2->englishHash) return -1;
+ if(arg1->englishHash>arg2->englishHash) return 1;
+ /* both source strings of the same hash (may not be the same string thou) put
+ the one that was written first to be found first */
+ if(arg1->linePos<arg2->linePos) return -1;
+ if(arg1->linePos>arg2->linePos) return 1;
+ return 0;
+}
+
+
+static int SortLangPackHashesProc2(struct LangPackEntry *arg1,struct LangPackEntry *arg2)
+{
+ if(arg1->englishHash<arg2->englishHash) return -1;
+ if(arg1->englishHash>arg2->englishHash) return 1;
+ return 0;
+}
+
+static int LoadLangPack(const TCHAR *szLangPack)
+{
+ FILE *fp;
+ char line[4096] = "";
+ char *pszColon;
+ char *pszLine;
+ int entriesAlloced;
+ int startOfLine=0;
+ unsigned int linePos=1;
+ LCID langID;
+ UINT fileCp = CP_ACP;
+
+ lstrcpy(langPack.filename,szLangPack);
+ fp = _tfopen(szLangPack,_T("rt"));
+ if(fp==NULL) return 1;
+ fgets(line,sizeof(line),fp);
+ size_t lineLen = strlen(line);
+ if (lineLen >= 3 && line[0]=='\xef' && line[1]=='\xbb' && line[2]=='\xbf')
+ {
+ fileCp = CP_UTF8;
+ memmove(line, line + 3, lineLen - 2);
+ }
+ TrimString(line);
+ if(lstrcmpA(line,"Miranda Language Pack Version 1")) {fclose(fp); return 2;}
+ //headers
+ while(!feof(fp)) {
+ startOfLine=ftell(fp);
+ if(fgets(line,sizeof(line),fp)==NULL) break;
+ TrimString(line);
+ if(IsEmpty(line) || line[0]==';' || line[0]==0) continue;
+ if(line[0]=='[') break;
+ pszColon=strchr(line,':');
+ if(pszColon==NULL) {fclose(fp); return 3;}
+ *pszColon=0;
+ if(!lstrcmpA(line,"Language")) {_snprintf(langPack.language,sizeof(langPack.language),"%s",pszColon+1); TrimString(langPack.language);}
+ else if(!lstrcmpA(line,"Last-Modified-Using")) {_snprintf(langPack.lastModifiedUsing,sizeof(langPack.lastModifiedUsing),"%s",pszColon+1); TrimString(langPack.lastModifiedUsing);}
+ else if(!lstrcmpA(line,"Authors")) {_snprintf(langPack.authors,sizeof(langPack.authors),"%s",pszColon+1); TrimString(langPack.authors);}
+ else if(!lstrcmpA(line,"Author-email")) {_snprintf(langPack.authorEmail,sizeof(langPack.authorEmail),"%s",pszColon+1); TrimString(langPack.authorEmail);}
+ else if(!lstrcmpA(line, "Locale")) {
+ char szBuf[20], *stopped;
+
+ TrimString(pszColon + 1);
+ langID = (USHORT)strtol(pszColon + 1, &stopped, 16);
+ langPack.localeID = MAKELCID(langID, 0);
+ GetLocaleInfoA(langPack.localeID, LOCALE_IDEFAULTANSICODEPAGE, szBuf, 10);
+ szBuf[5] = 0; // codepages have max. 5 digits
+ langPack.defaultANSICp = atoi(szBuf);
+ if (fileCp == CP_ACP)
+ fileCp = langPack.defaultANSICp;
+ }
+ }
+
+ //body
+ fseek(fp,startOfLine,SEEK_SET);
+ entriesAlloced=0;
+ while(!feof(fp)) {
+ if(fgets(line,sizeof(line),fp)==NULL) break;
+ if(IsEmpty(line) || line[0]==';' || line[0]==0) continue;
+ TrimStringSimple(line);
+ ConvertBackslashes(line, fileCp);
+ if(line[0]=='[' && line[lstrlenA(line)-1]==']') {
+ if(langPack.entryCount && langPack.entry[langPack.entryCount-1].local==NULL) {
+ if(langPack.entry[langPack.entryCount-1].english!=NULL) free(langPack.entry[langPack.entryCount-1].english);
+ langPack.entryCount--;
+ }
+ pszLine = line+1;
+ line[lstrlenA(line)-1]='\0';
+ TrimStringSimple(line);
+ if(++langPack.entryCount>entriesAlloced) {
+ entriesAlloced+=128;
+ langPack.entry=(struct LangPackEntry*)realloc(langPack.entry,sizeof(struct LangPackEntry)*entriesAlloced);
+ }
+ langPack.entry[langPack.entryCount-1].english=NULL;
+ langPack.entry[langPack.entryCount-1].englishHash=hashstr(pszLine);
+ langPack.entry[langPack.entryCount-1].local=NULL;
+ langPack.entry[langPack.entryCount-1].wlocal = NULL;
+ langPack.entry[langPack.entryCount-1].linePos=linePos++;
+ }
+ else if(langPack.entryCount) {
+ struct LangPackEntry* E = &langPack.entry[langPack.entryCount-1];
+
+ if(E->local==NULL) {
+ E->local = _strdup(line);
+ if (fileCp == CP_UTF8)
+ Utf8DecodeCP(E->local, langPack.defaultANSICp, NULL);
+
+ {
+ int iNeeded = MultiByteToWideChar(fileCp, 0, line, -1, 0, 0);
+ E->wlocal = (wchar_t *)malloc((iNeeded+1) * sizeof(wchar_t));
+ MultiByteToWideChar(fileCp, 0, line, -1, E->wlocal, iNeeded);
+ }
+ }
+ else {
+ size_t iOldLenA = strlen(E->local);
+ E->local = (char*)realloc(E->local, iOldLenA + strlen(line) + 2);
+ strcat(E->local, "\n");
+ strcat(E->local, line);
+ if (fileCp == CP_UTF8)
+ Utf8DecodeCP(E->local + iOldLenA + 1, langPack.defaultANSICp, NULL);
+ {
+ int iNeeded = MultiByteToWideChar(fileCp, 0, line, -1, 0, 0);
+ size_t iOldLen = wcslen(E->wlocal);
+ E->wlocal = (wchar_t*)realloc(E->wlocal, ( sizeof(wchar_t) * ( iOldLen + iNeeded + 2)));
+ wcscat(E->wlocal, L"\n");
+ MultiByteToWideChar(fileCp, 0, line, -1, E->wlocal + iOldLen+1, iNeeded);
+ }
+ }
+ }
+ }
+ fclose(fp);
+
+ qsort(langPack.entry,langPack.entryCount,sizeof(LangPackEntry),(int(*)(const void*,const void*))SortLangPackHashesProc);
+
+ return 0;
+}
+
+char *LangPackTranslateString(const char *szEnglish, const int W)
+{
+ struct LangPackEntry key,*entry;
+
+ if ( langPack.entryCount == 0 || szEnglish == NULL ) return (char*)szEnglish;
+
+ key.englishHash = W ? hashstrW(szEnglish) : hashstr(szEnglish);
+ entry=(struct LangPackEntry*)bsearch(&key,langPack.entry,langPack.entryCount,sizeof(struct LangPackEntry),(int(*)(const void*,const void*))SortLangPackHashesProc2);
+ if(entry==NULL) return (char*)szEnglish;
+ while(entry>langPack.entry)
+ {
+ entry--;
+ if(entry->englishHash!=key.englishHash) {
+ entry++;
+ return W ? (char *)entry->wlocal : entry->local;
+ }
+ }
+ return W ? (char *)entry->wlocal : entry->local;
+}
+
+#if defined( _UNICODE )
+ #define FLAGS 1
+#else
+ #define FLAGS 0
+#endif
+
+static void TranslateWindow( HWND hwnd )
+{
+ TCHAR title[2048];
+ GetWindowText(hwnd, title, SIZEOF( title ));
+ {
+ TCHAR* result = ( TCHAR* )LangPackTranslateString(( char* )title, FLAGS );
+ if ( result != title )
+ SetWindowText(hwnd, result );
+} }
+
+static BOOL CALLBACK TranslateDialogEnumProc(HWND hwnd,LPARAM lParam)
+{
+ TCHAR szClass[32];
+ int id = GetDlgCtrlID( hwnd );
+
+ GetClassName(hwnd,szClass,SIZEOF(szClass));
+ if(!lstrcmpi(szClass,_T("static")) || !lstrcmpi(szClass,_T("hyperlink")) || !lstrcmpi(szClass,_T("button")) || !lstrcmpi(szClass,_T("MButtonClass")))
+ TranslateWindow(hwnd);
+ else if(!lstrcmpi(szClass,_T("edit"))) {
+ if ( GetWindowLong(hwnd,GWL_STYLE)&ES_READONLY)
+ TranslateWindow(hwnd);
+ }
+ return TRUE;
+}
+
+int TranslateDialog( HWND hwndDlg )
+{
+ TranslateWindow( hwndDlg );
+ EnumChildWindows( hwndDlg,TranslateDialogEnumProc,0);
+ return 0;
+}
+
+void LoadLangPackModule(void)
+{
+ HANDLE hFind;
+ TCHAR szSearch[MAX_PATH], *str2, szLangPack[MAX_PATH];
+ WIN32_FIND_DATA fd;
+
+ GetModuleFileName(GetModuleHandle(NULL),szSearch,MAX_PATH);
+ str2 = _tcsrchr(szSearch, '\\');
+ if (str2) *str2 = 0; else str2 = szSearch;
+ _tcscat(szSearch, _T("\\langpack_*.txt"));
+ hFind = FindFirstFile(szSearch, &fd);
+ if (hFind != INVALID_HANDLE_VALUE)
+ {
+ FindClose(hFind);
+
+ _tcscpy(str2 + 1, fd.cFileName);
+ _tcscpy(szLangPack, szSearch);
+ LoadLangPack(szLangPack);
+ }
+}
+
+void UnloadLangPackModule(void)
+{
+ for (int i = 0; i < langPack.entryCount; i++) {
+ free(langPack.entry[i].english);
+ free(langPack.entry[i].local);
+ free(langPack.entry[i].wlocal);
+ }
+ if (langPack.entryCount) {
+ free(langPack.entry);
+ langPack.entry=0;
+ langPack.entryCount=0;
+ }
+}
+
diff --git a/tools/dbtool/langpack_dbtool.txt b/tools/dbtool/langpack_dbtool.txt new file mode 100644 index 0000000000..05ad39086c --- /dev/null +++ b/tools/dbtool/langpack_dbtool.txt @@ -0,0 +1,157 @@ +Miranda Language Pack Version 1
+Language: Chinese (Traditional)
+Locale: 0404
+Last-Modified-Using: Miranda IM 0.6.0
+Authors: Stark Wong
+Author-email: starkwong@hotmail.com
+Plugins-included:
+
+; Generated on Jan 17 2007 11:12:35 China Standard Time (CST/GMT+8)
+
+; /dbtool/aggressive.cpp
+[Performing aggressive pass]
+[Aggressive: random junk at %08X: skipping]
+[Aggressive: unlinked data at %08X: can't automatically place]
+
+; /dbtool/contactchain.cpp
+[Contact count marked wrongly: correcting]
+[Processing contact chain]
+[Contact chain corrupted, further entries ignored]
+
+; /dbtool/disk.cpp
+[Invalid offset found]
+[Error reading, database truncated? (%u)]
+[Can't write to working file, aggressive mode may be too aggressive now (%u)]
+[Can't write to output file - disk full? (%u)]
+
+; /dbtool/eventchain.cpp
+[Event count marked wrongly: correcting]
+[Event chain corrupted, trying to recover...]
+[Event chain corrupted, further entries ignored]
+[First event not marked as such: correcting]
+[Event marked as first which is not: correcting]
+[Extra flags found in event: removing]
+[First unread event marked wrong: fixing]
+[Infeasibly large event blob: skipping]
+[Event not backlinked correctly: fixing]
+[Duplicate event was found: skipping]
+[Event position in chain is not correct]
+[Event position in chain is not correct: fixing]
+[Event position in chain is not correct: unable to fix]
+
+; /dbtool/finaltasks.cpp
+[Processing final tasks]
+[Unable to delete aggressive working file]
+[Errors were encountered, however you selected not to backup the original database. It is strongly recommended that you do so in case important data was omitted. Do you wish to keep a backup of the original database?]
+[Miranda Database Tool]
+[%s\\Backup of %s]
+[%s\\Backup (%d) of %s]
+[Unable to rename original file]
+[Unable to delete original file]
+[Unable to rename output file]
+
+; /dbtool/finished.cpp
+[&Finish]
+
+; /dbtool/initialchecks.cpp
+[Database is newly created and has no data to process]
+[Processing completed successfully]
+[Database is corrupted and too small to contain any recoverable data]
+[Database signature is corrupted, automatic repair is impossible]
+[Database is marked as belonging to an unknown version of Miranda]
+[<check only>]
+[(Output).dat]
+[Can't create output file (%u)]
+[Can't create file mapping (%u)]
+[Can't create map view of file (%u)]
+
+; /dbtool/modulechain.cpp
+[Processing module name chain]
+[Module chain corrupted, further entries ignored]
+[Unreasonably long module name, skipping]
+[Module name '%s' is not unique: %d duplicates found)]
+[Invalid module name offset, skipping data]
+
+; /dbtool/progress.cpp
+[Click Next to continue]
+[Processing has not yet completed, if you cancel now then the changes that have currently been made will be rolled back and the original database will be restored. Do you still want to cancel?]
+[Processing has not yet completed, if you go back now then the changes that have currently been made will be rolled back and the original database will be restored. Do you still want to go back?]
+
+; /dbtool/resource.rc:IDD_WELCOME
+[Static]
+[Welcome to the Miranda Database Wizard]
+[Using this Wizard you can compact your Miranda profile database to remove dead space created during normal usage, as well as repair a large number of issues that could affect the database.]
+[To continue, click Next.]
+[This programme is licenced under the terms of the GNU General Public License.]
+
+; /dbtool/resource.rc:IDD_WIZARD
+[< &Back]
+[&Next >]
+[Cancel]
+
+; /dbtool/resource.rc:IDD_SELECTDB
+[Select Miranda Profile]
+[You can choose the Miranda profile database to compact or repair.]
+[Select the &profile database from the list below. If the database you wish to use is not listed here then click Other to browse your computer.]
+[&File:]
+[&Other...]
+
+; /dbtool/resource.rc:IDD_OPENERROR
+[Error Opening Database]
+[There was an error opening the profile database given.]
+[Click Next to try opening the file again, or click Back to select a new profile database to manipulate.]
+[The file may be in use by a currently running copy of Miranda. Exit any running Mirandas and click Next to retry.]
+
+; /dbtool/resource.rc:IDD_FILEACCESS
+[File Access Options]
+[You can select low level options to determine how the database is processed.]
+[Create backup]
+[Creates a backup copy of the database before any of the requested changes are made.]
+[Aggressively find corruption]
+[Scans the database for data that is not linked to any other data. This requires more disk space and more time, so is only required if you suspect corruption.]
+[Check consistency only]
+[Just checks that the database is valid, without writing anything to the disk.]
+
+; /dbtool/resource.rc:IDD_CLEANING
+[Cleaning Options]
+[You can choose to remove information from the database while it is being processed.]
+[Erase all histories]
+[Removes all the saved history for all contacts in the database.]
+[Mark all events read]
+[Marks all the history events as read. This will rectify any problems with old messages always appearing in the message window log box.]
+
+; /dbtool/resource.rc:IDD_PROGRESS
+[Working...]
+[Please wait while the requested operations are being performed.]
+
+; /dbtool/resource.rc:IDD_FINISHED
+[Finished!]
+[All tasks have been completed.]
+[Launch Miranda with this profile]
+[Launches Miranda with the profile that was just worked on.]
+[Backup:]
+[The processing of the database has been completed. Click Next to return to the start of the wizard to select another database to check, or click Finish to exit the wizard.]
+
+; /dbtool/selectdb.cpp
+[Database]
+[Total size]
+[Wasted]
+[Miranda Databases (*.dat)]
+[All Files]
+
+; /dbtool/settingschain.cpp
+[Settings chain corrupted, further entries ignored]
+[Infeasibly large settings blob: skipping]
+[Empty settings group at %08X: skipping]
+
+; /dbtool/user.cpp
+[Processing user data]
+[User corrupted, this could cause major problems]
+[More than one user contact: keeping only first]
+
+; /dbtool/worker.cpp
+[Database worker thread activated]
+[Processing aborted by user]
+[Elapsed time: %d sec]
+[All tasks completed but with errors (%d)]
+[All tasks completed successfully]
diff --git a/tools/dbtool/main.cpp b/tools/dbtool/main.cpp new file mode 100644 index 0000000000..014881e34d --- /dev/null +++ b/tools/dbtool/main.cpp @@ -0,0 +1,32 @@ +/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+HINSTANCE hInst;
+
+DbToolOptions opts = {0};
+
+int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
+{
+ hInst=hInstance;
+ LoadLangPackModule();
+ InitCommonControls();
+ DialogBox(hInst,MAKEINTRESOURCE(IDD_WIZARD),NULL,WizardDlgProc);
+ return 0;
+}
diff --git a/tools/dbtool/modulechain.cpp b/tools/dbtool/modulechain.cpp new file mode 100644 index 0000000000..515ec9bfbd --- /dev/null +++ b/tools/dbtool/modulechain.cpp @@ -0,0 +1,148 @@ +/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+struct ModChainEntry {
+ DWORD ofsOld,ofsNew;
+ int size;
+ char name[257];
+} static *modChain=NULL;
+static int modChainCount;
+static DWORD ofsCurrent;
+static int phase,iCurrentModName;
+static DWORD ofsLast;
+static int last_mod = 0;
+
+int WorkModuleChain(int firstTime)
+{
+ DBModuleName moduleName,*newModName;
+
+ if(firstTime) {
+ AddToStatus(STATUS_MESSAGE,TranslateT("Processing module name chain"));
+ modChainCount=0;
+ last_mod = 0;
+ if(modChain!=NULL) free(modChain);
+ modChain = (ModChainEntry*)malloc(sizeof(ModChainEntry));
+ phase=0;
+ ofsCurrent=dbhdr.ofsFirstModuleName;
+ }
+ switch(phase) {
+ case 0:
+ if(ofsCurrent==0) {
+ phase++;
+ return ERROR_SUCCESS;
+ }
+ if(!SignatureValid(ofsCurrent,DBMODULENAME_SIGNATURE)) {
+ AddToStatus(STATUS_ERROR,TranslateT("Module chain corrupted, further entries ignored"));
+ phase++;
+ return ERROR_SUCCESS;
+ }
+ if(PeekSegment(ofsCurrent,&moduleName,offsetof(DBModuleName,name))!=ERROR_SUCCESS) {
+ phase++;
+ return ERROR_SUCCESS;
+ }
+ if(moduleName.cbName>256)
+ AddToStatus(STATUS_WARNING,TranslateT("Unreasonably long module name, skipping"));
+ else {
+ modChain=(ModChainEntry*)realloc(modChain,sizeof(ModChainEntry)*++modChainCount);
+
+ modChain[modChainCount-1].ofsOld=ofsCurrent;
+ modChain[modChainCount-1].size=offsetof(DBModuleName,name)+moduleName.cbName;
+ modChain[modChainCount-1].ofsNew=0;
+
+ if (moduleName.cbName)
+ PeekSegment(ofsCurrent+offsetof(DBModuleName,name),&modChain[modChainCount-1].name,moduleName.cbName);
+ modChain[modChainCount-1].name[moduleName.cbName]=0;
+ }
+ ofsCurrent=moduleName.ofsNext;
+ break;
+ case 1:
+ ofsLast = 0;
+ iCurrentModName=0;
+ dbhdr.ofsFirstModuleName=0;
+ phase++;
+ case 2:
+ if(iCurrentModName>=modChainCount) {
+ DWORD dw = 0;
+ if(ofsLast) WriteSegment(ofsLast+offsetof(DBModuleName,ofsNext),&dw,sizeof(DWORD));
+ return ERROR_NO_MORE_ITEMS;
+ }
+ if(modChain[iCurrentModName].ofsNew==0) {
+ newModName=(DBModuleName*)_alloca(modChain[iCurrentModName].size);
+ if(ReadSegment(modChain[iCurrentModName].ofsOld,newModName,modChain[iCurrentModName].size)!=ERROR_SUCCESS)
+ return ERROR_NO_MORE_ITEMS;
+ if((modChain[iCurrentModName].ofsNew=WriteSegment(WSOFS_END,newModName,modChain[iCurrentModName].size))==WS_ERROR)
+ return ERROR_HANDLE_DISK_FULL;
+ { // check duplicated modulenames
+ int i, n=0;
+ for(i=iCurrentModName+1;i<modChainCount;i++)
+ if(!strcmp(modChain[i].name, modChain[iCurrentModName].name)) {
+ modChain[i].ofsNew = modChain[iCurrentModName].ofsNew;
+ n++;
+ }
+ if (n) {
+ TCHAR *pszModuleName;
+#ifdef UNICODE
+ TCHAR szModuleName[257];
+ MultiByteToWideChar(CP_ACP, 0, modChain[iCurrentModName].name, -1, szModuleName, sizeof(szModuleName) / sizeof(TCHAR));
+ pszModuleName = szModuleName;
+#else
+ pszModuleName = modChain[iCurrentModName].name;
+#endif
+ AddToStatus(STATUS_WARNING,TranslateT("Module name '%s' is not unique: %d duplicates found)"), pszModuleName, n);
+ }
+ }
+ if(iCurrentModName==0)
+ dbhdr.ofsFirstModuleName=modChain[iCurrentModName].ofsNew;
+ else
+ if(WriteSegment(ofsLast+offsetof(DBModuleName,ofsNext),&modChain[iCurrentModName].ofsNew,sizeof(DWORD))==WS_ERROR)
+ return ERROR_HANDLE_DISK_FULL;
+ ofsLast = modChain[iCurrentModName].ofsNew;
+ }
+ iCurrentModName++;
+ break;
+ }
+ return ERROR_SUCCESS;
+}
+
+DWORD ConvertModuleNameOfs(DWORD ofsOld)
+{
+ int i;
+
+ if ( modChain[last_mod].ofsOld==ofsOld )
+ return modChain[last_mod].ofsNew;
+
+ for(i=0;i<modChainCount;i++)
+ if(modChain[i].ofsOld==ofsOld) {
+ last_mod = i;
+ return modChain[last_mod].ofsNew;
+ }
+
+ AddToStatus(STATUS_ERROR,TranslateT("Invalid module name offset, skipping data"));
+ return 0;
+}
+
+void FreeModuleChain()
+{
+ if(modChain!=NULL) {
+ free(modChain);
+ modChain = NULL;
+ last_mod = 0;
+ }
+}
diff --git a/tools/dbtool/openerror.cpp b/tools/dbtool/openerror.cpp new file mode 100644 index 0000000000..4938e69197 --- /dev/null +++ b/tools/dbtool/openerror.cpp @@ -0,0 +1,55 @@ +/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+INT_PTR CALLBACK OpenErrorDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ INT_PTR bReturn;
+
+ if(DoMyControlProcessing(hdlg,message,wParam,lParam,&bReturn)) return bReturn;
+ switch(message) {
+ case WM_INITDIALOG:
+ { TCHAR szError[256];
+ FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,NULL,opts.error,0,szError,SIZEOF(szError),NULL);
+ SetDlgItemText(hdlg,IDC_ERRORTEXT,szError);
+ }
+ if(opts.error==ERROR_SHARING_VIOLATION) ShowWindow(GetDlgItem(hdlg,IDC_INUSE),SW_SHOW);
+ SetWindowLong( GetDlgItem( hdlg, IDC_FILE ), GWL_STYLE, GetWindowLong( GetDlgItem( hdlg, IDC_FILE ), GWL_STYLE ) | SS_PATHELLIPSIS );
+ TranslateDialog( hdlg );
+ SetDlgItemText( hdlg, IDC_FILE, opts.filename );
+ return TRUE;
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDC_BACK:
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_SELECTDB,(LPARAM)SelectDbDlgProc);
+ break;
+ case IDOK:
+ opts.hFile = CreateFile( opts.filename, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL );
+ if ( opts.hFile == INVALID_HANDLE_VALUE ) {
+ opts.hFile = NULL;
+ opts.error = GetLastError();
+ SendMessage( GetParent( hdlg ), WZM_GOTOPAGE, IDD_OPENERROR, ( LPARAM )OpenErrorDlgProc );
+ }
+ else SendMessage( GetParent( hdlg ), WZM_GOTOPAGE, IDD_FILEACCESS, ( LPARAM )FileAccessDlgProc );
+ break;
+ }
+ break;
+ }
+ return FALSE;
+}
diff --git a/tools/dbtool/progress.cpp b/tools/dbtool/progress.cpp new file mode 100644 index 0000000000..4b7d7979b4 --- /dev/null +++ b/tools/dbtool/progress.cpp @@ -0,0 +1,213 @@ +/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+#define WM_PROCESSINGDONE (WM_USER+1)
+
+void __cdecl WorkerThread(void *unused);
+static HWND hwndStatus,hdlgProgress,hwndBar;
+HANDLE hEventRun = NULL, hEventAbort = NULL;
+int errorCount;
+
+int AddToStatus(DWORD flags, TCHAR* fmt,...)
+{
+ va_list vararg;
+ TCHAR str[256];
+ int i,ret;
+
+ va_start(vararg,fmt);
+ ret=_vsntprintf(str,SIZEOF(str),fmt,vararg);
+ va_end(vararg);
+ i=SendMessage(hwndStatus,LB_ADDSTRING,0,(LPARAM)str);
+ SendMessage(hwndStatus,LB_SETITEMDATA,i,flags);
+ InvalidateRect(hwndStatus,NULL,FALSE);
+ SendMessage(hwndStatus,LB_SETTOPINDEX,i,0);
+#ifdef _DEBUG
+ OutputDebugString(str);
+ OutputDebugStringA("\n");
+#endif
+ if((flags&STATUS_CLASSMASK)==STATUS_ERROR) errorCount++;
+ return ret;
+}
+
+void SetProgressBar(int perThou)
+{
+ SendMessage(hwndBar,PBM_SETPOS,perThou,0);
+}
+
+void ProcessingDone(void)
+{
+ if (opts.pFile) {
+ UnmapViewOfFile(opts.pFile);
+ opts.pFile = NULL;
+ }
+ if (opts.hMap) {
+ CloseHandle(opts.hMap);
+ opts.hMap = NULL;
+ }
+ SendMessage(hdlgProgress,WM_PROCESSINGDONE,0,0);
+}
+
+INT_PTR CALLBACK ProgressDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ INT_PTR bReturn;
+ static int fontHeight,listWidth;
+ static int manualAbort;
+ static HFONT hBoldFont = NULL;
+
+ if(DoMyControlProcessing(hdlg,message,wParam,lParam,&bReturn)) return bReturn;
+ switch(message) {
+ case WM_INITDIALOG:
+ EnableWindow(GetDlgItem(GetParent(hdlg),IDOK),FALSE);
+ hdlgProgress=hdlg;
+ hwndStatus=GetDlgItem(hdlg,IDC_STATUS);
+ errorCount=0;
+ hwndBar=GetDlgItem(hdlg,IDC_PROGRESS);
+ SendMessage(hwndBar,PBM_SETRANGE,0,MAKELPARAM(0,1000));
+ { HDC hdc;
+ HFONT hFont,hoFont;
+ SIZE s;
+ hdc=GetDC(NULL);
+ hFont=(HFONT)SendMessage(hdlg,WM_GETFONT,0,0);
+ hoFont=(HFONT)SelectObject(hdc,hFont);
+ GetTextExtentPoint32(hdc,_T("x"),1,&s);
+ SelectObject(hdc,hoFont);
+ ReleaseDC(NULL,hdc);
+ fontHeight=s.cy;
+ }
+ { RECT rc;
+ GetClientRect(GetDlgItem(hdlg,IDC_STATUS),&rc);
+ listWidth=rc.right;
+ }
+ {
+ LOGFONT lf;
+ GetObject((HFONT)SendDlgItemMessage(hdlg,IDC_STATUS,WM_GETFONT,0,0),sizeof(lf),&lf);
+ lf.lfWeight=FW_BOLD;
+ hBoldFont=CreateFontIndirect(&lf);
+ }
+ manualAbort=0;
+ hEventRun=CreateEvent(NULL,TRUE,TRUE,NULL);
+ hEventAbort=CreateEvent(NULL,TRUE,FALSE,NULL);
+ TranslateDialog(hdlg);
+ _beginthread(WorkerThread,0,NULL);
+ return TRUE;
+ case WM_MEASUREITEM:
+ { LPMEASUREITEMSTRUCT mis=(LPMEASUREITEMSTRUCT)lParam;
+ mis->itemWidth=listWidth;
+ mis->itemHeight=fontHeight;
+ return TRUE;
+ }
+ case WM_DRAWITEM:
+ { LPDRAWITEMSTRUCT dis=(LPDRAWITEMSTRUCT)lParam;
+ TCHAR str[256];
+ int bold=0;
+ HFONT hoFont;
+ if((int)dis->itemID==-1) break;
+ SendMessage(dis->hwndItem,LB_GETTEXT,dis->itemID,(LPARAM)str);
+ switch(dis->itemData&STATUS_CLASSMASK) {
+ case STATUS_MESSAGE:
+ SetTextColor(dis->hDC,RGB(0,0,0));
+ break;
+ case STATUS_WARNING:
+ SetTextColor(dis->hDC,RGB(192,128,0));
+ break;
+ case STATUS_ERROR:
+ SetTextColor(dis->hDC,RGB(192,0,0));
+ break;
+ case STATUS_FATAL:
+ bold=1;
+ SetTextColor(dis->hDC,RGB(192,0,0));
+ break;
+ case STATUS_SUCCESS:
+ bold=1;
+ SetTextColor(dis->hDC,RGB(0,192,0));
+ break;
+ }
+ if(bold) hoFont=(HFONT)SelectObject(dis->hDC,hBoldFont);
+ ExtTextOut(dis->hDC,dis->rcItem.left,dis->rcItem.top,ETO_CLIPPED|ETO_OPAQUE,&dis->rcItem,str,(UINT)_tcslen(str),NULL);
+ if(bold) SelectObject(dis->hDC,hoFont);
+ return TRUE;
+ }
+ case WM_PROCESSINGDONE:
+ SetProgressBar(1000);
+ EnableWindow(GetDlgItem(GetParent(hdlg),IDOK),TRUE);
+ if(manualAbort==1)
+ EndDialog(GetParent(hdlg),0);
+ else if(manualAbort==2) {
+ if(opts.bCheckOnly)
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_FILEACCESS,(LPARAM)FileAccessDlgProc);
+ else {
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_CLEANING,(LPARAM)CleaningDlgProc);
+ CloseHandle(opts.hOutFile);
+ opts.hOutFile = NULL;
+ }
+ break;
+ }
+ AddToStatus(STATUS_SUCCESS,TranslateT("Click Next to continue"));
+ break;
+ case WZN_CANCELCLICKED:
+ ResetEvent(hEventRun);
+ if(IsWindowEnabled(GetDlgItem(GetParent(hdlg),IDOK))) break;
+ if(MessageBox(hdlg,TranslateT("Processing has not yet completed, if you cancel now then the changes that have currently been made will be rolled back and the original database will be restored. Do you still want to cancel?"),TranslateT("Miranda Database Tool"),MB_YESNO)==IDYES) {
+ manualAbort=1;
+ SetEvent(hEventAbort);
+ }
+ SetEvent(hEventRun);
+ SetWindowLongPtr(hdlg,DWLP_MSGRESULT,TRUE);
+ return TRUE;
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDC_BACK:
+ ResetEvent(hEventRun);
+ if(!IsWindowEnabled(GetDlgItem(GetParent(hdlg),IDOK))) {
+ if(MessageBox(hdlg,TranslateT("Processing has not yet completed, if you go back now then the changes that have currently been made will be rolled back and the original database will be restored. Do you still want to go back?"),TranslateT("Miranda Database Tool"),MB_YESNO)==IDYES) {
+ manualAbort=2;
+ SetEvent(hEventAbort);
+ }
+ SetEvent(hEventRun);
+ break;
+ }
+ SetEvent(hEventRun);
+ if(opts.bCheckOnly)
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_FILEACCESS,(LPARAM)FileAccessDlgProc);
+ else
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_CLEANING,(LPARAM)CleaningDlgProc);
+ break;
+ case IDOK:
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_FINISHED,(LPARAM)FinishedDlgProc);
+ break;
+ }
+ break;
+ case WM_DESTROY:
+ if (hEventAbort) {
+ CloseHandle(hEventAbort);
+ hEventAbort = NULL;
+ }
+ if (hEventRun) {
+ CloseHandle(hEventRun);
+ hEventRun = NULL;
+ }
+ if (hBoldFont) {
+ DeleteObject(hBoldFont);
+ hBoldFont = NULL;
+ }
+ break;
+ }
+ return FALSE;
+}
diff --git a/tools/dbtool/res/dbthdr.emf b/tools/dbtool/res/dbthdr.emf Binary files differnew file mode 100644 index 0000000000..554d11b5ea --- /dev/null +++ b/tools/dbtool/res/dbthdr.emf diff --git a/tools/dbtool/res/dbtool.cdr b/tools/dbtool/res/dbtool.cdr Binary files differnew file mode 100644 index 0000000000..e5aef201be --- /dev/null +++ b/tools/dbtool/res/dbtool.cdr diff --git a/tools/dbtool/res/dbtool.emf b/tools/dbtool/res/dbtool.emf Binary files differnew file mode 100644 index 0000000000..abce0632ee --- /dev/null +++ b/tools/dbtool/res/dbtool.emf diff --git a/tools/dbtool/res/dbtool.ico b/tools/dbtool/res/dbtool.ico Binary files differnew file mode 100644 index 0000000000..e10cf950ad --- /dev/null +++ b/tools/dbtool/res/dbtool.ico diff --git a/tools/dbtool/res/delete.ico b/tools/dbtool/res/delete.ico Binary files differnew file mode 100644 index 0000000000..6e39da592b --- /dev/null +++ b/tools/dbtool/res/delete.ico diff --git a/tools/dbtool/res/profileg.ico b/tools/dbtool/res/profileg.ico Binary files differnew file mode 100644 index 0000000000..1cd1caa5e4 --- /dev/null +++ b/tools/dbtool/res/profileg.ico diff --git a/tools/dbtool/res/profiler.ico b/tools/dbtool/res/profiler.ico Binary files differnew file mode 100644 index 0000000000..2dc702c863 --- /dev/null +++ b/tools/dbtool/res/profiler.ico diff --git a/tools/dbtool/res/profiley.ico b/tools/dbtool/res/profiley.ico Binary files differnew file mode 100644 index 0000000000..d482ee47ad --- /dev/null +++ b/tools/dbtool/res/profiley.ico diff --git a/tools/dbtool/resource.h b/tools/dbtool/resource.h new file mode 100644 index 0000000000..a76f82ee1c --- /dev/null +++ b/tools/dbtool/resource.h @@ -0,0 +1,54 @@ +//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by resource.rc
+//
+#define IDC_BACK 3
+#define IDD_WIZARD 101
+#define IDE_WATERMARK 102
+#define IDI_DBTOOL 102
+#define IDE_HDRLOGO 103
+#define IDI_PROFILEGREEN 104
+#define IDR_DEFAULT1 104
+#define IDI_PROFILEYELLOW 105
+#define IDD_WELCOME 106
+#define IDI_PROFILERED 106
+#define IDD_SELECTDB 107
+#define IDD_OPENERROR 108
+#define IDD_FILEACCESS 109
+#define IDD_CLEANING 110
+#define IDD_PROGRESS 111
+#define IDD_FINISHED 112
+#define IDI_BAD 113
+#define IDC_WATERMARK 1000
+#define IDC_TITLE 1001
+#define IDC_HDRLOGO 1002
+#define IDC_DBLIST 1003
+#define IDC_FILE 1004
+#define IDC_OTHER 1005
+#define IDC_ERRORTEXT 1006
+#define IDC_INUSE 1007
+#define IDC_BACKUP 1008
+#define IDC_AGGRESSIVE 1009
+#define IDC_ERASEHISTORY 1010
+#define IDC_CHECKONLY 1010
+#define IDC_MARKREAD 1011
+#define IDC_PROGRESS 1011
+#define IDC_STATUS 1012
+#define IDC_STBACKUP 1013
+#define IDC_LAUNCHMIRANDA 1015
+#define IDC_DBFILE 1016
+#define IDC_BACKUPFILE 1017
+#define IDC_CHECK1 1018
+#define IDC_CONVERTUTF 1018
+#define IDC_STATIC -1
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 105
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1019
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/tools/dbtool/resource.rc b/tools/dbtool/resource.rc new file mode 100644 index 0000000000..cd3d6eec3c --- /dev/null +++ b/tools/dbtool/resource.rc @@ -0,0 +1,316 @@ +// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include <windows.h>
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Neutral resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
+#ifdef _WIN32
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// RT_MANIFEST
+//
+
+1 RT_MANIFEST "dbtool.exe.manifest"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_WELCOME DIALOGEX 0, 0, 262, 143
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ CONTROL "",IDC_WATERMARK,"Static",SS_ENHMETAFILE,0,0,63,143
+ LTEXT "whiterect",IDC_STATIC,63,0,199,143
+ LTEXT "Welcome to the Miranda Database Wizard",IDC_TITLE,77,12,178,24,0,WS_EX_TRANSPARENT
+ LTEXT "Using this Wizard you can compact your Miranda profile database to remove dead space created during normal usage, as well as repair a large number of issues that could affect the database.",IDC_STATIC,77,46,178,32,0,WS_EX_TRANSPARENT
+ LTEXT "To continue, click Next.",IDC_STATIC,77,85,178,8,0,WS_EX_TRANSPARENT
+ LTEXT "This programme is licenced under the terms of the GNU General Public License.",IDC_STATIC,77,122,178,16,WS_DISABLED
+END
+
+IDD_WIZARD DIALOGEX 0, 0, 262, 174
+STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_CONTROLPARENT
+CAPTION "Miranda Database Tool"
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ PUSHBUTTON "< &Back",IDC_BACK,96,153,50,14
+ DEFPUSHBUTTON "&Next >",IDOK,146,153,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,205,153,50,14
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,-5,143,269,1
+END
+
+IDD_SELECTDB DIALOGEX 0, 0, 262, 143
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "whiterect",IDC_STATIC,0,0,262,32
+ LTEXT "Select Miranda Profile",IDC_STATIC,11,6,206,8,WS_BORDER
+ CONTROL "",IDC_HDRLOGO,"Static",SS_ENHMETAFILE,234,3,25,25
+ LTEXT "You can choose the Miranda profile database to compact or repair.",IDC_STATIC,20,14,197,16
+ LTEXT "Select the &profile database from the list below. If the database you wish to use is not listed here then click Other to browse your computer.",IDC_STATIC,10,35,242,16
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,-1,32,264,1
+ CONTROL "List1",IDC_DBLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_AUTOARRANGE | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,10,53,242,72
+ LTEXT "&File:",IDC_STATIC,10,130,12,8
+ EDITTEXT IDC_FILE,24,128,184,12,ES_AUTOHSCROLL
+ PUSHBUTTON "&Other...",IDC_OTHER,212,128,40,12
+END
+
+IDD_OPENERROR DIALOGEX 0, 0, 262, 143
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "whiterect",IDC_STATIC,0,0,262,32
+ LTEXT "Error Opening Database",IDC_STATIC,11,6,206,8,WS_BORDER
+ CONTROL "",IDC_HDRLOGO,"Static",SS_ENHMETAFILE,234,3,25,25
+ LTEXT "There was an error opening the profile database given.",IDC_STATIC,20,14,197,16
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,-1,32,264,1
+ LTEXT "",IDC_ERRORTEXT,23,38,226,16,SS_NOPREFIX | WS_BORDER
+ LTEXT "Click Next to try opening the file again, or click Back to select a new profile database to manipulate.",IDC_STATIC,23,67,226,16
+ LTEXT "The file may be in use by a currently running copy of Miranda. Exit any running Mirandas and click Next to retry.",IDC_INUSE,23,87,226,16,NOT WS_VISIBLE
+ LTEXT "",IDC_FILE,23,57,226,8,SS_NOPREFIX
+END
+
+IDD_FILEACCESS DIALOGEX 0, 0, 262, 143
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "whiterect",IDC_STATIC,0,0,262,32
+ LTEXT "File Access Options",IDC_STATIC,11,6,206,8,WS_BORDER
+ CONTROL "",IDC_HDRLOGO,"Static",SS_ENHMETAFILE,234,3,25,25
+ LTEXT "You can select low level options to determine how the database is processed.",IDC_STATIC,20,14,197,16
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,-1,32,264,1
+ CONTROL "Create backup",IDC_BACKUP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,69,226,10,WS_EX_CLIENTEDGE
+ LTEXT "Creates a backup copy of the database before any of the requested changes are made.",IDC_STBACKUP,37,80,212,16
+ CONTROL "Aggressively find corruption",IDC_AGGRESSIVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,100,226,10,WS_EX_CLIENTEDGE
+ LTEXT "Scans the database for data that is not linked to any other data. This requires more disk space and more time, so is only required if you suspect corruption.",IDC_STATIC,37,111,212,24
+ CONTROL "Check consistency only",IDC_CHECKONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,38,226,10,WS_EX_CLIENTEDGE
+ LTEXT "Just checks that the database is valid, without writing anything to the disk.",IDC_STATIC,37,49,212,16
+END
+
+IDD_CLEANING DIALOGEX 0, 0, 262, 143
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "whiterect",IDC_STATIC,0,0,262,32
+ LTEXT "Cleaning Options",IDC_STATIC,11,6,206,8,WS_BORDER
+ CONTROL "",IDC_HDRLOGO,"Static",SS_ENHMETAFILE,234,3,25,25
+ LTEXT "You can choose to remove information from the database while it is being processed.",IDC_STATIC,20,14,197,16
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,-1,32,264,1
+ CONTROL "Erase all histories",IDC_ERASEHISTORY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,38,226,10,WS_EX_CLIENTEDGE
+ LTEXT "Removes all the saved history for all contacts in the database.",IDC_STATIC,37,49,212,8
+ CONTROL "Mark all events read",IDC_MARKREAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,62,226,10,WS_EX_CLIENTEDGE
+ LTEXT "Marks all the history events as read. This will rectify any problems with old messages always appearing in the message window log box.",IDC_STATIC,37,73,212,24
+ CONTROL "Convert old Unicode messages to UTF8",IDC_CONVERTUTF,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,101,226,10,WS_EX_CLIENTEDGE
+ LTEXT "Converts history messages in pre-0.7 format (ANSI+UCS2) to the new UTF8 format supported by 0.7. Saves the database space in most cases (recommended).",IDC_STATIC,37,111,212,25
+END
+
+IDD_PROGRESS DIALOGEX 0, 0, 262, 143
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "whiterect",-1,0,0,262,32
+ LTEXT "Working...",-1,11,6,206,8,WS_BORDER
+ CONTROL "",IDC_HDRLOGO,"Static",SS_ENHMETAFILE,234,3,25,25
+ LTEXT "Please wait while the requested operations are being performed.",-1,20,14,197,16
+ CONTROL "",-1,"Static",SS_ETCHEDHORZ,-1,32,264,1
+ CONTROL "Progress1",IDC_PROGRESS,"msctls_progress32",PBS_SMOOTH | WS_BORDER,20,38,222,11
+ LISTBOX IDC_STATUS,20,52,222,84,NOT LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | LBS_NOSEL | WS_VSCROLL | WS_TABSTOP
+END
+
+IDD_FINISHED DIALOGEX 0, 0, 262, 143
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "whiterect",IDC_STATIC,0,0,262,32
+ LTEXT "Finished!",IDC_STATIC,11,6,206,8,WS_BORDER
+ CONTROL "",IDC_HDRLOGO,"Static",SS_ENHMETAFILE,234,3,25,25
+ LTEXT "All tasks have been completed.",IDC_STATIC,20,14,197,16
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,-1,32,264,1
+ CONTROL "Launch Miranda with this profile",IDC_LAUNCHMIRANDA,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,87,226,10,WS_EX_CLIENTEDGE
+ LTEXT "Launches Miranda with the profile that was just worked on.",IDC_STATIC,37,98,212,8
+ LTEXT "",IDC_DBFILE,23,68,226,8,SS_NOPREFIX | WS_BORDER
+ RTEXT "Backup:",IDC_STBACKUP,23,76,30,8
+ LTEXT "",IDC_BACKUPFILE,56,76,193,8,SS_NOPREFIX
+ LTEXT "The processing of the database has been completed. Click Next to return to the start of the wizard to select another database to check, or click Finish to exit the wizard.",IDC_STATIC,23,38,226,24
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_WELCOME, DIALOG
+ BEGIN
+ LEFTMARGIN, 5
+ RIGHTMARGIN, 255
+ VERTGUIDE, 77
+ TOPMARGIN, 5
+ BOTTOMMARGIN, 138
+ END
+
+ IDD_WIZARD, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 255
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 167
+ END
+
+ IDD_SELECTDB, DIALOG
+ BEGIN
+ LEFTMARGIN, 23
+ RIGHTMARGIN, 249
+ TOPMARGIN, 38
+ BOTTOMMARGIN, 136
+ END
+
+ IDD_OPENERROR, DIALOG
+ BEGIN
+ LEFTMARGIN, 23
+ RIGHTMARGIN, 249
+ TOPMARGIN, 38
+ BOTTOMMARGIN, 136
+ END
+
+ IDD_FILEACCESS, DIALOG
+ BEGIN
+ LEFTMARGIN, 23
+ RIGHTMARGIN, 249
+ VERTGUIDE, 37
+ TOPMARGIN, 38
+ BOTTOMMARGIN, 136
+ END
+
+ IDD_CLEANING, DIALOG
+ BEGIN
+ LEFTMARGIN, 23
+ RIGHTMARGIN, 249
+ VERTGUIDE, 37
+ TOPMARGIN, 38
+ BOTTOMMARGIN, 136
+ END
+
+ IDD_PROGRESS, DIALOG
+ BEGIN
+ LEFTMARGIN, 20
+ RIGHTMARGIN, 242
+ TOPMARGIN, 38
+ BOTTOMMARGIN, 136
+ END
+
+ IDD_FINISHED, DIALOG
+ BEGIN
+ LEFTMARGIN, 23
+ RIGHTMARGIN, 249
+ VERTGUIDE, 37
+ TOPMARGIN, 38
+ BOTTOMMARGIN, 136
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// EMF
+//
+
+IDE_WATERMARK EMF "res\\dbtool.emf"
+IDE_HDRLOGO EMF "res\\dbthdr.emf"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_DBTOOL ICON "res\\dbtool.ico"
+IDI_PROFILEGREEN ICON "res\\profileg.ico"
+IDI_PROFILEYELLOW ICON "res\\profiley.ico"
+IDI_PROFILERED ICON "res\\profiler.ico"
+IDI_BAD ICON "res\\delete.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 0,8,2,0
+ PRODUCTVERSION 0,8,2,0
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "080904b0"
+ BEGIN
+ VALUE "CompanyName", " "
+ VALUE "FileDescription", "Miranda IM Database Tool"
+ VALUE "FileVersion", "0.8.2.0"
+ VALUE "InternalName", "dbtool"
+ VALUE "LegalCopyright", "Copyright © 2001-2008 Richard Hughes, Bio"
+ VALUE "OriginalFilename", "dbtool.exe"
+ VALUE "ProductName", "Miranda Database Tool"
+ VALUE "ProductVersion", "0.8.2.0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x809, 1200
+ END
+END
+
+#endif // Neutral resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/tools/dbtool/selectdb.cpp b/tools/dbtool/selectdb.cpp new file mode 100644 index 0000000000..d8fa36ed75 --- /dev/null +++ b/tools/dbtool/selectdb.cpp @@ -0,0 +1,303 @@ +/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+void GetProfileDirectory(TCHAR* szMirandaDir, TCHAR* szPath, int cbPath)
+{
+ TCHAR szProfileDir[MAX_PATH], szExpandedProfileDir[MAX_PATH], szMirandaBootIni[MAX_PATH];
+
+ lstrcpy(szMirandaBootIni,szMirandaDir);
+ lstrcat(szMirandaBootIni,_T("\\mirandaboot.ini"));
+ GetPrivateProfileString(_T("Database"),_T("ProfileDir"),_T("./Profiles"),szProfileDir,SIZEOF(szProfileDir),szMirandaBootIni);
+ ExpandEnvironmentStrings(szProfileDir,szExpandedProfileDir,SIZEOF(szExpandedProfileDir));
+ _tchdir(szMirandaDir);
+ if(!_tfullpath(szPath,szExpandedProfileDir,cbPath))
+ lstrcpyn(szPath,szMirandaDir,cbPath);
+ if(szPath[lstrlen(szPath)-1]=='\\')
+ szPath[lstrlen(szPath)-1] = 0;
+}
+
+static int AddDatabaseToList(HWND hwndList, TCHAR* filename, TCHAR* dir)
+{
+ LV_ITEM lvi;
+ int iNewItem;
+ TCHAR szSize[20], *pName, *pDot, szName[MAX_PATH];
+ HANDLE hDbFile;
+ DBHeader dbhdr;
+ DWORD bytesRead;
+ DWORD totalSize,wasted=0;
+ int broken=0;
+
+ lvi.mask=LVIF_PARAM;
+ lvi.iSubItem=0;
+ for(lvi.iItem=ListView_GetItemCount(hwndList)-1;lvi.iItem>=0;lvi.iItem--) {
+ ListView_GetItem(hwndList,&lvi);
+ if( !_tcsicmp(( TCHAR* )lvi.lParam,filename)) return lvi.iItem;
+ }
+ hDbFile=CreateFile(filename,GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,0,NULL);
+ if ( hDbFile == INVALID_HANDLE_VALUE )
+ return -1;
+
+ ReadFile(hDbFile,&dbhdr,sizeof(dbhdr),&bytesRead,NULL);
+ totalSize=GetFileSize(hDbFile,NULL);
+
+ broken = (bytesRead<sizeof(dbhdr) || memcmp(dbhdr.signature,&dbSignature,sizeof(dbhdr.signature)));
+
+ if(!broken) {
+ wasted = dbhdr.slackSpace;
+ if (totalSize>dbhdr.ofsFileEnd)
+ wasted+=totalSize-dbhdr.ofsFileEnd;
+ }
+ CloseHandle(hDbFile);
+
+ pName = _tcsrchr(filename,'\\');
+ if ( pName == NULL )
+ pName = ( LPTSTR )filename;
+ else
+ pName++;
+ _tcscpy(szName,dir);
+ _tcscat(szName,pName);
+ pDot = _tcsrchr( szName, '.' );
+ if ( pDot != NULL && !_tcsicmp( pDot, _T(".dat")) )
+ *pDot=0;
+
+ lvi.iItem = 0;
+ lvi.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
+ lvi.iSubItem = 0;
+ lvi.lParam = ( LPARAM )_tcsdup(filename);
+ lvi.pszText = szName;
+ if (broken)
+ lvi.iImage = 3;
+ else if ( wasted < 1024*128 )
+ lvi.iImage = 0;
+ else if ( wasted < 1024*256 + (DWORD)(totalSize > 2*1024*1024 ) ? 256 * 1024 : 0 )
+ lvi.iImage=1;
+ else
+ lvi.iImage=2;
+
+ iNewItem = ListView_InsertItem(hwndList, &lvi );
+ _stprintf(szSize,_T("%.2lf MB"),totalSize/1048576.0);
+ ListView_SetItemText(hwndList,iNewItem,1,szSize);
+ if ( !broken ) {
+ _stprintf(szSize,_T("%.2lf MB"),wasted/1048576.0);
+ ListView_SetItemText(hwndList,iNewItem,2,szSize);
+ }
+ return iNewItem;
+}
+
+void FindAdd(HWND hdlg, TCHAR *szProfileDir, TCHAR *szPrefix)
+{
+ HANDLE hFind;
+ WIN32_FIND_DATA fd;
+ TCHAR szSearchPath[MAX_PATH],szFilename[MAX_PATH];
+
+ lstrcpy(szSearchPath,szProfileDir);
+ lstrcat(szSearchPath,_T("\\*.*"));
+
+ hFind=FindFirstFile(szSearchPath,&fd);
+ if (hFind!=INVALID_HANDLE_VALUE) {
+ do {
+ if ((fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && _tcscmp(fd.cFileName, _T(".")) && _tcscmp(fd.cFileName, _T(".."))) {
+ wsprintf(szFilename,_T("%s\\%s\\%s.dat"),szProfileDir,fd.cFileName,fd.cFileName);
+ if (_taccess(szFilename, 0) == 0)
+ AddDatabaseToList(GetDlgItem(hdlg,IDC_DBLIST),szFilename,szPrefix);
+ }
+ } while(FindNextFile(hFind,&fd));
+ FindClose(hFind);
+ }
+}
+
+TCHAR *addstring(TCHAR *str, TCHAR *add) {
+ _tcscpy(str,add);
+ return str + _tcslen(add) + 1;
+}
+
+INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ INT_PTR bReturn;
+ if ( DoMyControlProcessing( hdlg, message, wParam, lParam, &bReturn ))
+ return bReturn;
+
+ switch ( message ) {
+ case WM_INITDIALOG:
+ {
+ TCHAR szMirandaPath[MAX_PATH];
+ szMirandaPath[ 0 ] = 0;
+ { HIMAGELIST hIml;
+ hIml=ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON),
+ (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16) | ILC_MASK, 3, 3);
+ ImageList_AddIcon(hIml,LoadIcon(hInst,MAKEINTRESOURCE(IDI_PROFILEGREEN)));
+ ImageList_AddIcon(hIml,LoadIcon(hInst,MAKEINTRESOURCE(IDI_PROFILEYELLOW)));
+ ImageList_AddIcon(hIml,LoadIcon(hInst,MAKEINTRESOURCE(IDI_PROFILERED)));
+ ImageList_AddIcon(hIml,LoadIcon(hInst,MAKEINTRESOURCE(IDI_BAD)));
+ ListView_SetImageList(GetDlgItem(hdlg,IDC_DBLIST),hIml,LVSIL_SMALL);
+ }
+ ListView_SetExtendedListViewStyleEx(GetDlgItem(hdlg,IDC_DBLIST),LVS_EX_FULLROWSELECT,LVS_EX_FULLROWSELECT);
+ { LV_COLUMN lvc;
+ lvc.mask = LVCF_WIDTH | LVCF_FMT | LVCF_TEXT;
+ lvc.cx = 205;
+ lvc.fmt = LVCFMT_LEFT;
+ lvc.pszText = TranslateT("Database");
+ ListView_InsertColumn( GetDlgItem(hdlg,IDC_DBLIST), 0, &lvc );
+ lvc.cx = 68;
+ lvc.fmt = LVCFMT_RIGHT;
+ lvc.pszText = TranslateT("Total size");
+ ListView_InsertColumn(GetDlgItem(hdlg,IDC_DBLIST), 1, &lvc );
+ lvc.pszText = TranslateT("Wasted");
+ ListView_InsertColumn(GetDlgItem(hdlg,IDC_DBLIST), 2, &lvc );
+ }
+ {
+ TCHAR *str2;
+ GetModuleFileName(NULL,szMirandaPath,SIZEOF(szMirandaPath));
+ str2 = _tcsrchr(szMirandaPath,'\\');
+ if( str2 != NULL )
+ *str2=0;
+ }
+ {
+ int i = 0;
+ HKEY hKey;
+ TCHAR szProfileDir[MAX_PATH];
+ DWORD cbData = SIZEOF(szMirandaPath);
+ TCHAR szMirandaProfiles[MAX_PATH];
+
+ _tcscpy(szMirandaProfiles, szMirandaPath);
+ _tcscat(szMirandaProfiles, _T("\\Profiles"));
+ GetProfileDirectory(szMirandaPath,szProfileDir,SIZEOF(szProfileDir));
+
+ // search in profile dir (using ini file)
+ if( lstrcmpi(szProfileDir,szMirandaProfiles) )
+ FindAdd(hdlg, szProfileDir, _T("[ini]\\"));
+
+ FindAdd(hdlg, szMirandaProfiles, _T("[prf]\\"));
+ // search in current dir (as DBTOOL)
+ FindAdd(hdlg, szMirandaPath, _T("[ . ]\\"));
+
+ // search in profile dir (using registry path + ini file)
+ if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,_T("Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\miranda32.exe"),0,KEY_QUERY_VALUE,&hKey) == ERROR_SUCCESS) {
+ if(RegQueryValueEx(hKey,_T("Path"),NULL,NULL,(PBYTE)szMirandaPath,&cbData) == ERROR_SUCCESS) {
+ if( lstrcmp(szProfileDir,szMirandaPath) ) {
+ GetProfileDirectory(szMirandaPath,szProfileDir,SIZEOF(szProfileDir));
+ FindAdd(hdlg, szProfileDir, _T("[reg]\\"));
+ }
+ }
+ RegCloseKey(hKey);
+ }
+ // select
+ if ( opts.filename[0] )
+ i = AddDatabaseToList( GetDlgItem( hdlg, IDC_DBLIST ), opts.filename, _T("") );
+ if ( i == -1 )
+ i = 0;
+ ListView_SetItemState( GetDlgItem(hdlg,IDC_DBLIST), i, LVIS_SELECTED, LVIS_SELECTED );
+ }
+ if ( opts.hFile != NULL && opts.hFile != INVALID_HANDLE_VALUE ) {
+ CloseHandle( opts.hFile );
+ opts.hFile = NULL;
+ }
+ TranslateDialog( hdlg );
+ return TRUE;
+ }
+
+ case WZN_PAGECHANGING:
+ GetDlgItemText( hdlg, IDC_FILE, opts.filename, SIZEOF(opts.filename));
+ break;
+
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDC_FILE:
+ if(HIWORD(wParam)==EN_CHANGE)
+ EnableWindow(GetDlgItem(GetParent(hdlg),IDOK),GetWindowTextLength(GetDlgItem(hdlg,IDC_FILE)));
+ break;
+ case IDC_OTHER:
+ { OPENFILENAME ofn={0};
+ TCHAR str[MAX_PATH];
+
+ // _T("Miranda Databases (*.dat)\0*.DAT\0All Files (*)\0*\0");
+ TCHAR *filter, *tmp, *tmp1, *tmp2;
+ tmp1 = TranslateT("Miranda Databases (*.dat)");
+ tmp2 = TranslateT("All Files");
+ filter = tmp = (TCHAR*)_alloca((_tcslen(tmp1)+_tcslen(tmp2)+11)*sizeof(TCHAR));
+ tmp = addstring(tmp, tmp1);
+ tmp = addstring(tmp, _T("*.DAT"));
+ tmp = addstring(tmp, tmp2);
+ tmp = addstring(tmp, _T("*"));
+ *tmp = 0;
+
+ GetDlgItemText( hdlg, IDC_FILE, str, SIZEOF( str ));
+ ofn.lStructSize = sizeof(ofn);
+ ofn.hwndOwner = hdlg;
+ ofn.hInstance = NULL;
+ ofn.lpstrFilter = filter;
+ ofn.lpstrDefExt = _T("dat");
+ ofn.lpstrFile = str;
+ ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
+ ofn.nMaxFile = SIZEOF(str);
+ ofn.nMaxFileTitle = MAX_PATH;
+ if ( GetOpenFileName( &ofn )) {
+ int i;
+ i = AddDatabaseToList( GetDlgItem(hdlg,IDC_DBLIST), str, _T("") );
+ if ( i == -1 )
+ i=0;
+ ListView_SetItemState( GetDlgItem(hdlg,IDC_DBLIST), i, LVIS_SELECTED, LVIS_SELECTED );
+ }
+ break;
+ }
+ case IDC_BACK:
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_WELCOME,(LPARAM)WelcomeDlgProc);
+ break;
+ case IDOK:
+ opts.hFile = CreateFile( opts.filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL );
+ if ( opts.hFile == INVALID_HANDLE_VALUE ) {
+ opts.hFile = NULL;
+ opts.error = GetLastError();
+ SendMessage( GetParent(hdlg), WZM_GOTOPAGE, IDD_OPENERROR, ( LPARAM )OpenErrorDlgProc );
+ }
+ else SendMessage( GetParent(hdlg), WZM_GOTOPAGE, IDD_FILEACCESS, (LPARAM)FileAccessDlgProc );
+ break;
+ }
+ break;
+ case WM_NOTIFY:
+ switch(((LPNMHDR)lParam)->idFrom) {
+ case IDC_DBLIST:
+ switch(((LPNMLISTVIEW)lParam)->hdr.code) {
+ case LVN_ITEMCHANGED:
+ { LV_ITEM lvi;
+ lvi.iItem=ListView_GetNextItem(GetDlgItem(hdlg,IDC_DBLIST),-1,LVNI_SELECTED);
+ if(lvi.iItem==-1) break;
+ lvi.mask=LVIF_PARAM;
+ ListView_GetItem(GetDlgItem(hdlg,IDC_DBLIST),&lvi);
+ SetDlgItemText(hdlg,IDC_FILE,(TCHAR*)lvi.lParam);
+ SendMessage(hdlg,WM_COMMAND,MAKEWPARAM(IDC_FILE,EN_CHANGE),(LPARAM)GetDlgItem(hdlg,IDC_FILE));
+ break;
+ }
+ }
+ break;
+ }
+ break;
+ case WM_DESTROY:
+ { LV_ITEM lvi;
+ lvi.mask=LVIF_PARAM;
+ for(lvi.iItem=ListView_GetItemCount(GetDlgItem(hdlg,IDC_DBLIST))-1;lvi.iItem>=0;lvi.iItem--) {
+ ListView_GetItem(GetDlgItem(hdlg,IDC_DBLIST),&lvi);
+ free((char*)lvi.lParam);
+ }
+ }
+ break;
+ }
+ return FALSE;
+}
diff --git a/tools/dbtool/settingschain.cpp b/tools/dbtool/settingschain.cpp new file mode 100644 index 0000000000..6c7b95febc --- /dev/null +++ b/tools/dbtool/settingschain.cpp @@ -0,0 +1,72 @@ +/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+static DWORD ofsThisSettings,ofsDestPrevSettings;
+
+int WorkSettingsChain(DWORD ofsContact,DBContact *dbc,int firstTime)
+{
+ DBContactSettings *dbcsNew,dbcsOld;
+ DWORD ofsDestThis;
+ int ret;
+
+ if(firstTime) {
+ ofsDestPrevSettings=0;
+ ofsThisSettings=dbc->ofsFirstSettings;
+ dbc->ofsFirstSettings=0;
+ }
+ if(ofsThisSettings==0)
+ return ERROR_NO_MORE_ITEMS;
+ if(!SignatureValid(ofsThisSettings,DBCONTACTSETTINGS_SIGNATURE)) {
+ AddToStatus(STATUS_ERROR,TranslateT("Settings chain corrupted, further entries ignored"));
+ return ERROR_NO_MORE_ITEMS;
+ }
+ if(PeekSegment(ofsThisSettings,&dbcsOld,sizeof(dbcsOld))!=ERROR_SUCCESS)
+ return ERROR_NO_MORE_ITEMS;
+ if(dbcsOld.cbBlob>256*1024 || dbcsOld.cbBlob==0) {
+ AddToStatus(STATUS_ERROR,TranslateT("Infeasibly large settings blob: skipping"));
+ ofsThisSettings=dbcsOld.ofsNext;
+ return ERROR_SUCCESS;
+ }
+ dbcsNew=(DBContactSettings*)_alloca(offsetof(DBContactSettings,blob)+dbcsOld.cbBlob);
+ if((ret=ReadSegment(ofsThisSettings,dbcsNew,offsetof(DBContactSettings,blob)+dbcsOld.cbBlob))!=ERROR_SUCCESS) {
+ if(ret!=ERROR_HANDLE_EOF) { //eof is OK because blank space at the end doesn't matter
+ return ERROR_NO_MORE_ITEMS;
+ }
+ }
+ if((dbcsNew->ofsModuleName=ConvertModuleNameOfs(dbcsOld.ofsModuleName))==0) {
+ ofsThisSettings=dbcsOld.ofsNext;
+ return ERROR_SUCCESS;
+ }
+ if(dbcsNew->blob[0]==0) {
+ AddToStatus(STATUS_MESSAGE,TranslateT("Empty settings group at %08X: skipping"),ofsThisSettings);
+ ofsThisSettings=dbcsOld.ofsNext;
+ return ERROR_SUCCESS;
+ }
+ dbcsNew->ofsNext=0;
+ //TODO? validate all settings in blob/compact if necessary
+ if((ofsDestThis=WriteSegment(WSOFS_END,dbcsNew,offsetof(DBContactSettings,blob)+dbcsNew->cbBlob))==WS_ERROR) {
+ return ERROR_HANDLE_DISK_FULL;
+ }
+ if(ofsDestPrevSettings) WriteSegment(ofsDestPrevSettings+offsetof(DBContactSettings,ofsNext),&ofsDestThis,sizeof(DWORD));
+ else dbc->ofsFirstSettings=ofsDestThis;
+ ofsDestPrevSettings=ofsDestThis;
+ ofsThisSettings=dbcsOld.ofsNext;
+ return ERROR_SUCCESS;
+}
diff --git a/tools/dbtool/user.cpp b/tools/dbtool/user.cpp new file mode 100644 index 0000000000..79f30eace7 --- /dev/null +++ b/tools/dbtool/user.cpp @@ -0,0 +1,71 @@ +/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+static DBContact user;
+static int phase;
+static DWORD ofsUser;
+
+int WorkSettingsChain(DWORD ofsContact,DBContact *dbc,int firstTime);
+int WorkEventChain(DWORD ofsContact,DBContact *dbc,int firstTime);
+
+int WorkUser(int firstTime)
+{
+ int first=0;
+
+ if(firstTime) {
+ AddToStatus(STATUS_MESSAGE,TranslateT("Processing user data"));
+ if(!SignatureValid(dbhdr.ofsUser,DBCONTACT_SIGNATURE)) {
+ AddToStatus(STATUS_ERROR,TranslateT("User corrupted, this could cause major problems"));
+ return ERROR_NO_MORE_ITEMS;
+ }
+ if(ReadSegment(dbhdr.ofsUser,&user,sizeof(DBContact))!=ERROR_SUCCESS)
+ return ERROR_NO_MORE_ITEMS;
+ if(user.ofsNext) {
+ AddToStatus(STATUS_WARNING,TranslateT("More than one user contact: keeping only first"));
+ user.ofsNext=0;
+ }
+ if((ofsUser=WriteSegment(WSOFS_END,&user,sizeof(DBContact)))==WS_ERROR)
+ return ERROR_HANDLE_DISK_FULL;
+ dbhdr.ofsUser=ofsUser;
+ phase=0;
+ first=1;
+ }
+ switch(phase) {
+ int ret;
+
+ case 0:
+ ret=WorkSettingsChain(ofsUser,&user,first);
+ if(ret==ERROR_NO_MORE_ITEMS) {
+ phase++; first=1;
+ }
+ else if(ret) return ret;
+ else break;
+ case 1:
+ ret=WorkEventChain(ofsUser,&user,first);
+ if(ret==ERROR_NO_MORE_ITEMS) {
+ if(WriteSegment(ofsUser,&user,sizeof(DBContact))==WS_ERROR)
+ return ERROR_HANDLE_DISK_FULL;
+ return ERROR_NO_MORE_ITEMS;
+ }
+ else if(ret) return ret;
+ break;
+ }
+ return ERROR_SUCCESS;
+}
\ No newline at end of file diff --git a/tools/dbtool/utf.cpp b/tools/dbtool/utf.cpp new file mode 100644 index 0000000000..157d5d00f5 --- /dev/null +++ b/tools/dbtool/utf.cpp @@ -0,0 +1,445 @@ +/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2009 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+ Copyright 2000 Alexandre Julliard of Wine project
+ (UTF-8 conversion routines)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "dbtool.h"
+
+/* number of following bytes in sequence based on first byte value (for bytes above 0x7f) */
+static const char utf8_length[128] =
+{
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x80-0x8f */
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x90-0x9f */
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0xa0-0xaf */
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0xb0-0xbf */
+ 0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 0xc0-0xcf */
+ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 0xd0-0xdf */
+ 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, /* 0xe0-0xef */
+ 3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0 /* 0xf0-0xff */
+};
+
+/* first byte mask depending on UTF-8 sequence length */
+static const unsigned char utf8_mask[4] = { 0x7f, 0x1f, 0x0f, 0x07 };
+
+/* minimum Unicode value depending on UTF-8 sequence length */
+static const unsigned int utf8_minval[4] = { 0x0, 0x80, 0x800, 0x10000 };
+
+
+/* get the next char value taking surrogates into account */
+static unsigned int getSurrogateValue(const wchar_t *src, unsigned int srclen)
+{
+ if (src[0] >= 0xd800 && src[0] <= 0xdfff) /* surrogate pair */
+ {
+ if (src[0] > 0xdbff || /* invalid high surrogate */
+ srclen <= 1 || /* missing low surrogate */
+ src[1] < 0xdc00 || src[1] > 0xdfff) /* invalid low surrogate */
+ return 0;
+ return 0x10000 + ((src[0] & 0x3ff) << 10) + (src[1] & 0x3ff);
+ }
+ return src[0];
+}
+
+/* query necessary dst length for src string */
+static int Ucs2toUtf8Len(const wchar_t *src, unsigned int srclen)
+{
+ int len;
+ unsigned int val;
+
+ for (len = 0; srclen; srclen--, src++)
+ {
+ if (*src < 0x80) /* 0x00-0x7f: 1 byte */
+ {
+ len++;
+ continue;
+ }
+ if (*src < 0x800) /* 0x80-0x7ff: 2 bytes */
+ {
+ len += 2;
+ continue;
+ }
+ if (!(val = getSurrogateValue(src, srclen)))
+ {
+ return -2;
+ }
+ if (val < 0x10000) /* 0x800-0xffff: 3 bytes */
+ len += 3;
+ else /* 0x10000-0x10ffff: 4 bytes */
+ {
+ len += 4;
+ src++;
+ srclen--;
+ }
+ }
+ return len;
+}
+
+int Ucs2toUtf8Len(const wchar_t *src)
+{
+ if ( src == 0 )
+ return 0;
+
+ return Ucs2toUtf8Len( src, (int)wcslen( src ));
+}
+
+/* wide char to UTF-8 string conversion */
+/* return -1 on dst buffer overflow, -2 on invalid input char */
+int Ucs2toUtf8(const wchar_t *src, int srclen, char *dst, int dstlen)
+{
+ int len;
+
+ for (len = dstlen; srclen; srclen--, src++)
+ {
+ WCHAR ch = *src;
+ unsigned int val;
+
+ if (ch < 0x80) /* 0x00-0x7f: 1 byte */
+ {
+ if (!len--) return -1; /* overflow */
+ *dst++ = ch;
+ continue;
+ }
+
+ if (ch < 0x800) /* 0x80-0x7ff: 2 bytes */
+ {
+ if ((len -= 2) < 0) return -1; /* overflow */
+ dst[1] = 0x80 | (ch & 0x3f);
+ ch >>= 6;
+ dst[0] = 0xc0 | ch;
+ dst += 2;
+ continue;
+ }
+
+ if (!(val = getSurrogateValue(src, srclen)))
+ {
+ return -2;
+ }
+
+ if (val < 0x10000) /* 0x800-0xffff: 3 bytes */
+ {
+ if ((len -= 3) < 0) return -1; /* overflow */
+ dst[2] = 0x80 | (val & 0x3f);
+ val >>= 6;
+ dst[1] = 0x80 | (val & 0x3f);
+ val >>= 6;
+ dst[0] = 0xe0 | val;
+ dst += 3;
+ }
+ else /* 0x10000-0x10ffff: 4 bytes */
+ {
+ if ((len -= 4) < 0) return -1; /* overflow */
+ dst[3] = 0x80 | (val & 0x3f);
+ val >>= 6;
+ dst[2] = 0x80 | (val & 0x3f);
+ val >>= 6;
+ dst[1] = 0x80 | (val & 0x3f);
+ val >>= 6;
+ dst[0] = 0xf0 | val;
+ dst += 4;
+ src++;
+ srclen--;
+ }
+ }
+ return dstlen - len;
+}
+
+/* helper for the various utf8 mbstowcs functions */
+static unsigned int decodeUtf8Char(unsigned char ch, const char **str, const char *strend)
+{
+ unsigned int len = utf8_length[ch-0x80];
+ unsigned int res = ch & utf8_mask[len];
+ const char *end = *str + len;
+
+ if (end > strend) return ~0;
+ switch(len)
+ {
+ case 3:
+ if ((ch = end[-3] ^ 0x80) >= 0x40) break;
+ res = (res << 6) | ch;
+ (*str)++;
+ case 2:
+ if ((ch = end[-2] ^ 0x80) >= 0x40) break;
+ res = (res << 6) | ch;
+ (*str)++;
+ case 1:
+ if ((ch = end[-1] ^ 0x80) >= 0x40) break;
+ res = (res << 6) | ch;
+ (*str)++;
+ if (res < utf8_minval[len]) break;
+ return res;
+ }
+ return ~0;
+}
+
+/* query necessary dst length for src string */
+static inline int Utf8toUcs2Len(const char *src, int srclen)
+{
+ int ret = 0;
+ unsigned int res;
+ const char *srcend = src + srclen;
+
+ while (src < srcend)
+ {
+ unsigned char ch = *src++;
+ if (ch < 0x80) /* special fast case for 7-bit ASCII */
+ {
+ ret++;
+ continue;
+ }
+ if ((res = decodeUtf8Char(ch, &src, srcend)) <= 0x10ffff)
+ {
+ if (res > 0xffff) ret++;
+ ret++;
+ }
+ else return -2; /* bad char */
+ /* otherwise ignore it */
+ }
+ return ret;
+}
+
+/* UTF-8 to wide char string conversion */
+/* return -1 on dst buffer overflow, -2 on invalid input char */
+int Utf8toUcs2(const char *src, int srclen, wchar_t *dst, int dstlen)
+{
+ unsigned int res;
+ const char *srcend = src + srclen;
+ wchar_t *dstend = dst + dstlen;
+
+ while ((dst < dstend) && (src < srcend))
+ {
+ unsigned char ch = *src++;
+ if (ch < 0x80) /* special fast case for 7-bit ASCII */
+ {
+ *dst++ = ch;
+ continue;
+ }
+ if ((res = decodeUtf8Char(ch, &src, srcend)) <= 0xffff)
+ {
+ *dst++ = res;
+ }
+ else if (res <= 0x10ffff) /* we need surrogates */
+ {
+ if (dst == dstend - 1) return -1; /* overflow */
+ res -= 0x10000;
+ *dst++ = 0xd800 | (res >> 10);
+ *dst++ = 0xdc00 | (res & 0x3ff);
+ }
+ else return -2; /* bad char */
+ /* otherwise ignore it */
+ }
+ if (src < srcend) return -1; /* overflow */
+ return dstlen - (dstend - dst);
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// Utf8Decode - converts UTF8-encoded string to the UCS2/MBCS format
+
+char* Utf8DecodeCP(char* str, int codepage, wchar_t** ucs2)
+{
+ int len;
+ bool needs_free = false;
+ wchar_t* tempBuf = NULL;
+ if ( ucs2 )
+ *ucs2 = NULL;
+
+ if (str == NULL)
+ return NULL;
+
+ len = (int)strlen(str);
+
+ if (len < 2) {
+ if (ucs2 != NULL) {
+ *ucs2 = tempBuf = (wchar_t*)malloc((len + 1) * sizeof(wchar_t));
+ MultiByteToWideChar(codepage, 0, str, len, tempBuf, len);
+ tempBuf[len] = 0;
+ }
+ return str;
+ }
+
+ int destlen = Utf8toUcs2Len(str, len);
+ if (destlen < 0)
+ return NULL;
+
+ if (ucs2 == NULL) {
+ __try
+ {
+ tempBuf = (wchar_t*)alloca((destlen + 1) * sizeof(wchar_t));
+ }
+ __except(EXCEPTION_EXECUTE_HANDLER)
+ {
+ tempBuf = NULL;
+ needs_free = true;
+ }
+ }
+
+ if ( tempBuf == NULL ) {
+ tempBuf = (wchar_t*)malloc((destlen + 1) * sizeof(wchar_t));
+ if ( tempBuf == NULL )
+ return NULL;
+ }
+
+ Utf8toUcs2(str, len, tempBuf, destlen);
+ tempBuf[destlen] = 0;
+ WideCharToMultiByte(codepage, 0, tempBuf, -1, str, len + 1, "?", NULL);
+
+ if (ucs2)
+ *ucs2 = tempBuf;
+ else if (needs_free)
+ free(tempBuf);
+
+ return str;
+}
+
+wchar_t* Utf8DecodeUcs2(const char* str)
+{
+ if (str == NULL)
+ return NULL;
+
+ int len = (int)strlen(str);
+
+ int destlen = Utf8toUcs2Len(str, len);
+ if (destlen < 0) return NULL;
+
+ wchar_t* ucs2 = (wchar_t*)malloc((destlen + 1) * sizeof(wchar_t));
+ if (ucs2 == NULL) return NULL;
+
+ if (Utf8toUcs2(str, len, ucs2, destlen) >= 0)
+ {
+ ucs2[destlen] = 0;
+ return ucs2;
+ }
+
+ free(ucs2);
+
+ return NULL;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// Utf8Encode - converts MBCS string to the UTF8-encoded format
+
+char* Utf8EncodeCP(const char* src, int codepage)
+{
+ int len;
+ bool needs_free = false;
+ char* result = NULL;
+ wchar_t* tempBuf;
+
+ if (src == NULL)
+ return NULL;
+
+ len = (int)strlen(src);
+
+ __try
+ {
+ tempBuf = (wchar_t*)alloca((len + 1) * sizeof(wchar_t));
+ }
+ __except(EXCEPTION_EXECUTE_HANDLER)
+ {
+ tempBuf = (wchar_t*)malloc((len + 1) * sizeof(wchar_t));
+ if (tempBuf == NULL) return NULL;
+ needs_free = true;
+ }
+
+ len = MultiByteToWideChar(codepage, 0, src, -1, tempBuf, len + 1);
+
+ int destlen = Ucs2toUtf8Len(tempBuf, len);
+ if (destlen >= 0)
+ {
+ result = (char*)malloc(destlen + 1);
+ if (result)
+ {
+ Ucs2toUtf8(tempBuf, len, result, destlen);
+ result[destlen] = 0;
+ }
+ }
+
+ if (needs_free)
+ free(tempBuf);
+
+ return result;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// Utf8Encode - converts UCS2 string to the UTF8-encoded format
+
+char* Utf8EncodeUcs2(const wchar_t* src)
+{
+ if (src == NULL)
+ return NULL;
+
+ int len = (int)wcslen(src);
+
+ int destlen = Ucs2toUtf8Len(src, len);
+ if (destlen < 0) return NULL;
+
+ char* result = (char*)malloc(destlen + 1);
+ if (result == NULL)
+ return NULL;
+
+ Ucs2toUtf8(src, len, result, destlen);
+ result[destlen] = 0;
+
+ return result;
+}
+
+bool is_utf8_string(const char* str)
+{
+ int expect_bytes = 0, utf_found = 0;
+
+ if (!str) return 0;
+
+ while (*str) {
+ if ((*str & 0x80) == 0) {
+ /* Looks like an ASCII character */
+ if (expect_bytes)
+ /* byte of UTF-8 character expected */
+ return 0;
+ }
+ else {
+ /* Looks like byte of an UTF-8 character */
+ if (expect_bytes) {
+ /* expect_bytes already set: first byte of UTF-8 char already seen */
+ if ((*str & 0xC0) != 0x80) {
+ /* again first byte ?!?! */
+ return 0;
+ }
+ }
+ else {
+ /* First byte of the UTF-8 character */
+ /* count initial one bits and set expect_bytes to 1 less */
+ char ch = *str;
+ while (ch & 0x80) {
+ expect_bytes++;
+ ch = (ch & 0x7f) << 1;
+ }
+ }
+ /* OK, next byte of UTF-8 character */
+ /* Decrement number of expected bytes */
+ if ( --expect_bytes == 0 )
+ utf_found = 1;
+ }
+ str++;
+ }
+
+ return (utf_found && expect_bytes == 0);
+}
diff --git a/tools/dbtool/welcome.cpp b/tools/dbtool/welcome.cpp new file mode 100644 index 0000000000..360b94ae00 --- /dev/null +++ b/tools/dbtool/welcome.cpp @@ -0,0 +1,65 @@ +/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+INT_PTR CALLBACK WelcomeDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ static HENHMETAFILE hEmfWatermark;
+ static HFONT hTitleFont;
+ INT_PTR bReturn;
+
+ if(DoMyControlProcessing(hdlg,message,wParam,lParam,&bReturn)) return bReturn;
+ switch(message) {
+ case WM_INITDIALOG:
+ { HRSRC hRsrcWatermark=FindResourceA(hInst,MAKEINTRESOURCEA(IDE_WATERMARK),"EMF");
+ HGLOBAL hGlobWatermark=LoadResource(hInst,hRsrcWatermark);
+ hEmfWatermark=SetEnhMetaFileBits(SizeofResource(hInst,hRsrcWatermark),(PBYTE)LockResource(hGlobWatermark));
+ }
+ SendDlgItemMessage(hdlg,IDC_WATERMARK,STM_SETIMAGE,IMAGE_ENHMETAFILE,(LPARAM)hEmfWatermark);
+ {
+ NONCLIENTMETRICS ncm = {0};
+ ncm.cbSize = sizeof(ncm);
+ SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &ncm, 0);
+ LOGFONT TitleLogFont = ncm.lfMessageFont;
+ TitleLogFont.lfWeight = FW_BOLD;
+ lstrcpy(TitleLogFont.lfFaceName, TEXT("Verdana Bold"));
+
+ HDC hdc = GetDC(NULL);
+ INT FontSize = 12;
+ TitleLogFont.lfHeight = 0 - GetDeviceCaps(hdc, LOGPIXELSY) * FontSize / 72;
+ hTitleFont = CreateFontIndirect(&TitleLogFont);
+ ReleaseDC(NULL, hdc);
+ }
+ SendDlgItemMessage(hdlg,IDC_TITLE,WM_SETFONT,(WPARAM)hTitleFont,0);
+ EnableWindow(GetDlgItem(GetParent(hdlg),IDC_BACK),FALSE);
+ return FALSE;
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDOK:
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_SELECTDB,(LPARAM)SelectDbDlgProc);
+ break;
+ }
+ break;
+ case WM_DESTROY:
+ DeleteEnhMetaFile(hEmfWatermark);
+ DeleteObject(hTitleFont);
+ break;
+ }
+ return FALSE;
+}
diff --git a/tools/dbtool/wizard.cpp b/tools/dbtool/wizard.cpp new file mode 100644 index 0000000000..bdb656dadb --- /dev/null +++ b/tools/dbtool/wizard.cpp @@ -0,0 +1,138 @@ +/*
+Miranda Database Tool
+Copyright 2000-2011 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+static HFONT hBoldFont=NULL;
+static HENHMETAFILE hEmfHeaderLogo=NULL;
+
+static BOOL CALLBACK MyControlsEnumChildren(HWND hwnd,LPARAM lParam)
+{
+ DWORD style=GetWindowLong(hwnd,GWL_STYLE);
+ DWORD exstyle=GetWindowLong(hwnd,GWL_EXSTYLE);
+ char szClass[64];
+ int makeBold=0;
+
+ GetClassNameA(hwnd,szClass,sizeof(szClass));
+ if(!strcmp(szClass,"Static")) {
+ if(((style&SS_TYPEMASK)==SS_LEFT || (style&SS_TYPEMASK)==SS_CENTER || (style&SS_TYPEMASK)==SS_RIGHT) && exstyle&WS_EX_CLIENTEDGE)
+ makeBold=1;
+ }
+ else if(!strcmp(szClass,"Button")) {
+ if(exstyle&WS_EX_CLIENTEDGE)
+ makeBold=1;
+ }
+ if(makeBold) {
+ if(hBoldFont==NULL) {
+ LOGFONT lf;
+ hBoldFont=(HFONT)SendMessage(hwnd,WM_GETFONT,0,0);
+ GetObject(hBoldFont,sizeof(lf),&lf);
+ lf.lfWeight=FW_BOLD;
+ hBoldFont=CreateFontIndirect(&lf);
+ }
+ SendMessage(hwnd,WM_SETFONT,(WPARAM)hBoldFont,0);
+ SetWindowLong(hwnd,GWL_EXSTYLE,exstyle&~WS_EX_CLIENTEDGE);
+ SetWindowPos(hwnd,0,0,0,0,0,SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_FRAMECHANGED);
+ }
+ return TRUE;
+}
+
+int DoMyControlProcessing(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam,INT_PTR *bReturn)
+{
+ switch(message) {
+ case WM_INITDIALOG:
+ EnumChildWindows(hdlg,MyControlsEnumChildren,0);
+ if(hEmfHeaderLogo==NULL) {
+ HRSRC hRsrc=FindResourceA(hInst,MAKEINTRESOURCEA(IDE_HDRLOGO),"EMF");
+ HGLOBAL hGlob=LoadResource(hInst,hRsrc);
+ hEmfHeaderLogo=SetEnhMetaFileBits(SizeofResource(hInst,hRsrc),(PBYTE)LockResource(hGlob));
+ }
+ SendDlgItemMessage(hdlg,IDC_HDRLOGO,STM_SETIMAGE,IMAGE_ENHMETAFILE,(LPARAM)hEmfHeaderLogo);
+ break;
+ case WM_CTLCOLORSTATIC:
+ if((GetWindowLong((HWND)lParam,GWL_STYLE)&0xFFFF)==0) {
+ char szText[256];
+ GetWindowTextA((HWND)lParam,szText,sizeof(szText));
+ if(!strcmp(szText,"whiterect")) {
+ SetTextColor((HDC)wParam,RGB(255,255,255));
+ SetBkColor((HDC)wParam,RGB(255,255,255));
+ SetBkMode((HDC)wParam,OPAQUE);
+ *bReturn=(INT_PTR)GetStockObject(WHITE_BRUSH);
+ return TRUE;
+ }
+ else {
+ SetBkMode((HDC)wParam,TRANSPARENT);
+ *bReturn=(INT_PTR)GetStockObject(NULL_BRUSH);
+ return TRUE;
+ }
+ }
+ break;
+ }
+ return FALSE;
+}
+
+INT_PTR CALLBACK WizardDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ static HWND hdlgPage;
+
+ switch(message) {
+ case WM_INITDIALOG:
+ SendMessage(hdlg,WM_SETICON,ICON_SMALL,(LPARAM)LoadIcon(hInst,MAKEINTRESOURCE(IDI_DBTOOL)));
+ hdlgPage=NULL;
+ SendMessage(hdlg,WZM_GOTOPAGE,IDD_WELCOME,(LPARAM)WelcomeDlgProc);
+ TranslateDialog(hdlg);
+ return TRUE;
+ case WZM_GOTOPAGE:
+ if(hdlgPage!=NULL) DestroyWindow(hdlgPage);
+ EnableWindow(GetDlgItem(hdlg,IDC_BACK),TRUE);
+ EnableWindow(GetDlgItem(hdlg,IDOK),TRUE);
+ EnableWindow(GetDlgItem(hdlg,IDCANCEL),TRUE);
+ SetDlgItemText(hdlg,IDCANCEL,TranslateT("Cancel"));
+ hdlgPage=CreateDialog(hInst,MAKEINTRESOURCE(wParam),hdlg,(DLGPROC)lParam);
+ TranslateDialog(hdlgPage);
+ SetWindowPos(hdlgPage,0,0,0,0,0,SWP_NOZORDER|SWP_NOSIZE);
+ ShowWindow(hdlgPage,SW_SHOW);
+ break;
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDC_BACK:
+ case IDOK:
+ SendMessage(hdlgPage,WZN_PAGECHANGING,wParam,0);
+ SendMessage(hdlgPage,message,wParam,lParam);
+ break;
+ case IDCANCEL:
+ if(SendMessage(hdlgPage,WZN_CANCELCLICKED,0,0)) break;
+ EndDialog(hdlg,0);
+ break;
+ }
+ break;
+ case WM_DESTROY:
+ if (opts.hFile)
+ CloseHandle(opts.hFile);
+ if (opts.hOutFile)
+ CloseHandle(opts.hOutFile);
+ DestroyWindow(hdlgPage);
+ UnloadLangPackModule();
+ if(hBoldFont!=NULL) DeleteObject(hBoldFont);
+ if(hEmfHeaderLogo!=NULL) DeleteEnhMetaFile(hEmfHeaderLogo);
+ break;
+ }
+ return FALSE;
+}
diff --git a/tools/dbtool/worker.cpp b/tools/dbtool/worker.cpp new file mode 100644 index 0000000000..7f22539f8f --- /dev/null +++ b/tools/dbtool/worker.cpp @@ -0,0 +1,76 @@ +/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+void ProcessingDone(void);
+int WorkInitialChecks(int firstTime);
+int WorkModuleChain(int firstTime);
+int WorkUser(int firstTime);
+int WorkContactChain(int firstTime);
+int WorkAggressive(int firstTime);
+int WorkFinalTasks(int firstTime);
+
+extern HANDLE hEventRun,hEventAbort;
+extern int errorCount;
+time_t ts;
+DBHeader dbhdr;
+DWORD spaceProcessed,sourceFileSize;
+DWORD spaceUsed, sp;
+
+static int (*Workers[6])(int)=
+ {WorkInitialChecks,WorkModuleChain,WorkUser,WorkContactChain,WorkAggressive,WorkFinalTasks};
+
+void __cdecl WorkerThread(void *unused)
+{
+ int task,ret,firstTime;
+ ts=time(NULL);
+
+ AddToStatus(STATUS_MESSAGE,TranslateT("Database worker thread activated"));
+ SetFilePointer(opts.hFile,0,NULL,FILE_BEGIN);
+ spaceUsed=1; spaceProcessed=0; sp=0;
+ firstTime=0;
+
+ for(task=0;;) {
+ if (spaceProcessed/(spaceUsed/1000+1) > sp) {
+ sp = spaceProcessed/(spaceUsed/1000+1);
+ SetProgressBar(sp);
+ }
+ WaitForSingleObject(hEventRun,INFINITE);
+ if(WaitForSingleObject(hEventAbort,0)==WAIT_OBJECT_0) {
+ AddToStatus(STATUS_FATAL,TranslateT("Processing aborted by user"));
+ break;
+ }
+ ret=Workers[task](firstTime);
+ firstTime=0;
+ if(ret==ERROR_NO_MORE_ITEMS) {
+ if(++task==sizeof(Workers)/sizeof(Workers[0])) {
+ AddToStatus(STATUS_MESSAGE,TranslateT("Elapsed time: %d sec"), time(NULL)-ts);
+ if(errorCount)
+ AddToStatus(STATUS_SUCCESS,TranslateT("All tasks completed but with errors (%d)"),errorCount);
+ else
+ AddToStatus(STATUS_SUCCESS,TranslateT("All tasks completed successfully"));
+ break;
+ }
+ firstTime=1;
+ }
+ else if(ret!=ERROR_SUCCESS)
+ break;
+ }
+ ProcessingDone();
+}
diff --git a/tools/installer/graphics/header.bmp b/tools/installer/graphics/header.bmp Binary files differnew file mode 100644 index 0000000000..a38da57046 --- /dev/null +++ b/tools/installer/graphics/header.bmp diff --git a/tools/installer/graphics/install.ico b/tools/installer/graphics/install.ico Binary files differnew file mode 100644 index 0000000000..f7791c3e0b --- /dev/null +++ b/tools/installer/graphics/install.ico diff --git a/tools/installer/graphics/uninstall.ico b/tools/installer/graphics/uninstall.ico Binary files differnew file mode 100644 index 0000000000..7d1c21f3bd --- /dev/null +++ b/tools/installer/graphics/uninstall.ico diff --git a/tools/installer/graphics/welcome.bmp b/tools/installer/graphics/welcome.bmp Binary files differnew file mode 100644 index 0000000000..7f1e8e7d6d --- /dev/null +++ b/tools/installer/graphics/welcome.bmp diff --git a/tools/installer/icons/Makefile b/tools/installer/icons/Makefile new file mode 100644 index 0000000000..123a836be8 --- /dev/null +++ b/tools/installer/icons/Makefile @@ -0,0 +1,46 @@ +CC = ld
+RC = windres
+
+all:
+ $(RC) --input-format rc --output-format coff -DICO_AIMHI -o resource.res -i resource.rc
+ $(CC) -shared -o bin\hicolor\proto_AIM.dll -T i386pe-ico.x -s -nostdlib resource.res
+ del resource.res
+ $(RC) --input-format rc --output-format coff -DICO_AIMLO -o resource.res -i resource.rc
+ $(CC) -shared -o bin\locolor\proto_AIM.dll -T i386pe-ico.x -s -nostdlib resource.res
+ del resource.res
+ $(RC) --input-format rc --output-format coff -DICO_GGHI -o resource.res -i resource.rc
+ $(CC) -shared -o bin\hicolor\proto_GG.dll -T i386pe-ico.x -s -nostdlib resource.res
+ del resource.res
+ $(RC) --input-format rc --output-format coff -DICO_GGLO -o resource.res -i resource.rc
+ $(CC) -shared -o bin\locolor\proto_GG.dll -T i386pe-ico.x -s -nostdlib resource.res
+ del resource.res
+ $(RC) --input-format rc --output-format coff -DICO_ICQHI -o resource.res -i resource.rc
+ $(CC) -shared -o bin\hicolor\proto_ICQ.dll -T i386pe-ico.x -s -nostdlib resource.res
+ del resource.res
+ $(RC) --input-format rc --output-format coff -DICO_ICQLO -o resource.res -i resource.rc
+ $(CC) -shared -o bin\locolor\proto_ICQ.dll -T i386pe-ico.x -s -nostdlib resource.res
+ del resource.res
+ $(RC) --input-format rc --output-format coff -DICO_IRCHI -o resource.res -i resource.rc
+ $(CC) -shared -o bin\hicolor\proto_IRC.dll -T i386pe-ico.x -s -nostdlib resource.res
+ del resource.res
+ $(RC) --input-format rc --output-format coff -DICO_IRCLO -o resource.res -i resource.rc
+ $(CC) -shared -o bin\locolor\proto_IRC.dll -T i386pe-ico.x -s -nostdlib resource.res
+ del resource.res
+ $(RC) --input-format rc --output-format coff -DICO_JABBERHI -o resource.res -i resource.rc
+ $(CC) -shared -o bin\hicolor\proto_JABBER.dll -T i386pe-ico.x -s -nostdlib resource.res
+ del resource.res
+ $(RC) --input-format rc --output-format coff -DICO_JABBERLO -o resource.res -i resource.rc
+ $(CC) -shared -o bin\locolor\proto_JABBER.dll -T i386pe-ico.x -s -nostdlib resource.res
+ del resource.res
+ $(RC) --input-format rc --output-format coff -DICO_MSNHI -o resource.res -i resource.rc
+ $(CC) -shared -o bin\hicolor\proto_MSN.dll -T i386pe-ico.x -s -nostdlib resource.res
+ del resource.res
+ $(RC) --input-format rc --output-format coff -DICO_MSNLO -o resource.res -i resource.rc
+ $(CC) -shared -o bin\locolor\proto_MSN.dll -T i386pe-ico.x -s -nostdlib resource.res
+ del resource.res
+ $(RC) --input-format rc --output-format coff -DICO_YAHOOHI -o resource.res -i resource.rc
+ $(CC) -shared -o bin\hicolor\proto_YAHOO.dll -T i386pe-ico.x -s -nostdlib resource.res
+ del resource.res
+ $(RC) --input-format rc --output-format coff -DICO_YAHOOLO -o resource.res -i resource.rc
+ $(CC) -shared -o bin\locolor\proto_YAHOO.dll -T i386pe-ico.x -s -nostdlib resource.res
+ del resource.res
diff --git a/tools/installer/icons/bin/hicolor/proto_AIM.dll b/tools/installer/icons/bin/hicolor/proto_AIM.dll Binary files differnew file mode 100644 index 0000000000..3a6c1bd3b5 --- /dev/null +++ b/tools/installer/icons/bin/hicolor/proto_AIM.dll diff --git a/tools/installer/icons/bin/hicolor/proto_GG.dll b/tools/installer/icons/bin/hicolor/proto_GG.dll Binary files differnew file mode 100644 index 0000000000..9d9a660653 --- /dev/null +++ b/tools/installer/icons/bin/hicolor/proto_GG.dll diff --git a/tools/installer/icons/bin/hicolor/proto_ICQ.dll b/tools/installer/icons/bin/hicolor/proto_ICQ.dll Binary files differnew file mode 100644 index 0000000000..98ddfd0d15 --- /dev/null +++ b/tools/installer/icons/bin/hicolor/proto_ICQ.dll diff --git a/tools/installer/icons/bin/hicolor/proto_IRC.dll b/tools/installer/icons/bin/hicolor/proto_IRC.dll Binary files differnew file mode 100644 index 0000000000..8332b384ba --- /dev/null +++ b/tools/installer/icons/bin/hicolor/proto_IRC.dll diff --git a/tools/installer/icons/bin/hicolor/proto_JABBER.dll b/tools/installer/icons/bin/hicolor/proto_JABBER.dll Binary files differnew file mode 100644 index 0000000000..0857d9de6b --- /dev/null +++ b/tools/installer/icons/bin/hicolor/proto_JABBER.dll diff --git a/tools/installer/icons/bin/hicolor/proto_MSN.dll b/tools/installer/icons/bin/hicolor/proto_MSN.dll Binary files differnew file mode 100644 index 0000000000..57884e960f --- /dev/null +++ b/tools/installer/icons/bin/hicolor/proto_MSN.dll diff --git a/tools/installer/icons/bin/hicolor/proto_YAHOO.dll b/tools/installer/icons/bin/hicolor/proto_YAHOO.dll Binary files differnew file mode 100644 index 0000000000..9a16971a21 --- /dev/null +++ b/tools/installer/icons/bin/hicolor/proto_YAHOO.dll diff --git a/tools/installer/icons/bin/locolor/proto_AIM.dll b/tools/installer/icons/bin/locolor/proto_AIM.dll Binary files differnew file mode 100644 index 0000000000..5d9bb7760d --- /dev/null +++ b/tools/installer/icons/bin/locolor/proto_AIM.dll diff --git a/tools/installer/icons/bin/locolor/proto_GG.dll b/tools/installer/icons/bin/locolor/proto_GG.dll Binary files differnew file mode 100644 index 0000000000..18b86eaa0a --- /dev/null +++ b/tools/installer/icons/bin/locolor/proto_GG.dll diff --git a/tools/installer/icons/bin/locolor/proto_ICQ.dll b/tools/installer/icons/bin/locolor/proto_ICQ.dll Binary files differnew file mode 100644 index 0000000000..42811399f8 --- /dev/null +++ b/tools/installer/icons/bin/locolor/proto_ICQ.dll diff --git a/tools/installer/icons/bin/locolor/proto_IRC.dll b/tools/installer/icons/bin/locolor/proto_IRC.dll Binary files differnew file mode 100644 index 0000000000..83ab003197 --- /dev/null +++ b/tools/installer/icons/bin/locolor/proto_IRC.dll diff --git a/tools/installer/icons/bin/locolor/proto_JABBER.dll b/tools/installer/icons/bin/locolor/proto_JABBER.dll Binary files differnew file mode 100644 index 0000000000..85b7ba16c1 --- /dev/null +++ b/tools/installer/icons/bin/locolor/proto_JABBER.dll diff --git a/tools/installer/icons/bin/locolor/proto_MSN.dll b/tools/installer/icons/bin/locolor/proto_MSN.dll Binary files differnew file mode 100644 index 0000000000..d0883d9215 --- /dev/null +++ b/tools/installer/icons/bin/locolor/proto_MSN.dll diff --git a/tools/installer/icons/bin/locolor/proto_YAHOO.dll b/tools/installer/icons/bin/locolor/proto_YAHOO.dll Binary files differnew file mode 100644 index 0000000000..f7ac5da143 --- /dev/null +++ b/tools/installer/icons/bin/locolor/proto_YAHOO.dll diff --git a/tools/installer/icons/i386pe-ico.x b/tools/installer/icons/i386pe-ico.x new file mode 100644 index 0000000000..6db53b6bc6 --- /dev/null +++ b/tools/installer/icons/i386pe-ico.x @@ -0,0 +1,18 @@ +/* Default linker script, for normal executables */ +OUTPUT_FORMAT(pei-i386) +SECTIONS +{ + /* Make the virtual address and file offset synced if the alignment is + lower than the target page size. */ + . = SIZEOF_HEADERS; + . = ALIGN(__section_alignment__); + .rsrc __image_base__ + BLOCK(__section_alignment__) : + { + *(.rsrc) + *(SORT(.rsrc$*)) + } + /DISCARD/ : + { + *(.edata) + } +} diff --git a/tools/installer/icons/res/AIM/32_aim_Away.ico b/tools/installer/icons/res/AIM/32_aim_Away.ico Binary files differnew file mode 100644 index 0000000000..9f668b4fe7 --- /dev/null +++ b/tools/installer/icons/res/AIM/32_aim_Away.ico diff --git a/tools/installer/icons/res/AIM/32_aim_DND.ico b/tools/installer/icons/res/AIM/32_aim_DND.ico Binary files differnew file mode 100644 index 0000000000..0ace68680a --- /dev/null +++ b/tools/installer/icons/res/AIM/32_aim_DND.ico diff --git a/tools/installer/icons/res/AIM/32_aim_FFC.ico b/tools/installer/icons/res/AIM/32_aim_FFC.ico Binary files differnew file mode 100644 index 0000000000..f3ecc5fcc3 --- /dev/null +++ b/tools/installer/icons/res/AIM/32_aim_FFC.ico diff --git a/tools/installer/icons/res/AIM/32_aim_Invisible.ico b/tools/installer/icons/res/AIM/32_aim_Invisible.ico Binary files differnew file mode 100644 index 0000000000..932356b398 --- /dev/null +++ b/tools/installer/icons/res/AIM/32_aim_Invisible.ico diff --git a/tools/installer/icons/res/AIM/32_aim_Lunch.ico b/tools/installer/icons/res/AIM/32_aim_Lunch.ico Binary files differnew file mode 100644 index 0000000000..7f6587e73c --- /dev/null +++ b/tools/installer/icons/res/AIM/32_aim_Lunch.ico diff --git a/tools/installer/icons/res/AIM/32_aim_NA.ico b/tools/installer/icons/res/AIM/32_aim_NA.ico Binary files differnew file mode 100644 index 0000000000..f6dc93b5ac --- /dev/null +++ b/tools/installer/icons/res/AIM/32_aim_NA.ico diff --git a/tools/installer/icons/res/AIM/32_aim_Occupied.ico b/tools/installer/icons/res/AIM/32_aim_Occupied.ico Binary files differnew file mode 100644 index 0000000000..f89c39625d --- /dev/null +++ b/tools/installer/icons/res/AIM/32_aim_Occupied.ico diff --git a/tools/installer/icons/res/AIM/32_aim_Offline.ico b/tools/installer/icons/res/AIM/32_aim_Offline.ico Binary files differnew file mode 100644 index 0000000000..54fabffaa7 --- /dev/null +++ b/tools/installer/icons/res/AIM/32_aim_Offline.ico diff --git a/tools/installer/icons/res/AIM/32_aim_Online.ico b/tools/installer/icons/res/AIM/32_aim_Online.ico Binary files differnew file mode 100644 index 0000000000..429afcc9ff --- /dev/null +++ b/tools/installer/icons/res/AIM/32_aim_Online.ico diff --git a/tools/installer/icons/res/AIM/32_aim_Phone.ico b/tools/installer/icons/res/AIM/32_aim_Phone.ico Binary files differnew file mode 100644 index 0000000000..5c568d67bf --- /dev/null +++ b/tools/installer/icons/res/AIM/32_aim_Phone.ico diff --git a/tools/installer/icons/res/AIM/8_aim_Away.ico b/tools/installer/icons/res/AIM/8_aim_Away.ico Binary files differnew file mode 100644 index 0000000000..fa26a1689e --- /dev/null +++ b/tools/installer/icons/res/AIM/8_aim_Away.ico diff --git a/tools/installer/icons/res/AIM/8_aim_DND.ico b/tools/installer/icons/res/AIM/8_aim_DND.ico Binary files differnew file mode 100644 index 0000000000..ce4f5cc56d --- /dev/null +++ b/tools/installer/icons/res/AIM/8_aim_DND.ico diff --git a/tools/installer/icons/res/AIM/8_aim_FFC.ico b/tools/installer/icons/res/AIM/8_aim_FFC.ico Binary files differnew file mode 100644 index 0000000000..f764b757c4 --- /dev/null +++ b/tools/installer/icons/res/AIM/8_aim_FFC.ico diff --git a/tools/installer/icons/res/AIM/8_aim_Invisible.ico b/tools/installer/icons/res/AIM/8_aim_Invisible.ico Binary files differnew file mode 100644 index 0000000000..f231c45b8d --- /dev/null +++ b/tools/installer/icons/res/AIM/8_aim_Invisible.ico diff --git a/tools/installer/icons/res/AIM/8_aim_Lunch.ico b/tools/installer/icons/res/AIM/8_aim_Lunch.ico Binary files differnew file mode 100644 index 0000000000..d1671bef4e --- /dev/null +++ b/tools/installer/icons/res/AIM/8_aim_Lunch.ico diff --git a/tools/installer/icons/res/AIM/8_aim_NA.ico b/tools/installer/icons/res/AIM/8_aim_NA.ico Binary files differnew file mode 100644 index 0000000000..fab7a8d037 --- /dev/null +++ b/tools/installer/icons/res/AIM/8_aim_NA.ico diff --git a/tools/installer/icons/res/AIM/8_aim_Occupied.ico b/tools/installer/icons/res/AIM/8_aim_Occupied.ico Binary files differnew file mode 100644 index 0000000000..fa6c135ec2 --- /dev/null +++ b/tools/installer/icons/res/AIM/8_aim_Occupied.ico diff --git a/tools/installer/icons/res/AIM/8_aim_Offline.ico b/tools/installer/icons/res/AIM/8_aim_Offline.ico Binary files differnew file mode 100644 index 0000000000..d859026988 --- /dev/null +++ b/tools/installer/icons/res/AIM/8_aim_Offline.ico diff --git a/tools/installer/icons/res/AIM/8_aim_Online.ico b/tools/installer/icons/res/AIM/8_aim_Online.ico Binary files differnew file mode 100644 index 0000000000..bcd70847da --- /dev/null +++ b/tools/installer/icons/res/AIM/8_aim_Online.ico diff --git a/tools/installer/icons/res/AIM/8_aim_Phone.ico b/tools/installer/icons/res/AIM/8_aim_Phone.ico Binary files differnew file mode 100644 index 0000000000..b7bd997967 --- /dev/null +++ b/tools/installer/icons/res/AIM/8_aim_Phone.ico diff --git a/tools/installer/icons/res/GG/32_gg_Away.ico b/tools/installer/icons/res/GG/32_gg_Away.ico Binary files differnew file mode 100644 index 0000000000..a3df6d4e79 --- /dev/null +++ b/tools/installer/icons/res/GG/32_gg_Away.ico diff --git a/tools/installer/icons/res/GG/32_gg_DND.ico b/tools/installer/icons/res/GG/32_gg_DND.ico Binary files differnew file mode 100644 index 0000000000..5f98ae7ab8 --- /dev/null +++ b/tools/installer/icons/res/GG/32_gg_DND.ico diff --git a/tools/installer/icons/res/GG/32_gg_FFC.ico b/tools/installer/icons/res/GG/32_gg_FFC.ico Binary files differnew file mode 100644 index 0000000000..d145072f08 --- /dev/null +++ b/tools/installer/icons/res/GG/32_gg_FFC.ico diff --git a/tools/installer/icons/res/GG/32_gg_Invisible.ico b/tools/installer/icons/res/GG/32_gg_Invisible.ico Binary files differnew file mode 100644 index 0000000000..a6949e34f9 --- /dev/null +++ b/tools/installer/icons/res/GG/32_gg_Invisible.ico diff --git a/tools/installer/icons/res/GG/32_gg_NA.ico b/tools/installer/icons/res/GG/32_gg_NA.ico Binary files differnew file mode 100644 index 0000000000..a0b460624c --- /dev/null +++ b/tools/installer/icons/res/GG/32_gg_NA.ico diff --git a/tools/installer/icons/res/GG/32_gg_Offline.ico b/tools/installer/icons/res/GG/32_gg_Offline.ico Binary files differnew file mode 100644 index 0000000000..f4093b78cc --- /dev/null +++ b/tools/installer/icons/res/GG/32_gg_Offline.ico diff --git a/tools/installer/icons/res/GG/32_gg_Online.ico b/tools/installer/icons/res/GG/32_gg_Online.ico Binary files differnew file mode 100644 index 0000000000..acbba11077 --- /dev/null +++ b/tools/installer/icons/res/GG/32_gg_Online.ico diff --git a/tools/installer/icons/res/GG/8_gg_Away.ico b/tools/installer/icons/res/GG/8_gg_Away.ico Binary files differnew file mode 100644 index 0000000000..4aa9fafdd4 --- /dev/null +++ b/tools/installer/icons/res/GG/8_gg_Away.ico diff --git a/tools/installer/icons/res/GG/8_gg_DND.ico b/tools/installer/icons/res/GG/8_gg_DND.ico Binary files differnew file mode 100644 index 0000000000..2bbc99620b --- /dev/null +++ b/tools/installer/icons/res/GG/8_gg_DND.ico diff --git a/tools/installer/icons/res/GG/8_gg_FFC.ico b/tools/installer/icons/res/GG/8_gg_FFC.ico Binary files differnew file mode 100644 index 0000000000..fcc1956365 --- /dev/null +++ b/tools/installer/icons/res/GG/8_gg_FFC.ico diff --git a/tools/installer/icons/res/GG/8_gg_Invisible.ico b/tools/installer/icons/res/GG/8_gg_Invisible.ico Binary files differnew file mode 100644 index 0000000000..a416268d85 --- /dev/null +++ b/tools/installer/icons/res/GG/8_gg_Invisible.ico diff --git a/tools/installer/icons/res/GG/8_gg_NA.ico b/tools/installer/icons/res/GG/8_gg_NA.ico Binary files differnew file mode 100644 index 0000000000..7b28f86624 --- /dev/null +++ b/tools/installer/icons/res/GG/8_gg_NA.ico diff --git a/tools/installer/icons/res/GG/8_gg_Offline.ico b/tools/installer/icons/res/GG/8_gg_Offline.ico Binary files differnew file mode 100644 index 0000000000..5ec90e4142 --- /dev/null +++ b/tools/installer/icons/res/GG/8_gg_Offline.ico diff --git a/tools/installer/icons/res/GG/8_gg_Online.ico b/tools/installer/icons/res/GG/8_gg_Online.ico Binary files differnew file mode 100644 index 0000000000..db72acd430 --- /dev/null +++ b/tools/installer/icons/res/GG/8_gg_Online.ico diff --git a/tools/installer/icons/res/ICQ/32_icq_Away.ico b/tools/installer/icons/res/ICQ/32_icq_Away.ico Binary files differnew file mode 100644 index 0000000000..248a3e9916 --- /dev/null +++ b/tools/installer/icons/res/ICQ/32_icq_Away.ico diff --git a/tools/installer/icons/res/ICQ/32_icq_DND.ico b/tools/installer/icons/res/ICQ/32_icq_DND.ico Binary files differnew file mode 100644 index 0000000000..4833160eac --- /dev/null +++ b/tools/installer/icons/res/ICQ/32_icq_DND.ico diff --git a/tools/installer/icons/res/ICQ/32_icq_FFC.ico b/tools/installer/icons/res/ICQ/32_icq_FFC.ico Binary files differnew file mode 100644 index 0000000000..e7ec4d3ae2 --- /dev/null +++ b/tools/installer/icons/res/ICQ/32_icq_FFC.ico diff --git a/tools/installer/icons/res/ICQ/32_icq_Invisible.ico b/tools/installer/icons/res/ICQ/32_icq_Invisible.ico Binary files differnew file mode 100644 index 0000000000..42f80a84cc --- /dev/null +++ b/tools/installer/icons/res/ICQ/32_icq_Invisible.ico diff --git a/tools/installer/icons/res/ICQ/32_icq_Lunch.ico b/tools/installer/icons/res/ICQ/32_icq_Lunch.ico Binary files differnew file mode 100644 index 0000000000..e88dd35a2e --- /dev/null +++ b/tools/installer/icons/res/ICQ/32_icq_Lunch.ico diff --git a/tools/installer/icons/res/ICQ/32_icq_NA.ico b/tools/installer/icons/res/ICQ/32_icq_NA.ico Binary files differnew file mode 100644 index 0000000000..ec0621dc9f --- /dev/null +++ b/tools/installer/icons/res/ICQ/32_icq_NA.ico diff --git a/tools/installer/icons/res/ICQ/32_icq_Occupied.ico b/tools/installer/icons/res/ICQ/32_icq_Occupied.ico Binary files differnew file mode 100644 index 0000000000..04ea2a5855 --- /dev/null +++ b/tools/installer/icons/res/ICQ/32_icq_Occupied.ico diff --git a/tools/installer/icons/res/ICQ/32_icq_Offline.ico b/tools/installer/icons/res/ICQ/32_icq_Offline.ico Binary files differnew file mode 100644 index 0000000000..af862168cd --- /dev/null +++ b/tools/installer/icons/res/ICQ/32_icq_Offline.ico diff --git a/tools/installer/icons/res/ICQ/32_icq_Online.ico b/tools/installer/icons/res/ICQ/32_icq_Online.ico Binary files differnew file mode 100644 index 0000000000..2e33305a76 --- /dev/null +++ b/tools/installer/icons/res/ICQ/32_icq_Online.ico diff --git a/tools/installer/icons/res/ICQ/32_icq_Phone.ico b/tools/installer/icons/res/ICQ/32_icq_Phone.ico Binary files differnew file mode 100644 index 0000000000..74c80b66ed --- /dev/null +++ b/tools/installer/icons/res/ICQ/32_icq_Phone.ico diff --git a/tools/installer/icons/res/ICQ/8_icq_Away.ico b/tools/installer/icons/res/ICQ/8_icq_Away.ico Binary files differnew file mode 100644 index 0000000000..b66daff406 --- /dev/null +++ b/tools/installer/icons/res/ICQ/8_icq_Away.ico diff --git a/tools/installer/icons/res/ICQ/8_icq_DND.ico b/tools/installer/icons/res/ICQ/8_icq_DND.ico Binary files differnew file mode 100644 index 0000000000..cb08b68bb3 --- /dev/null +++ b/tools/installer/icons/res/ICQ/8_icq_DND.ico diff --git a/tools/installer/icons/res/ICQ/8_icq_FFC.ico b/tools/installer/icons/res/ICQ/8_icq_FFC.ico Binary files differnew file mode 100644 index 0000000000..198981b196 --- /dev/null +++ b/tools/installer/icons/res/ICQ/8_icq_FFC.ico diff --git a/tools/installer/icons/res/ICQ/8_icq_Invisible.ico b/tools/installer/icons/res/ICQ/8_icq_Invisible.ico Binary files differnew file mode 100644 index 0000000000..f1985a1cfe --- /dev/null +++ b/tools/installer/icons/res/ICQ/8_icq_Invisible.ico diff --git a/tools/installer/icons/res/ICQ/8_icq_Lunch.ico b/tools/installer/icons/res/ICQ/8_icq_Lunch.ico Binary files differnew file mode 100644 index 0000000000..be86b5ce04 --- /dev/null +++ b/tools/installer/icons/res/ICQ/8_icq_Lunch.ico diff --git a/tools/installer/icons/res/ICQ/8_icq_NA.ico b/tools/installer/icons/res/ICQ/8_icq_NA.ico Binary files differnew file mode 100644 index 0000000000..53ac247cec --- /dev/null +++ b/tools/installer/icons/res/ICQ/8_icq_NA.ico diff --git a/tools/installer/icons/res/ICQ/8_icq_Occupied.ico b/tools/installer/icons/res/ICQ/8_icq_Occupied.ico Binary files differnew file mode 100644 index 0000000000..2b34792b8f --- /dev/null +++ b/tools/installer/icons/res/ICQ/8_icq_Occupied.ico diff --git a/tools/installer/icons/res/ICQ/8_icq_Offline.ico b/tools/installer/icons/res/ICQ/8_icq_Offline.ico Binary files differnew file mode 100644 index 0000000000..4a94663f96 --- /dev/null +++ b/tools/installer/icons/res/ICQ/8_icq_Offline.ico diff --git a/tools/installer/icons/res/ICQ/8_icq_Online.ico b/tools/installer/icons/res/ICQ/8_icq_Online.ico Binary files differnew file mode 100644 index 0000000000..ffaf5755c6 --- /dev/null +++ b/tools/installer/icons/res/ICQ/8_icq_Online.ico diff --git a/tools/installer/icons/res/ICQ/8_icq_Phone.ico b/tools/installer/icons/res/ICQ/8_icq_Phone.ico Binary files differnew file mode 100644 index 0000000000..ffd84a2802 --- /dev/null +++ b/tools/installer/icons/res/ICQ/8_icq_Phone.ico diff --git a/tools/installer/icons/res/IRC/32_irc_Away.ico b/tools/installer/icons/res/IRC/32_irc_Away.ico Binary files differnew file mode 100644 index 0000000000..a2391df85e --- /dev/null +++ b/tools/installer/icons/res/IRC/32_irc_Away.ico diff --git a/tools/installer/icons/res/IRC/32_irc_Offline.ico b/tools/installer/icons/res/IRC/32_irc_Offline.ico Binary files differnew file mode 100644 index 0000000000..a521360232 --- /dev/null +++ b/tools/installer/icons/res/IRC/32_irc_Offline.ico diff --git a/tools/installer/icons/res/IRC/32_irc_Online.ico b/tools/installer/icons/res/IRC/32_irc_Online.ico Binary files differnew file mode 100644 index 0000000000..37b885a806 --- /dev/null +++ b/tools/installer/icons/res/IRC/32_irc_Online.ico diff --git a/tools/installer/icons/res/IRC/8_irc_Away.ico b/tools/installer/icons/res/IRC/8_irc_Away.ico Binary files differnew file mode 100644 index 0000000000..b1fb5481b3 --- /dev/null +++ b/tools/installer/icons/res/IRC/8_irc_Away.ico diff --git a/tools/installer/icons/res/IRC/8_irc_Offline.ico b/tools/installer/icons/res/IRC/8_irc_Offline.ico Binary files differnew file mode 100644 index 0000000000..d36b6f0f79 --- /dev/null +++ b/tools/installer/icons/res/IRC/8_irc_Offline.ico diff --git a/tools/installer/icons/res/IRC/8_irc_Online.ico b/tools/installer/icons/res/IRC/8_irc_Online.ico Binary files differnew file mode 100644 index 0000000000..eb24605f52 --- /dev/null +++ b/tools/installer/icons/res/IRC/8_irc_Online.ico diff --git a/tools/installer/icons/res/JABBER/32_jabber_Away.ico b/tools/installer/icons/res/JABBER/32_jabber_Away.ico Binary files differnew file mode 100644 index 0000000000..fc97a61763 --- /dev/null +++ b/tools/installer/icons/res/JABBER/32_jabber_Away.ico diff --git a/tools/installer/icons/res/JABBER/32_jabber_DND.ico b/tools/installer/icons/res/JABBER/32_jabber_DND.ico Binary files differnew file mode 100644 index 0000000000..026c7256a7 --- /dev/null +++ b/tools/installer/icons/res/JABBER/32_jabber_DND.ico diff --git a/tools/installer/icons/res/JABBER/32_jabber_FFC.ico b/tools/installer/icons/res/JABBER/32_jabber_FFC.ico Binary files differnew file mode 100644 index 0000000000..dbc899c02a --- /dev/null +++ b/tools/installer/icons/res/JABBER/32_jabber_FFC.ico diff --git a/tools/installer/icons/res/JABBER/32_jabber_Invisible.ico b/tools/installer/icons/res/JABBER/32_jabber_Invisible.ico Binary files differnew file mode 100644 index 0000000000..9b6cc549e1 --- /dev/null +++ b/tools/installer/icons/res/JABBER/32_jabber_Invisible.ico diff --git a/tools/installer/icons/res/JABBER/32_jabber_Lunch.ico b/tools/installer/icons/res/JABBER/32_jabber_Lunch.ico Binary files differnew file mode 100644 index 0000000000..aad1ab9791 --- /dev/null +++ b/tools/installer/icons/res/JABBER/32_jabber_Lunch.ico diff --git a/tools/installer/icons/res/JABBER/32_jabber_NA.ico b/tools/installer/icons/res/JABBER/32_jabber_NA.ico Binary files differnew file mode 100644 index 0000000000..c23f527379 --- /dev/null +++ b/tools/installer/icons/res/JABBER/32_jabber_NA.ico diff --git a/tools/installer/icons/res/JABBER/32_jabber_Occupied.ico b/tools/installer/icons/res/JABBER/32_jabber_Occupied.ico Binary files differnew file mode 100644 index 0000000000..ed8697bea3 --- /dev/null +++ b/tools/installer/icons/res/JABBER/32_jabber_Occupied.ico diff --git a/tools/installer/icons/res/JABBER/32_jabber_Offline.ico b/tools/installer/icons/res/JABBER/32_jabber_Offline.ico Binary files differnew file mode 100644 index 0000000000..e86406abbc --- /dev/null +++ b/tools/installer/icons/res/JABBER/32_jabber_Offline.ico diff --git a/tools/installer/icons/res/JABBER/32_jabber_Online.ico b/tools/installer/icons/res/JABBER/32_jabber_Online.ico Binary files differnew file mode 100644 index 0000000000..0d3b5e0ce2 --- /dev/null +++ b/tools/installer/icons/res/JABBER/32_jabber_Online.ico diff --git a/tools/installer/icons/res/JABBER/32_jabber_Phone.ico b/tools/installer/icons/res/JABBER/32_jabber_Phone.ico Binary files differnew file mode 100644 index 0000000000..b66544261c --- /dev/null +++ b/tools/installer/icons/res/JABBER/32_jabber_Phone.ico diff --git a/tools/installer/icons/res/JABBER/8_jabber_Away.ico b/tools/installer/icons/res/JABBER/8_jabber_Away.ico Binary files differnew file mode 100644 index 0000000000..39f79e4b68 --- /dev/null +++ b/tools/installer/icons/res/JABBER/8_jabber_Away.ico diff --git a/tools/installer/icons/res/JABBER/8_jabber_DND.ico b/tools/installer/icons/res/JABBER/8_jabber_DND.ico Binary files differnew file mode 100644 index 0000000000..5e6727f5b9 --- /dev/null +++ b/tools/installer/icons/res/JABBER/8_jabber_DND.ico diff --git a/tools/installer/icons/res/JABBER/8_jabber_FFC.ico b/tools/installer/icons/res/JABBER/8_jabber_FFC.ico Binary files differnew file mode 100644 index 0000000000..1777876640 --- /dev/null +++ b/tools/installer/icons/res/JABBER/8_jabber_FFC.ico diff --git a/tools/installer/icons/res/JABBER/8_jabber_Invisible.ico b/tools/installer/icons/res/JABBER/8_jabber_Invisible.ico Binary files differnew file mode 100644 index 0000000000..e46dd186b0 --- /dev/null +++ b/tools/installer/icons/res/JABBER/8_jabber_Invisible.ico diff --git a/tools/installer/icons/res/JABBER/8_jabber_Lunch.ico b/tools/installer/icons/res/JABBER/8_jabber_Lunch.ico Binary files differnew file mode 100644 index 0000000000..3166f3263c --- /dev/null +++ b/tools/installer/icons/res/JABBER/8_jabber_Lunch.ico diff --git a/tools/installer/icons/res/JABBER/8_jabber_NA.ico b/tools/installer/icons/res/JABBER/8_jabber_NA.ico Binary files differnew file mode 100644 index 0000000000..c8cb60a156 --- /dev/null +++ b/tools/installer/icons/res/JABBER/8_jabber_NA.ico diff --git a/tools/installer/icons/res/JABBER/8_jabber_Occupied.ico b/tools/installer/icons/res/JABBER/8_jabber_Occupied.ico Binary files differnew file mode 100644 index 0000000000..141e487711 --- /dev/null +++ b/tools/installer/icons/res/JABBER/8_jabber_Occupied.ico diff --git a/tools/installer/icons/res/JABBER/8_jabber_Offline.ico b/tools/installer/icons/res/JABBER/8_jabber_Offline.ico Binary files differnew file mode 100644 index 0000000000..a8da8ad81a --- /dev/null +++ b/tools/installer/icons/res/JABBER/8_jabber_Offline.ico diff --git a/tools/installer/icons/res/JABBER/8_jabber_Online.ico b/tools/installer/icons/res/JABBER/8_jabber_Online.ico Binary files differnew file mode 100644 index 0000000000..5727cfce57 --- /dev/null +++ b/tools/installer/icons/res/JABBER/8_jabber_Online.ico diff --git a/tools/installer/icons/res/JABBER/8_jabber_Phone.ico b/tools/installer/icons/res/JABBER/8_jabber_Phone.ico Binary files differnew file mode 100644 index 0000000000..7adf607d5a --- /dev/null +++ b/tools/installer/icons/res/JABBER/8_jabber_Phone.ico diff --git a/tools/installer/icons/res/MSN/32_msn_Away.ico b/tools/installer/icons/res/MSN/32_msn_Away.ico Binary files differnew file mode 100644 index 0000000000..7d058cea73 --- /dev/null +++ b/tools/installer/icons/res/MSN/32_msn_Away.ico diff --git a/tools/installer/icons/res/MSN/32_msn_DND.ico b/tools/installer/icons/res/MSN/32_msn_DND.ico Binary files differnew file mode 100644 index 0000000000..c59387be4d --- /dev/null +++ b/tools/installer/icons/res/MSN/32_msn_DND.ico diff --git a/tools/installer/icons/res/MSN/32_msn_FFC.ico b/tools/installer/icons/res/MSN/32_msn_FFC.ico Binary files differnew file mode 100644 index 0000000000..1f8a5b199f --- /dev/null +++ b/tools/installer/icons/res/MSN/32_msn_FFC.ico diff --git a/tools/installer/icons/res/MSN/32_msn_Invisible.ico b/tools/installer/icons/res/MSN/32_msn_Invisible.ico Binary files differnew file mode 100644 index 0000000000..b54168cc94 --- /dev/null +++ b/tools/installer/icons/res/MSN/32_msn_Invisible.ico diff --git a/tools/installer/icons/res/MSN/32_msn_Lunch.ico b/tools/installer/icons/res/MSN/32_msn_Lunch.ico Binary files differnew file mode 100644 index 0000000000..712bac8b31 --- /dev/null +++ b/tools/installer/icons/res/MSN/32_msn_Lunch.ico diff --git a/tools/installer/icons/res/MSN/32_msn_NA.ico b/tools/installer/icons/res/MSN/32_msn_NA.ico Binary files differnew file mode 100644 index 0000000000..790436c42d --- /dev/null +++ b/tools/installer/icons/res/MSN/32_msn_NA.ico diff --git a/tools/installer/icons/res/MSN/32_msn_Occupied.ico b/tools/installer/icons/res/MSN/32_msn_Occupied.ico Binary files differnew file mode 100644 index 0000000000..7699d5bd16 --- /dev/null +++ b/tools/installer/icons/res/MSN/32_msn_Occupied.ico diff --git a/tools/installer/icons/res/MSN/32_msn_Offline.ico b/tools/installer/icons/res/MSN/32_msn_Offline.ico Binary files differnew file mode 100644 index 0000000000..dffd80e7a0 --- /dev/null +++ b/tools/installer/icons/res/MSN/32_msn_Offline.ico diff --git a/tools/installer/icons/res/MSN/32_msn_Online.ico b/tools/installer/icons/res/MSN/32_msn_Online.ico Binary files differnew file mode 100644 index 0000000000..818824f3a0 --- /dev/null +++ b/tools/installer/icons/res/MSN/32_msn_Online.ico diff --git a/tools/installer/icons/res/MSN/32_msn_Phone.ico b/tools/installer/icons/res/MSN/32_msn_Phone.ico Binary files differnew file mode 100644 index 0000000000..01a806af22 --- /dev/null +++ b/tools/installer/icons/res/MSN/32_msn_Phone.ico diff --git a/tools/installer/icons/res/MSN/8_msn_Away.ico b/tools/installer/icons/res/MSN/8_msn_Away.ico Binary files differnew file mode 100644 index 0000000000..e81618b8f7 --- /dev/null +++ b/tools/installer/icons/res/MSN/8_msn_Away.ico diff --git a/tools/installer/icons/res/MSN/8_msn_DND.ico b/tools/installer/icons/res/MSN/8_msn_DND.ico Binary files differnew file mode 100644 index 0000000000..e20a67dddf --- /dev/null +++ b/tools/installer/icons/res/MSN/8_msn_DND.ico diff --git a/tools/installer/icons/res/MSN/8_msn_FFC.ico b/tools/installer/icons/res/MSN/8_msn_FFC.ico Binary files differnew file mode 100644 index 0000000000..4638c33321 --- /dev/null +++ b/tools/installer/icons/res/MSN/8_msn_FFC.ico diff --git a/tools/installer/icons/res/MSN/8_msn_Invisible.ico b/tools/installer/icons/res/MSN/8_msn_Invisible.ico Binary files differnew file mode 100644 index 0000000000..3bd1550c6a --- /dev/null +++ b/tools/installer/icons/res/MSN/8_msn_Invisible.ico diff --git a/tools/installer/icons/res/MSN/8_msn_Lunch.ico b/tools/installer/icons/res/MSN/8_msn_Lunch.ico Binary files differnew file mode 100644 index 0000000000..4a0ab90253 --- /dev/null +++ b/tools/installer/icons/res/MSN/8_msn_Lunch.ico diff --git a/tools/installer/icons/res/MSN/8_msn_NA.ico b/tools/installer/icons/res/MSN/8_msn_NA.ico Binary files differnew file mode 100644 index 0000000000..5c57a0689e --- /dev/null +++ b/tools/installer/icons/res/MSN/8_msn_NA.ico diff --git a/tools/installer/icons/res/MSN/8_msn_Occupied.ico b/tools/installer/icons/res/MSN/8_msn_Occupied.ico Binary files differnew file mode 100644 index 0000000000..75c1872eef --- /dev/null +++ b/tools/installer/icons/res/MSN/8_msn_Occupied.ico diff --git a/tools/installer/icons/res/MSN/8_msn_Offline.ico b/tools/installer/icons/res/MSN/8_msn_Offline.ico Binary files differnew file mode 100644 index 0000000000..5fc7722be1 --- /dev/null +++ b/tools/installer/icons/res/MSN/8_msn_Offline.ico diff --git a/tools/installer/icons/res/MSN/8_msn_Online.ico b/tools/installer/icons/res/MSN/8_msn_Online.ico Binary files differnew file mode 100644 index 0000000000..a12a560d54 --- /dev/null +++ b/tools/installer/icons/res/MSN/8_msn_Online.ico diff --git a/tools/installer/icons/res/MSN/8_msn_Phone.ico b/tools/installer/icons/res/MSN/8_msn_Phone.ico Binary files differnew file mode 100644 index 0000000000..9de5474cf9 --- /dev/null +++ b/tools/installer/icons/res/MSN/8_msn_Phone.ico diff --git a/tools/installer/icons/res/YAHOO/32_yahoo_Away.ico b/tools/installer/icons/res/YAHOO/32_yahoo_Away.ico Binary files differnew file mode 100644 index 0000000000..82d132c8d3 --- /dev/null +++ b/tools/installer/icons/res/YAHOO/32_yahoo_Away.ico diff --git a/tools/installer/icons/res/YAHOO/32_yahoo_DND.ico b/tools/installer/icons/res/YAHOO/32_yahoo_DND.ico Binary files differnew file mode 100644 index 0000000000..f6357e08bc --- /dev/null +++ b/tools/installer/icons/res/YAHOO/32_yahoo_DND.ico diff --git a/tools/installer/icons/res/YAHOO/32_yahoo_FFC.ico b/tools/installer/icons/res/YAHOO/32_yahoo_FFC.ico Binary files differnew file mode 100644 index 0000000000..e213ec5f59 --- /dev/null +++ b/tools/installer/icons/res/YAHOO/32_yahoo_FFC.ico diff --git a/tools/installer/icons/res/YAHOO/32_yahoo_Invisible.ico b/tools/installer/icons/res/YAHOO/32_yahoo_Invisible.ico Binary files differnew file mode 100644 index 0000000000..8e2c4744f5 --- /dev/null +++ b/tools/installer/icons/res/YAHOO/32_yahoo_Invisible.ico diff --git a/tools/installer/icons/res/YAHOO/32_yahoo_Lunch.ico b/tools/installer/icons/res/YAHOO/32_yahoo_Lunch.ico Binary files differnew file mode 100644 index 0000000000..9dc1968611 --- /dev/null +++ b/tools/installer/icons/res/YAHOO/32_yahoo_Lunch.ico diff --git a/tools/installer/icons/res/YAHOO/32_yahoo_NA.ico b/tools/installer/icons/res/YAHOO/32_yahoo_NA.ico Binary files differnew file mode 100644 index 0000000000..534691e78b --- /dev/null +++ b/tools/installer/icons/res/YAHOO/32_yahoo_NA.ico diff --git a/tools/installer/icons/res/YAHOO/32_yahoo_Occupied.ico b/tools/installer/icons/res/YAHOO/32_yahoo_Occupied.ico Binary files differnew file mode 100644 index 0000000000..0e7fd434a3 --- /dev/null +++ b/tools/installer/icons/res/YAHOO/32_yahoo_Occupied.ico diff --git a/tools/installer/icons/res/YAHOO/32_yahoo_Offline.ico b/tools/installer/icons/res/YAHOO/32_yahoo_Offline.ico Binary files differnew file mode 100644 index 0000000000..fd0d04104e --- /dev/null +++ b/tools/installer/icons/res/YAHOO/32_yahoo_Offline.ico diff --git a/tools/installer/icons/res/YAHOO/32_yahoo_Online.ico b/tools/installer/icons/res/YAHOO/32_yahoo_Online.ico Binary files differnew file mode 100644 index 0000000000..1d559e0676 --- /dev/null +++ b/tools/installer/icons/res/YAHOO/32_yahoo_Online.ico diff --git a/tools/installer/icons/res/YAHOO/32_yahoo_Phone.ico b/tools/installer/icons/res/YAHOO/32_yahoo_Phone.ico Binary files differnew file mode 100644 index 0000000000..9279d34c86 --- /dev/null +++ b/tools/installer/icons/res/YAHOO/32_yahoo_Phone.ico diff --git a/tools/installer/icons/res/YAHOO/8_yahoo_Away.ico b/tools/installer/icons/res/YAHOO/8_yahoo_Away.ico Binary files differnew file mode 100644 index 0000000000..18c83f7065 --- /dev/null +++ b/tools/installer/icons/res/YAHOO/8_yahoo_Away.ico diff --git a/tools/installer/icons/res/YAHOO/8_yahoo_DND.ico b/tools/installer/icons/res/YAHOO/8_yahoo_DND.ico Binary files differnew file mode 100644 index 0000000000..3003fc79fc --- /dev/null +++ b/tools/installer/icons/res/YAHOO/8_yahoo_DND.ico diff --git a/tools/installer/icons/res/YAHOO/8_yahoo_FFC.ico b/tools/installer/icons/res/YAHOO/8_yahoo_FFC.ico Binary files differnew file mode 100644 index 0000000000..7526f8e1d1 --- /dev/null +++ b/tools/installer/icons/res/YAHOO/8_yahoo_FFC.ico diff --git a/tools/installer/icons/res/YAHOO/8_yahoo_Invisible.ico b/tools/installer/icons/res/YAHOO/8_yahoo_Invisible.ico Binary files differnew file mode 100644 index 0000000000..03cafe0d45 --- /dev/null +++ b/tools/installer/icons/res/YAHOO/8_yahoo_Invisible.ico diff --git a/tools/installer/icons/res/YAHOO/8_yahoo_Lunch.ico b/tools/installer/icons/res/YAHOO/8_yahoo_Lunch.ico Binary files differnew file mode 100644 index 0000000000..89638253bd --- /dev/null +++ b/tools/installer/icons/res/YAHOO/8_yahoo_Lunch.ico diff --git a/tools/installer/icons/res/YAHOO/8_yahoo_NA.ico b/tools/installer/icons/res/YAHOO/8_yahoo_NA.ico Binary files differnew file mode 100644 index 0000000000..bdfd99bb57 --- /dev/null +++ b/tools/installer/icons/res/YAHOO/8_yahoo_NA.ico diff --git a/tools/installer/icons/res/YAHOO/8_yahoo_Occupied.ico b/tools/installer/icons/res/YAHOO/8_yahoo_Occupied.ico Binary files differnew file mode 100644 index 0000000000..e118f8bd99 --- /dev/null +++ b/tools/installer/icons/res/YAHOO/8_yahoo_Occupied.ico diff --git a/tools/installer/icons/res/YAHOO/8_yahoo_Offline.ico b/tools/installer/icons/res/YAHOO/8_yahoo_Offline.ico Binary files differnew file mode 100644 index 0000000000..e34b073446 --- /dev/null +++ b/tools/installer/icons/res/YAHOO/8_yahoo_Offline.ico diff --git a/tools/installer/icons/res/YAHOO/8_yahoo_Online.ico b/tools/installer/icons/res/YAHOO/8_yahoo_Online.ico Binary files differnew file mode 100644 index 0000000000..6bc32598fb --- /dev/null +++ b/tools/installer/icons/res/YAHOO/8_yahoo_Online.ico diff --git a/tools/installer/icons/res/YAHOO/8_yahoo_Phone.ico b/tools/installer/icons/res/YAHOO/8_yahoo_Phone.ico Binary files differnew file mode 100644 index 0000000000..026aa84d59 --- /dev/null +++ b/tools/installer/icons/res/YAHOO/8_yahoo_Phone.ico diff --git a/tools/installer/icons/resource.rc b/tools/installer/icons/resource.rc new file mode 100644 index 0000000000..19c1ccd32d --- /dev/null +++ b/tools/installer/icons/resource.rc @@ -0,0 +1,150 @@ +#include <windows.h>
+
+#define IDI_OFFLINE 105
+#define IDI_ONLINE 104
+#define IDI_AWAY 128
+#define IDI_INVISIBLE 130
+#define IDI_NA 131
+#define IDI_DND 158
+#define IDI_OCCUPIED 159
+#define IDI_FREE4CHAT 129
+#define IDI_OUTTOLUNCH 1003
+#define IDI_ONTHEPHONE 1002
+
+#ifdef ICO_AIMHI
+IDI_OFFLINE ICON DISCARDABLE "res\\AIM\\32_aim_Offline.ico"
+IDI_ONLINE ICON DISCARDABLE "res\\AIM\\32_aim_Online.ico"
+IDI_AWAY ICON DISCARDABLE "res\\AIM\\32_aim_Away.ico"
+IDI_INVISIBLE ICON DISCARDABLE "res\\AIM\\32_aim_Invisible.ico"
+IDI_ONTHEPHONE ICON DISCARDABLE "res\\AIM\\32_aim_Phone.ico"
+#endif
+
+#ifdef ICO_AIMLO
+IDI_OFFLINE ICON DISCARDABLE "res\\AIM\\8_aim_Offline.ico"
+IDI_ONLINE ICON DISCARDABLE "res\\AIM\\8_aim_Online.ico"
+IDI_AWAY ICON DISCARDABLE "res\\AIM\\8_aim_Away.ico"
+IDI_INVISIBLE ICON DISCARDABLE "res\\AIM\\8_aim_Invisible.ico"
+IDI_ONTHEPHONE ICON DISCARDABLE "res\\AIM\\8_aim_Phone.ico"
+#endif
+
+#ifdef ICO_GGHI
+IDI_OFFLINE ICON DISCARDABLE "res\\GG\\32_gg_Offline.ico"
+IDI_ONLINE ICON DISCARDABLE "res\\GG\\32_gg_Online.ico"
+IDI_AWAY ICON DISCARDABLE "res\\GG\\32_gg_Away.ico"
+IDI_INVISIBLE ICON DISCARDABLE "res\\GG\\32_gg_Invisible.ico"
+IDI_NA ICON DISCARDABLE "res\\GG\\32_gg_NA.ico"
+IDI_DND ICON DISCARDABLE "res\\GG\\32_gg_DND.ico"
+IDI_FREE4CHAT ICON DISCARDABLE "res\\GG\\32_gg_FFC.ico"
+#endif
+
+#ifdef ICO_GGLO
+IDI_OFFLINE ICON DISCARDABLE "res\\GG\\8_gg_Offline.ico"
+IDI_ONLINE ICON DISCARDABLE "res\\GG\\8_gg_Online.ico"
+IDI_AWAY ICON DISCARDABLE "res\\GG\\8_gg_Away.ico"
+IDI_INVISIBLE ICON DISCARDABLE "res\\GG\\8_gg_Invisible.ico"
+IDI_NA ICON DISCARDABLE "res\\GG\\8_gg_NA.ico"
+IDI_DND ICON DISCARDABLE "res\\GG\\8_gg_DND.ico"
+IDI_FREE4CHAT ICON DISCARDABLE "res\\GG\\8_gg_FFC.ico"
+#endif
+
+#ifdef ICO_ICQHI
+IDI_OFFLINE ICON DISCARDABLE "res\\ICQ\\32_icq_Offline.ico"
+IDI_ONLINE ICON DISCARDABLE "res\\ICQ\\32_icq_Online.ico"
+IDI_AWAY ICON DISCARDABLE "res\\ICQ\\32_icq_Away.ico"
+IDI_INVISIBLE ICON DISCARDABLE "res\\ICQ\\32_icq_Invisible.ico"
+IDI_NA ICON DISCARDABLE "res\\ICQ\\32_icq_Na.ico"
+IDI_DND ICON DISCARDABLE "res\\ICQ\\32_icq_Dnd.ico"
+IDI_OCCUPIED ICON DISCARDABLE "res\\ICQ\\32_icq_Occupied.ico"
+IDI_FREE4CHAT ICON DISCARDABLE "res\\ICQ\\32_icq_FFC.ico"
+IDI_ONTHEPHONE ICON DISCARDABLE "res\\ICQ\\32_icq_Phone.ico"
+#endif
+
+#ifdef ICO_ICQLO
+IDI_OFFLINE ICON DISCARDABLE "res\\ICQ\\8_icq_Offline.ico"
+IDI_ONLINE ICON DISCARDABLE "res\\ICQ\\8_icq_Online.ico"
+IDI_AWAY ICON DISCARDABLE "res\\ICQ\\8_icq_Away.ico"
+IDI_INVISIBLE ICON DISCARDABLE "res\\ICQ\\8_icq_Invisible.ico"
+IDI_NA ICON DISCARDABLE "res\\ICQ\\8_icq_Na.ico"
+IDI_DND ICON DISCARDABLE "res\\ICQ\\8_icq_Dnd.ico"
+IDI_OCCUPIED ICON DISCARDABLE "res\\ICQ\\8_icq_Occupied.ico"
+IDI_FREE4CHAT ICON DISCARDABLE "res\\ICQ\\8_icq_FFC.ico"
+IDI_ONTHEPHONE ICON DISCARDABLE "res\\ICQ\\8_icq_Phone.ico"
+#endif
+
+#ifdef ICO_IRCHI
+IDI_OFFLINE ICON DISCARDABLE "res\\IRC\\32_irc_Offline.ico"
+IDI_ONLINE ICON DISCARDABLE "res\\IRC\\32_irc_Online.ico"
+IDI_AWAY ICON DISCARDABLE "res\\IRC\\32_irc_Away.ico"
+#endif
+
+#ifdef ICO_IRCLO
+IDI_OFFLINE ICON DISCARDABLE "res\\IRC\\8_irc_Offline.ico"
+IDI_ONLINE ICON DISCARDABLE "res\\IRC\\8_irc_Online.ico"
+IDI_AWAY ICON DISCARDABLE "res\\IRC\\8_irc_Away.ico"
+#endif
+
+#ifdef ICO_JABBERHI
+IDI_OFFLINE ICON DISCARDABLE "res\\JABBER\\32_jabber_Offline.ico"
+IDI_ONLINE ICON DISCARDABLE "res\\JABBER\\32_jabber_Online.ico"
+IDI_AWAY ICON DISCARDABLE "res\\JABBER\\32_jabber_Away.ico"
+IDI_INVISIBLE ICON DISCARDABLE "res\\JABBER\\32_jabber_Invisible.ico"
+IDI_NA ICON DISCARDABLE "res\\JABBER\\32_jabber_NA.ico"
+IDI_DND ICON DISCARDABLE "res\\JABBER\\32_jabber_DND.ico"
+IDI_FREE4CHAT ICON DISCARDABLE "res\\JABBER\\32_jabber_FFC.ico"
+#endif
+
+#ifdef ICO_JABBERLO
+IDI_OFFLINE ICON DISCARDABLE "res\\JABBER\\8_jabber_Offline.ico"
+IDI_ONLINE ICON DISCARDABLE "res\\JABBER\\8_jabber_Online.ico"
+IDI_AWAY ICON DISCARDABLE "res\\JABBER\\8_jabber_Away.ico"
+IDI_INVISIBLE ICON DISCARDABLE "res\\JABBER\\8_jabber_Invisible.ico"
+IDI_NA ICON DISCARDABLE "res\\JABBER\\8_jabber_NA.ico"
+IDI_DND ICON DISCARDABLE "res\\JABBER\\8_jabber_DND.ico"
+IDI_FREE4CHAT ICON DISCARDABLE "res\\JABBER\\8_jabber_FFC.ico"
+#endif
+
+#ifdef ICO_MSNHI
+IDI_OFFLINE ICON DISCARDABLE "res\\MSN\\32_msn_Offline.ico"
+IDI_ONLINE ICON DISCARDABLE "res\\MSN\\32_msn_Online.ico"
+IDI_AWAY ICON DISCARDABLE "res\\MSN\\32_msn_Away.ico"
+IDI_INVISIBLE ICON DISCARDABLE "res\\MSN\\32_msn_Invisible.ico"
+IDI_NA ICON DISCARDABLE "res\\MSN\\32_msn_NA.ico"
+IDI_OCCUPIED ICON DISCARDABLE "res\\MSN\\32_msn_Occupied.ico"
+IDI_OUTTOLUNCH ICON DISCARDABLE "res\\MSN\\32_msn_Lunch.ico"
+IDI_ONTHEPHONE ICON DISCARDABLE "res\\MSN\\32_msn_Phone.ico"
+#endif
+
+#ifdef ICO_MSNLO
+IDI_OFFLINE ICON DISCARDABLE "res\\MSN\\8_msn_Offline.ico"
+IDI_ONLINE ICON DISCARDABLE "res\\MSN\\8_msn_Online.ico"
+IDI_AWAY ICON DISCARDABLE "res\\MSN\\8_msn_Away.ico"
+IDI_INVISIBLE ICON DISCARDABLE "res\\MSN\\8_msn_Invisible.ico"
+IDI_NA ICON DISCARDABLE "res\\MSN\\8_msn_NA.ico"
+IDI_OCCUPIED ICON DISCARDABLE "res\\MSN\\8_msn_Occupied.ico"
+IDI_OUTTOLUNCH ICON DISCARDABLE "res\\MSN\\8_msn_Lunch.ico"
+IDI_ONTHEPHONE ICON DISCARDABLE "res\\MSN\\8_msn_Phone.ico"
+#endif
+
+#ifdef ICO_YAHOOHI
+IDI_OFFLINE ICON DISCARDABLE "res\\YAHOO\\32_yahoo_Offline.ico"
+IDI_ONLINE ICON DISCARDABLE "res\\YAHOO\\32_yahoo_Online.ico"
+IDI_AWAY ICON DISCARDABLE "res\\YAHOO\\32_yahoo_Away.ico"
+IDI_INVISIBLE ICON DISCARDABLE "res\\YAHOO\\32_yahoo_Invisible.ico"
+IDI_NA ICON DISCARDABLE "res\\YAHOO\\32_yahoo_NA.ico"
+IDI_DND ICON DISCARDABLE "res\\YAHOO\\32_yahoo_DND.ico"
+IDI_OCCUPIED ICON DISCARDABLE "res\\YAHOO\\32_yahoo_Occupied.ico"
+IDI_OUTTOLUNCH ICON DISCARDABLE "res\\YAHOO\\32_yahoo_Lunch.ico"
+IDI_ONTHEPHONE ICON DISCARDABLE "res\\YAHOO\\32_yahoo_Phone.ico"
+#endif
+
+#ifdef ICO_YAHOOLO
+IDI_OFFLINE ICON DISCARDABLE "res\\YAHOO\\8_yahoo_Offline.ico"
+IDI_ONLINE ICON DISCARDABLE "res\\YAHOO\\8_yahoo_Online.ico"
+IDI_AWAY ICON DISCARDABLE "res\\YAHOO\\8_yahoo_Away.ico"
+IDI_INVISIBLE ICON DISCARDABLE "res\\YAHOO\\8_yahoo_Invisible.ico"
+IDI_NA ICON DISCARDABLE "res\\YAHOO\\8_yahoo_NA.ico"
+IDI_DND ICON DISCARDABLE "res\\YAHOO\\8_yahoo_DND.ico"
+IDI_OCCUPIED ICON DISCARDABLE "res\\YAHOO\\8_yahoo_Occupied.ico"
+IDI_OUTTOLUNCH ICON DISCARDABLE "res\\YAHOO\\8_yahoo_Lunch.ico"
+IDI_ONTHEPHONE ICON DISCARDABLE "res\\YAHOO\\8_yahoo_Phone.ico"
+#endif
diff --git a/tools/installer/miranda-core.nsi b/tools/installer/miranda-core.nsi new file mode 100644 index 0000000000..90ee6ce249 --- /dev/null +++ b/tools/installer/miranda-core.nsi @@ -0,0 +1,390 @@ +!include "MUI.nsh"
+!include "Sections.nsh"
+!include "WinVer.nsh"
+!include "LogicLib.nsh"
+
+!include "miranda-version.nsi"
+
+!define MIM_NAME "Miranda IM"
+
+!define MIM_BUILD_ICONS_LOW "icons\bin\locolor"
+!define MIM_BUILD_ICONS_HI "icons\bin\hicolor"
+!define MIM_BUILD_OPTIONS_FILE "miranda32.lst"
+!define MIM_BUILD_OPTIONS_SECT "InstalledSections"
+
+!ifdef MIM_BUILD_UNICODE
+!define MIM_BUILD_TYPE "unicode"
+!define MIM_BUILD_DIR "..\..\miranda\bin\Release Unicode"
+!else
+!define MIM_BUILD_TYPE "ansi"
+!define MIM_BUILD_DIR "..\..\miranda\bin\Release"
+!endif
+!define MIM_BUILD_DIRANSI "..\..\miranda\bin\Release"
+!define MIM_BUILD_SRC "..\..\miranda"
+
+
+!if ${MIM_BETA} != 0
+Name "${MIM_NAME} ${MIM_VERSION} Beta ${MIM_BETA}"
+!if ${MIM_BUILD_TYPE} = "unicode"
+OutFile "..\..\miranda\bin\miranda-im-v${MIM_VERSION}b${MIM_BETA}w.exe"
+!else
+OutFile "..\..\miranda\bin\miranda-im-v${MIM_VERSION}b${MIM_BETA}.exe"
+!endif
+!else
+Name "${MIM_NAME} ${MIM_VERSION}"
+OutFile "..\..\miranda\bin\miranda-im-v${MIM_VERSION}-${MIM_BUILD_TYPE}.exe"
+!endif
+
+InstallDir "$PROGRAMFILES\Miranda IM"
+InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\miranda32.exe" "Path"
+SetCompressor lzma
+SetOverWrite on
+BrandingText "www.miranda-im.org"
+
+VAR INST_UPGRADE
+VAR INST_SUCCESS
+VAR INST_MODE
+VAR INST_DIR
+
+!define MUI_HEADERIMAGE
+!define MUI_HEADERIMAGE_BITMAP "Graphics\header.bmp"
+!define MUI_HEADERIMAGE_UNBITMAP "Graphics\header.bmp"
+!define MUI_WELCOMEFINISHPAGE_BITMAP "Graphics\welcome.bmp"
+!define MUI_UNWELCOMEFINISHPAGE_BITMAP "Graphics\welcome.bmp"
+!define MUI_ICON "Graphics\install.ico"
+!define MUI_UNICON "Graphics\uninstall.ico"
+!define MUI_ABORTWARNING
+!define MUI_COMPONENTSPAGE_NODESC
+!define MUI_LICENSEPAGE_BGCOLOR /grey
+!define MUI_FINISHPAGE_RUN $INSTDIR\miranda32.exe
+!define MUI_FINISHPAGE_RUN_TEXT "Start Miranda IM"
+!define MUI_FINISHPAGE_SHOWREADME $INSTDIR\readme.txt
+!define MUI_FINISHPAGE_SHOWREADME_TEXT "View Readme"
+!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
+!define MUI_FINISHPAGE_LINK "Support Miranda IM"
+!define MUI_FINISHPAGE_LINK_LOCATION "http://www.miranda-im.org/donate/"
+
+!insertmacro MUI_PAGE_LICENSE "${MIM_BUILD_SRC}\docs\license.txt"
+Page Custom CustomInstallPage CustomInstallPageLeave
+!define MUI_DIRECTORYPAGE_VARIABLE $INST_DIR
+!define MUI_PAGE_CUSTOMFUNCTION_LEAVE VerifyInstallDir
+!define MUI_PAGE_CUSTOMFUNCTION_PRE VerifyDirectoryDisplay
+!insertmacro MUI_PAGE_DIRECTORY
+!define MUI_PAGE_CUSTOMFUNCTION_PRE VerifyComponentDisplay
+!insertmacro MUI_PAGE_COMPONENTS
+!insertmacro MUI_PAGE_INSTFILES
+!insertmacro MUI_PAGE_FINISH
+
+!insertmacro MUI_UNPAGE_CONFIRM
+!insertmacro MUI_UNPAGE_INSTFILES
+
+!insertmacro MUI_LANGUAGE "English"
+
+!macro PrintInstallerDetails Details
+ SetDetailsPrint textonly
+ DetailPrint "${Details}"
+ SetDetailsPrint listonly
+!macroend
+
+!macro InstallMirandaProtoIcon IconFile
+ SetOutPath "$INSTDIR\Icons"
+ SetOverWrite off
+ !ifdef MIM_BUILD_UNICODE
+ ${If} ${AtLeastWinXP}
+ File "${MIM_BUILD_ICONS_HI}\proto_${IconFile}.dll"
+ ${Else}
+ File "${MIM_BUILD_ICONS_LOW}\proto_${IconFile}.dll"
+ ${EndIf}
+ !else
+ File "${MIM_BUILD_ICONS_LOW}\proto_${IconFile}.dll"
+ !endif
+ SetOverWrite on
+!macroend
+
+!macro InstallMirandaPlugin PluginFile
+ SetOutPath "$INSTDIR\Plugins"
+ File "${MIM_BUILD_DIR}\plugins\${PluginFile}"
+!macroend
+
+!macro InstallMirandaPluginANSI PluginFile
+ SetOutPath "$INSTDIR\Plugins"
+ File "${MIM_BUILD_DIRANSI}\plugins\${PluginFile}"
+!macroend
+
+!macro WriteInstallerOption IniOption IniValue
+ ${If} $INST_MODE = 0
+ SetOutPath "$INSTDIR"
+ WriteINIStr "$INSTDIR\${MIM_BUILD_OPTIONS_FILE}" "${MIM_BUILD_OPTIONS_SECT}" "${IniValue}" "${IniOption}"
+ ${EndIf}
+!macroend
+
+Section "Miranda IM (core)"
+ SectionIn RO
+ !insertmacro PrintInstallerDetails "Installing Miranda IM Core Files..."
+
+ !insertmacro WriteInstallerOption "0" "Import"
+ !insertmacro WriteInstallerOption "0" "StartMenuShortCut"
+ !insertmacro WriteInstallerOption "0" "DesktopShortCut"
+ !insertmacro WriteInstallerOption "0" "QuickLaunchShortCut"
+
+ SetOutPath "$INSTDIR"
+ File "${MIM_BUILD_DIR}\miranda32.exe"
+ File "${MIM_BUILD_DIR}\dbtool.exe"
+ File "${MIM_BUILD_DIR}\zlib.dll"
+ File "${MIM_BUILD_SRC}\docs\contributors.txt"
+ File "${MIM_BUILD_SRC}\docs\readme.txt"
+ File "${MIM_BUILD_SRC}\docs\changelog.txt"
+ File "${MIM_BUILD_SRC}\docs\license.txt"
+
+ ${If} $INST_UPGRADE = 0
+ SetOverWrite off
+ File "${MIM_BUILD_SRC}\docs\mirandaboot.ini"
+ SetOverWrite on
+ ${EndIf}
+ ${If} ${FileExists} "$INSTDIR\mirandaboot.ini"
+ ${If} $INST_UPGRADE = 0
+ ${If} $INST_MODE = 0
+ !ifdef MIM_BUILD_UNICODE
+ WriteINIStr "$INSTDIR\mirandaboot.ini" "Database" "ProfileDir" "%APPDATA%\Miranda"
+ !endif
+ ${ElseIf} $INST_MODE = 1
+ CreateDirectory "$INSTDIR\Profiles"
+ WriteINIStr "$INSTDIR\mirandaboot.ini" "Database" "ProfileDir" "Profiles"
+ ${EndIf}
+ ${EndIf}
+ ${EndIf}
+
+ !insertmacro InstallMirandaPlugin "clist_classic.dll"
+ !insertmacro InstallMirandaPlugin "srmm.dll"
+ !insertmacro InstallMirandaPlugin "avs.dll"
+ !insertmacro InstallMirandaPluginANSI "advaimg.dll"
+ !ifdef MIM_BUILD_UNICODE
+ !insertmacro InstallMirandaPlugin "dbx_mmap.dll"
+ Delete "$INSTDIR\Plugins\dbx_3x.dll"
+ !else
+ !insertmacro InstallMirandaPluginANSI "dbx_3x.dll"
+ Delete "$INSTDIR\Plugins\dbx_mmap.dll"
+ !endif
+ !insertmacro InstallMirandaPlugin "chat.dll"
+
+ ${If} $INST_MODE = 0
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Miranda IM" "DisplayName" "Miranda IM ${MIM_VERSION}"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Miranda IM" "UninstallString" "$INSTDIR\Uninstall.exe"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\miranda32.exe" "" "$INSTDIR\miranda32.exe"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\miranda32.exe" "Path" "$INSTDIR"
+ ${EndIf}
+
+ ; AIM
+ !insertmacro PrintInstallerDetails "Installing AIM Protocol..."
+ !insertmacro InstallMirandaPlugin "Aim.dll"
+ !insertmacro InstallMirandaProtoIcon "AIM"
+
+ ; Gadu-Gadu
+ !insertmacro PrintInstallerDetails "Installing Gadu-Gadu Protocol..."
+ !insertmacro InstallMirandaPluginANSI "GG.dll"
+ !insertmacro InstallMirandaProtoIcon "GG"
+
+ ; ICQ
+ !insertmacro PrintInstallerDetails "Installing ICQ Protocol..."
+ !insertmacro InstallMirandaPlugin "icq.dll"
+ SetOutPath "$INSTDIR\Icons"
+ File "${MIM_BUILD_DIRANSI}\Icons\xstatus_ICQ.dll"
+ !insertmacro InstallMirandaProtoIcon "ICQ"
+
+ ; IRC
+ !insertmacro PrintInstallerDetails "Installing IRC Protocol..."
+ !insertmacro InstallMirandaPlugin "irc.dll"
+ ${If} $INST_UPGRADE = 0
+ SetOverWrite off
+ File "${MIM_BUILD_SRC}\protocols\IRCG\Docs\irc_servers.ini"
+ SetOverWrite on
+ ${EndIf}
+ !insertmacro InstallMirandaProtoIcon "IRC"
+
+ ; Jabber
+ !insertmacro PrintInstallerDetails "Installing Jabber Protocol..."
+ !insertmacro InstallMirandaPlugin "jabber.dll"
+ SetOutPath "$INSTDIR\Icons"
+ File "${MIM_BUILD_DIRANSI}\Icons\xstatus_jabber.dll"
+ !insertmacro InstallMirandaProtoIcon "Jabber"
+
+ ; MSN
+ !insertmacro PrintInstallerDetails "Installing MSN Protocol..."
+ !insertmacro InstallMirandaPlugin "msn.dll"
+ !insertmacro InstallMirandaProtoIcon "MSN"
+
+ ; Yahoo
+ !insertmacro PrintInstallerDetails "Installing Yahoo Protocol..."
+ !insertmacro InstallMirandaPlugin "yahoo.dll"
+ !insertmacro InstallMirandaProtoIcon "Yahoo"
+
+ ; Import (installs automatically on new installs and if the file exists)
+ ${If} ${FileExists} "$INSTDIR\plugins\import.dll"
+ !insertmacro InstallMirandaPlugin "import.dll"
+ ${ElseIf} $INST_UPGRADE = 0
+ !insertmacro InstallMirandaPlugin "import.dll"
+ ${EndIf}
+
+ ${If} $INST_MODE = 0
+ WriteUninstaller "$INSTDIR\Uninstall.exe"
+ ${EndIf}
+SectionEnd
+
+SubSection /e "Options" pOptions
+ Section "Install Start Menu Shortcuts" pSCStartMenu
+ !insertmacro PrintInstallerDetails "Installing Start Menu Shortcuts..."
+ !insertmacro WriteInstallerOption "1" "StartMenuShortCut"
+ SetOutPath "$INSTDIR"
+ RMDir /r "$SMPROGRAMS\Miranda IM"
+ CreateDirectory "$SMPROGRAMS\Miranda IM"
+ CreateShortCut "$SMPROGRAMS\Miranda IM\Miranda IM.lnk" "$INSTDIR\miranda32.exe"
+ CreateShortCut "$SMPROGRAMS\Miranda IM\Database Tool.lnk" "$INSTDIR\dbtool.exe"
+ WriteINIStr "$SMPROGRAMS\Miranda IM\Homepage.url" "InternetShortcut" "URL" "http://www.miranda-im.org/"
+ WriteINIStr "$SMPROGRAMS\Miranda IM\Get More Addons.url" "InternetShortcut" "URL" "http://addons.miranda-im.org/"
+ SectionEnd
+
+ Section "Install Desktop Shortcut" pSCDesktop
+ !insertmacro PrintInstallerDetails "Installing Desktop Shortcut..."
+ !insertmacro WriteInstallerOption "1" "DesktopShortCut"
+ SetOutPath "$INSTDIR"
+ CreateShortCut "$DESKTOP\Miranda IM.lnk" "$INSTDIR\miranda32.exe"
+ SectionEnd
+
+ Section "Install Quicklaunch Shortcut" pSCQuickLaunch
+ !insertmacro PrintInstallerDetails "Installing Quicklaunch Shortcut..."
+ !insertmacro WriteInstallerOption "1" "QuickLaunchShortCut"
+ SetOutPath "$INSTDIR"
+ CreateShortCut "$QUICKLAUNCH\Miranda IM.lnk" "$INSTDIR\miranda32.exe"
+ SectionEnd
+SubSectionEnd
+
+Section Uninstall
+ SetShellVarContext "all"
+ RMDir /r "$SMPROGRAMS\Miranda IM"
+ Delete "$DESKTOP\Miranda IM.lnk"
+ Delete "$QUICKLAUNCH\Miranda IM.lnk"
+ SetShellVarContext "current"
+ RMDir /r "$SMPROGRAMS\Miranda IM"
+ Delete "$DESKTOP\Miranda IM.lnk"
+ Delete "$QUICKLAUNCH\Miranda IM.lnk"
+
+ RMDir /r "$INSTDIR\Icons"
+ RMDir /r "$INSTDIR\Plugins"
+ Delete "$INSTDIR\dbtool.exe"
+ Delete "$INSTDIR\miranda32.exe"
+ Delete "$INSTDIR\zlib.dll"
+ Delete "$INSTDIR\mirandaboot.ini"
+ Delete "$INSTDIR\license.txt"
+ Delete "$INSTDIR\contributors.txt"
+ Delete "$INSTDIR\readme.txt"
+ Delete "$INSTDIR\changelog.txt"
+ Delete "$INSTDIR\${MIM_BUILD_OPTIONS_FILE}"
+ Delete "$INSTDIR\uninstall.exe"
+ RMDir "$INSTDIR"
+
+ DeleteRegKey HKLM "SOFTWARE\Miranda"
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Miranda IM"
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\miranda32.exe"
+SectionEnd
+
+Function .onInit
+ SetShellVarContext "current"
+ FindWindow $R0 "Miranda"
+ IsWindow $R0 showwarn
+ FindWindow $R0 "Miranda IM"
+ IsWindow $R0 0 norun
+ showwarn:
+ MessageBox MB_OK "Miranda IM is currently running. It is recommended that you close Miranda IM so the installation can complete successfully."
+ Sleep 1000
+ norun:
+ StrCpy $INST_SUCCESS 0
+ StrCpy $INST_MODE 0
+FunctionEnd
+
+Function .onInstSuccess
+ StrCpy $INST_SUCCESS 1
+FunctionEnd
+
+Function VerifyInstallDir
+ StrCpy $INSTDIR $INST_DIR
+ ${If} ${FileExists} "$INSTDIR\miranda32.exe"
+ StrCpy $INST_UPGRADE 1
+ ${Else}
+ StrCpy $INST_UPGRADE 0
+ ${EndIf}
+ ${If} $INST_MODE = 1
+ !insertmacro ClearSectionFlag ${pSCStartMenu} ${SF_SELECTED}
+ SectionSetText ${pSCStartMenu} ""
+ !insertmacro ClearSectionFlag ${pSCDesktop} ${SF_SELECTED}
+ SectionSetText ${pSCDesktop} ""
+ !insertmacro ClearSectionFlag ${pSCQuickLaunch} ${SF_SELECTED}
+ SectionSetText ${pSCQuickLaunch} ""
+ !insertmacro ClearSectionFlag ${pOptions} ${SF_SELECTED}
+ SectionSetText ${pOptions} ""
+ ${Else}
+ ReadINIStr $0 "$INSTDIR\${MIM_BUILD_OPTIONS_FILE}" ${MIM_BUILD_OPTIONS_SECT} "StartMenuShortCut"
+ ${If} $0 == "0"
+ !insertmacro ClearSectionFlag ${pSCStartMenu} ${SF_SELECTED}
+ ${Else}
+ !insertmacro SetSectionFlag ${pSCStartMenu} ${SF_SELECTED}
+ ${EndIf}
+ ReadINIStr $0 "$INSTDIR\${MIM_BUILD_OPTIONS_FILE}" ${MIM_BUILD_OPTIONS_SECT} "DesktopShortCut"
+ ${If} $0 == "0"
+ !insertmacro ClearSectionFlag ${pSCDesktop} ${SF_SELECTED}
+ ${Else}
+ !insertmacro SetSectionFlag ${pSCDesktop} ${SF_SELECTED}
+ ${EndIf}
+ ReadINIStr $0 "$INSTDIR\${MIM_BUILD_OPTIONS_FILE}" ${MIM_BUILD_OPTIONS_SECT} "QuickLaunchShortCut"
+ ${If} $0 == "0"
+ !insertmacro ClearSectionFlag ${pSCQuickLaunch} ${SF_SELECTED}
+ ${Else}
+ !insertmacro SetSectionFlag ${pSCQuickLaunch} ${SF_SELECTED}
+ ${EndIf}
+ ${If} ${AtLeastWin7}
+ !insertmacro ClearSectionFlag ${pSCQuickLaunch} ${SF_SELECTED}
+ SectionSetText ${pSCQuickLaunch} ""
+ ${EndIf}
+ ${Endif}
+FunctionEnd
+
+Function VerifyDirectoryDisplay
+ ${If} $INST_MODE = 1
+ GetDlgItem $1 $HWNDPARENT 1
+ SendMessage $1 ${WM_SETTEXT} 0 "STR:$(^InstallBtn)"
+ ${EndIf}
+FunctionEnd
+
+Function CustomInstallPage
+ !insertmacro MUI_HEADER_TEXT "Installation Mode" "Select the type of installation to perform."
+ ReserveFile "miranda-ui-type.ini"
+ !insertmacro MUI_INSTALLOPTIONS_EXTRACT "miranda-ui-type.ini"
+ ${If} $INST_MODE = 0
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "miranda-ui-type.ini" "Field 2" "State" "1"
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "miranda-ui-type.ini" "Field 3" "State" "0"
+ ${Else}
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "miranda-ui-type.ini" "Field 2" "State" "0"
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "miranda-ui-type.ini" "Field 3" "State" "1"
+ ${EndIf}
+ !insertmacro MUI_INSTALLOPTIONS_DISPLAY "miranda-ui-type.ini"
+FunctionEnd
+
+Function CustomInstallPageLeave
+ !insertmacro MUI_INSTALLOPTIONS_READ $INST_MODE "miranda-ui-type.ini" "Field 3" "State"
+ ${If} $INST_MODE = 1
+ StrCpy $R0 $WINDIR 2
+ StrCpy $INST_DIR "$R0\Miranda IM"
+ ${Else}
+ ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\miranda32.exe" "Path"
+ ${If} $0 == ""
+ StrCpy $INST_DIR "$PROGRAMFILES\Miranda IM"
+ ${Else}
+ StrCpy $INST_DIR $0
+ ${EndIf}
+ ${EndIf}
+FunctionEnd
+
+Function VerifyComponentDisplay
+ ${If} $INST_MODE = 1
+ Abort
+ ${EndIf}
+FunctionEnd
\ No newline at end of file diff --git a/tools/installer/miranda-install-ansi.nsi b/tools/installer/miranda-install-ansi.nsi new file mode 100644 index 0000000000..61da1563b2 --- /dev/null +++ b/tools/installer/miranda-install-ansi.nsi @@ -0,0 +1 @@ +!include "miranda-core.nsi"
diff --git a/tools/installer/miranda-install-unicode.nsi b/tools/installer/miranda-install-unicode.nsi new file mode 100644 index 0000000000..cf99e8f071 --- /dev/null +++ b/tools/installer/miranda-install-unicode.nsi @@ -0,0 +1,2 @@ +!define MIM_BUILD_UNICODE
+!include "miranda-core.nsi"
diff --git a/tools/installer/miranda-ui-type.ini b/tools/installer/miranda-ui-type.ini new file mode 100644 index 0000000000..86707ea0f6 --- /dev/null +++ b/tools/installer/miranda-ui-type.ini @@ -0,0 +1,28 @@ +[Settings]
+NumFields=3
+
+[Field 1]
+Type=Label
+Text=Please select the type of installation you wish to peform. Most users should choose "Normal Installation". However, if you need to install Miranda IM to be portable, please select that option.
+Left=10
+Top=3
+Right=288
+Bottom=35
+
+[Field 2]
+Type=RadioButton
+Text=Normal Installation (recommended)
+State=1
+Left=25
+Right=180
+Top=47
+Bottom=56
+
+[Field 3]
+Type=RadioButton
+Text=Portable Installation
+State=0
+Left=25
+Right=140
+Top=65
+Bottom=74
\ No newline at end of file diff --git a/tools/installer/miranda-version.nsi b/tools/installer/miranda-version.nsi new file mode 100644 index 0000000000..97dc0dd71c --- /dev/null +++ b/tools/installer/miranda-version.nsi @@ -0,0 +1,4 @@ +; Miranda Version Info
+
+!define MIM_VERSION "0.9.1"
+!define MIM_BETA "0" ; 0 for final build
diff --git a/tools/lpgen/lpgen.pl b/tools/lpgen/lpgen.pl new file mode 100644 index 0000000000..e58c7dbe7a --- /dev/null +++ b/tools/lpgen/lpgen.pl @@ -0,0 +1,228 @@ +#!/usr/bin/perl
+#
+# Script generating translation templates from sources
+#
+# Miranda IM: the free IM client for Microsoft* Windows*
+#
+# Copyright 2000-2008 Miranda ICQ/IM project,
+# all portions of this codebase are copyrighted to the people
+# listed in contributors.txt.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+use POSIX;
+use File::Find;
+use strict;
+
+my $rootdir = '';
+my %hash = ();
+my $clines = 0;
+
+my $version = '0.7svn';
+my $time = localtime();
+
+if (@ARGV && $ARGV[0] eq "version") {
+ shift @ARGV;
+ # 1st arg version major i.e. 07 for "0.7"
+ if (@ARGV) {
+ my $vermaj = shift @ARGV;
+ if ($vermaj =~ /^([0-9]*)([0-9])$/) {
+ if ($1 eq "") {
+ $version = $2;
+ } else {
+ $version = "$1.$2";
+ }
+ } else {
+ $version = $vermaj;
+ }
+ }
+ # 2nd arg version minor i.e. 1 for "0.7.1"
+ if (@ARGV) {
+ my $vermin = shift @ARGV;
+ if ($vermin =~ /^[0-9]+$/) {
+ $version .= ".$vermin";
+ } else {
+ $version .= $vermin;
+ }
+ }
+ # 3rd arg build number i.e. 36 for "0.7.1 build 36"
+ if (@ARGV) {
+ my $build = shift @ARGV;
+ if ($build =~ /^[0-9]+$/) {
+ $version .= " build $build";
+ } else {
+ $version .= $build;
+ }
+ }
+}
+
+#Language Files
+if (!@ARGV) {
+ create_langfile(
+ '../../miranda',
+ '../../miranda/i18n/langpack_english.txt',
+ 'English (US)', '0809',
+ 'Miranda IM Development Team',
+ 'project-info@miranda-im.org',
+ 'Scriver,avs,chat,clist,clist_nicer,db3x,db3x_mmap,dbrw,advaimg,import,modernb,mwclist,png2dib,srmm,tabsrmm,AimOscar,Gadu-Gadu,IRC,IcqOscarJ,JabberG,MSN,Yahoo');
+}
+elsif ($ARGV[0] eq "core") {
+ create_langfile('../../miranda/src',
+ '../../miranda/i18n/core-translation.txt',
+ 'English (US)', '0809',
+ 'Miranda IM Development Team',
+ 'project-info@miranda-im.org');
+}
+elsif ($ARGV[0] eq "srmm") {
+ create_langfile('../../miranda/plugins/SRMM/',
+ '../../miranda/plugins/SRMM/Docs/srmm-translation.txt',
+ 'English (US)', '0809',
+ 'Miranda IM Development Team',
+ 'project-info@miranda-im.org');
+}
+elsif ($ARGV[0] eq "import") {
+ create_langfile('../../miranda/plugins/Import/',
+ '../../miranda/plugins/Import/docs/import-translation.txt',
+ 'English (US)', '0809',
+ 'Miranda IM Development Team',
+ 'project-info@miranda-im.org');
+}
+else {
+ print "Error: Unknown module $ARGV[0]\n";
+ exit 1;
+}
+
+sub create_langfile {
+ $rootdir = shift(@_);
+ my $outfile = shift(@_);
+ my $lang = shift(@_);
+ my $locale = shift(@_);
+ my $author = shift(@_);
+ my $email = shift(@_);
+ my $plugins = @_ ? shift(@_) : '';
+ %hash = ();
+ my %common = ();
+ $clines = 0;
+ print "Building language file for $rootdir:\n";
+ find({ wanted => \&csearch, preprocess => \&pre_dir }, $rootdir);
+ find({ wanted => \&rcsearch, preprocess => \&pre_dir }, $rootdir);
+ open(WRITE, "> $outfile") or die;
+ print WRITE <<HEADER;
+Miranda Language Pack Version 1
+Locale: $locale
+Authors: $author
+Author-email: $email
+Last-Modified-Using: Miranda IM $version
+Plugins-included: $plugins
+; Generated by lpgen on $time
+; Translations: $clines
+
+HEADER
+ foreach my $trans (keys %hash) {
+ if ($hash{$trans} =~ /^\d+$/) {
+ $common{$trans} = $hash{$trans};
+ delete $hash{$trans};
+ }
+ }
+
+ my @sorted = sort { (floor($common{$b}/20) == floor($common{$a}/20)) ? ($a cmp $b) : ($common{$b} <=> $common{$a}) } keys %common;
+ print WRITE "; Common strings that belong to many files\n;[";
+ print WRITE join "]\n;[", @sorted;
+ print WRITE "]\n";
+
+ my $file = '';
+ foreach my $trans (sort { ($hash{$a} eq $hash{$b}) ? ($a cmp $b) : ($hash{$a} cmp $hash{$b}) } keys %hash) {
+ if ($hash{$trans} ne $file) {
+ $file = $hash{$trans};
+ print WRITE "\n; $file\n";
+ }
+ print WRITE ";[$trans]\n";
+ }
+
+ close(WRITE);
+ print " $outfile is complete ($clines)\n\n";
+}
+
+sub pre_dir {
+ # avoid parsing some ext SDKs
+ my @files = ();
+ return @files if (
+ $File::Find::name =~/..\/extplugins/ or
+ $File::Find::name =~/freeimage\/Source/ or
+ $File::Find::name =~/dbrw\/sqlite3/);
+ @files = grep { not /^\.\.?$/ } @_;
+ return sort @files;
+}
+
+sub append_str {
+ my $str = shift(@_);
+ my $found = shift(@_);
+ $str = substr($str, 1, length($str) - 2);
+ if (length($str) gt 0 and $str ne "List1" and $str ne "Tree1" and $str =~ /[a-zA-Z]+/g) {
+ my $path = $File::Find::name;
+ $path =~ s/(\.\.\/)+miranda\///;
+ if (!$hash{$str}) {
+ $hash{$str} = $path;
+ $clines ++;
+ return 1;
+ } elsif ($hash{$str} ne $path) {
+ if ($hash{$str} =~ /^\d+$/) {
+ $hash{$str} ++;
+ } else {
+ $hash{$str} = 1;
+ }
+ }
+ }
+ return 0;
+}
+
+sub csearch {
+ if (-f $_ and ($_ =~ m/\.c(pp)?$/i or $_ =~ m/\.h(pp)?$/i)) {
+ my $found = 0;
+ my $file = $_;
+ print " Processing $_ ";
+ open(READ, "< $_") or return;
+ my $all = '';
+ while (my $lines = <READ>) {
+ $all = $all.$lines;
+ }
+ close(READ);
+ $_ = $all;
+ while (/(?:Button_SetIcon_IcoLib|Translate[A-Z]{0,2}|LPGENT?|ICQTranslateUtfStatic)\s*\(\s*(\"[^\\]*?(\\.[^\\]*?)*\")\s*[,\)]/g) {
+ $found += append_str($1, $found);
+ }
+ print "($found)\n";
+ }
+}
+
+sub rcsearch {
+ if ( -f $_ and $_ =~ m/\.rc$/i) {
+ my $found = 0;
+ my $file = $_;
+ print " Processing $_ ";
+ open(READ, "< $_") or return;
+ my $all = '';
+ while (my $lines = <READ>) {
+ $all = $all.$lines;
+ }
+ close(READ);
+ $_ = $all;
+ s/\"\"/\\\"/g;
+ while (/\s*(?:CONTROL|(?:DEF)?PUSHBUTTON|[LRC]TEXT|GROUPBOX|CAPTION|MENUITEM|POPUP)\s*(\"[^\\]*?(\\.[^\\]*?)*\")/g) {
+ $found += append_str($1, $found);
+ }
+ print "($found)\n";
+ }
+}
diff --git a/tools/lpgen/trans.pl b/tools/lpgen/trans.pl new file mode 100644 index 0000000000..5bd15f57ce --- /dev/null +++ b/tools/lpgen/trans.pl @@ -0,0 +1,64 @@ +#!/usr/bin/perl
+#
+# Script generating new translation from template, using old translation
+#
+# Miranda IM: the free IM client for Microsoft* Windows*
+#
+# Copyright 2000-2008 Miranda ICQ/IM project,
+# all portions of this codebase are copyrighted to the people
+# listed in contributors.txt.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+use POSIX;
+
+if(@ARGV < 2)
+{
+ print "trans <to translate> <old translation> [<next old translation> ...]\n";
+ exit;
+}
+
+my $key;
+my %trans;
+my $totrans = shift @ARGV;
+while(@ARGV)
+{
+ my $oldtrans = shift @ARGV;
+ open OT, "<$oldtrans" or die "Error: Cannot open translation";
+ while(<OT>)
+ {
+ chop;
+ if(m/^\[(.*)\]/)
+ { $key = $1; next; }
+ elsif($key and !$trans{$key} and !m/^;/)
+ { $trans{$key} = $_; $key = 0; }
+ }
+}
+
+open TT, "<$totrans" or die "Error: Cannot open file to translate";
+while(<TT>)
+{
+ if(m/^;\[(.*)\]/ and $trans{$1})
+ {
+ print "[$1]\n";
+ print $trans{$1};
+ print "\n";
+ }
+ else
+ { print; }
+}
+
+close TT;
+close OT;
diff --git a/tools/rebaser/make.bat b/tools/rebaser/make.bat new file mode 100644 index 0000000000..e89a46df24 --- /dev/null +++ b/tools/rebaser/make.bat @@ -0,0 +1 @@ +@cl /MD /O2 /Fe../../miranda/bin/rebaser.exe rebaser.cpp imagehlp.lib /link /filealign:512
\ No newline at end of file diff --git a/tools/rebaser/rebaser.cpp b/tools/rebaser/rebaser.cpp new file mode 100644 index 0000000000..f6c048358b --- /dev/null +++ b/tools/rebaser/rebaser.cpp @@ -0,0 +1,138 @@ +
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+
+#include <io.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <windows.h>
+
+#include "imagehlp.h"
+
+#define SIZEOF(X) (sizeof(X)/sizeof(X[0]))
+
+DWORD glbOffset = 0x12000000; // rebased offset by default
+bool glbCheckMode = false;
+
+//====[ Prints standard Win32 error message ]============================================
+
+void PrintWin32Error( DWORD tErrorCode )
+{
+ WCHAR tBuffer[ 1024 ];
+ FormatMessageW( FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0, tBuffer, SIZEOF( tBuffer ), NULL );
+ fputws( tBuffer, stdout );
+ fputc( '\n', stdout );
+}
+
+//====[ Trims trailing spaces ]==========================================================
+
+char* rtrim( char *string )
+{
+ if ( string == 0 )
+ return 0;
+
+ char* p = string + strlen( string ) - 1;
+
+ while ( p >= string )
+ { if ( *p == ' ' || *p == '\t' || *p == '\n' || *p == '\r' )
+ *p-- = 0;
+ else
+ break;
+ }
+
+ return string;
+}
+
+//====[ Main ]===========================================================================
+
+int main( int argc, char** argv )
+{
+ fprintf( stderr, "DLL base address scheduler v.1.2, copyright 2001-2002 (c) George Hazan.\n\n" );
+
+ //----[ Command line parsing ]--------------------------------------------------------
+
+ for ( int i=1; i < argc; i++ )
+ {
+ if ( argv[ i ][ 0 ] != '/' )
+ {
+LBL_Usage:
+ fprintf( stderr, "Usage: Rebaser.exe [/BASE:<hex_digit>] [/CHECK]\n" );
+ return 200;
+ }
+
+ if ( memicmp( &argv[ i ][ 1 ], "BASE:", 5 ) == 0 )
+ sscanf( &argv[ i ][ 6 ], "%08X", &glbOffset );
+ else if ( memicmp( &argv[ i ][ 1 ], "CHECK", 5 ) == 0 )
+ {
+ glbCheckMode = true;
+ glbOffset = 0x400000;
+ }
+ else goto LBL_Usage;
+ }
+
+ //----[ Command line ok, opening data files ]-----------------------------------------
+
+ fprintf( stdout, "Scanning DLLs...\n" );
+
+ int locResult = 0;
+ char locFileName[ MAX_PATH ];
+
+ while ( fgets( locFileName, sizeof( locFileName ), stdin ) != NULL )
+ {
+ rtrim( locFileName );
+ fprintf( stdout, "Processing '%s'...\n", locFileName );
+
+ //----| If we need to check files only, check them |-------------------------------
+ if ( glbCheckMode )
+ {
+ DWORD locOldImageSize, locOldBase, locNewSize, locNewBase;
+ if ( !ReBaseImage( locFileName, NULL, FALSE, FALSE, FALSE, FALSE, &locOldImageSize,
+ &locOldBase, &locNewSize, &locNewBase, 0 ))
+ PrintWin32Error( GetLastError() );
+
+ if ( locOldBase == glbOffset )
+ {
+ fprintf( stdout, "Image is not based\n\n" );
+ locResult = 2;
+ }
+
+ continue;
+ }
+
+ //----| Preparing files |----------------------------------------------------------
+LBL_Ok:
+ HANDLE locFileHandle = CreateFile( locFileName, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0 );
+ if ( locFileHandle == INVALID_HANDLE_VALUE )
+ {
+ fprintf( stdout, "File '%s' cannot be opened, skipped.\n\n", locFileName );
+ locResult = 2;
+ continue;
+ }
+
+ FILETIME locCreateTime, locAccessTime, locModifyTime;
+ GetFileTime( locFileHandle, &locCreateTime, &locAccessTime, &locModifyTime );
+ CloseHandle( locFileHandle );
+
+ //----| Processing |---------------------------------------------------------------
+
+ DWORD locOldImageSize, locOldBase, locNewSize;
+ if ( !ReBaseImage( locFileName, NULL, TRUE, FALSE, FALSE, FALSE, &locOldImageSize,
+ &locOldBase, &locNewSize, &glbOffset, 0 ))
+ {
+ PrintWin32Error( GetLastError() );
+ locResult = 2;
+ }
+
+ glbOffset += locNewSize;
+
+ //----| Write down the original file timestamp |-----------------------------------
+
+ locFileHandle = CreateFile( locFileName, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0 );
+ if ( locFileHandle != INVALID_HANDLE_VALUE )
+ {
+ SetFileTime( locFileHandle, &locCreateTime, &locAccessTime, &locModifyTime );
+ CloseHandle( locFileHandle );
+ } }
+
+ return locResult;
+}
|