Skip to content

Commit

Permalink
project: migrate to vs2017
Browse files Browse the repository at this point in the history
Change-Id: If991ec828c34a6b51c1aa12e0f316abf76a5c781
  • Loading branch information
atraczyk authored and aberaud committed Jun 20, 2018
1 parent 58f49e1 commit 009ddf3
Show file tree
Hide file tree
Showing 70 changed files with 3,818 additions and 11,838 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -101,6 +101,7 @@ nbproject

#UWP
/contrib/build/
/contrib/msvc/

#iOS
/build-ios*
Expand Down
105 changes: 69 additions & 36 deletions MSVC/ring-daemon.vcxproj

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions MSVC/ring-daemon.vcxproj.filters
Expand Up @@ -379,6 +379,12 @@
<ClCompile Include="..\src\security\diffie-hellman.cpp">
<Filter>Source Files\security</Filter>
</ClCompile>
<ClCompile Include="..\src\media\media_filter.cpp">
<Filter>Source Files\media</Filter>
</ClCompile>
<ClCompile Include="..\src\media\media_recorder.cpp">
<Filter>Source Files\media</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\account.h">
Expand Down Expand Up @@ -783,6 +789,15 @@
<ClInclude Include="..\src\upnp\upnp_igd.h">
<Filter>Source Files\upnp</Filter>
</ClInclude>
<ClInclude Include="..\src\media\media_filter.h">
<Filter>Source Files\media</Filter>
</ClInclude>
<ClInclude Include="..\src\media\media_recorder.h">
<Filter>Source Files\media</Filter>
</ClInclude>
<ClInclude Include="..\src\media\media_stream.h">
<Filter>Source Files\media</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\src\ringdht\eth\libdevcore\Makefile.am">
Expand Down
123 changes: 123 additions & 0 deletions contrib/build_all.bat
@@ -0,0 +1,123 @@
@echo off
setlocal EnableDelayedExpansion

set SRC=%~dp0

set MSBUILD_ARGS=/nologo /p:useenv=true /p:Configuration=Release /p:Platform=x64 /verbosity:normal /maxcpucount:%NUMBER_OF_PROCESSORS%

@setlocal

set VSInstallerFolder="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer"
if %PROCESSOR_ARCHITECTURE%==x86 set VSInstallerFolder="%ProgramFiles%\Microsoft Visual Studio\Installer"

