playonlinux: fix for python 3.12

This commit is contained in:
Đoàn Trần Công Danh 2023-10-24 08:33:51 +07:00
parent a890580904
commit a423faac8d
2 changed files with 45 additions and 1 deletions

View File

@ -0,0 +1,42 @@
--- a/python/configurewindow/ConfigureWindowNotebook.py
+++ b/python/configurewindow/ConfigureWindowNotebook.py
@@ -460,9 +460,11 @@ class ConfigureWindowNotebook(wx.Noteboo
if (param == 405):
self.FileDialog = wx.FileDialog(self)
self.FileDialog.SetDirectory("~")
- self.supported_files = "All|*.exe;*.EXE;*.msi;*.MSI\
- \|Windows executable (*.exe)|*.exe;*.EXE\
- \|Windows install file (*.msi)|*.msi;*MSI"
+ self.supported_files = "|".join([
+ "All|*.exe;*.EXE;*.msi;*.MSI",
+ "Windows executable (*.exe)|*.exe;*.EXE",
+ "Windows install file (*.msi)|*.msi;*MSI",
+ ]);
self.FileDialog.SetWildcard(self.supported_files)
self.FileDialog.ShowModal()
if (self.FileDialog.GetPath() != ""):
--- a/python/mainwindow.py
+++ b/python/mainwindow.py
@@ -705,13 +705,15 @@ class MainWindow(wx.Frame):
def ChangeIcon(self, event):
self.IconDir = Variables.homedir + "/.local/share/icons/"
- self.SupprotedIconExt = "All|*.xpm;*.XPM;*.png;*.PNG;*.ico;*.ICO;*.jpg;*.JPG;*.jpeg;*.JPEG;*.bmp;*.BMP\
- \|XPM (*.xpm)|*.xpm;*.XPM\
- \|PNG (*.png)|*.png;*.PNG\
- \|ICO (*.ico)|*.ico;*.ICO\
- \|JPG (*.jpg)|*.jpg;*.JPG\
- \|BMP (*.bmp)|*.bmp;*.BMP\
- \|JPEG (*.jpeg)|*.jpeg;*JPEG"
+ self.SupprotedIconExt = "|".join([
+ "All|*.xpm;*.XPM;*.png;*.PNG;*.ico;*.ICO;*.jpg;*.JPG;*.jpeg;*.JPEG;*.bmp;*.BMP",
+ "XPM (*.xpm)|*.xpm;*.XPM",
+ "PNG (*.png)|*.png;*.PNG",
+ "ICO (*.ico)|*.ico;*.ICO",
+ "JPG (*.jpg)|*.jpg;*.JPG",
+ "BMP (*.bmp)|*.bmp;*.BMP",
+ "JPEG (*.jpeg)|*.jpeg;*.JPEG",
+ ])
self.IconDialog = wx.FileDialog(self, "Choose a icon file", self.IconDir, "", self.SupprotedIconExt,
wx.OPEN | wx.FD_PREVIEW)
if self.IconDialog.ShowModal() == wx.ID_OK:

View File

@ -6,13 +6,15 @@ revision=2
archs="i686 x86_64"
depends="icoutils netcat ImageMagick xterm wxPython cabextract unzip glxinfo
gnupg xdg-user-dirs libXmu wget p7zip curl jq python3-natsort xrdb gettext
perl"
perl python3-pyasyncore"
short_desc="GUI for managing Windows programs under linux"
maintainer="Helmut Pozimski <helmut@pozimski.eu>"
license="GPL-2.0-or-later"
homepage="http://www.playonlinux.com"
distfiles="http://www.playonlinux.com/script_files/PlayOnLinux/${version}/PlayOnLinux_${version}.tar.gz"
checksum=aaeedec5249df3ffd56cd8b3e3e06ea7117828ffc868eb2653d232c48e488058
pycompile_dirs="usr/share/$pkgname/python"
python_version=3
do_install() {
vmkdir usr/share/$pkgname