diff --git a/Makefile b/Makefile index 319e183..ab543c0 100644 --- a/Makefile +++ b/Makefile @@ -138,6 +138,7 @@ package-windows: --fonts macos linux run-pw: + make build-launcher arch=x86_64 os=linux; python3 scripts/run-pw.py \ --version $(version) \ --release $(release) @@ -145,4 +146,4 @@ run-pw: run: cd $(cf_source_dir) && rm -rf ~/.camoufox && ./mach run -vcredist_arch := $(shell echo $(arch) | sed 's/x86_64/x64/' | sed 's/i686/x86/') \ No newline at end of file +vcredist_arch := $(shell echo $(arch) | sed 's/x86_64/x64/' | sed 's/i686/x86/') diff --git a/scripts/run-pw.py b/scripts/run-pw.py index 77a3d13..bc0e046 100644 --- a/scripts/run-pw.py +++ b/scripts/run-pw.py @@ -1,5 +1,6 @@ import argparse import os +import shutil import time 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) 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): print(f'Looking for file: obj-{moz_target}/dist/bin/camoufox-bin') with temp_cd(f'obj-{moz_target}/dist/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'): + # Or else just use firefox-bin file_name = 'firefox-bin' else: raise FileNotFoundError(f'Binary not found: obj-{moz_target}/dist/bin')