Skip to content

Commit

Permalink
Remove debug check, add dupe check instead
Browse files Browse the repository at this point in the history
  • Loading branch information
dremin committed Feb 25, 2021
1 parent 873df5e commit 996addf
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
4 changes: 0 additions & 4 deletions RetroBar/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ private ShellManager SetupManagedShell()
ShellLogger.Severity = LogSeverity.Debug;
ShellLogger.Attach(new ConsoleLog());

FileLog fileLog = new FileLog(@"c:\users\johns\desktop\log.txt");
fileLog.Open();
ShellLogger.Attach(fileLog);

ShellConfig config = ShellManager.DefaultShellConfig;

config.AutoStartTasksService = false;
Expand Down
1 change: 0 additions & 1 deletion RetroBar/Properties/PublishProfiles/ReleaseProfile.pubxml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PublishSingleFile>True</PublishSingleFile>
<PublishReadyToRun>True</PublishReadyToRun>
<PublishTrimmed>False</PublishTrimmed>
<DefineConstants></DefineConstants>
</PropertyGroup>
</Project>
10 changes: 2 additions & 8 deletions RetroBar/Utilities/ThemeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.IO;
using System.Linq;
using System.Windows;
using ManagedShell.Common.Logging;

namespace RetroBar.Utilities
{
Expand Down Expand Up @@ -72,22 +71,17 @@ public List<string> GetThemes()

// Because RetroBar is published as a single-file app, it gets extracted to a temp directory, so custom themes won't be there.
// Get the executable path to find the custom themes directory when not a debug build.
ShellLogger.Error("BeforeDebugCheck");
#if !DEBUG
ShellLogger.Error("AfterDebugCheck");
string customThemeDir = Path.Combine(Path.GetDirectoryName(ExePath.GetExecutablePath()), THEME_FOLDER);
ShellLogger.Error(customThemeDir);

if (Directory.Exists(customThemeDir))
{
foreach (string subStr in Directory.GetFiles(customThemeDir)
.Where(s => Path.GetExtension(s).Contains(THEME_EXT)))
.Where(s => Path.GetExtension(s).Contains(THEME_EXT) && !themes.Contains(Path.GetFileNameWithoutExtension(s))))
{
themes.Add(Path.GetFileNameWithoutExtension(subStr));
}
}
#endif


return themes;
}

Expand Down

0 comments on commit 996addf

Please sign in to comment.