Skip to content

Commit

Permalink
Merge 0ad470a into 9157f87
Browse files Browse the repository at this point in the history
  • Loading branch information
kingster committed Mar 18, 2022
2 parents 9157f87 + 0ad470a commit 1dce52e
Show file tree
Hide file tree
Showing 11 changed files with 250 additions and 186 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,69 @@ jobs:
draft: true
allowUpdates: true
token: ${{ secrets.GH_TOKEN }}

tinyphone_osx_job:
name: Build Tinyphone macOS
runs-on: macos-10.15
steps:
- name: Checkout
uses: actions/checkout@v2
- 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
npm install -g appdmg
- name: Restore Boost Framework
uses: actions/cache@v2
id: cache-boost
with:
path: vendor/boost
key: boost-osx
- name: Create Boost Framework
# if: steps.cache-boost.outputs.cache-hit != 'true'
run : |
#xcode needs to be proper at this point
xcode-select --print-path
#boost
pushd tinyphone-osx/vendor/boost
./boost.sh -macos --boost-version 1.68.0
popd
- name: Compile Libraries
run : |
#stastd
pushd lib/statsd-cpp
mkdir build-osx
cd build-osx
cmake ..
make
popd
- name: Build Project
run : |
#xcode needs to be proper at this point
xcode-select --print-path
pushd tinyphone-osx
pod install
xcodebuild -workspace Tinyphone.xcworkspace -scheme Tinyphone -configuration Release CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
./package.sh
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: tinyphone.dmg
path: |
./tinyphone-osx/tinyphone.dmg
6 changes: 6 additions & 0 deletions tinyphone-osx/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ DerivedData/
## Gcc Patch
/*.gcno
*.dmg


#xcode
Pods/
Tinyphone.xcworkspace/

10 changes: 10 additions & 0 deletions tinyphone-osx/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
platform :macos, '10.15'
use_frameworks!

target 'Tinyphone' do
pod 'YbridOpus'
# pod 'libopus-static'
# pod 'pjsip', '~> 2.9.0.2'
pod 'pjsip', :git => 'https://github.com/voiceip/cocoapod-pjsip' , :branch => 'no-libopus'
end

29 changes: 29 additions & 0 deletions tinyphone-osx/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
PODS:
- pjsip (2.9.0.2)
- YbridOpus (0.8.0)

DEPENDENCIES:
- pjsip (from `https://github.com/voiceip/cocoapod-pjsip`, branch `no-libopus`)
- YbridOpus

SPEC REPOS:
trunk:
- YbridOpus

EXTERNAL SOURCES:
pjsip:
:branch: no-libopus
:git: https://github.com/voiceip/cocoapod-pjsip

CHECKOUT OPTIONS:
pjsip:
:commit: 80a177661d3ec4bfe3aa6be2d2767c62871c4965
:git: https://github.com/voiceip/cocoapod-pjsip

SPEC CHECKSUMS:
pjsip: d74b5ea51bd4181581049de2833a61b060dd5063
YbridOpus: e9af373b9b38acff3702d9a3bd97cae3c232887c

PODFILE CHECKSUM: 33875e5fc3d98200609b13b063ae004b7b7b6c59

COCOAPODS: 1.11.3
23 changes: 23 additions & 0 deletions tinyphone-osx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Building for macOS

```bash
#install dependencies
brew install autoconf automake libtool opencore-amr cryptopp

#build dependencies

#boost
cd tinyphone-osx/vendor/boost
./boost.sh -macos --boost-version 1.68.0

#statsd
cd tinyphone/lib/statsd-cpp/build-osx
cmake ..
make

#lets install the pods
pod install

#now open the `Tinyphone.xcworkspace` file and compile!
```

272 changes: 91 additions & 181 deletions tinyphone-osx/Tinyphone.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1110"
version = "1.3">
LastUpgradeVersion = "1320"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<PostActions>
<ExecutionAction
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Script"
scriptText = "PRODUCT=&quot;${BUILT_PRODUCTS_DIR}/${TARGET_NAME}.app&quot;&#10;DESTINATION=&quot;${SRCROOT}/build/$CONFIGURATION/&quot;&#10;mkdir -p &quot;${DESTINATION}&quot;&#10;cp -R &quot;${PRODUCT}&quot; &quot;${DESTINATION}&quot;&#10;">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B3DDA55825515DF700D269C9"
BuildableName = "Tinyphone.app"
BlueprintName = "Tinyphone"
ReferencedContainer = "container:Tinyphone.xcodeproj">
</BuildableReference>
</EnvironmentBuildable>
</ActionContent>
</ExecutionAction>
</PostActions>
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
Expand Down
2 changes: 1 addition & 1 deletion tinyphone-osx/release-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"background-color" : "#d6c8c8",
"icon-size": 80,
"contents": [
{ "x": 192, "y": 200, "type": "file", "path": "release/Tinyphone.app" },
{ "x": 192, "y": 200, "type": "file", "path": "build/Release/Tinyphone.app" },
{ "x": 448, "y": 200, "type": "link", "path": "/Applications" }
]
}
2 changes: 1 addition & 1 deletion tinyphone-osx/tinyphone/Custom Views/LoadableView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//
import Cocoa

protocol LoadableView: class {
protocol LoadableView: AnyObject {
func load(fromNIBNamed nibName: String) -> Bool
func add(toView parentView: NSView)
}
Expand Down
2 changes: 2 additions & 0 deletions tinyphone-osx/tinyphone/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>LSUIElement</key>
Expand Down

0 comments on commit 1dce52e

Please sign in to comment.