Skip to content

Commit

Permalink
Merge 7d68ac3 into cd98d5a
Browse files Browse the repository at this point in the history
  • Loading branch information
kingster committed Apr 20, 2022
2 parents cd98d5a + 7d68ac3 commit a7b8b6c
Show file tree
Hide file tree
Showing 13 changed files with 94 additions and 101 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -45,17 +45,16 @@ 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
- name: Update CodeDir
run : |
sed -i 's/$env:CodeDir/C:\\Code\\tinyphone/g' ./distribution/docker/release.ps1
cat ./distribution/docker/release.ps1
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
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- master
tags:
tags:
- v*
pull_request:
branches:
Expand All @@ -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
Expand All @@ -29,15 +29,15 @@ 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 : |
Expand Down
14 changes: 7 additions & 7 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
50 changes: 21 additions & 29 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: 1.0.{build}
image: Visual Studio 2017
image: Visual Studio 2019
clone_depth: 5
init:
- ps: >-
Expand All @@ -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'
Expand All @@ -34,67 +34,59 @@ 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\2017\Community\Common7\Tools"
pushd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools"
cmd /c "VsDevCmd.bat&set" |
foreach {
if ($_ -match "=") {
$v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])"
}
}
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
cd E:\lib\curl\builds
cd E:\lib\curl\
ls
.\buildconf.bat
cd E:\lib\curl\winbuild
ls
where.exe msbuild.exe
nmake /f Makefile.vc mode=dll VC=19 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
ls E:\lib\curl\builds
cmd /c .\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 .\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")
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
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
Expand Down
50 changes: 27 additions & 23 deletions distribution/docker/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -11,40 +11,48 @@ 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 C:\TEMP\VisualStudio.chman

# 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 `
--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended `
--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 `
# --remove Microsoft.VisualStudio.Component.Windows81SDK `
--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');

# Install Git & other tools
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
Expand All @@ -57,11 +65,7 @@ RUN powershell.exe Remove-Item -LiteralPath 'C:\Program Files\WindowsPowerShell\

WORKDIR C:\BuildTools

ADD VsDevCmdPowerShell.bat C:\BuildTools\
ENTRYPOINT C:\BuildTools\VsDevCmdPowerShell.bat

# Start developer command prompt with any other commands specified.
# ENTRYPOINT C:\BuildTools\Common7\Tools\VsDevCmd.bat &&
# Define the entry point for the Docker container.
# This entry point starts the developer command prompt and launches the PowerShell shell.
ENTRYPOINT ["C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]

# Default to PowerShell if no other command specified.
# CMD ["powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]
2 changes: 1 addition & 1 deletion distribution/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
3 changes: 0 additions & 3 deletions distribution/docker/VsDevCmdPowerShell.bat

This file was deleted.

20 changes: 10 additions & 10 deletions distribution/docker/release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,45 +17,45 @@ 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")
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
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.
Expand Down
2 changes: 1 addition & 1 deletion lib/json
Submodule json updated 1776 files
Loading

0 comments on commit a7b8b6c

Please sign in to comment.