mirror of
https://forge.fsky.io/oneflux/omegafox.git
synced 2026-02-10 06:42:04 -08:00
update branding
This commit is contained in:
parent
e1fe519a7e
commit
9cda17c3f2
30 changed files with 118 additions and 118 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,5 +1,5 @@
|
||||||
# Local builds
|
# Local builds
|
||||||
/camoufox-*
|
/omegafox-*
|
||||||
/firefox-*
|
/firefox-*
|
||||||
/mozilla-unified
|
/mozilla-unified
|
||||||
dist/
|
dist/
|
||||||
|
|
|
||||||
32
Makefile
32
Makefile
|
|
@ -1,7 +1,7 @@
|
||||||
include upstream.sh
|
include upstream.sh
|
||||||
export
|
export
|
||||||
|
|
||||||
cf_source_dir := camoufox-$(version)-$(release)
|
cf_source_dir := omegafox-$(version)-$(release)
|
||||||
ff_source_tarball := firefox-$(version).source.tar.xz
|
ff_source_tarball := firefox-$(version).source.tar.xz
|
||||||
|
|
||||||
debs := python3 python3-dev python3-pip p7zip-full golang-go msitools wget aria2
|
debs := python3 python3-dev python3-pip p7zip-full golang-go msitools wget aria2
|
||||||
|
|
@ -31,7 +31,7 @@ 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 " edit-cfg - Edit camoufox.cfg"
|
@echo " edit-cfg - Edit omegafox.cfg"
|
||||||
@echo " ff-dbg - Setup vanilla Firefox with minimal patches"
|
@echo " ff-dbg - Setup vanilla Firefox with minimal patches"
|
||||||
@echo " patch - Apply a patch"
|
@echo " patch - Apply a patch"
|
||||||
@echo " unpatch - Remove a patch"
|
@echo " unpatch - Remove a patch"
|
||||||
|
|
@ -88,7 +88,7 @@ ff-dbg: setup
|
||||||
# Only apply patches to help debug vanilla Firefox
|
# Only apply patches to help debug vanilla Firefox
|
||||||
make patch ./patches/chromeutil.patch
|
make patch ./patches/chromeutil.patch
|
||||||
make patch ./patches/browser-init.patch
|
make patch ./patches/browser-init.patch
|
||||||
echo "LOCAL_INCLUDES += ['/camoucfg']" >> $(cf_source_dir)/dom/base/moz.build
|
echo "LOCAL_INCLUDES += ['/omegacfg']" >> $(cf_source_dir)/dom/base/moz.build
|
||||||
touch $(cf_source_dir)/_READY
|
touch $(cf_source_dir)/_READY
|
||||||
make checkpoint
|
make checkpoint
|
||||||
make build
|
make build
|
||||||
|
|
@ -147,7 +147,7 @@ build-launcher: check-arch
|
||||||
package-linux:
|
package-linux:
|
||||||
python3 scripts/package.py linux \
|
python3 scripts/package.py linux \
|
||||||
--includes \
|
--includes \
|
||||||
settings/camoucfg.jvv \
|
settings/omegacfg.jvv \
|
||||||
settings/properties.json \
|
settings/properties.json \
|
||||||
bundle/fontconfigs \
|
bundle/fontconfigs \
|
||||||
--version $(version) \
|
--version $(version) \
|
||||||
|
|
@ -158,7 +158,7 @@ package-linux:
|
||||||
package-macos:
|
package-macos:
|
||||||
python3 scripts/package.py macos \
|
python3 scripts/package.py macos \
|
||||||
--includes \
|
--includes \
|
||||||
settings/camoucfg.jvv \
|
settings/omegacfg.jvv \
|
||||||
settings/properties.json \
|
settings/properties.json \
|
||||||
--version $(version) \
|
--version $(version) \
|
||||||
--release $(release) \
|
--release $(release) \
|
||||||
|
|
@ -168,7 +168,7 @@ package-macos:
|
||||||
package-windows:
|
package-windows:
|
||||||
python3 scripts/package.py windows \
|
python3 scripts/package.py windows \
|
||||||
--includes \
|
--includes \
|
||||||
settings/camoucfg.jvv \
|
settings/omegacfg.jvv \
|
||||||
settings/properties.json \
|
settings/properties.json \
|
||||||
~/.mozbuild/vs/VC/Redist/MSVC/14.38.33135/$(vcredist_arch)/Microsoft.VC143.CRT/*.dll \
|
~/.mozbuild/vs/VC/Redist/MSVC/14.38.33135/$(vcredist_arch)/Microsoft.VC143.CRT/*.dll \
|
||||||
--version $(version) \
|
--version $(version) \
|
||||||
|
|
@ -191,16 +191,16 @@ run-pw:
|
||||||
|
|
||||||
run:
|
run:
|
||||||
cd $(cf_source_dir) \
|
cd $(cf_source_dir) \
|
||||||
&& rm -rf ~/.camoufox obj-x86_64-pc-linux-gnu/tmp/profile-default \
|
&& rm -rf ~/.omegafox obj-x86_64-pc-linux-gnu/tmp/profile-default \
|
||||||
&& CAMOU_CONFIG=$${CAMOU_CONFIG:-'{}'} \
|
&& CAMOU_CONFIG=$${CAMOU_CONFIG:-'{}'} \
|
||||||
&& CAMOU_CONFIG="$${CAMOU_CONFIG%?}, \"debug\": true}" ./mach run $(args)
|
&& CAMOU_CONFIG="$${CAMOU_CONFIG%?}, \"debug\": true}" ./mach run $(args)
|
||||||
|
|
||||||
edit-cfg:
|
edit-cfg:
|
||||||
@if [ ! -f $(cf_source_dir)/obj-x86_64-pc-linux-gnu/dist/bin/camoufox.cfg ]; then \
|
@if [ ! -f $(cf_source_dir)/obj-x86_64-pc-linux-gnu/dist/bin/omegafox.cfg ]; then \
|
||||||
echo "Error: camoufox.cfg not found. Apply config.patch first."; \
|
echo "Error: omegafox.cfg not found. Apply config.patch first."; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
$(EDITOR) $(cf_source_dir)/obj-x86_64-pc-linux-gnu/dist/bin/camoufox.cfg
|
$(EDITOR) $(cf_source_dir)/obj-x86_64-pc-linux-gnu/dist/bin/omegafox.cfg
|
||||||
|
|
||||||
check-arg:
|
check-arg:
|
||||||
@if [ -z "$(_ARGS)" ]; then \
|
@if [ -z "$(_ARGS)" ]; then \
|
||||||
|
|
@ -231,12 +231,12 @@ workspace:
|
||||||
make patch $(_ARGS)
|
make patch $(_ARGS)
|
||||||
|
|
||||||
unbusy:
|
unbusy:
|
||||||
rm -rf $(cf_source_dir)/obj-x86_64-pc-linux-gnu/dist/bin/camoufox-bin \
|
rm -rf $(cf_source_dir)/obj-x86_64-pc-linux-gnu/dist/bin/omegafox-bin \
|
||||||
$(cf_source_dir)/obj-x86_64-pc-linux-gnu/dist/bin/camoufox \
|
$(cf_source_dir)/obj-x86_64-pc-linux-gnu/dist/bin/omegafox \
|
||||||
$(cf_source_dir)/obj-x86_64-pc-linux-gnu/dist/bin/launch
|
$(cf_source_dir)/obj-x86_64-pc-linux-gnu/dist/bin/launch
|
||||||
|
|
||||||
path:
|
path:
|
||||||
@realpath $(cf_source_dir)/obj-x86_64-pc-linux-gnu/dist/bin/camoufox-bin
|
@realpath $(cf_source_dir)/obj-x86_64-pc-linux-gnu/dist/bin/omegafox-bin
|
||||||
|
|
||||||
upload:
|
upload:
|
||||||
# ===============================
|
# ===============================
|
||||||
|
|
@ -244,8 +244,8 @@ upload:
|
||||||
# ===============================
|
# ===============================
|
||||||
|
|
||||||
@test -f .passwd || { echo "Error: .passwd file not found"; exit 1; }
|
@test -f .passwd || { echo "Error: .passwd file not found"; exit 1; }
|
||||||
@mkdir -p ../camoufox-web/internal
|
@mkdir -p ../omegafox-web/internal
|
||||||
@rm -rf ../camoufox-web/pipeline/rev-$(closedsrc_rev).7z
|
@rm -rf ../omegafox-web/pipeline/rev-$(closedsrc_rev).7z
|
||||||
7z a "-p$$(cat ./.passwd)" -mhe=on ../camoufox-web/pipeline/rev-$(closedsrc_rev).7z "./patches/private/*.patch"
|
7z a "-p$$(cat ./.passwd)" -mhe=on ../omegafox-web/pipeline/rev-$(closedsrc_rev).7z "./patches/private/*.patch"
|
||||||
|
|
||||||
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/')
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ EXPORTS += [
|
||||||
]
|
]
|
||||||
|
|
||||||
LOCAL_INCLUDES += [
|
LOCAL_INCLUDES += [
|
||||||
"/camoucfg",
|
"/omegacfg",
|
||||||
]
|
]
|
||||||
|
|
||||||
FINAL_LIBRARY = "xul"
|
FINAL_LIBRARY = "xul"
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
"""
|
"""
|
||||||
Easy build CLI for Camoufox
|
Easy build CLI for Omegafox
|
||||||
|
|
||||||
options:
|
options:
|
||||||
-h, --help show this help message and exit
|
-h, --help show this help message and exit
|
||||||
|
|
@ -13,7 +13,7 @@ options:
|
||||||
Example:
|
Example:
|
||||||
$ python3 multibuild.py --target linux windows macos --arch x86_64 arm64
|
$ python3 multibuild.py --target linux windows macos --arch x86_64 arm64
|
||||||
|
|
||||||
Since Camoufox is NOT meant to be used as a daily driver, no installers are provided.
|
Since Omegafox is NOT meant to be used as a daily driver, no installers are provided.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
@ -49,12 +49,12 @@ class BSYS:
|
||||||
run('make bootstrap')
|
run('make bootstrap')
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
"""Build the Camoufox source code"""
|
"""Build the Omegafox source code"""
|
||||||
os.environ['BUILD_TARGET'] = f'{self.target},{self.arch}'
|
os.environ['BUILD_TARGET'] = f'{self.target},{self.arch}'
|
||||||
run('make build')
|
run('make build')
|
||||||
|
|
||||||
def package(self):
|
def package(self):
|
||||||
"""Package the Camoufox source code"""
|
"""Package the Omegafox source code"""
|
||||||
run(f'make package-{self.target} arch={self.arch}')
|
run(f'make package-{self.target} arch={self.arch}')
|
||||||
|
|
||||||
def update_target(self):
|
def update_target(self):
|
||||||
|
|
@ -65,12 +65,12 @@ class BSYS:
|
||||||
@property
|
@property
|
||||||
def assets(self) -> List[str]:
|
def assets(self) -> List[str]:
|
||||||
"""Get the list of assets"""
|
"""Get the list of assets"""
|
||||||
package_pattern = f'camoufox-*-{self.target[:3]}.{self.arch}.zip'
|
package_pattern = f'omegafox-*-{self.target[:3]}.{self.arch}.zip'
|
||||||
return glob.glob(package_pattern)
|
return glob.glob(package_pattern)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def clean():
|
def clean():
|
||||||
"""Clean the Camoufox directory"""
|
"""Clean the Omegafox directory"""
|
||||||
run('make clean')
|
run('make clean')
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -91,7 +91,7 @@ def run_build(target, arch):
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(description="Easy build CLI for Camoufox")
|
parser = argparse.ArgumentParser(description="Easy build CLI for Omegafox")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--target",
|
"--target",
|
||||||
choices=AVAILABLE_TARGETS,
|
choices=AVAILABLE_TARGETS,
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ index 21063575d7..9e7c9f3e84 100644
|
||||||
|
|
||||||
FINAL_LIBRARY = "xul"
|
FINAL_LIBRARY = "xul"
|
||||||
+# DOM Mask
|
+# DOM Mask
|
||||||
+LOCAL_INCLUDES += ["/camoucfg"]
|
+LOCAL_INCLUDES += ["/omegacfg"]
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
diff --git a/dom/media/webaudio/AudioContext.cpp b/dom/media/webaudio/AudioContext.cpp
|
diff --git a/dom/media/webaudio/AudioContext.cpp b/dom/media/webaudio/AudioContext.cpp
|
||||||
index 66184b683b..daf30882ea 100644
|
index 66184b683b..daf30882ea 100644
|
||||||
|
|
@ -70,5 +70,5 @@ index 3ee8c0aa76..c0f1df8cf6 100644
|
||||||
LOCAL_INCLUDES += [".."]
|
LOCAL_INCLUDES += [".."]
|
||||||
+
|
+
|
||||||
+# DOM Mask
|
+# DOM Mask
|
||||||
+LOCAL_INCLUDES += ["/camoucfg"]
|
+LOCAL_INCLUDES += ["/omegacfg"]
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,7 @@ index 6a99703db1..82415eba19 100644
|
||||||
boolean isDarkBackground(Element element);
|
boolean isDarkBackground(Element element);
|
||||||
|
|
||||||
+ /**
|
+ /**
|
||||||
+ * Camoufox debug commands
|
+ * Omegafox debug commands
|
||||||
+ */
|
+ */
|
||||||
+ undefined camouDebug(DOMString varName);
|
+ undefined camouDebug(DOMString varName);
|
||||||
+
|
+
|
||||||
|
|
@ -176,27 +176,27 @@ index 6a99703db1..82415eba19 100644
|
||||||
readonly attribute unsigned long aliveUtilityProcesses;
|
readonly attribute unsigned long aliveUtilityProcesses;
|
||||||
|
|
||||||
+ /**
|
+ /**
|
||||||
+ * Get an int value from Camoufox MaskConfig.
|
+ * Get an int value from Omegafox MaskConfig.
|
||||||
+ */
|
+ */
|
||||||
+ long camouGetInt(DOMString varName);
|
+ long camouGetInt(DOMString varName);
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * Get a double value from Camoufox MaskConfig.
|
+ * Get a double value from Omegafox MaskConfig.
|
||||||
+ */
|
+ */
|
||||||
+ double camouGetDouble(DOMString varName, double defaultValue);
|
+ double camouGetDouble(DOMString varName, double defaultValue);
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * Get a bool value from Camoufox MaskConfig.
|
+ * Get a bool value from Omegafox MaskConfig.
|
||||||
+ */
|
+ */
|
||||||
+ boolean camouGetBool(DOMString varName, boolean defaultValue);
|
+ boolean camouGetBool(DOMString varName, boolean defaultValue);
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * Get a string value from Camoufox MaskConfig.
|
+ * Get a string value from Omegafox MaskConfig.
|
||||||
+ */
|
+ */
|
||||||
+ DOMString camouGetString(DOMString varName);
|
+ DOMString camouGetString(DOMString varName);
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * Get a list of strings from Camoufox MaskConfig.
|
+ * Get a list of strings from Omegafox MaskConfig.
|
||||||
+ */
|
+ */
|
||||||
+ sequence<DOMString> camouGetStringList(DOMString varName);
|
+ sequence<DOMString> camouGetStringList(DOMString varName);
|
||||||
+
|
+
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ index bb0f71dd60..3ad3d84b82 100644
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
+; Camoufox specific files
|
+; Omegafox specific files
|
||||||
+@RESPATH@/defaults/pref/local-settings.js
|
+@RESPATH@/defaults/pref/local-settings.js
|
||||||
+@RESPATH@/distribution/policies.json
|
+@RESPATH@/distribution/policies.json
|
||||||
+@RESPATH@/omegafox.cfg
|
+@RESPATH@/omegafox.cfg
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ index 434167c996..e18a16aee0 100644
|
||||||
)
|
)
|
||||||
+
|
+
|
||||||
+# DOM Mask
|
+# DOM Mask
|
||||||
+LOCAL_INCLUDES += ["/camoucfg"]
|
+LOCAL_INCLUDES += ["/omegacfg"]
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
diff --git a/dom/base/Element.cpp b/dom/base/Element.cpp
|
diff --git a/dom/base/Element.cpp b/dom/base/Element.cpp
|
||||||
index 807cb4ec25..3df0e0f70f 100644
|
index 807cb4ec25..3df0e0f70f 100644
|
||||||
|
|
@ -235,7 +235,7 @@ index 114402c4a1..55daeabe7a 100644
|
||||||
)
|
)
|
||||||
+
|
+
|
||||||
+# DOM Mask
|
+# DOM Mask
|
||||||
+LOCAL_INCLUDES += ["/camoucfg"]
|
+LOCAL_INCLUDES += ["/omegacfg"]
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
diff --git a/dom/base/nsGlobalWindowInner.cpp b/dom/base/nsGlobalWindowInner.cpp
|
diff --git a/dom/base/nsGlobalWindowInner.cpp b/dom/base/nsGlobalWindowInner.cpp
|
||||||
index 3678ebc59c..03a72fe242 100644
|
index 3678ebc59c..03a72fe242 100644
|
||||||
|
|
@ -461,7 +461,7 @@ index 3a90c93c01..91d673039b 100644
|
||||||
MOCHITEST_MANIFESTS += ["test/mochitest.toml"]
|
MOCHITEST_MANIFESTS += ["test/mochitest.toml"]
|
||||||
+
|
+
|
||||||
+# DOM Mask
|
+# DOM Mask
|
||||||
+LOCAL_INCLUDES += ["/camoucfg"]
|
+LOCAL_INCLUDES += ["/omegacfg"]
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
diff --git a/dom/workers/WorkerNavigator.cpp b/dom/workers/WorkerNavigator.cpp
|
diff --git a/dom/workers/WorkerNavigator.cpp b/dom/workers/WorkerNavigator.cpp
|
||||||
index b05e409a84..8e0f7ea657 100644
|
index b05e409a84..8e0f7ea657 100644
|
||||||
|
|
@ -531,5 +531,5 @@ index c7818826d1..2e2e6526e7 100644
|
||||||
BROWSER_CHROME_MANIFESTS += ["test/browser.toml"]
|
BROWSER_CHROME_MANIFESTS += ["test/browser.toml"]
|
||||||
+
|
+
|
||||||
+# DOM Mask
|
+# DOM Mask
|
||||||
+LOCAL_INCLUDES += ["/camoucfg"]
|
+LOCAL_INCLUDES += ["/omegacfg"]
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ index 3d99906827..a9d1191688 100644
|
||||||
include("/tools/fuzzing/libfuzzer-config.mozbuild")
|
include("/tools/fuzzing/libfuzzer-config.mozbuild")
|
||||||
+
|
+
|
||||||
+# DOM Mask
|
+# DOM Mask
|
||||||
+LOCAL_INCLUDES += ["/camoucfg"]
|
+LOCAL_INCLUDES += ["/omegacfg"]
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
diff --git a/layout/style/FontFace.cpp b/layout/style/FontFace.cpp
|
diff --git a/layout/style/FontFace.cpp b/layout/style/FontFace.cpp
|
||||||
index f1a90334ea..47d3a881ac 100644
|
index f1a90334ea..47d3a881ac 100644
|
||||||
|
|
@ -155,5 +155,5 @@ index a14ab6a7ac..6e6a727abf 100644
|
||||||
]
|
]
|
||||||
+
|
+
|
||||||
+# DOM Mask
|
+# DOM Mask
|
||||||
+LOCAL_INCLUDES += ["/camoucfg"]
|
+LOCAL_INCLUDES += ["/omegacfg"]
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ index 2d6b6b5fab..0c7ed74c6d 100644
|
||||||
CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
|
CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
|
||||||
+
|
+
|
||||||
+# DOM Mask
|
+# DOM Mask
|
||||||
+LOCAL_INCLUDES += ["/camoucfg"]
|
+LOCAL_INCLUDES += ["/omegacfg"]
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
diff --git a/dom/system/NetworkGeolocationProvider.sys.mjs b/dom/system/NetworkGeolocationProvider.sys.mjs
|
diff --git a/dom/system/NetworkGeolocationProvider.sys.mjs b/dom/system/NetworkGeolocationProvider.sys.mjs
|
||||||
index 7edc62b4a6..19b77aa6b6 100644
|
index 7edc62b4a6..19b77aa6b6 100644
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ index aad9d7054af8..a926d8b6abdc 100644
|
||||||
|
|
||||||
aDestinationName =
|
aDestinationName =
|
||||||
- nsPrintfCString("org.mozilla.%s.%s", aProgram, profileName.get());
|
- nsPrintfCString("org.mozilla.%s.%s", aProgram, profileName.get());
|
||||||
+ nsPrintfCString("com.camoufox.%s.%s", aProgram, profileName.get());
|
+ nsPrintfCString("com.omegafox.%s.%s", aProgram, profileName.get());
|
||||||
if (aDestinationName.Length() > DBUS_MAXIMUM_NAME_LENGTH)
|
if (aDestinationName.Length() > DBUS_MAXIMUM_NAME_LENGTH)
|
||||||
aDestinationName.Truncate(DBUS_MAXIMUM_NAME_LENGTH);
|
aDestinationName.Truncate(DBUS_MAXIMUM_NAME_LENGTH);
|
||||||
|
|
||||||
|
|
@ -16,7 +16,7 @@ index aad9d7054af8..a926d8b6abdc 100644
|
||||||
// We don't have a valid busName yet - try to create a default one.
|
// We don't have a valid busName yet - try to create a default one.
|
||||||
aDestinationName =
|
aDestinationName =
|
||||||
- nsPrintfCString("org.mozilla.%s.%s", aProgram, "default");
|
- nsPrintfCString("org.mozilla.%s.%s", aProgram, "default");
|
||||||
+ nsPrintfCString("com.camoufox.%s.%s", aProgram, "default");
|
+ nsPrintfCString("com.omegafox.%s.%s", aProgram, "default");
|
||||||
if (!sDBusValidateBusName(aDestinationName.get(), nullptr)) {
|
if (!sDBusValidateBusName(aDestinationName.get(), nullptr)) {
|
||||||
// We failed completelly to get a valid bus name - just quit
|
// We failed completelly to get a valid bus name - just quit
|
||||||
// to prevent crash at dbus_bus_request_name().
|
// to prevent crash at dbus_bus_request_name().
|
||||||
|
|
@ -34,7 +34,7 @@ index aad9d7054af8..a926d8b6abdc 100644
|
||||||
|
|
||||||
nsAutoCString remoteInterfaceName;
|
nsAutoCString remoteInterfaceName;
|
||||||
- remoteInterfaceName = nsPrintfCString("org.mozilla.%s", appName.get());
|
- remoteInterfaceName = nsPrintfCString("org.mozilla.%s", appName.get());
|
||||||
+ remoteInterfaceName = nsPrintfCString("com.camoufox.%s", appName.get());
|
+ remoteInterfaceName = nsPrintfCString("com.omegafox.%s", appName.get());
|
||||||
|
|
||||||
LOG(" DBus destination: %s\n", destinationName.get());
|
LOG(" DBus destination: %s\n", destinationName.get());
|
||||||
LOG(" DBus path: %s\n", pathName.get());
|
LOG(" DBus path: %s\n", pathName.get());
|
||||||
|
|
@ -47,7 +47,7 @@ index 4afb8381d0bc..bd927334b817 100644
|
||||||
"\"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n"
|
"\"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n"
|
||||||
"<node>\n"
|
"<node>\n"
|
||||||
- " <interface name=\"org.mozilla.%s\">\n"
|
- " <interface name=\"org.mozilla.%s\">\n"
|
||||||
+ " <interface name=\"com.camoufox.%s\">\n"
|
+ " <interface name=\"com.omegafox.%s\">\n"
|
||||||
" <method name=\"OpenURL\">\n"
|
" <method name=\"OpenURL\">\n"
|
||||||
" <arg name=\"url\" direction=\"in\" type=\"ay\"/>\n"
|
" <arg name=\"url\" direction=\"in\" type=\"ay\"/>\n"
|
||||||
" </method>\n"
|
" </method>\n"
|
||||||
|
|
@ -56,7 +56,7 @@ index 4afb8381d0bc..bd927334b817 100644
|
||||||
const gchar* aMethodName,
|
const gchar* aMethodName,
|
||||||
Span<const gchar> aParam) {
|
Span<const gchar> aParam) {
|
||||||
- nsPrintfCString ourInterfaceName("org.mozilla.%s", mAppName.get());
|
- nsPrintfCString ourInterfaceName("org.mozilla.%s", mAppName.get());
|
||||||
+ nsPrintfCString ourInterfaceName("com.camoufox.%s", mAppName.get());
|
+ nsPrintfCString ourInterfaceName("com.omegafox.%s", mAppName.get());
|
||||||
|
|
||||||
if ((strcmp("OpenURL", aMethodName) != 0) ||
|
if ((strcmp("OpenURL", aMethodName) != 0) ||
|
||||||
(strcmp(ourInterfaceName.get(), aInterfaceName) != 0)) {
|
(strcmp(ourInterfaceName.get(), aInterfaceName) != 0)) {
|
||||||
|
|
@ -65,7 +65,7 @@ index 4afb8381d0bc..bd927334b817 100644
|
||||||
|
|
||||||
void nsDBusRemoteServer::OnBusAcquired(GDBusConnection* aConnection) {
|
void nsDBusRemoteServer::OnBusAcquired(GDBusConnection* aConnection) {
|
||||||
- mPathName = nsPrintfCString("/org/mozilla/%s/Remote", mAppName.get());
|
- mPathName = nsPrintfCString("/org/mozilla/%s/Remote", mAppName.get());
|
||||||
+ mPathName = nsPrintfCString("/com/camoufox/%s/Remote", mAppName.get());
|
+ mPathName = nsPrintfCString("/com/omegafox/%s/Remote", mAppName.get());
|
||||||
static auto sDBusValidatePathName = (bool (*)(const char*, DBusError*))dlsym(
|
static auto sDBusValidatePathName = (bool (*)(const char*, DBusError*))dlsym(
|
||||||
RTLD_DEFAULT, "dbus_validate_path");
|
RTLD_DEFAULT, "dbus_validate_path");
|
||||||
if (!sDBusValidatePathName ||
|
if (!sDBusValidatePathName ||
|
||||||
|
|
@ -75,7 +75,7 @@ index 4afb8381d0bc..bd927334b817 100644
|
||||||
|
|
||||||
- nsPrintfCString busName("org.mozilla.%s.%s", mAppName.get(),
|
- nsPrintfCString busName("org.mozilla.%s.%s", mAppName.get(),
|
||||||
- profileName.get());
|
- profileName.get());
|
||||||
+ nsPrintfCString busName("com.camoufox.%s.%s", mAppName.get(), profileName.get());
|
+ nsPrintfCString busName("com.omegafox.%s.%s", mAppName.get(), profileName.get());
|
||||||
if (busName.Length() > DBUS_MAXIMUM_NAME_LENGTH) {
|
if (busName.Length() > DBUS_MAXIMUM_NAME_LENGTH) {
|
||||||
busName.Truncate(DBUS_MAXIMUM_NAME_LENGTH);
|
busName.Truncate(DBUS_MAXIMUM_NAME_LENGTH);
|
||||||
}
|
}
|
||||||
|
|
@ -84,7 +84,7 @@ index 4afb8381d0bc..bd927334b817 100644
|
||||||
// We don't have a valid busName yet - try to create a default one.
|
// We don't have a valid busName yet - try to create a default one.
|
||||||
if (!sDBusValidateBusName(busName.get(), nullptr)) {
|
if (!sDBusValidateBusName(busName.get(), nullptr)) {
|
||||||
- busName = nsPrintfCString("org.mozilla.%s.%s", mAppName.get(), "default");
|
- busName = nsPrintfCString("org.mozilla.%s.%s", mAppName.get(), "default");
|
||||||
+ busName = nsPrintfCString("com.camoufox.%s.%s", mAppName.get(), "default");
|
+ busName = nsPrintfCString("com.omegafox.%s.%s", mAppName.get(), "default");
|
||||||
if (!sDBusValidateBusName(busName.get(), nullptr)) {
|
if (!sDBusValidateBusName(busName.get(), nullptr)) {
|
||||||
// We failed completelly to get a valid bus name - just quit
|
// We failed completelly to get a valid bus name - just quit
|
||||||
// to prevent crash at dbus_bus_request_name().
|
// to prevent crash at dbus_bus_request_name().
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ index d91f463..3c1ba5a 100644
|
||||||
// Note that the client avoids trying to call attach if already attached.
|
// Note that the client avoids trying to call attach if already attached.
|
||||||
// But just in case, avoid any possible duplicate call to attach.
|
// But just in case, avoid any possible duplicate call to attach.
|
||||||
- if (this.alreadyAttached) {
|
- if (this.alreadyAttached) {
|
||||||
+ let forceDetach = Services.prefs.getBoolPref("camoufox.debugger.force_detach", false);
|
+ let forceDetach = Services.prefs.getBoolPref("omegafox.debugger.force_detach", false);
|
||||||
+ if (this.alreadyAttached || forceDetach) {
|
+ if (this.alreadyAttached || forceDetach) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -21,7 +21,7 @@ index 3e5d0bc..8260e2b 100644
|
||||||
*/
|
*/
|
||||||
onConsoleAPILogEvent(message) {
|
onConsoleAPILogEvent(message) {
|
||||||
- if (!this.handler) {
|
- if (!this.handler) {
|
||||||
+ let disableConsole = Services.prefs.getBoolPref("camoufox.console.logging_disabled", false);
|
+ let disableConsole = Services.prefs.getBoolPref("omegafox.console.logging_disabled", false);
|
||||||
+ if (!this.handler || disableConsole) {
|
+ if (!this.handler || disableConsole) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,19 +5,19 @@
|
||||||
getter_AddRefs(localDir));
|
getter_AddRefs(localDir));
|
||||||
if (NS_SUCCEEDED(rv)) {
|
if (NS_SUCCEEDED(rv)) {
|
||||||
- rv = localDir->AppendNative("Mozilla"_ns);
|
- rv = localDir->AppendNative("Mozilla"_ns);
|
||||||
+ rv = localDir->AppendNative("Camoufox"_ns);
|
+ rv = localDir->AppendNative("Omegafox"_ns);
|
||||||
}
|
}
|
||||||
# else
|
# else
|
||||||
constexpr auto dirname =
|
constexpr auto dirname =
|
||||||
# ifdef HAVE_USR_LIB64_DIR
|
# ifdef HAVE_USR_LIB64_DIR
|
||||||
- "/usr/lib64/mozilla"_ns
|
- "/usr/lib64/mozilla"_ns
|
||||||
+ "/usr/lib64/camoufox"_ns
|
+ "/usr/lib64/omegafox"_ns
|
||||||
# elif defined(__OpenBSD__) || defined(__FreeBSD__)
|
# elif defined(__OpenBSD__) || defined(__FreeBSD__)
|
||||||
- "/usr/local/lib/mozilla"_ns
|
- "/usr/local/lib/mozilla"_ns
|
||||||
+ "/usr/local/lib/camoufox"_ns
|
+ "/usr/local/lib/omegafox"_ns
|
||||||
# else
|
# else
|
||||||
- "/usr/lib/mozilla"_ns
|
- "/usr/lib/mozilla"_ns
|
||||||
+ "/usr/lib/camoufox"_ns
|
+ "/usr/lib/omegafox"_ns
|
||||||
# endif
|
# endif
|
||||||
;
|
;
|
||||||
rv = NS_NewNativeLocalFile(dirname, false, getter_AddRefs(localDir));
|
rv = NS_NewNativeLocalFile(dirname, false, getter_AddRefs(localDir));
|
||||||
|
|
@ -26,10 +26,10 @@
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
# if defined(XP_MACOSX)
|
# if defined(XP_MACOSX)
|
||||||
- rv = file->AppendNative("Mozilla"_ns);
|
- rv = file->AppendNative("Mozilla"_ns);
|
||||||
+ rv = file->AppendNative("Camoufox"_ns);
|
+ rv = file->AppendNative("Omegafox"_ns);
|
||||||
# else // defined(XP_MACOSX)
|
# else // defined(XP_MACOSX)
|
||||||
- rv = file->AppendNative(".mozilla"_ns);
|
- rv = file->AppendNative(".mozilla"_ns);
|
||||||
+ rv = file->AppendNative(".camoufox"_ns);
|
+ rv = file->AppendNative(".omegafox"_ns);
|
||||||
# endif // defined(XP_MACOSX)
|
# endif // defined(XP_MACOSX)
|
||||||
}
|
}
|
||||||
#endif // defined(XP_UNIX) || defined(XP_MACOSX)
|
#endif // defined(XP_UNIX) || defined(XP_MACOSX)
|
||||||
|
|
@ -38,10 +38,10 @@
|
||||||
# ifdef ENABLE_SYSTEM_EXTENSION_DIRS
|
# ifdef ENABLE_SYSTEM_EXTENSION_DIRS
|
||||||
# if defined(__OpenBSD__) || defined(__FreeBSD__)
|
# if defined(__OpenBSD__) || defined(__FreeBSD__)
|
||||||
- static const char* const sysLExtDir = "/usr/local/share/mozilla/extensions";
|
- static const char* const sysLExtDir = "/usr/local/share/mozilla/extensions";
|
||||||
+ static const char* const sysLExtDir = "/usr/local/share/camoufox/extensions";
|
+ static const char* const sysLExtDir = "/usr/local/share/omegafox/extensions";
|
||||||
# else
|
# else
|
||||||
- static const char* const sysLExtDir = "/usr/share/mozilla/extensions";
|
- static const char* const sysLExtDir = "/usr/share/mozilla/extensions";
|
||||||
+ static const char* const sysLExtDir = "/usr/share/camoufox/extensions";
|
+ static const char* const sysLExtDir = "/usr/share/omegafox/extensions";
|
||||||
# endif
|
# endif
|
||||||
rv = NS_NewNativeLocalFile(nsDependentCString(sysLExtDir), false,
|
rv = NS_NewNativeLocalFile(nsDependentCString(sysLExtDir), false,
|
||||||
getter_AddRefs(file));
|
getter_AddRefs(file));
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
- } else if (NS_FAILED(localDir->AppendNative("Mozilla"_ns))) {
|
- } else if (NS_FAILED(localDir->AppendNative("Mozilla"_ns))) {
|
||||||
+ } else if (NS_FAILED(localDir->AppendNative("Camoufox"_ns))) {
|
+ } else if (NS_FAILED(localDir->AppendNative("Omegafox"_ns))) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -59,7 +59,7 @@
|
||||||
#if defined(XP_MACOSX) || defined(XP_WIN)
|
#if defined(XP_MACOSX) || defined(XP_WIN)
|
||||||
|
|
||||||
- static const char* const sXR = "Mozilla";
|
- static const char* const sXR = "Mozilla";
|
||||||
+ static const char* const sXR = "Camoufox";
|
+ static const char* const sXR = "Omegafox";
|
||||||
rv = aFile->AppendNative(nsDependentCString(sXR));
|
rv = aFile->AppendNative(nsDependentCString(sXR));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
|
|
@ -68,7 +68,7 @@
|
||||||
#elif defined(XP_UNIX)
|
#elif defined(XP_UNIX)
|
||||||
|
|
||||||
- static const char* const sXR = ".mozilla";
|
- static const char* const sXR = ".mozilla";
|
||||||
+ static const char* const sXR = ".camoufox";
|
+ static const char* const sXR = ".omegafox";
|
||||||
rv = aFile->AppendNative(nsDependentCString(sXR));
|
rv = aFile->AppendNative(nsDependentCString(sXR));
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ index 9a043518cf..a8d3733212 100644
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+const char* Locale::GetDefaultLocale() {
|
+const char* Locale::GetDefaultLocale() {
|
||||||
+ // In Camoufox, GetDefaultLocale is defined outside the header
|
+ // In Omegafox, GetDefaultLocale is defined outside the header
|
||||||
+ // to access MaskConfig.
|
+ // to access MaskConfig.
|
||||||
+ if (auto value = GetCamouLocale())
|
+ if (auto value = GetCamouLocale())
|
||||||
+ return value;
|
+ return value;
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ index b090a56d88..9fe4a5e1e8 100644
|
||||||
include("/tools/fuzzing/libfuzzer-config.mozbuild")
|
include("/tools/fuzzing/libfuzzer-config.mozbuild")
|
||||||
+
|
+
|
||||||
+# DOM Mask
|
+# DOM Mask
|
||||||
+LOCAL_INCLUDES += ["/camoucfg"]
|
+LOCAL_INCLUDES += ["/omegacfg"]
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp
|
diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp
|
||||||
index d0aebdf965..01472ec205 100644
|
index d0aebdf965..01472ec205 100644
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ index a2b3e60fe5..faa0c113bc 100644
|
||||||
CXXFLAGS += CONFIG["MOZ_PANGO_CFLAGS"]
|
CXXFLAGS += CONFIG["MOZ_PANGO_CFLAGS"]
|
||||||
+
|
+
|
||||||
+# DOM Mask
|
+# DOM Mask
|
||||||
+LOCAL_INCLUDES += ["/camoucfg"]
|
+LOCAL_INCLUDES += ["/omegacfg"]
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
diff --git a/gfx/src/nsDeviceContext.cpp b/gfx/src/nsDeviceContext.cpp
|
diff --git a/gfx/src/nsDeviceContext.cpp b/gfx/src/nsDeviceContext.cpp
|
||||||
index 7a4fa8d48f..408b754d92 100644
|
index 7a4fa8d48f..408b754d92 100644
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ index b0af60b999..28c221136e 100644
|
||||||
Library("intlcomponents")
|
Library("intlcomponents")
|
||||||
+
|
+
|
||||||
+# DOM Mask
|
+# DOM Mask
|
||||||
+LOCAL_INCLUDES += ["/camoucfg"]
|
+LOCAL_INCLUDES += ["/omegacfg"]
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
diff --git a/intl/components/src/TimeZone.cpp b/intl/components/src/TimeZone.cpp
|
diff --git a/intl/components/src/TimeZone.cpp b/intl/components/src/TimeZone.cpp
|
||||||
index 5b09dfdcc5..98a78b33cc 100644
|
index 5b09dfdcc5..98a78b33cc 100644
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ index 2cf19982b2..dcdcdb5cbf 100644
|
||||||
]
|
]
|
||||||
+
|
+
|
||||||
+# DOM Mask
|
+# DOM Mask
|
||||||
+LOCAL_INCLUDES += ['/camoucfg']
|
+LOCAL_INCLUDES += ['/omegacfg']
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
diff --git a/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp b/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp
|
diff --git a/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp b/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp
|
||||||
index e5a1353d6b..4a4a5b080b 100644
|
index e5a1353d6b..4a4a5b080b 100644
|
||||||
|
|
|
||||||
|
|
@ -390,5 +390,5 @@ index 3a533d36d1..41d74d9b3f 100644
|
||||||
include("/tools/fuzzing/libfuzzer-config.mozbuild")
|
include("/tools/fuzzing/libfuzzer-config.mozbuild")
|
||||||
+
|
+
|
||||||
+# DOM Mask
|
+# DOM Mask
|
||||||
+LOCAL_INCLUDES += ["/camoucfg"]
|
+LOCAL_INCLUDES += ["/omegacfg"]
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
|
|
|
||||||
|
|
@ -312,5 +312,5 @@ index 925190505a..878853f0f0 100644
|
||||||
FINAL_LIBRARY = "xul"
|
FINAL_LIBRARY = "xul"
|
||||||
+
|
+
|
||||||
+# DOM Mask
|
+# DOM Mask
|
||||||
+LOCAL_INCLUDES += ["/camoucfg"]
|
+LOCAL_INCLUDES += ["/omegacfg"]
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
|
|
|
||||||
|
|
@ -25,12 +25,12 @@ index 54d6b43fe126..116410bb89d9 100644
|
||||||
endif
|
endif
|
||||||
|
|
||||||
PROGRAMS_DEST = $(DIST)/bin
|
PROGRAMS_DEST = $(DIST)/bin
|
||||||
diff --git a/browser/app/firefox.exe.manifest b/browser/app/camoufox.manifest
|
diff --git a/browser/app/firefox.exe.manifest b/browser/app/omegafox.manifest
|
||||||
similarity index 96%
|
similarity index 96%
|
||||||
rename from browser/app/firefox.exe.manifest
|
rename from browser/app/firefox.exe.manifest
|
||||||
rename to browser/app/camoufox.exe.manifest
|
rename to browser/app/omegafox.exe.manifest
|
||||||
--- a/browser/app/firefox.exe.manifest
|
--- a/browser/app/firefox.exe.manifest
|
||||||
+++ b/browser/app/camoufox.exe.manifest
|
+++ b/browser/app/omegafox.exe.manifest
|
||||||
@@ -3,10 +3,10 @@
|
@@ -3,10 +3,10 @@
|
||||||
<assemblyIdentity
|
<assemblyIdentity
|
||||||
version="1.0.0.0"
|
version="1.0.0.0"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Common functions used across the Camoufox build system.
|
Common functions used across the Omegafox build system.
|
||||||
Not meant to be called directly.
|
Not meant to be called directly.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
@ -43,14 +43,14 @@ def get_options():
|
||||||
def find_src_dir(root_dir='.', version=None, release=None):
|
def find_src_dir(root_dir='.', version=None, release=None):
|
||||||
"""Get the source directory"""
|
"""Get the source directory"""
|
||||||
if version and release:
|
if version and release:
|
||||||
name = os.path.join(root_dir, f'camoufox-{version}-{release}')
|
name = os.path.join(root_dir, f'omegafox-{version}-{release}')
|
||||||
assert os.path.exists(name), f'{name} does not exist.'
|
assert os.path.exists(name), f'{name} does not exist.'
|
||||||
return name
|
return name
|
||||||
folders = os.listdir(root_dir)
|
folders = os.listdir(root_dir)
|
||||||
for folder in folders:
|
for folder in folders:
|
||||||
if os.path.isdir(folder) and folder.startswith('camoufox-'):
|
if os.path.isdir(folder) and folder.startswith('omegafox-'):
|
||||||
return os.path.join(root_dir, folder)
|
return os.path.join(root_dir, folder)
|
||||||
raise FileNotFoundError('No camoufox-* folder found')
|
raise FileNotFoundError('No omegafox-* folder found')
|
||||||
|
|
||||||
|
|
||||||
def get_moz_target(target, arch):
|
def get_moz_target(target, arch):
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
"""
|
"""
|
||||||
GUI for managing Camoufox patches.
|
GUI for managing Omegafox patches.
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
@ -11,16 +11,16 @@ import easygui
|
||||||
from _mixin import find_src_dir, is_bootstrap_patch, list_patches, patch, run, temp_cd
|
from _mixin import find_src_dir, is_bootstrap_patch, list_patches, patch, run, temp_cd
|
||||||
|
|
||||||
|
|
||||||
def into_camoufox_dir():
|
def into_omegafox_dir():
|
||||||
"""Cd to the camoufox-* folder"""
|
"""Cd to the omegafox-* folder"""
|
||||||
this_script = os.path.dirname(os.path.abspath(__file__))
|
this_script = os.path.dirname(os.path.abspath(__file__))
|
||||||
# Go one directory up from the current script path
|
# Go one directory up from the current script path
|
||||||
os.chdir(os.path.dirname(this_script))
|
os.chdir(os.path.dirname(this_script))
|
||||||
os.chdir(find_src_dir('.', version=sys.argv[1], release=sys.argv[2]))
|
os.chdir(find_src_dir('.', version=sys.argv[1], release=sys.argv[2]))
|
||||||
|
|
||||||
|
|
||||||
def reset_camoufox():
|
def reset_omegafox():
|
||||||
"""Reset the Camoufox source"""
|
"""Reset the Omegafox source"""
|
||||||
with temp_cd('..'):
|
with temp_cd('..'):
|
||||||
run('make revert')
|
run('make revert')
|
||||||
run('touch _READY')
|
run('touch _READY')
|
||||||
|
|
@ -68,7 +68,7 @@ def open_patch_workspace(selected_patch, stop_at_patch=False):
|
||||||
Resets a workspace for editing a patch.
|
Resets a workspace for editing a patch.
|
||||||
|
|
||||||
Process:
|
Process:
|
||||||
1. Resets Camoufox
|
1. Resets Omegafox
|
||||||
2. Patches all except the selected patch
|
2. Patches all except the selected patch
|
||||||
3. Sets checkpoint
|
3. Sets checkpoint
|
||||||
4. Reruns the selected patch, but reads rejects similar to "Find broken patches"
|
4. Reruns the selected patch, but reads rejects similar to "Find broken patches"
|
||||||
|
|
@ -77,7 +77,7 @@ def open_patch_workspace(selected_patch, stop_at_patch=False):
|
||||||
patch_files = list_patches()
|
patch_files = list_patches()
|
||||||
|
|
||||||
# Reset workspace
|
# Reset workspace
|
||||||
reset_camoufox()
|
reset_omegafox()
|
||||||
|
|
||||||
skipped_patches = []
|
skipped_patches = []
|
||||||
applied_patches = []
|
applied_patches = []
|
||||||
|
|
@ -186,20 +186,20 @@ def handle_choice(choice):
|
||||||
"""Handle UI choice"""
|
"""Handle UI choice"""
|
||||||
match choice:
|
match choice:
|
||||||
case "Reset workspace":
|
case "Reset workspace":
|
||||||
reset_camoufox()
|
reset_omegafox()
|
||||||
easygui.msgbox(
|
easygui.msgbox(
|
||||||
"Reset. All patches & changes have been removed.",
|
"Reset. All patches & changes have been removed.",
|
||||||
"Reset Complete",
|
"Reset Complete",
|
||||||
)
|
)
|
||||||
|
|
||||||
case "Create new patch":
|
case "Create new patch":
|
||||||
# Reset camoufox, apply all patches, then create a checkpoint
|
# Reset omegafox, apply all patches, then create a checkpoint
|
||||||
reset_camoufox()
|
reset_omegafox()
|
||||||
with temp_cd('..'):
|
with temp_cd('..'):
|
||||||
run('make dir')
|
run('make dir')
|
||||||
run('make checkpoint')
|
run('make checkpoint')
|
||||||
easygui.msgbox(
|
easygui.msgbox(
|
||||||
"Created new patch workspace. You can test Camoufox with 'make run'.\n\n"
|
"Created new patch workspace. You can test Omegafox with 'make run'.\n\n"
|
||||||
"When you are finished, write your workspace back to a new patch.",
|
"When you are finished, write your workspace back to a new patch.",
|
||||||
"New Patch Workspace",
|
"New Patch Workspace",
|
||||||
)
|
)
|
||||||
|
|
@ -254,7 +254,7 @@ def handle_choice(choice):
|
||||||
easygui.msgbox("Unpatching completed.", "Unpatching Complete")
|
easygui.msgbox("Unpatching completed.", "Unpatching Complete")
|
||||||
|
|
||||||
case "Find broken patches (resets workspace)":
|
case "Find broken patches (resets workspace)":
|
||||||
reset_camoufox()
|
reset_omegafox()
|
||||||
|
|
||||||
get_all = None
|
get_all = None
|
||||||
|
|
||||||
|
|
@ -356,7 +356,7 @@ def handle_choice(choice):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
into_camoufox_dir()
|
into_omegafox_dir()
|
||||||
|
|
||||||
while choice := easygui.choicebox("Select an option:", "Camoufox Dev Tools", choices):
|
while choice := easygui.choicebox("Select an option:", "Omegafox Dev Tools", choices):
|
||||||
handle_choice(choice)
|
handle_choice(choice)
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@ add_includes_to_package() {
|
||||||
echo "Adding includes to package: $1"
|
echo "Adding includes to package: $1"
|
||||||
temp_dir=$(mktemp -d)
|
temp_dir=$(mktemp -d)
|
||||||
7z x "$1" "-o$temp_dir"
|
7z x "$1" "-o$temp_dir"
|
||||||
if [ -d "$temp_dir/camoufox" ]; then
|
if [ -d "$temp_dir/omegafox" ]; then
|
||||||
mv "$temp_dir/camoufox"/* "$temp_dir/"
|
mv "$temp_dir/omegafox"/* "$temp_dir/"
|
||||||
rmdir "$temp_dir/camoufox"
|
rmdir "$temp_dir/omegafox"
|
||||||
fi
|
fi
|
||||||
for include in "${@:2}"; do
|
for include in "${@:2}"; do
|
||||||
if [ -e "$include" ]; then
|
if [ -e "$include" ]; then
|
||||||
|
|
|
||||||
|
|
@ -31,27 +31,27 @@ def add_includes_to_package(package_file, includes, fonts, new_file, target):
|
||||||
)
|
)
|
||||||
|
|
||||||
if target == 'macos':
|
if target == 'macos':
|
||||||
# Move Camoufox/Camoufox.app -> Camoufox.app
|
# Move Omegafox/Omegafox.app -> Omegafox.app
|
||||||
nightly_dir = os.path.join(temp_dir, 'Camoufox')
|
nightly_dir = os.path.join(temp_dir, 'Omegafox')
|
||||||
shutil.move(
|
shutil.move(
|
||||||
os.path.join(nightly_dir, 'Camoufox.app'), os.path.join(temp_dir, 'Camoufox.app')
|
os.path.join(nightly_dir, 'Omegafox.app'), os.path.join(temp_dir, 'Omegafox.app')
|
||||||
)
|
)
|
||||||
# Remove old app dir and all content in it
|
# Remove old app dir and all content in it
|
||||||
shutil.rmtree(nightly_dir)
|
shutil.rmtree(nightly_dir)
|
||||||
else:
|
else:
|
||||||
# Move contents out of camoufox folder if it exists
|
# Move contents out of omegafox folder if it exists
|
||||||
old_camoufox_dir = os.path.join(temp_dir, 'camoufox')
|
old_omegafox_dir = os.path.join(temp_dir, 'omegafox')
|
||||||
camoufox_dir = os.path.join(temp_dir, 'camoufox-folder')
|
omegafox_dir = os.path.join(temp_dir, 'omegafox-folder')
|
||||||
if os.path.exists(old_camoufox_dir):
|
if os.path.exists(old_omegafox_dir):
|
||||||
# Rename camoufox_dir
|
# Rename omegafox_dir
|
||||||
os.rename(old_camoufox_dir, camoufox_dir)
|
os.rename(old_omegafox_dir, omegafox_dir)
|
||||||
for item in os.listdir(camoufox_dir):
|
for item in os.listdir(omegafox_dir):
|
||||||
shutil.move(os.path.join(camoufox_dir, item), temp_dir)
|
shutil.move(os.path.join(omegafox_dir, item), temp_dir)
|
||||||
os.rmdir(camoufox_dir)
|
os.rmdir(omegafox_dir)
|
||||||
|
|
||||||
# Create target_dir
|
# Create target_dir
|
||||||
if target == 'macos':
|
if target == 'macos':
|
||||||
target_dir = os.path.join(temp_dir, 'Camoufox.app', 'Contents', 'Resources')
|
target_dir = os.path.join(temp_dir, 'Omegafox.app', 'Contents', 'Resources')
|
||||||
else:
|
else:
|
||||||
target_dir = temp_dir
|
target_dir = temp_dir
|
||||||
|
|
||||||
|
|
@ -98,14 +98,14 @@ def add_includes_to_package(package_file, includes, fonts, new_file, target):
|
||||||
def get_args():
|
def get_args():
|
||||||
"""Get CLI parameters"""
|
"""Get CLI parameters"""
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description='Package Camoufox for different operating systems.'
|
description='Package Omegafox for different operating systems.'
|
||||||
)
|
)
|
||||||
parser.add_argument('os', choices=['linux', 'macos', 'windows'], help='Target operating system')
|
parser.add_argument('os', choices=['linux', 'macos', 'windows'], help='Target operating system')
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--includes', nargs='+', help='List of files or directories to include in the package'
|
'--includes', nargs='+', help='List of files or directories to include in the package'
|
||||||
)
|
)
|
||||||
parser.add_argument('--version', required=True, help='Camoufox version')
|
parser.add_argument('--version', required=True, help='Omegafox version')
|
||||||
parser.add_argument('--release', required=True, help='Camoufox release number')
|
parser.add_argument('--release', required=True, help='Omegafox release number')
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--arch', choices=['x86_64', 'i686', 'arm64'], help='Architecture for Windows build'
|
'--arch', choices=['x86_64', 'i686', 'arm64'], help='Architecture for Windows build'
|
||||||
)
|
)
|
||||||
|
|
@ -129,7 +129,7 @@ def main():
|
||||||
run('./mach package')
|
run('./mach package')
|
||||||
# Find package files
|
# Find package files
|
||||||
search_path = os.path.abspath(
|
search_path = os.path.abspath(
|
||||||
f'obj-{moz_target}/dist/camoufox-{args.version}-{args.release}.*.{file_ext}'
|
f'obj-{moz_target}/dist/omegafox-{args.version}-{args.release}.*.{file_ext}'
|
||||||
)
|
)
|
||||||
|
|
||||||
# Copy package files
|
# Copy package files
|
||||||
|
|
@ -146,7 +146,7 @@ def main():
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# Find the package file
|
# Find the package file
|
||||||
package_pattern = f'camoufox-{args.version}-{args.release}.en-US.*.{file_ext}'
|
package_pattern = f'omegafox-{args.version}-{args.release}.en-US.*.{file_ext}'
|
||||||
package_files = glob.glob(package_pattern)
|
package_files = glob.glob(package_pattern)
|
||||||
if not package_files:
|
if not package_files:
|
||||||
print(f"Error: No package file found matching pattern: {package_pattern}")
|
print(f"Error: No package file found matching pattern: {package_pattern}")
|
||||||
|
|
@ -154,7 +154,7 @@ def main():
|
||||||
package_file = package_files[0]
|
package_file = package_files[0]
|
||||||
|
|
||||||
# Add includes to the package
|
# Add includes to the package
|
||||||
new_name = f'camoufox-{args.version}-{args.release}-{args.os[:3]}.{args.arch}.zip'
|
new_name = f'omegafox-{args.version}-{args.release}-{args.os[:3]}.{args.arch}.zip'
|
||||||
add_includes_to_package(
|
add_includes_to_package(
|
||||||
package_file=package_file,
|
package_file=package_file,
|
||||||
includes=args.includes,
|
includes=args.includes,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
"""
|
"""
|
||||||
The script that patches the Firefox source into the Camoufox source.
|
The script that patches the Firefox source into the Omegafox source.
|
||||||
Based on LibreWolf's patch script:
|
Based on LibreWolf's patch script:
|
||||||
https://gitlab.com/librewolf-community/browser/source/-/blob/main/scripts/librewolf-patches.py
|
https://gitlab.com/librewolf-community/browser/source/-/blob/main/scripts/librewolf-patches.py
|
||||||
|
|
||||||
|
|
@ -34,12 +34,12 @@ Main patcher functions
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class Patcher:
|
class Patcher:
|
||||||
"""Patch and prepare the Camoufox source"""
|
"""Patch and prepare the Omegafox source"""
|
||||||
|
|
||||||
moz_target: str
|
moz_target: str
|
||||||
target: str
|
target: str
|
||||||
|
|
||||||
def camoufox_patches(self):
|
def omegafox_patches(self):
|
||||||
"""
|
"""
|
||||||
Apply all patches
|
Apply all patches
|
||||||
"""
|
"""
|
||||||
|
|
@ -122,7 +122,7 @@ Preparation
|
||||||
def extract_args():
|
def extract_args():
|
||||||
"""Get version and release from args"""
|
"""Get version and release from args"""
|
||||||
if len(args) != 2:
|
if len(args) != 2:
|
||||||
sys.stderr.write('error: please specify version and release of camoufox source')
|
sys.stderr.write('error: please specify version and release of omegafox source')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
return args[0], args[1]
|
return args[0], args[1]
|
||||||
|
|
||||||
|
|
@ -156,12 +156,12 @@ if __name__ == "__main__":
|
||||||
_update_rustup(TARGET)
|
_update_rustup(TARGET)
|
||||||
|
|
||||||
# Check if the folder exists
|
# Check if the folder exists
|
||||||
if not os.path.exists(f'camoufox-{VERSION}-{RELEASE}/configure.py'):
|
if not os.path.exists(f'omegafox-{VERSION}-{RELEASE}/configure.py'):
|
||||||
sys.stderr.write('error: folder doesn\'t look like a Firefox folder.')
|
sys.stderr.write('error: folder doesn\'t look like a Firefox folder.')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# Apply the patches
|
# Apply the patches
|
||||||
patcher = Patcher(MOZ_TARGET, TARGET)
|
patcher = Patcher(MOZ_TARGET, TARGET)
|
||||||
patcher.camoufox_patches()
|
patcher.omegafox_patches()
|
||||||
|
|
||||||
sys.exit(0) # ensure 0 exit code
|
sys.exit(0) # ensure 0 exit code
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue