1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-07 21:49:58 +02:00

Update Flatpak configuration and templates for app.zen_browser.zen

This commit is contained in:
mr. M 2025-01-14 18:43:14 +01:00
parent 1dbc492aac
commit 818100e3d8
No known key found for this signature in database
GPG key ID: CBD57A2AEDBDA1FB
7 changed files with 43 additions and 29 deletions

View file

@ -620,7 +620,7 @@ jobs:
pwd pwd
ls . ls .
ls .. ls ..
mv releases.xml ./flatpak/io.github.zen_browser.zen.metainfo.xml mv releases.xml ./flatpak/app.zen_browser.zen.metainfo.xml
# output the version to the file # output the version to the file
echo -n ${{ needs.build-data.outputs.version }} > ./flatpak/version echo -n ${{ needs.build-data.outputs.version }} > ./flatpak/version
@ -646,7 +646,7 @@ jobs:
- name: Checkout Flatpak repository - name: Checkout Flatpak repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
repository: flathub/io.github.zen_browser.zen repository: flathub/app.zen_browser.zen
token: ${{ secrets.DEPLOY_KEY }} token: ${{ secrets.DEPLOY_KEY }}
- name: Download Linux x86_64 build - name: Download Linux x86_64 build
@ -654,6 +654,11 @@ jobs:
with: with:
name: zen.linux-x86_64.tar.bz2 name: zen.linux-x86_64.tar.bz2
- name: Download Linux aarch64 build
uses: actions/download-artifact@v4
with:
name: zen.linux-aarch64.tar.bz2
- name: Update repository - name: Update repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
@ -675,12 +680,13 @@ jobs:
--flatpak-archive archive.tar \ --flatpak-archive archive.tar \
--version ${{ needs.build-data.outputs.version }} \ --version ${{ needs.build-data.outputs.version }} \
--linux-archive zen.linux-x86_64.tar.bz2 \ --linux-archive zen.linux-x86_64.tar.bz2 \
--output io.github.zen_browser.zen.yml \ --linux-aarch64-archive zen.linux-aarch64.tar.bz2 \
--output app.zen_browser.zen.yml \
--template-root ./zen-browser/flatpak --template-root ./zen-browser/flatpak
- name: Commit changes - name: Commit changes
run: | run: |
git add io.github.zen_browser.zen.yml git add app.zen_browser.zen.yml
git commit -m "Update to version ${{ needs.build-data.outputs.version }}" git commit -m "Update to version ${{ needs.build-data.outputs.version }}"
- name: Clean up - name: Clean up
@ -693,8 +699,8 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
retention-days: 5 retention-days: 5
name: io.github.zen_browser.zen.yml name: app.zen_browser.zen.yml
path: ./io.github.zen_browser.zen.yml path: ./app.zen_browser.zen.yml
- name: Create pull request - name: Create pull request
uses: peter-evans/create-pull-request@v7 uses: peter-evans/create-pull-request@v7

View file

@ -51,7 +51,7 @@ jobs:
set -x set -x
sudo apt-get update --fix-missing sudo apt-get update --fix-missing
sudo apt-get update sudo apt-get update
sudo apt-get install -y dos2unix yasm nasm build-essential libgtk2.0-dev libpython3-dev m4 uuid libasound2-dev libcurl4-openssl-dev libdbus-1-dev libdrm-dev libdbus-glib-1-dev libgtk-3-dev libpulse-dev libx11-xcb-dev libxt-dev xvfb lld llvm sudo apt-get install -y python3 python3-pip dos2unix yasm nasm build-essential libgtk2.0-dev libpython3-dev m4 uuid libasound2-dev libcurl4-openssl-dev libdbus-1-dev libdrm-dev libdbus-glib-1-dev libgtk-3-dev libpulse-dev libx11-xcb-dev libxt-dev xvfb lld llvm
- name: Configure sccache - name: Configure sccache
uses: actions/github-script@v7 uses: actions/github-script@v7

View file

@ -59,6 +59,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
pnpm install pnpm install
sudo apt-get install -y python3 python3-pip dos2unix yasm nasm build-essential libgtk2.0-dev libpython3-dev m4 uuid libasound2-dev libcurl4-openssl-dev libdbus-1-dev libdrm-dev libdbus-glib-1-dev libgtk-3-dev libpulse-dev libx11-xcb-dev libxt-dev xvfb lld llvm
- name: Load Surfer CI setup - name: Load Surfer CI setup
run: pnpm surfer ci --brand ${{ inputs.release-branch }} --display-version ${{ inputs.build-version }} run: pnpm surfer ci --brand ${{ inputs.release-branch }} --display-version ${{ inputs.build-version }}

