Skip to content
This repository was archived by the owner on Aug 12, 2018. It is now read-only.

Commit 17cd1b8

Browse files
committed
Update to MSVC 2017.
1 parent 06f5999 commit 17cd1b8

File tree

12 files changed

+89
-85
lines changed

12 files changed

+89
-85
lines changed

Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@
4747
* <kbd>Ctrl+Alt+Shift+F2</kbd> Expand selection to previous match.
4848
* <kbd>Ctrl+Shift+Enter</kbd> New line with toggled auto indent option.
4949

50-
You can use MSVC 2015 to build Notepad2-mod.
50+
You can use MSVC 2017 to build Notepad2-mod.
Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,14 @@ rem * Batch file used to build Notepad2 with MSVC2015
88
rem *
99
rem * See License.txt for details about distribution and modification.
1010
rem *
11-
rem * (c) XhmikosR 2010-2015
11+
rem * (c) XhmikosR 2010-2015, 2017
1212
rem * https://github.com/XhmikosR/notepad2-mod
1313
rem *
1414
rem ******************************************************************************
1515

1616
SETLOCAL ENABLEEXTENSIONS
1717
CD /D %~dp0
1818

19-
rem Check the building environment
20-
IF NOT DEFINED VS140COMNTOOLS CALL :SUBMSG "ERROR" "Visual Studio 2015 wasn't found!"
21-
22-
2319
rem Check for the help switches
2420
IF /I "%~1" == "help" GOTO SHOWHELP
2521
IF /I "%~1" == "/help" GOTO SHOWHELP
@@ -103,20 +99,23 @@ IF "%~3" == "" (
10399

104100

105101
:START
102+
CALL :SubVSPath
103+
IF NOT EXIST "%VS_PATH%" CALL :SUBMSG "ERROR" "Visual Studio 2017 NOT FOUND!"
104+
106105
IF /I "%ARCH%" == "x64" GOTO x64
107106
IF /I "%ARCH%" == "x86" GOTO x86
108107

109108

110109
:x86
111-
CALL "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86
110+
CALL "%VS_PATH%\Common7\Tools\vsdevcmd" -no_logo -arch=x86
112111

113112
IF /I "%CONFIG%" == "all" (CALL :SUBMSVC %BUILDTYPE% Debug Win32 && CALL :SUBMSVC %BUILDTYPE% Release Win32) ELSE (CALL :SUBMSVC %BUILDTYPE% %CONFIG% Win32)
114113

115114
IF /I "%ARCH%" == "x86" GOTO END
116115

117116

118117
:x64
119-
CALL "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86_amd64
118+
CALL "%VS_PATH%\Common7\Tools\vsdevcmd" -no_logo -arch=amd64
120119

121120
IF /I "%CONFIG%" == "all" (CALL :SUBMSVC %BUILDTYPE% Debug x64 && CALL :SUBMSVC %BUILDTYPE% Release x64) ELSE (CALL :SUBMSVC %BUILDTYPE% %CONFIG% x64)
122121

@@ -127,6 +126,12 @@ ENDLOCAL
127126
EXIT /B
128127

129128

129+
:SubVSPath
130+
rem Check the building environment
131+
FOR /f "delims=" %%A IN ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -property installationPath -latest -requires Microsoft.Component.MSBuild Microsoft.VisualStudio.Component.VC.ATLMFC Microsoft.VisualStudio.Component.VC.Tools.x86.x64') DO SET "VS_PATH=%%A"
132+
EXIT /B
133+
134+
130135
:SUBMSVC
131136
ECHO.
132137
TITLE Building Notepad2-mod with MSVC2015 - %~1 "%~2|%~3"...

build/coverity.bat

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ rem * Originally taken and adapted from https://github.com/mpc-hc/mpc-hc
99
rem *
1010
rem * See License.txt for details about distribution and modification.
1111
rem *
12-
rem * (c) XhmikosR 2013-2015
12+
rem * (c) XhmikosR 2013-2015, 2017
1313
rem * https://github.com/XhmikosR/notepad2-mod
1414
rem *
1515
rem ******************************************************************************
@@ -27,22 +27,19 @@ IF DEFINED COVDIR IF NOT EXIST "%COVDIR%" (
2727
)
2828

2929

30-
CALL "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86
31-
IF %ERRORLEVEL% NEQ 0 (
32-
ECHO vcvarsall.bat call failed.
33-
GOTO End
34-
)
30+
CALL :SubVSPath
31+
IF NOT EXIST "%VS_PATH%" CALL :SUBMSG "ERROR" "Visual Studio 2017 NOT FOUND!"
3532

3633

3734
:Cleanup
38-
IF EXIST "cov-int" RD /q /s "cov-int"
35+
IF EXIST "cov-int" RD /q /s "cov-int"
3936
IF EXIST "Notepad2-mod.lzma" DEL "Notepad2-mod.lzma"
4037
IF EXIST "Notepad2-mod.tar" DEL "Notepad2-mod.tar"
4138
IF EXIST "Notepad2-mod.tgz" DEL "Notepad2-mod.tgz"
4239

4340

4441
:Main
45-
"%COVDIR%\bin\cov-build.exe" --dir cov-int "build_vs2015.bat" Rebuild All Release
42+
"%COVDIR%\bin\cov-build.exe" --dir cov-int "build_vs2017.bat" Rebuild All Release
4643

4744

4845
:tar
@@ -77,6 +74,11 @@ FOR /F "tokens=2*" %%A IN (
7774
EXIT /B
7875

7976

77+
:SubVSPath
78+
FOR /f "delims=" %%A IN ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -property installationPath -latest -requires Microsoft.Component.MSBuild Microsoft.VisualStudio.Component.VC.ATLMFC Microsoft.VisualStudio.Component.VC.Tools.x86.x64') DO SET "VS_PATH=%%A"
79+
EXIT /B
80+
81+
8082
:End
8183
POPD
8284
ECHO. & ECHO Press any key to close this window...
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ rem * and creating the installer/zip packages
99
rem *
1010
rem * See License.txt for details about distribution and modification.
1111
rem *
12-
rem * (c) XhmikosR 2010-2015
12+
rem * (c) XhmikosR 2010-2015, 2017
1313
rem * https://github.com/XhmikosR/notepad2-mod
1414
rem *
1515
rem ******************************************************************************
1616

1717
SETLOCAL
1818
CD /D %~dp0
1919

20-
CALL "build_vs2015.bat" %1
21-
CALL "make_installer.bat" vs2015
22-
CALL "make_zip.bat" vs2015
20+
CALL "build_vs2017.bat" %1
21+
CALL "make_installer.bat" vs2017
22+
CALL "make_zip.bat" vs2017
2323

2424

2525
:END

build/make_installer.bat

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ CALL :SubDetectInnoSetup
3434

3535
rem Check for the first switch
3636
IF "%~1" == "" (
37-
SET "COMPILER=VS2015"
37+
SET "COMPILER=VS2017"
3838
) ELSE (
39-
IF /I "%~1" == "VS2015" SET "COMPILER=VS2015" & GOTO START
40-
IF /I "%~1" == "/VS2015" SET "COMPILER=VS2015" & GOTO START
41-
IF /I "%~1" == "-VS2015" SET "COMPILER=VS2015" & GOTO START
42-
IF /I "%~1" == "--VS2015" SET "COMPILER=VS2015" & GOTO START
39+
IF /I "%~1" == "VS2017" SET "COMPILER=VS2017" & GOTO START
40+
IF /I "%~1" == "/VS2017" SET "COMPILER=VS2017" & GOTO START
41+
IF /I "%~1" == "-VS2017" SET "COMPILER=VS2017" & GOTO START
42+
IF /I "%~1" == "--VS2017" SET "COMPILER=VS2017" & GOTO START
4343

4444
ECHO.
4545
ECHO Unsupported commandline switch!
@@ -53,7 +53,7 @@ IF EXIST "%~dp0..\signinfo.txt" SET "SIGN=True"
5353

5454
SET INPUTDIRx86=bin\%COMPILER%\Release_x86
5555
SET INPUTDIRx64=bin\%COMPILER%\Release_x64
56-
IF /I NOT "%COMPILER%" == "VS2015" SET SUFFIX=_%COMPILER%
56+
IF /I NOT "%COMPILER%" == "VS2017" SET SUFFIX=_%COMPILER%
5757
SET "TEMP_NAME=temp_zip%SUFFIX%"
5858

5959
IF NOT EXIST "..\%INPUTDIRx86%\Notepad2.exe" CALL :SUBMSG "ERROR" "Compile Notepad2 x86 first!"
@@ -125,7 +125,7 @@ EXIT /B
125125
:SHOWHELP
126126
TITLE %~nx0 %1
127127
ECHO. & ECHO.
128-
ECHO Usage: %~nx0 [VS2015]
128+
ECHO Usage: %~nx0 [VS2017]
129129
ECHO.
130130
ECHO Notes: You can also prefix the commands with "-", "--" or "/".
131131
ECHO The arguments are not case sensitive.
@@ -134,7 +134,7 @@ ECHO You can use another Inno Setup location by defining %%InnoSetupPath
134134
ECHO This is usefull if you have the Unicode build installed
135135
ECHO and you want to use the ANSI one.
136136
ECHO. & ECHO.
137-
ECHO Executing %~nx0 without any arguments is equivalent to "%~nx0 VS2015"
137+
ECHO Executing %~nx0 without any arguments is equivalent to "%~nx0 VS2017"
138138
ECHO.
139139
ENDLOCAL
140140
EXIT /B

build/make_zip.bat

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ IF /I "%~1" == "/?" GOTO SHOWHELP
2727

2828
rem Check for the first switch
2929
IF "%~1" == "" (
30-
SET "COMPILER=VS2015"
30+
SET "COMPILER=VS2017"
3131
) ELSE (
32-
IF /I "%~1" == "VS2015" (SET "COMPILER=VS2015" & GOTO START)
33-
IF /I "%~1" == "/VS2015" (SET "COMPILER=VS2015" & GOTO START)
34-
IF /I "%~1" == "-VS2015" (SET "COMPILER=VS2015" & GOTO START)
35-
IF /I "%~1" == "--VS2015" (SET "COMPILER=VS2015" & GOTO START)
32+
IF /I "%~1" == "VS2017" (SET "COMPILER=VS2017" & GOTO START)
33+
IF /I "%~1" == "/VS2017" (SET "COMPILER=VS2017" & GOTO START)
34+
IF /I "%~1" == "-VS2017" (SET "COMPILER=VS2017" & GOTO START)
35+
IF /I "%~1" == "--VS2017" (SET "COMPILER=VS2017" & GOTO START)
3636

3737
ECHO.
3838
ECHO Unsupported commandline switch!
@@ -46,7 +46,7 @@ IF EXIST "%~dp0..\signinfo.txt" SET "SIGN=True"
4646

4747
SET INPUTDIRx86=bin\%COMPILER%\Release_x86
4848
SET INPUTDIRx64=bin\%COMPILER%\Release_x64
49-
IF /I NOT "%COMPILER%" == "VS2015" SET SUFFIX=_%COMPILER%
49+
IF /I NOT "%COMPILER%" == "VS2017" SET SUFFIX=_%COMPILER%
5050
SET "TEMP_NAME=temp_zip%SUFFIX%"
5151

5252
IF NOT EXIST "..\%INPUTDIRx86%\Notepad2.exe" CALL :SUBMSG "ERROR" "Compile Notepad2 x86 first!"
@@ -164,12 +164,12 @@ EXIT /B
164164
:SHOWHELP
165165
TITLE %~nx0 %1
166166
ECHO. & ECHO.
167-
ECHO Usage: %~nx0 [VS2015]
167+
ECHO Usage: %~nx0 [VS2017]
168168
ECHO.
169169
ECHO Notes: You can also prefix the commands with "-", "--" or "/".
170170
ECHO The arguments are not case sensitive.
171171
ECHO. & ECHO.
172-
ECHO Executing %~nx0 without any arguments is equivalent to "%~nx0 VS2015"
172+
ECHO Executing %~nx0 without any arguments is equivalent to "%~nx0 VS2017"
173173
ECHO.
174174
ENDLOCAL
175175
EXIT /B

build/sign.bat

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ rem * Originally taken and adapted from https://github.com/mpc-hc/mpc-hc
99
rem *
1010
rem * See License.txt for details about distribution and modification.
1111
rem *
12-
rem * (c) XhmikosR 2013-2015
12+
rem * (c) XhmikosR 2013-2015, 2017
1313
rem * https://github.com/XhmikosR/notepad2-mod
1414
rem *
1515
rem ******************************************************************************
@@ -24,19 +24,18 @@ IF "%~1" == "" (
2424
GOTO END
2525
)
2626

27-
IF NOT DEFINED VS140COMNTOOLS (
28-
ECHO %~nx0: Visual Studio 2015 does not seem to be installed...
29-
SET SIGN_ERROR=True
30-
GOTO END
31-
)
27+
CALL :SubVSPath
28+
IF NOT EXIST "%VS_PATH%" CALL :SUBMSG "ERROR" "Visual Studio 2017 NOT FOUND!"
3229

3330
IF NOT EXIST "%FILE_DIR%..\signinfo.txt" (
3431
ECHO %~nx0: %FILE_DIR%..\signinfo.txt is not present!
3532
SET SIGN_ERROR=True
3633
GOTO END
3734
)
3835

39-
signtool /? 2>NUL || CALL "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" 2>NUL
36+
SET "TOOLSET=%VS_PATH%\Common7\Tools\vsdevcmd"
37+
38+
signtool /? 2>NUL || CALL "%TOOLSET%" 2>NUL
4039
IF %ERRORLEVEL% NEQ 0 (
4140
ECHO vcvarsall.bat call failed.
4241
GOTO End
@@ -55,6 +54,10 @@ IF /I "%SIGN_ERROR%" == "True" (
5554
ENDLOCAL
5655
EXIT /B
5756

57+
:SubVSPath
58+
FOR /f "delims=" %%A IN ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -property installationPath -latest -requires Microsoft.Component.MSBuild Microsoft.VisualStudio.Component.VC.ATLMFC Microsoft.VisualStudio.Component.VC.Tools.x86.x64') DO SET "VS_PATH=%%A"
59+
EXIT /B
60+
5861
:START_SIGN
5962
IF /I "%SIGN_ERROR%" == "True" EXIT /B
6063
REM %1 is name of the file to sign

distrib/notepad2_setup.iss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@
1010
; Inno Setup: http://www.jrsoftware.org/isdl.php
1111

1212

13-
#define VS2015
13+
#define VS2017
1414

1515
; Preprocessor related stuff
1616
#if VER < EncodeVer(5,5,9)
1717
#error Update your Inno Setup version (5.5.9 or newer)
1818
#endif
1919

20-
#if !defined(VS2015)
21-
#error You need to define the compiler used; VS2015
20+
#if !defined(VS2017)
21+
#error You need to define the compiler used; VS2017
2222
#endif
2323

24-
#if defined(VS2015)
25-
#define compiler "VS2015"
24+
#if defined(VS2017)
25+
#define compiler "VS2017"
2626
#endif
2727

2828
#define bindir "..\bin\" + compiler
@@ -60,15 +60,15 @@ AppContact=https://github.com/XhmikosR/notepad2-mod
6060
AppCopyright={#app_copyright}
6161
VersionInfoVersion={#app_version}
6262
UninstallDisplayIcon={app}\Notepad2.exe
63-
#if defined(VS2015)
63+
#if defined(VS2017)
6464
UninstallDisplayName={#app_name} {#app_version}
6565
#else
6666
UninstallDisplayName={#app_name} {#app_version} ({#compiler})
6767
#endif
6868
DefaultDirName={pf}\Notepad2
6969
LicenseFile=license.txt
7070
OutputDir=.
71-
#if defined(VS2015)
71+
#if defined(VS2017)
7272
OutputBaseFilename={#app_name}.{#app_version}
7373
#else
7474
OutputBaseFilename={#app_name}.{#app_version}_{#compiler}

scintilla/Scintilla.vcxproj

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
44
<ProjectConfiguration Include="Debug|Win32">
55
<Configuration>Debug</Configuration>
@@ -28,23 +28,23 @@
2828
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
2929
<CharacterSet>Unicode</CharacterSet>
3030
<ConfigurationType>StaticLibrary</ConfigurationType>
31-
<PlatformToolset>v140_xp</PlatformToolset>
31+
<PlatformToolset>v141_xp</PlatformToolset>
3232
</PropertyGroup>
3333
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
3434
<CharacterSet>Unicode</CharacterSet>
3535
<ConfigurationType>StaticLibrary</ConfigurationType>
36-
<PlatformToolset>v140_xp</PlatformToolset>
36+
<PlatformToolset>v141_xp</PlatformToolset>
3737
</PropertyGroup>
3838
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
3939
<CharacterSet>Unicode</CharacterSet>
4040
<ConfigurationType>StaticLibrary</ConfigurationType>
41-
<PlatformToolset>v140_xp</PlatformToolset>
41+
<PlatformToolset>v141_xp</PlatformToolset>
4242
<WholeProgramOptimization>true</WholeProgramOptimization>
4343
</PropertyGroup>
4444
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
4545
<CharacterSet>Unicode</CharacterSet>
4646
<ConfigurationType>StaticLibrary</ConfigurationType>
47-
<PlatformToolset>v140_xp</PlatformToolset>
47+
<PlatformToolset>v141_xp</PlatformToolset>
4848
<WholeProgramOptimization>true</WholeProgramOptimization>
4949
</PropertyGroup>
5050
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -65,14 +65,14 @@
6565
<PropertyGroup Label="UserMacros" />
6666
<PropertyGroup>
6767
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
68-
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\VS2015\$(Configuration)_x86\obj\scintilla\</OutDir>
69-
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\bin\VS2015\$(Configuration)_x64\obj\scintilla\</OutDir>
70-
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\bin\VS2015\$(Configuration)_x86\obj\scintilla\</OutDir>
71-
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\bin\VS2015\$(Configuration)_x64\obj\scintilla\</OutDir>
72-
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\VS2015\$(Configuration)_x86\obj\scintilla\</IntDir>
73-
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\bin\VS2015\$(Configuration)_x64\obj\scintilla\</IntDir>
74-
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\bin\VS2015\$(Configuration)_x86\obj\scintilla\</IntDir>
75-
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\bin\VS2015\$(Configuration)_x64\obj\scintilla\</IntDir>
68+
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\VS2017\$(Configuration)_x86\obj\scintilla\</OutDir>
69+
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\bin\VS2017\$(Configuration)_x64\obj\scintilla\</OutDir>
70+
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\bin\VS2017\$(Configuration)_x86\obj\scintilla\</OutDir>
71+
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\bin\VS2017\$(Configuration)_x64\obj\scintilla\</OutDir>
72+
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\VS2017\$(Configuration)_x86\obj\scintilla\</IntDir>
73+
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\bin\VS2017\$(Configuration)_x64\obj\scintilla\</IntDir>
74+
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\bin\VS2017\$(Configuration)_x86\obj\scintilla\</IntDir>
75+
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\bin\VS2017\$(Configuration)_x64\obj\scintilla\</IntDir>
7676
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
7777
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
7878
</PropertyGroup>

scintilla/Scintilla.vcxproj.filters

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,6 @@
395395
<ClInclude Include="src\XPM.h">
396396
<Filter>src</Filter>
397397
</ClInclude>
398-
<ClInclude Include="win32\HanjaDic.h">
399-
<Filter>win32</Filter>
400-
</ClInclude>
401398
<ClInclude Include="win32\PlatWin.h">
402399
<Filter>win32</Filter>
403400
</ClInclude>

0 commit comments

Comments
 (0)