From 63cfa8b00a414404c5aaa3023b83597f3676e207 Mon Sep 17 00:00:00 2001 From: Kinshuk Bairagi Date: Mon, 21 Mar 2022 00:22:53 +0530 Subject: [PATCH 01/26] Use windows-2019 for win github ci --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 21326d6..d0f3cf0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,7 @@ on: jobs: tinyphone_win_job: name: Build Tinyphone Windows - runs-on: windows-2016 + runs-on: windows-2019 steps: - name: Checkout uses: actions/checkout@v2 From 166374334fc203370d70adffaaa43014a9866887 Mon Sep 17 00:00:00 2001 From: Kinshuk Bairagi Date: Mon, 21 Mar 2022 12:04:56 +0530 Subject: [PATCH 02/26] Update .gitmodules --- .gitmodules | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitmodules b/.gitmodules index dbd2c75..a50af69 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "lib/pjproject"] path = lib/pjproject - url = git@github.com:voiceip/pjproject.git + url = https://github.com/voiceip/pjproject.git [submodule "lib/vp8vfw"] path = lib/vp8vfw url = https://github.com/XhmikosR/vp8vfw.git @@ -9,7 +9,7 @@ url = https://github.com/xiph/opus.git [submodule "lib/crow"] path = lib/crow - url = git@github.com:kingster/Crow.git + url = https://github.com/kingster/Crow.git [submodule "lib/boost"] path = lib/boost url = https://github.com/boostorg/boost.git @@ -21,16 +21,16 @@ url = https://github.com/curl/curl.git [submodule "lib/bcg729"] path = lib/bcg729 - url = git@github.com:BelledonneCommunications/bcg729.git + url = https://github.com/BelledonneCommunications/bcg729.git [submodule "lib/cryptopp"] path = lib/cryptopp - url = git@github.com:weidai11/cryptopp.git + url = https://github.com/weidai11/cryptopp.git [submodule "lib/portaudio"] path = lib/portaudio - url = git@github.com:voiceip/portaudio.git + url = https://github.com/voiceip/portaudio.git [submodule "lib/statsd-cpp"] path = lib/statsd-cpp - url = git@github.com:voiceip/statsd-cpp.git + url = https://github.com/voiceip/statsd-cpp.git [submodule "tinyphone-osx/vendor/boost"] path = tinyphone-osx/vendor/boost - url = git@github.com:faithfracture/Apple-Boost-BuildScript.git + url = https://github.com/faithfracture/Apple-Boost-BuildScript.git From 4d53fddcd7f86589eabf89e72fae1bbfa79ce342 Mon Sep 17 00:00:00 2001 From: Kinshuk Bairagi Date: Mon, 21 Mar 2022 16:03:23 +0530 Subject: [PATCH 03/26] Update appveyor.yml --- appveyor.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 2a09af2..93a70b6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ version: 1.0.{build} -image: Visual Studio 2017 +image: Visual Studio 2019 clone_depth: 5 init: - ps: >- @@ -41,7 +41,7 @@ build_script: ls - pushd "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools" + pushd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools" cmd /c "VsDevCmd.bat&set" | foreach { if ($_ -match "=") { @@ -49,28 +49,28 @@ build_script: } } popd - Write-Host "`nVisual Studio 2017 Command Prompt variables set." -ForegroundColor Yellow + Write-Host "`nVisual Studio 2019 Command Prompt variables set." -ForegroundColor Yellow where.exe msbuild.exe - nmake /f Makefile.vc mode=dll VC=15 DEBUG=no + nmake /f Makefile.vc mode=dll VC=19 DEBUG=no cd E:\lib\curl\builds ls - cmd /c MKLINK /D E:\lib\curl\builds\libcurl-vc-x86-release-dll-ipv6-sspi-winssl E:\lib\curl\builds\libcurl-vc15-x86-release-dll-ipv6-sspi-winssl + cmd /c MKLINK /D E:\lib\curl\builds\libcurl-vc-x86-release-dll-ipv6-sspi-winssl E:\lib\curl\builds\libcurl-vc19-x86-release-dll-ipv6-sspi-winssl ls E:\lib\curl\builds - cmd /c .\libcurl-vc15-x86-release-dll-ipv6-sspi-winssl\bin\curl.exe https://wttr.in/bangalore + cmd /c .\libcurl-vc19-x86-release-dll-ipv6-sspi-winssl\bin\curl.exe https://wttr.in/bangalore #G729 cd E:\lib\bcg729\build\ - cmake .. - msbuild /m bcg729.sln /p:Configuration=$BuildMode /p:Platform=Win32 + cmake .. -A Win32 + msbuild /m bcg729.sln /p:Configuration=$BuildMode /p:Platform=Win32 /p:PlatformToolset=v142 if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } cd E:\lib\cryptopp - msbuild /m cryptlib.vcxproj /p:Configuration=$BuildMode /p:Platform=Win32 /p:PlatformToolset=v140_xp + msbuild /m cryptlib.vcxproj /p:Configuration=$BuildMode /p:Platform=Win32 /p:PlatformToolset=v142 if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } $wc = New-Object net.webclient; $wc.Downloadfile("https://download.steinberg.net/sdk_downloads/asiosdk_2.3.3_2019-06-14.zip", "E:\lib\portaudio\src\hostapi\asio\asiosdk_2.3.3_2019-06-14.zip") @@ -78,23 +78,23 @@ build_script: unzip asiosdk_2.3.3_2019-06-14.zip mv asiosdk_2.3.3_2019-06-14 ASIOSDK cd E:\lib\portaudio\build\msvc - msbuild /m portaudio.sln /p:Configuration=$BuildMode /p:Platform=Win32 + msbuild /m portaudio.sln /p:Configuration=$BuildMode /p:Platform=Win32 /p:PlatformToolset=v142 /p:WindowsTargetPlatformVersion=10.0 if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } cd E:\lib\pjproject - msbuild /m pjproject-vs14.sln -target:libpjproject:Rebuild /p:Configuration=$BuildMode-Static /p:Platform=Win32 + msbuild /m pjproject-vs14.sln -target:libpjproject:Rebuild /p:Configuration=$BuildMode-Static /p:Platform=Win32 /p:PlatformToolset=v142 if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } cd E:\lib\statsd-cpp cmake . - msbuild /m statsd-cpp.vcxproj /p:Configuration=$BuildMode /p:Platform=Win32 + msbuild /m statsd-cpp.vcxproj /p:Configuration=$BuildMode /p:Platform=Win32 /p:PlatformToolset=v142 /p:WindowsTargetPlatformVersion=10.0 if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } cd E:\tinyphone sed -i 's/stampver.inf.*\$/stampver.inf $/g' tinyphone.vcxproj - msbuild /m tinyphone.sln /p:Configuration=$BuildMode /p:Platform=x86 + msbuild /m tinyphone.sln /p:Configuration=$BuildMode /p:Platform=x86 /p:PlatformToolset=v142 /p:WindowsTargetPlatformVersion=10.0 if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } Write-Host "`nBuild Completed." -ForegroundColor Yellow From cca0484cbfd583ff4ac1a019e3a0e309f7bf5806 Mon Sep 17 00:00:00 2001 From: Kinshuk Date: Mon, 21 Mar 2022 17:48:26 +0530 Subject: [PATCH 04/26] changes [ci-skip] [skip-ci] --- lib/json | 2 +- tinyphone-installer/actions/actions.vcxproj | 8 ++++---- tinyphone/config.cpp | 2 +- tinyphone/tinyphone.vcxproj | 12 ++++++------ tinyphone/utils.h | 11 +++++------ 5 files changed, 17 insertions(+), 18 deletions(-) diff --git a/lib/json b/lib/json index ef90d62..4f8fba1 160000 --- a/lib/json +++ b/lib/json @@ -1 +1 @@ -Subproject commit ef90d62ddf4713f0ca1029d6884997f2a073ca60 +Subproject commit 4f8fba14066156b73f1189a2b8bd568bde5284c5 diff --git a/tinyphone-installer/actions/actions.vcxproj b/tinyphone-installer/actions/actions.vcxproj index 27e90d9..9409f6d 100644 --- a/tinyphone-installer/actions/actions.vcxproj +++ b/tinyphone-installer/actions/actions.vcxproj @@ -23,13 +23,13 @@ Win32Proj actions installer-actions - 8.1 + 10.0 DynamicLibrary true - v140_xp + v142 Unicode false @@ -43,14 +43,14 @@ DynamicLibrary true - v140 + v142 Unicode Dynamic DynamicLibrary false - v140 + v142 true Unicode diff --git a/tinyphone/config.cpp b/tinyphone/config.cpp index 2d6ec8b..0cc315c 100644 --- a/tinyphone/config.cpp +++ b/tinyphone/config.cpp @@ -1,8 +1,8 @@ #include "stdafx.h" +#include #include "config.h" #include "net.h" #include "utils.h" -#include #include "crypt.h" #ifdef __APPLE__ diff --git a/tinyphone/tinyphone.vcxproj b/tinyphone/tinyphone.vcxproj index 1d64337..6f3c134 100644 --- a/tinyphone/tinyphone.vcxproj +++ b/tinyphone/tinyphone.vcxproj @@ -22,13 +22,13 @@ {968AADC8-5E16-44C2-919C-48683EF6729E} Win32Proj tinyphone - 8.1 + 10.0 Application true - v140_xp + v142 MultiByte false @@ -43,13 +43,13 @@ Application true - v140 + v142 Unicode Application false - v140 + v142 true Unicode @@ -90,14 +90,14 @@ Disabled WIN32;_DEBUG;_CONSOLE;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) true - E:\lib\statsd-cpp\include;E:\lib\portaudio\include;..\lib;..\lib\curl\include;..\lib\json\single_include;C:\local\boost_1_68_0;..\lib\crow\include;..\lib\pjproject\pjnath\include;..\lib\pjproject\pjmedia\include;..\lib\pjproject\pjlib-util\include;..\lib\pjproject\pjlib\include;..\lib\pjproject\pjsip\include;%(AdditionalIncludeDirectories) + E:\lib\statsd-cpp\include;E:\lib\portaudio\include;..\lib;..\lib\curl\include;..\lib\json\single_include;C:\local\boost_1_74_0;..\lib\crow\include;..\lib\pjproject\pjnath\include;..\lib\pjproject\pjmedia\include;..\lib\pjproject\pjlib-util\include;..\lib\pjproject\pjlib\include;..\lib\pjproject\pjsip\include;%(AdditionalIncludeDirectories) MultiThreadedDebug true Windows true - ..\lib\portaudio\build\msvc\Win32\Debug;..\lib\cryptopp\Win32\Output\Debug;..\lib\bcg729\build\src\Debug;..\lib\curl\builds\libcurl-vc-x86-release-dll-ipv6-sspi-winssl\lib;C:\local\boost_1_68_0\lib32-msvc-14.0;..\lib\opus\win32\VS2015\Win32\Debug;..\lib\vp8vfw\vp8\lib\Win32;..\lib\pjproject\pjsip\lib;..\lib\pjproject\pjnath\lib;..\lib\pjproject\pjmedia\lib;..\lib\pjproject\pjlib-util\lib;..\lib\pjproject\pjlib\lib;..\lib\pjproject\lib;%(AdditionalLibraryDirectories) + ..\lib\portaudio\build\msvc\Win32\Debug;..\lib\cryptopp\Win32\Output\Debug;..\lib\bcg729\build\src\Debug;..\lib\curl\builds\libcurl-vc-x86-release-dll-ipv6-sspi-winssl\lib;C:\local\boost_1_74_0\lib32-msvc-14.2;..\lib\opus\win32\VS2015\Win32\Debug;..\lib\vp8vfw\vp8\lib\Win32;..\lib\pjproject\pjsip\lib;..\lib\pjproject\pjnath\lib;..\lib\pjproject\pjmedia\lib;..\lib\pjproject\pjlib-util\lib;..\lib\pjproject\pjlib\lib;..\lib\pjproject\lib;%(AdditionalLibraryDirectories) Wtsapi32.lib;ws2_32.lib;libcurl.lib;version.lib;cryptlib.lib;bcg729.lib;winmm.lib;iphlpapi.lib;portaudio_x86.lib;%(AdditionalDependencies) false diff --git a/tinyphone/utils.h b/tinyphone/utils.h index d5ee6ff..4237477 100644 --- a/tinyphone/utils.h +++ b/tinyphone/utils.h @@ -3,11 +3,12 @@ #ifndef UTILS_HEADER_FILE_H #define UTILS_HEADER_FILE_H -#ifdef _MSC_VER -#define snprintf _snprintf -#define vsnprintf _vsnprintf -#endif +//#ifdef _MSC_VER && _MSC_VER < 1500 // VC++ 8.0 and below +//#define snprintf _snprintf +//#define vsnprintf _vsnprintf +//#endif +#include #include #include #include @@ -18,8 +19,6 @@ #include #include "consts.h" -#include - #include #include From 6c030599551153f1df1aefcd22ae8678fe3f879c Mon Sep 17 00:00:00 2001 From: Kinshuk Bairagi Date: Mon, 21 Mar 2022 17:50:49 +0530 Subject: [PATCH 05/26] Update appveyor.yml --- appveyor.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 93a70b6..f91e463 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,10 +10,10 @@ branches: only: - master install: -- appveyor DownloadFile https://master.dl.sourceforge.net/project/boost/boost-binaries/1.68.0/boost_1_68_0-msvc-14.0-32.exe -- call boost_1_68_0-msvc-14.0-32.exe /SILENT +- appveyor DownloadFile https://onboardcloud.dl.sourceforge.net/project/boost/boost-binaries/1.74.0/boost_1_74_0-msvc-14.2-32.exe +- call boost_1_74_0-msvc-14.2-32.exe /SILENT - ps : | - ls "C:\local\boost_1_68_0" + ls "C:\local\boost_1_74_0" # Install Scoop iwr -useb get.scoop.sh -outfile 'install_scoop.ps1' From e0e09f857c09b0fa15cfd0249f626102aa63a025 Mon Sep 17 00:00:00 2001 From: Kinshuk Bairagi Date: Mon, 21 Mar 2022 18:06:18 +0530 Subject: [PATCH 06/26] Update tinyphone.vcxproj --- tinyphone/tinyphone.vcxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tinyphone/tinyphone.vcxproj b/tinyphone/tinyphone.vcxproj index 6f3c134..c671a80 100644 --- a/tinyphone/tinyphone.vcxproj +++ b/tinyphone/tinyphone.vcxproj @@ -133,7 +133,7 @@ true WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true - E:\lib\statsd-cpp\include;E:\lib\portaudio\include;..\lib;..\lib\curl\include;..\lib\json\single_include;C:\local\boost_1_68_0;..\lib\crow\include;..\lib\pjproject\pjnath\include;..\lib\pjproject\pjmedia\include;..\lib\pjproject\pjlib-util\include;..\lib\pjproject\pjlib\include;..\lib\pjproject\pjsip\include;%(AdditionalIncludeDirectories) + E:\lib\statsd-cpp\include;E:\lib\portaudio\include;..\lib;..\lib\curl\include;..\lib\json\single_include;C:\local\boost_1_74_0;..\lib\crow\include;..\lib\pjproject\pjnath\include;..\lib\pjproject\pjmedia\include;..\lib\pjproject\pjlib-util\include;..\lib\pjproject\pjlib\include;..\lib\pjproject\pjsip\include;%(AdditionalIncludeDirectories) true @@ -141,7 +141,7 @@ true true false - ..\lib\portaudio\build\msvc\Win32\Release;..\lib\cryptopp\Win32\Output\Release;..\lib\bcg729\build\src\Release;..\lib\curl\builds\libcurl-vc-x86-release-dll-ipv6-sspi-winssl\lib;C:\local\boost_1_68_0\lib32-msvc-14.0;..\lib\opus\win32\VS2015\Win32\Debug;..\lib\vp8vfw\vp8\lib\Win32;..\lib\pjproject\pjsip\lib;..\lib\pjproject\pjnath\lib;..\lib\pjproject\pjmedia\lib;..\lib\pjproject\pjlib-util\lib;..\lib\pjproject\pjlib\lib;..\lib\pjproject\lib;%(AdditionalLibraryDirectories) + ..\lib\portaudio\build\msvc\Win32\Release;..\lib\cryptopp\Win32\Output\Release;..\lib\bcg729\build\src\Release;..\lib\curl\builds\libcurl-vc-x86-release-dll-ipv6-sspi-winssl\lib;C:\local\boost_1_74_0\lib32-msvc-14.2;..\lib\opus\win32\VS2015\Win32\Debug;..\lib\vp8vfw\vp8\lib\Win32;..\lib\pjproject\pjsip\lib;..\lib\pjproject\pjnath\lib;..\lib\pjproject\pjmedia\lib;..\lib\pjproject\pjlib-util\lib;..\lib\pjproject\pjlib\lib;..\lib\pjproject\lib;%(AdditionalLibraryDirectories) Wtsapi32.lib;ws2_32.lib;libcurl.lib;version.lib;cryptlib.lib;bcg729.lib;winmm.lib;iphlpapi.lib;portaudio_x86.lib;%(AdditionalDependencies) false From 37e1140cbf30f850747891c7ad20b1ac14287600 Mon Sep 17 00:00:00 2001 From: Kinshuk Bairagi Date: Mon, 21 Mar 2022 18:24:34 +0530 Subject: [PATCH 07/26] 2019 --- .github/workflows/main.yml | 6 +++--- appveyor.yml | 18 +++++------------- distribution/docker/release.ps1 | 20 ++++++++++---------- 3 files changed, 18 insertions(+), 26 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d0f3cf0..fa4fcd8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,10 +33,10 @@ jobs: - name: Install Boost if: steps.cache-boost.outputs.cache-hit != 'true' run: | - # Use the boost_1_72_0-msvc-14.1-64.exe for Windows 2016 - $Url = "https://boost.teeks99.com/bin/1.68.0/boost_1_68_0-msvc-14.0-32.exe" + # Use the boost_1_74_0-msvc-14.1-64.exe for Windows 2019 + $Url = "https://onboardcloud.dl.sourceforge.net/project/boost/boost-binaries/1.74.0/boost_1_74_0-msvc-14.2-32.exe" (New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe") - Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost_1_68_0" + Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost_1_74_0" - name: Install Scoop & Binaries run : | diff --git a/appveyor.yml b/appveyor.yml index f91e463..a57608c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -34,13 +34,6 @@ build_script: cmd /c subst E: C:\projects\tinyphone - cd E:\lib\curl\ - ls - .\buildconf.bat - cd E:\lib\curl\winbuild - - ls - pushd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools" cmd /c "VsDevCmd.bat&set" | foreach { @@ -51,16 +44,15 @@ build_script: popd Write-Host "`nVisual Studio 2019 Command Prompt variables set." -ForegroundColor Yellow - where.exe msbuild.exe + cd E:\lib\curl\ + ls + .\buildconf.bat + cd E:\lib\curl\winbuild + where.exe msbuild.exe nmake /f Makefile.vc mode=dll VC=19 DEBUG=no - cd E:\lib\curl\builds - - ls - cmd /c MKLINK /D E:\lib\curl\builds\libcurl-vc-x86-release-dll-ipv6-sspi-winssl E:\lib\curl\builds\libcurl-vc19-x86-release-dll-ipv6-sspi-winssl - ls E:\lib\curl\builds cmd /c .\libcurl-vc19-x86-release-dll-ipv6-sspi-winssl\bin\curl.exe https://wttr.in/bangalore #G729 diff --git a/distribution/docker/release.ps1 b/distribution/docker/release.ps1 index d9d1c31..67daac0 100644 --- a/distribution/docker/release.ps1 +++ b/distribution/docker/release.ps1 @@ -17,20 +17,20 @@ cd E:\lib\curl\ cd E:\lib\curl\winbuild where.exe msbuild.exe -nmake /f Makefile.vc mode=dll VC=15 MACHINE=x86 DEBUG=no +nmake /f Makefile.vc mode=dll VC=19 MACHINE=x86 DEBUG=no -cmd /c MKLINK /D E:\lib\curl\builds\libcurl-vc-x86-release-dll-ipv6-sspi-winssl E:\lib\curl\builds\libcurl-vc15-x86-release-dll-ipv6-sspi-winssl -cmd /c E:\lib\curl\builds\libcurl-vc15-x86-release-dll-ipv6-sspi-winssl\bin\curl.exe https://wttr.in/bangalore +cmd /c MKLINK /D E:\lib\curl\builds\libcurl-vc-x86-release-dll-ipv6-sspi-winssl E:\lib\curl\builds\libcurl-vc19-x86-release-dll-ipv6-sspi-winssl +cmd /c E:\lib\curl\builds\libcurl-vc19-x86-release-dll-ipv6-sspi-winssl\bin\curl.exe https://wttr.in/bangalore #G729 cd E:\lib\bcg729\build\ -cmake .. -msbuild /m bcg729.sln /p:Configuration=$BuildMode /p:Platform=Win32 +cmake .. -A Win32 +msbuild /m bcg729.sln /p:Configuration=$BuildMode /p:Platform=Win32 /p:PlatformToolset=v142 #cryptopp cd E:\lib\cryptopp -msbuild /m cryptlib.vcxproj /p:Configuration=$BuildMode /p:Platform=Win32 /p:PlatformToolset=v140_xp +msbuild /m cryptlib.vcxproj /p:Configuration=$BuildMode /p:Platform=Win32 /p:PlatformToolset=v142 #portaudio $wc = New-Object net.webclient; $wc.Downloadfile("https://download.steinberg.net/sdk_downloads/asiosdk_2.3.3_2019-06-14.zip", "E:\lib\portaudio\src\hostapi\asio\asiosdk_2.3.3_2019-06-14.zip") @@ -38,16 +38,16 @@ cd E:\lib\portaudio\src\hostapi\asio unzip asiosdk_2.3.3_2019-06-14.zip mv asiosdk_2.3.3_2019-06-14 ASIOSDK cd E:\lib\portaudio\build\msvc -msbuild /m portaudio.sln /p:Configuration=$BuildMode /p:Platform=Win32 +msbuild /m portaudio.sln /p:Configuration=$BuildMode /p:Platform=Win32 /p:PlatformToolset=v142 /p:WindowsTargetPlatformVersion=10.0 #pjproject cd E:\lib\pjproject -msbuild /m pjproject-vs14.sln -target:libpjproject:Rebuild /p:Configuration=$BuildMode-Static /p:Platform=Win32 +msbuild /m pjproject-vs14.sln -target:libpjproject:Rebuild /p:Configuration=$BuildMode-Static /p:Platform=Win32 /p:PlatformToolset=v142 #statsd-cpp cd E:\lib\statsd-cpp cmake . -msbuild /m statsd-cpp.vcxproj /p:Configuration=$BuildMode /p:Platform=Win32 +msbuild /m statsd-cpp.vcxproj /p:Configuration=$BuildMode /p:Platform=Win32 /p:PlatformToolset=v142 /p:WindowsTargetPlatformVersion=10.0 #tinyphone cd E:\tinyphone @@ -55,7 +55,7 @@ sed -i 's/stampver.inf.*\$/stampver.inf $/g' tinyphone.vcxproj #msbuild /m tinyphone.sln -target:tinyphone /p:Configuration=$BuildMode /p:Platform=x86 #msbuild /m tinyphone.sln -target:tinyphone:Rebuild /p:Configuration=$BuildMode /p:Platform=x86 -msbuild /m tinyphone.sln /p:Configuration=$BuildMode /p:Platform=x86 +msbuild /m tinyphone.sln /p:Configuration=$BuildMode /p:Platform=x86 /p:PlatformToolset=v142 /p:WindowsTargetPlatformVersion=10.0 #required for github-ci permission issue. From d0a4458d05f0542cec4169adc0c42cca1a6cfe78 Mon Sep 17 00:00:00 2001 From: Kinshuk Bairagi Date: Mon, 21 Mar 2022 19:07:17 +0530 Subject: [PATCH 08/26] Update main.yml --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fa4fcd8..613f888 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,8 +28,8 @@ jobs: uses: actions/cache@v2 id: cache-boost with: - path: C:\local\boost_1_68_0 - key: boost + path: C:\local\boost_1_74_0 + key: boost-74 - name: Install Boost if: steps.cache-boost.outputs.cache-hit != 'true' run: | From c2b50f980f0fc0b59c2601aeb10c4c0c8e212d2c Mon Sep 17 00:00:00 2001 From: Kinshuk Bairagi Date: Mon, 21 Mar 2022 19:19:20 +0530 Subject: [PATCH 09/26] vc 2019 docker --- .github/workflows/docker.yaml | 10 +++++----- distribution/docker/Dockerfile.base | 16 ++++++++++------ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 6b3822b..2ff16ab 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -15,7 +15,7 @@ jobs: tinyphone_docker_job: if: github.event.label.name == 'ci/github' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'release' name: Build Tinyphone - runs-on: windows-2016 + runs-on: windows-2019 steps: - name: Checkout uses: actions/checkout@v2 @@ -45,9 +45,9 @@ jobs: - name: Build and Push tinyphone_base to registry if: contains(steps.changed_files.outputs.modified, 'Dockerfile.base') run: | - docker build --file=./distribution/docker/Dockerfile.base -t ghcr.io/${{ github.repository_owner }}/tinyphone_base:latest -t ghcr.io/${{ github.repository_owner }}/tinyphone_base:${{ steps.vars.outputs.sha_short }} ./distribution/docker - docker push ghcr.io/${{ github.repository_owner }}/tinyphone_base:latest - docker push ghcr.io/${{ github.repository_owner }}/tinyphone_base:${{ steps.vars.outputs.sha_short }} + docker build --file=./distribution/docker/Dockerfile.base -t ghcr.io/${{ github.repository_owner }}/tinyphone_base:vc2019 -t ghcr.io/${{ github.repository_owner }}/tinyphone_base:${{ steps.vars.outputs.sha_short }} ./distribution/docker + docker push ghcr.io/${{ github.repository_owner }}/tinyphone_base:vc2019 + # docker push ghcr.io/${{ github.repository_owner }}/tinyphone_base:${{ steps.vars.outputs.sha_short }} - name: Update CodeDir run : | sed -i 's/$env:CodeDir/C:\\Code\\tinyphone/g' ./distribution/docker/release.ps1 @@ -55,7 +55,7 @@ jobs: shell : bash - name: Build tinyphone run: | - cat ./distribution/docker/release.ps1 | docker run -v ${PWD}:"C:\Code\tinyphone" -i ghcr.io/${{ github.repository_owner }}/tinyphone_base:latest + cat ./distribution/docker/release.ps1 | docker run -v ${PWD}:"C:\Code\tinyphone" -i ghcr.io/${{ github.repository_owner }}/tinyphone_base:vc2019 - name: Upload Artifacts uses: actions/upload-artifact@v2 diff --git a/distribution/docker/Dockerfile.base b/distribution/docker/Dockerfile.base index a02acd7..48d7a5c 100644 --- a/distribution/docker/Dockerfile.base +++ b/distribution/docker/Dockerfile.base @@ -1,5 +1,5 @@ # escape=` -FROM mcr.microsoft.com/dotnet/framework/runtime:3.5-windowsservercore-ltsc2016 +FROM mcr.microsoft.com/dotnet/framework/runtime:3.5-windowsservercore-ltsc2019 MAINTAINER Kinshuk B (hi@kinsh.uk) RUN powershell.exe mkdir C:\BuildTools @@ -16,10 +16,11 @@ ADD https://download.microsoft.com/download/E/E/D/EEDF18A8-4AED-4CE0-BEBE-70A830 RUN start /wait C:\TEMP\msbuild14.exe /q /full /log C:\TEMP\msbuild14.log # Download channel for fixed install. -ADD https://aka.ms/vs/15/release/channel C:\TEMP\VisualStudio.chman +ADD https://aka.ms/vs/16/release/channel C:\TEMP\VisualStudio.chman + +# Download and install Build Tools for Visual Studio 2019 for native desktop workload. +ADD https://aka.ms/vs/16/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe -# Download and install Build Tools for Visual Studio 2017 for native desktop workload. -ADD https://aka.ms/vs/15/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe RUN C:\TEMP\Install.cmd C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache ` --channelUri C:\TEMP\VisualStudio.chman ` --installChannelUri C:\TEMP\VisualStudio.chman ` @@ -27,6 +28,9 @@ RUN C:\TEMP\Install.cmd C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --n --add Microsoft.Component.MSBuild ` --add Microsoft.VisualStudio.Component.VC.140 ` --add Microsoft.VisualStudio.Component.WinXP ` + --add Microsoft.VisualStudio.Component.VC.ATLMFC ` + --add Microsoft.VisualStudio.Component.VC.ATL ` + --add Microsoft.VisualStudio.Component.VC.Modules.x86.x64 ` # --remove Microsoft.VisualStudio.Component.Windows10SDK.10240 ` # --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 ` # --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 ` @@ -43,8 +47,8 @@ RUN powershell.exe [Net.ServicePointManager]::SecurityProtocol =[Net.SecurityPro RUN powershell.exe scoop install git curl wget cmake win32-openssh unzip make; RUN powershell.exe [environment]::setenvironmentvariable('GIT_SSH', (resolve-path (scoop which ssh)), 'USER'); -ADD https://boost.teeks99.com/bin/1.68.0/boost_1_68_0-msvc-14.0-32.exe C:\TEMP\boost_1_68_0-msvc-14.0-32.exe -RUN cmd.exe /c C:\TEMP\boost_1_68_0-msvc-14.0-32.exe /SILENT +ADD https://onboardcloud.dl.sourceforge.net/project/boost/boost-binaries/1.74.0/boost_1_74_0-msvc-14.2-32.exe C:\TEMP\boost.exe +RUN cmd.exe /c C:\TEMP\boost.exe /SILENT ADD https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311.exe C:\TEMP\wix311.exe RUN powershell.exe C:\TEMP\Install.cmd C:\TEMP\wix311.exe /install /quiet /norestart From b2efea4b053642dc2ef20078da193d7d1ccaacff Mon Sep 17 00:00:00 2001 From: Kinshuk Bairagi Date: Mon, 21 Mar 2022 19:49:16 +0530 Subject: [PATCH 10/26] Update docker.yaml --- .github/workflows/docker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 2ff16ab..015a581 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -13,7 +13,7 @@ on: jobs: tinyphone_docker_job: - if: github.event.label.name == 'ci/github' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'release' + # if: github.event.label.name == 'ci/github' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'release' name: Build Tinyphone runs-on: windows-2019 steps: From 1c10605e88afb839508d228c64009b7209687bb5 Mon Sep 17 00:00:00 2001 From: Kinshuk Bairagi Date: Mon, 21 Mar 2022 20:11:43 +0530 Subject: [PATCH 11/26] docker update --- distribution/docker/Dockerfile.base | 15 ++++++--------- distribution/docker/VsDevCmdPowerShell.bat | 3 --- 2 files changed, 6 insertions(+), 12 deletions(-) delete mode 100644 distribution/docker/VsDevCmdPowerShell.bat diff --git a/distribution/docker/Dockerfile.base b/distribution/docker/Dockerfile.base index 48d7a5c..e12d711 100644 --- a/distribution/docker/Dockerfile.base +++ b/distribution/docker/Dockerfile.base @@ -12,8 +12,8 @@ COPY Install.cmd C:\TEMP\ ADD https://aka.ms/vscollect.exe C:\TEMP\collect.exe # Download and install Build Tools 14.0 -ADD https://download.microsoft.com/download/E/E/D/EEDF18A8-4AED-4CE0-BEBE-70A83094FC5A/BuildTools_Full.exe C:\TEMP\msbuild14.exe -RUN start /wait C:\TEMP\msbuild14.exe /q /full /log C:\TEMP\msbuild14.log +# ADD https://download.microsoft.com/download/E/E/D/EEDF18A8-4AED-4CE0-BEBE-70A83094FC5A/BuildTools_Full.exe C:\TEMP\msbuild14.exe +# RUN start /wait C:\TEMP\msbuild14.exe /q /full /log C:\TEMP\msbuild14.log # Download channel for fixed install. ADD https://aka.ms/vs/16/release/channel C:\TEMP\VisualStudio.chman @@ -24,6 +24,7 @@ ADD https://aka.ms/vs/16/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe RUN C:\TEMP\Install.cmd C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache ` --channelUri C:\TEMP\VisualStudio.chman ` --installChannelUri C:\TEMP\VisualStudio.chman ` + --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools" ` --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended ` --add Microsoft.Component.MSBuild ` --add Microsoft.VisualStudio.Component.VC.140 ` @@ -61,11 +62,7 @@ RUN powershell.exe Remove-Item -LiteralPath 'C:\Program Files\WindowsPowerShell\ WORKDIR C:\BuildTools -ADD VsDevCmdPowerShell.bat C:\BuildTools\ -ENTRYPOINT C:\BuildTools\VsDevCmdPowerShell.bat +# Define the entry point for the Docker container. +# This entry point starts the developer command prompt and launches the PowerShell shell. +ENTRYPOINT ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"] -# Start developer command prompt with any other commands specified. -# ENTRYPOINT C:\BuildTools\Common7\Tools\VsDevCmd.bat && - -# Default to PowerShell if no other command specified. -# CMD ["powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"] diff --git a/distribution/docker/VsDevCmdPowerShell.bat b/distribution/docker/VsDevCmdPowerShell.bat deleted file mode 100644 index be9afe7..0000000 --- a/distribution/docker/VsDevCmdPowerShell.bat +++ /dev/null @@ -1,3 +0,0 @@ -@echo off -call C:\BuildTools\Common7\Tools\VsDevCmd.bat -powershell.exe -NoLogo -ExecutionPolicy Bypass %* From 77042ddc0e11792b039e59de1e9de50a3eb2862b Mon Sep 17 00:00:00 2001 From: Kinshuk Bairagi Date: Mon, 21 Mar 2022 20:13:25 +0530 Subject: [PATCH 12/26] Update Dockerfile.base --- distribution/docker/Dockerfile.base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribution/docker/Dockerfile.base b/distribution/docker/Dockerfile.base index e12d711..f3d3887 100644 --- a/distribution/docker/Dockerfile.base +++ b/distribution/docker/Dockerfile.base @@ -36,7 +36,7 @@ RUN C:\TEMP\Install.cmd C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --n # --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 ` # --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 ` # --remove Microsoft.VisualStudio.Component.Windows81SDK ` - --installPath C:\BuildTools + # --installPath C:\BuildTools # Verify if .NET isn't broken (bug with the ltsc2016 docker image) # RUN powershell.exe -Command echo Everything is OK From 18ec3f0d57c5208bfa6a849fe3202aaf3e45d09a Mon Sep 17 00:00:00 2001 From: Kinshuk Bairagi Date: Mon, 21 Mar 2022 20:22:46 +0530 Subject: [PATCH 13/26] Update docker.yaml --- .github/workflows/docker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 015a581..1b91ab1 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -43,7 +43,7 @@ jobs: id: vars run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - name: Build and Push tinyphone_base to registry - if: contains(steps.changed_files.outputs.modified, 'Dockerfile.base') + # if: contains(steps.changed_files.outputs.modified, 'Dockerfile.base') run: | docker build --file=./distribution/docker/Dockerfile.base -t ghcr.io/${{ github.repository_owner }}/tinyphone_base:vc2019 -t ghcr.io/${{ github.repository_owner }}/tinyphone_base:${{ steps.vars.outputs.sha_short }} ./distribution/docker docker push ghcr.io/${{ github.repository_owner }}/tinyphone_base:vc2019 From d911f45015ed0d16099034017c393d95aa6287d2 Mon Sep 17 00:00:00 2001 From: Kinshuk Date: Mon, 21 Mar 2022 22:31:52 +0530 Subject: [PATCH 14/26] Update Dockerfile.base --- distribution/docker/Dockerfile.base | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/distribution/docker/Dockerfile.base b/distribution/docker/Dockerfile.base index f3d3887..53b907b 100644 --- a/distribution/docker/Dockerfile.base +++ b/distribution/docker/Dockerfile.base @@ -24,7 +24,6 @@ ADD https://aka.ms/vs/16/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe RUN C:\TEMP\Install.cmd C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache ` --channelUri C:\TEMP\VisualStudio.chman ` --installChannelUri C:\TEMP\VisualStudio.chman ` - --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools" ` --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended ` --add Microsoft.Component.MSBuild ` --add Microsoft.VisualStudio.Component.VC.140 ` @@ -35,17 +34,19 @@ RUN C:\TEMP\Install.cmd C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --n # --remove Microsoft.VisualStudio.Component.Windows10SDK.10240 ` # --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 ` # --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 ` - # --remove Microsoft.VisualStudio.Component.Windows81SDK ` - # --installPath C:\BuildTools + --remove Microsoft.VisualStudio.Component.Windows81SDK ` + --installPath C:\BuildTools + # --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools" # Verify if .NET isn't broken (bug with the ltsc2016 docker image) # RUN powershell.exe -Command echo Everything is OK # Install Scoop -RUN powershell.exe [Net.ServicePointManager]::SecurityProtocol =[Net.SecurityProtocolType]::Tls12 ; Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh'); +RUN powershell.exe [Net.ServicePointManager]::SecurityProtocol =[Net.SecurityProtocolType]::Tls12 ; (New-Object System.Net.WebClient).DownloadFile('https://get.scoop.sh', 'install_scoop.ps1'); .\install_scoop.ps1 -RunAsAdmin + # Install Git & other tools -RUN powershell.exe scoop install git curl wget cmake win32-openssh unzip make; +RUN powershell.exe scoop install git curl wget cmake openssh unzip make; RUN powershell.exe [environment]::setenvironmentvariable('GIT_SSH', (resolve-path (scoop which ssh)), 'USER'); ADD https://onboardcloud.dl.sourceforge.net/project/boost/boost-binaries/1.74.0/boost_1_74_0-msvc-14.2-32.exe C:\TEMP\boost.exe From ac8c87e4417f2342e5f4095d65a5593104e2a807 Mon Sep 17 00:00:00 2001 From: Kinshuk Date: Mon, 21 Mar 2022 23:58:14 +0530 Subject: [PATCH 15/26] Update Dockerfile.base --- distribution/docker/Dockerfile.base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribution/docker/Dockerfile.base b/distribution/docker/Dockerfile.base index 53b907b..3d237ef 100644 --- a/distribution/docker/Dockerfile.base +++ b/distribution/docker/Dockerfile.base @@ -65,5 +65,5 @@ WORKDIR C:\BuildTools # Define the entry point for the Docker container. # This entry point starts the developer command prompt and launches the PowerShell shell. -ENTRYPOINT ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"] +ENTRYPOINT ["C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"] From cfac8ffefec4a92154fbdeba49bfaf85c8a9192f Mon Sep 17 00:00:00 2001 From: Kinshuk Date: Tue, 22 Mar 2022 01:13:50 +0530 Subject: [PATCH 16/26] Update Dockerfile.base --- distribution/docker/Dockerfile.base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribution/docker/Dockerfile.base b/distribution/docker/Dockerfile.base index 3d237ef..6106f99 100644 --- a/distribution/docker/Dockerfile.base +++ b/distribution/docker/Dockerfile.base @@ -46,7 +46,7 @@ RUN powershell.exe [Net.ServicePointManager]::SecurityProtocol =[Net.SecurityPro # Install Git & other tools -RUN powershell.exe scoop install git curl wget cmake openssh unzip make; +RUN powershell.exe scoop install git curl wget openssh unzip make; RUN powershell.exe [environment]::setenvironmentvariable('GIT_SSH', (resolve-path (scoop which ssh)), 'USER'); ADD https://onboardcloud.dl.sourceforge.net/project/boost/boost-binaries/1.74.0/boost_1_74_0-msvc-14.2-32.exe C:\TEMP\boost.exe From f0b17eb41971eca8b28087ab5bb0d8919cae9af1 Mon Sep 17 00:00:00 2001 From: Kinshuk Bairagi Date: Tue, 22 Mar 2022 02:00:36 +0530 Subject: [PATCH 17/26] Update Dockerfile.base --- distribution/docker/Dockerfile.base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribution/docker/Dockerfile.base b/distribution/docker/Dockerfile.base index 6106f99..3508b62 100644 --- a/distribution/docker/Dockerfile.base +++ b/distribution/docker/Dockerfile.base @@ -46,7 +46,7 @@ RUN powershell.exe [Net.ServicePointManager]::SecurityProtocol =[Net.SecurityPro # Install Git & other tools -RUN powershell.exe scoop install git curl wget openssh unzip make; +RUN powershell.exe scoop install git curl wget openssh unzip make sed; RUN powershell.exe [environment]::setenvironmentvariable('GIT_SSH', (resolve-path (scoop which ssh)), 'USER'); ADD https://onboardcloud.dl.sourceforge.net/project/boost/boost-binaries/1.74.0/boost_1_74_0-msvc-14.2-32.exe C:\TEMP\boost.exe From 0f08d57f9129e948054486a987a3ceeaee119620 Mon Sep 17 00:00:00 2001 From: Kinshuk Bairagi Date: Tue, 22 Mar 2022 15:11:38 +0530 Subject: [PATCH 18/26] 1 --- .github/workflows/docker.yaml | 6 ++++++ distribution/docker/README.md | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 1b91ab1..e4cfc86 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -42,6 +42,12 @@ jobs: - name: Set vars id: vars run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + - uses: satackey/action-docker-layer-caching@v0.0.11 + continue-on-error: true + with: + key: tinyphone-base-docker-cache-{hash} + restore-keys: | + tinyphone-base-docker-cache- - name: Build and Push tinyphone_base to registry # if: contains(steps.changed_files.outputs.modified, 'Dockerfile.base') run: | diff --git a/distribution/docker/README.md b/distribution/docker/README.md index b589fb4..b44c878 100644 --- a/distribution/docker/README.md +++ b/distribution/docker/README.md @@ -8,5 +8,5 @@ docker build -f Dockerfile.base -m 2G -t tinyphone_base . ``` sed -i 's/$env:CodeDir/C:\\Code\\tinyphone/g' ./distribution/docker/release.ps1 -cat ./distribution/docker/release.ps1 | docker run -v `pwd`:"C:\Code\tinyphone" -i tinyphone_base +cat ./distribution/docker/release.ps1 | docker run -v ${PWD}:"C:\Code\tinyphone" -i tinyphone_base ``` From 9c1014ceb46b54a2ef151fd1c056d3b6e7891232 Mon Sep 17 00:00:00 2001 From: Kinshuk Date: Tue, 22 Mar 2022 17:15:30 +0530 Subject: [PATCH 19/26] Update utils.h --- tinyphone/utils.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tinyphone/utils.h b/tinyphone/utils.h index 4237477..2c68402 100644 --- a/tinyphone/utils.h +++ b/tinyphone/utils.h @@ -3,10 +3,12 @@ #ifndef UTILS_HEADER_FILE_H #define UTILS_HEADER_FILE_H -//#ifdef _MSC_VER && _MSC_VER < 1500 // VC++ 8.0 and below -//#define snprintf _snprintf -//#define vsnprintf _vsnprintf -//#endif +#ifdef _MSC_VER +#if _MSC_VER < 1500 // VC++ 8.0 and below +#define snprintf _snprintf +#define vsnprintf _vsnprintf +#endif +#endif #include #include From 4aff02cc3bec6d09616b9d156e776e9f5e125f96 Mon Sep 17 00:00:00 2001 From: Kinshuk Bairagi Date: Wed, 20 Apr 2022 18:21:05 +0530 Subject: [PATCH 20/26] Fix scoop install issue --- .github/workflows/main.yml | 17 ++++++++++------- distribution/docker/Dockerfile.base | 2 ++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 613f888..4ceb694 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,10 +1,11 @@ name: Tinyphone Build on: - release: push: branches: - master + tags: + - v* pull_request: branches: - master @@ -12,7 +13,7 @@ on: jobs: tinyphone_win_job: name: Build Tinyphone Windows - runs-on: windows-2019 + runs-on: windows-2016 steps: - name: Checkout uses: actions/checkout@v2 @@ -28,21 +29,23 @@ jobs: uses: actions/cache@v2 id: cache-boost with: - path: C:\local\boost_1_74_0 - key: boost-74 + path: C:\local\boost_1_68_0 + key: boost - name: Install Boost if: steps.cache-boost.outputs.cache-hit != 'true' run: | - # Use the boost_1_74_0-msvc-14.1-64.exe for Windows 2019 - $Url = "https://onboardcloud.dl.sourceforge.net/project/boost/boost-binaries/1.74.0/boost_1_74_0-msvc-14.2-32.exe" + # Use the boost_1_72_0-msvc-14.1-64.exe for Windows 2016 + $Url = "https://boost.teeks99.com/bin/1.68.0/boost_1_68_0-msvc-14.0-32.exe" (New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe") - Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost_1_74_0" + Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost_1_68_0" - name: Install Scoop & Binaries run : | [Net.ServicePointManager]::SecurityProtocol =[Net.SecurityProtocolType]::Tls12 ; (New-Object System.Net.WebClient).DownloadFile('https://get.scoop.sh', "install_scoop.ps1"); .\install_scoop.ps1 -RunAsAdmin + scoop config SCOOP_BRANCH develop + scoop update scoop install curl wget cmake unzip make; - name: Install wixtoolset diff --git a/distribution/docker/Dockerfile.base b/distribution/docker/Dockerfile.base index 3508b62..b097092 100644 --- a/distribution/docker/Dockerfile.base +++ b/distribution/docker/Dockerfile.base @@ -44,6 +44,8 @@ RUN C:\TEMP\Install.cmd C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --n # Install Scoop RUN powershell.exe [Net.ServicePointManager]::SecurityProtocol =[Net.SecurityProtocolType]::Tls12 ; (New-Object System.Net.WebClient).DownloadFile('https://get.scoop.sh', 'install_scoop.ps1'); .\install_scoop.ps1 -RunAsAdmin +# Use devel branch of scoop due to https://github.com/ScoopInstaller/Scoop/issues/4792 +RUN scoop config SCOOP_BRANCH develop ; scoop update # Install Git & other tools RUN powershell.exe scoop install git curl wget openssh unzip make sed; From dc027f1adbfa9d1f794a20ea604440335feb7af7 Mon Sep 17 00:00:00 2001 From: Kinshuk Bairagi Date: Wed, 20 Apr 2022 18:23:31 +0530 Subject: [PATCH 21/26] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4ceb694..831ab53 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ on: jobs: tinyphone_win_job: name: Build Tinyphone Windows - runs-on: windows-2016 + runs-on: windows-2019 steps: - name: Checkout uses: actions/checkout@v2 From 22dd04312b06c0b5471612162185bb8f38088c83 Mon Sep 17 00:00:00 2001 From: Kinshuk Bairagi Date: Wed, 20 Apr 2022 18:24:38 +0530 Subject: [PATCH 22/26] Update main.yml --- .github/workflows/main.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 831ab53..a128c24 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,23 +29,21 @@ jobs: uses: actions/cache@v2 id: cache-boost with: - path: C:\local\boost_1_68_0 - key: boost + path: C:\local\boost_1_74_0 + key: boost-74 - name: Install Boost if: steps.cache-boost.outputs.cache-hit != 'true' run: | - # Use the boost_1_72_0-msvc-14.1-64.exe for Windows 2016 - $Url = "https://boost.teeks99.com/bin/1.68.0/boost_1_68_0-msvc-14.0-32.exe" + # Use the boost_1_74_0-msvc-14.1-64.exe for Windows 2019 + $Url = "https://onboardcloud.dl.sourceforge.net/project/boost/boost-binaries/1.74.0/boost_1_74_0-msvc-14.2-32.exe" (New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe") - Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost_1_68_0" + Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost_1_74_0" - name: Install Scoop & Binaries run : | [Net.ServicePointManager]::SecurityProtocol =[Net.SecurityProtocolType]::Tls12 ; (New-Object System.Net.WebClient).DownloadFile('https://get.scoop.sh', "install_scoop.ps1"); .\install_scoop.ps1 -RunAsAdmin - scoop config SCOOP_BRANCH develop - scoop update scoop install curl wget cmake unzip make; - name: Install wixtoolset From a885575b90e021b136da6fbd02c484736c609c68 Mon Sep 17 00:00:00 2001 From: Kinshuk Bairagi Date: Wed, 20 Apr 2022 18:39:12 +0530 Subject: [PATCH 23/26] Update docker.yaml --- .github/workflows/docker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index e4cfc86..5fd9a8c 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -13,7 +13,7 @@ on: jobs: tinyphone_docker_job: - # if: github.event.label.name == 'ci/github' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'release' + if: github.event.label.name == 'ci/github' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'release' name: Build Tinyphone runs-on: windows-2019 steps: From 1eeec040d9a8699b49f18fbc2c2690f5bb626b8c Mon Sep 17 00:00:00 2001 From: Kinshuk Bairagi Date: Wed, 20 Apr 2022 18:41:57 +0530 Subject: [PATCH 24/26] Update docker.yaml --- .github/workflows/docker.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 5fd9a8c..d03bc69 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -49,11 +49,10 @@ jobs: restore-keys: | tinyphone-base-docker-cache- - name: Build and Push tinyphone_base to registry - # if: contains(steps.changed_files.outputs.modified, 'Dockerfile.base') + if: contains(steps.changed_files.outputs.modified, 'Dockerfile.base') run: | docker build --file=./distribution/docker/Dockerfile.base -t ghcr.io/${{ github.repository_owner }}/tinyphone_base:vc2019 -t ghcr.io/${{ github.repository_owner }}/tinyphone_base:${{ steps.vars.outputs.sha_short }} ./distribution/docker docker push ghcr.io/${{ github.repository_owner }}/tinyphone_base:vc2019 - # docker push ghcr.io/${{ github.repository_owner }}/tinyphone_base:${{ steps.vars.outputs.sha_short }} - name: Update CodeDir run : | sed -i 's/$env:CodeDir/C:\\Code\\tinyphone/g' ./distribution/docker/release.ps1 From 9fe596e8aacd3cc8b936d16eec784d351ffcbd28 Mon Sep 17 00:00:00 2001 From: Kinshuk Bairagi Date: Wed, 20 Apr 2022 20:59:30 +0530 Subject: [PATCH 25/26] use curl to download release chan --- distribution/docker/Dockerfile.base | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/distribution/docker/Dockerfile.base b/distribution/docker/Dockerfile.base index b097092..1675d9c 100644 --- a/distribution/docker/Dockerfile.base +++ b/distribution/docker/Dockerfile.base @@ -11,12 +11,21 @@ SHELL ["cmd", "/S", "/C"] COPY Install.cmd C:\TEMP\ ADD https://aka.ms/vscollect.exe C:\TEMP\collect.exe -# Download and install Build Tools 14.0 -# ADD https://download.microsoft.com/download/E/E/D/EEDF18A8-4AED-4CE0-BEBE-70A83094FC5A/BuildTools_Full.exe C:\TEMP\msbuild14.exe -# RUN start /wait C:\TEMP\msbuild14.exe /q /full /log C:\TEMP\msbuild14.log +# Install Scoop +RUN powershell.exe [Net.ServicePointManager]::SecurityProtocol =[Net.SecurityProtocolType]::Tls12 ; (New-Object System.Net.WebClient).DownloadFile('https://get.scoop.sh', 'install_scoop.ps1'); .\install_scoop.ps1 -RunAsAdmin + +# Use devel branch of scoop due to https://github.com/ScoopInstaller/Scoop/issues/4792 +RUN scoop config SCOOP_BRANCH develop ; scoop update + +# Install Git & other tools +RUN powershell.exe scoop install git curl wget openssh unzip make sed; +RUN powershell.exe [environment]::setenvironmentvariable('GIT_SSH', (resolve-path (scoop which ssh)), 'USER'); + +# Download channel for fixed install. +RUN curl -L https://aka.ms/vs/16/release/channel -o /tmp/VisualStudio.chman # Download channel for fixed install. -ADD https://aka.ms/vs/16/release/channel C:\TEMP\VisualStudio.chman +# ADD https://aka.ms/vs/16/release/channel C:\TEMP\VisualStudio.chman # Download and install Build Tools for Visual Studio 2019 for native desktop workload. ADD https://aka.ms/vs/16/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe @@ -41,15 +50,6 @@ RUN C:\TEMP\Install.cmd C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --n # Verify if .NET isn't broken (bug with the ltsc2016 docker image) # RUN powershell.exe -Command echo Everything is OK -# Install Scoop -RUN powershell.exe [Net.ServicePointManager]::SecurityProtocol =[Net.SecurityProtocolType]::Tls12 ; (New-Object System.Net.WebClient).DownloadFile('https://get.scoop.sh', 'install_scoop.ps1'); .\install_scoop.ps1 -RunAsAdmin - -# Use devel branch of scoop due to https://github.com/ScoopInstaller/Scoop/issues/4792 -RUN scoop config SCOOP_BRANCH develop ; scoop update - -# Install Git & other tools -RUN powershell.exe scoop install git curl wget openssh unzip make sed; -RUN powershell.exe [environment]::setenvironmentvariable('GIT_SSH', (resolve-path (scoop which ssh)), 'USER'); ADD https://onboardcloud.dl.sourceforge.net/project/boost/boost-binaries/1.74.0/boost_1_74_0-msvc-14.2-32.exe C:\TEMP\boost.exe RUN cmd.exe /c C:\TEMP\boost.exe /SILENT From 7d68ac336847cfe205db3bd2ce7c4477c68bbffe Mon Sep 17 00:00:00 2001 From: Kinshuk Bairagi Date: Wed, 20 Apr 2022 21:32:45 +0530 Subject: [PATCH 26/26] fix --- .github/workflows/docker.yaml | 6 ------ distribution/docker/Dockerfile.base | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index d03bc69..dfea7cb 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -42,12 +42,6 @@ jobs: - name: Set vars id: vars run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - - uses: satackey/action-docker-layer-caching@v0.0.11 - continue-on-error: true - with: - key: tinyphone-base-docker-cache-{hash} - restore-keys: | - tinyphone-base-docker-cache- - name: Build and Push tinyphone_base to registry if: contains(steps.changed_files.outputs.modified, 'Dockerfile.base') run: | diff --git a/distribution/docker/Dockerfile.base b/distribution/docker/Dockerfile.base index 1675d9c..ef6d858 100644 --- a/distribution/docker/Dockerfile.base +++ b/distribution/docker/Dockerfile.base @@ -22,7 +22,7 @@ RUN powershell.exe scoop install git curl wget openssh unzip make sed; RUN powershell.exe [environment]::setenvironmentvariable('GIT_SSH', (resolve-path (scoop which ssh)), 'USER'); # Download channel for fixed install. -RUN curl -L https://aka.ms/vs/16/release/channel -o /tmp/VisualStudio.chman +RUN curl -L https://aka.ms/vs/16/release/channel -o C:\TEMP\VisualStudio.chman # Download channel for fixed install. # ADD https://aka.ms/vs/16/release/channel C:\TEMP\VisualStudio.chman