spacedrive/apps/desktop/src-tauri/build.js
Oscar Beaumont 58aa3b7a0c DMG background
We are using the background designed by @ParthJadhav with a few modifications by me for sizing.

Co-authored-by: Parth Jadhav <jadhavparth99@gmail.com>
2023-01-04 00:39:31 +08:00

14 lines
641 B
JavaScript

const path = require('path');
const { spawn } = require('child_process');
process.env.BACKGROUND_FILE = path.join(__dirname, './dmg-background.png');
process.env.BACKGROUND_FILE_NAME = path.basename(process.env.BACKGROUND_FILE);
process.env.BACKGROUND_CLAUSE = `set background picture of opts to file ".background:${process.env.BACKGROUND_FILE_NAME}"`;
const child = spawn('pnpm', ['exec', 'tauri', 'build']);
child.stdout.on('data', (data) => console.log(data.toString()));
child.stderr.on('data', (data) => console.error(data.toString()));
child.on('exit', (code) => {
if (code !== 0) console.log(`Child exited with code ${code}`);
});