mirror of
https://github.com/vale981/rmview
synced 2025-03-05 09:11:39 -05:00
Autoinstall missing libcrypto in 2.6
This commit is contained in:
parent
5693aafb58
commit
aa82dc24e5
4 changed files with 37 additions and 3 deletions
BIN
bin/libcrypto.so.1.0.2.gz
Executable file
BIN
bin/libcrypto.so.1.0.2.gz
Executable file
Binary file not shown.
|
@ -6,5 +6,6 @@
|
|||
<file>assets/problem.svg</file>
|
||||
<file>bin/rM1-vnc-server-standalone</file>
|
||||
<file>bin/rM2-vnc-server-standalone</file>
|
||||
<file>bin/libcrypto.so.1.0.2.gz</file>
|
||||
</qresource>
|
||||
</RCC>
|
2
setup.py
2
setup.py
|
@ -32,7 +32,7 @@ class genResourcesEggInfo(egg_info):
|
|||
|
||||
setup(
|
||||
name='rmview',
|
||||
version='2.1',
|
||||
version='2.1.5',
|
||||
url='https://github.com/bordaigorl/rmview',
|
||||
description='rMview: a fast live viewer for reMarkable',
|
||||
author='bordaigorl',
|
||||
|
|
|
@ -235,7 +235,39 @@ class rMViewApp(QApplication):
|
|||
|
||||
version = int(version[1])
|
||||
|
||||
sftp = None
|
||||
# check needed files are in place
|
||||
_,out,_ = ssh.exec_command("[ -x /usr/lib/libcrypto.so.1.0.2 ]")
|
||||
if out.channel.recv_exit_status() != 0:
|
||||
answer = QMessageBox.question(self.viewer,
|
||||
"Missing libcrypto 1.0.2",
|
||||
"Your reMarkable is missing the right version of a library needed by rmView.\n"\
|
||||
"This is most probably a result of updating the tablet to version 2.6.\n\n"\
|
||||
"Would you like rmView to install the missing library?\n"\
|
||||
"To resolve the issue manually, press NO and consult the documentation.")
|
||||
if answer == QMessageBox.Yes:
|
||||
log.info("Installing libcrypto...")
|
||||
try:
|
||||
sftp = ssh.open_sftp()
|
||||
from stat import S_IXUSR
|
||||
fo = QFile(':bin/libcrypto.so.1.0.2.gz')
|
||||
fo.open(QIODevice.ReadOnly)
|
||||
sftp.putfo(fo, '/usr/lib/libcrypto.so.1.0.2.gz')
|
||||
fo.close()
|
||||
_,out,_ = ssh.exec_command("/bin/gunzip /usr/lib/libcrypto.so.1.0.2.gz")
|
||||
out = out.channel.recv_exit_status()
|
||||
if out != 0:
|
||||
raise Exception("libcrypto could not be decompressed on the tablet [%d]" % out)
|
||||
log.info("Installation successful!")
|
||||
except Exception as e:
|
||||
log.error('%s %s', type(e), e)
|
||||
QMessageBox.critical(None, "Error", 'There has been an error while trying to install the required components on the tablet.\n%s.' % e)
|
||||
self.quit()
|
||||
return
|
||||
else:
|
||||
self.quit()
|
||||
return
|
||||
|
||||
_,out,_ = ssh.exec_command("[ -x $HOME/rM-vnc-server-standalone ]")
|
||||
if out.channel.recv_exit_status() != 0:
|
||||
mbox = QMessageBox(QMessageBox.NoIcon, 'Missing components', 'Your reMarkable is missing some needed components.')
|
||||
|
@ -253,11 +285,12 @@ class rMViewApp(QApplication):
|
|||
mbox.addButton("Auto Install", QMessageBox.AcceptRole)
|
||||
mbox.setDefaultButton(0)
|
||||
answer = mbox.exec()
|
||||
log.info(answer)
|
||||
log.debug(answer)
|
||||
if answer == 1:
|
||||
log.info("Installing...")
|
||||
try:
|
||||
sftp = ssh.open_sftp()
|
||||
if sftp is None:
|
||||
sftp = ssh.open_sftp()
|
||||
from stat import S_IXUSR
|
||||
fo = QFile(':bin/rM%d-vnc-server-standalone' % version)
|
||||
fo.open(QIODevice.ReadOnly)
|
||||
|
|
Loading…
Add table
Reference in a new issue