diff --git a/.github/workflows/build-linux-x86_64.yml b/.github/workflows/build-linux-x86_64.yml index d31f2b9703..bf8f7a2957 100644 --- a/.github/workflows/build-linux-x86_64.yml +++ b/.github/workflows/build-linux-x86_64.yml @@ -7,8 +7,6 @@ on: # Triggers the workflow on push or pull request events but only for the master branch push: branches: [ master, unstable ] - pull_request: - branches: [ master ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -53,9 +51,12 @@ jobs: run: | mkdir datcord tar --strip-components=1 -xvf mozilla-unified/obj-x86_64-pc-linux-gnu/dist/*.tar.bz2 -C datcord/ - mv datcord/firefox datcord/datcord - mv datcord/firefox-bin datcord/datcord-bin - mv distribution datcord/distribution + #mv datcord/firefox datcord/datcord + #mv datcord/firefox-bin datcord/datcord-bin + cp -r distribution/ datcord/ + mv datcord/distribution/policies-linux.json datcord/distribution/policies.json + cp open-in-default-browser/open-in-default-browser datcord/open-in-default-browser + cp src/launch-datcord datcord/launch-datcord tar -cjf datcord.tar.bz2 datcord - name: Appimage it run: | @@ -63,8 +64,11 @@ jobs: chmod a+x appimagetool-x86_64.AppImage mkdir -p datcord.AppImage/usr/bin/ tar --strip-components=1 -xvf mozilla-unified/obj-x86_64-pc-linux-gnu/dist/*.tar.bz2 -C datcord.AppImage/usr/bin/ - mv datcord.AppImage/usr/bin/firefox datcord.AppImage/usr/bin/datcord - mv datcord.AppImage/usr/bin/firefox-bin datcord.AppImage/usr/bin/datcord-bin + #mv datcord.AppImage/usr/bin/firefox datcord.AppImage/usr/bin/datcord + #mv datcord.AppImage/usr/bin/firefox-bin datcord.AppImage/usr/bin/datcord-bin + cp -r distribution/ datcord.AppImage/usr/bin/ + mv datcord.AppImage/usr/bin/distribution/policies-linux-appimage.json datcord.AppImage/usr/bin/distribution/policies.json + cp open-in-default-browser/open-in-default-browser datcord.AppImage/usr/bin/ ARCH=x86_64 ./appimagetool-x86_64.AppImage datcord.AppImage/ - name: Upload a Build Artifact diff --git a/.github/workflows/build-win64.yml b/.github/workflows/build-win64.yml index 4d9eccf8a5..f10f74eab7 100644 --- a/.github/workflows/build-win64.yml +++ b/.github/workflows/build-win64.yml @@ -1,12 +1,10 @@ -name: Build-Win64 +name: Build-Cross-Win-x86_64 # Controls when the workflow will run on: # Triggers the workflow on push or pull request events but only for the master branch push: branches: [ master, unstable ] - pull_request: - branches: [ master ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -16,30 +14,36 @@ jobs: # This workflow contains a single job called "build" build: # The type of runner that the job will run on - runs-on: windows-2019 + runs-on: self-hosted # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 + + #- name: Cache + # uses: actions/cache@v3.0.11 + # with: + # path: mozilla-unified + # key: ${{ runner.os }}-mozilla-unified - - name: Cache - uses: actions/cache@v2.1.6 - with: - # A list of files, directories, and wildcard patterns to cache and restore - path: mozilla-unified - # An explicit key for restoring and saving the cache - key: ${{ runner.os }}-mozilla-unified + # Add mask + - name: add log mask + run: echo "::add-mask::${{ secrets.USERNAME }}" # Runs a set of commands using the runners shell - - name: Run a multi-line script + - name: Get deps, build and package run: | - choco install mozillabuild cygwin nsis - choco install --force git - refreshenv - C:\mozilla-build\start-shell.bat /d/a/datcord/datcord/buildDatcordWin.sh - move C:/Users/runneradmin/mozilla-unified/obj-x86_64-pc-mingw32/dist/install/sea/*.exe C:/Users/runneradmin/mozilla-unified/obj-x86_64-pc-mingw32/dist/install/sea/datcordSetup-win64.exe - + ls + # These apt commands are used for installing deps for builds on debian. They are not used on my self-hosted runner + #sudo apt upgrade && sudo apt update + #sudo add-apt-repository universe + #sudo apt install libfuse2 + #sudo apt install python3 python3-distutils python3-pip build-essential libpython3-dev m4 nodejs unzip uuid zip libasound2-dev libcurl4-openssl-dev libdbus-1-dev libdbus-glib-1-dev libdrm-dev libgtk-3-dev libpulse-dev libx11-xcb-dev libxt-dev xvfb rustc clang nasm + #sudo apt install mercurial python3 python3-dev python3-pip curl wget dpkg-sig msitools p7zip-full upx-ucl libssl-dev zstd wine64-tools wine + pip3 install --upgrade setuptools + pip3 install wheel setuptools zstandard==0.15.2 cffi>=1.13.0 glean-parser==2.5.0 appdirs>=1.4 Click>=7 diskcache>=4 importlib-metadata iso8601>=0.1.10 Jinja2>=2.10.1 jsonschema>=3.0.2 attrs>=17.4.0 MarkupSafe>=2.0 pycparser pyrsistent>=0.14.0 PyYAML>=3.13 six>=1.11.0 typing-extensions>=3.6.4 yamllint>=1.18.0 pathspec>=0.5.3 zipp>=0.5 psutil==5.8.0 + bash ./crossCompileForWindows.sh - name: Upload a Build Artifact uses: actions/upload-artifact@v2.2.4 with: @@ -47,4 +51,55 @@ jobs: name: win64-installer # A file, directory or wildcard pattern that describes what to upload path: work/datcordSetup-win64.exe + +# name: Build-Win64 + +# # Controls when the workflow will run +# on: +# # Triggers the workflow on push or pull request events but only for the master branch +# push: +# branches: [ master, unstable ] +# pull_request: +# branches: [ master ] + +# # Allows you to run this workflow manually from the Actions tab +# workflow_dispatch: + +# # A workflow run is made up of one or more jobs that can run sequentially or in parallel +# jobs: +# # This workflow contains a single job called "build" +# build: +# # The type of runner that the job will run on +# runs-on: windows-latest + +# # Steps represent a sequence of tasks that will be executed as part of the job +# steps: +# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it +# - uses: actions/checkout@v2 + +# - name: Cache +# uses: actions/cache@v2.1.6 +# with: +# # A list of files, directories, and wildcard patterns to cache and restore +# path: mozilla-unified +# # An explicit key for restoring and saving the cache +# key: ${{ runner.os }}-mozilla-unified + +# # Runs a set of commands using the runners shell +# - name: Run a multi-line script +# run: | +# choco install mozillabuild cygwin nsis +# choco install --force git +# refreshenv +# C:\mozilla-build\start-shell.bat /d/a/datcord/datcord/buildDatcordWin.sh +# move C:/Users/runneradmin/mozilla-unified/obj-x86_64-pc-mingw32/dist/install/sea/*.exe C:/Users/runneradmin/mozilla-unified/obj-x86_64-pc-mingw32/dist/install/sea/datcordSetup-win64.exe + +# - name: Upload a Build Artifact +# uses: actions/upload-artifact@v2.2.4 +# with: +# # Artifact name +# name: win64-installer +# # A file, directory or wildcard pattern that describes what to upload +# path: work/datcordSetup-win64.exe +# This is a basic workflow to help you get started with Actions diff --git a/.gitignore b/.gitignore index b1302f8328..f236b5eac5 100644 --- a/.gitignore +++ b/.gitignore @@ -177,4 +177,5 @@ Datcord-x86_64.AppImage # Ignore build dir build/ mozilla-unified/ +work/ diff --git a/README.md b/README.md index dd0e0eff01..7bb2bde176 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@
- - Logo + + Logo

Datcord

