mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
build: Fix app name in Electron Forge hook
This commit is contained in:
parent
edebe8f7c6
commit
94340ab1a1
@ -1,20 +1,22 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
|
|
||||||
|
const APP_NAME = "TriliumNext Notes";
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
packagerConfig: {
|
packagerConfig: {
|
||||||
executableName: "trilium",
|
executableName: "trilium",
|
||||||
name: 'TriliumNext Notes',
|
name: APP_NAME,
|
||||||
overwrite: true,
|
overwrite: true,
|
||||||
asar: true,
|
asar: true,
|
||||||
icon: "./images/app-icons/icon",
|
icon: "./images/app-icons/icon",
|
||||||
extraResource: getExtraResourcesForPlatform(),
|
extraResource: getExtraResourcesForPlatform(),
|
||||||
afterComplete: [(buildPath, electronVersion, platform, arch, callback) => {
|
afterComplete: [(buildPath, _electronVersion, platform, _arch, callback) => {
|
||||||
const extraResources = getExtraResourcesForPlatform();
|
const extraResources = getExtraResourcesForPlatform();
|
||||||
for (const resource of extraResources) {
|
for (const resource of extraResources) {
|
||||||
let sourcePath;
|
let sourcePath;
|
||||||
if (platform === 'darwin') {
|
if (platform === 'darwin') {
|
||||||
sourcePath = path.join(buildPath, 'TriliumNextNotes.app', 'Contents', 'Resources', path.basename(resource));
|
sourcePath = path.join(buildPath, `${APP_NAME}.app`, 'Contents', 'Resources', path.basename(resource));
|
||||||
} else {
|
} else {
|
||||||
sourcePath = path.join(buildPath, 'resources', path.basename(resource));
|
sourcePath = path.join(buildPath, 'resources', path.basename(resource));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user