mirror of
https://forge.fsky.io/oneflux/omegafox.git
synced 2026-02-10 21:32:05 -08:00
Update Makefile & add navigation debugging
This commit is contained in:
parent
2101330754
commit
595828a446
3 changed files with 65 additions and 4 deletions
40
Makefile
40
Makefile
|
|
@ -8,7 +8,7 @@ debs := python3 python3-dev python3-pip p7zip-full golang-go msitools wget aria2
|
||||||
rpms := python3 python3-devel p7zip golang msitools wget aria2
|
rpms := python3 python3-devel p7zip golang msitools wget aria2
|
||||||
pacman := python python-pip p7zip go msitools wget aria2
|
pacman := python python-pip p7zip go msitools wget aria2
|
||||||
|
|
||||||
.PHONY: help fetch setup setup-minimal clean set-target distclean build package build-launcher check-arch revert edits run bootstrap mozbootstrap dir package-linux package-macos package-windows vcredist_arch
|
.PHONY: help fetch setup setup-minimal clean set-target distclean build package build-launcher check-arch revert edits run bootstrap mozbootstrap dir package-linux package-macos package-windows vcredist_arch patch unpatch workspace check-arg
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo "Available targets:"
|
@echo "Available targets:"
|
||||||
|
|
@ -28,6 +28,12 @@ help:
|
||||||
@echo " package-macos - Package Camoufox for macOS"
|
@echo " package-macos - Package Camoufox for macOS"
|
||||||
@echo " package-windows - Package Camoufox for Windows"
|
@echo " package-windows - Package Camoufox for Windows"
|
||||||
@echo " run - Run Camoufox"
|
@echo " run - Run Camoufox"
|
||||||
|
@echo " patch - Apply a patch"
|
||||||
|
@echo " unpatch - Remove a patch"
|
||||||
|
@echo " workspace - Sets the workspace to a patch, assuming its applied"
|
||||||
|
|
||||||
|
_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
||||||
|
$(eval $(_ARGS):;@:)
|
||||||
|
|
||||||
fetch:
|
fetch:
|
||||||
aria2c -x16 -s16 -k1M -o $(ff_source_tarball) "https://archive.mozilla.org/pub/firefox/releases/$(version)/source/firefox-$(version).source.tar.xz"; \
|
aria2c -x16 -s16 -k1M -o $(ff_source_tarball) "https://archive.mozilla.org/pub/firefox/releases/$(version)/source/firefox-$(version).source.tar.xz"; \
|
||||||
|
|
@ -77,7 +83,7 @@ diff:
|
||||||
@cd $(cf_source_dir) && git diff
|
@cd $(cf_source_dir) && git diff
|
||||||
|
|
||||||
checkpoint:
|
checkpoint:
|
||||||
cd $(cf_source_dir) && git commit -m "Checkpoint" -a
|
cd $(cf_source_dir) && git commit -m "Checkpoint" -a -uno
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
cd $(cf_source_dir) && git clean -fdx && ./mach clobber
|
cd $(cf_source_dir) && git clean -fdx && ./mach clobber
|
||||||
|
|
@ -153,6 +159,34 @@ run-pw:
|
||||||
--release $(release)
|
--release $(release)
|
||||||
|
|
||||||
run:
|
run:
|
||||||
cd $(cf_source_dir) && rm -rf ~/.camoufox && ./mach run
|
CAMOU_CONFIG='{"debug": true}' \
|
||||||
|
cd $(cf_source_dir) \
|
||||||
|
&& rm -rf ~/.camoufox $(cf_source_dir)/obj-x86_64-pc-linux-gnu/tmp/profile-default \
|
||||||
|
&& ./mach run $(args)
|
||||||
|
|
||||||
|
check-arg:
|
||||||
|
@if [ -z "$(_ARGS)" ]; then \
|
||||||
|
echo "Error: No file specified. Usage: make <command> ./patches/file.patch"; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
patch:
|
||||||
|
@make check-arg $(_ARGS);
|
||||||
|
cd $(cf_source_dir) && patch -p1 -i ../$(_ARGS)
|
||||||
|
|
||||||
|
unpatch:
|
||||||
|
@make check-arg $(_ARGS);
|
||||||
|
cd $(cf_source_dir) && patch -p1 -R -i ../$(_ARGS)
|
||||||
|
|
||||||
|
workspace:
|
||||||
|
@make check-arg $(_ARGS);
|
||||||
|
@if (cd $(cf_source_dir) && patch -p1 -R --dry-run --force -i ../$(_ARGS)) > /dev/null 2>&1; then \
|
||||||
|
echo "Patch is already applied. Unapplying..."; \
|
||||||
|
make unpatch $(_ARGS); \
|
||||||
|
else \
|
||||||
|
echo "Patch is not applied. Proceeding with application..."; \
|
||||||
|
fi
|
||||||
|
make checkpoint || true
|
||||||
|
make patch $(_ARGS)
|
||||||
|
|
||||||
vcredist_arch := $(shell echo $(arch) | sed 's/x86_64/x64/' | sed 's/i686/x86/')
|
vcredist_arch := $(shell echo $(arch) | sed 's/x86_64/x64/' | sed 's/i686/x86/')
|
||||||
|
|
|
||||||
26
patches/debug-url-navigation.patch
Normal file
26
patches/debug-url-navigation.patch
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
diff --git a/browser/base/content/browser-init.js b/browser/base/content/browser-init.js
|
||||||
|
index cc7fa914c0..760a95487e 100644
|
||||||
|
--- a/browser/base/content/browser-init.js
|
||||||
|
+++ b/browser/base/content/browser-init.js
|
||||||
|
@@ -257,6 +257,21 @@ var gBrowserInit = {
|
||||||
|
// Update UI if browser is under remote control.
|
||||||
|
gRemoteControl.updateVisualCue();
|
||||||
|
|
||||||
|
+ // Camoufox: print URL changes to console
|
||||||
|
+ if (ChromeUtils.isCamouDebug()) {
|
||||||
|
+ gBrowser.addTabsProgressListener({
|
||||||
|
+ onLocationChange(aBrowser, aWebProgress, aRequest, aLocation, aFlags) {
|
||||||
|
+ if (aBrowser === gBrowser.selectedBrowser) {
|
||||||
|
+ ChromeUtils.camouDebug("URL changed to: " + aLocation.spec);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ });
|
||||||
|
+
|
||||||
|
+ gURLBar.addEventListener("change", () => {
|
||||||
|
+ ChromeUtils.camouDebug("URL bar value changed to: " + gURLBar.value);
|
||||||
|
+ });
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
// If we are given a tab to swap in, take care of it before first paint to
|
||||||
|
// avoid an about:blank flash.
|
||||||
|
let tabToAdopt = this.getTabToAdopt();
|
||||||
|
|
@ -64,5 +64,6 @@
|
||||||
{ "property": "locale:script", "type": "str" },
|
{ "property": "locale:script", "type": "str" },
|
||||||
{ "property": "humanize", "type": "bool" },
|
{ "property": "humanize", "type": "bool" },
|
||||||
{ "property": "humanize:maxTime", "type": "double" },
|
{ "property": "humanize:maxTime", "type": "double" },
|
||||||
{ "property": "showcursor", "type": "bool" }
|
{ "property": "showcursor", "type": "bool" },
|
||||||
|
{ "property": "debug", "type": "bool" }
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue