mirror of
https://github.com/FAUSheppy/homelab_gamevault
synced 2025-12-06 06:51:36 +01:00
fix: installer & lnk-runs
This commit is contained in:
@@ -53,7 +53,10 @@ def run_exe(path, synchronous=False):
|
|||||||
'''Launches a given software'''
|
'''Launches a given software'''
|
||||||
|
|
||||||
if os.name != "nt":
|
if os.name != "nt":
|
||||||
subprocess.Popen(["wine64", path], cwd=os.path.dirname(path))
|
if ".lnk" in path:
|
||||||
|
subprocess.Popen(["wine64", "start", path])
|
||||||
|
else:
|
||||||
|
subprocess.Popen(["wine64", path], cwd=os.path.dirname(path))
|
||||||
return
|
return
|
||||||
|
|
||||||
if synchronous:
|
if synchronous:
|
||||||
|
|||||||
13
software.py
13
software.py
@@ -103,6 +103,9 @@ class Software:
|
|||||||
|
|
||||||
# execute or unpack #
|
# execute or unpack #
|
||||||
if local_file.endswith(".exe"):
|
if local_file.endswith(".exe"):
|
||||||
|
if os.name != "nt" and not os.path.isabs(local_file):
|
||||||
|
# need abs path for wine #
|
||||||
|
local_file = os.path.join(os.getcwd(), local_file)
|
||||||
localaction.run_exe(local_file)
|
localaction.run_exe(local_file)
|
||||||
elif local_file.endswith(".zip"):
|
elif local_file.endswith(".zip"):
|
||||||
self._extract_to_target(local_file, self.backend.install_dir)
|
self._extract_to_target(local_file, self.backend.install_dir)
|
||||||
@@ -127,6 +130,11 @@ class Software:
|
|||||||
# run installer if set #
|
# run installer if set #
|
||||||
if self.installer:
|
if self.installer:
|
||||||
installer_path = os.path.join(self.backend.install_dir, self.title, self.installer)
|
installer_path = os.path.join(self.backend.install_dir, self.title, self.installer)
|
||||||
|
if os.name != "nt" and not os.path.isabs(installer_path):
|
||||||
|
# need abs path for wine #
|
||||||
|
installer_path = os.path.join(os.getcwd(), installer_path)
|
||||||
|
|
||||||
|
|
||||||
print("Running installer:", installer_path)
|
print("Running installer:", installer_path)
|
||||||
localaction.run_exe(installer_path)
|
localaction.run_exe(installer_path)
|
||||||
|
|
||||||
@@ -148,4 +156,7 @@ class Software:
|
|||||||
return
|
return
|
||||||
|
|
||||||
if self.run_exe:
|
if self.run_exe:
|
||||||
localaction.run_exe(os.path.join(self.backend.install_dir, self.title, self.run_exe))
|
if os.name == "nt" or not ".lnk" in self.run_exe:
|
||||||
|
localaction.run_exe(os.path.join(self.backend.install_dir, self.title, self.run_exe))
|
||||||
|
else:
|
||||||
|
localaction.run_exe(self.run_exe)
|
||||||
|
|||||||
Reference in New Issue
Block a user