Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: upgrade from Visual Studio 2015 to 2022 #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 28 additions & 12 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,37 @@
version: '{build}'

branches:
only:
- master
- /ci.*/
- /stable.*/
skip_branch_with_pr: true

skip_non_tags: true

image: Visual Studio 2017
image: Visual Studio 2022

init:
- ps: $env:commit = $env:appveyor_repo_commit.SubString(0,8)

install:
- ps: npm config set msvs_version 2017

build_script:
- ps: mkdir ..\app
- cmd: .\build.cmd
- cmd: cd Windows && msbuild.exe mailsync.sln /property:Configuration=Release;Platform=Win32
- cmd: |
IF not exist ..\..\app\dist (mkdir ..\..\app\dist)
XCOPY .\Release\*.* ..\..\app\dist
COPY "C:\Windows\SysWOW64\msvcr100.dll" ..\..\app\dist\ /Y
COPY "C:\Windows\SysWOW64\msvcr120.dll" ..\..\app\dist\ /Y
COPY "C:\Windows\SysWOW64\msvcp100.dll" ..\..\app\dist\ /Y
COPY "C:\Windows\SysWOW64\msvcp120.dll" ..\..\app\dist\ /Y
COPY "C:\Windows\SysWOW64\msvcp140.dll" ..\..\app\dist\ /Y
COPY "C:\Windows\SysWOW64\vcruntime140.dll" ..\..\app\dist\ /Y
XCOPY /rhy "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86" ..\..\app\dist\
# Validate that the program exits with code 2 (missing arguments). If any DLLs are missing that
# prevent the application from starting, a code like -1073741515 will be returned.
- ps: |
$process = Start-Process -FilePath "..\..\app\dist\mailsync.exe" -PassThru -Wait -NoNewWindow
$exitCode = $process.ExitCode

if ($exitCode -ne 2) {
Write-Host "We expected mailsync.exe to exit with code 2, but we got $exitCode instead."
exit 1
} else {
Write-Host "Exit code was as expected: $exitCode"
}

before_deploy:
- ps: (Get-ChildItem -Force -Path ..\..\app).FullName
Expand All @@ -36,6 +49,9 @@ deploy:
bucket: mailspring-builds
folder: 'mailsync/$(commit)'
set_public: true
# Deploy only when a new tag is created
on:
APPVEYOR_REPO_TAG: true

