Test with appimage
This commit is contained in:
parent
fcef6c4fb0
commit
dcf7c0fd18
|
@ -1,5 +1,6 @@
|
|||
v 0.4.0 [22-nov-2019]
|
||||
v 0.4.0 [10-mar-2020]
|
||||
- Update easymacro.py
|
||||
- Fix: in OSx Catalina
|
||||
|
||||
|
||||
v 0.3.0 [12-nov-2019]
|
||||
|
|
23
easymacro.py
23
easymacro.py
|
@ -4178,8 +4178,27 @@ def get_path_python():
|
|||
path = join(path, '..', 'Resources', PYTHON)
|
||||
else:
|
||||
path = join(path, PYTHON)
|
||||
|
||||
cmd = '"{}" -V'.format(path)
|
||||
if run(cmd, True):
|
||||
return path
|
||||
|
||||
path = PYTHON
|
||||
cmd = '"{}" -V'.format(path)
|
||||
result = run(cmd, True)
|
||||
|
||||
if 'Python 3' in result:
|
||||
return path
|
||||
|
||||
path = PYTHON + '3'
|
||||
cmd = '"{}" -V'.format(path)
|
||||
result = run(cmd, True)
|
||||
|
||||
if 'Python 3' in result:
|
||||
return path
|
||||
|
||||
return ''
|
||||
|
||||
|
||||
# ~ Export ok
|
||||
def get_file(init_dir='', multiple=False, filters=()):
|
||||
|
@ -4542,8 +4561,8 @@ def run(command, wait=False):
|
|||
stdout=None, stderr=None, close_fds=True)
|
||||
result, er = p.communicate()
|
||||
except subprocess.CalledProcessError as e:
|
||||
msg = ("run [ERROR]: output = %s, error code = %s\n"
|
||||
% (e.output, e.returncode))
|
||||
msg = ("%s\nrun [ERROR]: output = %s, error code = %s\n"
|
||||
% (command, e.output, e.returncode))
|
||||
error(msg)
|
||||
return False
|
||||
|
||||
|
|
Binary file not shown.
|
@ -32,8 +32,6 @@ class Controllers(object):
|
|||
|
||||
def __init__(self, dialog):
|
||||
self.d = dialog
|
||||
# ~ self.path_python = app.PYTHON
|
||||
# ~ if app.IS_WIN:
|
||||
self.path_python = app.get_path_python()
|
||||
self._states = {
|
||||
'list': False,
|
||||
|
@ -248,13 +246,11 @@ class Controllers(object):
|
|||
cmd = '"{}"'.format(self.path_python)
|
||||
app.open_file(cmd)
|
||||
else:
|
||||
if app.DESKTOP == 'gnome':
|
||||
cmd = 'gnome-terminal -- {}'
|
||||
else:
|
||||
cmd = 'exec "{}"'
|
||||
if app.IS_MAC:
|
||||
cmd = 'open "{}"'
|
||||
else:
|
||||
cmd = 'exec "{}"'
|
||||
elif app.DESKTOP == 'gnome':
|
||||
cmd = 'gnome-terminal -- {}'
|
||||
|
||||
cmd = cmd.format(self.path_python)
|
||||
app.run(cmd)
|
||||
|
@ -282,10 +278,11 @@ class ZAZPip(unohelper.Base, XJobExecutor):
|
|||
dialog.id_extension = ID_EXTENSION
|
||||
dialog.events = Controllers(dialog)
|
||||
|
||||
lbl_title = '{} {} - {}'.format(app.NAME, app.VERSION, app.OS)
|
||||
args = {
|
||||
'Type': 'Label',
|
||||
'Name': 'lbl_title',
|
||||
'Label': app.NAME + ' v' + app.VERSION,
|
||||
'Label': lbl_title,
|
||||
'Width': 100,
|
||||
'Height': 15,
|
||||
'Border': 1,
|
||||
|
@ -297,11 +294,7 @@ class ZAZPip(unohelper.Base, XJobExecutor):
|
|||
dialog.add_control(args)
|
||||
dialog.center(dialog.lbl_title, y=5)
|
||||
|
||||
# ~ path_python = app.PYTHON
|
||||
# ~ if app.IS_WIN:
|
||||
path_python = app.get_path_python()
|
||||
# ~ cmd = app.PYTHON + ' -V'
|
||||
# ~ if app.IS_WIN:
|
||||
cmd = '"{}" -V'.format(path_python)
|
||||
label = app.run(cmd, True)
|
||||
|
||||
|
|
|
@ -4178,8 +4178,27 @@ def get_path_python():
|
|||
path = join(path, '..', 'Resources', PYTHON)
|
||||
else:
|
||||
path = join(path, PYTHON)
|
||||
|
||||
cmd = '"{}" -V'.format(path)
|
||||
if run(cmd, True):
|
||||
return path
|
||||
|
||||
path = PYTHON
|
||||
cmd = '"{}" -V'.format(path)
|
||||
result = run(cmd, True)
|
||||
|
||||
if 'Python 3' in result:
|
||||
return path
|
||||
|
||||
path = PYTHON + '3'
|
||||
cmd = '"{}" -V'.format(path)
|
||||
result = run(cmd, True)
|
||||
|
||||
if 'Python 3' in result:
|
||||
return path
|
||||
|
||||
return ''
|
||||
|
||||
|
||||
# ~ Export ok
|
||||
def get_file(init_dir='', multiple=False, filters=()):
|
||||
|
@ -4542,8 +4561,8 @@ def run(command, wait=False):
|
|||
stdout=None, stderr=None, close_fds=True)
|
||||
result, er = p.communicate()
|
||||
except subprocess.CalledProcessError as e:
|
||||
msg = ("run [ERROR]: output = %s, error code = %s\n"
|
||||
% (e.output, e.returncode))
|
||||
msg = ("%s\nrun [ERROR]: output = %s, error code = %s\n"
|
||||
% (command, e.output, e.returncode))
|
||||
error(msg)
|
||||
return False
|
||||
|
||||
|
|
Loading…
Reference in New Issue