Skip to content
This repository has been archived by the owner on Nov 15, 2019. It is now read-only.

Commit

Permalink
Made extra files non-esential.
Browse files Browse the repository at this point in the history
  • Loading branch information
Uriei committed Jul 9, 2018
1 parent 5c4e6b7 commit 9719ae4
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions EDPlanetBearing.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,18 @@ def callback(ClearLock=True,ClearConfig=True): #Clean files and close the app.
exit()

def resource_path(relative):
if hasattr(sys, "_MEIPASS"):
return os.path.join(sys._MEIPASS, relative)
return os.path.join(relative)
try:
if os.path.exists(relative):
return os.path.join(relative)
elif hasattr(sys, "_MEIPASS"):
return os.path.join(sys._MEIPASS, relative)
else:
return os.path.join(relative)
except:
print("resource_path exist check fail")
if hasattr(sys, "_MEIPASS"):
return os.path.join(sys._MEIPASS, relative)
return os.path.join(relative)

def SingleInstance(FirstRun=False):
global EDPBLock
Expand Down Expand Up @@ -512,7 +521,7 @@ def Start():
global PingPosZ
global PingPitch
global PingDelayMult
sound_beep = "beep.wav" #Default sound file
sound_beep = resource_path("beep.wav")
PingDelay = 1000
PingPosX = 0.0
PingPosZ = 0.0
Expand Down Expand Up @@ -914,11 +923,11 @@ def CalcAngDesc(): #Angle of descent
if __name__ == "__main__":
root = Tk()
style = ttk.Style()
global EDPBFolder

DebugMode = False #Temporary variables for testing

GetShellFolders()
global EDPBFolder
EDPBFolder = os.path.dirname(os.path.realpath(__file__))+"\\"

EDPBLock = EDPBFolder + "Session.lock"
Expand Down

0 comments on commit 9719ae4

Please sign in to comment.