mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-18 14:41:21 +08:00
Add executable directory path
This commit is contained in:
parent
0daa3a8f57
commit
b386af4121
@ -1,5 +1,9 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: AssemblyTitle("Wox.Infrastructure")]
|
||||
[assembly: Guid("aee57a31-29e5-4f03-a41f-7917910fe90f")]
|
||||
[assembly: InternalsVisibleTo("Wox")]
|
||||
[assembly: InternalsVisibleTo("Wox.Core")]
|
||||
[assembly: InternalsVisibleTo("Wox.Test")]
|
@ -63,6 +63,7 @@
|
||||
<Compile Include="Hotkey\InterceptKeys.cs" />
|
||||
<Compile Include="Hotkey\KeyEvent.cs" />
|
||||
<Compile Include="Logger\Log.cs" />
|
||||
<Compile Include="WoxDirectroy.cs" />
|
||||
<Compile Include="Stopwatch.cs" />
|
||||
<Compile Include="Storage\BinaryStorage.cs" />
|
||||
<Compile Include="Storage\IStorage.cs" />
|
||||
|
13
Wox.Infrastructure/WoxDirectroy.cs
Normal file
13
Wox.Infrastructure/WoxDirectroy.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Wox.Infrastructure
|
||||
{
|
||||
public static class WoxDirectroy
|
||||
{
|
||||
public static string Executable { get; internal set; }
|
||||
}
|
||||
}
|
@ -1,14 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using Wox.CommandArgs;
|
||||
using Wox.Core.Plugin;
|
||||
using Wox.Helper;
|
||||
using Wox.Infrastructure;
|
||||
using Stopwatch = Wox.Infrastructure.Stopwatch;
|
||||
|
||||
|
||||
namespace Wox
|
||||
{
|
||||
public partial class App : Application, ISingleInstanceApp
|
||||
@ -33,6 +37,7 @@ namespace Wox
|
||||
Stopwatch.Debug("Startup Time", () =>
|
||||
{
|
||||
base.OnStartup(e);
|
||||
WoxDirectroy.Executable = Directory.GetParent(Assembly.GetExecutingAssembly().Location).ToString();
|
||||
RegisterUnhandledException();
|
||||
ThreadPool.QueueUserWorkItem(o => { ImageLoader.ImageLoader.PreloadImages(); });
|
||||
Window = new MainWindow();
|
||||
|
Loading…
Reference in New Issue
Block a user