# Stop Appveyor from "Discovering Tests" forever
test: off
Expand Down
10 changes: 5 additions & 5 deletions Vendor/libetpan/build-windows/libetpan/libetpan.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,27 @@
<ProjectGuid>{BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}</ProjectGuid>
<RootNamespace>libetpan</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,32 +345,32 @@ build_headers.bat
<ProjectGuid>{AAD35E01-77E4-43CB-BBB4-F7F6692EA829}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>mailcore2</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down Expand Up @@ -408,7 +408,7 @@ build_headers.bat
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>MAILCORE_DLL;ZLIB_DLL;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>MAILCORE_DLL;ZLIB_DLL;_WINDLL;HAVE_STRUCT_TIMESPEC;_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory);..\..\include;..\..\..\Externals\include;..\..\..\src\core\basetypes;..\..\..\src\core\zip;..\..\..\src\core\zip\minizip;..\..\..\src\core\renderer;..\..\..\src\core/rfc822;..\..\..\src\core/imap;..\..\..\src\core\abstract;..\..\..\src\core\security;..\..\..\src\core\nntp;..\..\..\src\core\smtp;..\..\..\src\core\pop;</AdditionalIncludeDirectories>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
Expand All @@ -426,7 +426,7 @@ build_headers.bat
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>MAILCORE_DLL;ZLIB_DLL;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>MAILCORE_DLL;ZLIB_DLL;_WINDLL;HAVE_STRUCT_TIMESPEC;_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory);..\..\include;..\..\..\Externals\include;..\..\..\src\core\basetypes;..\..\..\src\core\zip;..\..\..\src\core\zip\minizip;..\..\..\src\core\renderer;..\..\..\src\core/rfc822;..\..\..\src\core/imap;..\..\..\src\core\abstract;..\..\..\src\core\security;..\..\..\src\core\imap;..\..\..\src\core\pop;..\..\..\src\core\nntp;..\..\..\src\core\smtp</AdditionalIncludeDirectories>
</ClCompile>
Expand All @@ -444,7 +444,7 @@ build_headers.bat
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>MAILCORE_DLL;ZLIB_DLL;_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>MAILCORE_DLL;ZLIB_DLL;_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS;_WINDLL;HAVE_STRUCT_TIMESPEC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory);..\..\include;..\..\..\Externals\include;..\..\..\src\core\basetypes;..\..\..\src\core\zip;..\..\..\src\core\zip\minizip;..\..\..\src\core\renderer;..\..\..\src\core/rfc822;..\..\..\src\core/imap;..\..\..\src\core\abstract;..\..\..\src\core\security;..\..\..\src\core\imap;..\..\..\src\core\pop;..\..\..\src\core\nntp;..\..\..\src\core\smtp</AdditionalIncludeDirectories>
</ClCompile>
Expand All @@ -464,7 +464,7 @@ build_headers.bat
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>MAILCORE_DLL;ZLIB_DLL;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>MAILCORE_DLL;ZLIB_DLL;_WINDLL;HAVE_STRUCT_TIMESPEC;_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory);..\..\include;..\..\..\Externals\include;..\..\..\src\core\basetypes;..\..\..\src\core\zip;..\..\..\src\core\zip\minizip;..\..\..\src\core\renderer;..\..\..\src\core/rfc822;..\..\..\src\core/imap;..\..\..\src\core\abstract;..\..\..\src\core\security;..\..\..\src\core\imap;..\..\..\src\core\pop;..\..\..\src\core\nntp;..\..\..\src\core\smtp</AdditionalIncludeDirectories>
</ClCompile>
Expand Down
22 changes: 18 additions & 4 deletions Windows/mailsync.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
<ProjectGuid>{FD5B276A-CB56-4697-8C6F-C02FF68AB435}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>mailsync</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down Expand Up @@ -85,7 +85,21 @@ _TIMESPEC_DEFINED;SQLITE_ENABLE_FTS5;CURL_STATICLIB;SPDLOG_WCHAR_FILENAMES;%(Pre
<AdditionalDependencies>legacy_stdio_definitions.lib;libcurl_a.lib;libxml2.lib;zlib.lib;iconv_a.lib;dbghelp.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;Ws2_32.lib;Dnsapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>IF not exist ..\..\app\dist (mkdir ..\..\app\dist) &amp;&amp; COPY .\Release\mailsync.exe ..\..\app\dist\ /Y &amp;&amp; COPY .\Release\mailsync.pdb ..\..\app\dist\ /Y &amp;&amp; COPY .\Release\libetpan.dll ..\..\app\dist\ /Y &amp;&amp; COPY .\Release\mailcore2.dll ..\..\app\dist\ /Y &amp;&amp; COPY .\Release\mailcore2.pdb ..\..\app\dist\ /Y &amp;&amp; COPY ..\Vendor\libetpan\third-party\bin\libiconv2.dll ..\..\app\dist\ /Y &amp;&amp; COPY ..\Vendor\mailcore2\Externals\bin\icudt54.dll ..\..\app\dist\ /Y &amp;&amp; COPY ..\Vendor\mailcore2\Externals\bin\icuin54.dll ..\..\app\dist\ /Y &amp;&amp; COPY ..\Vendor\mailcore2\Externals\bin\icuuc54.dll ..\..\app\dist\ /Y &amp;&amp; COPY ..\Vendor\mailcore2\Externals\lib\libctemplate.dll ..\..\app\dist\ /Y &amp;&amp; COPY ..\Vendor\mailcore2\Externals\bin\libcryptoMD.dll ..\..\app\dist\ /Y &amp;&amp; COPY ..\Vendor\mailcore2\Externals\lib\sasl2.dll ..\..\app\dist\ /Y &amp;&amp; COPY ..\Vendor\mailcore2\Externals\lib\libtidy.dll ..\..\app\dist\ /Y &amp;&amp; COPY ..\Vendor\mailcore2\Externals\lib\libxml2.dll ..\..\app\dist\ /Y &amp;&amp; COPY ..\Vendor\mailcore2\Externals\dll\x86\pthreadVC2.dll ..\..\app\dist\ /Y &amp;&amp; COPY ..\Vendor\mailcore2\Externals\bin\libsslMD.dll ..\..\app\dist\ /Y &amp;&amp; COPY ..\Vendor\mailcore2\Externals\lib\zlib.dll ..\..\app\dist\ /Y &amp;&amp; COPY "C:\Windows\SysWOW64\msvcr100.dll" ..\..\app\dist\ /Y &amp;&amp; COPY "C:\Windows\SysWOW64\msvcr120.dll" ..\..\app\dist\ /Y &amp;&amp; COPY "C:\Windows\SysWOW64\msvcp100.dll" ..\..\app\dist\ /Y &amp;&amp; COPY "C:\Windows\SysWOW64\msvcp120.dll" ..\..\app\dist\ /Y &amp;&amp; COPY "C:\Windows\SysWOW64\msvcp140.dll" ..\..\app\dist\ /Y &amp;&amp; COPY "C:\Windows\SysWOW64\vcruntime140.dll" ..\..\app\dist\ /Y &amp;&amp; XCOPY /rhy "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86" ..\..\app\dist\ &amp;&amp; CD ..\..\app\dist &amp;&amp; XCOPY *.* ..\</Command>
<Message>Copying project dependencies into the $(TargetDir) folder...</Message>
<Command>
COPY $(ProjectDir)..\Vendor\libetpan\third-party\bin\libiconv2.dll $(TargetDir) /Y
COPY $(ProjectDir)..\Vendor\mailcore2\Externals\bin\icudt54.dll $(TargetDir) /Y
COPY $(ProjectDir)..\Vendor\mailcore2\Externals\bin\icuin54.dll $(TargetDir) /Y
COPY $(ProjectDir)..\Vendor\mailcore2\Externals\bin\icuuc54.dll $(TargetDir) /Y
COPY $(ProjectDir)..\Vendor\mailcore2\Externals\lib\libctemplate.dll $(TargetDir) /Y
COPY $(ProjectDir)..\Vendor\mailcore2\Externals\bin\libcryptoMD.dll $(TargetDir) /Y
COPY $(ProjectDir)..\Vendor\mailcore2\Externals\lib\sasl2.dll $(TargetDir) /Y
COPY $(ProjectDir)..\Vendor\mailcore2\Externals\lib\libtidy.dll $(TargetDir) /Y
COPY $(ProjectDir)..\Vendor\mailcore2\Externals\lib\libxml2.dll $(TargetDir) /Y
COPY $(ProjectDir)..\Vendor\mailcore2\Externals\dll\x86\pthreadVC2.dll $(TargetDir) /Y
COPY $(ProjectDir)..\Vendor\mailcore2\Externals\bin\libsslMD.dll $(TargetDir) /Y
COPY $(ProjectDir)..\Vendor\mailcore2\Externals\lib\zlib.dll $(TargetDir) /Y
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down
3 changes: 0 additions & 3 deletions build.cmd

This file was deleted.