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

Commit

Permalink
Changed file folders from LocalAppdata to Current installacion folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
Uriei committed Jul 4, 2018
1 parent 1a92fb2 commit 32d2b46
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions EDPlanetBearing.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
from openal.loaders import load_wav_file

def AddLogEntry(LogEntry): #Adds an entry to the log file.
global EDPBAppdata
global EDPBFolder
global DebugMode
try:
if DebugMode:
LogFile = EDPBAppdata + str(datetime.datetime.now().year) + "-" + str(datetime.datetime.now().month) + "-" + str(datetime.datetime.now().day) + ".txt"
LogFile = EDPBFolder + "EDPB_log_" + str(datetime.datetime.now().year) + "-" + str(datetime.datetime.now().month) + "-" + str(datetime.datetime.now().day) + ".txt"
EntryLog = str(datetime.datetime.now().hour) + ":" + str(datetime.datetime.now().minute) + ":" + str(datetime.datetime.now().second) + "." + str(datetime.datetime.now().microsecond) + " - " + str(LogEntry)
with open(LogFile,"a") as f:
f.write(EntryLog + "\n")
Expand Down Expand Up @@ -484,7 +484,6 @@ def CreateGUI(root):

def GetShellFolders():
global eliteJournalPath
global EDPBAppdata
global StatusFile
try:
key = winreg.OpenKey(
Expand All @@ -495,7 +494,6 @@ def GetShellFolders():

eliteJournalPath = JournalDir + "\\Frontier Developments\\Elite Dangerous\\"
LAppdatDdir, type = winreg.QueryValueEx(key, "Local AppData")
EDPBAppdata = LAppdatDdir + "\\EDPlanetBearing\\"
StatusFile = eliteJournalPath + "Status.json"
except Exception as e:
print("E.Getting Journal Path" + str(e))
Expand Down Expand Up @@ -919,10 +917,11 @@ def CalcAngDesc(): #Angle of descent
DebugMode = False #Temporary variables for testing

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

#Temporary variables for testing
EDPBLock = EDPBAppdata + "Session.lock"
EDPBConfigFile = EDPBAppdata + "Config.json"
EDPBLock = EDPBFolder + "Session.lock"
EDPBConfigFile = EDPBFolder + "Config.json"
InfoHudLevel = 0
AudioMode = 0
data_dir = 'GFX'
Expand Down

0 comments on commit 32d2b46

Please sign in to comment.