feat(licenses): ship LICENSE and the third-party notices with every installer
build-sidecar.mjs copies LICENSE and THIRD_PARTY_NOTICES.md from the repository root next to service.js in app/src-tauri/resources, and fails when either is missing. The resources/* glob of tauri.conf.json bundles them into every desktop installer, and build-server-archive.mjs refuses a payload without them, so the server archive carries them too. The copies are ignored by git. Tests cover the copy, the archive and the ignore rule.
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
*
|
||||
* The archive holds the same sidecar payload the desktop app ships, staged by
|
||||
* bundle-node, build-sidecar, bundle-native-deps and stage-sidecar-deps into
|
||||
* app/src-tauri/resources, plus the built web UI under web/ and a
|
||||
* manifest.json. Run it after those steps and the web build, on the system
|
||||
* app/src-tauri/resources (with LICENSE and THIRD_PARTY_NOTICES.md next to
|
||||
* service.js), plus the built web UI under web/ and a manifest.json. Run it after those steps and the web build, on the system
|
||||
* the archive is for.
|
||||
*
|
||||
* Usage:
|
||||
@@ -78,6 +78,9 @@ try {
|
||||
requireFile(path.join(options.resources, nodeName), stageHint);
|
||||
requireFile(path.join(options.resources, 'service.js'), stageHint);
|
||||
requireFile(path.join(options.resources, 'node_modules'), stageHint);
|
||||
// The license and the third-party notices must ship with the archive.
|
||||
requireFile(path.join(options.resources, 'LICENSE'), stageHint);
|
||||
requireFile(path.join(options.resources, 'THIRD_PARTY_NOTICES.md'), stageHint);
|
||||
requireFile(path.join(options.web, 'index.html'), 'Build the web UI first: cd apps/web && npx vite build');
|
||||
|
||||
let nodeVersion = options.nodeVersion;
|
||||
|
||||
Reference in New Issue
Block a user