Skip to content

Commit

Permalink
Merge pull request #255 from TriliumNext/feature/windows_installer
Browse files Browse the repository at this point in the history
Windows installer
  • Loading branch information
eliandoran authored Jul 21, 2024
2 parents f9a4f9b + 028565d commit 4a7c447
Show file tree
Hide file tree
Showing 10 changed files with 8,128 additions and 17,622 deletions.
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

0 comments on commit 4a7c447

Please sign in to comment.