2
0
mirror of https://github.com/frappe/books.git synced 2024-11-14 09:24:04 +00:00
books/electron-builder-config.mjs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

70 lines
2.0 KiB
JavaScript
Raw Normal View History

2024-02-12 00:09:35 +00:00
// App is tagged with a .mjs extension to allow
import path from 'path';
import { fileURLToPath } from 'url';
2024-01-25 03:03:04 +00:00
2024-01-25 03:11:31 +00:00
/**
* electron-builder doesn't look for the APPLE_TEAM_ID environment variable for some reason.
* This workaround allows an environment variable to be added to the electron-builder.yml config
* collection. See: https://github.com/electron-userland/electron-builder/issues/7812
*/
2024-01-25 03:03:04 +00:00
const dirname = path.dirname(fileURLToPath(import.meta.url));
// const root = path.join(dirname, '..', '..');
const root = dirname; // redundant, but is meant to keep with the previous line
const buildDirPath = path.join(root, 'dist_electron', 'build');
const packageDirPath = path.join(root, 'dist_electron', 'bundled');
const frappeBooksConfig = {
2024-01-25 03:11:31 +00:00
productName: 'Frappe Books',
appId: 'io.frappe.books',
asarUnpack: '**/*.node',
2024-01-25 03:03:04 +00:00
extraResources: [
{ from: 'log_creds.txt', to: '../creds/log_creds.txt' },
{ from: 'translations', to: '../translations' },
{ from: 'templates', to: '../templates' },
],
files: '**',
extends: null,
directories: {
output: packageDirPath,
app: buildDirPath,
},
2024-01-25 03:03:04 +00:00
mac: {
2024-01-25 03:11:31 +00:00
type: 'distribution',
category: 'public.app-category.finance',
icon: 'build/icon.icns',
2024-01-25 03:03:04 +00:00
notarize: {
2024-01-25 03:11:31 +00:00
teamId: process.env.APPLE_TEAM_ID || '',
2024-01-25 03:03:04 +00:00
},
hardenedRuntime: true,
gatekeeperAssess: false,
darkModeSupport: false,
2024-01-25 03:11:31 +00:00
entitlements: 'build/entitlements.mac.plist',
entitlementsInherit: 'build/entitlements.mac.plist',
publish: ['github'],
2024-01-25 03:03:04 +00:00
},
win: {
2024-01-25 03:11:31 +00:00
publisherName: 'Frappe Technologies Pvt. Ltd.',
2024-01-25 03:03:04 +00:00
signDlls: true,
2024-01-25 03:11:31 +00:00
icon: 'build/icon.ico',
publish: ['github'],
target: ['nsis', 'portable'],
2024-01-25 03:03:04 +00:00
},
nsis: {
oneClick: false,
perMachine: false,
allowToChangeInstallationDirectory: true,
2024-01-25 03:11:31 +00:00
installerIcon: 'build/installericon.ico',
uninstallerIcon: 'build/uninstallericon.ico',
publish: ['github'],
2024-01-25 03:03:04 +00:00
},
linux: {
2024-01-25 03:11:31 +00:00
icon: 'build/icons',
category: 'Finance',
publish: ['github'],
target: ['deb', 'AppImage', 'rpm'],
},
2024-01-25 03:03:04 +00:00
};
2024-02-12 00:09:35 +00:00
export default frappeBooksConfig;