Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows installer #255

Merged
merged 24 commits into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b07628a
Remove electron-builder dependency
eliandoran Nov 8, 2023
145a09e
Set up Electron Forge
eliandoran Nov 8, 2023
380b967
Configure author & description for maker-squirrel
eliandoran Nov 8, 2023
2faee49
Use package.json instead for consistency
eliandoran Nov 8, 2023
b1e0492
Prevent (re)start on install & uninstall
eliandoran Nov 8, 2023
c0c5e30
Add icon to setup
eliandoran Nov 8, 2023
ddfa0d0
Set up application icon
eliandoran Nov 8, 2023
df79f3d
Add a custom setup banner
eliandoran Nov 8, 2023
7cace22
Fix installer if webpack not run
eliandoran Nov 8, 2023
e928297
Fix application icon
eliandoran Nov 8, 2023
a5c150b
Remove unused electron-forge config
eliandoran Nov 9, 2023
fe82b1d
Start writing GitHub Actions workflow
eliandoran Nov 9, 2023
4c1bc10
Publish installer artifact
eliandoran Nov 9, 2023
19e776b
Merge remote-tracking branch 'origin/develop' into feature/windows_in…
eliandoran Jul 20, 2024
dcb5d53
Fix removing dependency on electron
eliandoran Jul 20, 2024
52af97c
build: Remove electron-builder
eliandoran Jul 20, 2024
a5f7a3a
build: Improve package.json for building with electron-forge
eliandoran Jul 20, 2024
6c36c47
ci: Adapt to changes to package.json
eliandoran Jul 20, 2024
2e2400e
build: Improve product information in package.json
eliandoran Jul 20, 2024
3ac643b
build: Reorder scripts & rename artifact
eliandoran Jul 20, 2024
f49008b
ci: Improve workflow
eliandoran Jul 20, 2024
ad7a29a
ci: Try to fix missing assets in installer
eliandoran Jul 20, 2024
b55e93c
ci: Join workflows
eliandoran Jul 21, 2024
028565d
ci: Fix dev workflow no longer triggering
eliandoran Jul 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/build.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Dev
on:
push:
branches:
- '!develop'
- '!feature/update*'
branches_ignore:
- 'develop'
- 'feature/update**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,24 @@ jobs:
with:
name: trilium-windows-x64
path: dist/trilium-windows-x64
build_windows-installer:
name: Build Windows x86_64 (Setup)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up node & dependencies
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- run: npm ci
- name: Run installer build
run: npm run make-electron
- name: Publish installer artifact
uses: actions/upload-artifact@v4
with:
name: TriliumNext Notes for Windows (Setup)
path: out/make/squirrel.windows/x64/*.exe
build_docker:
name: Build Docker image
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ data/
data-test/
tmp/
.eslintcache

out/
5 changes: 5 additions & 0 deletions electron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ import appIconService = require("./src/services/app_icon");
import windowService = require("./src/services/window");
import tray = require("./src/services/tray");

// Prevent Trilium starting twice on first install and on uninstall for the Windows installer.
if (require('electron-squirrel-startup')) {
process.exit(0);
}

// Adds debug features like hotkeys for triggering dev tools and reload
require("electron-debug")();

Expand Down
23 changes: 23 additions & 0 deletions forge.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
packagerConfig: {
asar: true,
// 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)
icon: "./images/app-icons/win/icon"
},
rebuildConfig: {},
makers: [
{
name: '@electron-forge/maker-squirrel',
config: {
setupIcon: "./images/app-icons/win/icon.ico",
loadingGif: "./images/app-icons/win/setup-banner.gif"
}
}
],
plugins: [
{
name: '@electron-forge/plugin-auto-unpack-natives',
config: {},
},
],
};
Binary file added images/app-icons/win/setup-banner.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/app-icons/win/setup-banner.xcf
Binary file not shown.
Loading