View file

@ -1,4 +1,4 @@
app-id: io.github.zen_browser.zen app-id: app.zen_browser.zen
runtime: org.freedesktop.Platform runtime: org.freedesktop.Platform
runtime-version: '24.08' runtime-version: '24.08'
sdk: org.freedesktop.Sdk sdk: org.freedesktop.Sdk
@ -28,7 +28,7 @@ finish-args:
- --system-talk-name=org.freedesktop.NetworkManager - --system-talk-name=org.freedesktop.NetworkManager
- --talk-name=org.a11y.Bus - --talk-name=org.a11y.Bus
- --env=GTK_PATH=/app/lib/gtkmodules - --env=GTK_PATH=/app/lib/gtkmodules
- --env=MESA_SHADER_CACHE_DIR=$XDG_RUNTIME_DIR/app/$FLATPAK_ID/cache/mesa_shader_cache_db - --env=MESA_SHADER_CACHE_DIR=$XDG_RUNTIME_DIR/app/$FLATPAK_ID/cache/mesa_shader_cache_db
modules: modules:
- name: zen_browser - name: zen_browser
buildsystem: simple buildsystem: simple
@ -36,20 +36,29 @@ modules:
- mv zen /app/ - mv zen /app/
- mkdir -p /app/lib/ffmpeg - mkdir -p /app/lib/ffmpeg
- install -Dm0755 metadata/launch-script.sh ${{FLATPAK_DEST}}/bin/launch-script.sh - install -Dm0755 metadata/launch-script.sh ${FLATPAK_DEST}/bin/launch-script.sh
- install -Dm0644 metadata/policies.json ${{FLATPAK_DEST}}/bin/distribution/policies.json - install -Dm0644 metadata/policies.json ${FLATPAK_DEST}/bin/distribution/policies.json
- install -Dm0644 metadata/icons/io.github.zen_browser.zen.svg ${{FLATPAK_DEST}}/share/icons/hicolor/scalable/apps/${{FLATPAK_ID}}.svg - install -Dm0644 metadata/icons/${FLATPAK_ID}.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/${FLATPAK_ID}.svg
- install -Dm0644 metadata/io.github.zen_browser.zen.metainfo.xml ${{FLATPAK_DEST}}/share/metainfo/${{FLATPAK_ID}}.metainfo.xml - install -Dm0644 metadata/${FLATPAK_ID}.metainfo.xml ${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.metainfo.xml
- install -Dm0644 metadata/io.github.zen_browser.zen.desktop ${{FLATPAK_DEST}}/share/applications/${{FLATPAK_ID}}.desktop - install -Dm0644 metadata/${FLATPAK_ID}.desktop ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop
sources: sources:
- type: archive - type: archive
url: https://github.com/zen-browser/desktop/releases/download/{version}/zen.linux-x86_64.tar.bz2 url: https://github.com/zen-browser/desktop/releases/download/1.6b/zen.linux-x86_64.tar.bz2
sha256: {linux_sha256} sha256: {linux_sha256}
strip-components: 0 strip-components: 0
only-arches:
- x86_64
- type: archive - type: archive
url: https://github.com/zen-browser/flatpak/releases/download/{version}/archive.tar url: https://github.com/zen-browser/desktop/releases/download/1.6b/zen.linux-aarch64.tar.bz2
sha256: {linux_aarch64_sha256}
strip-components: 0
only-arches:
- aarch64
- type: archive
url: https://github.com/zen-browser/flatpak/releases/download/1.6b/archive.tar
sha256: {flatpak_sha256} sha256: {flatpak_sha256}
strip-components: 0 strip-components: 0
dest: metadata dest: metadata

View file

@ -3,7 +3,7 @@ import argparse
import sys import sys
import os import os
FLATID = "io.github.zen_browser.zen" FLATID = "app.zen_browser.zen"
def get_sha256sum(filename): def get_sha256sum(filename):
@ -19,14 +19,16 @@ def get_sha256sum(filename):
return sha256.hexdigest() return sha256.hexdigest()
def build_template(template, linux_sha256, flatpak_sha256, version): def build_template(template, linux_sha256, flatpak_sha256, version, linux_aarch64_sha256):
"""Build the template with the provided hashes and version.""" """Build the template with the provided hashes and version."""
print(f"Building template with version {version}") print(f"Building template with version {version}")
print(f"\tLinux archive sha256: {linux_sha256}") print(f"\tLinux archive sha256: {linux_sha256}")
print(f"\tLinux aarch64 archive sha256: {linux_aarch64_sha256}")
print(f"\tFlatpak archive sha256: {flatpak_sha256}") print(f"\tFlatpak archive sha256: {flatpak_sha256}")
return template.format(linux_sha256=linux_sha256, return template.format(linux_sha256=linux_sha256,
flatpak_sha256=flatpak_sha256, flatpak_sha256=flatpak_sha256,
version=version) version=version,
linux_aarch64_sha256=linux_aarch64_sha256)
def get_template(template_root): def get_template(template_root):
@ -48,6 +50,7 @@ def main():
help="Version of the release", help="Version of the release",
required=True) required=True)
parser.add_argument("--linux-archive", help="Linux archive", required=True) parser.add_argument("--linux-archive", help="Linux archive", required=True)
parser.add_argument("--linux-aarch64-archive", help="Linux aarch64 archive", required=True)
parser.add_argument("--flatpak-archive", parser.add_argument("--flatpak-archive",
help="Flatpak archive", help="Flatpak archive",
required=True) required=True)
@ -58,9 +61,10 @@ def main():
args = parser.parse_args() args = parser.parse_args()
linux_sha256 = get_sha256sum(args.linux_archive) linux_sha256 = get_sha256sum(args.linux_archive)
linux_aarch64_sha256 = get_sha256sum(args.linux_aarch64_archive)
flatpak_sha256 = get_sha256sum(args.flatpak_archive) flatpak_sha256 = get_sha256sum(args.flatpak_archive)
template = build_template(get_template(args.template_root), linux_sha256, template = build_template(get_template(args.template_root), linux_sha256,
flatpak_sha256, args.version) flatpak_sha256, args.version, linux_aarch64_sha256)
print(f"Writing output to {args.output}") print(f"Writing output to {args.output}")
with open(args.output, "w") as f: with open(args.output, "w") as f:

