Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[abandoned] playonlinux fails to launch
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Sun Mar 21, 2021 8:03 pm    Post subject: [abandoned] playonlinux fails to launch Reply with quote

Code:
~ $ sudo playonlinux
Looking for python3... 3.9.2 - selected
Traceback (most recent call last):
  File "/usr/share/playonlinux/python/mainwindow.py", line 39, in <module>
    import lib.lng as lng
  File "/usr/share/playonlinux/python/lib/lng.py", line 6, in <module>
    from . import Variables
  File "/usr/share/playonlinux/python/lib/Variables.py", line 50, in <module>
    if playonlinux.VersionLower(wx.VERSION_STRING, "3.0.0"):
  File "/usr/share/playonlinux/python/lib/playonlinux.py", line 281, in VersionLower
    version1 = [ int(digit) for digit in version1[0].split(".") ]
  File "/usr/share/playonlinux/python/lib/playonlinux.py", line 281, in <listcomp>
    version1 = [ int(digit) for digit in version1[0].split(".") ]
ValueError: invalid literal for int() with base 10: 'post2'

also:
Code:
 ~ $ ls -l `equery f playonlinux|grep -v share`
ls: cannot access ''$'\033''[01m/usr'$'\033''[39;49;00m': No such file or directory
ls: cannot access ''$'\033''[01m/usr/bin'$'\033''[39;49;00m': No such file or directory
-rwxr-xr-x 1 root root 65 Mar  6 17:32 /usr/bin/playonlinux
-rwxr-xr-x 1 root root 69 Mar  6 17:32 /usr/bin/playonlinux-pkg
What permissions are needed to run as user rather than root?

Last edited by Tony0945 on Tue Mar 23, 2021 1:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
psycho
Guru
Guru


Joined: 22 Jun 2007
Posts: 534
Location: New Zealand

PostPosted: Tue Mar 23, 2021 6:48 am    Post subject: Reply with quote

I take it from your question that it's working for you as root, but not as a normal user? I didn't make any changes to group memberships for myself: I use playonlinux for MS Office applications and it just works.

I notice mine's running on python 3.8.8 though. Are you running a PYTHON_SINGLE_TARGET="python3_9" system? Normally I'd wonder about that, however if it's working as root then I guess it must be a permissions issue.

[Edit]My output from your equery is identical to yours (but for the timestamps) if that helps.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Tue Mar 23, 2021 12:30 pm    Post subject: Reply with quote

Haven't tried logging in as root, only sudo:
From 'emerge --info'
Code:
PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_7 python3_8 python3_9 pypy3"


Perhaps 2_7 should be last not first. I'll try 3_8. SIGH! I just don't want to recompile hundreds of working programs.
DAMN PYTHON TO HELL. And from another thread, Rust seems to just as bad.

EDIT: worse
Code:
~ # playonlinux
Looking for python3... 3.7.10 - selected
Traceback (most recent call last):
  File "mainwindow.py", line 39, in <module>
    import lib.lng as lng
  File "/usr/share/playonlinux/python/lib/lng.py", line 6, in <module>
    from . import Variables
  File "/usr/share/playonlinux/python/lib/Variables.py", line 50, in <module>
    if playonlinux.VersionLower(wx.VERSION_STRING, "3.0.0"):
  File "/usr/share/playonlinux/python/lib/playonlinux.py", line 281, in VersionLower
    version1 = [ int(digit) for digit in version1[0].split(".") ]
  File "/usr/share/playonlinux/python/lib/playonlinux.py", line 281, in <listcomp>
    version1 = [ int(digit) for digit in version1[0].split(".") ]
ValueError: invalid literal for int() with base 10: 'post2'
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Tue Mar 23, 2021 1:11 pm    Post subject: Reply with quote

Tried graphical login as root. Same results. exactly. Looked at upstream for a later version. Couldn't even find 4.4. They only listed 4.3.4

V4.3.4 downloaded but wouldn't build. A complaint about the syntax of "print". Stupid *%^&% language.
I unmerged it. I don't need these scripts written by cowboy programmers in their crap python language!

Thanks Psycho for trying to help. I appreciate it.
Back to top
View user's profile Send private message
psycho
Guru
Guru


Joined: 22 Jun 2007
Posts: 534
Location: New Zealand

PostPosted: Wed Mar 24, 2021 8:42 am    Post subject: Reply with quote

Ah...well, I'm using v4.4. And sorry, I forgot it wasn't in portage...would have had a closer look at playonlinux itself if I'd remembered it was a local repo. Here's my ebuild:
Code:
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{6..8} )

