mirror of
https://github.com/frida/frida-node.git
synced 2026-11-07 09:35:57 -10:00
meson: Simplify script execution
- Let Meson's find_program() do the heavy lifting. - Make scripts executable. - Add shebang to scripts.
This commit is contained in:
1 parent
1aff21e8cc
commit
64a4daece7
7 files changed
+11
-9
No files matched your search
+1
-1
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
|
||||
+1
-2
@@ -38,8 +38,7 @@ custom_target('js',
|
||||
input: sources,
|
||||
output: outputs,
|
||||
command: [
|
||||
python,
|
||||
files('build.py'),
|
||||
find_program('build.py'),
|
||||
'@OUTDIR@',
|
||||
'@PRIVATE_DIR@',
|
||||
npm,
|
||||
|
||||
+3
-6
@@ -4,10 +4,8 @@ project('frida-node', 'cpp',
|
||||
|
||||
node = find_program('node')
|
||||
npm = find_program('npm')
|
||||
python = import('python').find_installation()
|
||||
|
||||
version = run_command(python, files('scripts' / 'detect-version.py'),
|
||||
files('package.json'),
|
||||
version = run_command(find_program('scripts' / 'detect-version.py'), files('package.json'),
|
||||
capture: true,
|
||||
check: true,
|
||||
).stdout().strip()
|
||||
@@ -51,7 +49,7 @@ else
|
||||
endif
|
||||
|
||||
message('Fetching ABI bits')
|
||||
metadata = run_command(python, files('scripts' / 'fetch-abi-bits.py'),
|
||||
metadata = run_command(find_program('scripts' / 'fetch-abi-bits.py'),
|
||||
runtime, target, gyp_os, gyp_arch,
|
||||
node, npm, meson.current_build_dir(),
|
||||
capture: true,
|
||||
@@ -135,8 +133,7 @@ custom_target('prebuild',
|
||||
input: [binding],
|
||||
output: [f'frida-v@version@-@runtime@-v@abi@-@node_platform@-@[email protected]'],
|
||||
command: [
|
||||
python,
|
||||
files('scripts' / 'package.py'),
|
||||
find_program('scripts' / 'package.py'),
|
||||
'@INPUT@',
|
||||
'@OUTPUT@',
|
||||
],
|
||||
|
||||
Regular → Executable
+2
@@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import json
|
||||
from pathlib import Path
|
||||
import sys
|
||||
|
||||
Regular → Executable
+2
@@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from dataclasses import dataclass
|
||||
from io import BytesIO
|
||||
import json
|
||||
|
||||
Regular → Executable
+2
@@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const { execSync } = require('child_process');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
Regular → Executable
File mode changed.
Reference in new issue
Block a user