Skip to content

Commit d1703f8

Browse files
authored
Merge pull request #23 from yougotwill/fix/no-ref/zstd_cmake_min
Release v0.4.30
2 parents 677600c + 95e03f3 commit d1703f8

File tree

7 files changed

+29
-13
lines changed

7 files changed

+29
-13
lines changed

.github/workflows/test.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,15 @@ jobs:
4444
uses: microsoft/setup-msbuild@v1.3.1
4545
if: runner.os == 'Windows'
4646

47-
# Note: we will be able to get rid of this once the whole tree of submodules has the latest fetch of oxen-logging
47+
# Note: we will be able to get rid of this once the whole tree of submodules has the latest version of oxen-logging
4848
# We'd need oxen-libquic to be updated to have the commit `bc7167f90e71643b43c2ea9cf7d1fefa5045f8d4`, but we don't want to
4949
# update libquic that late.
5050
# We will soon, though :tm:
51-
- name: sed it
51+
- name: Apply patches
5252
if: runner.os == 'Windows'
5353
shell: bash
5454
run: |
55-
yarn dirty_sed
56-
cat libsession-util/external/oxen-libquic/external/oxen-logging/CMakeLists.txt
55+
yarn naughty-patch
5756
5857
- name: generate fake src/version.h so we can try to build
5958
shell: bash

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
.yarn/
1313
*.cjs
1414
*.mjs
15+
.venv
1516

1617
/src/version.h

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ git clone --recursive git@github.com:session-foundation/libsession-util-nodejs.g
2020
```
2121

2222
Always do your changes in `[FOLDER_NOT_IN_SESSION_DESKTOP]/libsession-util-nodejs`, never in the one under session-desktop's `node_modules` as you might override your local changes.
23-
Then, you can quickly compile a non-electron build by running `yarn cmake-js` from that folder. This is a quick incremental build which can check for C++ compilation errors.
23+
Then, you can quickly compile a non-electron build by first running `yarn naughty-patch && yarn update_version` and then `yarn install` from that folder. You should only have to run `yarn naughty-patch && yarn update_version` manually once when you first setup the project. This is a quick incremental build which can check for C++ compilation errors.
2424
Once your changes are ready to be tested in the `session-desktop` you can compile an electron build using this command:
2525

2626
```

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"main": "index.js",
33
"name": "libsession_util_nodejs",
44
"description": "Wrappers for the Session Util Library",
5-
"version": "0.4.28",
5+
"version": "0.4.30",
66
"license": "GPL-3.0",
77
"author": {
88
"name": "Oxen Project",
@@ -12,8 +12,8 @@
1212
"update_version": "sh update_version.sh",
1313
"clean": "rimraf .cache build",
1414
"install": "cmake-js compile --runtime=electron --runtime-version=34.2.0 --CDSUBMODULE_CHECK=OFF --CDLOCAL_MIRROR=https://oxen.rocks/deps --CDENABLE_ONIONREQ=OFF --CDWITH_TESTS=OFF",
15-
"prepare_release": "sh prepare_release.sh",
16-
"dirty_sed": "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"
15+
"naughty-patch": "git apply patches/oxen-libquic.patch",
16+
"prepare_release": "sh prepare_release.sh"
1717
},
1818
"devDependencies": {
1919
"clang-format": "^1.8.0",

patches/oxen-libquic.patch

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Submodule libsession-util contains modified content
2+
Submodule external/oxen-libquic contains modified content
3+
Submodule external/oxen-logging contains modified content
4+
diff --git a/libsession-util/external/oxen-libquic/external/oxen-logging/CMakeLists.txt b/libsession-util/external/oxen-libquic/external/oxen-logging/CMakeLists.txt
5+
index c8d0960..3b2d573 100644
6+
--- a/libsession-util/external/oxen-libquic/external/oxen-logging/CMakeLists.txt
7+
+++ b/libsession-util/external/oxen-libquic/external/oxen-logging/CMakeLists.txt
8+
@@ -91,7 +91,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL GNU AND CMAKE_CXX_COMPILER_VERSION VERSION_GRE
9+
endif()
10+
11+
add_library(oxen-logging-warnings INTERFACE)
12+
-target_compile_options(oxen-logging-warnings INTERFACE "$<$<OR:$<COMPILE_LANGUAGE:CXX>,$<COMPILE_LANGUAGE:C>>:${warning_flags}>")
13+
+#target_compile_options(oxen-logging-warnings INTERFACE "$<$<OR:$<COMPILE_LANGUAGE:CXX>,$<COMPILE_LANGUAGE:C>>:${warning_flags}>")
14+
target_link_libraries(oxen-logging INTERFACE oxen-logging-warnings)
15+
16+
set(oxen_logging_source_roots "" CACHE INTERNAL "")

prepare_release.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ read_char() {
1010

1111

1212
rm -f ./libsession_util_nodejs*.tar.gz
13-
virtualenv venv
14-
. venv/bin/activate
13+
python -m venv .venv
14+
. .venv/bin/activate
1515
pip install git-archive-all
16+
# see .github/workflows/test.yml for more info
17+
yarn naughty-patch || true
1618
PACKAGE_VERSION=$(node -p "require('./package.json').version")
1719
yarn update_version
1820
echo "PACKAGE_VERSION: $PACKAGE_VERSION"
@@ -25,8 +27,6 @@ esac
2527

2628

2729
echo "Continuing..."
28-
# see test.yml for explanation of this sed command
29-
yarn dirty_sed
3030

3131
echo "Building tar archive of source..."
3232
python3 build_release_archive.py libsession_util_nodejs-v$PACKAGE_VERSION.tar.gz --include src/version.h

0 commit comments

Comments
 (0)