Skip to content

Commit

Permalink
Merge branch 'master' into cli-app
Browse files Browse the repository at this point in the history
* master:
  Bump crow fixes secbug cpp/comparison-with-wider-type (#57)
  Enable CodeQL (#56)
  Remove microsip code (#55)
  Bugfix: crash when dns server list is > 4 (#54)
  Windows-2019 + VS2019 Changes (#53)
  Update Readme & github trigger
  Update lib/crow to CppCrow/Crow (#52)
  • Loading branch information
kingster committed Apr 26, 2022
2 parents 828cccd + f69b3a9 commit eb08a10
Show file tree
Hide file tree
Showing 153 changed files with 230 additions and 28,679 deletions.
99 changes: 99 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '40 4 * * 1'

jobs:
analyze:
name: Analyze
permissions:
actions: read
contents: read
security-events: write

runs-on: macos-10.15
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Checkout submodules # checkout rest
shell: bash
run: |
git config --global url."https://github.com/".insteadOf "git@github.com:"
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Install Dependencies
shell: bash
run : |
export HOMEBREW_NO_INSTALL_CLEANUP=true
brew install autoconf automake libtool tree wget opencore-amr
wget https://gist.githubusercontent.com/kingster/1954ead3c38a40cac88c5c1311bb39c5/raw/343da2c7a2a52ee5a1c03902cc5e44ed83b1dd5d/cryptopp.rb
brew install --build-from-source -f cryptopp.rb
#boost
pushd tinyphone-osx/vendor/boost
./boost.sh -macos --boost-version 1.74.0
popd
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

- name: Compile Libraries
run : |
#xcode needs to be proper at this point
xcode-select --print-path
#stastd
pushd lib/statsd-cpp
mkdir build-osx
cd build-osx
cmake ..
make
popd
- name: Build Project
run : |
pushd tinyphone-osx
pod install
xcodebuild -workspace Tinyphone.xcworkspace -scheme Tinyphone -configuration Release CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
# # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# # If this step fails, then you should remove it and run the build manually (see below)
# - name: Autobuild
# uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
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
21 changes: 11 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
name: Tinyphone Build

on:
release:
push:
branches:
- master
tags:
- v*
pull_request:
branches:
- master

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 @@ -28,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 Expand Up @@ -66,7 +67,7 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: tinyphone
name: tinyphone.msi
path: |
./tinyphone-installer/bin/Release/tinyphone_installer.msi
Expand Down Expand Up @@ -125,7 +126,7 @@ jobs:
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
#cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
- name: Install dependencies
- name: Install Dependencies
shell: bash
run : |
export HOMEBREW_NO_INSTALL_CLEANUP=true
Expand All @@ -141,7 +142,7 @@ jobs:
#boost
pushd tinyphone-osx/vendor/boost
./boost.sh -macos --boost-version 1.68.0
./boost.sh -macos --boost-version 1.74.0
popd
#stastd
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Tinyphone
Minimalist Softphone based on PJSIP with API Control

[![AppVeyor](https://img.shields.io/appveyor/ci/kingster/tinyphone)](https://ci.appveyor.com/project/kingster/tinyphone/)
[![Tinyphone Build](https://github.com/voiceip/tinyphone/actions/workflows/main.yml/badge.svg)](https://github.com/voiceip/tinyphone/actions/workflows/main.yml)

## Getting Started

Expand Down
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
Loading

0 comments on commit eb08a10

Please sign in to comment.