Files
PowerToys/src/modules/launcher/Wox.Infrastructure/Wox.cs
Niels Laute 5f0e8d3d8e [PowerToys Run] Updated (plugin) icons with MDL2 (#4149)
* Updated (plugin) icons with MDL2

* Image wasn't updating

* Based on feedback, updated app icon and windowwalker icon

* Updated app icon

* Updated Window Walker icon

* Change build action / Copy to output directory to None and Do Not Copy - like it was originally

* Fix

* Fix

* Resized images

* Added theme awereness based on somil55s PR

* Added theming to Shell and WindowWalker

* Revert "Added theming to Shell and WindowWalker"

This reverts commit f492c4efdb.

* Revert "Added theme awereness based on somil55s PR"

This reverts commit 8edd3226be.

* Typo fix

* Added new theming support for the new Calculator, Shell and WindowWalker icons

* Added Unit test reference back in
2020-07-13 22:59:19 -07:00

45 lines
2.0 KiB
C#

using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Wox.Infrastructure
{
public static class Constant
{
public const string ExeFileName = "PowerLauncher";
public const string ModuleLocation = "Microsoft\\PowerToys\\PowerToys Run";
public const string Plugins = "Plugins";
private static readonly Assembly Assembly = Assembly.GetExecutingAssembly();
public static readonly string ProgramDirectory = Directory.GetParent(Assembly.Location.NonNull()).ToString();
public static readonly string ExecutablePath = Path.Combine(ProgramDirectory, ExeFileName + ".exe");
public static bool IsPortableMode;
public const string PortableFolderName = "UserData";
public static string PortableDataPath = Path.Combine(ProgramDirectory, PortableFolderName);
public static string DetermineDataDirectory()
{
if (Directory.Exists(PortableDataPath))
{
IsPortableMode = true;
return PortableDataPath;
}
else
{
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), ModuleLocation);
}
}
public static readonly string DataDirectory = DetermineDataDirectory();
public static readonly string PluginsDirectory = Path.Combine(DataDirectory, Plugins);
public static readonly string PreinstalledDirectory = Path.Combine(ProgramDirectory, Plugins);
public const string Issue = "https://github.com/microsoft/PowerToys/issues/new";
public static readonly string Version = FileVersionInfo.GetVersionInfo(Assembly.Location.NonNull()).ProductVersion;
public static readonly int ThumbnailSize = 64;
public static readonly string DefaultIcon = Path.Combine(ProgramDirectory, "Images", "app.dark.png");
public static readonly string ErrorIcon = Path.Combine(ProgramDirectory, "Images", "app_error.dark.png");
}
}