Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port Rare to PySide6 #422

Merged
merged 27 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1560aac
RareGameSlim: report save as up-to-date if there aren't any cloud sav…
loathingKernel Sep 12, 2024
0e62e97
RareGameSlim: return an invalid save from `latest_save` instead of None
loathingKernel Sep 12, 2024
f6984c3
RareGameSlim: return early from `upload/download_saves` if checks fail
loathingKernel Sep 12, 2024
83fc218
misc: add dev script variants for pyside6
loathingKernel Mar 14, 2023
a2ea8a8
misc: update nuitka qt6 scripts
loathingKernel Jun 22, 2024
35c1eef
Rare: PySide6 WIP
loathingKernel Jun 20, 2024
e808596
misc: update nuitka pyside6 script
loathingKernel Jun 23, 2024
8cb7bad
UninstallDialog: fix invalid argument type for `setCheckState`
loathingKernel Jun 23, 2024
634ab88
PathEditIconProvider: use Qt enumerations instead of integers
loathingKernel Jun 24, 2024
aada044
RareStyle: track file despite not being used
loathingKernel Jun 24, 2024
a921e2b
repo: move pyside6 script to their regular names
loathingKernel Jun 24, 2024
5870d73
workflows: update nuitka windows workflow for pyside6
loathingKernel Jun 24, 2024
03a67f6
stylesheets: update resources
loathingKernel Jun 26, 2024
144751e
RareLauncher: fix signal connection check in pyside6
loathingKernel Jun 26, 2024
2bc131a
DlThread: use scoped enumerations
loathingKernel Jun 27, 2024
cc9c623
RareLauncher: in pyside6 the socket is already deleted
loathingKernel Jun 27, 2024
f187397
misc: build nuitka package with lto on windows
loathingKernel Jun 27, 2024
1d82ff9
tools: move developement scripts to their own directory
loathingKernel Jun 29, 2024
24fce7a
workflows: update in preparation for pyside6
loathingKernel Jun 29, 2024
b40c1c1
Rare: shutdown application before creating an new one after logout
loathingKernel Jul 1, 2024
51d3433
LogiDialog: fix signal issue in pyside6
loathingKernel Jul 1, 2024
33b4d09
LoginDialog: annotate Qt slots
loathingKernel Jul 1, 2024
3641de5
misc: refactor nuitka scripts, use ps1 scripts instead of bat on Windows
loathingKernel Jul 3, 2024
c100a67
workflows: enable pywebview for nuitka windows build
loathingKernel Jul 3, 2024
b79a425
workflows: fix some derps
loathingKernel Jul 3, 2024
5dd913a
Rare: fix version reporting string
loathingKernel Jul 7, 2024
865e54e
CloudSaves: retain user selection for automatic sync if it doesn't ma…
loathingKernel Sep 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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