diff --git a/buildDatcord.sh b/buildDatcord.sh index 561f7e74c1..e4ff235ffb 100644 --- a/buildDatcord.sh +++ b/buildDatcord.sh @@ -22,8 +22,10 @@ if [ ! -d $mozbuild/git-cinnabar ]; then fi cd mozilla-unified -cp -r ../changed/* . -patch -p1 ../mozilla_dirsFromLibreWolf.patch +cp -r ../src/changed/* . +cp ../src/mozconfig.linux mozconfig +patch -p1 < ../mozilla_dirsFromLibreWolf.patch + ./mach configure ./mach build ./mach package diff --git a/buildDatcordWin.sh b/buildDatcordWin.sh index 0e0a068344..3963e0f92e 100644 --- a/buildDatcordWin.sh +++ b/buildDatcordWin.sh @@ -1,21 +1,20 @@ # Run with MozillaBuild basedir=$(dirname "$0") -if [[ ! -d mozilla-unified ]] +if [ ! -d mozilla-unified ] then curl https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py --output bootstrap.py python3 bootstrap.py --no-interactive fi -cp -rf $basedir/changed/* mozilla-unified/ +cp -rf $basedir/src/changed/* mozilla-unified/ # It is using nightly branding no matter what so we replace the nightly stuff with our stuff cp -rf mozilla-unified/browser/branding/unofficial/* mozilla-unified/browser/branding/nightly/* cd mozilla-unified -echo "ac_add_options --disable-default-browser-agent" >> mozconfig +echo "ac_add_options --disable-default-browser-agent" > mozconfig echo "ac_add_options --enable-release" >> mozconfig -# Doesn't work properly if app name is datcord. echo "ac_add_options --with-app-name=firefox" >> mozconfig -echo "ac_add_options --with-branding=browser/branding/unofficial" >> mozconfig +echo "ac_add_options --with-branding=browser/branding/datcord" >> mozconfig cat mozconfig -patch -p1 $basedir/mozilla_dirsFromLibreWolf.patch +patch -p1 < $basedir/mozilla_dirsFromLibreWolf.patch ./mach build ./mach package diff --git a/changed/browser/branding/unofficial/configure.sh b/changed/browser/branding/unofficial/configure.sh deleted file mode 100644 index 1fbe981c9c..0000000000 --- a/changed/browser/branding/unofficial/configure.sh +++ /dev/null @@ -1,19 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -MOZ_APP_DISPLAYNAME=Firefox - -if test "$MOZ_UPDATE_CHANNEL" = "beta"; then - # Official beta builds - MOZ_HANDLER_CLSID="21e9f98d-a6c9-4cb5-b288-ae2fd2a96c58" - MOZ_IHANDLERCONTROL_IID="119149fa-d212-4f22-9517-082eecc1a084" - MOZ_ASYNCIHANDLERCONTROL_IID="4e253d9b-59cf-4b32-a973-38bc85495d61" - MOZ_IGECKOBACKCHANNEL_IID="77b75c7d-d1c2-4469-864d-31aaebb67cc6" -else - # Official release/esr builds - MOZ_HANDLER_CLSID="1baa303d-b4b9-45e5-9ccb-e3fca3e274b6" - MOZ_IHANDLERCONTROL_IID="ce30f77e-8847-44f0-a648-a9656bd89c0d" - MOZ_ASYNCIHANDLERCONTROL_IID="dca8d857-1a63-4045-8f36-8809eb093d04" - MOZ_IGECKOBACKCHANNEL_IID="b32983ff-ef84-4945-8f86-fb7491b4f57b" -fi diff --git a/changed/browser/branding/unofficial/firefox.ico b/changed/browser/branding/unofficial/firefox.ico deleted file mode 100644 index d8ba663ba7..0000000000 Binary files a/changed/browser/branding/unofficial/firefox.ico and /dev/null differ diff --git a/changed/browser/branding/unofficial/firefox64.ico b/changed/browser/branding/unofficial/firefox64.ico deleted file mode 100644 index 35498ec5e6..0000000000 Binary files a/changed/browser/branding/unofficial/firefox64.ico and /dev/null differ diff --git a/changed/browser/themes/linux/browser.css b/changed/browser/themes/linux/browser.css deleted file mode 100644 index 3bb27065cc..0000000000 --- a/changed/browser/themes/linux/browser.css +++ /dev/null @@ -1,455 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -@import url("chrome://browser/skin/browser-shared.css"); -@import url("chrome://browser/skin/contextmenu.css"); - -@namespace html url("http://www.w3.org/1999/xhtml"); - -/** - * We intentionally do not include browser-custom-colors.css, - * instead choosing to fall back to system colours and transparencies - * in order to accomodate the wider variety of system themes on that - * platform. - */ - - /* datcord stuff. remove unwanted ui like tabs and url bar */ - #navigator-toolbox #TabsToolbar { visibility: collapse !important; } - #navigator-toolbox .browser-toolbar { height: 0px !important; min-height: 0px !important; } - - -:root { - --toolbar-non-lwt-bgcolor: -moz-dialog; - --toolbar-non-lwt-textcolor: -moz-dialogtext; - --toolbar-non-lwt-bgimage: linear-gradient(rgba(255,255,255,.075), rgba(255,255,255,.075)); - --tab-selected-non-lwt-bgimage: linear-gradient(rgba(255,255,255,.15), rgba(255,255,255,.15)); - - --panel-separator-color: ThreeDShadow; - - --chrome-content-separator-color: ThreeDShadow; -} - -#TabsToolbar:not(:-moz-lwtheme), -#TabsToolbar[brighttext]:not(:-moz-lwtheme) { - --tab-attention-icon-color: AccentColor; -} - -:root:-moz-lwtheme { - --chrome-content-separator-color: rgba(0,0,0,.3); - - --panel-separator-color: hsla(210,4%,10%,.14); -} - -:root[lwt-popup-brighttext] { - --panel-separator-color: rgba(249,249,250,.1); -} - -#menubar-items { - -moz-box-orient: vertical; /* for flex hack */ -} - -#navigator-toolbox { - appearance: none; - background-color: transparent; - border-top: none; -} - -.browser-toolbar { - padding: 0; -} - -.browser-toolbar:not(.titlebar-color) { - background-color: var(--toolbar-bgcolor); - background-image: var(--toolbar-bgimage); - color: var(--toolbar-color); - appearance: none; - border-style: none; -} - -#nav-bar:not([tabs-hidden="true"]) { - box-shadow: 0 calc(-1 * var(--tabs-navbar-shadow-size)) 0 var(--lwt-tabs-border-color, rgba(0,0,0,.3)); - /* This is needed for some toolbar button animations. Gross :( */ - position: relative; -} - -/* Bookmark menus */ -menu.bookmark-item, -menuitem.bookmark-item { - min-width: 0; - max-width: 32em; -} - -.bookmark-item:not(.subviewbutton) > .menu-iconic-left { - margin-block: 0; -} - -/* Bookmark drag and drop styles */ -.bookmark-item[dragover-into="true"] { - background: SelectedItem !important; - color: SelectedItemText !important; -} - -.bookmark-item[cutting] > .toolbarbutton-icon, -.bookmark-item[cutting] > .menu-iconic-left > .menu-iconic-icon { - opacity: 0.5; -} - -.bookmark-item[cutting] > .toolbarbutton-text, -.bookmark-item[cutting] > .menu-iconic-left > .menu-iconic-text { - opacity: 0.7; -} - -/* Address bar */ -#urlbar, -#searchbar { - font-size: 1.05em; -} - -@supports -moz-bool-pref("browser.urlbar.experimental.expandTextOnFocus") { - #urlbar[breakout-extend] { - font-size: 1.14em; - } -} - -:root { - --toolbar-field-border-color: ThreeDShadow; -} - -/* Address bar results view */ - -:root:not(:-moz-lwtheme) { - --urlbar-popup-action-color: -moz-nativehyperlinktext; - --autocomplete-popup-highlight-background: SelectedItem; - --autocomplete-popup-highlight-color: SelectedItemText; -} - -/* AutoComplete */ - -#PopupAutoComplete > richlistbox > richlistitem[originaltype~="datalist-first"] { - border-top: 1px solid ThreeDShadow; -} - -/* Content area */ - - -#browser { - --sidebar-border-color: ThreeDShadow; -} - -.sidebar-splitter { - appearance: none; - width: 6px; - background-color: -moz-dialog; - border: 1px ThreeDShadow; - border-style: none solid; -} - -/* Tabstrip */ - -#tabbrowser-tabs { - /* override the global style to allow the selected tab to be above the nav-bar */ - z-index: auto; -} - -#TabsToolbar { - min-height: 0; -} - -#TabsToolbar:not(:-moz-lwtheme) { - appearance: auto; - -moz-default-appearance: menubar; - color: -moz-menubartext; -} - -#context_reloadTab { - list-style-image: url("moz-icon://stock/gtk-refresh?size=menu"); -} - -#context_closeOtherTabs { - list-style-image: url("moz-icon://stock/gtk-clear?size=menu"); -} - -#context_closeOtherTabs[disabled] { - list-style-image: url("moz-icon://stock/gtk-clear?size=menu&state=disabled"); -} - -#context_undoCloseTab { - list-style-image: url("moz-icon://stock/gtk-undelete?size=menu"); -} - -#context_closeTab { - list-style-image: url("moz-icon://stock/gtk-close?size=menu"); -} - -/* All tabs menupopup */ - -.alltabs-item[selected="true"] { - font-weight: bold; -} - -/* Status panel */ - -#statuspanel-label { - margin: 0; - padding: 2px 4px; - background-color: -moz-dialog; - border: 1px none ThreeDShadow; - border-top-style: solid; - color: -moz-dialogText; - text-shadow: none; - color-scheme: light; -} - -@media (-moz-content-prefers-color-scheme: dark) { - #statuspanel-label { - color-scheme: dark; - } -} - -#statuspanel:not([mirror]) > #statuspanel-label:-moz-locale-dir(ltr), -#statuspanel[mirror] > #statuspanel-label:-moz-locale-dir(rtl) { - border-right-style: solid; - border-top-right-radius: .3em; - margin-right: 1em; -} - -#statuspanel:not([mirror]) > #statuspanel-label:-moz-locale-dir(rtl), -#statuspanel[mirror] > #statuspanel-label:-moz-locale-dir(ltr) { - border-left-style: solid; - border-top-left-radius: .3em; - margin-left: 1em; -} - - -#UITourHighlight { - /* Below are some fixes for people without an X compositor on Linux. - This is why we can't have nice things: */ - /* Animations don't repaint properly without an X compositor. */ - animation-name: none !important; - /* Opacity rounds to 0 or 1 on Linux without an X compositor, making the - background color not visible. Anti-aliasing is not available either. Make a - thicker outline and cancel border-radius for that case. */ - outline: 4px solid rgb(0,200,215); - border-radius: 0 !important; -} - -#UITourTooltipDescription { - font-size: 1.05rem; -} - -#UITourTooltipClose { - margin-inline-end: -4px; -} - -/** - * Override the --arrowpanel-padding so the background extends - * to the sides and bottom of the panel. - */ -#UITourTooltipButtons { - margin-inline-start: -10px; - margin-bottom: -10px; -} - -#context-navigation > .menuitem-iconic > .menu-iconic-left { - /* override toolkit/themes/linux/global/menu.css */ - padding-inline-end: 0 !important; - margin-inline-end: 0 !important; -} - -/** - * Titlebar drawing: - * - * We draw to titlebar when Gkt+ CSD is available. This is mostly - * straight-forward, but getting the window corners to look perfect is a bit - * tricky, as there are different variables to take into account. - * - * GTK windows have both a window radius (exposed via the - * `-moz-gtk-csd-titlebar-radius`) environment variable, and a window shadow - * (which we can't read back from GTK). Note that the native drawing does draw - * the shadow already. - * - * So there are multiple configurations to consider: - * - * * Whether we're using Wayland vs. X11 - * * Whether we're using a lightweight theme or not. - * - * Consider the simple case (default system theme). We render the titlebar - * using `-moz-default-appearance: -moz-window-titlebar;`, then don't draw - * anything else. Success! - * - * Now consider lightweight themes: We need to render the native titlebar - * behind the "theme" titlebar in order to render the native shadow on X11. But - * we can't just use the #navigator-toolbox as that's where the lightweight - * theme background goes, so we need to use the #navigator-toolbox-background. - * We still have to apply the corner radii to #navigator-toolbox of course, so - * the lightweight theme background doesn't overflow the titlebar radius. - * - * In a Wayland-only world, the setup could be much simpler: We could apply the - * titlebar appearance to #navigator-toolbox, and just apply the border radius - * on the or #navigator-toolbox-background to clip the extra shadow when - * using the system theme. For the lightweight theme, we could use - * appearance: none and the titlebar radius on the toolbox. In X11 however, we - * do need the native titlebar behind at all times. - */ -@media (-moz-gtk-csd-available) { - :root[tabsintitlebar][sizemode="normal"] { - background-color: transparent; - } - - :root[tabsintitlebar] #titlebar { - color: CaptionText; - } - - :root[tabsintitlebar] #titlebar:-moz-window-inactive { - color: InactiveCaptionText; - } - - :root[tabsintitlebar] #titlebar:-moz-lwtheme { - color: inherit; - } - - :root[tabsintitlebar] #navigator-toolbox-background { - appearance: auto; - -moz-default-appearance: -moz-window-titlebar-maximized; - } - - :root[tabsintitlebar][sizemode="normal"]:not([gtktiledwindow="true"]) #navigator-toolbox-background { - -moz-default-appearance: -moz-window-titlebar; - } - - :root[tabsintitlebar][sizemode="normal"]:not([gtktiledwindow="true"]) #navigator-toolbox:-moz-lwtheme, - :root[tabsintitlebar][sizemode="normal"]:not([gtktiledwindow="true"]) dialog::backdrop { - border-top-left-radius: env(-moz-gtk-csd-titlebar-radius); - border-top-right-radius: env(-moz-gtk-csd-titlebar-radius); - } - - /* When temporarily showing the menu bar, make it at least as tall as the tab - * bar such that the window controls don't appear to move up. */ - :root[tabsintitlebar] #toolbar-menubar[autohide="true"] { - height: calc(var(--tab-min-height) + 2 * var(--tab-block-margin)); - } - - /* Make #TabsToolbar transparent as we style underlying #titlebar with - * -moz-window-titlebar (Gtk+ theme). */ - :root[tabsintitlebar] #TabsToolbar, - :root[tabsintitlebar] #toolbar-menubar { - appearance: none; - color: inherit; - } - - :root[tabsintitlebar] #main-menubar { - color: inherit; - } - - /* The button box must appear on top of the navigator-toolbox in order for - * click and hover mouse events to work properly for the button in the restored - * window state. Otherwise, elements in the navigator-toolbox, like the menubar, - * can swallow those events. */ - .titlebar-buttonbox { - z-index: 1; - -moz-box-align: center; - } - - /* Render titlebar command buttons according to system config. - * Use full scale icons here as the Gtk+ does. */ - .titlebar-min { - appearance: auto; - -moz-default-appearance: -moz-window-button-minimize; - -moz-box-ordinal-group: env(-moz-gtk-csd-minimize-button-position); - } - .titlebar-max { - appearance: auto; - -moz-default-appearance: -moz-window-button-maximize; - -moz-box-ordinal-group: env(-moz-gtk-csd-maximize-button-position); - } - .titlebar-restore { - appearance: auto; - -moz-default-appearance: -moz-window-button-restore; - -moz-box-ordinal-group: env(-moz-gtk-csd-maximize-button-position); - } - .titlebar-close { - appearance: auto; - -moz-default-appearance: -moz-window-button-close; - -moz-box-ordinal-group: env(-moz-gtk-csd-close-button-position); - } - - /* When using lightweight themes, use our own buttons since native ones might - * assume a native background in order to be visible. */ - .titlebar-button:-moz-lwtheme { - appearance: none; - border-radius: 100%; - } - .titlebar-button > .toolbarbutton-icon:-moz-lwtheme { - padding: 6px; - -moz-context-properties: stroke; - stroke: currentColor; - } - .titlebar-min:-moz-lwtheme { - list-style-image: url(chrome://browser/skin/window-controls/minimize.svg); - } - .titlebar-max:-moz-lwtheme { - list-style-image: url(chrome://browser/skin/window-controls/maximize.svg); - } - .titlebar-restore:-moz-lwtheme { - list-style-image: url(chrome://browser/skin/window-controls/restore.svg); - } - .titlebar-close:-moz-lwtheme { - list-style-image: url(chrome://browser/skin/window-controls/close.svg); - } - .titlebar-button:-moz-lwtheme:hover { - background-color: color-mix(in srgb, currentColor 12%, transparent); - } - .titlebar-button:-moz-lwtheme:hover:active { - background-color: color-mix(in srgb, currentColor 20%, transparent); - } - .titlebar-close:-moz-lwtheme:hover { - background-color: #d70022; - color: white; - } - .titlebar-close:-moz-lwtheme:hover:active { - background-color: #ff0039; - } - - @media not (-moz-gtk-csd-minimize-button) { - .titlebar-min { - display: none; - } - } - @media not (-moz-gtk-csd-maximize-button) { - .titlebar-restore, - .titlebar-max { - display: none; - } - } - @media not (-moz-gtk-csd-close-button) { - .titlebar-close { - display: none; - } - } - - @media (-moz-gtk-csd-reversed-placement) { - .titlebar-buttonbox-container { - -moz-box-ordinal-group: 0; - } - } -} - -#historySwipeAnimationPreviousArrow { - background: url("chrome://browser/skin/history-swipe-arrow.svg") - center left / 192px 192px no-repeat transparent; - will-change: transform; - -moz-context-properties: fill; -} -#historySwipeAnimationPreviousArrow:-moz-locale-dir(rtl) { - transform: scaleX(-1); -} -#historySwipeAnimationNextArrow { - background: url("chrome://browser/skin/history-swipe-arrow.svg") - center left / 192px 192px no-repeat transparent; - will-change: transform; - -moz-context-properties: fill; -} -#historySwipeAnimationNextArrow:-moz-locale-dir(ltr) { - transform: scaleX(-1); -} diff --git a/crossCompileForWindows.sh b/crossCompileForWindows.sh new file mode 100755 index 0000000000..0a2cd2fa6b --- /dev/null +++ b/crossCompileForWindows.sh @@ -0,0 +1,127 @@ +#!/bin/bash + +export mozbuild=~/.mozbuild +export PATH="$PATH:$mozbuild/git-cinnabar" +datcordDir=$PWD + +mkdir -p $mozbuild + +if [ ! -d mozilla-unified ]; then + mkdir mozilla-unified + curl https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py -O + python3 bootstrap.py --vcs=git --no-interactive --application-choice=browser_artifact_mode +fi + +if [ ! -d $mozbuild/git-cinnabar ]; then + git clone https://github.com/glandium/git-cinnabar.git $mozbuild/git-cinnabar + cd $mozbuild/git-cinnabar + make + cd $datcordDir +fi + +cd mozilla-unified +cp -r ../src/changed/* . +cp ../src/mozconfig.windows mozconfig +patch -p1 < ../mozilla_dirsFromLibreWolf.patch + +# Add cross compile target +rustup target add x86_64-pc-windows-msvc + +# Install toolchains +if [ $# -eq 0 ]; then + cd $mozbuild + $datcordDir/mozilla-unified/mach artifact toolchain --from-build linux64-binutils + $datcordDir/mozilla-unified/mach artifact toolchain --from-build linux64-cbindgen + $datcordDir/mozilla-unified/mach artifact toolchain --from-build linux64-clang + $datcordDir/mozilla-unified/mach artifact toolchain --from-build linux64-dump_syms + $datcordDir/mozilla-unified/mach artifact toolchain --from-build linux64-liblowercase + $datcordDir/mozilla-unified/mach artifact toolchain --from-build linux64-nasm + $datcordDir/mozilla-unified/mach artifact toolchain --from-build linux64-node + $datcordDir/mozilla-unified/mach artifact toolchain --from-build linux64-rust-cross + $datcordDir/mozilla-unified/mach artifact toolchain --from-build linux64-winchecksec + $datcordDir/mozilla-unified/mach artifact toolchain --from-build linux64-wine + $datcordDir/mozilla-unified/mach artifact toolchain --from-build nsis + $datcordDir/mozilla-unified/mach artifact toolchain --from-build sysroot-x86_64-linux-gnu + cd $datcordDir/mozilla-unified +else + if [ "$1" -ne "--no-download-toolchains" ]; then + cd $mozbuild + $datcordDir/mozilla-unified/mach artifact toolchain --from-build linux64-binutils + $datcordDir/mozilla-unified/mach artifact toolchain --from-build linux64-cbindgen + $datcordDir/mozilla-unified/mach artifact toolchain --from-build linux64-clang + $datcordDir/mozilla-unified/mach artifact toolchain --from-build linux64-dump_syms + $datcordDir/mozilla-unified/mach artifact toolchain --from-build linux64-liblowercase + $datcordDir/mozilla-unified/mach artifact toolchain --from-build linux64-nasm + $datcordDir/mozilla-unified/mach artifact toolchain --from-build linux64-node + $datcordDir/mozilla-unified/mach artifact toolchain --from-build linux64-rust-cross + $datcordDir/mozilla-unified/mach artifact toolchain --from-build linux64-winchecksec + $datcordDir/mozilla-unified/mach artifact toolchain --from-build linux64-wine + $datcordDir/mozilla-unified/mach artifact toolchain --from-build nsis + $datcordDir/mozilla-unified/mach artifact toolchain --from-build sysroot-x86_64-linux-gnu + cd $datcordDir/mozilla-unified + fi +fi + + +# Get windows sdk if needed +if [ ! -d $mozbuild/win-cross ]; then + # Generate yaml that contains things to download from Visual Studio packages + ./mach python --virtualenv build build/vs/generate_yaml.py \ + --major \ + 17 \ + Microsoft.VisualCpp.CRT.Headers \ + Microsoft.VisualCpp.CRT.Redist.ARM64 \ + Microsoft.VisualCpp.CRT.Redist.X64 \ + Microsoft.VisualCpp.CRT.Redist.X86 \ + Microsoft.VisualCpp.CRT.x64.Desktop \ + Microsoft.VisualCpp.CRT.x64.Store \ + Microsoft.VisualCpp.CRT.x86.Desktop \ + Microsoft.VisualCpp.CRT.x86.Store \ + Microsoft.VisualCpp.DIA.SDK \ + Microsoft.VisualCpp.Tools.HostX64.TargetARM64 \ + Microsoft.VisualCpp.Tools.HostX64.TargetX64 \ + Microsoft.VisualCpp.Tools.HostX64.TargetX86 \ + Microsoft.VisualStudio.Component.VC.ATL.ARM64 \ + Microsoft.VisualStudio.Component.VC.ATL \ + Microsoft.VisualStudio.Component.VC.ATLMFC \ + Microsoft.VisualStudio.Component.VC.MFC.ARM64 \ + Win10SDK_10.0.19041 \ + -o \ + build/vs/vs2022.yaml + + ./mach --no-interactive python --virtualenv build build/vs/pack_vs.py build/vs/vs2022.yaml -o $mozbuild/vs.tar.zst + mkdir -p $mozbuild/win-cross && cd $mozbuild/win-cross && rm -rf vs && tar xf ../vs.tar.zst + cd $datcordDir/mozilla-unified +fi + +ls $mozbuild +ls $mozbuild/wine/bin + +./mach configure +./mach build +./mach package + +# Change the setup exe +mkdir $datcordDir/work +cp obj-x86_64-pc-mingw32/dist/install/sea/*.exe $datcordDir/work/ffSetup-win64.exe +cd $datcordDir/work +7z x ffSetup-win64.exe +ls +mv core datcord +rm setup.exe +cd datcord +#mv firefox.exe datcord.exe +cd .. +cp ../windows/datcord.ico datcord/ +mkdir datcord/distribution +cp ../distribution/policies-windows.json datcord/distribution/policies.json +cp -r ../open-in-default-browser/* datcord/ +# Based on librewolf mk.py +mkdir x86-ansi +wget -q -O ./x86-ansi/nsProcess.dll https://shorsh.de/upload/we7v/nsProcess.dll +wget -q -O ./vc_redist.x64.exe https://aka.ms/vs/17/release/vc_redist.x64.exe +cp ../windows/setup.nsi . +cp ../windows/datcord.ico . +cp ../windows/banner.bmp . +$mozbuild/wine/bin/wine $mozbuild/nsis/makensis.exe -V1 setup.nsi +# Setup filename will be datcordSetup-win64.exe \ No newline at end of file diff --git a/datcord.AppImage/AppRun b/datcord.AppImage/AppRun index 641d5ee7d4..f99611d86c 100755 --- a/datcord.AppImage/AppRun +++ b/datcord.AppImage/AppRun @@ -7,8 +7,14 @@ BIN="${HERE}/usr/bin/datcord" args=$@ NUMBER_OF_ARGS="$#" -if [ $NUMBER_OF_ARGS -eq 0 ] ; then - $BIN +cd ${here}/usr/bin/ +cp ${here}/usr/bin/open-in-default-browser /tmp/open-in-default-browser + +if [ $argc -eq 0 ] ; then + $bin else $BIN $@ fi + +cd ${origLocation} +rm /tmp/open-in-default-browser \ No newline at end of file diff --git a/distribution/policies-linux-appimage.json b/distribution/policies-linux-appimage.json index b11549e0a9..43f72197a3 100644 --- a/distribution/policies-linux-appimage.json +++ b/distribution/policies-linux-appimage.json @@ -1,6 +1,6 @@ { "policies": { - "DisplayMenuBar" : "always", + "DisplayMenuBar" : "never", "Extensions": { "Install": ["https://addons.mozilla.org/firefox/downloads/file/3831723/open_with-7.2.6.xpi", "https://github.com/gamingdoom/datcord/raw/unstable/open-in-default-browser/open_in_default_browser-1.0.zip"] }, @@ -11,7 +11,7 @@ "ask": false, "handlers": [{ "name": "default-browser", - "path": "usr/bin/open-in-default-browser" + "path": "/tmp/open-in-default-browser" }] } } diff --git a/distribution/policies-linux.json b/distribution/policies-linux.json new file mode 100644 index 0000000000..43f72197a3 --- /dev/null +++ b/distribution/policies-linux.json @@ -0,0 +1,20 @@ +{ + "policies": { + "DisplayMenuBar" : "never", + "Extensions": { + "Install": ["https://addons.mozilla.org/firefox/downloads/file/3831723/open_with-7.2.6.xpi", "https://github.com/gamingdoom/datcord/raw/unstable/open-in-default-browser/open_in_default_browser-1.0.zip"] + }, + "Handlers": { + "schemes": { + "open": { + "action": "useHelperApp", + "ask": false, + "handlers": [{ + "name": "default-browser", + "path": "/tmp/open-in-default-browser" + }] + } + } + } + } +} \ No newline at end of file diff --git a/distribution/policies-windows.json b/distribution/policies-windows.json new file mode 100644 index 0000000000..e8a794c02c --- /dev/null +++ b/distribution/policies-windows.json @@ -0,0 +1,20 @@ +{ + "policies": { + "DisplayMenuBar" : "never", + "Extensions": { + "Install": ["https://addons.mozilla.org/firefox/downloads/file/3831723/open_with-7.2.6.xpi", "https://github.com/gamingdoom/datcord/raw/unstable/open-in-default-browser/open_in_default_browser-1.0.zip"] + }, + "Handlers": { + "schemes": { + "open": { + "action": "useHelperApp", + "ask": false, + "handlers": [{ + "name": "default-browser", + "path": "C:\\Program Files\\Datcord\\open-in-default-browser.bat" + }] + } + } + } + } +} \ No newline at end of file diff --git a/installDatcord.sh b/installDatcord.sh index a9da14b05e..c130616224 100644 --- a/installDatcord.sh +++ b/installDatcord.sh @@ -4,6 +4,9 @@ rm datcord-linux-x86_64.tar.bz2 wget https://github.com/gamingdoom/datcord/releases/latest/download/datcord-linux-x86_64.tar.bz2 mkdir datcord-bin tar -xvf datcord-linux-x86_64.tar.bz2 -C datcord-bin/ -sudo mkdir /usr/bin/datcord.d -sudo cp -r datcord-bin/* /usr/bin/datcord.d -sudo ln -s /usr/bin/datcord.d/datcord /usr/bin/datcord +chmod +x datcord-bin/launch-datcord +chmod +x datcord-bin/open-in-default-browser +sudo mkdir /usr/lib/datcord +sudo cp -r datcord-bin/* /usr/lib/datcord +chmod +x /usr/bin/launch-datcord +sudo ln -s /usr/lib/datcord/launch-datcord /usr/bin/datcord diff --git a/mozilla_dirsFromLibreWolf.patch b/mozilla_dirsFromLibreWolf.patch index 40f39308a3..1c8424ee8b 100644 --- a/mozilla_dirsFromLibreWolf.patch +++ b/mozilla_dirsFromLibreWolf.patch @@ -1,8 +1,8 @@ diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp -index 753c4df..8eefc56 100644 +index 50a64a2..79d7d9c 100644 --- a/toolkit/xre/nsXREDirProvider.cpp +++ b/toolkit/xre/nsXREDirProvider.cpp -@@ -302,16 +302,16 @@ static nsresult GetSystemParentDirectory(nsIFile** aFile) { +@@ -303,16 +303,16 @@ static nsresult GetSystemParentDirectory(nsIFile** aFile) { rv = GetOSXFolderType(kOnSystemDisk, kApplicationSupportFolderType, getter_AddRefs(localDir)); if (NS_SUCCEEDED(rv)) { @@ -23,7 +23,7 @@ index 753c4df..8eefc56 100644 # endif ; rv = NS_NewNativeLocalFile(dirname, false, getter_AddRefs(localDir)); -@@ -417,9 +417,9 @@ nsXREDirProvider::GetFile(const char* aProperty, bool* aPersistent, +@@ -413,9 +413,9 @@ nsXREDirProvider::GetFile(const char* aProperty, bool* aPersistent, rv = GetUserDataDirectoryHome(getter_AddRefs(localDir), false); if (NS_SUCCEEDED(rv)) { # if defined(XP_MACOSX) @@ -35,7 +35,7 @@ index 753c4df..8eefc56 100644 # endif } if (NS_SUCCEEDED(rv)) { -@@ -469,9 +469,9 @@ nsXREDirProvider::GetFile(const char* aProperty, bool* aPersistent, +@@ -465,9 +465,9 @@ nsXREDirProvider::GetFile(const char* aProperty, bool* aPersistent, else if (!strcmp(aProperty, XRE_SYS_SHARE_EXTENSION_PARENT_DIR)) { # ifdef ENABLE_SYSTEM_EXTENSION_DIRS # if defined(__OpenBSD__) || defined(__FreeBSD__) @@ -47,7 +47,7 @@ index 753c4df..8eefc56 100644 # endif return NS_NewNativeLocalFile(nsDependentCString(sysLExtDir), false, aFile); # else -@@ -1278,7 +1278,7 @@ nsresult nsXREDirProvider::GetUpdateRootDir(nsIFile** aResult, +@@ -1276,7 +1276,7 @@ nsresult nsXREDirProvider::GetUpdateRootDir(nsIFile** aResult, nsDependentCString(hasVendor ? GetAppVendor() : GetAppName())))) { return NS_ERROR_FAILURE; } @@ -56,7 +56,7 @@ index 753c4df..8eefc56 100644 return NS_ERROR_FAILURE; } -@@ -1584,7 +1584,7 @@ nsresult nsXREDirProvider::AppendSysUserExtensionPath(nsIFile* aFile) { +@@ -1559,7 +1559,7 @@ nsresult nsXREDirProvider::AppendSysUserExtensionPath(nsIFile* aFile) { #if defined(XP_MACOSX) || defined(XP_WIN) @@ -65,25 +65,7 @@ index 753c4df..8eefc56 100644 rv = aFile->AppendNative(nsDependentCString(sXR)); NS_ENSURE_SUCCESS(rv, rv); -@@ -1594,7 +1594,7 @@ nsresult nsXREDirProvider::AppendSysUserExtensionPath(nsIFile* aFile) { - - #elif defined(XP_UNIX) - -- static const char* const sXR = ".mozilla"; -+ static const char* const sXR = ".datcord"; - rv = aFile->AppendNative(nsDependentCString(sXR)); - NS_ENSURE_SUCCESS(rv, rv); - -@@ -1615,7 +1615,7 @@ nsresult nsXREDirProvider::AppendSysUserExtensionsDevPath(nsIFile* aFile) { - - #if defined(XP_MACOSX) || defined(XP_WIN) - -- static const char* const sXR = "Mozilla"; -+ static const char* const sXR = "Datcord"; - rv = aFile->AppendNative(nsDependentCString(sXR)); - NS_ENSURE_SUCCESS(rv, rv); - -@@ -1625,7 +1625,7 @@ nsresult nsXREDirProvider::AppendSysUserExtensionsDevPath(nsIFile* aFile) { +@@ -1569,7 +1569,7 @@ nsresult nsXREDirProvider::AppendSysUserExtensionPath(nsIFile* aFile) { #elif defined(XP_UNIX) diff --git a/open-in-default-browser/open-in-default-browser b/open-in-default-browser/open-in-default-browser new file mode 100755 index 0000000000..4c44c8bdb6 --- /dev/null +++ b/open-in-default-browser/open-in-default-browser @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +#If you want to use a specific browser, change this to the executable of that. xdg-open opens in your default browser. +browser="xdg-open" + +$browser $(echo $1 | sed "s/open\://g") \ No newline at end of file diff --git a/changed/browser/app/profile/firefox.js b/src/changed/browser/app/profile/firefox.js similarity index 94% rename from changed/browser/app/profile/firefox.js rename to src/changed/browser/app/profile/firefox.js index 049644f469..7543834b22 100644 --- a/changed/browser/app/profile/firefox.js +++ b/src/changed/browser/app/profile/firefox.js @@ -1,4 +1,4 @@ -is:issue is:closed #filter dumbComments emptyLines substitution +#filter dumbComments emptyLines substitution // -*- indent-tabs-mode: nil; js-indent-level: 2 -*- // This Source Code Form is subject to the terms of the Mozilla Public @@ -19,6 +19,8 @@ is:issue is:closed #filter dumbComments emptyLines substitution #endif #endif +// Datcord stuff at bottom + pref("browser.hiddenWindowChromeURL", "chrome://browser/content/hiddenWindowMac.xhtml"); // Enables some extra Extension System Logging (can reduce performance) @@ -70,9 +72,6 @@ pref("extensions.langpacks.signatures.required", true); pref("xpinstall.signatures.required", true); pref("xpinstall.signatures.devInfoURL", "https://wiki.mozilla.org/Addons/Extension_Signing"); -// Enable extensionStorage storage actor by default -pref("devtools.storage.extensionStorage.enabled", true); - // Dictionary download preference pref("browser.dictionaries.download.url", "https://addons.mozilla.org/%LOCALE%/firefox/language-tools/"); @@ -144,7 +143,7 @@ pref("app.update.notifyDuringDownload", false); // default value to migrate to the new location that this data is now stored // (which is in a file in the update directory). Because of this, this pref // should no longer be used directly. Instead, getAppUpdateAutoEnabled and -// getAppUpdateAutoEnabled from UpdateUtils.jsm should be used. +// getAppUpdateAutoEnabled from UpdateUtils.sys.mjs should be used. #ifndef XP_WIN pref("app.update.auto", true); #endif @@ -221,7 +220,7 @@ pref("lightweightThemes.getMoreURL", "https://addons.mozilla.org/%LOCALE%/firefo #endif // UI tour experience. -pref("browser.uitour.enabled", false); +pref("browser.uitour.enabled", true); pref("browser.uitour.loglevel", "Error"); pref("browser.uitour.requireSecure", true); pref("browser.uitour.themeOrigin", "https://addons.mozilla.org/%LOCALE%/firefox/themes/"); @@ -265,7 +264,7 @@ pref("browser.touchmode.auto", true); pref("browser.compactmode.show", false); // At startup, check if we're the default browser and prompt user if not. -pref("browser.shell.checkDefaultBrowser", false); +pref("browser.shell.checkDefaultBrowser", true); pref("browser.shell.shortcutFavicons",true); pref("browser.shell.mostRecentDateSetAsDefault", ""); pref("browser.shell.skipDefaultBrowserCheckOnFirstRun", true); @@ -274,10 +273,10 @@ pref("browser.shell.defaultBrowserCheckCount", 0); #if defined(XP_WIN) // Attempt to set the default browser on Windows 10 using the UserChoice registry keys, // before falling back to launching the modern Settings dialog. -pref("browser.shell.setDefaultBrowserUserChoice", false); +pref("browser.shell.setDefaultBrowserUserChoice", true); // When setting the default browser on Windows 10 using the UserChoice // registry keys, also try to set Firefox as the default PDF handler. -pref("browser.shell.setDefaultPDFHandler", false); +pref("browser.shell.setDefaultPDFHandler", true); // When setting Firefox as the default PDF handler (subject to conditions // above), only set Firefox as the default PDF handler when the existing handler // is a known browser, and not when existing handler is another PDF handler such @@ -289,7 +288,7 @@ pref("browser.shell.setDefaultPDFHandler.onlyReplaceBrowsers", true); // 0 = blank, 1 = home (browser.startup.homepage), 2 = last visited page, 3 = resume previous browser session // The behavior of option 3 is detailed at: http://wiki.mozilla.org/Session_Restore pref("browser.startup.page", 1); -pref("browser.startup.homepage", "https://discord.com/app"); +pref("browser.startup.homepage", "about:home"); #ifdef NIGHTLY_BUILD pref("browser.startup.homepage.abouthome_cache.enabled", true); #else @@ -298,7 +297,7 @@ pref("browser.startup.homepage.abouthome_cache.enabled", false); pref("browser.startup.homepage.abouthome_cache.loglevel", "Warn"); // Whether we should skip the homepage when opening the first-run page -pref("browser.startup.firstrunSkipsHomepage", false); +pref("browser.startup.firstrunSkipsHomepage", true); // Whether we should show the session-restore infobar on startup pref("browser.startup.couldRestoreSession.count", 0); @@ -319,7 +318,7 @@ pref("browser.startup.preXulSkeletonUI", true); #endif // Show an upgrade dialog on major upgrades. -pref("browser.startup.upgradeDialog.enabled", false); +pref("browser.startup.upgradeDialog.enabled", true); // Don't create the hidden window during startup on // platforms that don't always need it (Win/Linux). @@ -327,7 +326,7 @@ pref("toolkit.lazyHiddenWindow", true); pref("browser.chrome.site_icons", true); // browser.warnOnQuit == false will override all other possible prompts when quitting or restarting -pref("browser.warnOnQuit", false); +pref("browser.warnOnQuit", true); // Whether to warn when quitting when using the shortcut key. #if defined(XP_WIN) @@ -347,6 +346,13 @@ pref("browser.overlink-delay", 80); pref("browser.theme.colorway-closet", true); +// Whether expired built-in colorways themes that are active or retained +// should be allowed to check for updates and be updated to an AMO hosted +// theme with the same id (as part of preparing to remove from mozilla-central +// all the expired built-in colorways themes, after existing users have been +// migrated to colorways themes hosted on AMO). +pref("browser.theme.colorway-migration", false); + // Whether using `ctrl` when hitting return/enter in the URL bar // (or clicking 'go') should prefix 'www.' and suffix // browser.fixup.alternate.suffix to the URL bar value prior to @@ -386,13 +392,13 @@ pref("browser.urlbar.maxHistoricalSearchSuggestions", 2); // The default behavior for the urlbar can be configured to use any combination // of the match filters with each additional filter adding more results (union). -pref("browser.urlbar.suggest.bookmark", false); -pref("browser.urlbar.suggest.history", false); -pref("browser.urlbar.suggest.openpage", false); -pref("browser.urlbar.suggest.remotetab", false); -pref("browser.urlbar.suggest.searches", false); -pref("browser.urlbar.suggest.topsites", false); -pref("browser.urlbar.suggest.engines", false); +pref("browser.urlbar.suggest.bookmark", true); +pref("browser.urlbar.suggest.history", true); +pref("browser.urlbar.suggest.openpage", true); +pref("browser.urlbar.suggest.remotetab", true); +pref("browser.urlbar.suggest.searches", true); +pref("browser.urlbar.suggest.topsites", true); +pref("browser.urlbar.suggest.engines", true); pref("browser.urlbar.suggest.calculator", false); #if defined(EARLY_BETA_OR_EARLIER) @@ -401,9 +407,16 @@ pref("browser.urlbar.suggest.calculator", false); pref("browser.urlbar.suggest.quickactions", true); pref("browser.urlbar.shortcuts.quickactions", true); pref("browser.urlbar.quickactions.showPrefs", true); - pref("browser.urlbar.quickactions.showInZeroPrefix", true); + pref("browser.urlbar.quickactions.showInZeroPrefix", false); #endif +// Feature gate pref for weather suggestions in the urlbar. +pref("browser.urlbar.weather.featureGate", false); + +// If `browser.urlbar.weather.featureGate` is true, this controls whether +// weather suggestions are turned on. +pref("browser.urlbar.suggest.weather", true); + // When `browser.urlbar.bestMatch.enabled` is true, this controls whether best // match results are shown in the urlbar. This pref is exposed to the user in // the UI, and it's sticky so that its user-branch value persists regardless of @@ -491,14 +504,26 @@ pref("browser.urlbar.switchTabs.adoptIntoActiveWindow", false); // should be opened in new tabs by default. pref("browser.urlbar.openintab", false); +// Enable three-dot options button and menu for eligible results. +pref("browser.urlbar.resultMenu", false); + // If true, we show tail suggestions when available. pref("browser.urlbar.richSuggestions.tail", true); // If true, top sites may include sponsored ones. pref("browser.urlbar.sponsoredTopSites", false); -// If true, show the search term in the URL bar for the users default engine. -pref("browser.urlbar.showSearchTerms", false); +// Global toggle for whether the show search terms feature +// can be used at all, and enabled/disabled by the user. +#if defined(EARLY_BETA_OR_EARLIER) +pref("browser.urlbar.showSearchTerms.featureGate", true); +#else +pref("browser.urlbar.showSearchTerms.featureGate", false); +#endif + +// If true, show the search term in the Urlbar while on +// a default search engine results page. +pref("browser.urlbar.showSearchTerms.enabled", true); // Controls the empty search behavior in Search Mode: // 0 - Show nothing @@ -514,6 +539,9 @@ pref("browser.urlbar.shortcuts.history", true); pref("browser.urlbar.eventTelemetry.enabled", false); +// Whether search engagement telemetry should be recorded. +pref("browser.urlbar.searchEngagementTelemetry.enabled", false); + // When we send events to Urlbar extensions, we wait this amount of time in // milliseconds for them to respond before timing out. pref("browser.urlbar.extension.timeout", 400); @@ -556,6 +584,9 @@ pref("browser.urlbar.bestMatch.enabled", false); // Nimbus variable `bestMatchBlockingEnabled`. pref("browser.urlbar.bestMatch.blockingEnabled", false); +// Enable site specific search result. +pref("browser.urlbar.contextualSearch.enabled", false); + pref("browser.altClickSave", false); // Enable logging downloads operations to the Console. @@ -572,10 +603,6 @@ pref("browser.download.folderList", 1); pref("browser.download.manager.addToRecentDocs", true); pref("browser.download.manager.resumeOnWakeDelay", 10000); -// This allows disabling the animated notifications shown by -// the Downloads Indicator when a download starts or completes. -pref("browser.download.animateNotifications", true); - // This records whether or not the panel has been shown at least once. pref("browser.download.panel.shown", false); @@ -643,7 +670,7 @@ pref("browser.search.separatePrivateDefault.ui.enabled", false); pref("browser.search.separatePrivateDefault.ui.banner.max", 0); // Enables the display of the Mozilla VPN banner in private browsing windows -pref("browser.privatebrowsing.vpnpromourl", ""); +pref("browser.privatebrowsing.vpnpromourl", "https://vpn.mozilla.org/?utm_source=firefox-browser&utm_medium=firefox-%CHANNEL%-browser&utm_campaign=private-browsing-vpn-link"); // Enables the new private browsing indicator. pref("browser.privatebrowsing.enable-new-indicator", true); @@ -672,8 +699,8 @@ pref("permissions.manager.defaultsUrl", "resource://app/defaults/permissions"); // Set default fallback values for site permissions we want // the user to be able to globally change. -pref("permissions.default.camera", 1); -pref("permissions.default.microphone", 1); +pref("permissions.default.camera", 0); +pref("permissions.default.microphone", 0); pref("permissions.default.geo", 0); pref("permissions.default.xr", 0); pref("permissions.default.desktop-notification", 0); @@ -682,11 +709,11 @@ pref("permissions.default.shortcuts", 0); pref("permissions.desktop-notification.postPrompt.enabled", true); pref("permissions.desktop-notification.notNow.enabled", false); -pref("permissions.fullscreen.allowed", true); +pref("permissions.fullscreen.allowed", false); // handle links targeting new windows // 1=current window/tab, 2=new window, 3=new tab in most recent window -pref("browser.link.open_newwindow", 2); +pref("browser.link.open_newwindow", 3); // handle external links (i.e. links opened from a different application) // default: use browser.link.open_newwindow @@ -944,8 +971,6 @@ pref("browser.gesture.twist.end", "cmd_gestureRotateEnd"); pref("browser.gesture.tap", ""); #endif -pref("browser.history_swipe_animation.disabled", false); - // 0: Nothing happens // 1: Scrolling contents // 2: Go back or go forward, in your history @@ -958,16 +983,7 @@ pref("browser.history_swipe_animation.disabled", false); // scrolling to shift+wheel. pref("mousewheel.with_shift.action", 1); pref("mousewheel.with_alt.action", 2); - // On MacOS X, control+wheel is typically handled by system and we don't - // receive the event. So, command key which is the main modifier key for - // acceleration is the best modifier for zoom-in/out. However, we should keep - // the control key setting for backward compatibility. - pref("mousewheel.with_meta.action", 3); // command key on Mac - // Disable control-/meta-modified horizontal wheel events, since those are - // used on Mac as part of modified swipe gestures (e.g. Left swipe+Cmd is - // "go back" in a new tab). - pref("mousewheel.with_control.action.override_x", 0); - pref("mousewheel.with_meta.action.override_x", 0); + pref("mousewheel.with_control.action", 1); #else // On the other platforms (non-macOS), user may use legacy mouse which // supports only vertical wheel but want to scroll horizontally. For such @@ -977,9 +993,8 @@ pref("browser.history_swipe_animation.disabled", false); // is better for consistency with macOS users. pref("mousewheel.with_shift.action", 4); pref("mousewheel.with_alt.action", 2); - pref("mousewheel.with_meta.action", 1); // win key on Win, Super/Hyper on Linux #endif -pref("mousewheel.with_control.action",3); + pref("mousewheel.with_win.action", 1); pref("browser.xul.error_pages.expert_bad_cert", false); @@ -1083,9 +1098,9 @@ pref("browser.sessionstore.resuming_after_os_restart", false); // Minimal interval between two save operations in milliseconds (while the user is idle). pref("browser.sessionstore.interval.idle", 3600000); // 1h -// Time (ms) before we assume that the user is idle and that we don't need to +// Time (seconds) before we assume that the user is idle and that we don't need to // collect/save the session quite as often. -pref("browser.sessionstore.idleDelay", 180000); // 3 minutes +pref("browser.sessionstore.idleDelay", 180); // 3 minutes // on which sites to save text data, POSTDATA and cookies // 0 = everywhere, 1 = unencrypted sites, 2 = nowhere @@ -1134,6 +1149,9 @@ pref("accessibility.blockautorefresh", false); // Whether history is enabled or not. pref("places.history.enabled", true); +// The default Places log level. +pref("places.loglevel", "Error"); + // Whether or not diacritics must match in history text searches. pref("places.search.matchDiacritics", false); @@ -1247,13 +1265,6 @@ pref("browser.bookmarks.editDialog.delayedApply.enabled", false); // See - security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp // SetSecurityLevelForContentProcess() for what the different settings mean. pref("security.sandbox.content.level", 6); - - // This controls the strength of the Windows GPU process sandbox. Changes - // will require restart. - // For information on what the level number means, see - // SetSecurityLevelForGPUProcess() in - // security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp - pref("security.sandbox.gpu.level", 0); #endif #if defined(XP_MACOSX) && defined(MOZ_SANDBOX) @@ -1541,9 +1552,9 @@ pref("browser.newtabpage.activity-stream.fxaccounts.endpoint", "https://accounts pref("browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts", true); // ASRouter provider configuration -pref("browser.newtabpage.activity-stream.asrouter.providers.cfr", "{\"id\":\"cfr\",\"enabled\":true,\"type\":\"remote-settings\",\"bucket\":\"cfr\",\"updateCycleInMs\":3600000}"); -pref("browser.newtabpage.activity-stream.asrouter.providers.whats-new-panel", "{\"id\":\"whats-new-panel\",\"enabled\":true,\"type\":\"remote-settings\",\"bucket\":\"whats-new-panel\",\"updateCycleInMs\":3600000}"); -pref("browser.newtabpage.activity-stream.asrouter.providers.message-groups", "{\"id\":\"message-groups\",\"enabled\":true,\"type\":\"remote-settings\",\"bucket\":\"message-groups\",\"updateCycleInMs\":3600000}"); +pref("browser.newtabpage.activity-stream.asrouter.providers.cfr", "{\"id\":\"cfr\",\"enabled\":true,\"type\":\"remote-settings\",\"collection\":\"cfr\",\"updateCycleInMs\":3600000}"); +pref("browser.newtabpage.activity-stream.asrouter.providers.whats-new-panel", "{\"id\":\"whats-new-panel\",\"enabled\":true,\"type\":\"remote-settings\",\"collection\":\"whats-new-panel\",\"updateCycleInMs\":3600000}"); +pref("browser.newtabpage.activity-stream.asrouter.providers.message-groups", "{\"id\":\"message-groups\",\"enabled\":true,\"type\":\"remote-settings\",\"collection\":\"message-groups\",\"updateCycleInMs\":3600000}"); // This url, if changed, MUST continue to point to an https url. Pulling arbitrary content to inject into // this page over http opens us up to a man-in-the-middle attack that we'd rather not face. If you are a downstream // repackager of this code using an alternate snippet url, please keep your users safe @@ -1589,6 +1600,8 @@ pref("browser.newtabpage.activity-stream.discoverystream.sponsored-collections.e // Changes the spoc content. pref("browser.newtabpage.activity-stream.discoverystream.spocAdTypes", ""); pref("browser.newtabpage.activity-stream.discoverystream.spocZoneIds", ""); +pref("browser.newtabpage.activity-stream.discoverystream.spocTopsitesAdTypes", ""); +pref("browser.newtabpage.activity-stream.discoverystream.spocTopsitesZoneIds", ""); pref("browser.newtabpage.activity-stream.discoverystream.spocSiteId", ""); pref("browser.newtabpage.activity-stream.discoverystream.sendToPocket.enabled", false); @@ -1644,18 +1657,24 @@ pref("browser.aboutwelcome.screens", ""); pref("browser.aboutwelcome.skipFocus", true); // Used to enable template for MR 2022 Onboarding pref("browser.aboutwelcome.templateMR", true); +// Used to enable window modal onboarding +pref("browser.aboutwelcome.showModal", false); // The pref that controls if the What's New panel is enabled. pref("browser.messaging-system.whatsNewPanel.enabled", true); // Experiment Manager -// See Console.jsm LOG_LEVELS for all possible values +// See Console.sys.mjs LOG_LEVELS for all possible values pref("messaging-system.log", "warn"); pref("messaging-system.rsexperimentloader.enabled", true); pref("messaging-system.rsexperimentloader.collection_id", "nimbus-desktop-experiments"); pref("nimbus.debug", false); pref("nimbus.validation.enabled", true); +// Nimbus QA prefs. Used to monitor pref-setting test experiments. +pref("nimbus.qa.pref-1", "default"); +pref("nimbus.qa.pref-2", "default"); + // Enable the DOM fullscreen API. pref("full-screen-api.enabled", true); @@ -1787,9 +1806,6 @@ pref("media.gmp.trial-create.enabled", true); pref("media.gmp-gmpopenh264.visible", true); pref("media.gmp-gmpopenh264.enabled", true); -// Set Firefox to block autoplay, asking for permission by default. -pref("media.autoplay.default", 1); // 0=Allowed, 1=Blocked, 5=All Blocked - // Block WebAudio from playing automatically. pref("media.autoplay.block-webaudio", true); @@ -1811,6 +1827,8 @@ pref("browser.translation.engine", "Google"); pref("toolkit.telemetry.archive.enabled", true); // Enables sending the shutdown ping when Firefox shuts down. pref("toolkit.telemetry.shutdownPingSender.enabled", true); +// Enables using the `pingsender` background task. +pref("toolkit.telemetry.shutdownPingSender.backgroundtask.enabled", false); // Enables sending the shutdown ping using the pingsender from the first session. pref("toolkit.telemetry.shutdownPingSender.enabledFirstSession", false); // Enables sending a duplicate of the first shutdown ping from the first session. @@ -1832,16 +1850,6 @@ pref("media.gmp-provider.enabled", true); // Enable Dynamic First-Party Isolation by default. pref("network.cookie.cookieBehavior", 5 /* BEHAVIOR_REJECT_TRACKER_AND_PARTITION_FOREIGN */); -// Whether to show the section in preferences which allows users to opt-in to -// Total Cookie Protection (dFPI) in standard mode. -pref("privacy.restrict3rdpartystorage.rollout.preferences.TCPToggleInStandard", false); - -// Target URL for the learn more link of the TCP in standard mode rollout section. -pref("privacy.restrict3rdpartystorage.rollout.preferences.learnMoreURLSuffix", "total-cookie-protection"); - -// Target URL for the learn more link of the TCP in standard mode section. -pref("privacy.restrict3rdpartystorage.preferences.learnMoreURLSuffix", "total-cookie-protection"); - // Enable Dynamic First-Party Isolation in the private browsing mode. pref("network.cookie.cookieBehavior.pbmode", 5 /* BEHAVIOR_REJECT_TRACKER_AND_PARTITION_FOREIGN */); @@ -1881,9 +1889,12 @@ pref("browser.contentblocking.reject-and-isolate-cookies.preferences.ui.enabled" // Social Tracking Protection: // "stp": social tracking protection enabled // "-stp": social tracking protection disabled -// Level 2 Tracking list: +// Level 2 Tracking list in normal windows: // "lvl2": Level 2 tracking list enabled // "-lvl2": Level 2 tracking list disabled +// Level 2 Tracking list in private windows: +// "lvl2PBM": Level 2 tracking list enabled +// "-lvl2PBM": Level 2 tracking list disabled // Restrict relaxing default referrer policy: // "rp": Restrict relaxing default referrer policy enabled // "-rp": Restrict relaxing default referrer policy disabled @@ -1914,7 +1925,7 @@ pref("browser.contentblocking.reject-and-isolate-cookies.preferences.ui.enabled" // "cookieBehaviorPBM4": cookie behaviour BEHAVIOR_REJECT_TRACKER // "cookieBehaviorPBM5": cookie behaviour BEHAVIOR_REJECT_TRACKER_AND_PARTITION_FOREIGN // One value from each section must be included in the browser.contentblocking.features.strict pref. -pref("browser.contentblocking.features.strict", "tp,tpPrivate,cookieBehavior5,cookieBehaviorPBM5,cm,fp,stp,lvl2,rp,rpTop,ocsp,qps,qpsPBM"); +pref("browser.contentblocking.features.strict", "tp,tpPrivate,cookieBehavior5,cookieBehaviorPBM5,cm,fp,stp,lvl2,lvl2PBM,rp,rpTop,ocsp,qps,qpsPBM"); // Hide the "Change Block List" link for trackers/tracking content in the custom // Content Blocking/ETP panel. By default, it will not be visible. There is also @@ -1941,7 +1952,7 @@ pref("browser.contentblocking.report.show_mobile_app", true); pref("browser.send_to_device_locales", "de,en-GB,en-US,es-AR,es-CL,es-ES,es-MX,fr,id,pl,pt-BR,ru,zh-TW"); // Avoid advertising in certain regions. Comma separated string of two letter ISO 3166-1 country codes. -// We're currently blocking all of Ukraine (ua), but would prefer to block just Crimea (ua-43). Currently, the Mozilla Location Service APIs used by Region.jsm only exposes the country, not the subdivision. +// We're currently blocking all of Ukraine (ua), but would prefer to block just Crimea (ua-43). Currently, the Mozilla Location Service APIs used by Region.sys.mjs only exposes the country, not the subdivision. pref("browser.vpn_promo.disallowed_regions", "ae,by,cn,cu,iq,ir,kp,om,ru,sd,sy,tm,tr,ua"); // Default to enabling VPN promo messages to be shown when specified and allowed @@ -2075,6 +2086,10 @@ pref("extensions.experiments.enabled", false); pref("dom.ipc.processPriorityManager.enabled", true); #endif +#if defined(XP_WIN) + pref("dom.ipc.processPriorityManager.backgroundUsesEcoQoS", true); +#endif + // Don't limit how many nodes we care about on desktop: pref("reader.parse-node-limit", 0); @@ -2128,9 +2143,12 @@ pref("browser.migrate.chromium-edge-beta.enabled", true); pref("browser.migrate.edge.enabled", true); pref("browser.migrate.firefox.enabled", true); pref("browser.migrate.ie.enabled", true); +pref("browser.migrate.opera.enabled", true); +pref("browser.migrate.opera-gx.enabled", true); pref("browser.migrate.safari.enabled", true); +pref("browser.migrate.vivaldi.enabled", true); -pref("browser.migrate.showBookmarksToolbarAfterMigration", true); +pref("browser.migrate.content-modal.enabled", false); pref("extensions.pocket.api", "api.getpocket.com"); pref("extensions.pocket.enabled", true); @@ -2155,8 +2173,17 @@ pref("signon.management.page.fileImport.enabled", false); #ifdef NIGHTLY_BUILD pref("signon.management.page.os-auth.enabled", true); + +// "not available" - feature is not available (will be removed after QA). +// "available" - user can see feature offer. +// "offered" - we have offered feature to user and they have not yet made a decision. +// "enabled" - user opted in to the feature. +// "disabled" - user opted out of the feature. +// will be enabled after QA round +pref("signon.firefoxRelay.feature", "not available"); #else pref("signon.management.page.os-auth.enabled", false); +pref("signon.firefoxRelay.feature", "not available"); #endif pref("signon.management.page.breach-alerts.enabled", true); pref("signon.management.page.vulnerable-passwords.enabled", true); @@ -2177,8 +2204,8 @@ pref("signon.suggestImportCount", 3); pref("print.use_simplify_page", true); // Space separated list of URLS that are allowed to send objects (instead of -// only strings) through webchannels. This list is duplicated in mobile/android/app/mobile.js -pref("webchannel.allowObject.urlWhitelist", "https://content.cdn.mozilla.net https://support.mozilla.org https://install.mozilla.org"); +// only strings) through webchannels. Bug 1275612 tracks removing this pref and capability. +pref("webchannel.allowObject.urlWhitelist", "https://content.cdn.mozilla.net https://install.mozilla.org"); // Whether or not the browser should scan for unsubmitted // crash reports, and then show a notification for submitting @@ -2322,10 +2349,6 @@ pref("devtools.toolbox.tabsOrder", ""); // always visible pref("devtools.toolbox.alwaysOnTop", true); -// The fission pref for enabling the "Multiprocess Browser Toolbox", which will -// make it possible to debug anything in Firefox (See Bug 1570639 for more information). -pref("devtools.browsertoolbox.fission", true); - // When the Multiprocess Browser Toolbox is enabled, you can configure the scope of it: // - "everything" will enable debugging absolutely everything in the browser // All processes, all documents, all workers, all add-ons. @@ -2513,8 +2536,8 @@ pref("devtools.storage.enabled", true); // Enable the Style Editor. pref("devtools.styleeditor.enabled", true); pref("devtools.styleeditor.autocompletion-enabled", true); -pref("devtools.styleeditor.showMediaSidebar", true); -pref("devtools.styleeditor.mediaSidebarWidth", 238); +pref("devtools.styleeditor.showAtRulesSidebar", true); +pref("devtools.styleeditor.atRulesSidebarWidth", 238); pref("devtools.styleeditor.navSidebarWidth", 245); pref("devtools.styleeditor.transitions", true); @@ -2593,9 +2616,6 @@ pref("devtools.webconsole.input.editorOnboarding", true); // Enable message grouping in the console, true by default pref("devtools.webconsole.groupWarningMessages", true); -// Saved state of the Display content messages checkbox in the browser console. -pref("devtools.browserconsole.contentMessages", false); - // Enable network monitoring the browser toolbox console/browser console. pref("devtools.browserconsole.enableNetworkMonitoring", false); @@ -2718,27 +2738,10 @@ pref("svg.context-properties.content.allowed-domains", "profile.accounts.firefox pref("extensions.translations.disabled", true); #endif -// A set of scores for rating the relevancy of snapshots. The suffixes after the -// last decimal are prefixed by `_score` and reference the functions called in -// SnapshotScorer. -pref("browser.snapshots.score.Visit", 1); -pref("browser.snapshots.score.CurrentSession", 1); -pref("browser.snapshots.score.IsUserPersisted", 1); -pref("browser.snapshots.score.IsUserRemoved", -10); - -// A set of weights for the snapshot recommendation sources. The suffixes after -// the last decimal map to the keys of `Snapshots.recommendationSources`. -pref("browser.snapshots.source.CommonReferrer", 3); -pref("browser.snapshots.source.Overlapping", 3); -pref("browser.snapshots.source.TimeOfDay", 3); - -// Other preferences affecting snapshots scoring. -pref("browser.snapshots.relevancy.timeOfDayIntervalSeconds", 3600); - -// Expiration days for snapshots. -pref("browser.places.snapshots.expiration.days", 210); -// For user managed snapshots we use more than a year, to support yearly tasks. -pref("browser.places.snapshots.expiration.userManaged.days", 420); +// Turn on interaction measurements in Nightly only +#ifdef NIGHTLY_BUILD + pref("browser.places.interactions.enabled", true); +#endif // If the user has seen the Firefox View feature tour this value reflects // the id of the last screen they saw and whether they completed the tour @@ -2748,16 +2751,75 @@ pref("browser.firefox-view.view-count", 0); // If the user has seen the pdf.js feature tour this value reflects the tour // message id, the id of the last screen they saw, and whether they completed the tour -pref("browser.pdfjs.feature-tour", "{\"message\":\"PDF_JS_FEATURE_TOUR\",\"screen\":\"\",\"complete\":false}"); +pref("browser.pdfjs.feature-tour", "{\"screen\":\"\",\"complete\":false}"); // Enables cookie banner handling in Nightly in Private Browsing Mode. See // StaticPrefList.yaml for a description of the prefs. #ifdef NIGHTLY_BUILD pref("cookiebanners.service.mode.privateBrowsing", 1); - pref("cookiebanners.bannerClicking.enabled", true); #endif -// We only want to enable this pref for Desktop nightlies. -#ifdef NIGHTLY_BUILD - pref("dom.sitepermsaddon-provider.enabled", true); +// Enables the cookie banner desktop UI. +pref("cookiebanners.ui.desktop.enabled", false); + +// Parameters for the swipe-to-navigation icon. +// +// `navigation-icon-{start|end}-position` is the start or the end position of +// the icon movement in response to the user's swipe gesture. `0` means the icon +// positions at the left edge of the browser window. For example on Mac, when +// the user started swipe gesture left to right, the icon appears at a point +// where left side 20px of the icon is outside of the browser window's view. +// +// `navigation-icon-{min|max}-radius` is the minimum or the maximum radius of +// the icon's outer circle size in response to the user's swipe gesture. `-1` +// means that the circle radius never changes. +#ifdef XP_MACOSX + pref("browser.swipe.navigation-icon-start-position", -20); + pref("browser.swipe.navigation-icon-end-position", 0); + pref("browser.swipe.navigation-icon-min-radius", -1); + pref("browser.swipe.navigation-icon-max-radius", -1); +#else + pref("browser.swipe.navigation-icon-start-position", -40); + pref("browser.swipe.navigation-icon-end-position", 60); + pref("browser.swipe.navigation-icon-min-radius", 12); + pref("browser.swipe.navigation-icon-max-radius", 20); #endif + +// Datcord open links in default browser +pref("network.protocol-handler.external.open", true); +pref("network.protocol-handler.warn-external.open", true); +pref("network.protocol-handler.expose.open", false); + +// Other Datcord Settings +#ifdef XP_WIN + pref("general.useragent.override", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0"); +#else + pref("general.useragent.override", "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/109.0") +#endif + +pref("permissions.default.camera", 1); +pref("permissions.default.microphone", 1); + +pref("browser.link.open_newwindow", 1); +pref("browser.warnOnQuit", false); +pref("browser.uitour.enabled", false); +pref("browser.privatebrowsing.vpnpromourl", ""); +pref("browser.tabs.inTitlebar", 0); + +pref("browser.startup.upgradeDialog.enabled", false); +pref("browser.startup.firstrunSkipsHomepage", false); +pref("browser.startup.homepage", "https://discord.com/app"); + +pref("browser.shell.setDefaultPDFHandler", false); +pref("browser.shell.setDefaultBrowserUserChoice", false); +pref("browser.shell.checkDefaultBrowser", false); + +pref("browser.urlbar.suggest.bookmark", false); +pref("browser.urlbar.suggest.history", false); +pref("browser.urlbar.suggest.openpage", false); +pref("browser.urlbar.suggest.remotetab", false); +pref("browser.urlbar.suggest.searches", false); +pref("browser.urlbar.suggest.topsites", false); +pref("browser.urlbar.suggest.engines", false); + +pref("xpinstall.signatures.required", false); diff --git a/changed/browser/branding/unofficial/LICENSE b/src/changed/browser/branding/datcord/LICENSE similarity index 100% rename from changed/browser/branding/unofficial/LICENSE rename to src/changed/browser/branding/datcord/LICENSE diff --git a/src/changed/browser/branding/datcord/PrivateBrowsing_150.png b/src/changed/browser/branding/datcord/PrivateBrowsing_150.png new file mode 100644 index 0000000000..e95485e137 Binary files /dev/null and b/src/changed/browser/branding/datcord/PrivateBrowsing_150.png differ diff --git a/src/changed/browser/branding/datcord/PrivateBrowsing_70.png b/src/changed/browser/branding/datcord/PrivateBrowsing_70.png new file mode 100644 index 0000000000..b6fb4a11de Binary files /dev/null and b/src/changed/browser/branding/datcord/PrivateBrowsing_70.png differ diff --git a/changed/browser/branding/unofficial/VisualElements_150.png b/src/changed/browser/branding/datcord/VisualElements_150.png similarity index 100% rename from changed/browser/branding/unofficial/VisualElements_150.png rename to src/changed/browser/branding/datcord/VisualElements_150.png diff --git a/changed/browser/branding/unofficial/VisualElements_70.png b/src/changed/browser/branding/datcord/VisualElements_70.png similarity index 100% rename from changed/browser/branding/unofficial/VisualElements_70.png rename to src/changed/browser/branding/datcord/VisualElements_70.png diff --git a/changed/browser/branding/unofficial/background.png b/src/changed/browser/branding/datcord/background.png similarity index 100% rename from changed/browser/branding/unofficial/background.png rename to src/changed/browser/branding/datcord/background.png diff --git a/changed/browser/branding/unofficial/branding.nsi b/src/changed/browser/branding/datcord/branding.nsi similarity index 98% rename from changed/browser/branding/unofficial/branding.nsi rename to src/changed/browser/branding/datcord/branding.nsi index 994703858d..cf432ebf6c 100644 --- a/changed/browser/branding/unofficial/branding.nsi +++ b/src/changed/browser/branding/datcord/branding.nsi @@ -8,7 +8,7 @@ # BrandFullNameInternal is used for some registry and file system values # instead of BrandFullName and typically should not be modified. -!define BrandFullNameInternal "Mozilla Firefox" +!define BrandFullNameInternal "Datcord" !define BrandFullName "Datcord" !define CompanyName "Datcord" !define URLInfoAbout "https://github.com/gamingdoom/datcord" diff --git a/src/changed/browser/branding/datcord/configure.sh b/src/changed/browser/branding/datcord/configure.sh new file mode 100644 index 0000000000..ee7d89e796 --- /dev/null +++ b/src/changed/browser/branding/datcord/configure.sh @@ -0,0 +1,10 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + + +MOZ_APP_NAME=datcord +MOZ_APP_BASENAME=Datcord +MOZ_APP_PROFILE=datcord +MOZ_APP_VENDOR=Datcord +MOZ_APP_DISPLAYNAME=Datcord diff --git a/changed/browser/branding/unofficial/content/about-logo.png b/src/changed/browser/branding/datcord/content/about-logo.png similarity index 100% rename from changed/browser/branding/unofficial/content/about-logo.png rename to src/changed/browser/branding/datcord/content/about-logo.png diff --git a/changed/browser/branding/unofficial/content/about-logo.svg b/src/changed/browser/branding/datcord/content/about-logo.svg similarity index 100% rename from changed/browser/branding/unofficial/content/about-logo.svg rename to src/changed/browser/branding/datcord/content/about-logo.svg diff --git a/changed/browser/branding/unofficial/content/about-logo@2x.png b/src/changed/browser/branding/datcord/content/about-logo@2x.png similarity index 100% rename from changed/browser/branding/unofficial/content/about-logo@2x.png rename to src/changed/browser/branding/datcord/content/about-logo@2x.png diff --git a/changed/browser/branding/unofficial/content/about-wordmark.svg b/src/changed/browser/branding/datcord/content/about-wordmark.svg similarity index 100% rename from changed/browser/branding/unofficial/content/about-wordmark.svg rename to src/changed/browser/branding/datcord/content/about-wordmark.svg diff --git a/changed/browser/branding/unofficial/content/about.png b/src/changed/browser/branding/datcord/content/about.png similarity index 100% rename from changed/browser/branding/unofficial/content/about.png rename to src/changed/browser/branding/datcord/content/about.png diff --git a/changed/browser/branding/unofficial/content/aboutDialog.css b/src/changed/browser/branding/datcord/content/aboutDialog.css similarity index 100% rename from changed/browser/branding/unofficial/content/aboutDialog.css rename to src/changed/browser/branding/datcord/content/aboutDialog.css diff --git a/changed/browser/branding/unofficial/content/aboutlogins.svg b/src/changed/browser/branding/datcord/content/aboutlogins.svg similarity index 100% rename from changed/browser/branding/unofficial/content/aboutlogins.svg rename to src/changed/browser/branding/datcord/content/aboutlogins.svg diff --git a/changed/browser/branding/unofficial/content/firefox-wordmark.svg b/src/changed/browser/branding/datcord/content/firefox-wordmark.svg similarity index 100% rename from changed/browser/branding/unofficial/content/firefox-wordmark.svg rename to src/changed/browser/branding/datcord/content/firefox-wordmark.svg diff --git a/changed/browser/branding/unofficial/content/jar.mn b/src/changed/browser/branding/datcord/content/jar.mn similarity index 100% rename from changed/browser/branding/unofficial/content/jar.mn rename to src/changed/browser/branding/datcord/content/jar.mn diff --git a/changed/browser/branding/unofficial/content/moz.build b/src/changed/browser/branding/datcord/content/moz.build similarity index 100% rename from changed/browser/branding/unofficial/content/moz.build rename to src/changed/browser/branding/datcord/content/moz.build diff --git a/src/changed/browser/branding/datcord/datcord.ico b/src/changed/browser/branding/datcord/datcord.ico new file mode 100644 index 0000000000..fa3a518d33 Binary files /dev/null and b/src/changed/browser/branding/datcord/datcord.ico differ diff --git a/changed/browser/branding/unofficial/default128.png b/src/changed/browser/branding/datcord/default128.png similarity index 100% rename from changed/browser/branding/unofficial/default128.png rename to src/changed/browser/branding/datcord/default128.png diff --git a/changed/browser/branding/unofficial/default16.png b/src/changed/browser/branding/datcord/default16.png similarity index 100% rename from changed/browser/branding/unofficial/default16.png rename to src/changed/browser/branding/datcord/default16.png diff --git a/changed/browser/branding/unofficial/default22.png b/src/changed/browser/branding/datcord/default22.png similarity index 100% rename from changed/browser/branding/unofficial/default22.png rename to src/changed/browser/branding/datcord/default22.png diff --git a/changed/browser/branding/unofficial/default24.png b/src/changed/browser/branding/datcord/default24.png similarity index 100% rename from changed/browser/branding/unofficial/default24.png rename to src/changed/browser/branding/datcord/default24.png diff --git a/changed/browser/branding/unofficial/default256.png b/src/changed/browser/branding/datcord/default256.png similarity index 100% rename from changed/browser/branding/unofficial/default256.png rename to src/changed/browser/branding/datcord/default256.png diff --git a/changed/browser/branding/unofficial/default32.png b/src/changed/browser/branding/datcord/default32.png similarity index 100% rename from changed/browser/branding/unofficial/default32.png rename to src/changed/browser/branding/datcord/default32.png diff --git a/changed/browser/branding/unofficial/default48.png b/src/changed/browser/branding/datcord/default48.png similarity index 100% rename from changed/browser/branding/unofficial/default48.png rename to src/changed/browser/branding/datcord/default48.png diff --git a/changed/browser/branding/unofficial/default64.png b/src/changed/browser/branding/datcord/default64.png similarity index 100% rename from changed/browser/branding/unofficial/default64.png rename to src/changed/browser/branding/datcord/default64.png diff --git a/changed/browser/branding/unofficial/disk.icns b/src/changed/browser/branding/datcord/disk.icns similarity index 100% rename from changed/browser/branding/unofficial/disk.icns rename to src/changed/browser/branding/datcord/disk.icns diff --git a/changed/browser/branding/unofficial/document.icns b/src/changed/browser/branding/datcord/document.icns similarity index 100% rename from changed/browser/branding/unofficial/document.icns rename to src/changed/browser/branding/datcord/document.icns diff --git a/changed/browser/branding/unofficial/document.ico b/src/changed/browser/branding/datcord/document.ico similarity index 100% rename from changed/browser/branding/unofficial/document.ico rename to src/changed/browser/branding/datcord/document.ico diff --git a/src/changed/browser/branding/datcord/document_pdf.ico b/src/changed/browser/branding/datcord/document_pdf.ico new file mode 100644 index 0000000000..d6fe7c5bde Binary files /dev/null and b/src/changed/browser/branding/datcord/document_pdf.ico differ diff --git a/changed/browser/branding/unofficial/dsstore b/src/changed/browser/branding/datcord/dsstore similarity index 100% rename from changed/browser/branding/unofficial/dsstore rename to src/changed/browser/branding/datcord/dsstore diff --git a/changed/browser/branding/unofficial/firefox.VisualElementsManifest.xml b/src/changed/browser/branding/datcord/firefox.VisualElementsManifest.xml similarity index 100% rename from changed/browser/branding/unofficial/firefox.VisualElementsManifest.xml rename to src/changed/browser/branding/datcord/firefox.VisualElementsManifest.xml diff --git a/changed/browser/branding/unofficial/firefox.icns b/src/changed/browser/branding/datcord/firefox.icns similarity index 100% rename from changed/browser/branding/unofficial/firefox.icns rename to src/changed/browser/branding/datcord/firefox.icns diff --git a/src/changed/browser/branding/datcord/firefox.ico b/src/changed/browser/branding/datcord/firefox.ico new file mode 100644 index 0000000000..fa3a518d33 Binary files /dev/null and b/src/changed/browser/branding/datcord/firefox.ico differ diff --git a/src/changed/browser/branding/datcord/firefox64.ico b/src/changed/browser/branding/datcord/firefox64.ico new file mode 100644 index 0000000000..fa3a518d33 Binary files /dev/null and b/src/changed/browser/branding/datcord/firefox64.ico differ diff --git a/changed/browser/branding/unofficial/locales/en-US/brand.dtd b/src/changed/browser/branding/datcord/locales/en-US/brand.dtd similarity index 100% rename from changed/browser/branding/unofficial/locales/en-US/brand.dtd rename to src/changed/browser/branding/datcord/locales/en-US/brand.dtd diff --git a/changed/browser/branding/unofficial/locales/en-US/brand.ftl b/src/changed/browser/branding/datcord/locales/en-US/brand.ftl similarity index 100% rename from changed/browser/branding/unofficial/locales/en-US/brand.ftl rename to src/changed/browser/branding/datcord/locales/en-US/brand.ftl diff --git a/changed/browser/branding/unofficial/locales/en-US/brand.properties b/src/changed/browser/branding/datcord/locales/en-US/brand.properties similarity index 100% rename from changed/browser/branding/unofficial/locales/en-US/brand.properties rename to src/changed/browser/branding/datcord/locales/en-US/brand.properties diff --git a/changed/browser/branding/unofficial/locales/jar.mn b/src/changed/browser/branding/datcord/locales/jar.mn similarity index 100% rename from changed/browser/branding/unofficial/locales/jar.mn rename to src/changed/browser/branding/datcord/locales/jar.mn diff --git a/changed/browser/branding/unofficial/locales/moz.build b/src/changed/browser/branding/datcord/locales/moz.build similarity index 100% rename from changed/browser/branding/unofficial/locales/moz.build rename to src/changed/browser/branding/datcord/locales/moz.build diff --git a/src/changed/browser/branding/datcord/moz.build b/src/changed/browser/branding/datcord/moz.build new file mode 100644 index 0000000000..9045cee11b --- /dev/null +++ b/src/changed/browser/branding/datcord/moz.build @@ -0,0 +1,13 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +DIRS += ['content', 'locales'] + +DIST_SUBDIR = 'browser' +export('DIST_SUBDIR') + +include('../branding-common.mozbuild') +FirefoxBranding() diff --git a/changed/browser/branding/unofficial/msix/Assets/Document44x44.png b/src/changed/browser/branding/datcord/msix/Assets/Document44x44.png similarity index 100% rename from changed/browser/branding/unofficial/msix/Assets/Document44x44.png rename to src/changed/browser/branding/datcord/msix/Assets/Document44x44.png diff --git a/changed/browser/branding/unofficial/msix/Assets/LargeTile.scale-200.png b/src/changed/browser/branding/datcord/msix/Assets/LargeTile.scale-200.png similarity index 100% rename from changed/browser/branding/unofficial/msix/Assets/LargeTile.scale-200.png rename to src/changed/browser/branding/datcord/msix/Assets/LargeTile.scale-200.png diff --git a/changed/browser/branding/unofficial/msix/Assets/SmallTile.scale-200.png b/src/changed/browser/branding/datcord/msix/Assets/SmallTile.scale-200.png similarity index 100% rename from changed/browser/branding/unofficial/msix/Assets/SmallTile.scale-200.png rename to src/changed/browser/branding/datcord/msix/Assets/SmallTile.scale-200.png diff --git a/changed/browser/branding/unofficial/msix/Assets/Square150x150Logo.scale-200.png b/src/changed/browser/branding/datcord/msix/Assets/Square150x150Logo.scale-200.png similarity index 100% rename from changed/browser/branding/unofficial/msix/Assets/Square150x150Logo.scale-200.png rename to src/changed/browser/branding/datcord/msix/Assets/Square150x150Logo.scale-200.png diff --git a/changed/browser/branding/unofficial/msix/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png b/src/changed/browser/branding/datcord/msix/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png similarity index 100% rename from changed/browser/branding/unofficial/msix/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png rename to src/changed/browser/branding/datcord/msix/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png diff --git a/changed/browser/branding/unofficial/msix/Assets/Square44x44Logo.altform-unplated_targetsize-256.png b/src/changed/browser/branding/datcord/msix/Assets/Square44x44Logo.altform-unplated_targetsize-256.png similarity index 100% rename from changed/browser/branding/unofficial/msix/Assets/Square44x44Logo.altform-unplated_targetsize-256.png rename to src/changed/browser/branding/datcord/msix/Assets/Square44x44Logo.altform-unplated_targetsize-256.png diff --git a/changed/browser/branding/unofficial/msix/Assets/Square44x44Logo.scale-200.png b/src/changed/browser/branding/datcord/msix/Assets/Square44x44Logo.scale-200.png similarity index 100% rename from changed/browser/branding/unofficial/msix/Assets/Square44x44Logo.scale-200.png rename to src/changed/browser/branding/datcord/msix/Assets/Square44x44Logo.scale-200.png diff --git a/changed/browser/branding/unofficial/msix/Assets/Square44x44Logo.targetsize-256.png b/src/changed/browser/branding/datcord/msix/Assets/Square44x44Logo.targetsize-256.png similarity index 100% rename from changed/browser/branding/unofficial/msix/Assets/Square44x44Logo.targetsize-256.png rename to src/changed/browser/branding/datcord/msix/Assets/Square44x44Logo.targetsize-256.png diff --git a/changed/browser/branding/unofficial/msix/Assets/StoreLogo.scale-200.png b/src/changed/browser/branding/datcord/msix/Assets/StoreLogo.scale-200.png similarity index 100% rename from changed/browser/branding/unofficial/msix/Assets/StoreLogo.scale-200.png rename to src/changed/browser/branding/datcord/msix/Assets/StoreLogo.scale-200.png diff --git a/changed/browser/branding/unofficial/msix/Assets/Wide310x150Logo.scale-200.png b/src/changed/browser/branding/datcord/msix/Assets/Wide310x150Logo.scale-200.png similarity index 100% rename from changed/browser/branding/unofficial/msix/Assets/Wide310x150Logo.scale-200.png rename to src/changed/browser/branding/datcord/msix/Assets/Wide310x150Logo.scale-200.png diff --git a/src/changed/browser/branding/datcord/newtab.ico b/src/changed/browser/branding/datcord/newtab.ico new file mode 100644 index 0000000000..a9b37c08c6 Binary files /dev/null and b/src/changed/browser/branding/datcord/newtab.ico differ diff --git a/src/changed/browser/branding/datcord/newwindow.ico b/src/changed/browser/branding/datcord/newwindow.ico new file mode 100644 index 0000000000..5537207710 Binary files /dev/null and b/src/changed/browser/branding/datcord/newwindow.ico differ diff --git a/src/changed/browser/branding/datcord/pbmode.ico b/src/changed/browser/branding/datcord/pbmode.ico new file mode 100644 index 0000000000..bfa3aa6ced Binary files /dev/null and b/src/changed/browser/branding/datcord/pbmode.ico differ diff --git a/changed/browser/branding/unofficial/pref/firefox-branding.js b/src/changed/browser/branding/datcord/pref/firefox-branding.js similarity index 100% rename from changed/browser/branding/unofficial/pref/firefox-branding.js rename to src/changed/browser/branding/datcord/pref/firefox-branding.js diff --git a/src/changed/browser/branding/datcord/private_browsing.VisualElementsManifest.xml b/src/changed/browser/branding/datcord/private_browsing.VisualElementsManifest.xml new file mode 100644 index 0000000000..145c0d84f5 --- /dev/null +++ b/src/changed/browser/branding/datcord/private_browsing.VisualElementsManifest.xml @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/changed/browser/branding/unofficial/stubinstaller/bgstub.jpg b/src/changed/browser/branding/datcord/stubinstaller/bgstub.jpg similarity index 100% rename from changed/browser/branding/unofficial/stubinstaller/bgstub.jpg rename to src/changed/browser/branding/datcord/stubinstaller/bgstub.jpg diff --git a/changed/browser/branding/unofficial/stubinstaller/installing_page.css b/src/changed/browser/branding/datcord/stubinstaller/installing_page.css similarity index 100% rename from changed/browser/branding/unofficial/stubinstaller/installing_page.css rename to src/changed/browser/branding/datcord/stubinstaller/installing_page.css diff --git a/changed/browser/branding/unofficial/stubinstaller/profile_cleanup_page.css b/src/changed/browser/branding/datcord/stubinstaller/profile_cleanup_page.css similarity index 100% rename from changed/browser/branding/unofficial/stubinstaller/profile_cleanup_page.css rename to src/changed/browser/branding/datcord/stubinstaller/profile_cleanup_page.css diff --git a/changed/browser/branding/unofficial/wizHeader.bmp b/src/changed/browser/branding/datcord/wizHeader.bmp similarity index 100% rename from changed/browser/branding/unofficial/wizHeader.bmp rename to src/changed/browser/branding/datcord/wizHeader.bmp diff --git a/changed/browser/branding/unofficial/wizHeaderRTL.bmp b/src/changed/browser/branding/datcord/wizHeaderRTL.bmp similarity index 100% rename from changed/browser/branding/unofficial/wizHeaderRTL.bmp rename to src/changed/browser/branding/datcord/wizHeaderRTL.bmp diff --git a/changed/browser/branding/unofficial/wizWatermark.bmp b/src/changed/browser/branding/datcord/wizWatermark.bmp similarity index 100% rename from changed/browser/branding/unofficial/wizWatermark.bmp rename to src/changed/browser/branding/datcord/wizWatermark.bmp diff --git a/src/changed/browser/themes/linux/browser.css b/src/changed/browser/themes/linux/browser.css new file mode 100644 index 0000000000..c8868cc113 --- /dev/null +++ b/src/changed/browser/themes/linux/browser.css @@ -0,0 +1,425 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + + @import url("chrome://browser/skin/browser-shared.css"); + @import url("chrome://browser/skin/contextmenu.css"); + + @namespace html url("http://www.w3.org/1999/xhtml"); + + /** + * We intentionally do not include browser-custom-colors.css, + * instead choosing to fall back to system colours and transparencies + * in order to accomodate the wider variety of system themes on that + * platform. + */ + + /* Datcord stuff. remove unwanted ui like tabs and url bar */ + #TabsToolbar { visibility: collapse !important; } + #navigator-toolbox .browser-toolbar { height: 0px !important; min-height: 0px !important; } + + :root { + --toolbar-non-lwt-bgcolor: color-mix(in srgb, -moz-dialog 85%, white); + --toolbar-non-lwt-textcolor: -moz-dialogtext; + + --chrome-content-separator-color: ThreeDShadow; + } + + #TabsToolbar:not(:-moz-lwtheme), + #TabsToolbar[brighttext]:not(:-moz-lwtheme) { + --tab-attention-icon-color: AccentColor; + } + + :root:-moz-lwtheme { + --chrome-content-separator-color: rgba(0,0,0,.3); + } + + #menubar-items { + -moz-box-orient: vertical; /* for flex hack */ + } + + #navigator-toolbox { + appearance: none; + background-color: transparent; + border-top: none; + } + + .browser-toolbar { + padding: 0; + } + + .browser-toolbar:not(.titlebar-color) { + background-color: var(--toolbar-bgcolor); + color: var(--toolbar-color); + appearance: none; + border-style: none; + } + + #nav-bar:not([tabs-hidden="true"]) { + box-shadow: 0 calc(-1 * var(--tabs-navbar-shadow-size)) 0 var(--lwt-tabs-border-color, rgba(0,0,0,.3)); + /* This is needed for some toolbar button animations. Gross :( */ + position: relative; + } + + /* Bookmark menus */ + menu.bookmark-item, + menuitem.bookmark-item { + min-width: 0; + max-width: 32em; + } + + .bookmark-item:not(.subviewbutton) > .menu-iconic-left { + margin-block: 0; + } + + /* Bookmark drag and drop styles */ + .bookmark-item[dragover-into="true"] { + background: SelectedItem !important; + color: SelectedItemText !important; + } + + .bookmark-item[cutting] > .toolbarbutton-icon, + .bookmark-item[cutting] > .menu-iconic-left > .menu-iconic-icon { + opacity: 0.5; + } + + .bookmark-item[cutting] > .toolbarbutton-text, + .bookmark-item[cutting] > .menu-iconic-left > .menu-iconic-text { + opacity: 0.7; + } + + /* Address bar */ + #urlbar, + #searchbar { + font-size: 1.05em; + } + + @supports -moz-bool-pref("browser.urlbar.experimental.expandTextOnFocus") { + #urlbar[breakout-extend] { + font-size: 1.14em; + } + } + + :root { + --toolbar-field-border-color: ThreeDShadow; + } + + /* Address bar results view */ + + :root:not(:-moz-lwtheme) { + --urlbar-popup-action-color: -moz-nativehyperlinktext; + --autocomplete-popup-highlight-background: SelectedItem; + --autocomplete-popup-highlight-color: SelectedItemText; + } + + /* AutoComplete */ + + #PopupAutoComplete > richlistbox > richlistitem[originaltype~="datalist-first"] { + border-top: 1px solid ThreeDShadow; + } + + /* Content area */ + + + #browser { + --sidebar-border-color: ThreeDShadow; + } + + .sidebar-splitter { + appearance: none; + width: 6px; + background-color: -moz-dialog; + border: 1px ThreeDShadow; + border-style: none solid; + } + + /* Tabstrip */ + + #tabbrowser-tabs { + /* override the global style to allow the selected tab to be above the nav-bar */ + z-index: auto; + } + + #TabsToolbar { + min-height: 0; + } + + #TabsToolbar:not(:-moz-lwtheme) { + appearance: auto; + -moz-default-appearance: menubar; + color: -moz-menubartext; + } + + #context_reloadTab { + list-style-image: url("moz-icon://stock/gtk-refresh?size=menu"); + } + + #context_closeOtherTabs { + list-style-image: url("moz-icon://stock/gtk-clear?size=menu"); + } + + #context_closeOtherTabs[disabled] { + list-style-image: url("moz-icon://stock/gtk-clear?size=menu&state=disabled"); + } + + #context_undoCloseTab { + list-style-image: url("moz-icon://stock/gtk-undelete?size=menu"); + } + + #context_closeTab { + list-style-image: url("moz-icon://stock/gtk-close?size=menu"); + } + + /* All tabs menupopup */ + + .alltabs-item[selected="true"] { + font-weight: bold; + } + + /* Status panel */ + + #statuspanel-label { + margin: 0; + padding: 2px 4px; + background-color: -moz-dialog; + border: 1px none ThreeDShadow; + border-top-style: solid; + color: -moz-dialogText; + text-shadow: none; + color-scheme: light; + } + + @media (-moz-content-prefers-color-scheme: dark) { + #statuspanel-label { + color-scheme: dark; + } + } + + #statuspanel:not([mirror]) > #statuspanel-label:-moz-locale-dir(ltr), + #statuspanel[mirror] > #statuspanel-label:-moz-locale-dir(rtl) { + border-right-style: solid; + border-top-right-radius: .3em; + margin-right: 1em; + } + + #statuspanel:not([mirror]) > #statuspanel-label:-moz-locale-dir(rtl), + #statuspanel[mirror] > #statuspanel-label:-moz-locale-dir(ltr) { + border-left-style: solid; + border-top-left-radius: .3em; + margin-left: 1em; + } + + + #UITourHighlight { + /* Below are some fixes for people without an X compositor on Linux. + This is why we can't have nice things: */ + /* Animations don't repaint properly without an X compositor. */ + animation-name: none !important; + /* Opacity rounds to 0 or 1 on Linux without an X compositor, making the + background color not visible. Anti-aliasing is not available either. Make a + thicker outline and cancel border-radius for that case. */ + outline: 4px solid rgb(0,200,215); + border-radius: 0 !important; + } + + #UITourTooltipDescription { + font-size: 1.05rem; + } + + #UITourTooltipClose { + margin-inline-end: -4px; + } + + /** + * Override the --arrowpanel-padding so the background extends + * to the sides and bottom of the panel. + */ + #UITourTooltipButtons { + margin-inline-start: -10px; + margin-bottom: -10px; + } + + #context-navigation > .menuitem-iconic > .menu-iconic-left { + /* override toolkit/themes/linux/global/menu.css */ + padding-inline-end: 0 !important; + margin-inline-end: 0 !important; + } + + /** + * Titlebar drawing: + * + * We draw to titlebar when Gkt+ CSD is available. This is mostly + * straight-forward, but getting the window corners to look perfect is a bit + * tricky, as there are different variables to take into account. + * + * GTK windows have both a window radius (exposed via the + * `-moz-gtk-csd-titlebar-radius`) environment variable, and a window shadow + * (which we can't read back from GTK). Note that the native drawing does draw + * the shadow already. + * + * So there are multiple configurations to consider: + * + * * Whether we're using Wayland vs. X11 + * * Whether we're using a lightweight theme or not. + * + * Consider the simple case (default system theme). We render the titlebar + * using `-moz-default-appearance: -moz-window-titlebar;`, then don't draw + * anything else. Success! + * + * Now consider lightweight themes: We need to render the native titlebar + * behind the "theme" titlebar in order to render the native shadow on X11. But + * we can't just use the #navigator-toolbox as that's where the lightweight + * theme background goes, so we need to use the #navigator-toolbox-background. + * We still have to apply the corner radii to #navigator-toolbox of course, so + * the lightweight theme background doesn't overflow the titlebar radius. + * + * In a Wayland-only world, the setup could be much simpler: We could apply the + * titlebar appearance to #navigator-toolbox, and just apply the border radius + * on the or #navigator-toolbox-background to clip the extra shadow when + * using the system theme. For the lightweight theme, we could use + * appearance: none and the titlebar radius on the toolbox. In X11 however, we + * do need the native titlebar behind at all times. + */ + @media (-moz-gtk-csd-available) { + :root[tabsintitlebar][sizemode="normal"] { + background-color: transparent; + } + + :root[tabsintitlebar] #titlebar { + color: CaptionText; + } + + :root[tabsintitlebar] #titlebar:-moz-window-inactive { + color: InactiveCaptionText; + } + + :root[tabsintitlebar] #titlebar:-moz-lwtheme { + color: inherit; + } + + :root[tabsintitlebar] #navigator-toolbox-background { + appearance: auto; + -moz-default-appearance: -moz-window-titlebar-maximized; + } + + :root[tabsintitlebar][sizemode="normal"]:not([gtktiledwindow="true"]) #navigator-toolbox-background { + -moz-default-appearance: -moz-window-titlebar; + } + + :root[tabsintitlebar][sizemode="normal"]:not([gtktiledwindow="true"]) #navigator-toolbox:-moz-lwtheme, + :root[tabsintitlebar][sizemode="normal"]:not([gtktiledwindow="true"]) dialog::backdrop { + border-top-left-radius: env(-moz-gtk-csd-titlebar-radius); + border-top-right-radius: env(-moz-gtk-csd-titlebar-radius); + } + + /* When temporarily showing the menu bar, make it at least as tall as the tab + * bar such that the window controls don't appear to move up. */ + :root[tabsintitlebar] #toolbar-menubar[autohide="true"] { + height: calc(var(--tab-min-height) + 2 * var(--tab-block-margin)); + } + + /* Make #TabsToolbar transparent as we style underlying #titlebar with + * -moz-window-titlebar (Gtk+ theme). */ + :root[tabsintitlebar] #TabsToolbar, + :root[tabsintitlebar] #toolbar-menubar { + appearance: none; + color: inherit; + } + + :root[tabsintitlebar] #main-menubar { + color: inherit; + } + + /* The button box must appear on top of the navigator-toolbox in order for + * click and hover mouse events to work properly for the button in the restored + * window state. Otherwise, elements in the navigator-toolbox, like the menubar, + * can swallow those events. */ + .titlebar-buttonbox { + z-index: 1; + -moz-box-align: center; + } + + /* Render titlebar command buttons according to system config. + * Use full scale icons here as the Gtk+ does. */ + .titlebar-min { + appearance: auto; + -moz-default-appearance: -moz-window-button-minimize; + -moz-box-ordinal-group: env(-moz-gtk-csd-minimize-button-position); + } + .titlebar-max { + appearance: auto; + -moz-default-appearance: -moz-window-button-maximize; + -moz-box-ordinal-group: env(-moz-gtk-csd-maximize-button-position); + } + .titlebar-restore { + appearance: auto; + -moz-default-appearance: -moz-window-button-restore; + -moz-box-ordinal-group: env(-moz-gtk-csd-maximize-button-position); + } + .titlebar-close { + appearance: auto; + -moz-default-appearance: -moz-window-button-close; + -moz-box-ordinal-group: env(-moz-gtk-csd-close-button-position); + } + + /* When using lightweight themes, use our own buttons since native ones might + * assume a native background in order to be visible. */ + .titlebar-button:-moz-lwtheme { + appearance: none; + border-radius: 100%; + } + .titlebar-button > .toolbarbutton-icon:-moz-lwtheme { + padding: 6px; + -moz-context-properties: stroke; + stroke: currentColor; + } + .titlebar-min:-moz-lwtheme { + list-style-image: url(chrome://browser/skin/window-controls/minimize.svg); + } + .titlebar-max:-moz-lwtheme { + list-style-image: url(chrome://browser/skin/window-controls/maximize.svg); + } + .titlebar-restore:-moz-lwtheme { + list-style-image: url(chrome://browser/skin/window-controls/restore.svg); + } + .titlebar-close:-moz-lwtheme { + list-style-image: url(chrome://browser/skin/window-controls/close.svg); + } + .titlebar-button:-moz-lwtheme:hover { + background-color: color-mix(in srgb, currentColor 12%, transparent); + } + .titlebar-button:-moz-lwtheme:hover:active { + background-color: color-mix(in srgb, currentColor 20%, transparent); + } + .titlebar-close:-moz-lwtheme:hover { + background-color: #d70022; + color: white; + } + .titlebar-close:-moz-lwtheme:hover:active { + background-color: #ff0039; + } + + @media not (-moz-gtk-csd-minimize-button) { + .titlebar-min { + display: none; + } + } + @media not (-moz-gtk-csd-maximize-button) { + .titlebar-restore, + .titlebar-max { + display: none; + } + } + @media not (-moz-gtk-csd-close-button) { + .titlebar-close { + display: none; + } + } + + @media (-moz-gtk-csd-reversed-placement) { + .titlebar-buttonbox-container { + -moz-box-ordinal-group: 0; + } + } + } + \ No newline at end of file diff --git a/changed/browser/themes/linux/webRTC-indicator.css b/src/changed/browser/themes/linux/webRTC-indicator.css similarity index 100% rename from changed/browser/themes/linux/webRTC-indicator.css rename to src/changed/browser/themes/linux/webRTC-indicator.css diff --git a/changed/browser/themes/osx/browser.css b/src/changed/browser/themes/osx/browser.css similarity index 100% rename from changed/browser/themes/osx/browser.css rename to src/changed/browser/themes/osx/browser.css diff --git a/changed/browser/themes/osx/webRTC-indicator.css b/src/changed/browser/themes/osx/webRTC-indicator.css similarity index 100% rename from changed/browser/themes/osx/webRTC-indicator.css rename to src/changed/browser/themes/osx/webRTC-indicator.css diff --git a/changed/browser/themes/shared/webRTC-indicator.css b/src/changed/browser/themes/shared/webRTC-indicator.css similarity index 100% rename from changed/browser/themes/shared/webRTC-indicator.css rename to src/changed/browser/themes/shared/webRTC-indicator.css diff --git a/changed/browser/themes/windows/browser.css b/src/changed/browser/themes/windows/browser.css similarity index 100% rename from changed/browser/themes/windows/browser.css rename to src/changed/browser/themes/windows/browser.css diff --git a/changed/browser/themes/windows/webRTC-indicator.css b/src/changed/browser/themes/windows/webRTC-indicator.css similarity index 100% rename from changed/browser/themes/windows/webRTC-indicator.css rename to src/changed/browser/themes/windows/webRTC-indicator.css diff --git a/changed/mconfd/mozconfig-linux-x86_64 b/src/changed/mconfd/mozconfig-linux-x86_64 similarity index 100% rename from changed/mconfd/mozconfig-linux-x86_64 rename to src/changed/mconfd/mozconfig-linux-x86_64 diff --git a/src/launch-datcord b/src/launch-datcord new file mode 100755 index 0000000000..87a2ee5a86 --- /dev/null +++ b/src/launch-datcord @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# Find the directory of this script. https://stackoverflow.com/questions/59895/how-do-i-get-the-directory-where-a-bash-script-is-located-from-within-the-script +SOURCE=${BASH_SOURCE[0]} +while [ -L "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink + DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd ) + SOURCE=$(readlink "$SOURCE") + [[ $SOURCE != /* ]] && SOURCE=$DIR/$SOURCE # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located +done +DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd ) + +cp $DIR/open-in-default-browser /tmp/open-in-default-browser + +$DIR/datcord $1 + +rm /tmp/open-in-default-browser \ No newline at end of file diff --git a/src/mozconfig.linux b/src/mozconfig.linux new file mode 100644 index 0000000000..c3477c36ff --- /dev/null +++ b/src/mozconfig.linux @@ -0,0 +1,8 @@ +ac_add_options --with-app-name=datcord +ac_add_options --with-branding=browser/branding/datcord + +export MOZ_APP_NAME=datcord +export MOZ_APP_BASENAME=Datcord +export MOZ_APP_PROFILE=datcord +export MOZ_APP_VENDOR=Datcord +export MOZ_APP_DISPLAYNAME=Datcord diff --git a/src/mozconfig.windows b/src/mozconfig.windows new file mode 100644 index 0000000000..a9ef464be4 --- /dev/null +++ b/src/mozconfig.windows @@ -0,0 +1,30 @@ +# mozbuild is defined in crossCompileForWindows.sh +export WINSYSROOT="$mozbuild/win-cross/vs" + +# Cross compile stuff +mk_add_options "export LOWERCASE_DIRS=$mozbuild/win-cross" + +EXTRA_PATH="$mozbuild/win-cross/vs/vc/tools/msvc/14.29.30133/bin/hostx64/x64:" +mk_add_options "export PATH=$EXTRA_PATH$PATH" + +export CC="$mozbuild/clang/bin/clang-cl" +export CXX="$mozbuild/clang/bin/clang-cl" +export HOST_CC="$mozbuild/clang/bin/clang" +export HOST_CXX="$mozbuild/clang/bin/clang++" + +export WINE="$mozbuild/wine/bin/wine64" +#export MIDL="$mozbuild/wine/bin/widl" + +ac_add_options --target=x86_64-pc-mingw32 +#ac_add_options --disable-bootstrap +ac_add_options --enable-application=browser + +# Normal build stuff +ac_add_options --with-app-name=datcord +ac_add_options --with-branding=browser/branding/datcord + +export MOZ_APP_NAME=datcord +export MOZ_APP_BASENAME=Datcord +export MOZ_APP_PROFILE=datcord +export MOZ_APP_VENDOR=Datcord +export MOZ_APP_DISPLAYNAME=Datcord \ No newline at end of file diff --git a/windows/banner.bmp b/windows/banner.bmp index 2800b677de..27a30d98f8 100644 Binary files a/windows/banner.bmp and b/windows/banner.bmp differ diff --git a/windows/setup.nsi b/windows/setup.nsi index 85652da39e..e97b84587d 100644 --- a/windows/setup.nsi +++ b/windows/setup.nsi @@ -8,7 +8,7 @@ !define APPNAME "Datcord" !define PROGNAME "datcord" !define EXECUTABLE "${PROGNAME}.exe" -!define PROG_VERSION "0.3.2" +!define PROG_VERSION "0.4.0" !define COMPANYNAME "Datcord" !define ESTIMATED_SIZE 190000 !define MUI_ICON "datcord.ico" @@ -41,7 +41,8 @@ Click Next to continue." Section # Make sure Datcord is closed before the installation - nsProcess::_FindProcess "${EXECUTABLE}" $R0 + nsProcess::_FindProcess "${EXECUTABLE}" + Pop $R0 ${If} $R0 = 0 IfSilent 0 +4 DetailPrint "${APPNAME} is still running, aborting because of silent install." @@ -55,14 +56,18 @@ break: Abort continue: DetailPrint "Closing ${APPNAME} gracefully..." - nsProcess::_CloseProcess "${EXECUTABLE}" $R0 + nsProcess::_CloseProcess "${EXECUTABLE}" + Pop $R0 Sleep 2000 - nsProcess::_FindProcess "${EXECUTABLE}" $R0 + nsProcess::_FindProcess "${EXECUTABLE}" + Pop $R0 ${If} $R0 = 0 DetailPrint "Failed to close ${APPNAME}, killing it..." nsProcess::_KillProcess "${EXECUTABLE}" + nsProcess::_KillProcess "${EXECUTABLE}" Sleep 2000 nsProcess::_FindProcess "${EXECUTABLE}" + nsProcess::_FindProcess "${EXECUTABLE}" Pop $R0 ${EndIf} ${EndIf} @@ -106,7 +111,8 @@ SectionEnd section "Uninstall" # Kill Datcord if it is still running - nsProcess::_FindProcess "${EXECUTABLE}" $R0 + nsProcess::_FindProcess "${EXECUTABLE}" + Pop $R0 ${If} $R0 = 0 DetailPrint "${APPNAME} is still running, killing it..." nsProcess::_KillProcess "${EXECUTABLE}"