[tauri] TauriPlatforms: The shell around the built game, the Android privacy patch, the shell build of the game, and the device check
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
/** Runs the Tauri CLI of this package, in this package's folder, and stops the script if it fails. */
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { dirname, join } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
export const PACKAGE = join(dirname(fileURLToPath(import.meta.url)), '..');
|
||||
export const SRC_TAURI = join(PACKAGE, 'src-tauri');
|
||||
|
||||
export function tauri(...args: string[]): void {
|
||||
const run = spawnSync('pnpm', ['exec', 'tauri', ...args], {
|
||||
cwd: PACKAGE,
|
||||
stdio: 'inherit',
|
||||
shell: process.platform === 'win32'
|
||||
});
|
||||
if (run.status !== 0) {
|
||||
console.error(`tauri ${args.join(' ')} failed (exit ${String(run.status ?? run.signal)})`);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user