Skip to content

Commit 061b0c9

Browse files
authored
Merge pull request #294 from JYC333/sql
Remove hard-coded better-sqlite3 binaries
2 parents 72b669b + b05e51f commit 061b0c9

22 files changed

+4075
-1840
lines changed

.github/workflows/main.yml

Lines changed: 63 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ concurrency:
1818
cancel-in-progress: true
1919

2020
jobs:
21-
build_darwin-x64:
22-
name: Build macOS x86_64
23-
runs-on: ubuntu-latest
21+
build_darwin:
22+
name: Build macOS (x86_64, arm64)
23+
runs-on: macos-latest
2424
steps:
2525
- uses: actions/checkout@v4
2626
- name: Set up node & dependencies
@@ -29,33 +29,36 @@ jobs:
2929
node-version: 20
3030
cache: "npm"
3131
- run: npm ci
32-
- run: |
32+
- name: Run MacOS installer build (x86_64)
33+
run: |
3334
npm run update-build-info
34-
./bin/build-mac-x64.sh
35-
- uses: actions/upload-artifact@v4
35+
npm run make-electron -- --arch="x64"
36+
- name: Publish MacOS zip artifact (x86_64)
37+
uses: actions/upload-artifact@v4
3638
with:
37-
name: trilium-mac-x64.zip
38-
path: dist/trilium-mac-x64*.zip
39-
build_darwin-arm64:
40-
name: Build macOS aarch64
41-
runs-on: ubuntu-latest
42-
steps:
43-
- uses: actions/checkout@v4
44-
- name: Set up node & dependencies
45-
uses: actions/setup-node@v4
39+
name: TriliumNext Notes for MacOS (x86_64)
40+
path: out/make/zip/darwin/x64/*.zip
41+
- name: Publish MacOS installer artifact (x86_64)
42+
uses: actions/upload-artifact@v4
4643
with:
47-
node-version: 20
48-
cache: "npm"
49-
- run: npm ci
50-
- run: |
44+
name: TriliumNext Notes for MacOS (Setup) (x86_64)
45+
path: out/make/*-x64.dmg
46+
- name: Run MacOS installer build (arm64)
47+
run: |
5148
npm run update-build-info
52-
./bin/build-mac-arm64.sh
53-
- uses: actions/upload-artifact@v4
49+
npm run make-electron -- --arch="arm64"
50+
- name: Publish MacOS zip artifact (arm64)
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: TriliumNext Notes for MacOS (arm64)
54+
path: out/make/zip/darwin/arm64/*.zip
55+
- name: Publish MacOS installer artifact (arm64)
56+
uses: actions/upload-artifact@v4
5457
with:
55-
name: trilium-mac-arm64.zip
56-
path: dist/trilium-mac-arm64*.zip
57-
build_linux-x64:
58-
name: Build Linux x86_64
58+
name: TriliumNext Notes for MacOS (Setup) (arm64)
59+
path: out/make/*-arm64.dmg
60+
build_linux:
61+
name: Build Linux (x86_64, arm64)
5962
runs-on: ubuntu-latest
6063
steps:
6164
- uses: actions/checkout@v4
@@ -65,17 +68,34 @@ jobs:
6568
node-version: 20
6669
cache: "npm"
6770
- run: npm ci
68-
- run: |
71+
- name: Run Linux installer build (x86_64)
72+
run: |
6973
npm run update-build-info
70-
./bin/build-linux-x64.sh
71-
- uses: actions/upload-artifact@v4
74+
npm run make-electron -- --arch="x64"
75+
- name: Publish Linux zip artifact (x86_64)
76+
uses: actions/upload-artifact@v4
7277
with:
73-
name: trilium-linux-x64.tar.xz
74-
path: dist/trilium-linux-x64-*.tar.xz
75-
- uses: actions/upload-artifact@v4
78+
name: TriliumNext Notes for Linux
79+
path: out/make/zip/linux/x64/*.zip
80+
- name: Publish Linux installer artifact (x86_64)
81+
uses: actions/upload-artifact@v4
7682
with:
77-
name: trilium_amd64.deb
78-
path: dist/trilium_*.deb
83+
name: TriliumNext Notes for Linux (Setup)
84+
path: out/make/deb/x64/*.deb
85+
- name: Run Linux installer build (arm64)
86+
run: |
87+
npm run update-build-info
88+
npm run make-electron -- --arch="arm64"
89+
- name: Publish Linux zip artifact (arm64)
90+
uses: actions/upload-artifact@v4
91+
with:
92+
name: TriliumNext Notes for Linux
93+
path: out/make/zip/linux/arm64/*.zip
94+
- name: Publish Linux installer artifact (arm64)
95+
uses: actions/upload-artifact@v4
96+
with:
97+
name: TriliumNext Notes for Linux (Setup)
98+
path: out/make/deb/arm64/*.deb
7999
build_linux_server-x64:
80100
name: Build Linux Server x86_64
81101
runs-on: ubuntu-latest
@@ -87,40 +107,16 @@ jobs:
87107
node-version: 20
88108
cache: "npm"
89109
- run: npm ci
90-
- run: |
110+
- name: Run Linux server build (x86_64)
111+
run: |
91112
npm run update-build-info
92113
./bin/build-server.sh
93114
- uses: actions/upload-artifact@v4
94115
with:
95116
name: trilium-linux-x64-server.tar.xz
96117
path: dist/trilium-linux-x64-server-*.tar.xz
97-
build_windows-x64:
118+
build_windows:
98119
name: Build Windows x86_64
99-
runs-on: ubuntu-latest
100-
steps:
101-
- name: Set up Wine
102-
run: |
103-
sudo dpkg --add-architecture i386
104-
wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
105-
sudo add-apt-repository ppa:cybermax-dexter/sdl2-backport
106-
sudo apt-add-repository "deb https://dl.winehq.org/wine-builds/ubuntu $(lsb_release -cs) main"
107-
sudo apt install --install-recommends winehq-stable
108-
- uses: actions/checkout@v4
109-
- name: Set up node & dependencies
110-
uses: actions/setup-node@v4
111-
with:
112-
node-version: 20
113-
cache: "npm"
114-
- run: npm ci
115-
- run: |
116-
npm run update-build-info
117-
./bin/build-win-x64.sh DONTPACK
118-
- uses: actions/upload-artifact@v4
119-
with:
120-
name: trilium-windows-x64
121-
path: dist/trilium-windows-x64
122-
build_windows-installer:
123-
name: Build Windows x86_64 (Setup)
124120
runs-on: windows-latest
125121
steps:
126122
- uses: actions/checkout@v4
@@ -130,11 +126,16 @@ jobs:
130126
node-version: 20
131127
cache: "npm"
132128
- run: npm ci
133-
- name: Run installer build
129+
- name: Run Windows installer build (x86_64)
134130
run: |
135131
npm run update-build-info
136132
npm run make-electron
137-
- name: Publish installer artifact
133+
- name: Publish Windows zip artifact (x86_64)
134+
uses: actions/upload-artifact@v4
135+
with:
136+
name: TriliumNext Notes for Windows
137+
path: out/make/zip/win32/x64/*.zip
138+
- name: Publish Windows installer artifact (x86_64)
138139
uses: actions/upload-artifact@v4
139140
with:
140141
name: TriliumNext Notes for Windows (Setup)

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@
1111
"[jsonc]": {
1212
"editor.defaultFormatter": "vscode.json-language-features"
1313
},
14+
"[javascript]": {
15+
"editor.defaultFormatter": "vscode.typescript-language-features"
16+
},
1417
}
Binary file not shown.
Binary file not shown.
-1.76 MB
Binary file not shown.
-1.78 MB
Binary file not shown.

bin/better-sqlite3/update.sh

Lines changed: 0 additions & 38 deletions
This file was deleted.
-1.61 MB
Binary file not shown.

bin/build-debian.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

bin/build-linux-x64.sh

Lines changed: 0 additions & 58 deletions
This file was deleted.

bin/build-mac-arm64.sh

Lines changed: 0 additions & 37 deletions
This file was deleted.

bin/build-mac-x64.sh

Lines changed: 0 additions & 37 deletions
This file was deleted.

bin/build-server.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ rm -r $PKG_DIR/node/include/node
2424
rm -r $PKG_DIR/node_modules/electron*
2525
rm -r $PKG_DIR/electron.js
2626

27-
cp -r bin/better-sqlite3/linux-server-better_sqlite3.node $PKG_DIR/node_modules/better-sqlite3/build/Release/better_sqlite3.node
28-
2927
printf "#!/bin/sh\n./node/bin/node src/www" > $PKG_DIR/trilium.sh
3028
chmod 755 $PKG_DIR/trilium.sh
3129

0 commit comments

Comments
 (0)