Skip to content

Commit 4a7c447

Browse files
authored
Merge pull request #255 from TriliumNext/feature/windows_installer
Windows installer
2 parents f9a4f9b + 028565d commit 4a7c447

File tree

10 files changed

+8128
-17622
lines changed

10 files changed

+8128
-17622
lines changed

.github/workflows/build.yml

-3
This file was deleted.

.github/workflows/dev.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Dev
22
on:
33
push:
4-
branches:
5-
- '!develop'
6-
- '!feature/update*'
4+
branches_ignore:
5+
- 'develop'
6+
- 'feature/update**'
77

88
concurrency:
99
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/main.yml

+18
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,24 @@ jobs:
115115
with:
116116
name: trilium-windows-x64
117117
path: dist/trilium-windows-x64
118+
build_windows-installer:
119+
name: Build Windows x86_64 (Setup)
120+
runs-on: windows-latest
121+
steps:
122+
- uses: actions/checkout@v4
123+
- name: Set up node & dependencies
124+
uses: actions/setup-node@v4
125+
with:
126+
node-version: 20
127+
cache: "npm"
128+
- run: npm ci
129+
- name: Run installer build
130+
run: npm run make-electron
131+
- name: Publish installer artifact
132+
uses: actions/upload-artifact@v4
133+
with:
134+
name: TriliumNext Notes for Windows (Setup)
135+
path: out/make/squirrel.windows/x64/*.exe
118136
build_docker:
119137
name: Build Docker image
120138
runs-on: ubuntu-latest

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ data/
1515
data-test/
1616
tmp/
1717
.eslintcache
18+
19+
out/

electron.ts

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ import appIconService = require("./src/services/app_icon");
66
import windowService = require("./src/services/window");
77
import tray = require("./src/services/tray");
88

9+
// Prevent Trilium starting twice on first install and on uninstall for the Windows installer.
10+
if (require('electron-squirrel-startup')) {
11+
process.exit(0);
12+
}
13+
914
// Adds debug features like hotkeys for triggering dev tools and reload
1015
require("electron-debug")();
1116

forge.config.js

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
module.exports = {
2+
packagerConfig: {
3+
asar: true,
4+
// icon will break once we add .dmg support, since the .ico & .icns have to be in same dir (see https://www.electronforge.io/guides/create-and-add-icons#windows-and-macos)
5+
icon: "./images/app-icons/win/icon"
6+
},
7+
rebuildConfig: {},
8+
makers: [
9+
{
10+
name: '@electron-forge/maker-squirrel',
11+
config: {
12+
setupIcon: "./images/app-icons/win/icon.ico",
13+
loadingGif: "./images/app-icons/win/setup-banner.gif"
14+
}
15+
}
16+
],
17+
plugins: [
18+
{
19+
name: '@electron-forge/plugin-auto-unpack-natives',
20+
config: {},
21+
},
22+
],
23+
};

images/app-icons/win/setup-banner.gif

8.49 KB
Loading

images/app-icons/win/setup-banner.xcf

20.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)