mirror of
https://forge.fsky.io/oneflux/omegafox.git
synced 2026-02-11 00:42:05 -08:00
Makefile: run-pw with launcher
Build and copy the launcher when testing Playwright
This commit is contained in:
parent
0be654bbe9
commit
ad87cec317
2 changed files with 9 additions and 2 deletions
1
Makefile
1
Makefile
|
|
@ -138,6 +138,7 @@ package-windows:
|
||||||
--fonts macos linux
|
--fonts macos linux
|
||||||
|
|
||||||
run-pw:
|
run-pw:
|
||||||
|
make build-launcher arch=x86_64 os=linux;
|
||||||
python3 scripts/run-pw.py \
|
python3 scripts/run-pw.py \
|
||||||
--version $(version) \
|
--version $(version) \
|
||||||
--release $(release)
|
--release $(release)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from _mixin import find_src_dir, get_moz_target, temp_cd
|
from _mixin import find_src_dir, get_moz_target, temp_cd
|
||||||
|
|
@ -39,12 +40,17 @@ def main():
|
||||||
src_dir = find_src_dir('.', args.version, args.release)
|
src_dir = find_src_dir('.', args.version, args.release)
|
||||||
moz_target = get_moz_target(target='linux', arch='x86_64')
|
moz_target = get_moz_target(target='linux', arch='x86_64')
|
||||||
|
|
||||||
|
launcher_path = os.path.abspath(os.path.join('.', 'launcher', 'dist', 'launch'))
|
||||||
|
|
||||||
with temp_cd(src_dir):
|
with temp_cd(src_dir):
|
||||||
print(f'Looking for file: obj-{moz_target}/dist/bin/camoufox-bin')
|
print(f'Looking for file: obj-{moz_target}/dist/bin/camoufox-bin')
|
||||||
with temp_cd(f'obj-{moz_target}/dist/bin'):
|
with temp_cd(f'obj-{moz_target}/dist/bin'):
|
||||||
if os.path.exists('camoufox-bin'):
|
if os.path.exists('camoufox-bin'):
|
||||||
file_name = 'camoufox-bin'
|
# Copy launcher_path to . if we are using camoufox-bin
|
||||||
|
shutil.copy(launcher_path, '.')
|
||||||
|
file_name = 'launch'
|
||||||
elif os.path.exists('firefox-bin'):
|
elif os.path.exists('firefox-bin'):
|
||||||
|
# Or else just use firefox-bin
|
||||||
file_name = 'firefox-bin'
|
file_name = 'firefox-bin'
|
||||||
else:
|
else:
|
||||||
raise FileNotFoundError(f'Binary not found: obj-{moz_target}/dist/bin')
|
raise FileNotFoundError(f'Binary not found: obj-{moz_target}/dist/bin')
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue