LINUX SUPPORT IS HERE

Talk about general things concerning Forged Alliance Forever.

Moderators: FtXCommando, Ze Dogfather

Re: LINUX SUPPORT IS HERE

Postby tatsu » 08 Jul 2017, 23:54

Wesmania wrote:We moved from qtwebkit to qtwebengine, maybe it's less troublesome to install? And again, instead of setting up virtualenv, try installing all client dependencies for your system Python instead, and running the client from your system env (that's how the deb will need to work anyway). Some python modules might not have corresponding packages (like trueskill), I worked around it for gentoo by packing them too.

ok I'm trying the native route. I may need further help. :)
User avatar
tatsu
Supreme Commander
 
Posts: 1553
Joined: 02 Jul 2012, 21:26
Has liked: 1952 times
Been liked: 171 times
FAF User Name: tatsu

Re: LINUX SUPPORT IS HERE

Postby tatsu » 09 Jul 2017, 00:49

Wesmania wrote:We o.

Code: Select all
t@tsu:~/new-faf/faf-client$ pip3 install -r requirements.txt
Collecting ipaddress (from -r requirements.txt (line 1))
Collecting pathlib (from -r requirements.txt (line 2))
Collecting pytest (from -r requirements.txt (line 3))
  Using cached pytest-3.1.3-py2.py3-none-any.whl
Collecting pytest-cov (from -r requirements.txt (line 4))
  Using cached pytest_cov-2.5.1-py2.py3-none-any.whl
Collecting pytest-mock (from -r requirements.txt (line 5))
  Using cached pytest_mock-1.6.0-py2.py3-none-any.whl
Collecting pytest-qt (from -r requirements.txt (line 6))
  Using cached pytest_qt-2.1.0-py2.py3-none-any.whl
Collecting semantic_version (from -r requirements.txt (line 7))
  Using cached semantic_version-2.6.0-py3-none-any.whl
Requirement already satisfied: idna in /usr/lib/python3/dist-packages (from -r requirements.txt (line 8))
Collecting py>=1.4.33 (from pytest->-r requirements.txt (line 3))
  Using cached py-1.4.34-py2.py3-none-any.whl
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from pytest->-r requirements.txt (line 3))
Collecting coverage>=3.7.1 (from pytest-cov->-r requirements.txt (line 4))
  Using cached coverage-4.4.1-cp35-cp35m-manylinux1_x86_64.whl
Installing collected packages: ipaddress, pathlib, py, pytest, coverage, pytest-cov, pytest-mock, pytest-qt, semantic-version
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/local/lib/python3.5/dist-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/usr/local/lib/python3.5/dist-packages/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/usr/local/lib/python3.5/dist-packages/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/usr/local/lib/python3.5/dist-packages/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/usr/local/lib/python3.5/dist-packages/pip/wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/usr/local/lib/python3.5/dist-packages/pip/wheel.py", line 323, in clobber
    shutil.copyfile(srcfile, destfile)
  File "/usr/lib/python3.5/shutil.py", line 121, in copyfile
    with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/ipaddress.py'


i'm trying with pip3 rather than pip in order to use python3

i've removed cxfreeze and trueskill from requirements.txt
Last edited by tatsu on 09 Jul 2017, 00:53, edited 1 time in total.
User avatar
tatsu
Supreme Commander
 
Posts: 1553
Joined: 02 Jul 2012, 21:26
Has liked: 1952 times
Been liked: 171 times
FAF User Name: tatsu

Re: LINUX SUPPORT IS HERE

Postby Wesmania » 09 Jul 2017, 00:51

You shouldn't need pip if you're going the system package route, just find the right packages. I think there should be 'pip3' for python3 if you really need it.
Wesmania
Contributor
 
Posts: 391
Joined: 19 Nov 2014, 19:17
Has liked: 2 times
Been liked: 79 times
FAF User Name: MazorNoob

Re: LINUX SUPPORT IS HERE

Postby tatsu » 09 Jul 2017, 00:54

Wesmania wrote:You shouldn't need pip if you're going the system package route, just find the right packages. I think there should be 'pip3' for python3 if you really need it.

yeah i've done that since. but i'm going to try to not use pip at all.

Question : do i just unzip faf and run?

i've tired that
Code: Select all
t@tsu:~/new-faf/faf-client$ python src/__main__.py
Traceback (most recent call last):
  File "src/__main__.py", line 33, in <module>
    from PyQt5 import QtWidgets, uic
ImportError: No module named PyQt5


if not pip then what commands do i run?

update :
Code: Select all
t@tsu:~/new-faf/faf-client$ python -V
Python 2.7.13
t@tsu:~/new-faf/faf-client$ alias python=/usr/bin/python3
t@tsu:~/new-faf/faf-client$ python -V
Python 3.5.3
t@tsu:~/new-faf/faf-client$ python src/__main__.py
Traceback (most recent call last):
  File "src/__main__.py", line 40, in <module>
    from PyQt5 import QtWebEngineWidgets
RuntimeError: the sip module implements API v11.0 to v11.3 but the  module requires API v12.2
t@tsu:~/new-faf/faf-client$

whoops

so apparently thaat's due to me compiling sip and pyqt5 when i didn't need to
https://stackoverflow.com/questions/225 ... 1-required
how do i undo that?

UPDATE:

upon fixing that (following the guitde plus reinstalling QT5 and rebooting) I get :
Code: Select all
t@tsu:~/new-faf/faf-client$ alias python=/usr/bin/python3
t@tsu:~/new-faf/faf-client$ python src/__main__.py
Traceback (most recent call last):
  File "src/__main__.py", line 33, in <module>
    from PyQt5 import QtWidgets, uic
ImportError: No module named 'sip'


UPDATE :

so I tried this :
Code: Select all
sudo apt install cura-engine python-sip python3-pyqt5 python3-pyqt5.qtopengl python3-pyqt5.qtquick python3-pyqt5.qtsvg python3-sip


but I got :
Code: Select all
t@tsu:~/new-faf/faf-client$ python src/__main__.py
Traceback (most recent call last):
  File "src/__main__.py", line 40, in <module>
    from PyQt5 import QtWebEngineWidgets
RuntimeError: the sip module implements API v11.0 to v11.3 but the  module requires API v12.2
User avatar
tatsu
Supreme Commander
 
Posts: 1553
Joined: 02 Jul 2012, 21:26
Has liked: 1952 times
Been liked: 171 times
FAF User Name: tatsu

Re: LINUX SUPPORT IS HERE

Postby Wesmania » 09 Jul 2017, 10:46

I don't really know what's happening either. I could find no qtwebengine package for ubuntu, did you install it manually? If there isn't one, that's a very unfortunate blocker to making a package.
Wesmania
Contributor
 
Posts: 391
Joined: 19 Nov 2014, 19:17
Has liked: 2 times
Been liked: 79 times
FAF User Name: MazorNoob

Re: LINUX SUPPORT IS HERE

Postby tatsu » 09 Jul 2017, 11:54

Wesmania wrote:I don't really know what's happening either. I could find no qtwebengine package for ubuntu, did you install it manually? If there isn't one, that's a very unfortunate blocker to making a package.

here's what make zero sense to me :
Screenshot from 2017-07-09 11-52-36.png
Screenshot from 2017-07-09 11-52-36.png (45.65 KiB) Viewed 3493 times

Qtwebengine is included. so if it finds qt it should have no issues finding qtwebengine.

but mostly the error message points to sip. which is also included but not with the exact api number.
Last edited by tatsu on 09 Jul 2017, 14:51, edited 1 time in total.
User avatar
tatsu
Supreme Commander
 
Posts: 1553
Joined: 02 Jul 2012, 21:26
Has liked: 1952 times
Been liked: 171 times
FAF User Name: tatsu

Re: LINUX SUPPORT IS HERE

Postby Wesmania » 09 Jul 2017, 13:35