pushd %VSInstallerFolder%
for /f "usebackq tokens=*" %%i in (`vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do (
set VSLATESTDIR=%%i
)
popd

echo VS Installation folder: %VSLATESTDIR%

if not exist "%VSLATESTDIR%\VC\Auxiliary\Build\vcvarsall.bat" (
echo:
echo VSInstallDir not found or not installed correctly.
goto cleanup
)

if %PROCESSOR_ARCHITECTURE%==x86 (
set Comp_x86=x86 uwp 10.0.15063.0
set Comp_x64=x86_amd64 uwp 10.0.15063.0
set Comp_ARM=x86_arm uwp 10.0.15063.0
) else (
set Comp_x86=amd64_x86 uwp 10.0.15063.0
set Comp_x64=amd64 uwp 10.0.15063.0
set Comp_ARM=amd64_arm uwp 10.0.15063.0
)

set MSYS2_PATH_TYPE=inherit

if not defined MSYS2_BIN (
if exist C:\msys64\usr\bin\bash.exe set MSYS2_BIN="C:\msys64\usr\bin\bash.exe"
)
if not defined MSYS2_BIN (
if exist C:\msys\usr\bin\bash.exe set MSYS2_BIN="C:\msys\usr\bin\bash.exe"
)

echo building ffmpeg for uwp x64...
set path=%path:"=%
call "%VSLATESTDIR%"\\VC\\Auxiliary\\Build\\vcvarsall.bat %Comp_x64%

rem * build libx264 *
call :build build\x264\SMP\libx264.vcxproj

rem * build libopus *
call :build build\opus\SMP\libopus.vcxproj

rem * build ffmpeg *
%MSYS2_BIN% --login -x %~dp0src/ffmpeg/windows-uwp-x64-configure-make.sh
for /r %~dp0\qbuild\ffmpeg\Output\Windows10\x64 %%f in (*.pdb) do @copy "%%f" %~dp0\build\ffmpeg\Build\Windows10\x64\bin

rem * build openssl *
cd build\restbed\dependency\openssl
call perl Configure no-asm no-hw no-dso VC-WINUNIVERSAL
call ms\do_winuniversal
call ms\setVSvars universal10.0x64
call nmake -f ms\ntdll.mak
set PATH=restbed\dependency\openssl\out32dll;%PATH%

rem * build restbed w/asio *
cd ..\..
mkdir build
cd build
cmake -DBUILD_SSL=ON -G "Visual Studio 15 2017 Win64" ..
cmake --build . --target ALL_BUILD --config Release
cd ..\..

set DEPENDENCIES=( ^
build\jsoncpp\makefiles\vs2017\lib_json.vcxproj, ^
build\argon2\vs2015\Argon2Ref\Argon2Ref.vcxproj, ^
build\gmp\SMP\libgmp.vcxproj, ^
build\iconv\SMP\libiconv.vcxproj, ^
build\zlib\SMP\libzlib.vcxproj, ^
build\nettle\SMP\libnettle.vcxproj, ^
build\nettle\SMP\libhogweed.vcxproj, ^
build\gnutls\SMP\libgnutls.vcxproj, ^
build\msgpack-c\vs2017\msgpackc-static.vcxproj, ^
build\opendht\MSVC\opendht_vs2017.vcxproj, ^
build\pjproject\pjlib-util\build\pjlib_util.vcxproj, ^
build\pjproject\pjmedia\build\pjmedia.vcxproj, ^
build\pjproject\pjmedia\build\pjmedia_audiodev.vcxproj, ^
build\pjproject\pjmedia\build\pjmedia_codec.vcxproj, ^
build\pjproject\pjmedia\build\pjmedia_videodev.vcxproj, ^
build\pjproject\pjlib\build\pjlib.vcxproj, ^
build\pjproject\pjsip\build\pjsip_core.vcxproj, ^
build\pjproject\pjsip\build\pjsip_simple.vcxproj, ^
build\pjproject\pjsip\build\pjsua_lib.vcxproj, ^
build\pjproject\pjsip\build\pjsua2_lib.vcxproj, ^
build\pjproject\pjsip\build\pjsip_ua.vcxproj, ^
build\pjproject\pjnath\build\pjnath.vcxproj, ^
build\pthreads\MSVC\pthreads.vcxproj, ^
build\libupnp\build\vs2017\ixml.vcxproj, ^
build\libupnp\build\vs2017\threadutil.vcxproj, ^
build\libupnp\build\vs2017\libupnp.vcxproj, ^
build\secp256k1\MSVC\secp256k1.vcxproj, ^
build\portaudio\msvc\uwp\portaudio.vcxproj, ^
build\yaml-cpp\msvc\yaml-cpp.vcxproj, ^
build\pcre\msvc\pcre.vcxproj, ^
build\libsamplerate\msvc\libsamplerate.vcxproj, ^
)

rem * build the rest *
for %%I in %DEPENDENCIES% do (
call :build "%SRC%%%I"
)

:cleanup
endlocal
@endlocal
exit /B %ERRORLEVEL%

:build
echo "building " %*
msbuild %* %MSBUILD_ARGS%
exit /B 0
91 changes: 0 additions & 91 deletions contrib/build_all_uwp.bat

This file was deleted.

70 changes: 53 additions & 17 deletions contrib/src/argon2/argon2-uwp.patch
@@ -1,25 +1,67 @@
--- a/vs2015/Argon2Ref/Argon2Ref.vcxproj
+++ b/vs2015/Argon2Ref/Argon2Ref.vcxproj
@@ -59,7 +59,7 @@
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -29,46 +29,46 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{B9CAC9CE-9F0D-4F52-8D67-FDBBAFCD0DE2}</ProjectGuid>
<RootNamespace>Argon2Ref</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.17134.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>v141</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
+ <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
@@ -117,8 +117,8 @@
<IncludePath>$(SolutionDir)include;$(IncludePath)</IncludePath>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>$(SolutionDir)vs2015\build\</OutDir>
- <IntDir>$(SolutionDir)vs2015\build\$(ProjectName)\</IntDir>
+ <OutDir>$(ProjectDir)..\..\..\lib\x64</OutDir>
+ <IntDir>$(ProjectDir)vs2015\build\$(ProjectName)\</IntDir>
<IncludePath>$(SolutionDir)include;$(IncludePath)</IncludePath>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'">
@@ -179,6 +179,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
Expand All @@ -28,12 +70,6 @@
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
@@ -223,4 +224,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
--
2.10.2.windows.1
Expand Down
4 changes: 2 additions & 2 deletions contrib/src/argon2/fetch_and_patch.bat
@@ -1,14 +1,14 @@
set BUILD=%SRC%..\build

set ARGON2_VERSION=1eea0104e7cb2a38c617cf90ffa46ce5db6aceda
set ARGON2_VERSION=670229c849b9fe882583688b74eb7dfdc846f9f6
set ARGON2_URL=https://github.com/P-H-C/phc-winner-argon2/archive/%ARGON2_VERSION%.tar.gz

mkdir %BUILD%

if %USE_CACHE%==1 (
copy %CACHE_DIR%\%ARGON2_VERSION%.tar.gz %cd%
) else (
wget %ARGON2_URL%
%WGET_CMD% %ARGON2_URL%
)

7z -y x %ARGON2_VERSION%.tar.gz && 7z -y x %ARGON2_VERSION%.tar -o%BUILD%
Expand Down

0 comments on commit 009ddf3

Please sign in to comment.