[UPDATE] Update the readmeFirst.txt for the build information.

Remove systemMessage().
Fix symbol redefinition due to Scintilla header update.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@642 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2010-07-18 12:38:27 +00:00
parent 52e19bbb88
commit e0773602b2
8 changed files with 18 additions and 44 deletions

View File

@ -19,20 +19,6 @@
WcharMbcsConvertor * WcharMbcsConvertor::_pSelf = new WcharMbcsConvertor;
void systemMessage(const TCHAR *title)
{
LPVOID lpMsgBuf;
FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
::GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPTSTR) &lpMsgBuf,
0,
NULL );// Process any inserts in lpMsgBuf.
MessageBox( NULL, (LPTSTR)lpMsgBuf, title, MB_OK | MB_ICONSTOP);
::LocalFree(lpMsgBuf);
}
void printInt(int int2print)
{
TCHAR str[32];

View File

@ -73,14 +73,11 @@ typedef std::basic_string<TCHAR> generic_string;
void folderBrowser(HWND parent, int outputCtrlID, const TCHAR *defaultStr = NULL);
void systemMessage(const TCHAR *title);
//DWORD ShortToLongPathName(LPCTSTR lpszShortPath, LPTSTR lpszLongPath, DWORD cchBuffer);
void printInt(int int2print);
void printStr(const TCHAR *str2print);
void writeLog(const TCHAR *logFileName, const char *log2write);
int filter(unsigned int code, struct _EXCEPTION_POINTERS *ep);
//int getCpFromStringValue(const char * encodingStr);
generic_string purgeMenuItemString(const TCHAR * menuItemStr, bool keepAmpersand = false);
std::vector<generic_string> tokenizeString(const generic_string & tokenString, const char delim);

View File

@ -40,11 +40,11 @@ BOOL Process::run()
try {
// Create stdout pipe
if (!::CreatePipe(&_hPipeOutR, &hPipeOutW, &sa, 0))
error(TEXT("CreatePipe"), result, 1000);
throw std::runtime_error("Create stdout pipe failed");
// Create stderr pipe
if (!::CreatePipe(&_hPipeErrR, &hPipeErrW, &sa, 0))
error(TEXT("CreatePipe"), result, 1001);
throw std::runtime_error("Create stderr pipe failed");
STARTUPINFO startup;
PROCESS_INFORMATION procinfo;
@ -80,17 +80,17 @@ BOOL Process::run()
_hProcessThread = procinfo.hThread;
if(!started)
error(TEXT("CreateProcess"), result, 1002);
throw std::runtime_error("CreateProcess function call failed");
if (_type == CONSOLE_PROG)
{
hListenerEvent[0] = ::CreateEvent(NULL, FALSE, FALSE, TEXT("listenerEvent"));
if(!hListenerEvent[0])
error(TEXT("CreateEvent"), result, 1003);
throw std::runtime_error("Create listenerEvent failed");
hListenerEvent[1] = ::CreateEvent(NULL, FALSE, FALSE, TEXT("listenerStdErrEvent"));
if(!hListenerEvent[1])
error(TEXT("CreateEvent"), result, 1004);
throw std::runtime_error("Create listenerStdErrEvent failed");
// The process is running so we set this to FALSE
@ -98,15 +98,15 @@ BOOL Process::run()
hWaitForProcessEndThread = ::CreateThread(NULL, 0, staticWaitForProcessEnd, this, 0, NULL);
if (!hWaitForProcessEndThread)
error(TEXT("CreateThread"), result, 1005);
throw std::runtime_error("CreateThread for staticWaitForProcessEnd failed");
hListenerStdOutThread = ::CreateThread(NULL, 0, staticListenerStdOut, this, 0, NULL);
if (!hListenerStdOutThread)
error(TEXT("CreateThread"), result, 1006);
throw std::runtime_error("CreateThread for staticListenerStdOut failed");
hListenerStdErrThread = ::CreateThread(NULL, 0, staticListenerStdErr, this, 0, NULL);
if (!hListenerStdErrThread)
error(TEXT("CreateThread"), result, 1007);
throw std::runtime_error("CreateThread for staticListenerStdErr failed");
// We wait until the process is over
// TO DO: This should be a bit secured in case something happen and the
@ -222,7 +222,7 @@ void Process::listenerStdOut()
if(!::SetEvent(hListenerEvent))
{
systemMessage(TEXT("Thread listenerStdOut"));
::MessageBox(NULL, TEXT("SetEvent function call failed"), TEXT("Thread listenerStdOut"), MB_OK);
}
}
@ -278,7 +278,7 @@ void Process::listenerStdErr()
if(!::SetEvent(hListenerEvent))
{
systemMessage(TEXT("Thread stdout listener"));
::MessageBox(NULL, TEXT("SetEvent function call failed"), TEXT("Thread stdout listener"), MB_OK);
}
}
@ -293,10 +293,3 @@ void Process::waitForProcessEnd()
_bProcessEnd = TRUE;
}
void Process::error(const TCHAR *txt2display, BOOL & returnCode, int errCode)
{
systemMessage(txt2display);
returnCode = FALSE;
throw int(errCode);
}

