@@ -82,6 +82,7 @@ def _start(self):
8282 output .put_processbar (self .PROCESSBAR_STAGE )
8383 output .set_processbar (self .PROCESSBAR_STAGE , 0 / 3 )
8484 output .put_processbar (self .PROCESSBAR_PYTHON_MANAGER )
85+ # output.put_button(t2t("Stop start"), onclick = self._stop_start)
8586 def set_processbar (x :ProgressTracker , processbar_name :str , info_scope :str ):
8687 last_info = ""
8788 last_progress = 0
@@ -132,7 +133,8 @@ def set_processbar(x:ProgressTracker, processbar_name:str, info_scope:str):
132133
133134 # os.system("color 07")
134135 os .system (f"title { PROGRAM_NAME } Console" )
135- os .system (f'"{ PROGRAM_PYTHON_PATH } " { launching_config ["Main" ]} ' )
136+ os .system (f'start cmd /k "{ PROGRAM_PYTHON_PATH } " { launching_config ["Main" ]} ' )
137+ os .chdir (ROOT_PATH )
136138
137139 except Exception as e :
138140 pt .end_flag = True
@@ -152,6 +154,7 @@ def _load_config_files(self):
152154 def _load (self ):
153155 # output.put_html('<style>@font-face {font-family: "SmileySans-Oblique"; src: url("M:\\ProgramData\\PGPL\\python-git-program-launcher\\toolkit\\SmileySans-Oblique.ttf");}</style>')
154156 # output.put_html('<style>body {font-family: "Arial", sans-serif;}</style>')
157+ self .last_config = ""
155158 self ._load_config_files ()
156159 show_config = self .config_files
157160 with open (os .path .join (ROOT_PATH , 'launcher_config_name.txt' ), 'r' ) as f :
@@ -178,7 +181,10 @@ def _load(self):
178181 # with output.use_scope(self.SCOPE_LOG):
179182 # output.put_markdown(t2t('## Log'))
180183 # output.put_scrollable(output.put_scope(self.SCOPE_LOG_AREA), keep_bottom=True)
181-
184+
185+ def _stop_start (self ):
186+ output .close_popup ()
187+
182188 def logout (self , text : str , color = 'black' ):
183189 if self .loaded :
184190 self .log_list_lock .acquire ()
@@ -256,7 +262,7 @@ def _address_verify(self,x):
256262 return None
257263
258264 def _onclick_add_config (self ):
259- n = input .input (t2t ('config name' ), validate = self ._address_verify )
265+ n = input .input (t2t ('config name' )+ t2t ( "(You can enter the github repository address which already have existing config)" ) , validate = self ._address_verify )
260266 if 'http' not in n :
261267 save_json (CONFIG_TEMPLATE , os .path .join (ROOT_PATH , 'configs' , n + '.json' ))
262268 else :
0 commit comments