Commit e1497bc6 authored by asciiwolf's avatar asciiwolf
Browse files

Merge branch 'migrate_to_qt6' into 'main'

Migrate to Qt6

Closes #2

See merge request !19
parents 3a2f757b b0962da4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ Then install dependencies, build a package, and install:
### Debian, Ubuntu, Linux Mint, etc.

```sh
sudo apt install build-essential dh-python python3-all python3-stdeb python3-pyqt5 python3-gpg python3-requests python3-socks python3-packaging gnupg2 tor
sudo apt install build-essential dh-python python3-all python3-stdeb python3-pyside6.qtcore python3-gpg python3-requests python3-socks python3-packaging gnupg2 tor
./build_deb.sh
sudo dpkg -i deb_dist/torbrowser-launcher_*.deb
```
@@ -20,7 +20,7 @@ sudo dpkg -i deb_dist/torbrowser-launcher_*.deb
### Red Hat, Fedora, CentOS, etc.

```sh
sudo dnf install rpm-build python3-qt5 python3-gpg python3-requests python3-pysocks python3-packaging gnupg2 tor
sudo dnf install rpm-build python3-pyside6 python3-gpg python3-requests python3-pysocks python3-packaging gnupg2 tor
./build_rpm.sh
sudo yum install dist/torbrowser-launcher-*.rpm
```
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ VERSION=$(cat share/torbrowser-launcher/version)
rm -r build dist

# build binary package
python3 setup.py bdist_rpm --requires="python3-qt5, python3-gpg, python3-requests, python3-pysocks, python3-packaging, gnupg2, dbus-glib"
python3 setup.py bdist_rpm --requires="python3-pyside6, python3-gpg, python3-requests, python3-pysocks, python3-packaging, gnupg2, dbus-glib"

# install it
echo ""
+1 −1
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ Browser.
    install_requires=[
        "gpg",
        "packaging",
        "PyQt5",
        "PySide6",
        "requests",
        "PySocks",
    ],
+2 −2
Original line number Diff line number Diff line
[DEFAULT]
Package3: torbrowser-launcher
Depends3: python3-pyqt5, python3-gpg, python3-requests, python3-socks, python3-packaging, gnupg2
Depends3: python3-pyside6.qtcore, python3-gpg, python3-requests, python3-socks, python3-packaging, gnupg2
Build-Depends: dh-python, python3-pyqt5, python3-gpg, python3-requests, python3-socks, python3-packaging, gnupg2
Recommends: tor
Suite: bionic
Suite: oracular
+4 −5
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ import sys
import argparse
import signal

from PyQt5 import QtCore, QtWidgets
from PySide6 import QtWidgets

from .common import Common, SHARE
from .settings import Settings
@@ -45,7 +45,6 @@ class Application(QtWidgets.QApplication):
    """

    def __init__(self):
        self.setAttribute(QtCore.Qt.AA_X11InitThreads, True)
        QtWidgets.QApplication.__init__(self, sys.argv)
        self.installEventFilter(self)

@@ -95,11 +94,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()

Loading