Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github CI : Build on macos-13 #89

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:

tinyphone_osx_job:
name: Build Tinyphone macOS
runs-on: macos-11
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -105,8 +105,8 @@ jobs:
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db

# import certificate and provisioning profile from secrets
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH
#echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode --output $PP_PATH
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
#echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH

# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
Expand All @@ -128,7 +128,7 @@ jobs:
shell: bash
run : |
export HOMEBREW_NO_INSTALL_CLEANUP=true
brew install autoconf automake libtool tree wget opencore-amr
brew install autoconf automake libtool 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
Expand All @@ -140,7 +140,7 @@ jobs:

#boost
pushd tinyphone-osx/vendor/boost
./boost.sh -macos --boost-version 1.74.0
./boost.sh -macos --boost-version 1.84.0
popd

#stastd
Expand Down
5 changes: 3 additions & 2 deletions tinyphone-osx/Tinyphone.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@
B3DDA55125515DF700D269C9 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1110;
LastUpgradeCheck = 1320;
ORGANIZATIONNAME = "Kinshuk Bairagi";
Expand Down Expand Up @@ -630,7 +631,7 @@
/usr/local/lib,
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = "36.0.0.84";
MARKETING_VERSION = 36.0.0.84;
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"-DBOOST_SYSTEM_DYN_LINK",
Expand Down Expand Up @@ -682,7 +683,7 @@
/usr/local/lib,
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = "36.0.0.84";
MARKETING_VERSION = 36.0.0.84;
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"-DBOOST_SYSTEM_DYN_LINK",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1320"
LastUpgradeVersion = "1530"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 2 additions & 0 deletions tinyphone-osx/src/Tinyphone-C-Interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ const char* GetOSXProductVersion();

const char* GetResourceFilePath(const char * name);

const char* GetAppSupportFilePath(const char * name);

const char* GetLogsDirectory();

#endif /* Tinyphone_C_Interface_h */
7 changes: 7 additions & 0 deletions tinyphone-osx/src/Tinyphone-OC.mm
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ void ShowOSXAlert(const char *dataPayload, bool blocking) {
return [myInstance GetProductVersion];
}

const char* GetAppSupportFilePath(const char * name){
NSString* file = @(name);
NSString* basePath = @(GetAppSupportDirectory());
NSString* finalPath = [basePath stringByAppendingPathComponent:file];
return [finalPath UTF8String];;
}

const char* GetResourceFilePath(const char * name){
CFURLRef appUrlRef = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("config.json"), NULL, NULL);
if (appUrlRef != nullptr){
Expand Down
2 changes: 1 addition & 1 deletion tinyphone-osx/src/osxapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ struct UIAccountInfoArray Accounts(){
acc.active = account->getInfo().regIsActive;
accounts.push_back(acc);
}
arrInfo.count = accounts.size();
arrInfo.count = (int) accounts.size();
if (accounts.size() < 10 ) {
std::copy(accounts.begin(), accounts.end(), arrInfo.accounts);
}
Expand Down
9 changes: 9 additions & 0 deletions tinyphone/baseapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@
using namespace std;
using namespace pj;

/**
* @file baseapp.cpp
* @brief Implementation of the base application functionality for TinyPhone.
*
* This file contains the implementation of the base application functionality for TinyPhone.
* It includes functions for initializing the PJSUA endpoint, starting and stopping the application,
* and retrieving the phone object.
*/

#define MAX_DNS_SERVERS 4

inline void pj_logerror(pj_status_t status, char * message) {
Expand Down
4 changes: 3 additions & 1 deletion tinyphone/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ namespace tp {
#ifdef ALLOW_OFFLINE_CONFIG
std::string local_file_path = LOCAL_CONFIG_FILE;
#ifdef __APPLE__
auto apple_config_file = GetResourceFilePath(local_file_path.c_str());
auto apple_config_file = GetAppSupportFilePath(local_file_path.c_str());
std::cout << "Checking if Local File Exists " << apple_config_file << std::endl;

if(apple_config_file != nullptr){
std::string lp(apple_config_file);
local_file_path.swap(lp);
Expand Down
1 change: 1 addition & 0 deletions tinyphone/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <stdio.h>
#include <thread>
#include <vector>
#include <fstream>
#include <sstream>
#include "consts.h"

Expand Down
Loading