View file

@ -56,13 +56,7 @@
} }
} }
@media (-moz-windows-accent-color-in-titlebar) { @media (not (-moz-windows-mica)) and (-moz-bool-pref: 'zen.view.grey-out-inactive-windows') {
&::after {
display: none;
}
}
@media (not (-moz-windows-accent-color-in-titlebar)) and (not (-moz-windows-mica)) and (-moz-bool-pref: 'zen.view.grey-out-inactive-windows') {
transition: color var(--inactive-window-transition); transition: color var(--inactive-window-transition);
&:-moz-window-inactive { &:-moz-window-inactive {
color: var(--toolbox-textcolor-inactive); color: var(--toolbox-textcolor-inactive);
@ -117,7 +111,7 @@
z-index: 1; z-index: 1;
} }
@media (-moz-windows-accent-color-in-titlebar) { @media (-moz-windows-accent-color-in-titlebar) and (-moz-windows-mica) {
background-color: ActiveCaption; background-color: ActiveCaption;
color: CaptionText; color: CaptionText;
transition: background-color var(--inactive-window-transition); transition: background-color var(--inactive-window-transition);

View file

@ -156,7 +156,7 @@
--zen-themed-toolbar-bg: light-dark(var(--zen-branding-bg), var(--zen-colors-tertiary)); --zen-themed-toolbar-bg: light-dark(var(--zen-branding-bg), var(--zen-colors-tertiary));
--zen-themed-toolbar-bg-transparent: light-dark(var(--zen-branding-bg), var(--zen-colors-tertiary)); --zen-themed-toolbar-bg-transparent: light-dark(var(--zen-branding-bg), var(--zen-colors-tertiary));
@media (-moz-windows-mica) or (-moz-platform: macos) or (-moz-windows-accent-color-in-titlebar) { @media (-moz-windows-mica) or (-moz-platform: macos) {
background: transparent; background: transparent;
--zen-themed-toolbar-bg-transparency: 0; --zen-themed-toolbar-bg-transparency: 0;
--zen-themed-toolbar-bg-transparent: light-dark( --zen-themed-toolbar-bg-transparent: light-dark(