Skip to content

Commit

Permalink
Merge pull request #422 from loathingKernel/pyside6
Browse files Browse the repository at this point in the history
Port Rare to PySide6
  • Loading branch information
loathingKernel authored Sep 12, 2024
2 parents edeb013 + 865e54e commit c98de5a
Show file tree
Hide file tree
Showing 159 changed files with 54,571 additions and 58,891 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/job_appimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
sudo pip3 install appimage-builder
- name: Build
run: |
appimage-builder --skip-test
appimage-builder --recipe misc/AppImageBuilder.yml --skip-test
mv Rare-*.AppImage Rare.AppImage
mv Rare-*.AppImage.zsync Rare.AppImage.zsync
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/job_cx-freeze-msi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
run: |
pip3 install -r requirements.txt
pip3 install -r requirements-presence.txt
pip3 install -r requirements-webview.txt
- name: Build
run: |
python freeze.py bdist_msi
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/job_cx-freeze-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
run: |
pip3 install -r requirements.txt
pip3 install -r requirements-presence.txt
pip3 install -r requirements-webview.txt
pip3 install .
- name: Build
run: cxfreeze -c rare/main.py --target-dir dist --target-name rare --icon rare/resources/images/Rare.ico -OO --base-name Win32GUI
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/job_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
run: |
pip install -r requirements.txt
pip install -r requirements-presence.txt
pip install -r requirements-webview.txt
- name: Move files
run: mv rare/__main__.py __main__.py
- name: Build
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/job_nuitka-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
run: |
pip3 install -r requirements.txt
pip3 install -r requirements-presence.txt
pip3 install -r requirements-webview.txt
- name: Build
run: >-
python -m nuitka
Expand All @@ -35,7 +36,8 @@ jobs:
--static-libpython=no
--standalone
--enable-plugin=anti-bloat
--enable-plugin=pyqt5
--enable-plugin=pyside6
--enable-plugin=pywebview
--show-modules
--show-anti-bloat-changes
--follow-stdlib
Expand All @@ -60,10 +62,6 @@ jobs:
--windows-product-version=${{ inputs.version }}
--windows-console-mode=disable
rare
- name: Fix QtNetwork SSL
run: |
Copy-Item -Path "rare.dist\libcrypto-1_1.dll" -Destination "rare.dist\libcrypto-1_1-x64.dll"
Copy-Item -Path "rare.dist\libssl-1_1.dll" -Destination "rare.dist\libssl-1_1-x64.dll"
- name: Compress
run: |
python -c "import shutil; shutil.make_archive('Rare-Windows', 'zip', 'rare.dist')"
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include README.md
include rare/resources/images/*
include rare/resources/languages/*
include rare/resources/languages/rare_*.qm
11 changes: 4 additions & 7 deletions AppImageBuilder.yml → misc/AppImageBuilder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ script:
# copy Logo
- cp AppDir/usr/src/rare/resources/images/Rare.png AppDir/usr/share/icons/hicolor/256x256/apps/
# Install application dependencies
- python3 -m pip install --ignore-installed --prefix=/usr --root=AppDir pypresence qtawesome legendary-gl orjson vdf
- python3 -m pip install --ignore-installed --prefix=/usr --root=AppDir -r requirements.txt
- python3 -m pip install --ignore-installed --prefix=/usr --root=AppDir -r requirements-presence.txt

AppDir:
path: AppDir
path: ./AppDir
app_info:
id: io.github.dummerle.rare
name: Rare
Expand All @@ -32,10 +33,6 @@ AppDir:

include:
- python3
- python3-distutils
- python3-pyqt5
- python3-pyqt5.qtsvg
- python3-requests

runtime:
env:
Expand All @@ -44,7 +41,7 @@ AppDir:
PYTHONHOME: '${APPDIR}/usr'
# Path to the site-packages dir or other modules dirs
# See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH
PYTHONPATH: '${APPDIR}/usr/lib/python3.8/site-packages:${APPDIR}/usr/lib/python3.9/site-packages'
PYTHONPATH: '${APPDIR}/usr/lib/python3.10/site-packages'
PYTHONNOUSERSITE: 1

test:
Expand Down
35 changes: 0 additions & 35 deletions misc/nuitka_build.bat

This file was deleted.

37 changes: 37 additions & 0 deletions misc/nuitka_build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

$nuitka_opts = @(
'--assume-yes-for-downloads'
'--mingw64'
'--lto=no'
'--jobs=3'
'--static-libpython=no'
'--standalone'
'--enable-plugin=anti-bloat'
'--enable-plugin=pyside6'
'--enable-plugin=pywebview'
'--show-modules'
'--show-anti-bloat-changes'
'--follow-stdlib'
'--follow-imports'
'--nofollow-import-to="*.tests"'
'--nofollow-import-to="*.distutils"'
'--nofollow-import-to="distutils"'
'--nofollow-import-to="unittest"'
'--nofollow-import-to="pydoc"'
'--nofollow-import-to="tkinter"'
'--nofollow-import-to="test"'
'--prefer-source-code'
'--include-package=pypresence'
'--include-package-data=qtawesome'
'--include-data-dir=rare\resources\images\=rare\resources\images\'
'--include-data-files=rare\resources\languages\=rare\resources\languages\="rare_*.qm"'
'--windows-icon-from-ico=rare\resources\images\Rare.ico'
'--windows-company-name=RareDevs'
'--windows-product-name=Rare'
'--windows-file-description=rare.exe'
'--windows-file-version=0.0.0.0'
'--windows-product-version=0.0.0.0'
'--windows-console-mode=force'
)

python -m nuitka $nuitka_opts rare
70 changes: 36 additions & 34 deletions misc/nuitka_build.sh
Original file line number Diff line number Diff line change
@@ -1,35 +1,37 @@
#!/usr/bin/bash
#!/usr/bin/env bash

python -m nuitka \
--assume-yes-for-downloads \
--mingw64 \
--lto=no \
--jobs=2 \
--static-libpython=no \
--standalone \
--enable-plugin=anti-bloat \
--enable-plugin=pyqt5 \
--show-modules \
--show-anti-bloat-changes \
--follow-stdlib \
--follow-imports \
--nofollow-import-to="*.tests" \
--nofollow-import-to="*.distutils" \
--nofollow-import-to="distutils" \
--nofollow-import-to="unittest" \
--nofollow-import-to="pydoc" \
--nofollow-import-to="tkinter" \
--nofollow-import-to="test" \
--prefer-source-code \
--include-package=pypresence \
--include-package-data=qtawesome \
--include-data-dir=rare/resources/images/=rare/resources/images/ \
--include-data-files=rare/resources/languages/=rare/resources/languages/="rare_*.qm" \
--windows-icon-from-ico=rare/resources/images/Rare.ico \
--windows-company-name=Rare \
--windows-product-name=Rare \
--windows-file-description=rare.exe \
--windows-file-version=0.0.0.0 \
--windows-product-version=0.0.0.0 \
--enable-console \
rare
nuitka_opts=(
'--assume-yes-for-downloads'
'--mingw64'
'--lto=no'
'--jobs=3'
'--static-libpython=no'
'--standalone'
'--enable-plugin=anti-bloat'
'--enable-plugin=pyside6'
'--show-modules'
'--show-anti-bloat-changes'
'--follow-stdlib'
'--follow-imports'
'--nofollow-import-to="*.tests"'
'--nofollow-import-to="*.distutils"'
'--nofollow-import-to="distutils"'
'--nofollow-import-to="unittest"'
'--nofollow-import-to="pydoc"'
'--nofollow-import-to="tkinter"'
'--nofollow-import-to="test"'
'--prefer-source-code'
'--include-package=pypresence'
'--include-package-data=qtawesome'
'--include-data-dir=rare/resources/images/=rare/resources/images/'
'--include-data-files=rare/resources/languages/=rare/resources/languages/="rare_*.qm"'
'--windows-icon-from-ico=rare/resources/images/Rare.ico'
'--windows-company-name=RareDevs'
'--windows-product-name=Rare'
'--windows-file-description=rare.exe'
'--windows-file-version=0.0.0.0'
'--windows-product-version=0.0.0.0'
'--windows-console-mode=force'
)

python -m nuitka "${nuitka_opts[@]}" rare
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repository = "https://github.com/RareDevs/Rare"
[tool.poetry.dependencies]
python = "^3.9"
requests = "^2.28.1"
PyQt5 = "^5.15.7"
PySide6-Essentials = "^6.5.3"
QtAwesome = "^1.1.1"
legendary-gl = "^0.20.34"
pywebview = [
Expand All @@ -42,7 +42,7 @@ start = "rare.main:main"
Nuitka = "^2.4.8"
pylint = "^3.2.7"
black = "^24.3.0"
PyQt5-stubs = "^5.15.6.0"
PySide6-stubs = "^6.4.2.0"

#[build-system]
#requires = ["setuptools>=42", "wheel", "nuitka", "toml"]
Expand All @@ -56,7 +56,7 @@ jobs = 4
static-libpython = false
standalone = true
show-scons = false
enable-plugin = ["anti-bloat", "pyqt5"]
enable-plugin = ["anti-bloat", "pyside6"]
show-anti-bloat-changes = true
follow-stdlib = true
follow-imports = true
Expand Down
Loading

0 comments on commit c98de5a

Please sign in to comment.