Repository navigation
Expand file tree
/
Copy pathelectron-builder.yml
More file actions
123 lines (111 loc) · 4.99 KB
/
Copy pathelectron-builder.yml
File metadata and controls
123 lines (111 loc) · 4.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Packaging for the desktop build. Kept in its own file so package.json stays a
# library manifest — in particular `main` there must keep pointing at index.js
# for `import ... from "brepscript"`, so the Electron entry is injected via
# extraMetadata below rather than by editing it.
appId: com.randotechnerd.brepcode
productName: BREPcode
copyright: MIT — bundles the BREP.io kernel unmodified, see LICENSE.md
directories:
output: dist-desktop
buildResources: desktop
# Only the shell and the already-built static bundle. node_modules is
# deliberately absent: dist-site is self-contained (build-site.mjs inlines the
# kernel and vendor files), so shipping them twice would double the download.
files:
- desktop/**/*
- dist-site/**/*
- LICENSE.md
- package.json
# electron-builder bundles production dependencies by default, which here
# meant shipping three/replicad/the kernel a SECOND time — 11k files and
# ~330MB of asar that nothing loads, because dist-site already vendors
# everything it needs and main.cjs only uses electron + node builtins.
- "!node_modules/**/*"
# ...with one exception: SMTP needs a real client, and nodemailer is the only
# dependency the main process actually loads. It has no dependencies of its
# own, so this pulls in ~670KB and nothing else.
- node_modules/nodemailer/**/*
# The Rust kernel compiled to native code (rust/brepcode-native), loaded by
# desktop/kernel-host.cjs. The website never sees it; it keeps the wasm.
- vendor/brep-kernel-native/brepcode_native.node
# NVIDIA's SMLib kernel (native/nvidia-kernel), alpha builds only: the
# standard build runs `build-nvidia.mjs --clean` first, so the addon is
# absent and the app is exactly the Rust-kernel BREPcode it always was.
- native/nvidia-kernel/adapter.cjs
- vendor/brep-kernel-nvidia/brepcode_nvidia.node
# Apache-2.0: the licence and NVIDIA's notices travel with the binary
- native/nvidia-kernel/upstream/LICENSE
- native/nvidia-kernel/upstream/THIRD_PARTY_NOTICES.md
# A native addon can't be loaded out of an archive: Windows needs a real file
# to map. Electron redirects the require() to app.asar.unpacked by itself.
asarUnpack:
- vendor/brep-kernel-native/*.node
- vendor/brep-kernel-nvidia/*.node
# The MCP server an outside AI runs to drive this window. It must be a real
# file on disk, not inside the asar: MCP clients spawn it with their own node,
# which cannot read an archive. Lands in resources/agent/mcp-server.mjs.
extraResources:
- from: agent
to: agent
filter: ["**/*.mjs"]
extraMetadata:
main: desktop/main.cjs
# .bcode is the project file — the model itself rather than a mesh of it.
#
# NOTE this only takes effect for an INSTALLER target. A portable exe has no
# installer, so nothing writes the registry keys and Windows will not offer
# BREPcode on its own. What does work today, and what main.cjs is wired for, is
# the manual route: right-click a .bcode -> Open with -> Choose another app ->
# Browse to BREPcode.exe -> "Always use this app". Windows remembers it, and
# the app reads the path out of argv and opens the model. Add an `nsis` target
# and this block registers the type properly.
fileAssociations:
- ext: bcode
name: BREPcode model
description: An editable, parametric BREPcode model
role: Editor
icon: desktop/icon.png
# Nothing here is asar-hostile, and packing keeps the install small and the
# file count sane.
asar: true
win:
icon: desktop/icon.png
target:
- target: portable
arch: [x64]
# A single self-contained exe, no installer, no admin rights — the least
# confusing thing to hand someone from a GitHub release.
portable:
artifactName: BREPcode.exe
unicode: true
# Apple Silicon. Ad-hoc signed ("-"), not Developer ID signed: Apple Silicon
# refuses to run code with NO signature, and a downloaded unsigned app is
# reported as "damaged and can't be opened". Ad-hoc needs no Apple account;
# the first launch is still right-click -> Open (Gatekeeper doesn't know the
# signer). Hardened runtime off: it needs entitlements (JIT) to run Electron.
# The productName in the file name tells the standard build (BREPcode) from
# the alpha (BREPcode Alpha), which installs alongside it under its own appId.
mac:
icon: desktop/icon.png
category: public.app-category.graphics-design
identity: "-"
hardenedRuntime: false
target:
- target: dmg
arch: [arm64]
artifactName: ${productName}-${version}-mac-${arch}.${ext}
dmg:
title: ${productName}
# Linux: one AppImage per arch, the Linux counterpart of the portable exe (no
# install, no root: chmod +x and run). glibc 2.31+ (Ubuntu 20.04 and newer),
# set by the runner it is built on. Built on CI (ubuntu runners), not here.
# x64 only for now: the native Rust kernel is compiled for the runner's own
# arch, so an arm64 AppImage would carry an x64 addon.
linux:
icon: desktop/icon.png
category: Graphics
synopsis: Code-CAD with an exact B-rep kernel
target:
- target: AppImage
arch: [x64]
artifactName: ${productName}-${version}-linux-${arch}.${ext}