inherit desktop eutils python-single-r1 xdg

MY_PN="PlayOnLinux"

DESCRIPTION="Set of scripts to easily install and use Windows games and software"
HOMEPAGE="https://playonlinux.com/
                https://github.com/PlayOnLinux/POL-POM-4"
SRC_URI="https://www.playonlinux.com/script_files/${MY_PN}/${PV}/${MY_PN}_${PV}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="winbind"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"

RDEPEND="${PYTHON_DEPS}
        app-arch/p7zip
        app-arch/unzip
        app-crypt/gnupg
        app-misc/jq
        $(python_gen_cond_dep '
                dev-python/natsort[${PYTHON_MULTI_USEDEP}]
                dev-python/wxpython:4.0[${PYTHON_MULTI_USEDEP}]
        ')
        media-gfx/icoutils
        || ( net-analyzer/netcat net-analyzer/openbsd-netcat )
        net-misc/wget
        virtual/imagemagick-tools
        virtual/wine
        winbind? ( net-fs/samba[winbind] )
        x11-apps/mesa-progs
        x11-terms/xterm
"

DEPEND="${RDEPEND}
        app-arch/cabextract
"

S="${WORKDIR}/${PN}"

PATCHES=(
        "${FILESDIR}/${PN}-4.2.4-pol-bash.patch"
        "${FILESDIR}/${PN}-4.2.4-binary-plugin.patch"
        "${FILESDIR}/${PN}-4.2.6-stop-update-warning.patch"

Do you have or can you find those patches yourself? Sincere apologies too for the lack of credits and basically not documenting the sources of my local ebuilds in any way: this one's probably copied straight out of an overlay somewhere rather than authored or even edited by me, but I tend to forget about the possibility of sharing them here so am lazy and just toss them into /var/db/repos/local and install them.

The tarball in distfiles is v.4.4. though...PlayOnLinux_4.4.tar.gz...so maybe that's all you need for it to work with your ebuild and your python? Otherwise yeah, rebuilding everything for a new python probalby isn't worth it as this is basically just a WINE front-end: I still use it because it automatically downloads different versions of WINE for different applications, and any necessary dlls or whatever, which can save a lot of painful experimentation...MS Office was a nightmare on vanilla WINE but worked perfectly first time with this thing. Just finding and configuring the appropriate WINE for your Windows application(s) might be easier.

Anyway I can confirm that v4.4 with the above ebuild and python3_8 works.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Wed Mar 24, 2021 2:16 pm    Post subject: Reply with quote

Thanks, Andy. I apologize for my angry frustration.

I do have the patches and they were there in the ebuild. The ebuild also had a dependency on cabextract that I removed and the following lines:
Code:
src_prepare() {
        default

        python_fix_shebang .

        # remove playonmac
        rm etc/{playonmac.icns,terminal.applescript} || die

        # remove desktop integration
        rm etc/{PlayOnLinux.desktop,PlayOnLinux.directory,playonlinux-Programs.menu} || die

        sed -i -e 's/python2/python3/' Makefile
}

src_install() {
        # all things without exec permissions
        insinto "/usr/share/${PN}"
        doins -r resources lang lib etc plugins

        # bash/ install
        exeinto "/usr/share/${PN}/bash"
        find "${S}/bash" -type f -exec doexe '{}' +
        exeinto "/usr/share/${PN}/bash/expert"
        find "${S}/bash/expert" -type f -exec doexe '{}' +

        # python/ install
        python_moduleinto "/usr/share/${PN}"
        python_domodule python

        # main executable files
        exeinto "/usr/share/${PN}"
        doexe ${PN}{,-pkg,-bash,-shell,-url_handler}

        # icons
        doicon -s 128 etc/${PN}.png
        for size in 16 22 32; do
                newicon -s $size etc/${PN}$size.png ${PN}.png
        done

   doman "${FILESDIR}"/playonlinux{,-pkg}.1
        dodoc CHANGELOG.md

        make_wrapper ${PN} "./${PN}" "/usr/share/${PN}"
        make_wrapper ${PN}-pkg "./${PN}-pkg" "/usr/share/${PN}"
        make_desktop_entry ${PN} ${MY_PN} ${PN} Game
}

kg_prerm() {
        if [[ -z ${REPLACING_VERSIONS} ]]; then
                elog "Installed software and games with playonlinux have not been removed."
                elog "To remove them, you can re-install playonlinux and remove them using it,"
                elog "or do it manually by removing .PlayOnLinux/ in your home directory."
        fi
}

Maybe the problem is with the eclasses?
Is this adapted from python2.7? I still have python2.7 in overlay and not afraid to use it until it breaks.
Back to top
View user's profile Send private message
psycho
Guru
Guru


Joined: 22 Jun 2007
Posts: 534
Location: New Zealand

PostPosted: Wed Feb 23, 2022 1:50 am    Post subject: Reply with quote

Hi again Tony.

Well, my custom (playonlinux) build eventually hit this problem too (and I see it was raised again on this thread without a solution). My setup continued to work until quite recently, but I don't use it enough to be sure what specific change broke it. I'm running a narrow PYTHON_TARGETS="python3_9" Python setup and I think that change was fairly recent (I had 3_8 as an option, maybe even the SINGLE_TARGET too, I can't remember), so maybe something I did in my efforts to simplify the Python mess backfired and broke things.

Anyway, no doubt there is a fix, but I just can't be bothered navigating yet another breakage due to Python changes: not when I only used Playonlinux (as opposed to straight WINE) reluctantly in the first place, due to laziness (I chose to install this automation rather than invest the time in configuring WINE myself). Playonlinux is really just a bit of WINE and winetricks automation that scripts the right configurations and installations of libraries and whatnot for software to work on WINE: in theory you should be able to launch all your Playonlinux stuff as-is, ideally in the latest version of WINE, but at the very least in an old (matching the version Playonlinux chose) version. After sinking a bit of time into trying to fix this Python error with Playonlinux, I just moved the ~/.PlayOnLinux/wineprefix directories to ~/.wine_office and so on and the executables all work perfectly well when they're launched normally via WINE. Microsoft Office did treat the latest WINE environment as new hardware (I don't understand why, but it did) which required me to re-activate the product...but the activation succeeded so I've simply uninstalled playonlinux and all's well.

I realise this doesn't solve the problem with playonlinux itself, and I wish someone were maintaining an ebuild as WINE installations can be time-consuming and this tool's automation of that was very welcome...however, for anyone like me who's really just wanting to be able to continue to use the software that s/he used playonlinux to install, it's nice to know that you can just use the existing wineprefix directories as-is with WINE. It seems that playonlinux did a good job of keeping itself untangled from its WINE installations.

Difficulties persuading Office to activate (in vanilla WINE) were what frustrated and bored me to the point where I turned to playonlinux in the first place, so now that Office is happy again, I'm going to be careful not to allow automatic upgrades: I'm masking future WINE versions so I can test Office against each of them before committing to the upgrade. Another option would be simply to backup the whole Office .wine tree, but there are a few Gb in there so I'm just going to freeze WINE...I don't think it updates often enough for that to be a nuisance.

BTW, I'm aware that LibreOffice handles MS documents, but not well enough: it causes enough problems (I'm not sure why, now that MS have opened up the file format, but it does) that the only way to work collaboratively on Windows users' MS Office documents, while trusting your edits not to break stuff, is to use the MS products. This makes WINE quite useful and important in some contexts: the name "playonlinux" suggests it's just for Windows gaming, but it's more valuable than that. I hope someone with the know-how to fix it gets it back into portage someday.
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1678

PostPosted: Wed Feb 23, 2022 3:44 am    Post subject: Reply with quote

Note that I think Lutris (games-util/lutris) is the modern alternative to playonlinux.

But those interested in continuing to use playonlinux may want to try making a snapshot of their git repository (we can help you do that if you're interested). Or just apply the patches since the last release (there's not many) which should fix the issue mentioned in this thread wrt dying immediately on launch with Python 3.

EDIT: Specifically, you need:
https://github.com/PlayOnLinux/POL-POM-4/commit/2bf9ed2d321a26b48de83a13064f7b9f0db0dcd7
https://github.com/PlayOnLinux/POL-POM-4/commit/c59d03b5717143b4102b70159a0d21850422ce64
https://github.com/PlayOnLinux/POL-POM-4/commit/216c4489ad41546c615fcd5732d6c9c5c8f31530

but I'd still really encourage folks to try Lutris.
Back to top
View user's profile Send private message
psycho
Guru
Guru


Joined: 22 Jun 2007
Posts: 534
Location: New Zealand

PostPosted: Wed Feb 23, 2022 9:01 am    Post subject: Reply with quote

Thanks Sam, that's all useful. I missed those new patches...and had no idea Lutris also supported a few non-games (I see the 2010 MS Office applications are supported). Playonlinux supports many more applications (as opposed to games) than Lutris so it's probably still going to be my preference for an easy WINE manager, but Lutris does look to be much better for gaming.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum