Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions .github/workflows/tauri-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,17 +234,10 @@ jobs:
done

# --- Linux: CEF runtime, packaged as deb / rpm / AppImage ---
- name: Build frontend
if: matrix.cef
shell: bash
run: pnpm build

- name: Build CEF binary
if: matrix.cef
shell: bash
run: |
cargo build --release --features cef --no-default-features \
--manifest-path src-tauri/Cargo.toml
run: pnpm tauri:cef build

- name: Build native packages
if: matrix.cef
Expand Down
25 changes: 7 additions & 18 deletions scripts/tauri.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
* Examples:
* script/tauri cef dev --verbose
* script/tauri cef dev -- --verbose
* Both will run: cargo tauri dev --features cef -- --verbose --no-default-features
* Both will run: tauri dev --features cef -- --verbose --no-default-features
*/

import { spawn } from 'child_process';
import { run } from '@tauri-apps/cli';
import { fileURLToPath } from 'url';
import { dirname, join } from 'path';
import process from 'node:process';
Expand All @@ -21,7 +21,7 @@
const logger = new PrefixedLogger('[tauri]');
const { dim } = createTextHelpers({ useColor: logger.useColor });

const __filename = fileURLToPath(import.meta.url);

Check warning on line 24 in scripts/tauri.js

View workflow job for this annotation

GitHub Actions / Lint

eslint(no-underscore-dangle)

Unexpected dangling '_' in '`__filename`'.

Check warning on line 24 in scripts/tauri.js

View workflow job for this annotation

GitHub Actions / Lint

eslint(no-underscore-dangle)

Unexpected dangling '_' in '`__filename`'.
const __dirname = dirname(__filename);

const cmdlineArgs = process.argv.slice(2);
Expand Down Expand Up @@ -57,24 +57,13 @@
}
tauriArgs.push('--no-default-features');

const args = ['tauri', cmd, ...tauriArgs];
const args = [cmd, ...tauriArgs];

const command = 'cargo';
process.chdir(join(__dirname, '..'));

logger.info(`${dim('Running:')} ${command} ${args.join(' ')}`);
logger.info(`${dim('Running:')} tauri ${args.join(' ')}`);

// Spawn the tauri process
const proc = spawn(command, args, {
stdio: 'inherit',
shell: false,
cwd: join(__dirname, '..'),
});

proc.on('error', (error) => {
logger.error(`Failed to start process: ${error.message}`);
run(args, 'tauri').catch((error) => {
logger.error(`Failed to run tauri: ${error?.message ?? error}`);
process.exit(1);
});

proc.on('exit', (code) => {
process.exit(code ?? 0);
});
Loading