17
0

2 Commits

5 changed files with 38 additions and 131 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ec74ba4932b9b77b417c97a931986d5e619e8bc1ced2110463285425fb9c335d
size 196758

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:386cb590a931772a26a1a00d4fd56169ba7967ecc598984c434e7f4bebf2361e
size 199872

View File

@@ -1,122 +0,0 @@
From 7fa6018a8d7e019140189fcbe523a6bee7429dfb Mon Sep 17 00:00:00 2001
From: zefr0x <zer0-x.7ty50@aleeas.com>
Date: Thu, 2 Nov 2023 22:38:06 +0300
Subject: [PATCH] Migrate code from PyQt5 to PySide6
---
setup.py | 2 +-
torbrowser_launcher/__init__.py | 9 ++++-----
torbrowser_launcher/launcher.py | 16 ++++++++--------
torbrowser_launcher/settings.py | 2 +-
4 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/setup.py b/setup.py
index 8d8fa7dd..ada31791 100644
--- a/setup.py
+++ b/setup.py
@@ -121,7 +121,7 @@ def create_mo_files():
install_requires=[
"gpg",
"packaging",
- "PyQt5",
+ "PySide6",
"requests",
"PySocks",
],
diff --git a/torbrowser_launcher/__init__.py b/torbrowser_launcher/__init__.py
index 115fd4fd..a20dae6a 100644
--- a/torbrowser_launcher/__init__.py
+++ b/torbrowser_launcher/__init__.py
@@ -31,7 +31,7 @@
import argparse
import signal
-from PyQt5 import QtCore, QtWidgets
+from PySide6 import QtWidgets
from .common import Common, SHARE
from .settings import Settings
@@ -44,7 +44,6 @@ class Application(QtWidgets.QApplication):
"""
def __init__(self):
- self.setAttribute(QtCore.Qt.AA_X11InitThreads, True)
QtWidgets.QApplication.__init__(self, sys.argv)
self.installEventFilter(self)
@@ -87,11 +86,11 @@ def main():
gui = Launcher(common, app, url_list)
# Center the window
- desktop = app.desktop()
+ screen_size = app.primaryScreen().size()
window_size = gui.size()
gui.move(
- (desktop.width() - window_size.width()) // 2,
- (desktop.height() - window_size.height()) // 2,
+ (screen_size.width() - window_size.width()) // 2,
+ (screen_size.height() - window_size.height()) // 2,
)
gui.show()
diff --git a/torbrowser_launcher/launcher.py b/torbrowser_launcher/launcher.py
index 286b521d..831709bb 100644
--- a/torbrowser_launcher/launcher.py
+++ b/torbrowser_launcher/launcher.py
@@ -39,7 +39,7 @@
import xml.etree.ElementTree as ET
from packaging import version
-from PyQt5 import QtCore, QtWidgets, QtGui
+from PySide6 import QtCore, QtWidgets, QtGui
class TryStableException(Exception):
@@ -531,9 +531,9 @@ class DownloadThread(QtCore.QThread):
Download a file in a separate thread.
"""
- progress_update = QtCore.pyqtSignal(int, int)
- download_complete = QtCore.pyqtSignal()
- download_error = QtCore.pyqtSignal(str, str)
+ progress_update = QtCore.Signal(int, int)
+ download_complete = QtCore.Signal()
+ download_error = QtCore.Signal(str, str)
def __init__(self, common, url, path):
super(DownloadThread, self).__init__()
@@ -614,8 +614,8 @@ class VerifyThread(QtCore.QThread):
Verify the signature in a separate thread
"""
- success = QtCore.pyqtSignal()
- error = QtCore.pyqtSignal(str)
+ success = QtCore.Signal()
+ error = QtCore.Signal(str)
def __init__(self, common):
super(VerifyThread, self).__init__()
@@ -656,8 +656,8 @@ class ExtractThread(QtCore.QThread):
Extract the tarball in a separate thread
"""
- success = QtCore.pyqtSignal()
- error = QtCore.pyqtSignal()
+ success = QtCore.Signal()
+ error = QtCore.Signal()
def __init__(self, common):
super(ExtractThread, self).__init__()
diff --git a/torbrowser_launcher/settings.py b/torbrowser_launcher/settings.py
index cef18e03..b9125ea4 100644
--- a/torbrowser_launcher/settings.py
+++ b/torbrowser_launcher/settings.py
@@ -29,7 +29,7 @@
import subprocess
import shutil
-from PyQt5 import QtCore, QtWidgets, QtGui
+from PySide6 import QtCore, QtWidgets, QtGui
class Settings(QtWidgets.QMainWindow):

View File

@@ -1,3 +1,35 @@
-------------------------------------------------------------------
Sun Oct 26 18:54:09 UTC 2025 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 0.3.9:
* Keep thread references to fix crash
* Use non-deprecated distro.name
- Changes from version 0.3.8:
* Update Tor Browser gpg key for new subkey
(tor-browser-build#40964 (closed))
* Migrate code from PyQt5 to PySide6
* Fix window icon under wayland
* Move setup.py to setuptools
* AppArmor:
- Update/Add Additional Abstractions
- Remove duplicate rule
- Allow the Wayland Proxy to run
- Don't grant full D-Bus session bus access
- Allow unprivileged user namespaces
- Allow reading cgroups-v2 CPU bandwidth quota information
- Allow executing Firefox' own VA-API probe utility
- Allow reading intel-media-driver feature files
* Desktop files
- Rename desktop files to rDNS format
- Sort translated desktop strings by language
* AppStream metadata (metainfo.xml)
- Add developer name
- Add developer tag
- Remove references to Bundle/TBB
* Updated documentation and translations.
- Drop torbrowser-launcher-qt6-port.patch: merged upstream.
- Drop Requires: xmessage no longer required.
-------------------------------------------------------------------
Wed Feb 26 10:38:49 UTC 2025 - Atri Bhattacharya <badshah400@gmail.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package torbrowser-launcher
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,15 +18,13 @@
%define pythons python3
Name: torbrowser-launcher
Version: 0.3.7
Version: 0.3.9
Release: 0
Summary: Tool for launching and easy-updates of Tor Browser
License: MIT
Group: Productivity/Networking/Web/Utilities
URL: https://gitlab.torproject.org/tpo/applications/torbrowser-launcher/
Source0: https://github.com/torproject/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM torbrowser-launcher-qt6-port.patch badshah400@gmail.com -- Port to Qt6, taken from upstream MR
Patch0: https://patch-diff.githubusercontent.com/raw/torproject/torbrowser-launcher/pull/720.patch#/torbrowser-launcher-qt6-port.patch
BuildRequires: %{python_module PySocks}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module distro}
@@ -50,7 +48,6 @@ Requires: python3-gpg
Requires: python3-packaging
Requires: python3-pyside6
Requires: python3-requests
Requires: xmessage
BuildArch: noarch
%description
@@ -109,7 +106,7 @@ mkdir -p %{buildroot}%{_sysconfdir}
%{_bindir}/%{name}
%{_datadir}/applications/*.desktop
%{_datadir}/metainfo/*.metainfo.xml
%{_datadir}/icons/hicolor/*/apps/torbrowser*.png
%{_datadir}/icons/hicolor/*/apps/*.png
%{_datadir}/%{name}/
%{python_sitelib}/torbrowser_launcher-%{version}*.*-info
%{python_sitelib}/torbrowser_launcher/