mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-06-07 09:28:03 +08:00
Update the installer
This commit is contained in:
parent
890397bae7
commit
ba0bda6aa6
@ -29,11 +29,13 @@ Name: english; MessagesFile: compiler:Default.isl
|
||||
Type: files; Name: "{commonstartup}\{#MyAppName}.lnk"
|
||||
|
||||
[Tasks]
|
||||
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
|
||||
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons};
|
||||
Name: startupfolder; Description: Startup with Windows;
|
||||
|
||||
[Files]
|
||||
Source: {#MyAppPath}\*; DestDir: {app}; Flags: ignoreversion recursesubdirs
|
||||
Source: {#MyAppPath}\*; Excludes: Plugins\*,Themes\*; DestDir: {app}; Flags: ignoreversion recursesubdirs
|
||||
Source: {#MyAppPath}\Plugins\*; DestDir: {%USERPROFILE}\.Wox\Plugins; Flags: ignoreversion recursesubdirs
|
||||
Source: {#MyAppPath}\Themes\*; DestDir: {%USERPROFILE}\.Wox\Themes; Flags: ignoreversion recursesubdirs
|
||||
|
||||
[Icons]
|
||||
Name: {group}\{#MyAppName}; Filename: {app}\{#MyAppExeName}
|
||||
@ -42,4 +44,10 @@ Name: {userdesktop}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; Tasks: deskto
|
||||
Name: {userstartup}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; Tasks: startupfolder
|
||||
|
||||
[Run]
|
||||
Filename: {app}\{#MyAppExeName}; Description: {cm:LaunchProgram,{#MyAppName}}; Flags: nowait postinstall skipifsilent
|
||||
Filename: {app}\{#MyAppExeName}; Description: {cm:LaunchProgram,{#MyAppName}}; Flags: nowait postinstall skipifsilent unchecked
|
||||
|
||||
[UninstallDelete]
|
||||
Type: filesandordirs; Name: "{%USERPROFILE}\.Wox"
|
||||
|
||||
[UninstallRun]
|
||||
Filename: {sys}\taskkill.exe; Parameters: "/f /im Wox.exe"; Flags: skipifdoesntexist runhidden
|
||||
|
@ -46,9 +46,6 @@ namespace Wox.Core.Plugin
|
||||
static PluginManager()
|
||||
{
|
||||
pluginDirectories.Add(DefaultPluginDirectory);
|
||||
pluginDirectories.Add(
|
||||
Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Plugins"));
|
||||
|
||||
MakesurePluginDirectoriesExist();
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
What does Wox.Core do?
|
||||
=====
|
||||
|
||||
* Handle Query
|
||||
* Loading Plugins (including system plugin and user plugin)
|
@ -69,7 +69,7 @@
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="README.txt" />
|
||||
<None Include="README.md" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wox.Infrastructure\Wox.Infrastructure.csproj">
|
||||
|
@ -10,18 +10,35 @@ using Newtonsoft.Json;
|
||||
namespace Wox.Infrastructure.Storage
|
||||
{
|
||||
[Serializable]
|
||||
public abstract class BaseStorage<T> : IStorage where T : class,IStorage,new()
|
||||
public abstract class BaseStorage<T> : IStorage where T : class,IStorage, new()
|
||||
{
|
||||
private readonly string configFolder = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "Config");
|
||||
private string configFolder;
|
||||
|
||||
private string ConfigFolder
|
||||
{
|
||||
get
|
||||
{
|
||||
if (string.IsNullOrEmpty(configFolder))
|
||||
{
|
||||
string userProfilePath = Environment.GetEnvironmentVariable("USERPROFILE");
|
||||
if (userProfilePath == null)
|
||||
{
|
||||
throw new ArgumentException("Environment variable USERPROFILE is empty");
|
||||
}
|
||||
configFolder = Path.Combine(Path.Combine(userProfilePath, ".Wox"), "Config");
|
||||
}
|
||||
return configFolder;
|
||||
}
|
||||
}
|
||||
|
||||
protected string ConfigPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return Path.Combine(configFolder, ConfigName + FileSuffix);
|
||||
return Path.Combine(ConfigFolder, ConfigName + FileSuffix);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected abstract string FileSuffix { get; }
|
||||
|
||||
protected abstract string ConfigName { get; }
|
||||
@ -72,9 +89,9 @@ namespace Wox.Infrastructure.Storage
|
||||
{
|
||||
if (!File.Exists(ConfigPath))
|
||||
{
|
||||
if (!Directory.Exists(configFolder))
|
||||
if (!Directory.Exists(ConfigFolder))
|
||||
{
|
||||
Directory.CreateDirectory(configFolder);
|
||||
Directory.CreateDirectory(ConfigFolder);
|
||||
}
|
||||
File.Create(ConfigPath).Close();
|
||||
}
|
||||
|
5
Wox.Plugin/README.md
Normal file
5
Wox.Plugin/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
What does Wox.Plugin do?
|
||||
====
|
||||
|
||||
* Define base objects and interfaces for plugins
|
||||
* Plugin Author who making C# plugin should reference this DLL via nuget
|
@ -59,6 +59,9 @@
|
||||
<Compile Include="Result.cs" />
|
||||
<Compile Include="ActionContext.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="README.md" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
@ -8,7 +8,13 @@
|
||||
</appSettings>
|
||||
<log4net>
|
||||
<appender name="LogFileAppender" type="log4net.Appender.FileAppender">
|
||||
<file value="log.txt"/>
|
||||
<file type="log4net.Util.PatternString">
|
||||
<converter>
|
||||
<name value="WoxLogPathConverter" />
|
||||
<type value="Wox.Helper.WoxLogPathConverter,Wox" />
|
||||
</converter>
|
||||
<conversionPattern value="%WoxLogPathConverter{log}\\log.txt" />
|
||||
</file>
|
||||
<appendToFile value="true"/>
|
||||
<rollingStyle value="Date"/>
|
||||
<datePattern value="yyyyMMdd-HH:mm:ss"/>
|
||||
|
17
Wox/Helper/WoxLogPathConverter.cs
Normal file
17
Wox/Helper/WoxLogPathConverter.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Wox.Helper
|
||||
{
|
||||
public class WoxLogPathConverter : log4net.Util.PatternConverter
|
||||
{
|
||||
protected override void Convert(TextWriter writer, object state)
|
||||
{
|
||||
string userProfilePath = Environment.GetEnvironmentVariable("USERPROFILE");
|
||||
writer.Write(Path.Combine(userProfilePath, ".Wox"));
|
||||
}
|
||||
}
|
||||
}
|
@ -37,6 +37,7 @@ using Path = System.IO.Path;
|
||||
using Rectangle = System.Drawing.Rectangle;
|
||||
using TextBox = System.Windows.Controls.TextBox;
|
||||
using ToolTip = System.Windows.Controls.ToolTip;
|
||||
using Wox.Infrastructure.Logger;
|
||||
|
||||
namespace Wox
|
||||
{
|
||||
|
@ -18,9 +18,6 @@ namespace Wox
|
||||
|
||||
static ThemeManager()
|
||||
{
|
||||
themeDirectories.Add(
|
||||
Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Themes"));
|
||||
|
||||
string userProfilePath = Environment.GetEnvironmentVariable("USERPROFILE");
|
||||
if (userProfilePath != null)
|
||||
{
|
||||
|
@ -104,6 +104,7 @@
|
||||
<Reference Include="WPFToolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Helper\WoxLogPathConverter.cs" />
|
||||
<Compile Include="ImageLoader\ImageCacheStroage.cs" />
|
||||
<Compile Include="Storage\UserSelectedRecordStorage.cs" />
|
||||
<Compile Include="ThemeManager.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user