Skip to content

Commit

Permalink
Merge pull request #6937 from drew2a/fix/6929-2
Browse files Browse the repository at this point in the history
Fixes #6929
  • Loading branch information
drew2a authored Jun 15, 2022
2 parents ac68fcf + 261a8da commit ec023e6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/tribler/gui/core_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ def start_tribler_core(self):
core_args = self.core_args
if not core_args:
core_args = sys.argv + ['--core']
if getattr(sys, 'frozen', False):
# remove duplicate tribler.exe from core_args when running complied binary
# https://pyinstaller.org/en/v3.3.1/runtime-information.html#using-sys-executable-and-sys-argv-0
core_args = core_args[1:]

self.core_process = QProcess()
self.core_process.setProcessEnvironment(core_env)
Expand All @@ -95,6 +99,7 @@ def start_tribler_core(self):
connect(self.core_process.readyReadStandardOutput, self.on_core_stdout_read_ready)
connect(self.core_process.readyReadStandardError, self.on_core_stderr_read_ready)
connect(self.core_process.finished, self.on_core_finished)
self._logger.info(f'Start Tribler core process {sys.executable} with arguments: {core_args}')
self.core_process.start(sys.executable, core_args)

def on_core_started(self):
Expand Down

0 comments on commit ec023e6

Please sign in to comment.