View File

@ -216,7 +216,7 @@ size_t Printer::doPrint(bool justDoIt)
lengthDoc = lengthDocMax;
}
RangeToFormat frPrint;
NPP_RangeToFormat frPrint;
frPrint.hdc = _pdlg.hDC;
frPrint.hdcTarget = _pdlg.hDC;
frPrint.rc.left = rectMargins.left - rectPhysMargins.left;

View File

@ -23,7 +23,7 @@
#endif //SCINTILLA_EDIT_VIEW_H
struct RangeToFormat {
struct NPP_RangeToFormat {
HDC hdc;
HDC hdcTarget;
RECT rc;

View File

@ -36,7 +36,6 @@ void ColourPicker::init(HINSTANCE hInst, HWND parent)
(LPVOID)0);
if (!_hSelf)
{
systemMessage(TEXT("System Err"));
throw std::runtime_error("ColourPicker::init : CreateWindowEx() function return null");
}

View File

@ -141,7 +141,7 @@
RuntimeLibrary="1"
UsePrecompiledHeader="1"
PrecompiledHeaderThrough="precompiledHeaders.h"
PrecompiledHeaderFile=""
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
WarningLevel="4"
WarnAsError="true"
Detect64BitPortabilityProblems="false"

View File

@ -7,18 +7,17 @@ Notepad++ is a free (as in "free speech" and also as in "free beer") source code
To build Notepad++ package from source code:
============================================
For generating the executable file (notepad++.exe), you can use Visual Studio 2005 or MinGW 3.0 / 2.X (a makefile is available, but not maintained).
A CMakeLists.txt (located in the PowerEditor\src directory) is available (but not maintained anymore) for generating the different VC project and MinGW makefile via cmake.
For generating the the dll file (SciLexer.dll), you have 2 choices : VC++ 6 (from v2.5) or MinGW 3.0 / 2.X
There should be several ways to generate Notepad++ binaries, here we show you only the way with which Notepad++ official releases are generated.
* notepad++.exe: Visual Studio 2005
* SciLexer.dll: VC++ 6
Notepad++ Unicode release binary (notepad++.exe) and Scintilla release binary (SciLexer.dll) will be built in the directories "notepad++\trunk\PowerEditor\bin" and "notepad++\trunk\scintilla\bin" respectively.
You have to copy SciLexer.dll in "notepad++\PowerEditor\bin" in order to launch notepad++.exe
Go to Notepad++ official site for more information :
http://notepad-plus.sourceforge.net/
http://notepad-plus-plus.org/
Notepad++ team
http://sourceforge.net/project/memberlist.php?group_id=95717
http://notepad-plus-plus.org/members/