Skip to content

Commit

Permalink
2.7 EDDLite brought up to EDD 17.0.3
Browse files Browse the repository at this point in the history
Remove unused options and added -defaultjournalfolder
  • Loading branch information
robbyxp1 committed Feb 22, 2024
1 parent fd38e3c commit 6d6f656
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 133 deletions.
2 changes: 1 addition & 1 deletion BaseUtilities
Submodule BaseUtilities updated 155 files
1 change: 0 additions & 1 deletion EDDLite/EDDLite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
<Compile Include="Forms\DraggableFormPos.Designer.cs">
<DependentUpon>DraggableFormPos.cs</DependentUpon>
</Compile>
<Compile Include="Installer.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="EDDLiteForm.resx">
Expand Down
4 changes: 2 additions & 2 deletions EDDLite/EDDLiteController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private void StartWatchersAndReplayLastStoredEntries()
System.Diagnostics.Debug.WriteLine($"{BaseUtils.AppTicks.TickCountLap("MT")} Controller start watcher started");
ResetStats();

string stdfolder = EliteDangerousCore.FrontierFolder.FolderName(); // may be null
string stdfolder = EDDOptions.Instance.DefaultJournalFolder.HasChars() ? EDDOptions.Instance.DefaultJournalFolder : FrontierFolder.FolderName(); // may be null

string[] stdfolders = stdfolder != null ? new string[] { stdfolder} : new string[0];

Expand Down Expand Up @@ -164,7 +164,7 @@ public void Entry(JournalEntry je, bool stored, bool recent)

// see HistoryList::MakeHistoryEntry for a EDD analogue

HistoryEntry he = HistoryEntry.FromJournalEntry(je, hlastprocessed);
HistoryEntry he = HistoryEntry.FromJournalEntry(je, hlastprocessed, null); // we don't accumulate system names->star classes so its nul

he.UnfilteredIndex = (hlastprocessed?.UnfilteredIndex ?? -1) + 1;
he.UpdateMaterialsCommodities( matlist.Process(je, hlastprocessed?.journalEntry, he.Status.TravelState == HistoryEntryStatus.TravelStateType.SRV));
Expand Down
53 changes: 33 additions & 20 deletions EDDLite/EDDLiteForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
using System.Drawing;
using System.Web;
using System.Windows.Forms;
using BaseUtils;

