mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
Update the installer
This commit is contained in:
@@ -29,11 +29,13 @@ Name: english; MessagesFile: compiler:Default.isl
|
|||||||
Type: files; Name: "{commonstartup}\{#MyAppName}.lnk"
|
Type: files; Name: "{commonstartup}\{#MyAppName}.lnk"
|
||||||
|
|
||||||
[Tasks]
|
[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;
|
Name: startupfolder; Description: Startup with Windows;
|
||||||
|
|
||||||
[Files]
|
[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]
|
[Icons]
|
||||||
Name: {group}\{#MyAppName}; Filename: {app}\{#MyAppExeName}
|
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
|
Name: {userstartup}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; Tasks: startupfolder
|
||||||
|
|
||||||
[Run]
|
[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()
|
static PluginManager()
|
||||||
{
|
{
|
||||||
pluginDirectories.Add(DefaultPluginDirectory);
|
pluginDirectories.Add(DefaultPluginDirectory);
|
||||||
pluginDirectories.Add(
|
|
||||||
Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Plugins"));
|
|
||||||
|
|
||||||
MakesurePluginDirectoriesExist();
|
MakesurePluginDirectoriesExist();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
What does Wox.Core do?
|
What does Wox.Core do?
|
||||||
|
=====
|
||||||
|
|
||||||
* Handle Query
|
* Handle Query
|
||||||
* Loading Plugins (including system plugin and user plugin)
|
* Loading Plugins (including system plugin and user plugin)
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="README.txt" />
|
<None Include="README.md" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Wox.Infrastructure\Wox.Infrastructure.csproj">
|
<ProjectReference Include="..\Wox.Infrastructure\Wox.Infrastructure.csproj">
|
||||||
|
|||||||
@@ -10,18 +10,35 @@ using Newtonsoft.Json;
|
|||||||
namespace Wox.Infrastructure.Storage
|
namespace Wox.Infrastructure.Storage
|
||||||
{
|
{
|
||||||
[Serializable]
|
[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
|
protected string ConfigPath
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return Path.Combine(configFolder, ConfigName + FileSuffix);
|
return Path.Combine(ConfigFolder, ConfigName + FileSuffix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract string FileSuffix { get; }
|
protected abstract string FileSuffix { get; }
|
||||||
|
|
||||||
protected abstract string ConfigName { get; }
|
protected abstract string ConfigName { get; }
|
||||||
@@ -72,9 +89,9 @@ namespace Wox.Infrastructure.Storage
|
|||||||
{
|
{
|
||||||
if (!File.Exists(ConfigPath))
|
if (!File.Exists(ConfigPath))
|
||||||
{
|
{
|
||||||
if (!Directory.Exists(configFolder))
|
if (!Directory.Exists(ConfigFolder))
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(configFolder);
|
Directory.CreateDirectory(ConfigFolder);
|
||||||
}
|
}
|
||||||
File.Create(ConfigPath).Close();
|
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="Result.cs" />
|
||||||
<Compile Include="ActionContext.cs" />
|
<Compile Include="ActionContext.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="README.md" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- 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.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
|||||||
@@ -8,7 +8,13 @@
|
|||||||
</appSettings>
|
</appSettings>
|
||||||
<log4net>
|
<log4net>
|
||||||
<appender name="LogFileAppender" type="log4net.Appender.FileAppender">
|
<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"/>
|
<appendToFile value="true"/>
|
||||||
<rollingStyle value="Date"/>
|
<rollingStyle value="Date"/>
|
||||||
<datePattern value="yyyyMMdd-HH:mm:ss"/>
|
<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 Rectangle = System.Drawing.Rectangle;
|
||||||
using TextBox = System.Windows.Controls.TextBox;
|
using TextBox = System.Windows.Controls.TextBox;
|
||||||
using ToolTip = System.Windows.Controls.ToolTip;
|
using ToolTip = System.Windows.Controls.ToolTip;
|
||||||
|
using Wox.Infrastructure.Logger;
|
||||||
|
|
||||||
namespace Wox
|
namespace Wox
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,9 +18,6 @@ namespace Wox
|
|||||||
|
|
||||||
static ThemeManager()
|
static ThemeManager()
|
||||||
{
|
{
|
||||||
themeDirectories.Add(
|
|
||||||
Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Themes"));
|
|
||||||
|
|
||||||
string userProfilePath = Environment.GetEnvironmentVariable("USERPROFILE");
|
string userProfilePath = Environment.GetEnvironmentVariable("USERPROFILE");
|
||||||
if (userProfilePath != null)
|
if (userProfilePath != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -104,6 +104,7 @@
|
|||||||
<Reference Include="WPFToolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
<Reference Include="WPFToolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="Helper\WoxLogPathConverter.cs" />
|
||||||
<Compile Include="ImageLoader\ImageCacheStroage.cs" />
|
<Compile Include="ImageLoader\ImageCacheStroage.cs" />
|
||||||
<Compile Include="Storage\UserSelectedRecordStorage.cs" />
|
<Compile Include="Storage\UserSelectedRecordStorage.cs" />
|
||||||
<Compile Include="ThemeManager.cs" />
|
<Compile Include="ThemeManager.cs" />
|
||||||
|
|||||||
Reference in New Issue
Block a user