Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 62e483a

Browse files
committed
using esrun for webpack and fix package arch problem
1 parent 42e3f12 commit 62e483a

File tree

5 files changed

+1404
-572
lines changed

5 files changed

+1404
-572
lines changed

.github/workflows/main.yml

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ env:
2121

2222
jobs:
2323
build_darwin:
24-
name: Build macOS
24+
name: Build macOS (x86_64, arm64)
2525
runs-on: macos-latest
2626
steps:
2727
- uses: actions/checkout@v4
@@ -31,31 +31,36 @@ jobs:
3131
node-version: 20
3232
cache: "npm"
3333
- run: npm ci
34+
- name: Run installer build (x86_64)
3435
- run: |
3536
npm run update-build-info
36-
npm run make-electron
37+
npm run make-electron -- --arch="x64"
3738
- name: Publish zip artifact (x86_64)
3839
uses: actions/upload-artifact@v4
3940
with:
4041
name: TriliumNext Notes for MacOS (x86_64)
41-
path: out/make/darwin/x64/*.zip
42-
- name: Publish zip artifact (arm64)
43-
uses: actions/upload-artifact@v4
44-
with:
45-
name: TriliumNext Notes for MacOS (arm64)
46-
path: out/make/darwin/arm64/*.zip
42+
path: out/make/zip/darwin/x64/*.zip
4743
- name: Publish installer artifact (x86_64)
4844
uses: actions/upload-artifact@v4
4945
with:
5046
name: TriliumNext Notes for MacOS (Setup) (x86_64)
51-
path: out/make/dmg/x64/*.dmg
47+
path: out/make/*-x64.dmg
48+
- name: Run installer build (arm64)
49+
- run: |
50+
npm run update-build-info
51+
npm run make-electron -- --arch="arm64"
52+
- name: Publish zip artifact (arm64)
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: TriliumNext Notes for MacOS (arm64)
56+
path: out/make/zip/darwin/arm64/*.zip
5257
- name: Publish installer artifact (arm64)
5358
uses: actions/upload-artifact@v4
5459
with:
5560
name: TriliumNext Notes for MacOS (Setup) (arm64)
56-
path: out/make/dmg/arm64/*.dmg
57-
build_linux-x64:
58-
name: Build Linux x86_64
61+
path: out/make/*-arm64.dmg
62+
build_linux:
63+
name: Build Linux (x86_64, arm64)
5964
runs-on: ubuntu-latest
6065
steps:
6166
- uses: actions/checkout@v4
@@ -65,20 +70,34 @@ jobs:
6570
node-version: 20
6671
cache: "npm"
6772
- run: npm ci
68-
- name: Run installer build
73+
- name: Run installer build (x86_64)
6974
run: |
7075
npm run update-build-info
71-
npm run make-electron
72-
- name: Publish zip artifact
76+
npm run make-electron -- --arch="x64"
77+
- name: Publish zip artifact (x86_64)
7378
uses: actions/upload-artifact@v4
7479
with:
7580
name: TriliumNext Notes for Linux
7681
path: out/make/zip/linux/x64/*.zip
77-
- name: Publish installer artifact
82+
- name: Publish installer artifact (x86_64)
7883
uses: actions/upload-artifact@v4
7984
with:
8085
name: TriliumNext Notes for Linux (Setup)
8186
path: out/make/deb/x64/*.deb
87+
- name: Run installer build (arm64)
88+
run: |
89+
npm run update-build-info
90+
npm run make-electron -- --arch="arm64"
91+
- name: Publish zip artifact (arm64)
92+
uses: actions/upload-artifact@v4
93+
with:
94+
name: TriliumNext Notes for Linux
95+
path: out/make/zip/linux/arm64/*.zip
96+
- name: Publish installer artifact (arm64)
97+
uses: actions/upload-artifact@v4
98+
with:
99+
name: TriliumNext Notes for Linux (Setup)
100+
path: out/make/deb/arm64/*.deb
82101
build_linux_server-x64:
83102
name: Build Linux Server x86_64
84103
runs-on: ubuntu-latest

forge.config.cjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ module.exports = {
1313
afterComplete: [(buildPath, electronVersion, platform, arch, callback) => {
1414
const extraResources = getExtraResourcesForPlatform();
1515
for (const resource of extraResources) {
16-
const sourcePath = path.join(buildPath, 'resources', path.basename(resource));
16+
let sourcePath;
17+
if (platform === 'darwin') {
18+
sourcePath = path.join(buildPath, 'TriliumNextNotes.app', 'Content', 'Resources', path.basename(resource));
19+
} else {
20+
sourcePath = path.join(buildPath, 'resources', path.basename(resource));
21+
}
1722
const destPath = path.join(buildPath, path.basename(resource));
1823

1924
// Copy files from resources folder to root
@@ -29,7 +34,6 @@ module.exports = {
2934
makers: [
3035
{
3136
name: '@electron-forge/maker-deb',
32-
arch: ['x64', 'arm64'],
3337
config: {
3438
options: {
3539
icon: "./images/app-icons/png/128x128.png",

loader-register.js

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

0 commit comments

Comments
 (0)