If that's some standalone installer then I wouldn't be surprised if there's a version mismatch. Googling suggests that sip uses api version 0.12 from sip version 4.19, maybe that can help you. It seems there's a 'python3-pyqt5.qtwebengine' package in Ubuntu 17.04, so maybe that's some solution.
Wesmania
Contributor
 
Posts: 391
Joined: 19 Nov 2014, 19:17
Has liked: 2 times
Been liked: 79 times
FAF User Name: MazorNoob

Re: LINUX SUPPORT IS HERE

Postby tatsu » 09 Jul 2017, 15:07

Wesmania wrote:If that's some standalone installer then I wouldn't be surprised if there's a version mismatch. Googling suggests that sip uses api version 0.12 from sip version 4.19, maybe that can help you. It seems there's a 'python3-pyqt5.qtwebengine' package in Ubuntu 17.04, so maybe that's some solution.

it does and doesn't installing sip (folowing this guide : https://pypi.python.org/pypi/SIP/4.19 ) doesn't work either
Code: Select all
t@tsu:~$ pip3 install sip
Collecting sip
  Using cached sip-4.19.3-cp35-cp35m-manylinux1_x86_64.whl
Installing collected packages: sip
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/local/lib/python3.5/dist-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/usr/local/lib/python3.5/dist-packages/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/usr/local/lib/python3.5/dist-packages/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/usr/local/lib/python3.5/dist-packages/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/usr/local/lib/python3.5/dist-packages/pip/wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/usr/local/lib/python3.5/dist-packages/pip/wheel.py", line 323, in clobber
    shutil.copyfile(srcfile, destfile)
  File "/usr/lib/python3.5/shutil.py", line 121, in copyfile
    with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/sip.so'


I've run the same steps under the viirtual machine and got this result :
Code: Select all
r@r-VirtualBox:~/ff/faf-client$ python src/__main__.py
Traceback (most recent call last):
  File "src/__main__.py", line 33, in <module>
    from PyQt5 import QtWidgets, uic
ImportError: No module named 'PyQt5'
r@r-VirtualBox:~/ff/faf-client$ python -V
Python 3.5.3

this shouldn't be happening because under native when i'd installed qt5 and aliased python3 it could find QT5. now with the same step reproduced under the virtual machine it can't find QT5.

(though whereis works)

I continued in the virtual machine :

Code: Select all
r@r-VirtualBox:~/ff/faf-client$ sudo apt-get install python3-pyqt5
...............
r@r-VirtualBox:~/ff/faf-client$ python src/__main__.py
Traceback (most recent call last):
  File "src/__main__.py", line 40, in <module>
    from PyQt5 import QtWebEngineWidgets
ImportError: cannot import name 'QtWebEngineWidgets'
r@r-VirtualBox:~/ff/faf-client$


And so now I'm stuck there.
it seems remnants of Qtwebkit in the code are the issue.
https://stackoverflow.com/questions/378 ... s-in-pyqt5
User avatar
tatsu
Supreme Commander
 
Posts: 1553
Joined: 02 Jul 2012, 21:26
Has liked: 1952 times
Been liked: 171 times
FAF User Name: tatsu

Re: LINUX SUPPORT IS HERE

Postby tatsu » 15 Jul 2017, 12:15

Wesmania wrote:I.

what do you think?

Is it really a remaining dependency issue?
User avatar
tatsu
Supreme Commander
 
Posts: 1553
Joined: 02 Jul 2012, 21:26
Has liked: 1952 times
Been liked: 171 times
FAF User Name: tatsu

Re: LINUX SUPPORT IS HERE

Postby Wesmania » 15 Jul 2017, 13:45

For all I can tell, there are no references to QtWebkit anymore in the code, they were replaced with QtWebEngine. I don't know if you can install it in ubuntu, it seems possible in 17.04.
Wesmania
Contributor
 
Posts: 391
Joined: 19 Nov 2014, 19:17
Has liked: 2 times
Been liked: 79 times
FAF User Name: MazorNoob

PreviousNext

Return to General Discussions

Who is online

Users browsing this forum: No registered users and 1 guest