Add executable directory path

This commit is contained in:
bao-qian 2016-01-06 22:18:27 +00:00
parent 0daa3a8f57
commit b386af4121
4 changed files with 24 additions and 1 deletions

View File

@ -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: Guid("aee57a31-29e5-4f03-a41f-7917910fe90f")]
[assembly: InternalsVisibleTo("Wox")]
[assembly: InternalsVisibleTo("Wox.Core")]
[assembly: InternalsVisibleTo("Wox.Test")]

View File

@ -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" />

View 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; }
}
}

View File

@ -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();