@@ -4845,11 +4845,26 @@ def show_homepage(self):
4845
4845
LIBRER_FILE = normpath (__file__ )
4846
4846
LIBRER_DIR = dirname (LIBRER_FILE )
4847
4847
4848
- LIBRER_EXECUTABLE_FILE = normpath (abspath (sys .executable if getattr (sys , 'frozen' , False ) or "__compiled__" in globals () else sys .argv [0 ]))
4848
+ is_frozen = bool (getattr (sys , 'frozen' , False ) or "__compiled__" in globals ())
4849
+
4850
+ LIBRER_EXECUTABLE_FILE = normpath (abspath (sys .executable if is_frozen else sys .argv [0 ]))
4849
4851
LIBRER_EXECUTABLE_DIR = dirname (LIBRER_EXECUTABLE_FILE )
4850
4852
DATA_DIR = sep .join ([LIBRER_EXECUTABLE_DIR ,'data' ])
4851
4853
LOG_DIR = sep .join ([LIBRER_EXECUTABLE_DIR ,'logs' ])
4852
4854
4855
+ if windows :
4856
+ if is_frozen :
4857
+ record_exe = [sep .join ([LIBRER_EXECUTABLE_DIR ,'record.exe' ]) ]
4858
+ else :
4859
+ record_exe = ['python' ,sep .join ([LIBRER_EXECUTABLE_DIR ,'record.py' ]) ]
4860
+ else :
4861
+ if is_frozen :
4862
+ record_exe = [sep .join ([LIBRER_EXECUTABLE_DIR ,'record' ]) ]
4863
+ else :
4864
+ record_exe = ['python3' ,sep .join ([LIBRER_EXECUTABLE_DIR ,'record.py' ]) ]
4865
+
4866
+ #print(f'{is_frozen=}\n{record_exe=}\n')
4867
+
4853
4868
#######################################################################
4854
4869
4855
4870
VER_TIMESTAMP = get_ver_timestamp ()
@@ -4875,7 +4890,7 @@ def show_homepage(self):
4875
4890
else :
4876
4891
l_info ('distro info:\n %s' ,distro_info )
4877
4892
4878
- librer_core = LibrerCore (DATA_DIR ,logging )
4893
+ librer_core = LibrerCore (DATA_DIR ,record_exe , logging )
4879
4894
4880
4895
Gui (getcwd ())
4881
4896
0 commit comments