mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
refactor(forge.config): call getExtraResourcesForPlatform once only
This commit is contained in:
parent
e0862ce8f3
commit
2b83470de6
@ -3,6 +3,7 @@ const fs = require("fs-extra");
|
|||||||
|
|
||||||
const APP_NAME = "TriliumNext Notes";
|
const APP_NAME = "TriliumNext Notes";
|
||||||
|
|
||||||
|
const extraResourcesForPlatform = getExtraResourcesForPlatform();
|
||||||
const baseLinuxMakerConfigOptions = {
|
const baseLinuxMakerConfigOptions = {
|
||||||
icon: "./images/app-icons/png/128x128.png",
|
icon: "./images/app-icons/png/128x128.png",
|
||||||
desktopTemplate: path.resolve("./bin/electron-forge/desktop.ejs"),
|
desktopTemplate: path.resolve("./bin/electron-forge/desktop.ejs"),
|
||||||
@ -17,7 +18,7 @@ module.exports = {
|
|||||||
icon: "./images/app-icons/icon",
|
icon: "./images/app-icons/icon",
|
||||||
extraResource: [
|
extraResource: [
|
||||||
// Moved to root
|
// Moved to root
|
||||||
...getExtraResourcesForPlatform(),
|
...extraResourcesForPlatform,
|
||||||
|
|
||||||
// Moved to resources (TriliumNext Notes.app/Contents/Resources on macOS)
|
// Moved to resources (TriliumNext Notes.app/Contents/Resources on macOS)
|
||||||
"translations/",
|
"translations/",
|
||||||
@ -25,8 +26,7 @@ module.exports = {
|
|||||||
],
|
],
|
||||||
afterComplete: [
|
afterComplete: [
|
||||||
(buildPath, _electronVersion, platform, _arch, callback) => {
|
(buildPath, _electronVersion, platform, _arch, callback) => {
|
||||||
const extraResources = getExtraResourcesForPlatform();
|
for (const resource of extraResourcesForPlatform) {
|
||||||
for (const resource of extraResources) {
|
|
||||||
const baseName = path.basename(resource);
|
const baseName = path.basename(resource);
|
||||||
|
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
|
Loading…
x
Reference in New Issue
Block a user