mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-05 09:26:34 +00:00
Merge branch 'dev' into firefox-135
Signed-off-by: mr. m <91018726+mauro-balades@users.noreply.github.com>
This commit is contained in:
52
.github/workflows/build.yml
vendored
52
.github/workflows/build.yml
vendored
@@ -54,6 +54,18 @@ jobs:
|
|||||||
echo "GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}"
|
echo "GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}"
|
||||||
echo "GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}"
|
echo "GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
|
||||||
|
buildid:
|
||||||
|
name: Generate build ID
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
buildids: ${{ steps.get.outputs.bid }}
|
||||||
|
steps:
|
||||||
|
- id: get
|
||||||
|
shell: bash -xe {0}
|
||||||
|
run: |
|
||||||
|
bdat=`date +"%Y%m%d%I%M%S"`
|
||||||
|
echo "bid=${bdat}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
start-self-host:
|
start-self-host:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: debug-inputs
|
needs: debug-inputs
|
||||||
@@ -294,7 +306,7 @@ jobs:
|
|||||||
windows-step-1:
|
windows-step-1:
|
||||||
name: Windows build step 1 (PGO build)
|
name: Windows build step 1 (PGO build)
|
||||||
uses: ./.github/workflows/windows-release-build.yml
|
uses: ./.github/workflows/windows-release-build.yml
|
||||||
needs: [build-data]
|
needs: [build-data, buildid]
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
@@ -303,6 +315,7 @@ jobs:
|
|||||||
generate-gpo: true
|
generate-gpo: true
|
||||||
profile-data-path-archive: zen-windows-profile-data-and-jarlog.zip
|
profile-data-path-archive: zen-windows-profile-data-and-jarlog.zip
|
||||||
release-branch: ${{ inputs.update_branch }}
|
release-branch: ${{ inputs.update_branch }}
|
||||||
|
MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}}
|
||||||
|
|
||||||
windows-step-2:
|
windows-step-2:
|
||||||
name: Windows build step 2 (Generate profile data)
|
name: Windows build step 2 (Generate profile data)
|
||||||
@@ -322,11 +335,12 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
needs: [build-data, windows-step-2, start-self-host]
|
needs: [build-data, windows-step-2, start-self-host, buildid]
|
||||||
with:
|
with:
|
||||||
build-version: ${{ needs.build-data.outputs.version }}
|
build-version: ${{ needs.build-data.outputs.version }}
|
||||||
generate-gpo: false
|
generate-gpo: false
|
||||||
release-branch: ${{ inputs.update_branch }}
|
release-branch: ${{ inputs.update_branch }}
|
||||||
|
MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}}
|
||||||
|
|
||||||
linux:
|
linux:
|
||||||
name: Linux build
|
name: Linux build
|
||||||
@@ -334,10 +348,11 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
needs: [build-data, start-self-host]
|
needs: [build-data, start-self-host, buildid]
|
||||||
with:
|
with:
|
||||||
build-version: ${{ needs.build-data.outputs.version }}
|
build-version: ${{ needs.build-data.outputs.version }}
|
||||||
release-branch: ${{ inputs.update_branch }}
|
release-branch: ${{ inputs.update_branch }}
|
||||||
|
MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}}
|
||||||
|
|
||||||
mac:
|
mac:
|
||||||
name: macOS build
|
name: macOS build
|
||||||
@@ -345,7 +360,19 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
needs: [build-data]
|
needs: [build-data, buildid]
|
||||||
|
with:
|
||||||
|
build-version: ${{ needs.build-data.outputs.version }}
|
||||||
|
release-branch: ${{ inputs.update_branch }}
|
||||||
|
MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}}
|
||||||
|
|
||||||
|
mac-uni:
|
||||||
|
name: macOS build (Universal)
|
||||||
|
uses: ./.github/workflows/macos-universal-release-build.yml
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
secrets: inherit
|
||||||
|
needs: [build-data, mac]
|
||||||
with:
|
with:
|
||||||
build-version: ${{ needs.build-data.outputs.version }}
|
build-version: ${{ needs.build-data.outputs.version }}
|
||||||
release-branch: ${{ inputs.update_branch }}
|
release-branch: ${{ inputs.update_branch }}
|
||||||
@@ -453,7 +480,7 @@ jobs:
|
|||||||
if: ${{ inputs.create_release || inputs.update_branch == 'twilight' }}
|
if: ${{ inputs.create_release || inputs.update_branch == 'twilight' }}
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
name: Release
|
name: Release
|
||||||
needs: [build-data, linux, windows-step-3, check-release, mac, appimage, source, lint, stop-self-hosted]
|
needs: [build-data, linux, windows-step-3, check-release, mac-uni, appimage, source, lint, stop-self-hosted]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
environment:
|
environment:
|
||||||
name: ${{ inputs.update_branch == 'release' && 'Deploy-Release' || 'Deploy-Twilight' }}
|
name: ${{ inputs.update_branch == 'release' && 'Deploy-Release' || 'Deploy-Twilight' }}
|
||||||
@@ -503,8 +530,7 @@ jobs:
|
|||||||
cp -a ../windows_update_manifest_arm64/. updates/
|
cp -a ../windows_update_manifest_arm64/. updates/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp -a ../macos_update_manifest_aarch64/. updates/
|
cp -a ../macos_update_manifest/. updates/
|
||||||
cp -a ../macos_update_manifest_x86_64/. updates/
|
|
||||||
|
|
||||||
- name: Commit
|
- name: Commit
|
||||||
uses: stefanzweifel/git-auto-commit-action@v5
|
uses: stefanzweifel/git-auto-commit-action@v5
|
||||||
@@ -533,12 +559,10 @@ jobs:
|
|||||||
linux-aarch64.mar
|
linux-aarch64.mar
|
||||||
windows.mar
|
windows.mar
|
||||||
windows-arm64.mar
|
windows-arm64.mar
|
||||||
macos-x86_64.mar
|
macos.mar
|
||||||
macos-aarch64.mar
|
|
||||||
zen.installer.exe
|
zen.installer.exe
|
||||||
zen.installer-arm64.exe
|
zen.installer-arm64.exe
|
||||||
zen.macos-x86_64.dmg
|
zen.macos-universal.dmg
|
||||||
zen.macos-aarch64.dmg
|
|
||||||
automatic_release_tag: 'twilight'
|
automatic_release_tag: 'twilight'
|
||||||
title: 'Twilight build - ${{ needs.build-data.outputs.version }} (${{ needs.build-data.outputs.build_date }} at ${{ needs.build-data.outputs.build_time }})'
|
title: 'Twilight build - ${{ needs.build-data.outputs.version }} (${{ needs.build-data.outputs.build_date }} at ${{ needs.build-data.outputs.build_time }})'
|
||||||
draft: false
|
draft: false
|
||||||
@@ -569,12 +593,10 @@ jobs:
|
|||||||
linux-aarch64.mar
|
linux-aarch64.mar
|
||||||
.github/workflows/object/windows-x64-signed-x86_64/windows.mar
|
.github/workflows/object/windows-x64-signed-x86_64/windows.mar
|
||||||
.github/workflows/object/windows-x64-signed-arm64/windows-arm64.mar
|
.github/workflows/object/windows-x64-signed-arm64/windows-arm64.mar
|
||||||
macos-x86_64.mar
|
macos.mar
|
||||||
macos-aarch64.mar
|
|
||||||
.github/workflows/object/windows-x64-signed-x86_64/zen.installer.exe
|
.github/workflows/object/windows-x64-signed-x86_64/zen.installer.exe
|
||||||
.github/workflows/object/windows-x64-signed-arm64/zen.installer-arm64.exe
|
.github/workflows/object/windows-x64-signed-arm64/zen.installer-arm64.exe
|
||||||
zen.macos-x86_64.dmg
|
zen.macos-universal.dmg
|
||||||
zen.macos-aarch64.dmg
|
|
||||||
|
|
||||||
prepare-flatpak:
|
prepare-flatpak:
|
||||||
if: ${{ inputs.create_release && inputs.update_branch == 'release' }}
|
if: ${{ inputs.create_release && inputs.update_branch == 'release' }}
|
||||||
|
@@ -2,7 +2,7 @@ name: Check Firefox Candidate Release
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 21 * * 1'
|
- cron: '59 4 * * 2'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
7
.github/workflows/linux-release-build.yml
vendored
7
.github/workflows/linux-release-build.yml
vendored
@@ -11,6 +11,10 @@ on:
|
|||||||
description: 'The branch to build'
|
description: 'The branch to build'
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
MOZ_BUILD_DATE:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
default: ''
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-linux:
|
build-linux:
|
||||||
@@ -130,6 +134,9 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
export SURFER_PLATFORM="linux"
|
export SURFER_PLATFORM="linux"
|
||||||
|
if [[ -n ${{ inputs.MOZ_BUILD_DATE }} ]];then
|
||||||
|
export MOZ_BUILD_DATE=${{ inputs.MOZ_BUILD_DATE }}
|
||||||
|
fi
|
||||||
bash .github/workflows/src/release-build.sh
|
bash .github/workflows/src/release-build.sh
|
||||||
|
|
||||||
- name: Package
|
- name: Package
|
||||||
|
71
.github/workflows/macos-release-build.yml
vendored
71
.github/workflows/macos-release-build.yml
vendored
@@ -11,6 +11,10 @@ on:
|
|||||||
description: 'The branch to build'
|
description: 'The branch to build'
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
MOZ_BUILD_DATE:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
default: ''
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
mac-build:
|
mac-build:
|
||||||
@@ -118,72 +122,47 @@ jobs:
|
|||||||
ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }}
|
ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }}
|
||||||
run: |
|
run: |
|
||||||
export SURFER_PLATFORM="darwin"
|
export SURFER_PLATFORM="darwin"
|
||||||
|
if [[ -n ${{ inputs.MOZ_BUILD_DATE }} ]];then
|
||||||
|
export MOZ_BUILD_DATE=${{ inputs.MOZ_BUILD_DATE }}
|
||||||
|
fi
|
||||||
bash .github/workflows/src/release-build.sh
|
bash .github/workflows/src/release-build.sh
|
||||||
|
|
||||||
- name: Import APPLE DEVELOPER ID CERTIFICATE for .app
|
|
||||||
uses: Apple-Actions/import-codesign-certs@v3
|
|
||||||
with:
|
|
||||||
p12-file-base64: ${{ secrets.macOS_CERTIFICATES_P12_For_App_BASE64 }}
|
|
||||||
p12-password: ${{ secrets.macOS_CERTIFICATES_P12_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Import provisioning profile for .app
|
|
||||||
run: |
|
|
||||||
echo "${{ secrets.macOS_PROVISIONING_PROFILE }}" | base64 --decode > ./engine/Zen_Browser.provisionprofile
|
|
||||||
ls -la
|
|
||||||
|
|
||||||
- name: Package
|
- name: Package
|
||||||
env:
|
env:
|
||||||
SURFER_COMPAT: ${{ matrix.arch }}
|
SURFER_COMPAT: ${{ matrix.arch }}
|
||||||
ZEN_GA_DISABLE_PGO: true
|
ZEN_GA_DISABLE_PGO: true
|
||||||
MACOS_APPLE_ACCOUNT_ID: ${{ secrets.macOS_AppleAccountId }}
|
|
||||||
MACOS_APPLE_DEVELOPER_ID_TEAM_ID: ${{ secrets.macOS_AppleDeveloperIdTeamId }}
|
|
||||||
MACOS_APPLE_DEVELOPER_ID_PASSWORD: ${{ secrets.macOS_AppleDeveloperIdPassword }}
|
|
||||||
run: |
|
run: |
|
||||||
export SURFER_PLATFORM="darwin"
|
export SURFER_PLATFORM="darwin"
|
||||||
export MACOS_APPLE_DEVELOPER_ID="${{ secrets.macOS_AppleDeveloperId }}"
|
|
||||||
export ZEN_RELEASE=1
|
export ZEN_RELEASE=1
|
||||||
pnpm package
|
pnpm package
|
||||||
|
|
||||||
- name: Rename artifacts
|
- name: Rename artifacts
|
||||||
run: |
|
run: |
|
||||||
mv ./dist/output.mar macos-${{ matrix.arch }}.mar
|
echo "Tarballing DMG"
|
||||||
|
|
||||||
- name: Remove sensitive information
|
|
||||||
run: |
|
|
||||||
rm -f ./engine/Zen_Browser.provisionprofile
|
|
||||||
|
|
||||||
- name: Sign .dmg
|
|
||||||
run: |
|
|
||||||
set -ex
|
set -ex
|
||||||
hdiutil convert ./dist/*.dmg -format UDZO -imagekey zlib-level=9 -o zen.macos-${{ matrix.arch }}.dmg
|
mv ./dist/*.dmg ./zen-${{ matrix.arch }}-apple-darwin-dist.dmg
|
||||||
xattr -cr zen.macos-${{ matrix.arch }}.dmg
|
mv ./engine/obj-${{ matrix.arch }}-apple-darwin/dist/host/bin/mar ./zen-macos-host-mar
|
||||||
codesign -s "${{ secrets.macOS_AppleDeveloperId }}" zen.macos-${{ matrix.arch }}.dmg
|
mv ./engine/obj-${{ matrix.arch }}-apple-darwin/dist/bin/platform.ini ./platform.ini
|
||||||
xcrun notarytool submit "zen.macos-${{ matrix.arch }}.dmg" \
|
|
||||||
--apple-id "${{ secrets.macOS_AppleAccountId }}" \
|
|
||||||
--team-id "${{ secrets.macOS_AppleDeveloperIdTeamId }}" \
|
|
||||||
--password "${{ secrets.macOS_AppleDeveloperIdPassword }}" \
|
|
||||||
--no-s3-acceleration \
|
|
||||||
--verbose \
|
|
||||||
--wait
|
|
||||||
xcrun stapler staple "zen.macos-${{ matrix.arch }}.dmg"
|
|
||||||
|
|
||||||
- name: Upload build artifact
|
- name: Upload dist dmg
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
retention-days: 5
|
retention-days: 1
|
||||||
name: zen.macos-${{ matrix.arch }}.dmg
|
name: zen-${{ matrix.arch }}-apple-darwin-dist.dmg
|
||||||
path: ./zen.macos-${{ matrix.arch }}.dmg
|
path: ./zen-${{ matrix.arch }}-apple-darwin-dist.dmg
|
||||||
|
|
||||||
- name: Upload build artifact (.mar)
|
- name: Upload host mar
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
if: matrix.arch == 'aarch64'
|
||||||
with:
|
with:
|
||||||
retention-days: 5
|
retention-days: 1
|
||||||
name: macos-${{ matrix.arch }}.mar
|
name: zen-macos-host-mar
|
||||||
path: ./macos-${{ matrix.arch }}.mar
|
path: ./zen-macos-host-mar
|
||||||
|
|
||||||
- name: Upload build artifact (update manifests)
|
- name: Upload platform.ini
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
if: matrix.arch == 'x86_64'
|
||||||
with:
|
with:
|
||||||
retention-days: 5
|
retention-days: 1
|
||||||
name: macos_update_manifest_${{ matrix.arch }}
|
name: platform.ini
|
||||||
path: ./dist/update
|
path: ./platform.ini
|
||||||
|
270
.github/workflows/macos-universal-release-build.yml
vendored
Normal file
270
.github/workflows/macos-universal-release-build.yml
vendored
Normal file
@@ -0,0 +1,270 @@
|
|||||||
|
name: macOS Release Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
build-version:
|
||||||
|
description: 'The version to build'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
release-branch:
|
||||||
|
description: 'The branch to build'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
mac-build:
|
||||||
|
name: Unify macOS (Universal)
|
||||||
|
runs-on: 'macos-14'
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
token: ${{ secrets.DEPLOY_KEY }}
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
# note: This will use the version defined in '.python-version' by default
|
||||||
|
|
||||||
|
- name: Setup Git
|
||||||
|
run: |
|
||||||
|
git config --global user.email "mauro-balades@users.noreply.github.com"
|
||||||
|
git config --global user.name "mauro-balades"
|
||||||
|
|
||||||
|
- name: Install system dependencies
|
||||||
|
run: |
|
||||||
|
brew update
|
||||||
|
brew install cairo sccache gnu-tar mercurial
|
||||||
|
sudo pip install setuptools
|
||||||
|
|
||||||
|
brew uninstall --ignore-dependencies python3.12 -f
|
||||||
|
|
||||||
|
export PATH="$(python3 -m site --user-base)/bin":$PATH
|
||||||
|
python3 -m pip install --user mercurial
|
||||||
|
|
||||||
|
rm '/usr/local/bin/2to3-3.11' '/usr/local/bin/2to3-3.12' '/usr/local/bin/2to3'
|
||||||
|
rm '/usr/local/bin/idle3.11' '/usr/local/bin/idle3.12' '/usr/local/bin/idle3'
|
||||||
|
rm '/usr/local/bin/pydoc3.11' '/usr/local/bin/pydoc3.12' '/usr/local/bin/pydoc3'
|
||||||
|
rm '/usr/local/bin/python3.11' '/usr/local/bin/python3.12' '/usr/local/bin/python3'
|
||||||
|
rm '/usr/local/bin/python3.11-config' '/usr/local/bin/python3.12-config' '/usr/local/bin/python3-config'
|
||||||
|
|
||||||
|
brew install watchman
|
||||||
|
|
||||||
|
cargo install apple-codesign
|
||||||
|
|
||||||
|
- name: Force usage of gnu-tar
|
||||||
|
run: |
|
||||||
|
echo 'export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"' >> ~/.bash_profile
|
||||||
|
echo 'export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"' >> ~/.zsh
|
||||||
|
source ~/.bash_profile
|
||||||
|
|
||||||
|
- name: Setup pnpm
|
||||||
|
run: npm install -g pnpm
|
||||||
|
|
||||||
|
- name: Get pnpm store directory
|
||||||
|
id: pnpm-cache
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
pnpm install
|
||||||
|
|
||||||
|
- name: Load surfer CI setup
|
||||||
|
run: pnpm surfer ci --brand ${{ inputs.release-branch }} --display-version ${{ inputs.build-version }}
|
||||||
|
|
||||||
|
- name: Download Firefox source and dependencies
|
||||||
|
run: pnpm surfer download
|
||||||
|
|
||||||
|
- name: Bootstrap
|
||||||
|
run: |
|
||||||
|
cd engine
|
||||||
|
export SURFER_PLATFORM="darwin"
|
||||||
|
export PATH="$(python3 -m site --user-base)/bin":$PATH
|
||||||
|
./mach --no-interactive bootstrap --application-choice browser --no-system-changes
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
- name: Import
|
||||||
|
run: pnpm surfer import
|
||||||
|
|
||||||
|
- name: Populate mozconfig
|
||||||
|
env:
|
||||||
|
SURFER_MOZCONFIG_ONLY: true
|
||||||
|
run: |
|
||||||
|
pnpm build
|
||||||
|
cd engine
|
||||||
|
./mach configure
|
||||||
|
|
||||||
|
- name: Download x86_64 DMG from artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: zen-x86_64-apple-darwin-dist.dmg
|
||||||
|
|
||||||
|
- name: Download aarch64 DMG from artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: zen-aarch64-apple-darwin-dist.dmg
|
||||||
|
|
||||||
|
- name: Remove any existing .app folders
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
cd engine
|
||||||
|
rm -rf "./obj-x86_64-apple-darwin/" || true
|
||||||
|
rm -rf "./obj-aarch64-apple-darwin/" || true
|
||||||
|
|
||||||
|
- name: Extract .app from dmg
|
||||||
|
run: |
|
||||||
|
set -ex
|
||||||
|
cd engine
|
||||||
|
echo "Extracting x86_64 .app from dmg"
|
||||||
|
mkdir -p ./obj-x86_64-apple-darwin/dist
|
||||||
|
mkdir -p ./obj-aarch64-apple-darwin/dist
|
||||||
|
./mach python -m mozbuild.action.unpack_dmg \
|
||||||
|
../zen-x86_64-apple-darwin-dist.dmg \
|
||||||
|
./obj-x86_64-apple-darwin/dist
|
||||||
|
echo "Extracting aarch64 .app from dmg"
|
||||||
|
./mach python -m mozbuild.action.unpack_dmg \
|
||||||
|
../zen-aarch64-apple-darwin-dist.dmg \
|
||||||
|
./obj-aarch64-apple-darwin/dist
|
||||||
|
|
||||||
|
- name: Find first .app folder name
|
||||||
|
run: |
|
||||||
|
cd engine/obj-x86_64-apple-darwin/dist
|
||||||
|
export APP_NAME=$(basename "$(find . -maxdepth 1 -name "Zen *.app" -type d | head -n 1)" .app)
|
||||||
|
echo "APP_NAME=$APP_NAME" >> $GITHUB_ENV
|
||||||
|
echo "APP_NAME=$APP_NAME"
|
||||||
|
|
||||||
|
- name: List .app folders
|
||||||
|
run: |
|
||||||
|
ls engine/
|
||||||
|
echo "--------------------"
|
||||||
|
cd engine/obj-x86_64-apple-darwin/dist
|
||||||
|
find . -maxdepth 1 -name "*.app" -type d
|
||||||
|
cd ../..
|
||||||
|
|
||||||
|
- name: create .p12 for codesign 🖊️
|
||||||
|
run: |
|
||||||
|
cd engine
|
||||||
|
echo "${{ secrets.macOS_CERTIFICATES_P12_For_App_BASE64 }}" > cert.txt
|
||||||
|
base64 --decode -i cert.txt -o zenCert.p12
|
||||||
|
echo "${{ secrets.macOS_CERTIFICATES_P12_PASSWORD }}" > zenpCertPassword.passwd
|
||||||
|
|
||||||
|
- name: Remove certificate sensitive information
|
||||||
|
run: |
|
||||||
|
rm engine/cert.txt || true
|
||||||
|
|
||||||
|
- name: Import provisioning profile for .app
|
||||||
|
run: |
|
||||||
|
echo "${{ secrets.macOS_PROVISIONING_PROFILE }}" | base64 --decode > ./engine/Zen_Browser.provisionprofile
|
||||||
|
ls -la
|
||||||
|
|
||||||
|
- name: Unify architectures
|
||||||
|
run: |
|
||||||
|
cd engine
|
||||||
|
./mach python "./toolkit/mozapps/installer/unify.py" "./obj-x86_64-apple-darwin/dist/${{ env.APP_NAME }}.app" "./obj-aarch64-apple-darwin/dist/${{ env.APP_NAME }}.app"
|
||||||
|
echo "Merged aaarch64 into x86_64!"
|
||||||
|
|
||||||
|
- name: Import APPLE DEVELOPER ID CERTIFICATE for .app
|
||||||
|
uses: Apple-Actions/import-codesign-certs@v3
|
||||||
|
with:
|
||||||
|
p12-file-base64: ${{ secrets.macOS_CERTIFICATES_P12_For_App_BASE64 }}
|
||||||
|
p12-password: ${{ secrets.macOS_CERTIFICATES_P12_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Copy provisioning profile for .app (embedded in .app)
|
||||||
|
run: |
|
||||||
|
cd engine
|
||||||
|
echo "Copying provisioning profile for .app on both architectures (${{ env.APP_NAME }})"
|
||||||
|
cp ./Zen_Browser.provisionprofile "./embedded.provisionprofile"
|
||||||
|
|
||||||
|
- name: Sign .app
|
||||||
|
run: |
|
||||||
|
cd engine
|
||||||
|
# TODO: Change it to "production" once we figure out the issue with the webauth
|
||||||
|
./mach macos-sign -v -r -c "release" -e "production-without-restricted" -a "./obj-x86_64-apple-darwin/dist/${{ env.APP_NAME }}.app" --rcodesign-p12-file zenCert.p12 --rcodesign-p12-password-file zenpCertPassword.passwd
|
||||||
|
|
||||||
|
- name: Create DMG
|
||||||
|
run: |
|
||||||
|
cd engine
|
||||||
|
./mach python -m mozbuild.action.make_dmg \
|
||||||
|
--volume-name "${{ env.APP_NAME }}" \
|
||||||
|
--background ./browser/branding/${{ inputs.release-branch }}/background.png \
|
||||||
|
--icon ./browser/branding/${{ inputs.release-branch }}/firefox.icns \
|
||||||
|
--dsstore ./browser/branding/${{ inputs.release-branch }}/dsstore \
|
||||||
|
./obj-x86_64-apple-darwin/dist/ ../zen-macOS-universal-temp.dmg
|
||||||
|
|
||||||
|
- name: Remove sensitive information
|
||||||
|
run: |
|
||||||
|
rm -f ./engine/Zen_Browser.provisionprofile
|
||||||
|
|
||||||
|
- name: Sign .dmg
|
||||||
|
run: |
|
||||||
|
set -ex
|
||||||
|
hdiutil convert zen-macOS-universal-temp.dmg -format UDZO -imagekey zlib-level=9 -o zen.macos-universal.dmg
|
||||||
|
codesign -s "${{ secrets.macOS_AppleDeveloperId }}" zen.macos-universal.dmg
|
||||||
|
xcrun notarytool submit "zen.macos-universal.dmg" \
|
||||||
|
--apple-id "${{ secrets.macOS_AppleAccountId }}" \
|
||||||
|
--team-id "${{ secrets.macOS_AppleDeveloperIdTeamId }}" \
|
||||||
|
--password "${{ secrets.macOS_AppleDeveloperIdPassword }}" \
|
||||||
|
--no-s3-acceleration \
|
||||||
|
--wait
|
||||||
|
xcrun stapler staple "zen.macos-universal.dmg"
|
||||||
|
|
||||||
|
- name: Download host mar
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: zen-macos-host-mar
|
||||||
|
|
||||||
|
- name: Upload build artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
retention-days: 5
|
||||||
|
name: zen.macos-universal.dmg
|
||||||
|
path: ./zen.macos-universal.dmg
|
||||||
|
|
||||||
|
- name: Download platform.ini
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: platform.ini
|
||||||
|
|
||||||
|
- name: Package for mar
|
||||||
|
env:
|
||||||
|
JUST_MAR: true
|
||||||
|
run: |
|
||||||
|
# we don't need it anymore
|
||||||
|
set -ex
|
||||||
|
rm -rf ./engine/obj-aarch64-apple-darwin
|
||||||
|
mkdir -p ./engine/obj-x86_64-apple-darwin/dist/bin
|
||||||
|
mv ./platform.ini ./engine/obj-x86_64-apple-darwin/dist/bin/platform.ini
|
||||||
|
export SURFER_PLATFORM="darwin"
|
||||||
|
export ZEN_RELEASE=1
|
||||||
|
# full path to zen-macos-host-mar
|
||||||
|
export MAR=$(pwd)/zen-macos-host-mar
|
||||||
|
chmod +x $MAR
|
||||||
|
echo "MAR=$MAR"
|
||||||
|
pnpm package --verbose
|
||||||
|
mv ./dist/output.mar ./macos.mar
|
||||||
|
|
||||||
|
- name: Upload build artifact (.mar)
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
retention-days: 5
|
||||||
|
name: macos.mar
|
||||||
|
path: ./macos.mar
|
||||||
|
|
||||||
|
- name: Upload build artifact (update manifests)
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
retention-days: 5
|
||||||
|
name: macos_update_manifest
|
||||||
|
path: ./dist/update
|
7
.github/workflows/windows-release-build.yml
vendored
7
.github/workflows/windows-release-build.yml
vendored
@@ -18,6 +18,10 @@ on:
|
|||||||
description: 'The branch to build'
|
description: 'The branch to build'
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
MOZ_BUILD_DATE:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
default: ''
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
windows-build:
|
windows-build:
|
||||||
@@ -216,6 +220,9 @@ jobs:
|
|||||||
if test ${{ inputs.generate-gpo }} = true; then
|
if test ${{ inputs.generate-gpo }} = true; then
|
||||||
export ZEN_GA_GENERATE_PROFILE=1
|
export ZEN_GA_GENERATE_PROFILE=1
|
||||||
fi
|
fi
|
||||||
|
if [[ -n ${{ inputs.MOZ_BUILD_DATE }} ]];then
|
||||||
|
export MOZ_BUILD_DATE=${{ inputs.MOZ_BUILD_DATE }}
|
||||||
|
fi
|
||||||
bash .github/workflows/src/release-build.sh
|
bash .github/workflows/src/release-build.sh
|
||||||
|
|
||||||
- name: Package
|
- name: Package
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -9,3 +9,5 @@ dist/
|
|||||||
|
|
||||||
windsign-temp/
|
windsign-temp/
|
||||||
venv/
|
venv/
|
||||||
|
|
||||||
|
!firefox-cache/
|
||||||
|
@@ -129,6 +129,7 @@ Zen couldn't be in its current state without the help of these amazing projects!
|
|||||||
|
|
||||||
- Zen's default preferences are based on [BetterFox](https://github.com/yokoffing/Betterfox)
|
- Zen's default preferences are based on [BetterFox](https://github.com/yokoffing/Betterfox)
|
||||||
- Gradient image extracted from [Arc Palette](https://github.com/neurokitti/Arc_Palette)
|
- Gradient image extracted from [Arc Palette](https://github.com/neurokitti/Arc_Palette)
|
||||||
|
- `icons.css` has been modified from [Edge Firefox](https://github.com/bmFtZQ/edge-frfox) (MIT licensed file).
|
||||||
|
|
||||||
### 🖥️ Comparison with other browsers
|
### 🖥️ Comparison with other browsers
|
||||||
|
|
||||||
|
@@ -1,39 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<!--
|
|
||||||
Entitlements to apply to the main browser process executable during
|
|
||||||
codesigning of production channel builds.
|
|
||||||
-->
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<!-- Firefox needs to create executable pages (without MAP_JIT) -->
|
|
||||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key><true/>
|
|
||||||
|
|
||||||
<!-- Firefox needs to create executable pages with MAP_JIT on aarch64 -->
|
|
||||||
<key>com.apple.security.cs.allow-jit</key><true/>
|
|
||||||
|
|
||||||
<!-- Allow loading third party libraries. Needed for Flash and CDMs -->
|
|
||||||
<key>com.apple.security.cs.disable-library-validation</key><true/>
|
|
||||||
|
|
||||||
<!-- Firefox needs to access the microphone on sites the user allows -->
|
|
||||||
<key>com.apple.security.device.audio-input</key><true/>
|
|
||||||
|
|
||||||
<!-- Firefox needs to access the camera on sites the user allows -->
|
|
||||||
<key>com.apple.security.device.camera</key><true/>
|
|
||||||
|
|
||||||
<!-- Firefox needs to access the location on sites the user allows -->
|
|
||||||
<key>com.apple.security.personal-information.location</key><true/>
|
|
||||||
|
|
||||||
<!-- Allow Firefox to send Apple events to other applications. Needed
|
|
||||||
for native messaging webextension helper applications launched by
|
|
||||||
Firefox which rely on Apple Events to signal other processes. -->
|
|
||||||
<key>com.apple.security.automation.apple-events</key><true/>
|
|
||||||
|
|
||||||
<!-- For SmartCardServices(7) -->
|
|
||||||
<key>com.apple.security.smartcard</key><true/>
|
|
||||||
|
|
||||||
<!-- Required for com.apple.developer.web-browser.public-key-credential -->
|
|
||||||
<key>com.apple.application-identifier</key>
|
|
||||||
<string>H36NPCN86W.app.zen-browser.zen</string>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
@@ -1,179 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# 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 https://mozilla.org/MPL/2.0/.
|
|
||||||
#
|
|
||||||
# Runs codesign commands to codesign a Firefox .app bundle and enable macOS
|
|
||||||
# Hardened Runtime. Intended to be manually run by developers working on macOS
|
|
||||||
# 10.14+ who want to enable Hardened Runtime for manual testing. This is
|
|
||||||
# provided as a stop-gap until automated build tooling is available that signs
|
|
||||||
# binaries with a certificate generated during builds (bug 1522409). This
|
|
||||||
# script requires macOS 10.14 because Hardened Runtime is only available for
|
|
||||||
# applications running on 10.14 despite support for the codesign "-o runtime"
|
|
||||||
# option being available in 10.13.6 and newer.
|
|
||||||
#
|
|
||||||
# The script requires an identity string (-i option) from an Apple Developer
|
|
||||||
# ID certificate. This can be found in the macOS KeyChain after configuring an
|
|
||||||
# Apple Developer ID certificate.
|
|
||||||
#
|
|
||||||
# Example usage on macOS 10.14:
|
|
||||||
#
|
|
||||||
# $ ./mach build
|
|
||||||
# $ ./mach build package
|
|
||||||
# $ open </PATH/TO/DMG/FILE.dmg>
|
|
||||||
# <Drag Nightly.app to ~>
|
|
||||||
# $ ./security/mac/hardenedruntime/codesign.bash \
|
|
||||||
# -a ~/Nightly.app \
|
|
||||||
# -i <MY-IDENTITY-STRING> \
|
|
||||||
# -b security/mac/hardenedruntime/browser.developer.entitlements.xml
|
|
||||||
# -p security/mac/hardenedruntime/plugin-container.developer.entitlements.xml
|
|
||||||
# $ open ~/Nightly.app
|
|
||||||
#
|
|
||||||
|
|
||||||
usage ()
|
|
||||||
{
|
|
||||||
echo "Usage: $0 "
|
|
||||||
echo " -a <PATH-TO-BROWSER.app>"
|
|
||||||
echo " -i <IDENTITY>"
|
|
||||||
echo " -b <ENTITLEMENTS-FILE>"
|
|
||||||
echo " -p <CHILD-ENTITLEMENTS-FILE>"
|
|
||||||
echo " [-o <OUTPUT-DMG-FILE>]"
|
|
||||||
exit -1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Make sure we are running on macOS with the sw_vers command available.
|
|
||||||
SWVERS=/usr/bin/sw_vers
|
|
||||||
if [ ! -x ${SWVERS} ]; then
|
|
||||||
echo "ERROR: macOS 10.14 or later is required"
|
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Require macOS 10.14 or newer.
|
|
||||||
#OSVERSION=`${SWVERS} -productVersion|sed -En 's/[0-9]+\.([0-9]+)\.[0-9]+/\1/p'`;
|
|
||||||
#if [ ${OSVERSION} \< 14 ]; then
|
|
||||||
# echo "ERROR: macOS 10.14 or later is required"
|
|
||||||
# exit -1
|
|
||||||
#fi
|
|
||||||
|
|
||||||
while getopts "a:i:b:o:p:" opt; do
|
|
||||||
case ${opt} in
|
|
||||||
a ) BUNDLE=$OPTARG ;;
|
|
||||||
i ) IDENTITY=$OPTARG ;;
|
|
||||||
b ) BROWSER_ENTITLEMENTS_FILE=$OPTARG ;;
|
|
||||||
p ) PLUGINCONTAINER_ENTITLEMENTS_FILE=$OPTARG ;;
|
|
||||||
o ) OUTPUT_DMG_FILE=$OPTARG ;;
|
|
||||||
\? ) usage; exit -1 ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -z "${BUNDLE}" ] ||
|
|
||||||
[ -z "${IDENTITY}" ] ||
|
|
||||||
[ -z "${PLUGINCONTAINER_ENTITLEMENTS_FILE}" ] ||
|
|
||||||
[ -z "${BROWSER_ENTITLEMENTS_FILE}" ]; then
|
|
||||||
usage
|
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d "${BUNDLE}" ]; then
|
|
||||||
echo "Invalid bundle. Bundle should be a .app directory"
|
|
||||||
usage
|
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -e "${PLUGINCONTAINER_ENTITLEMENTS_FILE}" ]; then
|
|
||||||
echo "Invalid entitlements file"
|
|
||||||
usage
|
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -e "${BROWSER_ENTITLEMENTS_FILE}" ]; then
|
|
||||||
echo "Invalid entitlements file"
|
|
||||||
usage
|
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# DMG file output flag is optional
|
|
||||||
if [ ! -z "${OUTPUT_DMG_FILE}" ] &&
|
|
||||||
[ -e "${OUTPUT_DMG_FILE}" ]; then
|
|
||||||
echo "Output dmg file ${OUTPUT_DMG_FILE} exists. Please delete it first."
|
|
||||||
usage
|
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "-------------------------------------------------------------------------"
|
|
||||||
echo "bundle: $BUNDLE"
|
|
||||||
echo "identity: $IDENTITY"
|
|
||||||
echo "browser entitlements file: $BROWSER_ENTITLEMENTS_FILE"
|
|
||||||
echo "plugin-container entitlements file: $PLUGINCONTAINER_ENTITLEMENTS_FILE"
|
|
||||||
echo "output dmg file (optional): $OUTPUT_DMG_FILE"
|
|
||||||
echo "-------------------------------------------------------------------------"
|
|
||||||
|
|
||||||
set -x
|
|
||||||
|
|
||||||
# move Zen_Browser.provisionprofile to the Contents directory
|
|
||||||
#cp Zen_Browser.provisionprofile "${BUNDLE}"/Contents/embedded.provisionprofile
|
|
||||||
|
|
||||||
# Clear extended attributes which cause codesign to fail
|
|
||||||
xattr -cr "${BUNDLE}"
|
|
||||||
|
|
||||||
# Sign these binaries first. Signing of some binaries has an ordering
|
|
||||||
# requirement where other binaries must be signed first.
|
|
||||||
codesign --force -o runtime --verbose --sign "$IDENTITY" \
|
|
||||||
"${BUNDLE}/Contents/Library/LaunchServices/org.mozilla.updater" \
|
|
||||||
"${BUNDLE}/Contents/MacOS/XUL" \
|
|
||||||
"${BUNDLE}"/Contents/embedded.provisionprofile \
|
|
||||||
"${BUNDLE}/Contents/MacOS/pingsender"
|
|
||||||
|
|
||||||
# Sign every ${BUNDLE}/Contents/MacOS/*.dylib
|
|
||||||
find "${BUNDLE}"/Contents/MacOS -type f -name "*.dylib" -exec \
|
|
||||||
codesign --force --verbose --sign "$IDENTITY" {} \;
|
|
||||||
|
|
||||||
find "${BUNDLE}"/Contents/MacOS -type f -name "*.dylib" -exec \
|
|
||||||
codesign -vvv --strict --deep --verbose {} \;
|
|
||||||
|
|
||||||
codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \
|
|
||||||
"${BUNDLE}"/Contents/MacOS/updater.app
|
|
||||||
|
|
||||||
# Sign zen main executable
|
|
||||||
codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \
|
|
||||||
--entitlements ${BROWSER_ENTITLEMENTS_FILE} \
|
|
||||||
"${BUNDLE}"/Contents/MacOS/zen
|
|
||||||
|
|
||||||
# Sign Library/LaunchServices
|
|
||||||
codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \
|
|
||||||
"${BUNDLE}"/Contents/Library/LaunchServices/org.mozilla.updater
|
|
||||||
|
|
||||||
# Sign gmp-clearkey files
|
|
||||||
find "${BUNDLE}"/Contents/Resources/gmp-clearkey -type f -exec \
|
|
||||||
codesign --force -o runtime --verbose --sign "$IDENTITY" {} \;
|
|
||||||
|
|
||||||
# Sign the main bundle
|
|
||||||
codesign --force -o runtime --verbose --sign "$IDENTITY" \
|
|
||||||
--entitlements ${BROWSER_ENTITLEMENTS_FILE} "${BUNDLE}"
|
|
||||||
|
|
||||||
# Sign the plugin-container bundle with deep
|
|
||||||
codesign --force -o runtime --verbose --sign "$IDENTITY" --deep \
|
|
||||||
--entitlements ${PLUGINCONTAINER_ENTITLEMENTS_FILE} \
|
|
||||||
"${BUNDLE}"/Contents/MacOS/plugin-container.app
|
|
||||||
|
|
||||||
# Validate
|
|
||||||
codesign -vvv --deep --strict "${BUNDLE}"
|
|
||||||
|
|
||||||
# Create a DMG
|
|
||||||
if [ ! -z "${OUTPUT_DMG_FILE}" ]; then
|
|
||||||
DISK_IMAGE_DIR=`mktemp -d`
|
|
||||||
TEMP_FILE=`mktemp`
|
|
||||||
TEMP_DMG=${TEMP_FILE}.dmg
|
|
||||||
NAME=`basename "${BUNDLE}"`
|
|
||||||
|
|
||||||
ditto "${BUNDLE}" "${DISK_IMAGE_DIR}/${NAME}"
|
|
||||||
hdiutil create -size 400m -fs HFS+ \
|
|
||||||
-volname Firefox -srcfolder "${DISK_IMAGE_DIR}" "${TEMP_DMG}"
|
|
||||||
hdiutil convert -format UDZO \
|
|
||||||
-o "${OUTPUT_DMG_FILE}" "${TEMP_DMG}"
|
|
||||||
|
|
||||||
rm ${TEMP_FILE}
|
|
||||||
rm ${TEMP_DMG}
|
|
||||||
rm -rf "${DISK_IMAGE_DIR}"
|
|
||||||
fi
|
|
@@ -1,32 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<!--
|
|
||||||
Entitlements to apply to the plugin-container.app bundle during
|
|
||||||
codesigning of production channel builds.
|
|
||||||
-->
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<!-- Firefox needs to create executable pages (without MAP_JIT) -->
|
|
||||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key><true/>
|
|
||||||
|
|
||||||
<!-- Firefox needs to create executable pages with MAP_JIT on aarch64 -->
|
|
||||||
<key>com.apple.security.cs.allow-jit</key><true/>
|
|
||||||
|
|
||||||
<!-- Allow loading third party libraries. Needed for Flash and CDMs -->
|
|
||||||
<key>com.apple.security.cs.disable-library-validation</key><true/>
|
|
||||||
|
|
||||||
<!-- Firefox needs to access the microphone on sites the user allows -->
|
|
||||||
<key>com.apple.security.device.audio-input</key><true/>
|
|
||||||
|
|
||||||
<!-- Firefox needs to access the camera on sites the user allows -->
|
|
||||||
<key>com.apple.security.device.camera</key><true/>
|
|
||||||
|
|
||||||
<!-- Firefox needs to access the location on sites the user allows -->
|
|
||||||
<key>com.apple.security.personal-information.location</key><true/>
|
|
||||||
|
|
||||||
<!-- Allow Firefox to send Apple events to other applications. Needed
|
|
||||||
for native messaging webextension helper applications launched by
|
|
||||||
Firefox which rely on Apple Events to signal other processes. -->
|
|
||||||
<key>com.apple.security.automation.apple-events</key><true/>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
1
firefox-cache/l10n-last-commit-hash
Normal file
1
firefox-cache/l10n-last-commit-hash
Normal file
@@ -0,0 +1 @@
|
|||||||
|
1e9d5c766342b027f104f5071ec8e343abb1088b
|
2
l10n
2
l10n
Submodule l10n updated: 1abc46f17d...cb32b48cb5
0
l10n-last-commit-hash
Normal file
0
l10n-last-commit-hash
Normal file
4544
package-lock.json
generated
Normal file
4544
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -19,6 +19,7 @@
|
|||||||
"update-ff:raw": "surfer update",
|
"update-ff:raw": "surfer update",
|
||||||
"update-newtab": "python3 scripts/update_newtab.py",
|
"update-newtab": "python3 scripts/update_newtab.py",
|
||||||
"update-ff:rc": "python3 scripts/update_ff.py --rc",
|
"update-ff:rc": "python3 scripts/update_ff.py --rc",
|
||||||
|
"update-ff:l10n": "python3 scripts/update_ff.py --just-l10n",
|
||||||
"pretty": "prettier . --write && autopep8 -r --in-place scripts/ src/",
|
"pretty": "prettier . --write && autopep8 -r --in-place scripts/ src/",
|
||||||
"lint": "npx prettier . --check && autopep8 --diff scripts/ src/",
|
"lint": "npx prettier . --check && autopep8 --diff scripts/ src/",
|
||||||
"prepare": "husky",
|
"prepare": "husky",
|
||||||
@@ -39,7 +40,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/zen-browser/core#readme",
|
"homepage": "https://github.com/zen-browser/core#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@zen-browser/surfer": "^1.9.8"
|
"@zen-browser/surfer": "^1.9.16"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"husky": "^9.1.7",
|
"husky": "^9.1.7",
|
||||||
|
1927
pnpm-lock.yaml
generated
1927
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -7,8 +7,13 @@ git config --global fetch.prune true
|
|||||||
|
|
||||||
cd $CURRENT_DIR
|
cd $CURRENT_DIR
|
||||||
|
|
||||||
|
LAST_FIREFOX_L10N_COMMIT=$(cat ./firefox-cache/l10n-last-commit-hash)
|
||||||
|
|
||||||
cd ./l10n
|
cd ./l10n
|
||||||
|
# clone only from LAST_FIREFOX_L10N_COMMIT
|
||||||
git clone https://github.com/mozilla-l10n/firefox-l10n
|
git clone https://github.com/mozilla-l10n/firefox-l10n
|
||||||
|
cd firefox-l10n
|
||||||
|
git checkout $LAST_FIREFOX_L10N_COMMIT
|
||||||
cd $CURRENT_DIR
|
cd $CURRENT_DIR
|
||||||
|
|
||||||
update_language() {
|
update_language() {
|
||||||
|
@@ -57,21 +57,39 @@ def update_readme(last_version, new_version, is_rc=False):
|
|||||||
raise RuntimeError(f"README.md file not found: {e}")
|
raise RuntimeError(f"README.md file not found: {e}")
|
||||||
|
|
||||||
|
|
||||||
|
def update_l10n_last_commit_hash():
|
||||||
|
L10N_REPO = "https://github.com/mozilla-l10n/firefox-l10n"
|
||||||
|
try:
|
||||||
|
os.system(f"git clone {L10N_REPO} l10n-temp")
|
||||||
|
if not os.path.exists("firefox-cache"):
|
||||||
|
os.mkdir("firefox-cache")
|
||||||
|
with open("l10n-last-commit-hash", "w") as f:
|
||||||
|
os.system("cat l10n-temp/.git/refs/heads/main > firefox-cache/l10n-last-commit-hash")
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print("Exiting...")
|
||||||
|
shutil.rmtree("l10n-temp")
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
"""Main function to update versions and README."""
|
"""Main function to update versions and README."""
|
||||||
|
|
||||||
arg_parser = argparse.ArgumentParser()
|
arg_parser = argparse.ArgumentParser()
|
||||||
arg_parser.add_argument(
|
arg_parser.add_argument(
|
||||||
"--rc", help="Indicates that this is a release candidate.", default=False, action="store_true")
|
"--rc", help="Indicates that this is a release candidate.", default=False, action="store_true")
|
||||||
|
arg_parser.add_argument(
|
||||||
|
"--just-l10n", help="Only update the l10n last commit hash.", default=False, action="store_true")
|
||||||
args = arg_parser.parse_args()
|
args = arg_parser.parse_args()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
if not args.just_l10n:
|
||||||
last_version = get_version_from_file("surfer.json", args.rc)
|
last_version = get_version_from_file("surfer.json", args.rc)
|
||||||
update_ff(args.rc, last_version)
|
update_ff(args.rc, last_version)
|
||||||
new_version = get_version_from_file("surfer.json", args.rc)
|
new_version = get_version_from_file("surfer.json", args.rc)
|
||||||
update_readme(last_version, new_version, args.rc)
|
update_readme(last_version, new_version, args.rc)
|
||||||
print(
|
print(
|
||||||
f"Updated version from {last_version} to {new_version} in README.md.")
|
f"Updated version from {last_version} to {new_version} in README.md.")
|
||||||
|
print("Updating l10n last commit hash.")
|
||||||
|
update_l10n_last_commit_hash()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"An error occurred: {e}")
|
print(f"An error occurred: {e}")
|
||||||
|
|
||||||
|
@@ -89,8 +89,8 @@ pref('zen.theme.gradient', true);
|
|||||||
pref('zen.theme.essentials-favicon-bg', false);
|
pref('zen.theme.essentials-favicon-bg', false);
|
||||||
|
|
||||||
pref('zen.tabs.show-newtab-vertical', true);
|
pref('zen.tabs.show-newtab-vertical', true);
|
||||||
pref('zen.view.show-newtab-button-border-top', true);
|
pref('zen.view.show-newtab-button-border-top', false);
|
||||||
pref('zen.view.show-newtab-button-top', false);
|
pref('zen.view.show-newtab-button-top', true);
|
||||||
|
|
||||||
#ifdef MOZILLA_OFFICIAL
|
#ifdef MOZILLA_OFFICIAL
|
||||||
pref('zen.rice.api.url', 'https://share.zen-browser.app', locked);
|
pref('zen.rice.api.url', 'https://share.zen-browser.app', locked);
|
||||||
@@ -202,7 +202,7 @@ pref('zen.workspaces.hide-default-container-indicator', true);
|
|||||||
pref('zen.workspaces.individual-pinned-tabs', true);
|
pref('zen.workspaces.individual-pinned-tabs', true);
|
||||||
pref('zen.workspaces.show-icon-strip', true);
|
pref('zen.workspaces.show-icon-strip', true);
|
||||||
pref('zen.workspaces.force-container-workspace', false);
|
pref('zen.workspaces.force-container-workspace', false);
|
||||||
pref('zen.workspaces.open-new-tab-if-last-unpinned-tab-is-closed', true);
|
pref('zen.workspaces.open-new-tab-if-last-unpinned-tab-is-closed', false);
|
||||||
pref('zen.workspaces.show-workspace-indicator', true);
|
pref('zen.workspaces.show-workspace-indicator', true);
|
||||||
pref('zen.workspaces.swipe-actions', true);
|
pref('zen.workspaces.swipe-actions', true);
|
||||||
pref('zen.workspaces.wrap-around-navigation', true);
|
pref('zen.workspaces.wrap-around-navigation', true);
|
||||||
|
@@ -126,7 +126,7 @@ export var ZenCustomizableUI = new (class {
|
|||||||
window.CustomizableUI.registerToolbarNode(window.document.getElementById('zen-sidebar-top-buttons'));
|
window.CustomizableUI.registerToolbarNode(window.document.getElementById('zen-sidebar-top-buttons'));
|
||||||
window.CustomizableUI.registerToolbarNode(window.document.getElementById('zen-sidebar-icons-wrapper'));
|
window.CustomizableUI.registerToolbarNode(window.document.getElementById('zen-sidebar-icons-wrapper'));
|
||||||
window.addEventListener(
|
window.addEventListener(
|
||||||
'MozAfterPaint',
|
'DOMContentLoaded',
|
||||||
() => {
|
() => {
|
||||||
this._dispatchResizeEvent(window);
|
this._dispatchResizeEvent(window);
|
||||||
},
|
},
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
var gZenUIManager = {
|
var gZenUIManager = {
|
||||||
_popupTrackingElements: [],
|
_popupTrackingElements: [],
|
||||||
_hoverPausedForExpand: false,
|
_hoverPausedForExpand: false,
|
||||||
|
_hasLoadedDOM: false,
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
document.addEventListener('popupshowing', this.onPopupShowing.bind(this));
|
document.addEventListener('popupshowing', this.onPopupShowing.bind(this));
|
||||||
@@ -23,6 +24,10 @@ var gZenUIManager = {
|
|||||||
)
|
)
|
||||||
).observe(document.getElementById('navigator-toolbox'));
|
).observe(document.getElementById('navigator-toolbox'));
|
||||||
|
|
||||||
|
SessionStore.promiseAllWindowsRestored.then(() => {
|
||||||
|
this._hasLoadedDOM = true;
|
||||||
|
});
|
||||||
|
|
||||||
window.addEventListener('TabClose', this.updateTabsToolbar.bind(this));
|
window.addEventListener('TabClose', this.updateTabsToolbar.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -212,6 +217,45 @@ var gZenVerticalTabsManager = {
|
|||||||
return this.__topButtonsSeparatorElement;
|
return this.__topButtonsSeparatorElement;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
animateTab(aTab) {
|
||||||
|
if (!gZenUIManager.motion || !aTab || !gZenUIManager._hasLoadedDOM) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// get next visible tab
|
||||||
|
const isLastTab = () => {
|
||||||
|
const visibleTabs = gBrowser.visibleTabs;
|
||||||
|
return visibleTabs[visibleTabs.length - 1] === aTab;
|
||||||
|
};
|
||||||
|
|
||||||
|
const tabSize = aTab.getBoundingClientRect().height;
|
||||||
|
const transform = `-${tabSize}px`;
|
||||||
|
gZenUIManager.motion
|
||||||
|
.animate(
|
||||||
|
aTab,
|
||||||
|
{
|
||||||
|
opacity: [0, 1],
|
||||||
|
transform: ['scale(0.95)', 'scale(1)'],
|
||||||
|
marginBottom: isLastTab() ? [] : [transform, '0px'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
duration: 0.2,
|
||||||
|
easing: 'ease-out',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
aTab.style.removeProperty('margin-bottom');
|
||||||
|
aTab.style.removeProperty('transform');
|
||||||
|
aTab.style.removeProperty('opacity');
|
||||||
|
});
|
||||||
|
gZenUIManager.motion
|
||||||
|
.animate(aTab.querySelector('.tab-stack'), {
|
||||||
|
filter: ['blur(1px)', 'blur(0px)'],
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
aTab.querySelector('.tab-stack').style.removeProperty('filter');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
get actualWindowButtons() {
|
get actualWindowButtons() {
|
||||||
// we have multiple ".titlebar-buttonbox-container" in the DOM, because of the titlebar
|
// we have multiple ".titlebar-buttonbox-container" in the DOM, because of the titlebar
|
||||||
if (!this.__actualWindowButtons) {
|
if (!this.__actualWindowButtons) {
|
||||||
|
@@ -56,21 +56,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes zen-new-tab-appear-vertical {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(-25px);
|
|
||||||
}
|
|
||||||
60% {
|
|
||||||
opacity: 0.8;
|
|
||||||
transform: translateY(4px);
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translateY(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes zen-main-app-wrapper-animation {
|
@keyframes zen-main-app-wrapper-animation {
|
||||||
from {
|
from {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
@@ -228,8 +228,8 @@
|
|||||||
1.003423 100%
|
1.003423 100%
|
||||||
);
|
);
|
||||||
transition:
|
transition:
|
||||||
left 0.3125s var(--zen-compact-mode-func),
|
left 0.3s var(--zen-compact-mode-func),
|
||||||
right 0.3125s var(--zen-compact-mode-func);
|
right 0.3s var(--zen-compact-mode-func);
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
|
||||||
left: -1px;
|
left: -1px;
|
||||||
|
@@ -56,6 +56,11 @@ panel {
|
|||||||
--panel-border-radius: var(--zen-native-inner-radius);
|
--panel-border-radius: var(--zen-native-inner-radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* split-view popup */
|
||||||
|
#confirmation-hint {
|
||||||
|
--arrowpanel-background: var(--zen-colors-primary);
|
||||||
|
}
|
||||||
|
|
||||||
/* app menu */
|
/* app menu */
|
||||||
.addon-banner-item,
|
.addon-banner-item,
|
||||||
.panel-banner-item {
|
.panel-banner-item {
|
||||||
|
@@ -60,12 +60,6 @@
|
|||||||
#tabbrowser-arrowscrollbox {
|
#tabbrowser-arrowscrollbox {
|
||||||
min-height: fit-content !important;
|
min-height: fit-content !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vertical-pinned-tabs-container, #tabbrowser-arrowscrollbox {
|
|
||||||
.tabbrowser-tab[fadein='true'][zen-initial-fadein='true'] {
|
|
||||||
animation: zen-new-tab-appear-vertical 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:root[zen-window-buttons-reversed='true'] .titlebar-buttonbox-container {
|
:root[zen-window-buttons-reversed='true'] .titlebar-buttonbox-container {
|
||||||
@@ -78,7 +72,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#browser {
|
#browser {
|
||||||
--zen-toolbox-padding: max(5px, calc(var(--zen-element-separation) / 1.5));
|
--zen-min-toolbox-padding: .4rem;
|
||||||
|
@media (-moz-platform: macos) {
|
||||||
|
--zen-min-toolbox-padding: .52rem;
|
||||||
|
}
|
||||||
|
--zen-toolbox-padding: max(var(--zen-min-toolbox-padding), calc(var(--zen-element-separation) / 1.5));
|
||||||
}
|
}
|
||||||
|
|
||||||
:root[zen-single-toolbar='true'] {
|
:root[zen-single-toolbar='true'] {
|
||||||
@@ -131,11 +129,15 @@
|
|||||||
background: light-dark(rgba(1, 1, 1, 0.075), rgba(255, 255, 255, 0.1));
|
background: light-dark(rgba(1, 1, 1, 0.075), rgba(255, 255, 255, 0.1));
|
||||||
margin: 8px auto;
|
margin: 8px auto;
|
||||||
border: none;
|
border: none;
|
||||||
min-height: 1px;
|
height: 1px;
|
||||||
|
max-height: 1px;
|
||||||
width: 98%;
|
width: 98%;
|
||||||
|
transition: margin 0.2s ease-in-out, background 0.2s ease-in-out, max-height 0.2s ease-in-out;
|
||||||
|
|
||||||
#vertical-pinned-tabs-container:not(:has(tab:not([hidden]))) + & {
|
#vertical-pinned-tabs-container:not(:has(tab:not([hidden]))) + &,
|
||||||
display: none;
|
#tabbrowser-tabs:not(:has(#tabbrowser-arrowscrollbox tab:not([hidden]))) & {
|
||||||
|
max-height: 0;
|
||||||
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -943,6 +945,7 @@
|
|||||||
|
|
||||||
& .tab-background {
|
& .tab-background {
|
||||||
border-radius: var(--border-radius-medium) !important;
|
border-radius: var(--border-radius-medium) !important;
|
||||||
|
transition: background 0.2s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
--tab-selected-bgcolor: light-dark(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.2));
|
--tab-selected-bgcolor: light-dark(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.2));
|
||||||
@@ -974,6 +977,10 @@
|
|||||||
margin-inline-end: 0 !important;
|
margin-inline-end: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:hover .tab-background {
|
||||||
|
background: var(--tab-selected-bgcolor);
|
||||||
|
}
|
||||||
|
|
||||||
@media (-moz-bool-pref: 'zen.theme.essentials-favicon-bg') {
|
@media (-moz-bool-pref: 'zen.theme.essentials-favicon-bg') {
|
||||||
&[selected] .tab-background {
|
&[selected] .tab-background {
|
||||||
&::after {
|
&::after {
|
||||||
|
@@ -61,13 +61,17 @@
|
|||||||
|
|
||||||
@media not (-moz-bool-pref: 'zen.workspaces.hide-deactivated-workspaces') {
|
@media not (-moz-bool-pref: 'zen.workspaces.hide-deactivated-workspaces') {
|
||||||
& {
|
& {
|
||||||
color: transparent;
|
filter: grayscale(1);
|
||||||
text-shadow: 0 0 0 light-dark(rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0.15));
|
opacity: 0.5;
|
||||||
transition: text-shadow 0.2s ease;
|
transition:
|
||||||
|
filter 0.2s,
|
||||||
|
opacity 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
&[active='true'] {
|
&[active='true'],
|
||||||
text-shadow: 0 0 0 color-mix(in srgb, var(--zen-primary-color) 80%, transparent 20%);
|
&:hover {
|
||||||
|
filter: grayscale(0);
|
||||||
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -246,9 +246,22 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||||||
this._swipeState.cumulativeDelta += event.delta;
|
this._swipeState.cumulativeDelta += event.delta;
|
||||||
|
|
||||||
// Determine swipe direction based on cumulative delta
|
// Determine swipe direction based on cumulative delta
|
||||||
if (Math.abs(this._swipeState.cumulativeDelta) > 0.25) {
|
if (Math.abs(this._swipeState.cumulativeDelta) > 1) {
|
||||||
this._swipeState.direction = this._swipeState.cumulativeDelta > 0 ? 'left' : 'right';
|
this._swipeState.direction = this._swipeState.cumulativeDelta > 0 ? 'left' : 'right';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Apply a translateX to the tab strip to give the user feedback on the swipe
|
||||||
|
const stripWidth = document.getElementById('tabbrowser-tabs').scrollWidth;
|
||||||
|
// To make the animation larger, we multiply the delta by 5
|
||||||
|
let translateX = this._swipeState.cumulativeDelta * 10;
|
||||||
|
if (this._swipeState.direction === 'left') {
|
||||||
|
translateX = Math.min(translateX, stripWidth);
|
||||||
|
} else {
|
||||||
|
translateX = Math.max(translateX, -stripWidth);
|
||||||
|
}
|
||||||
|
for (const element of this._animateTabsElements) {
|
||||||
|
element.style.transform = `translateX(${translateX}px)`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async _handleSwipeEnd(event) {
|
async _handleSwipeEnd(event) {
|
||||||
@@ -262,6 +275,8 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||||||
if (this._swipeState.direction) {
|
if (this._swipeState.direction) {
|
||||||
let direction = this.naturalScroll ? -1 : 1;
|
let direction = this.naturalScroll ? -1 : 1;
|
||||||
this.changeWorkspaceShortcut(rawDirection * direction);
|
this.changeWorkspaceShortcut(rawDirection * direction);
|
||||||
|
} else {
|
||||||
|
this._cancelSwipeAnimation();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset swipe state
|
// Reset swipe state
|
||||||
@@ -1273,10 +1288,29 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_cancelSwipeAnimation() {
|
||||||
|
const existingTransform = this._animateTabsElements[0].style.transform;
|
||||||
|
const newTransform = 'translateX(0)';
|
||||||
|
for (const element of this._animateTabsElements) {
|
||||||
|
gZenUIManager.motion.animate(
|
||||||
|
element,
|
||||||
|
{
|
||||||
|
transform: existingTransform ? [existingTransform, newTransform] : newTransform,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'spring',
|
||||||
|
bounce: 0,
|
||||||
|
duration: 0.12,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async _performWorkspaceChange(window, { onInit = false, explicitAnimationDirection = undefined } = {}) {
|
async _performWorkspaceChange(window, { onInit = false, explicitAnimationDirection = undefined } = {}) {
|
||||||
const previousWorkspace = await this.getActiveWorkspace();
|
const previousWorkspace = await this.getActiveWorkspace();
|
||||||
|
|
||||||
if (previousWorkspace && previousWorkspace.uuid === window.uuid && !onInit) {
|
if (previousWorkspace && previousWorkspace.uuid === window.uuid && !onInit) {
|
||||||
|
this._cancelSwipeAnimation();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1316,21 +1350,24 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async _animateTabs(direction, out = false) {
|
get _animateTabsElements() {
|
||||||
const selector = `#zen-browser-tabs-wrapper`;
|
const selector = `#zen-browser-tabs-wrapper`;
|
||||||
const extraSelector = `#zen-current-workspace-indicator`;
|
const extraSelector = `#zen-current-workspace-indicator`;
|
||||||
|
return [...this.tabContainer.querySelectorAll(selector), ...this.tabContainer.querySelectorAll(extraSelector)];
|
||||||
|
}
|
||||||
|
|
||||||
|
async _animateTabs(direction, out = false) {
|
||||||
this.tabContainer.removeAttribute('dont-animate-tabs');
|
this.tabContainer.removeAttribute('dont-animate-tabs');
|
||||||
const tabsWidth = this.tabContainer.getBoundingClientRect().width;
|
const tabsWidth = this.tabContainer.getBoundingClientRect().width;
|
||||||
// order by actual position in the children list to animate
|
// order by actual position in the children list to animate
|
||||||
const elements = Array.from([
|
const elements = this._animateTabsElements;
|
||||||
...this.tabContainer.querySelectorAll(selector),
|
|
||||||
...this.tabContainer.querySelectorAll(extraSelector),
|
|
||||||
]);
|
|
||||||
if (out) {
|
if (out) {
|
||||||
|
const existingTransform = elements[0].style.transform;
|
||||||
|
const newTransform = `translateX(${direction === 'left' ? '-' : ''}${tabsWidth}px)`;
|
||||||
return gZenUIManager.motion.animate(
|
return gZenUIManager.motion.animate(
|
||||||
elements,
|
elements,
|
||||||
{
|
{
|
||||||
transform: `translateX(${direction === 'left' ? '-' : ''}${tabsWidth}px)`,
|
transform: existingTransform ? [existingTransform, newTransform] : newTransform,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'spring',
|
type: 'spring',
|
||||||
|
@@ -143,7 +143,7 @@ index e6b9b7dcfab179e7552c146eb1551b45ad042266..d9d838a7a51f67b52b69f419024cc317
|
|||||||
// it, so check for both cases explicitly.
|
// it, so check for both cases explicitly.
|
||||||
let targetContentWidth = Math.max(targetWidth, targetChildrenWidth);
|
let targetContentWidth = Math.max(targetWidth, targetChildrenWidth);
|
||||||
- let isOverflowing = Math.floor(targetContentWidth) > totalAvailWidth;
|
- let isOverflowing = Math.floor(targetContentWidth) > totalAvailWidth;
|
||||||
+ if (win.gZenVerticalTabsManager._hasSetSingleToolbar && this.#toolbar == 'nav-bar') return { isOverflowing: false, targetContentWidth, totalAvailWidth };
|
+ if (win.gZenVerticalTabsManager._hasSetSingleToolbar && this.#toolbar.id == 'nav-bar') return { isOverflowing: false, targetContentWidth, totalAvailWidth };
|
||||||
+ let isOverflowing = Math.floor(targetContentWidth) + (win.gZenVerticalTabsManager._hasSetSingleToolbar ? 0.1 : 0) > totalAvailWidth;
|
+ let isOverflowing = Math.floor(targetContentWidth) + (win.gZenVerticalTabsManager._hasSetSingleToolbar ? 0.1 : 0) > totalAvailWidth;
|
||||||
return { isOverflowing, targetContentWidth, totalAvailWidth };
|
return { isOverflowing, targetContentWidth, totalAvailWidth };
|
||||||
}
|
}
|
||||||
|
@@ -128,12 +128,9 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..87e68c2a0663a3da3e6d86277ce2f0c5
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ requestAnimationFrame(() => {
|
+ if (typeof window.gZenVerticalTabsManager !== "undefined") {
|
||||||
+ t.setAttribute("zen-initial-fadein", "true");
|
+ gZenVerticalTabsManager.animateTab(t);
|
||||||
+ setTimeout(() => {
|
+ }
|
||||||
+ t.removeAttribute("zen-initial-fadein");
|
|
||||||
+ }, 2000);
|
|
||||||
+ });
|
|
||||||
+
|
+
|
||||||
// Additionally send pinned tab events
|
// Additionally send pinned tab events
|
||||||
if (pinned) {
|
if (pinned) {
|
||||||
@@ -202,7 +199,16 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..87e68c2a0663a3da3e6d86277ce2f0c5
|
|||||||
tab.initialize();
|
tab.initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4095,6 +4182,10 @@
|
@@ -3715,7 +3799,7 @@
|
||||||
|
// Ensure we have an index if one was not provided.
|
||||||
|
if (typeof index != "number") {
|
||||||
|
// Move the new tab after another tab if needed, to the end otherwise.
|
||||||
|
- index = Infinity;
|
||||||
|
+ index = Services.prefs.getBoolPref("zen.view.show-newtab-button-top") ? this.pinnedTabCount : Infinity;
|
||||||
|
if (
|
||||||
|
!bulkOrderedOpen &&
|
||||||
|
((openerTab &&
|
||||||
|
@@ -4070,6 +4154,10 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -39,7 +39,7 @@ body {
|
|||||||
#welcome .zen-branding-title,
|
#welcome .zen-branding-title,
|
||||||
#thanks .zen-branding-title {
|
#thanks .zen-branding-title {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 9rem;
|
font-size: 7rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#buttons-footer {
|
#buttons-footer {
|
||||||
@@ -62,11 +62,6 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
body:has(#welcome:not([hidden='true'])) {
|
|
||||||
background: var(--zen-branding-coral);
|
|
||||||
color: var(--zen-branding-paper);
|
|
||||||
}
|
|
||||||
|
|
||||||
body:has(:is(#welcome, #thanks):not([hidden='true'])) {
|
body:has(:is(#welcome, #thanks):not([hidden='true'])) {
|
||||||
& #buttons-footer {
|
& #buttons-footer {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
13
src/browser/themes/shared/browser-shared-css.patch
Normal file
13
src/browser/themes/shared/browser-shared-css.patch
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/browser/themes/shared/browser-shared.css b/browser/themes/shared/browser-shared.css
|
||||||
|
index b4854731c08b2f463751bb907cb44130ee6b6d2a..18d96cb457f5e57ed00b4eec6d2702287bfc72c7 100644
|
||||||
|
--- a/browser/themes/shared/browser-shared.css
|
||||||
|
+++ b/browser/themes/shared/browser-shared.css
|
||||||
|
@@ -147,8 +147,6 @@ body {
|
||||||
|
*/
|
||||||
|
&.fullscreen-with-menubar {
|
||||||
|
z-index: var(--browser-area-z-index-toolbox-while-animating);
|
||||||
|
- box-shadow: var(--content-area-shadow);
|
||||||
|
- border-bottom-color: var(--chrome-content-separator-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Themes define a set of toolbox foreground and background colors which we
|
@@ -1,8 +1,8 @@
|
|||||||
diff --git a/browser/themes/shared/tabbrowser/tabs.css b/browser/themes/shared/tabbrowser/tabs.css
|
diff --git a/browser/themes/shared/tabbrowser/tabs.css b/browser/themes/shared/tabbrowser/tabs.css
|
||||||
index d48aad3a397909056ee43be4e65797875e80b772..d9728867a69a935caf2176d492a7aa78dcee7424 100644
|
index e5adf8c853bc6f92d1f5aae6398bb979a114b4fd..8d0783f8a23fabdfe90e5b9136e16a962b35dd5e 100644
|
||||||
--- a/browser/themes/shared/tabbrowser/tabs.css
|
--- a/browser/themes/shared/tabbrowser/tabs.css
|
||||||
+++ b/browser/themes/shared/tabbrowser/tabs.css
|
+++ b/browser/themes/shared/tabbrowser/tabs.css
|
||||||
@@ -26,7 +26,7 @@
|
@@ -31,7 +31,7 @@
|
||||||
--tab-icon-overlay-fill: light-dark(white, black);
|
--tab-icon-overlay-fill: light-dark(white, black);
|
||||||
--tab-icon-overlay-stroke: light-dark(black, white);
|
--tab-icon-overlay-stroke: light-dark(black, white);
|
||||||
--tab-label-line-height: 1.7;
|
--tab-label-line-height: 1.7;
|
||||||
@@ -11,7 +11,7 @@ index d48aad3a397909056ee43be4e65797875e80b772..d9728867a69a935caf2176d492a7aa78
|
|||||||
--tab-hover-background-color: color-mix(in srgb, currentColor 11%, transparent);
|
--tab-hover-background-color: color-mix(in srgb, currentColor 11%, transparent);
|
||||||
--tab-selected-textcolor: var(--toolbar-color);
|
--tab-selected-textcolor: var(--toolbar-color);
|
||||||
--tab-selected-bgcolor: var(--toolbar-bgcolor);
|
--tab-selected-bgcolor: var(--toolbar-bgcolor);
|
||||||
@@ -145,8 +145,7 @@
|
@@ -205,8 +205,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
#tabbrowser-tabs[positionpinnedtabs] > #tabbrowser-arrowscrollbox > &[pinned] {
|
#tabbrowser-tabs[positionpinnedtabs] > #tabbrowser-arrowscrollbox > &[pinned] {
|
||||||
@@ -21,7 +21,15 @@ index d48aad3a397909056ee43be4e65797875e80b772..d9728867a69a935caf2176d492a7aa78
|
|||||||
}
|
}
|
||||||
|
|
||||||
#tabbrowser-tabs[movingtab] &:is([selected], [multiselected]) {
|
#tabbrowser-tabs[movingtab] &:is([selected], [multiselected]) {
|
||||||
@@ -498,14 +497,14 @@
|
@@ -250,6 +249,7 @@
|
||||||
|
border-radius: inherit;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
+ display: none;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
position: absolute;
|
||||||
|
@@ -573,14 +573,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&[textoverflow] {
|
&[textoverflow] {
|
||||||
@@ -40,7 +48,7 @@ index d48aad3a397909056ee43be4e65797875e80b772..d9728867a69a935caf2176d492a7aa78
|
|||||||
direction: rtl;
|
direction: rtl;
|
||||||
mask-image: linear-gradient(to right, transparent, black var(--tab-label-mask-size));
|
mask-image: linear-gradient(to right, transparent, black var(--tab-label-mask-size));
|
||||||
}
|
}
|
||||||
@@ -863,7 +862,7 @@ tab-group {
|
@@ -1069,7 +1069,7 @@ tab-group {
|
||||||
margin-inline: var(--tab-inner-inline-margin);
|
margin-inline: var(--tab-inner-inline-margin);
|
||||||
|
|
||||||
#tabbrowser-tabs[orient="vertical"]:not([expanded]) & > .toolbarbutton-text {
|
#tabbrowser-tabs[orient="vertical"]:not([expanded]) & > .toolbarbutton-text {
|
||||||
@@ -49,7 +57,7 @@ index d48aad3a397909056ee43be4e65797875e80b772..d9728867a69a935caf2176d492a7aa78
|
|||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
@@ -1052,7 +1051,7 @@ tab-group {
|
@@ -1283,7 +1283,7 @@ tab-group {
|
||||||
toolbarbutton:not(#firefox-view-button),
|
toolbarbutton:not(#firefox-view-button),
|
||||||
toolbarpaletteitem:not(#wrapper-firefox-view-button)
|
toolbarpaletteitem:not(#wrapper-firefox-view-button)
|
||||||
) ~ #tabbrowser-tabs {
|
) ~ #tabbrowser-tabs {
|
||||||
@@ -58,7 +66,7 @@ index d48aad3a397909056ee43be4e65797875e80b772..d9728867a69a935caf2176d492a7aa78
|
|||||||
padding-inline-start: calc(var(--tab-overflow-pinned-tabs-width) + 2px);
|
padding-inline-start: calc(var(--tab-overflow-pinned-tabs-width) + 2px);
|
||||||
margin-inline-start: 2px;
|
margin-inline-start: 2px;
|
||||||
}
|
}
|
||||||
@@ -1087,7 +1086,6 @@ toolbar:not(#TabsToolbar) #firefox-view-button {
|
@@ -1318,7 +1318,6 @@ toolbar:not(#TabsToolbar) #firefox-view-button {
|
||||||
list-style-image: url(chrome://global/skin/icons/plus.svg);
|
list-style-image: url(chrome://global/skin/icons/plus.svg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
|
diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
|
||||||
index c63a259a51c4862bc8f73eabdc5730bfe2f28da4..f9b8431071e73ce55972c12354ed44bc3a4df9c0 100644
|
index 5c5992d7b32e4c16d6a92815ca6fd54e8fcec824..6c8e67e36f02b578c800fa460868135afb73c66b 100644
|
||||||
--- a/modules/libpref/init/StaticPrefList.yaml
|
--- a/modules/libpref/init/StaticPrefList.yaml
|
||||||
+++ b/modules/libpref/init/StaticPrefList.yaml
|
+++ b/modules/libpref/init/StaticPrefList.yaml
|
||||||
@@ -17651,7 +17651,7 @@
|
@@ -17810,7 +17810,7 @@
|
||||||
# Whether we use the mica backdrop. Off by default for now.
|
# Whether we use the mica backdrop. Off by default for now.
|
||||||
- name: widget.windows.mica
|
- name: widget.windows.mica
|
||||||
type: bool
|
type: bool
|
||||||
@@ -11,3 +11,23 @@ index c63a259a51c4862bc8f73eabdc5730bfe2f28da4..f9b8431071e73ce55972c12354ed44bc
|
|||||||
mirror: once
|
mirror: once
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -17923,6 +17923,19 @@
|
||||||
|
mirror: always
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+# Dummy pref to always generate StaticPrefs_zen.h in every OS
|
||||||
|
+- name: zen.browser.is-cool
|
||||||
|
+ type: bool
|
||||||
|
+ value: true
|
||||||
|
+ mirror: never
|
||||||
|
+
|
||||||
|
+#ifdef XP_MACOSX
|
||||||
|
+- name: zen.widget.mac.mono-window-controls
|
||||||
|
+ type: RelaxedAtomicBool
|
||||||
|
+ value: false
|
||||||
|
+ mirror: always
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Prefs starting with "zoom."
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
12
src/modules/libpref/moz-build.patch
Normal file
12
src/modules/libpref/moz-build.patch
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build
|
||||||
|
index 4e582caaa58884b27be20c45e4c39b0b841261ef..f8ce17a33f20380b3f56a3774e043b9fba849977 100644
|
||||||
|
--- a/modules/libpref/moz.build
|
||||||
|
+++ b/modules/libpref/moz.build
|
||||||
|
@@ -93,6 +93,7 @@ pref_groups = [
|
||||||
|
"view_source",
|
||||||
|
"webgl",
|
||||||
|
"widget",
|
||||||
|
+ "zen",
|
||||||
|
"zoom",
|
||||||
|
]
|
||||||
|
if CONFIG["OS_TARGET"] == "Android":
|
@@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/security/mac/hardenedruntime/v2/production/firefox.browser.xml b/security/mac/hardenedruntime/v2/production/firefox.browser.xml
|
||||||
|
index abbf33e9d2b3c9d1e0a34bd46e7cd289c435533b..4d988ca8201fa6aba6ca049e97d3cdc6b772b5eb 100644
|
||||||
|
--- a/security/mac/hardenedruntime/v2/production/firefox.browser.xml
|
||||||
|
+++ b/security/mac/hardenedruntime/v2/production/firefox.browser.xml
|
||||||
|
@@ -26,7 +26,7 @@
|
||||||
|
|
||||||
|
<!-- Required for com.apple.developer.web-browser.public-key-credential -->
|
||||||
|
<key>com.apple.application-identifier</key>
|
||||||
|
- <string>43AQ936H96.org.mozilla.firefox</string>
|
||||||
|
+ <string>H36NPCN86W.app.zen-browser.zen</string>
|
||||||
|
|
||||||
|
<!-- For platform passkey (webauthn) support -->
|
||||||
|
<key>com.apple.developer.web-browser.public-key-credential</key><true/>
|
29
src/tools/signing/macos/mach_commands-py.patch
Normal file
29
src/tools/signing/macos/mach_commands-py.patch
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
diff --git a/tools/signing/macos/mach_commands.py b/tools/signing/macos/mach_commands.py
|
||||||
|
index a513ad723805459c194d27b42dac68e9babba468..be74acbfe16a4eb389bc7d0ba32820b82fe2819c 100644
|
||||||
|
--- a/tools/signing/macos/mach_commands.py
|
||||||
|
+++ b/tools/signing/macos/mach_commands.py
|
||||||
|
@@ -37,7 +37,6 @@ from mozbuild.base import MachCommandConditions as conditions
|
||||||
|
"Release channel entitlements, but the configuration used will be the "
|
||||||
|
"Release configuration as defined in the repo working directory, not the "
|
||||||
|
"configuration from the revision of the earlier 120 build.",
|
||||||
|
- conditions=[conditions.is_firefox],
|
||||||
|
)
|
||||||
|
@CommandArgument(
|
||||||
|
"-v",
|
||||||
|
@@ -342,6 +341,7 @@ def macos_sign(
|
||||||
|
cs_reset_cmd = ["find", app, "-exec", "codesign", "--remove-signature", "{}", ";"]
|
||||||
|
run(command_context, cs_reset_cmd, capture_output=not verbose_arg)
|
||||||
|
|
||||||
|
+ run(command_context, ["mv", "./embedded.provisionprofile", os.path.join(app, "Contents")], capture_output=not verbose_arg)
|
||||||
|
if use_rcodesign_arg is True:
|
||||||
|
sign_with_rcodesign(
|
||||||
|
command_context,
|
||||||
|
@@ -567,7 +567,7 @@ def sign_with_rcodesign(
|
||||||
|
# input path and its options are specified as standard arguments.
|
||||||
|
ctx.log(logging.INFO, "macos-sign", {}, "Signing with rcodesign")
|
||||||
|
|
||||||
|
- cs_cmd = ["rcodesign", "sign"]
|
||||||
|
+ cs_cmd = ["rcodesign", "sign", "--for-notarization"]
|
||||||
|
if p12_file_arg is not None:
|
||||||
|
cs_cmd.append("--p12-file")
|
||||||
|
cs_cmd.append(p12_file_arg)
|
27
src/widget/cocoa/nsCocoaWindow-mm.patch
Normal file
27
src/widget/cocoa/nsCocoaWindow-mm.patch
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm
|
||||||
|
index f1c87dd8faef8c6caf9248ce7d9f40c12f5db9f6..f5280b8fc6cf46d3941d1ff04835b12dd2755170 100644
|
||||||
|
--- a/widget/cocoa/nsCocoaWindow.mm
|
||||||
|
+++ b/widget/cocoa/nsCocoaWindow.mm
|
||||||
|
@@ -51,6 +51,7 @@
|
||||||
|
#include "mozilla/ScopeExit.h"
|
||||||
|
#include "mozilla/StaticPrefs_gfx.h"
|
||||||
|
#include "mozilla/StaticPrefs_widget.h"
|
||||||
|
+#include "mozilla/StaticPrefs_zen.h"
|
||||||
|
#include "mozilla/WritingModes.h"
|
||||||
|
#include "mozilla/layers/CompositorBridgeChild.h"
|
||||||
|
#include "mozilla/widget/Screen.h"
|
||||||
|
@@ -682,9 +683,11 @@ static unsigned int WindowMaskForBorderStyle(BorderStyle aBorderStyle) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
NSWindow* win = ancestor->GetCocoaWindow();
|
||||||
|
- [[win standardWindowButton:NSWindowCloseButton] setEnabled:!aModal];
|
||||||
|
- [[win standardWindowButton:NSWindowMiniaturizeButton] setEnabled:!aModal];
|
||||||
|
- [[win standardWindowButton:NSWindowZoomButton] setEnabled:!aModal];
|
||||||
|
+
|
||||||
|
+ auto zenBtnEnabled = StaticPrefs::zen_widget_mac_mono_window_controls() ? false : !aModal;
|
||||||
|
+ [[win standardWindowButton:NSWindowCloseButton] setEnabled:zenBtnEnabled];
|
||||||
|
+ [[win standardWindowButton:NSWindowMiniaturizeButton] setEnabled:zenBtnEnabled];
|
||||||
|
+ [[win standardWindowButton:NSWindowZoomButton] setEnabled:zenBtnEnabled];
|
||||||
|
}
|
||||||
|
if (aModal) {
|
||||||
|
mWindow.level = NSModalPanelWindowLevel;
|
@@ -19,7 +19,7 @@
|
|||||||
"brandShortName": "Zen",
|
"brandShortName": "Zen",
|
||||||
"brandFullName": "Zen Browser",
|
"brandFullName": "Zen Browser",
|
||||||
"release": {
|
"release": {
|
||||||
"displayVersion": "1.7.2b",
|
"displayVersion": "1.7.4b",
|
||||||
"github": {
|
"github": {
|
||||||
"repo": "zen-browser/desktop"
|
"repo": "zen-browser/desktop"
|
||||||
},
|
},
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
"brandShortName": "Zen",
|
"brandShortName": "Zen",
|
||||||
"brandFullName": "Zen Twilight",
|
"brandFullName": "Zen Twilight",
|
||||||
"release": {
|
"release": {
|
||||||
"displayVersion": "1.7.2t",
|
"displayVersion": "1.7.4t",
|
||||||
"github": {
|
"github": {
|
||||||
"repo": "zen-browser/desktop"
|
"repo": "zen-browser/desktop"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user