@@ -232,7 +232,7 @@ def main():
232232 log .info ("Developer Scratchpad mode enabled" )
233233 if not globalVars .appArgs .minimal and config .conf ["general" ]["playStartAndExitSounds" ]:
234234 try :
235- nvwave .playWaveFile ("waves\\ start.wav" )
235+ nvwave .playWaveFile (os . path . join ( globalVars . appDir , "waves" , " start.wav") )
236236 except :
237237 pass
238238 logHandler .setLogLevelFromConfig ()
@@ -298,7 +298,10 @@ def onEndSession(evt):
298298 speech .cancelSpeech ()
299299 if not globalVars .appArgs .minimal and config .conf ["general" ]["playStartAndExitSounds" ]:
300300 try :
301- nvwave .playWaveFile ("waves\\ exit.wav" ,asynchronous = False )
301+ nvwave .playWaveFile (
302+ os .path .join (globalVars .appDir , "waves" , "exit.wav" ),
303+ asynchronous = False
304+ )
302305 except :
303306 pass
304307 log .info ("Windows session ending" )
@@ -410,7 +413,7 @@ def handlePowerStatusChange(self):
410413 if not wxLang and '_' in lang :
411414 wxLang = locale .FindLanguageInfo (lang .split ('_' )[0 ])
412415 if hasattr (sys ,'frozen' ):
413- locale .AddCatalogLookupPathPrefix (os .path .join (os . getcwd (), "locale" ))
416+ locale .AddCatalogLookupPathPrefix (os .path .join (globalVars . appDir , "locale" ))
414417 # #8064: Wx might know the language, but may not actually contain a translation database for that language.
415418 # If we try to initialize this language, wx will show a warning dialog.
416419 # #9089: some languages (such as Aragonese) do not have language info, causing language getter to fail.
@@ -591,7 +594,10 @@ def run(self):
591594
592595 if not globalVars .appArgs .minimal and config .conf ["general" ]["playStartAndExitSounds" ]:
593596 try :
594- nvwave .playWaveFile ("waves\\ exit.wav" ,asynchronous = False )
597+ nvwave .playWaveFile (
598+ os .path .join (globalVars .appDir , "waves" , "exit.wav" ),
599+ asynchronous = False
600+ )
595601 except :
596602 pass
597603 # #5189: Destroy the message window as late as possible
0 commit comments