Skip to content

Commit 06ec94c

Browse files
authored
Merge pull request #13 from mpretty-cyro/feature/libQuic-changes
Fixes for libQuic merge
2 parents d40f89f + a073f61 commit 06ec94c

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
os: [windows-2022, macos-13, ubuntu-20.04]
22+
os: [windows-2022, macos-13, ubuntu-22.04]
2323
env:
2424
SIGNAL_ENV: production
2525
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -44,12 +44,12 @@ jobs:
4444
uses: microsoft/[email protected]
4545
if: runner.os == 'Windows'
4646

47-
# - name: sed it
48-
# if: runner.os == 'Windows'
49-
# shell: bash
50-
# run: |
51-
# sed -i "s/target_compile_options(oxen-logging-warnings INTERFACE/#target_compile_options(oxen-logging-warnings INTERFACE/" libsession-util/external/oxen-libquic/external/oxen-logging/CMakeLists.txt
52-
# cat libsession-util/external/oxen-libquic/external/oxen-logging/CMakeLists.txt
47+
- name: sed it
48+
if: runner.os == 'Windows'
49+
shell: bash
50+
run: |
51+
sed -i "s/target_compile_options(oxen-logging-warnings INTERFACE/#target_compile_options(oxen-logging-warnings INTERFACE/" libsession-util/external/oxen-libquic/external/oxen-logging/CMakeLists.txt
52+
cat libsession-util/external/oxen-libquic/external/oxen-logging/CMakeLists.txt
5353
5454
- name: build libsession-util-nodejs
5555
shell: bash

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ SET(WITH_TESTS OFF)
3131
set(CMAKE_CXX_STANDARD 20)
3232
set(CMAKE_CXX_STANDARD_REQUIRED ON)
3333
set(CMAKE_CXX_EXTENSIONS OFF)
34+
set(ENABLE_ONIONREQ OFF)
3435

3536
# when building from a release of libsession on desktop, it complains that ios-cmake is not up to date
3637
# as it is not part of the archive. We actually don't care about it on session-desktop

libsession-util

Submodule libsession-util updated 92 files

src/base_config.hpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <unordered_set>
1010

1111
#include "session/config/base.hpp"
12+
#include "session/logging.hpp"
1213
#include "session/types.hpp"
1314
#include "utilities.hpp"
1415

@@ -106,6 +107,18 @@ class ConfigBaseImpl {
106107

107108
Napi::Env env = info.Env();
108109

110+
session::add_logger([env, class_name](auto msg) {
111+
std::string toLog =
112+
"libsession-util:" + std::string(class_name) + ": " + std::string(msg) + "\n";
113+
114+
Napi::Function consoleLog = env.Global()
115+
.Get("console")
116+
.As<Napi::Object>()
117+
.Get("log")
118+
.As<Napi::Function>();
119+
consoleLog.Call({Napi::String::New(env, toLog)});
120+
});
121+
109122
return config;
110123
});
111124
}

0 commit comments

Comments
 (0)