From 2ef5e5eca313c8c57c4a27ecaaf29cfb1c14a605 Mon Sep 17 00:00:00 2001 From: NN Date: Tue, 19 May 2015 14:01:27 +0300 Subject: [PATCH 1/3] Support compilation in VS2015. Changes: _CRT_NON_CONFORMING_WCSTOK - to have old wcstok behaviour dbghelp.h doesn't disable warnings, do it manually. Better casting from pointer to integral. Disable warnings in tinyXml headers. Disable warnings 4456;4457;4459 to not touch the source. More details about the warnings: http://blogs.msdn.com/b/vcblog/archive/2014/11/12/improvements-to-warnings-in-the-c-compiler.aspx --- PowerEditor/src/MISC/Common/precompiledHeaders.h | 5 +++++ PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp | 8 ++++---- PowerEditor/src/TinyXml/tinyXmlA/tinyxmlA.h | 5 +++++ PowerEditor/src/TinyXml/tinyxml.h | 5 +++++ PowerEditor/visual.net/notepadPlus.vcxproj | 2 ++ 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/PowerEditor/src/MISC/Common/precompiledHeaders.h b/PowerEditor/src/MISC/Common/precompiledHeaders.h index eba551385..b275c87fe 100644 --- a/PowerEditor/src/MISC/Common/precompiledHeaders.h +++ b/PowerEditor/src/MISC/Common/precompiledHeaders.h @@ -32,6 +32,7 @@ // w/o precompiled headers file : 1 minute 55 sec #define _WIN32_WINNT 0x0501 +#define _CRT_NON_CONFORMING_WCSTOK // C RunTime Header Files #include @@ -63,7 +64,11 @@ #include #include #include + +#pragma warning(push) +#pragma warning(disable: 4091) #include +#pragma warning(pop) #include #ifdef UNICODE diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp index 91cad99a3..e9dc38166 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp @@ -2374,9 +2374,9 @@ void ScintillaEditView::convertSelectedTextTo(bool Case) for (int j = 0 ; j < nbChar ; ++j) { if (Case == UPPERCASE) - destStr[j] = (wchar_t)::CharUpperW((LPWSTR)destStr[j]); + destStr[j] = (wchar_t)(UINT_PTR)::CharUpperW((LPWSTR)destStr[j]); else - destStr[j] = (wchar_t)::CharLowerW((LPWSTR)destStr[j]); + destStr[j] = (wchar_t)(UINT_PTR)::CharLowerW((LPWSTR)destStr[j]); } ::WideCharToMultiByte(codepage, 0, destStr, len, srcStr, len, NULL, NULL); @@ -2414,9 +2414,9 @@ void ScintillaEditView::convertSelectedTextTo(bool Case) for (int i = 0 ; i < nbChar ; ++i) { if (Case == UPPERCASE) - selectedStrW[i] = (WCHAR)::CharUpperW((LPWSTR)selectedStrW[i]); + selectedStrW[i] = (WCHAR)(UINT_PTR)::CharUpperW((LPWSTR)selectedStrW[i]); else - selectedStrW[i] = (WCHAR)::CharLowerW((LPWSTR)selectedStrW[i]); + selectedStrW[i] = (WCHAR)(UINT_PTR)::CharLowerW((LPWSTR)selectedStrW[i]); } ::WideCharToMultiByte(codepage, 0, selectedStrW, strWSize, selectedStr, strSize, NULL, NULL); diff --git a/PowerEditor/src/TinyXml/tinyXmlA/tinyxmlA.h b/PowerEditor/src/TinyXml/tinyXmlA/tinyxmlA.h index 0ebfc6a87..8a27d3ed4 100644 --- a/PowerEditor/src/TinyXml/tinyXmlA/tinyxmlA.h +++ b/PowerEditor/src/TinyXml/tinyXmlA/tinyxmlA.h @@ -27,6 +27,8 @@ distribution. #define TINYXMLA_INCLUDED #ifdef _MSC_VER +#pragma warning( push ) +#pragma warning( disable : 4458 ) #pragma warning( disable : 4530 ) #pragma warning( disable : 4786 ) #endif @@ -1250,6 +1252,9 @@ private: TiXmlNodeA* node; }; +#ifdef _MSC_VER +#pragma warning( pop ) +#endif #endif diff --git a/PowerEditor/src/TinyXml/tinyxml.h b/PowerEditor/src/TinyXml/tinyxml.h index 6634b70f1..143039e89 100644 --- a/PowerEditor/src/TinyXml/tinyxml.h +++ b/PowerEditor/src/TinyXml/tinyxml.h @@ -27,6 +27,8 @@ distribution. #define TINYXML_INCLUDED #ifdef _MSC_VER +#pragma warning( push ) +#pragma warning( disable : 4458 ) #pragma warning( disable : 4530 ) #pragma warning( disable : 4786 ) #endif @@ -1248,6 +1250,9 @@ private: TiXmlNode* node; }; +#ifdef _MSC_VER +#pragma warning( pop ) +#endif #endif diff --git a/PowerEditor/visual.net/notepadPlus.vcxproj b/PowerEditor/visual.net/notepadPlus.vcxproj index ed3e94e17..9ff8e0b72 100644 --- a/PowerEditor/visual.net/notepadPlus.vcxproj +++ b/PowerEditor/visual.net/notepadPlus.vcxproj @@ -69,6 +69,7 @@ Level4 true ProgramDatabase + 4456;4457;4459 /fixed:no %(AdditionalOptions) @@ -111,6 +112,7 @@ true ProgramDatabase NoExtensions + 4456;4457;4459 comctl32.lib;shlwapi.lib;shell32.lib;Oleacc.lib;%(AdditionalDependencies) From f867f40cb9487d4e358b90ebe870827a5e5812bf Mon Sep 17 00:00:00 2001 From: NN Date: Wed, 20 May 2015 12:39:28 +0300 Subject: [PATCH 2/3] Add warnings description. --- PowerEditor/src/MISC/Common/precompiledHeaders.h | 2 +- PowerEditor/src/TinyXml/tinyXmlA/tinyxmlA.h | 2 +- PowerEditor/src/TinyXml/tinyxml.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PowerEditor/src/MISC/Common/precompiledHeaders.h b/PowerEditor/src/MISC/Common/precompiledHeaders.h index b275c87fe..96bbf5c3c 100644 --- a/PowerEditor/src/MISC/Common/precompiledHeaders.h +++ b/PowerEditor/src/MISC/Common/precompiledHeaders.h @@ -66,7 +66,7 @@ #include #pragma warning(push) -#pragma warning(disable: 4091) +#pragma warning(disable: 4091) // 'keyword' : ignored on left of 'type' when no variable is declared #include #pragma warning(pop) #include diff --git a/PowerEditor/src/TinyXml/tinyXmlA/tinyxmlA.h b/PowerEditor/src/TinyXml/tinyXmlA/tinyxmlA.h index 8a27d3ed4..63dd48ebe 100644 --- a/PowerEditor/src/TinyXml/tinyXmlA/tinyxmlA.h +++ b/PowerEditor/src/TinyXml/tinyXmlA/tinyxmlA.h @@ -28,7 +28,7 @@ distribution. #ifdef _MSC_VER #pragma warning( push ) -#pragma warning( disable : 4458 ) +#pragma warning( disable : 4458 ) // declaration of 'parameter' hides class member #pragma warning( disable : 4530 ) #pragma warning( disable : 4786 ) #endif diff --git a/PowerEditor/src/TinyXml/tinyxml.h b/PowerEditor/src/TinyXml/tinyxml.h index 143039e89..d3730a517 100644 --- a/PowerEditor/src/TinyXml/tinyxml.h +++ b/PowerEditor/src/TinyXml/tinyxml.h @@ -28,7 +28,7 @@ distribution. #ifdef _MSC_VER #pragma warning( push ) -#pragma warning( disable : 4458 ) +#pragma warning( disable : 4458 ) // declaration of 'parameter' hides class member #pragma warning( disable : 4530 ) #pragma warning( disable : 4786 ) #endif From 7ead0542cc3b03d114e5e41772a20077ae944c2e Mon Sep 17 00:00:00 2001 From: NN Date: Mon, 25 May 2015 13:04:18 +0300 Subject: [PATCH 3/3] Add special project for VS2015 --- PowerEditor/visual.net/notepadPlus.vcxproj | 2 - .../visual.net/notepadPlus.vs2015.vcxproj | 549 ++++++++++++++++++ 2 files changed, 549 insertions(+), 2 deletions(-) create mode 100644 PowerEditor/visual.net/notepadPlus.vs2015.vcxproj diff --git a/PowerEditor/visual.net/notepadPlus.vcxproj b/PowerEditor/visual.net/notepadPlus.vcxproj index 9ff8e0b72..ed3e94e17 100644 --- a/PowerEditor/visual.net/notepadPlus.vcxproj +++ b/PowerEditor/visual.net/notepadPlus.vcxproj @@ -69,7 +69,6 @@ Level4 true ProgramDatabase - 4456;4457;4459 /fixed:no %(AdditionalOptions) @@ -112,7 +111,6 @@ true ProgramDatabase NoExtensions - 4456;4457;4459 comctl32.lib;shlwapi.lib;shell32.lib;Oleacc.lib;%(AdditionalDependencies) diff --git a/PowerEditor/visual.net/notepadPlus.vs2015.vcxproj b/PowerEditor/visual.net/notepadPlus.vs2015.vcxproj new file mode 100644 index 000000000..b8fe86275 --- /dev/null +++ b/PowerEditor/visual.net/notepadPlus.vs2015.vcxproj @@ -0,0 +1,549 @@ + + + + + Unicode Debug + Win32 + + + Unicode Release + Win32 + + + + Notepad++ + {FCF60E65-1B78-4D1D-AB59-4FC00AC8C248} + Notepad++ + Win32Proj + + + + Application + v140_xp + Unicode + true + + + Application + v140_xp + Unicode + + + + + + + + + + + + + + + <_ProjectFileVersion>12.0.21005.1 + + + $(Configuration)\ + $(Configuration)\ + false + + + ..\bin\ + $(Configuration)\ + false + + + + Disabled + Neither + ..\src\WinControls\AboutDlg;..\..\scintilla\include;..\include;..\src\WinControls;..\src\WinControls\ImageListSet;..\src\WinControls\OpenSaveFileDialog;..\src\WinControls\SplitterContainer;..\src\WinControls\StaticDialog;..\src\WinControls\TabBar;..\src\WinControls\ToolBar;..\src\MISC\Process;..\src\ScitillaComponent;..\src\MISC;..\src\MISC\SysMsg;..\src\WinControls\StatusBar;..\src;..\src\WinControls\StaticDialog\RunDlg;..\src\tinyxml;..\src\WinControls\ColourPicker;..\src\Win32Explr;..\src\MISC\RegExt;..\src\WinControls\TrayIcon;..\src\WinControls\shortcut;..\src\WinControls\Grid;..\src\WinControls\ContextMenu;..\src\MISC\PluginsManager;..\src\WinControls\Preference;..\src\WinControls\WindowsDlg;..\src\WinControls\TaskList;..\src\WinControls\DockingWnd;..\src\WinControls\ToolTip;..\src\MISC\Exception;..\src\MISC\Common;..\src\tinyxml\tinyXmlA;..\src\WinControls\AnsiCharPanel;..\src\WinControls\ClipboardHistory;..\src\WinControls\FindCharsInRange;..\src\WinControls\VerticalFileSwitcher;..\src\WinControls\ProjectPanel;..\src\WinControls\DocumentMap;..\src\WinControls\FunctionList;..\src\uchardet;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;_USE_64BIT_TIME_T;TIXML_USE_STL;TIXMLA_USE_STL;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NON_CONFORMING_SWPRINTFS=1;%(PreprocessorDefinitions) + true + Async + Default + MultiThreadedDebug + Create + precompiledHeaders.h + $(IntDir)$(TargetName).pch + Level4 + true + ProgramDatabase + 4456;4457;4459 + + + /fixed:no %(AdditionalOptions) + comctl32.lib;shlwapi.lib;shell32.lib;Oleacc.lib;%(AdditionalDependencies) + LinkVerboseLib + $(OutDir)notepad++.exe + 1.0 + /TLBID + 5 + true + $(OutDir)notepadPlus.pdb + Windows + MachineX86 + + + ..\src\dpiAware.manifest;%(AdditionalManifestFiles) + + + + + + + + Full + Default + Speed + false + false + ..\src\WinControls\AboutDlg;..\..\scintilla\include;..\include;..\src\WinControls;..\src\WinControls\ImageListSet;..\src\WinControls\OpenSaveFileDialog;..\src\WinControls\SplitterContainer;..\src\WinControls\StaticDialog;..\src\WinControls\TabBar;..\src\WinControls\ToolBar;..\src\MISC\Process;..\src\ScitillaComponent;..\src\MISC;..\src\MISC\SysMsg;..\src\WinControls\StatusBar;..\src;..\src\WinControls\StaticDialog\RunDlg;..\src\tinyxml;..\src\WinControls\ColourPicker;..\src\Win32Explr;..\src\MISC\RegExt;..\src\WinControls\TrayIcon;..\src\WinControls\shortcut;..\src\WinControls\Grid;..\src\WinControls\ContextMenu;..\src\MISC\PluginsManager;..\src\WinControls\Preference;..\src\WinControls\WindowsDlg;..\src\WinControls\TaskList;..\src\WinControls\DockingWnd;..\src\WinControls\ToolTip;..\src\MISC\Exception;..\src\MISC\Common;..\src\tinyxml\tinyXmlA;..\src\WinControls\AnsiCharPanel;..\src\WinControls\ClipboardHistory;..\src\WinControls\FindCharsInRange;..\src\WinControls\VerticalFileSwitcher;..\src\WinControls\ProjectPanel;..\src\WinControls\DocumentMap;..\src\WinControls\FunctionList;..\src\uchardet;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USE_64BIT_TIME_T;TIXML_USE_STL;TIXMLA_USE_STL;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NON_CONFORMING_SWPRINTFS=1;%(PreprocessorDefinitions) + false + false + true + Async + MultiThreaded + true + Create + precompiledHeaders.h + Level4 + true + ProgramDatabase + NoExtensions + 4456;4457;4459 + + + comctl32.lib;shlwapi.lib;shell32.lib;Oleacc.lib;%(AdditionalDependencies) + LinkVerboseLib + $(OutDir)notepad++.exe + 1.0 + + 1 + true + $(OutDir)npp.pdb + Windows + true + true + UseLinkTimeCodeGeneration + MachineX86 + + + ..\src\dpiAware.manifest;%(AdditionalManifestFiles) + + + copy ..\src\config.model.xml ..\bin\config.model.xml +copy ..\src\langs.model.xml ..\bin\langs.model.xml +copy ..\src\stylers.model.xml ..\bin\stylers.model.xml +copy ..\src\shortcuts.xml ..\bin\shortcuts.xml +copy ..\src\functionList.xml ..\bin\functionList.xml +copy ..\src\contextMenu.xml ..\bin\contextMenu.xml +..\misc\vistaIconTool\changeIcon.bat "..\misc\vistaIconTool\ChangeIcon.exe" "$(OutDir)notepad++.exe" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TurnOffAllWarnings + + + TurnOffAllWarnings + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file