Fix subprocess will create a terminal window when Minecraft is running.
Add a daemon to refresh account token.
This commit is contained in:
+7
-1
@@ -1,6 +1,7 @@
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import threading
|
||||
import time
|
||||
import traceback
|
||||
@@ -863,6 +864,11 @@ class LaunchManager:
|
||||
cwd=game_dir,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
creationflags=(
|
||||
subprocess.CREATE_NO_WINDOW
|
||||
if sys.platform == "win32"
|
||||
else 0
|
||||
),
|
||||
text=True,
|
||||
encoding="utf-8",
|
||||
errors="replace",
|
||||
@@ -926,4 +932,4 @@ class GameManager(QObject):
|
||||
self.manifest = ManifestManager(self.app)
|
||||
self.java = JavaManager(self.app)
|
||||
self.game_file = GameFileManager(self.app, manifest_manager=self.manifest)
|
||||
self.launch = LaunchManager(self.app, self.manifest, self.java, self.game_file, self.account_manager)
|
||||
self.launch = LaunchManager(self.app, self.manifest, self.java, self.game_file, self.account_manager)
|
||||
|
||||
Reference in New Issue
Block a user