namespace EDDLite
{
Expand Down Expand Up @@ -56,14 +57,25 @@ public EDDLiteForm()

string logpath = EDDOptions.Instance.LogAppDirectory();

BaseUtils.LogClean.DeleteOldLogFiles(logpath, "*.hlog", 2, 256); // Remove hlogs faster
BaseUtils.LogClean.DeleteOldLogFiles(logpath, "*.log", 10, 256);
BaseUtils.FileHelpers.DeleteFiles(logpath, "*.hlog", new TimeSpan(2, 0, 0, 0), 256); // Remove hlogs faster
BaseUtils.FileHelpers.DeleteFiles(logpath, "*.log", new TimeSpan(10, 0, 0, 0), 256);

BaseUtils.AppTicks.TickCountLap("MT", true);

if (!System.Diagnostics.Debugger.IsAttached || EDDOptions.Instance.TraceLog != null)
#if DEBUG
bool releasebuild = false;
#else
bool releasebuild = true;
#endif

if (!System.Diagnostics.Debugger.IsAttached || releasebuild || EDDOptions.Instance.TraceLog != null)
{
BaseUtils.TraceLog.RedirectTrace(logpath, true, EDDOptions.Instance.TraceLog);
TraceLog.RedirectTrace(logpath, EDDOptions.Instance.TraceLog);

TraceLog.LogFileWriterException += ex => // now we can attach the log writing highter into it
{
LogLine($"Log Writer Exception: {ex}");
};
}

if (!System.Diagnostics.Debugger.IsAttached || EDDOptions.Instance.LogExceptions)
Expand Down Expand Up @@ -95,7 +107,8 @@ public EDDLiteForm()

EDDConfig.Instance.Update();

Bodies.Prepopulate(); // new! needed
Stars.Prepopulate(); // we do it this way instead of statically because we don't want them autofilled
Planets.Prepopulate();

BaseUtils.Icons.IconSet.Instance.DontReportMissingErrors = true;

Expand Down Expand Up @@ -174,7 +187,6 @@ public EDDLiteForm()
splitContainerCmdrDataLogs.SplitterDistance(UserDatabase.Instance.GetSettingDouble("CmdrDataLogSplitter", 0.1));
splitContainerDataLogs.SplitterDistance(UserDatabase.Instance.GetSettingDouble("DataLogSplitter", 0.8));
splitContainerNamesButtonsScreenshot.SplitterDistance(UserDatabase.Instance.GetSettingDouble("NamesButtonsScreenshotSplitter", 0.8));
EliteDangerousCore.IGAU.IGAUClass.SoftwareName =
EliteDangerousCore.EDDN.EDDNClass.SoftwareName =
EliteDangerousCore.Inara.InaraClass.SoftwareName =
EliteDangerousCore.EDAstro.EDAstroClass.SoftwareName =
Expand Down Expand Up @@ -273,20 +285,26 @@ protected override void OnShown(EventArgs e)
if (res.Item2.HasChars())
LogLine(string.Format("DLLs failed to load: {0}".T(EDTx.EDDiscoveryForm_DLLF), res.Item2));

//EDDOptions.Instance.CheckRelease = true; // use this to force check for debugging
//EDDOptions.Instance.CheckRelease = true; // use this to force check for debugging

Installer.CheckForNewInstallerAsync((rel) => // in thread
if (EDDOptions.Instance.CheckRelease)
{
BeginInvoke((MethodInvoker)delegate
var curver = System.Reflection.Assembly.GetExecutingAssembly().GetAssemblyVersionString();

BaseUtils.GitHubRelease.CheckForNewInstallerAsync(EDDLite.Properties.Resources.URLGithubDownload, curver,
(rel) => // in thread
{
LogLine(string.Format("New EDDLite installer available: {0}".T(EDTx.EDDiscoveryForm_NI), rel.ReleaseName));
labelInfoBoxTop.Text = "New Release Available!".T(EDTx.EDDiscoveryForm_NRA);
if (ExtendedControls.MessageBoxTheme.Show("New EDDLite Available, please upgrade!", "Warning".T(EDTx.Warning), MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK)
BeginInvoke((MethodInvoker)delegate
{
System.Diagnostics.Process.Start(Properties.Resources.URLProjectReleases);
}
LogLine(string.Format("New EDDLite installer available: {0}".T(EDTx.EDDiscoveryForm_NI), rel.ReleaseName));
labelInfoBoxTop.Text = "New Release Available!".T(EDTx.EDDiscoveryForm_NRA);
if (ExtendedControls.MessageBoxTheme.Show("New EDDLite Available, please upgrade!", "Warning".T(EDTx.Warning), MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK)
{
System.Diagnostics.Process.Start(Properties.Resources.URLProjectReleases);
}
});
});
});
}

controller.Start(a => Invoke(a)); // synchronous, this means each controller action executes sync with the UI, so when controller is stopped, all controller actions stop

Expand Down Expand Up @@ -496,11 +514,6 @@ public void RefreshFinished(HistoryEntry currenthe)
EDSMJournalSync.SendEDSMEvents(LogLine, new List<HistoryEntry> { he }, he.journalEntry.GameVersion, he.journalEntry.Build);
}

if (he.Commander.SyncToIGAU)
{
EliteDangerousCore.IGAU.IGAUSync.NewEvent(LogLine, he);
}

if (EDCommander.Current.SyncToEDAstro)
{
EliteDangerousCore.EDAstro.EDAstroSync.SendEDAstroEvents(new List<HistoryEntry>() { he });
Expand Down
38 changes: 7 additions & 31 deletions EDDLite/EDDOptions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright © 2018-2022 EDDiscovery development team
* Copyright © 2018-2024 EDDiscovery development team
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -43,10 +43,6 @@ private void ProcessOption(string optname, BaseUtils.CommandArgs ca, bool toeol)
{
UserDatabasePath = toeol ? ca.Rest() : ca.NextEmpty();
}
else if (optname == "-cmdr" || optname == "-commander")
{
Commander = toeol ? ca.Rest() : ca.NextEmpty();
}
else if (optname == "-systemsdbpath")
{
SystemDatabasePath = toeol ? ca.Rest() : ca.NextEmpty();
Expand All @@ -55,21 +51,9 @@ private void ProcessOption(string optname, BaseUtils.CommandArgs ca, bool toeol)
{
TraceLog = toeol ? ca.Rest() : ca.NextEmpty();
}
else if (optname == "-fontsize")
{
FontSize = (toeol ? ca.Rest() : ca.NextEmpty()).InvariantParseFloat(0);
}
else if (optname == "-font")
{
Font = toeol ? ca.Rest() : ca.NextEmpty();
}
else if (optname == "-language")
{
SelectLanguage = toeol ? ca.Rest() : ca.NextEmpty();
}
else if (optname == "-outputeventhelp")
else if (optname == "-defaultjournalfolder")
{
OutputEventHelp = toeol ? ca.Rest() : ca.NextEmpty();
DefaultJournalFolder = toeol ? ca.Rest() : ca.NextEmpty();
}
else if (optname.StartsWith("-"))
{
Expand All @@ -79,7 +63,6 @@ private void ProcessOption(string optname, BaseUtils.CommandArgs ca, bool toeol)
{
case "norepositionwindow": NoWindowReposition = true; break;
case "nrw": NoWindowReposition = true; break;
case "safemode": SafeMode = true; break;
case "portable": StoreDataInProgramDirectory = true; break;
case "logexceptions": LogExceptions = true; break;
case "checkrelease": CheckRelease = true; break;
Expand All @@ -97,14 +80,12 @@ private void ProcessOption(string optname, BaseUtils.CommandArgs ca, bool toeol)
case "forcebeta": // use to move logs to a beta commander for testing
ForceBetaOnCommander = true;
break;
case "resetlanguage": ResetLanguage = true; break;
case "tempdirindatadir": TempDirInDataDir = true; break;
case "notempdirindatadir": TempDirInDataDir = false; break;
case "lowpriority": LowPriority = true; break;
case "nolowpriority": LowPriority = false; break;
case "backgroundpriority": BackgroundPriority = true; break;
case "nobackgroundpriority": BackgroundPriority = false; break;
case "forcetls12": ForceTLS12 = true; break;
case "disabletimedisplay": DisableTimeDisplay = true; break;
default:
System.Diagnostics.Debug.WriteLine($"Unrecognized option -{opt}");
Expand Down Expand Up @@ -146,23 +127,15 @@ public static EDDOptions Instance
public bool NoWindowReposition { get; set; }
public string TraceLog { get; private set; } // null = auto file, or fixed name
public bool LogExceptions { get; private set; }
public string OptionsFile { get; private set; }
public bool DisableBetaCommanderCheck { get; private set; }
public bool ForceBetaOnCommander { get; private set; }
public bool CheckRelease { get; set; }
public bool ResetLanguage { get; set; }
public string SelectLanguage { get; set; }
public bool SafeMode { get; set; }
public bool DisableMerge { get; set; }
public float FontSize { get; set; } // override font size, 0 if not
public string Font { get; set; } // override font, null if not
public string Commander { get; set; } // set commander, null if not
public bool TempDirInDataDir { get; set; }
public bool LowPriority { get; set; }
public bool BackgroundPriority { get; set; }
public bool ForceTLS12 { get; set; }
public bool DisableTimeDisplay { get; set; }
public string OutputEventHelp { get; set; }
public string DefaultJournalFolder { get; private set; } // default is null, use computed value

public string SubAppDirectory(string subfolder) // ensures its there.. name without \ slashes
{
Expand All @@ -176,6 +149,9 @@ public string SubAppDirectory(string subfolder) // ensures its there.. name
public string DLLAppDirectory() { return SubAppDirectory("DLL"); }
public string TranslatorDirectory() { return translationfolder; }
public int TranslatorDirectoryIncludeSearchUpDepth { get; private set; }

public string ScanCachePath => null; // we don't implement scan cache saving

static public string ExeDirectory() { return System.AppDomain.CurrentDomain.BaseDirectory; }
public string[] TranslatorFolders() { return new string[] { TranslatorDirectory(), ExeDirectory() }; }

Expand Down
74 changes: 0 additions & 74 deletions EDDLite/Installer.cs

This file was deleted.

4 changes: 2 additions & 2 deletions EDDLite/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Robby & EDDLite Team")]
[assembly: AssemblyProduct("EDDLite")]
[assembly: AssemblyCopyright("Copyright © Robby and the EDD Team 2015-2023")]
[assembly: AssemblyCopyright("Copyright © Robby and the EDD Team 2015-2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -31,4 +31,4 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below :
[assembly: AssemblyVersion("2.6.0.0")]
[assembly: AssemblyVersion("2.7.0.0")]
2 changes: 1 addition & 1 deletion EliteDangerousCore
2 changes: 1 addition & 1 deletion ExtendedControls
Submodule ExtendedControls updated 66 files
+1 −1 BaseUtilities
+18 −18 ExtendedControls/Controls/ComboBox.cs
+2 −1 ExtendedControls/Controls/CompositeAutoScaleButton.cs
+43 −0 ExtendedControls/Controls/FlowLayoutPanel.cs
+1 −1 ExtendedControls/Controls/ImageControlScroll.cs
+56 −1 ExtendedControls/Controls/Label.cs
+26 −37 ExtendedControls/Controls/ListBox.cs
+91 −22 ExtendedControls/Controls/NumberBox.cs
+4 −1 ExtendedControls/Controls/PanelDataGridViewScroll.cs
+2 −5 ExtendedControls/Controls/PanelDropDown.cs
+5 −5 ExtendedControls/Controls/PanelNoTheme.cs
+46 −24 ExtendedControls/Controls/PanelRollUp.cs
+99 −89 ExtendedControls/Controls/RichTextBox.cs
+2 −4 ExtendedControls/Controls/TabStrip.cs
+27 −16 ExtendedControls/Controls/TextBox.cs
+59 −16 ExtendedControls/Controls/TextBoxAutoComplete.cs
+30 −5 ExtendedControls/ExtendedControls.csproj
+24 −4 ExtendedControls/Forms/CheckedIconListBoxForm.cs
+123 −22 ExtendedControls/Forms/CheckedIconListBoxFormGroup.cs
+802 −356 ExtendedControls/Forms/ConfigurableForm.cs
+25 −10 ExtendedControls/Forms/DraggableForm.cs
+121 −0 ExtendedControls/Forms/ExtButtonWithCheckedIconListBoxGroup.cs
+7 −9 ExtendedControls/Forms/InfoForm.cs
+75 −70 ExtendedControls/Forms/KeyForm.Designer.cs
+47 −46 ExtendedControls/Forms/KeyForm.cs
+2 −2 ExtendedControls/Forms/KeyForm.resx
+6 −8 ExtendedControls/Forms/ListBoxForm.cs
+46 −0 ExtendedControls/Forms/Terminal.Designer.cs
+513 −0 ExtendedControls/Forms/Terminal.cs
+120 −0 ExtendedControls/Forms/Terminal.resx
+2 −0 ExtendedControls/Forms/TranslationIDs.cs
+551 −0 ExtendedControls/Forms/VT100.cs
+10 −0 ExtendedControls/Properties/Resources.Designer.cs
+3 −0 ExtendedControls/Properties/Resources.resx
+ ExtendedControls/Resources/Disabled.png
+187 −102 ExtendedControls/Themes/Theme.cs
+1 −1 ExtendedControls/packages.config
+10 −3 ExtendedForms/AudioForms/SpeechConfigure.Designer.cs
+7 −1 ExtendedForms/AudioForms/WaveConfigureDialog.Designer.cs
+5 −4 ExtendedForms/ConditionForms/ConditionFilterUC.cs
+67 −4 TestExtendedControls/TestAutoComplete.Designer.cs
+16 −13 TestExtendedControls/TestAutoComplete.cs
+14 −2 TestExtendedControls/TestCheckedIconListBoxForm.Designer.cs
+27 −12 TestExtendedControls/TestCheckedIconListBoxForm.cs
+5 −1 TestExtendedControls/TestExtendedForms.cs
+556 −0 TestExtendedControls/TestFlowBox.Designer.cs
+42 −0 TestExtendedControls/TestFlowBox.cs
+123 −0 TestExtendedControls/TestFlowBox.resx
+36 −0 TestExtendedControls/TestForms.csproj
+129 −0 TestExtendedControls/TestLabel.Designer.cs
+66 −0 TestExtendedControls/TestLabel.cs
+123 −0 TestExtendedControls/TestLabel.resx
+30 −0 TestExtendedControls/TestMisc.Designer.cs
+124 −0 TestExtendedControls/TestProgressBar.Designer.cs
+57 −0 TestExtendedControls/TestProgressBar.cs
+123 −0 TestExtendedControls/TestProgressBar.resx
+28 −6 TestExtendedControls/TestRollUpPanel.Designer.cs
+5 −0 TestExtendedControls/TestRollUpPanel.cs
+664 −0 TestExtendedControls/TestTerminal2.Designer.cs
+299 −0 TestExtendedControls/TestTerminal2.cs
+120 −0 TestExtendedControls/TestTerminal2.resx
+37 −27 TestExtendedControls/TestTextBoxes.Designer.cs
+17 −3 TestExtendedControls/TestTextBoxes.cs
+26 −0 TestExtendedControls/TestVariousForms.Designer.cs
+77 −4 TestExtendedControls/TestVariousForms.cs
+3 −0 fixpackages.bat

0 comments on commit 6d6f656

Please sign in to comment.