mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-05 04:39:08 +08:00
Add Auto Updater [WIP] & remove UAC project
This commit is contained in:
parent
b49209a0d9
commit
5e3d29df4c
18
Deploy/NAppUpdate/FeedBuilder.config
Normal file
18
Deploy/NAppUpdate/FeedBuilder.config
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Settings>
|
||||
<SCOTT-PC>
|
||||
<IgnoreVsHosting>True</IgnoreVsHosting>
|
||||
<CompareSize>False</CompareSize>
|
||||
<CleanUp>True</CleanUp>
|
||||
<IgnoreDebugSymbols>True</IgnoreDebugSymbols>
|
||||
<IgnoreFiles><?xml version="1.0" encoding="utf-16"?>
|
||||
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /></IgnoreFiles>
|
||||
<CopyFiles>True</CopyFiles>
|
||||
<CompareVersion>True</CompareVersion>
|
||||
<OutputFolder>E:\github\Wox\Output\Debug</OutputFolder>
|
||||
<CompareHash>True</CompareHash>
|
||||
<CompareDate>False</CompareDate>
|
||||
<FeedXML>E:\github\Wox\Output\Update\Update.xml</FeedXML>
|
||||
</SCOTT-PC>
|
||||
<BaseURL>http://127.0.0.1:8888</BaseURL>
|
||||
</Settings>
|
BIN
Deploy/NAppUpdate/FeedBuilder.exe
Normal file
BIN
Deploy/NAppUpdate/FeedBuilder.exe
Normal file
Binary file not shown.
54
Deploy/NAppUpdate/FeedBuilder.exe.config
Normal file
54
Deploy/NAppUpdate/FeedBuilder.exe.config
Normal file
@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="FeedBuilder.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
<FeedBuilder.Properties.Settings>
|
||||
<setting name="BaseURL" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="CleanUp" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="CompareDate" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="CompareHash" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="CompareSize" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="CompareVersion" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="CopyFiles" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="FeedXML" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="IgnoreDebugSymbols" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="IgnoreFiles" serializeAs="Xml">
|
||||
<value>
|
||||
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<string>*.pdb</string>
|
||||
<string>*.config</string>
|
||||
</ArrayOfString>
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="IgnoreVsHosting" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="OutputFolder" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
</FeedBuilder.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
BIN
Deploy/NAppUpdate/NAppUpdate.Framework.dll
Normal file
BIN
Deploy/NAppUpdate/NAppUpdate.Framework.dll
Normal file
Binary file not shown.
1
Deploy/NAppUpdate/build.bat
Normal file
1
Deploy/NAppUpdate/build.bat
Normal file
@ -0,0 +1 @@
|
||||
FeedBuilder.exe "FeedBuilder.config" -Build
|
1
Deploy/NAppUpdate/gui.bat
Normal file
1
Deploy/NAppUpdate/gui.bat
Normal file
@ -0,0 +1 @@
|
||||
FeedBuilder.exe "FeedBuilder.config" -ShowGUI
|
BIN
References/NAppUpdate.Framework.dll
Normal file
BIN
References/NAppUpdate.Framework.dll
Normal file
Binary file not shown.
@ -1,4 +1,11 @@
|
||||
using Squirrel;
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Threading;
|
||||
using NAppUpdate.Framework;
|
||||
using NAppUpdate.Framework.Common;
|
||||
using NAppUpdate.Framework.Sources;
|
||||
|
||||
namespace Wox.Core.Updater
|
||||
{
|
||||
@ -18,14 +25,82 @@ namespace Wox.Core.Updater
|
||||
}
|
||||
}
|
||||
|
||||
private UpdaterManager() { }
|
||||
private UpdaterManager()
|
||||
{
|
||||
UpdateManager.Instance.UpdateSource = GetUpdateSource();
|
||||
}
|
||||
|
||||
public void CheckUpdate()
|
||||
{
|
||||
using (var mgr = new UpdateManager("https://path/to/my/update/folder", "nuget-package-id", FrameworkVersion.Net45))
|
||||
// Get a local pointer to the UpdateManager instance
|
||||
UpdateManager updManager = UpdateManager.Instance;
|
||||
|
||||
updManager.BeginCheckForUpdates(asyncResult =>
|
||||
{
|
||||
mgr.UpdateApp();
|
||||
if (asyncResult.IsCompleted)
|
||||
{
|
||||
// still need to check for caught exceptions if any and rethrow
|
||||
((UpdateProcessAsyncResult)asyncResult).EndInvoke();
|
||||
|
||||
// No updates were found, or an error has occured. We might want to check that...
|
||||
if (updManager.UpdatesAvailable == 0)
|
||||
{
|
||||
MessageBox.Show("All is up to date!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
updManager.BeginPrepareUpdates(result =>
|
||||
{
|
||||
((UpdateProcessAsyncResult)result).EndInvoke();
|
||||
|
||||
// ApplyUpdates is a synchronous method by design. Make sure to save all user work before calling
|
||||
// it as it might restart your application
|
||||
// get out of the way so the console window isn't obstructed
|
||||
try
|
||||
{
|
||||
updManager.ApplyUpdates(true,false,true);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// this.WindowState = WindowState.Normal;
|
||||
MessageBox.Show(
|
||||
"An error occurred while trying to install software updates");
|
||||
}
|
||||
|
||||
updManager.CleanUp();
|
||||
}, null);
|
||||
}, null);
|
||||
}
|
||||
|
||||
public void Reinstall()
|
||||
{
|
||||
UpdateManager.Instance.ReinstateIfRestarted();
|
||||
}
|
||||
|
||||
private void OnPrepareUpdatesCompleted(bool obj)
|
||||
{
|
||||
UpdateManager updManager = UpdateManager.Instance;
|
||||
|
||||
DialogResult dr = MessageBox.Show(
|
||||
"Updates are ready to install. Do you wish to install them now?",
|
||||
"Software updates ready",
|
||||
MessageBoxButtons.YesNo);
|
||||
|
||||
if (dr == DialogResult.Yes)
|
||||
{
|
||||
// This is a synchronous method by design, make sure to save all user work before calling
|
||||
// it as it might restart your application
|
||||
updManager.ApplyUpdates(true,true,true);
|
||||
}
|
||||
}
|
||||
|
||||
private IUpdateSource GetUpdateSource()
|
||||
{
|
||||
// Normally this would be a web based source.
|
||||
// But for the demo app, we prepare an in-memory source.
|
||||
var source = new NAppUpdate.Framework.Sources.SimpleWebSource("http://127.0.0.1:8888/Update.xml");
|
||||
return source;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,6 +39,10 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NAppUpdate.Framework, Version=0.1.0.0, Culture=neutral, PublicKeyToken=d1f1d1f19f9e5a56, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\References\NAppUpdate.Framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net35\Newtonsoft.Json.dll</HintPath>
|
||||
@ -65,6 +69,7 @@
|
||||
<Compile Include="Exception\WoxI18nException.cs" />
|
||||
<Compile Include="Exception\WoxJsonRPCException.cs" />
|
||||
<Compile Include="Exception\WoxPluginException.cs" />
|
||||
<Compile Include="Updater\UpdaterManager.cs" />
|
||||
<Compile Include="UserSettings\HttpProxy.cs" />
|
||||
<Compile Include="i18n\AvailableLanguages.cs" />
|
||||
<Compile Include="i18n\IInternationalization.cs" />
|
||||
|
@ -1,8 +0,0 @@
|
||||
<Application x:Class="Wox.UAC.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
@ -1,16 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
|
||||
namespace Wox.UAC
|
||||
{
|
||||
/// <summary>
|
||||
/// App.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
}
|
@ -1,70 +0,0 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
using ICSharpCode.SharpZipLib.Zip;
|
||||
using Microsoft.Win32;
|
||||
using Newtonsoft.Json;
|
||||
using Wox.Plugin;
|
||||
|
||||
namespace Wox.UAC
|
||||
{
|
||||
public class FileTypeAssociateInstaller
|
||||
{
|
||||
[DllImport("shell32.dll")]
|
||||
private static extern void SHChangeNotify(uint wEventId, uint uFlags, IntPtr dwItem1, IntPtr dwItem2);
|
||||
|
||||
/// <summary>
|
||||
/// associate filetype with specified program
|
||||
/// </summary>
|
||||
/// <param name="filePath"></param>
|
||||
/// <param name="fileType"></param>
|
||||
/// <param name="iconPath"></param>
|
||||
/// <param name="overrides"></param>
|
||||
private static void SaveReg(string filePath, string fileType, string iconPath, bool overrides)
|
||||
{
|
||||
RegistryKey classRootKey = Registry.ClassesRoot.OpenSubKey("", true);
|
||||
RegistryKey woxKey = classRootKey.OpenSubKey(fileType, true);
|
||||
if (woxKey != null)
|
||||
{
|
||||
if (!overrides)
|
||||
{
|
||||
return;
|
||||
}
|
||||
classRootKey.DeleteSubKeyTree(fileType);
|
||||
}
|
||||
classRootKey.CreateSubKey(fileType);
|
||||
woxKey = classRootKey.OpenSubKey(fileType, true);
|
||||
woxKey.SetValue("", "wox.wox");
|
||||
woxKey.SetValue("Content Type", "application/wox");
|
||||
|
||||
RegistryKey iconKey = woxKey.CreateSubKey("DefaultIcon");
|
||||
iconKey.SetValue("", iconPath);
|
||||
|
||||
woxKey.CreateSubKey("shell");
|
||||
RegistryKey shellKey = woxKey.OpenSubKey("shell", true);
|
||||
shellKey.SetValue("", "Open");
|
||||
RegistryKey openKey = shellKey.CreateSubKey("open");
|
||||
openKey.SetValue("", "Open with wox");
|
||||
|
||||
openKey = shellKey.OpenSubKey("open", true);
|
||||
openKey.CreateSubKey("command");
|
||||
RegistryKey commandKey = openKey.OpenSubKey("command", true);
|
||||
string pathString = "\"" + filePath + "\" \"installPlugin\" \"%1\"";
|
||||
commandKey.SetValue("", pathString);
|
||||
|
||||
//refresh cache
|
||||
SHChangeNotify(0x8000000, 0, IntPtr.Zero, IntPtr.Zero);
|
||||
}
|
||||
|
||||
public void RegisterInstaller()
|
||||
{
|
||||
string filePath = Path.Combine(Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath), "Wox.exe");
|
||||
string iconPath = Path.Combine(Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath), "app.ico");
|
||||
|
||||
SaveReg(filePath, ".wox", iconPath, true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
<Window x:Class="Wox.UAC.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="MainWindow" Height="350" Width="525">
|
||||
<Grid>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
@ -1,27 +0,0 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Windows;
|
||||
|
||||
namespace Wox.UAC
|
||||
{
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
FileTypeAssociateInstaller installer = new FileTypeAssociateInstaller();
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
string[] param = Environment.GetCommandLineArgs();
|
||||
if (param.Length > 1)
|
||||
{
|
||||
switch (param[1])
|
||||
{
|
||||
case "AssociatePluginInstaller":
|
||||
installer.RegisterInstaller();
|
||||
break;
|
||||
}
|
||||
}
|
||||
Application.Current.Shutdown(0);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
|
||||
// 有关程序集的常规信息通过以下
|
||||
// 特性集控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("Wox.UAC")]
|
||||
[assembly: AssemblyDescription("https://github.com/qianlifeng/Wox")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Wox.UAC")]
|
||||
[assembly: AssemblyCopyright("The MIT License (MIT)")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 使此程序集中的类型
|
||||
// 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
|
||||
// 则将该类型上的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
//若要开始生成可本地化的应用程序,请在
|
||||
//<PropertyGroup> 中的 .csproj 文件中
|
||||
//设置 <UICulture>CultureYouAreCodingWith</UICulture>。 例如,如果您在源文件中
|
||||
//使用的是美国英语,请将 <UICulture> 设置为 en-US。 然后取消
|
||||
//对以下 NeutralResourceLanguage 特性的注释。 更新
|
||||
//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
|
||||
|
||||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
||||
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //主题特定资源词典所处位置
|
||||
//(在页面或应用程序资源词典中
|
||||
// 未找到某个资源的情况下使用)
|
||||
ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
|
||||
//(在页面、应用程序或任何主题特定资源词典中
|
||||
// 未找到某个资源的情况下使用)
|
||||
)]
|
||||
|
||||
|
||||
// 程序集的版本信息由下面四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
|
||||
// 方法是按如下所示使用“*”:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
71
Wox.UAC/Properties/Resources.Designer.cs
generated
71
Wox.UAC/Properties/Resources.Designer.cs
generated
@ -1,71 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本: 4.0.30319.18408
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Wox.UAC.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的、缓存的 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Wox.UAC.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 为所有资源查找重写当前线程的 CurrentUICulture 属性,
|
||||
/// 方法是使用此强类型资源类。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,117 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
30
Wox.UAC/Properties/Settings.Designer.cs
generated
30
Wox.UAC/Properties/Settings.Designer.cs
generated
@ -1,30 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18408
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Wox.UAC.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
@ -1,143 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{C9BC17A0-C2BC-4185-AC1F-32E3352C1233}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Wox.UAC</RootNamespace>
|
||||
<AssemblyName>Wox.UAC</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||
<RestorePackages>true</RestorePackages>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\Output\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\Output\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>app.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net">
|
||||
<HintPath>..\packages\log4net.2.0.3\lib\net35-full\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\packages\Newtonsoft.Json.5.0.8\lib\net35\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Page Include="MainWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow.xaml.cs">
|
||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="FileTypeAssociateInstaller.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<None Include="app.manifest" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<AppDesigner Include="Properties\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wox.Infrastructure\Wox.Infrastructure.csproj">
|
||||
<Project>{4fd29318-a8ab-4d8f-aa47-60bc241b8da3}</Project>
|
||||
<Name>Wox.Infrastructure</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Wox.Plugin\Wox.Plugin.csproj">
|
||||
<Project>{8451ecdd-2ea4-4966-bb0a-7bbc40138e80}</Project>
|
||||
<Name>Wox.Plugin</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="app.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
|
||||
</Target>
|
||||
<!-- 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.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
BIN
Wox.UAC/app.ico
BIN
Wox.UAC/app.ico
Binary file not shown.
Before Width: | Height: | Size: 361 KiB |
@ -1,46 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- 此应用程序设计使用的所有 Windows 版本的列表。
|
||||
Windows 将会自动选择最兼容的环境。-->
|
||||
|
||||
<!-- 如果应用程序设计为使用 Windows Vista,请取消注释以下 supportedOS 节点-->
|
||||
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></supportedOS>-->
|
||||
|
||||
<!-- 如果应用程序设计使用 Windows 7,请取消注释以下 supportedOS 节点-->
|
||||
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->
|
||||
|
||||
<!-- 如果应用程序设计为使用 Windows 8,请取消注释以下 supportedOS 节点-->
|
||||
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>-->
|
||||
|
||||
<!-- 如果应用程序设计为使用 Windows 8.1,请取消对以下 supportedOS 节点的注释-->
|
||||
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>-->
|
||||
|
||||
</application>
|
||||
</compatibility>
|
||||
|
||||
<!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) -->
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="*"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
||||
</asmv1:assembly>
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="log4net" version="2.0.3" targetFramework="net35" />
|
||||
<package id="Newtonsoft.Json" version="5.0.8" targetFramework="net35" />
|
||||
<package id="SharpZipLib" version="0.86.0" targetFramework="net35" />
|
||||
</packages>
|
@ -17,6 +17,7 @@ using NHotkey.Wpf;
|
||||
using Wox.Core.i18n;
|
||||
using Wox.Core.Plugin;
|
||||
using Wox.Core.Theme;
|
||||
using Wox.Core.Updater;
|
||||
using Wox.Core.UserSettings;
|
||||
using Wox.Helper;
|
||||
using Wox.Infrastructure;
|
||||
@ -264,6 +265,7 @@ namespace Wox
|
||||
HwndSource.FromHwnd(new WindowInteropHelper(this).Handle).CompositionTarget.BackgroundColor = Color.FromArgb(0, 0, 0, 0);
|
||||
|
||||
WindowIntelopHelper.DisableControlBox(this);
|
||||
UpdaterManager.Instance.CheckUpdate();
|
||||
}
|
||||
|
||||
public void SetHotkey(string hotkeyStr, EventHandler<HotkeyEventArgs> action)
|
||||
|
1
src/NAppUpdate.Framework/Updater/updater.exe
Normal file
1
src/NAppUpdate.Framework/Updater/updater.exe
Normal file
@ -0,0 +1 @@
|
||||
This is a dummy file
|
Loading…
Reference in New Issue
Block a user