mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-20 21:13:25 +08:00
- dropping WinXP support , using compiler toolset vc141 Win SDK 10.0.14393.0
(current VC++ redistributable needed ?)
This commit is contained in:
parent
d3e17140e4
commit
e5ab61a440
@ -22,28 +22,28 @@
|
||||
<SccProjectName />
|
||||
<SccLocalPath />
|
||||
<ProjectGuid>{781B17E7-427F-488F-A8E9-360BA38A10F3}</ProjectGuid>
|
||||
<WindowsTargetPlatformVersion>7.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>minipath</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
|
||||
@ -181,8 +181,12 @@ int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInst,LPSTR lpCmdLine,int n
|
||||
g_hInstance = hInstance;
|
||||
|
||||
// Set the Windows version global variable
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable : 4996 ) /* deprecated method */
|
||||
#pragma message ("TODO: use #include <VersionHelpers.h> to replace GetVersion() ")
|
||||
g_uWinVer = LOWORD(GetVersion());
|
||||
g_uWinVer = MAKEWORD(HIBYTE(g_uWinVer),LOBYTE(g_uWinVer));
|
||||
#pragma warning (pop)
|
||||
|
||||
SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX);
|
||||
|
||||
|
||||
@ -23,33 +23,33 @@
|
||||
<ProjectGuid>{0210F830-26C6-40FC-BFD1-6ED833B90830}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>np3encrypt</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>np3encrypt</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
<ProjectGuid>{5877B917-512B-49F5-B514-1B4159E7A9CA}</ProjectGuid>
|
||||
<ProjectName>Scintilla</ProjectName>
|
||||
<RootNamespace>Scintilla</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>7.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
@ -32,7 +32,7 @@
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)'=='10.0'">v100</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)'=='12.0'">v120_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)'=='14.0'">v140_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)'=='15.0'">v141_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)'=='15.0'">v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
@ -40,7 +40,7 @@
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)'=='10.0'">v100</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)'=='12.0'">v120_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)'=='14.0'">v140_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)'=='15.0'">v141_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)'=='15.0'">v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
@ -48,7 +48,7 @@
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)'=='10.0'">v100</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)'=='12.0'">v120_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)'=='14.0'">v140_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)'=='15.0'">v141_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)'=='15.0'">v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
@ -57,7 +57,7 @@
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)'=='10.0'">v100</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)'=='12.0'">v120_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)'=='14.0'">v140_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)'=='15.0'">v141_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)'=='15.0'">v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
|
||||
@ -38,7 +38,6 @@
|
||||
#define LCMAP_TITLECASE 0x00000300 // Title Case Letters bit mask
|
||||
#endif
|
||||
|
||||
extern UINT16 g_uWinVer;
|
||||
extern HWND hwndMain;
|
||||
extern HWND hwndEdit;
|
||||
extern HINSTANCE g_hInstance;
|
||||
@ -1975,7 +1974,7 @@ void EditTitleCase(HWND hwnd)
|
||||
cpEdit = Encoding_SciGetCodePage(hwnd);
|
||||
cchTextW = MultiByteToWideChar(cpEdit,0,pszText,iSelLength,pszTextW,iSelLength);
|
||||
|
||||
if (IsW7()) {
|
||||
if (IsWin7()) {
|
||||
|
||||
LPWSTR pszMappedW = LocalAlloc(LPTR,GlobalSize(pszTextW));
|
||||
|
||||
|
||||
@ -29,7 +29,6 @@
|
||||
#include "helpers.h"
|
||||
|
||||
extern HINSTANCE g_hInstance;
|
||||
extern UINT16 g_uWinVer;
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
|
||||
@ -16,11 +16,13 @@
|
||||
#ifndef _NP3_HELPERS_H_
|
||||
#define _NP3_HELPERS_H_
|
||||
|
||||
|
||||
#include <VersionHelpers.h>
|
||||
#define STRSAFE_NO_CB_FUNCTIONS
|
||||
// don't allow deprecated functions
|
||||
#undef STRSAFE_NO_DEPRECATE
|
||||
#undef STRSAFE_NO_DEPRECATE // don't allow deprecated functions
|
||||
#include <strsafe.h>
|
||||
|
||||
|
||||
#define STRGFY(X) L##X
|
||||
#define MKWSTRG(strg) STRGFY(strg)
|
||||
|
||||
@ -60,10 +62,30 @@ __inline BOOL IniSectionSetInt(LPWSTR lpCachedIniSection,LPCWSTR lpName,int i) {
|
||||
#define EndWaitCursor() { POINT pt; SendMessage(hwndEdit,SCI_SETCURSOR,(WPARAM)SC_CURSORNORMAL,0); GetCursorPos(&pt); SetCursorPos(pt.x,pt.y); }
|
||||
|
||||
|
||||
#define Is2k() (g_uWinVer >= 0x0500)
|
||||
#define IsXP() (g_uWinVer >= 0x0501)
|
||||
#define IsVista() (g_uWinVer >= 0x0600)
|
||||
#define IsW7() (g_uWinVer >= 0x0601)
|
||||
//#define Is2k() (g_uWinVer >= 0x0500)
|
||||
#define IsXP() IsWindowsXPOrGreater() // Indicates if the current OS version matches,or is greater than,the Windows XP version.
|
||||
#define IsXP1() IsWindowsXPSP1OrGreater() // Indicates if the current OS version matches,or is greater than,the Windows XP with Service Pack 1 (SP1)version.
|
||||
#define IsXP2() IsWindowsXPSP2OrGreater() // Indicates if the current OS version matches,or is greater than,the Windows XP with Service Pack 2 (SP2)version.
|
||||
#define IsXP3() IsWindowsXPSP3OrGreater() // Indicates if the current OS version matches,or is greater than,the Windows XP with Service Pack 3 (SP3)version.
|
||||
|
||||
#define IsVista() IsWindowsVistaOrGreater() // Indicates if the current OS version matches,or is greater than,the Windows Vista version.
|
||||
#define IsVista1() IsWindowsVistaSP1OrGreater() // Indicates if the current OS version matches,or is greater than,the Windows Vista with Service Pack 1 (SP1)version.
|
||||
#define IsVista2() IsWindowsVistaSP2OrGreater() // Indicates if the current OS version matches,or is greater than,the Windows Vista with Service Pack 2 (SP2)version.
|
||||
|
||||
#define IsWin7() IsWindows7OrGreater() // Indicates if the current OS version matches,or is greater than,the Windows 7 version.
|
||||
#define IsWin71() IsWindows7SP1OrGreater() // Indicates if the current OS version matches,or is greater than,the Windows 7 with Service Pack 1 (SP1)version.
|
||||
#define IsWin8() IsWindows8OrGreater() // Indicates if the current OS version matches,or is greater than,the Windows 8 version.
|
||||
#define IsWin81() IsWindows8Point1OrGreater() // Indicates if the current OS version matches,or is greater than,the Windows 8.1 version.
|
||||
// For Windows 10,IsWindows8Point1OrGreater returns false unless the application contains a manifest that includes
|
||||
// a compatibility section that contains the GUIDs that designate Windows 8.1 and/or Windows 10.
|
||||
|
||||
#define IsWin10() IsWindows10OrGreater() // Indicates if the current OS version matches, or is greater than, the Windows 10 version.
|
||||
// For Windows 10,IsWindows10OrGreater returns false unless the application contains a manifest that includes
|
||||
// a compatibility section that contains the GUID that designates Windows 10.
|
||||
|
||||
#define IsWinServer() IsWindowsServer() // Indicates if the current OS is a Windows Server release.
|
||||
// Applications that need to distinguish between server and client versions of Windows should call this function.
|
||||
|
||||
|
||||
enum BufferSizes {
|
||||
MICRO_BUFFER = 32,
|
||||
|
||||
@ -290,7 +290,6 @@ WCHAR wchWndClass[16] = WC_NOTEPAD3;
|
||||
|
||||
HINSTANCE g_hInstance;
|
||||
HANDLE g_hScintilla;
|
||||
UINT16 g_uWinVer;
|
||||
WCHAR g_wchAppUserModelID[32] = { L'\0' };
|
||||
WCHAR g_wchWorkingDirectory[MAX_PATH] = { L'\0' };
|
||||
|
||||
@ -601,10 +600,6 @@ int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInst,LPSTR lpCmdLine,int n
|
||||
// Set global variable g_hInstance
|
||||
g_hInstance = hInstance;
|
||||
|
||||
// Set the Windows version global variable
|
||||
g_uWinVer = LOWORD(GetVersion());
|
||||
g_uWinVer = MAKEWORD(HIBYTE(g_uWinVer),LOBYTE(g_uWinVer));
|
||||
|
||||
// Don't keep working directory locked
|
||||
GetCurrentDirectory(COUNTOF(g_wchWorkingDirectory),g_wchWorkingDirectory);
|
||||
GetModuleFileName(NULL,wchWorkingDirectory,COUNTOF(wchWorkingDirectory));
|
||||
@ -613,8 +608,8 @@ int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInst,LPSTR lpCmdLine,int n
|
||||
|
||||
SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX);
|
||||
|
||||
// check if running at least on Windows 2000
|
||||
if (!Is2k()) {
|
||||
// check if running at least on Windows XP
|
||||
if (!IsXP()) {
|
||||
LPVOID lpMsgBuf;
|
||||
FormatMessage(
|
||||
FORMAT_MESSAGE_ALLOCATE_BUFFER|
|
||||
|
||||
BIN
src/Notepad3.rc
BIN
src/Notepad3.rc
Binary file not shown.
@ -23,34 +23,34 @@
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{BAAD32AB-CD47-12FD-873C-0BBC204B7641}</ProjectGuid>
|
||||
<ProjectName>Notepad3</ProjectName>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user