diff --git a/ShareX.DesktopBridgeHelper/Program.cs b/ShareX.DesktopBridgeHelper/Program.cs deleted file mode 100644 index cd5fd6dce..000000000 --- a/ShareX.DesktopBridgeHelper/Program.cs +++ /dev/null @@ -1,51 +0,0 @@ -#region License Information (GPL v3) - -/* - ShareX - A program that allows you to take screenshots and share any file type - Copyright (c) 2007-2018 ShareX Team - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Optionally you can also view the license at . -*/ - -#endregion License Information (GPL v3) - -using System; -using System.Diagnostics; -using System.IO; - -namespace DesktopBridgeHelper -{ - internal class Program - { - private static int Main(string[] args) - { - string path = GetAbsolutePath("ShareX.exe"); - Process.Start(path, "-silent"); - return 0; - } - - private static string GetAbsolutePath(string path) - { - if (!Path.IsPathRooted(path)) // Is relative path? - { - path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, path); - } - - return Path.GetFullPath(path); - } - } -} \ No newline at end of file diff --git a/ShareX.DesktopBridgeHelper/Properties/AssemblyInfo.cs b/ShareX.DesktopBridgeHelper/Properties/AssemblyInfo.cs deleted file mode 100644 index 26df64143..000000000 --- a/ShareX.DesktopBridgeHelper/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,5 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("ShareX DesktopBridgeHelper")] -[assembly: Guid("2bf9aebb-b104-4b72-8298-04ca6d23b0e0")] \ No newline at end of file diff --git a/ShareX.DesktopBridgeHelper/ShareX.DesktopBridgeHelper.csproj b/ShareX.DesktopBridgeHelper/ShareX.DesktopBridgeHelper.csproj deleted file mode 100644 index 887fdf083..000000000 --- a/ShareX.DesktopBridgeHelper/ShareX.DesktopBridgeHelper.csproj +++ /dev/null @@ -1,52 +0,0 @@ - - - - - Debug - AnyCPU - {2BF9AEBB-B104-4B72-8298-04CA6D23B0E0} - WinExe - ShareX.DesktopBridgeHelper - ShareX_DesktopBridgeHelper - v4.6.2 - 512 - true - - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - Properties\SharedAssemblyInfo.cs - - - - - - - - - \ No newline at end of file diff --git a/ShareX.DesktopBridgeHelper/app.config b/ShareX.DesktopBridgeHelper/app.config deleted file mode 100644 index b972e1946..000000000 --- a/ShareX.DesktopBridgeHelper/app.config +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/ShareX.sln b/ShareX.sln index 34d64b5d7..7a6781a26 100644 --- a/ShareX.sln +++ b/ShareX.sln @@ -28,8 +28,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShareX.Steam", "ShareX.Stea EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShareX.NativeMessagingHost", "ShareX.NativeMessagingHost\ShareX.NativeMessagingHost.csproj", "{254E398D-F7F5-4B2A-9024-5C121EA6C564}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShareX.DesktopBridgeHelper", "ShareX.DesktopBridgeHelper\ShareX.DesktopBridgeHelper.csproj", "{2BF9AEBB-B104-4B72-8298-04CA6D23B0E0}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -143,13 +141,6 @@ Global {254E398D-F7F5-4B2A-9024-5C121EA6C564}.Steam|Any CPU.Build.0 = Release|Any CPU {254E398D-F7F5-4B2A-9024-5C121EA6C564}.WindowsStore|Any CPU.ActiveCfg = Release|Any CPU {254E398D-F7F5-4B2A-9024-5C121EA6C564}.WindowsStoreDebug|Any CPU.ActiveCfg = Debug|Any CPU - {2BF9AEBB-B104-4B72-8298-04CA6D23B0E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2BF9AEBB-B104-4B72-8298-04CA6D23B0E0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2BF9AEBB-B104-4B72-8298-04CA6D23B0E0}.Steam|Any CPU.ActiveCfg = Release|Any CPU - {2BF9AEBB-B104-4B72-8298-04CA6D23B0E0}.WindowsStore|Any CPU.ActiveCfg = Release|Any CPU - {2BF9AEBB-B104-4B72-8298-04CA6D23B0E0}.WindowsStore|Any CPU.Build.0 = Release|Any CPU - {2BF9AEBB-B104-4B72-8298-04CA6D23B0E0}.WindowsStoreDebug|Any CPU.ActiveCfg = Debug|Any CPU - {2BF9AEBB-B104-4B72-8298-04CA6D23B0E0}.WindowsStoreDebug|Any CPU.Build.0 = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ShareX/Program.cs b/ShareX/Program.cs index a4f7d3a01..92ad18edc 100644 --- a/ShareX/Program.cs +++ b/ShareX/Program.cs @@ -34,6 +34,10 @@ You should have received a copy of the GNU General Public License using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; +#if WindowsStore +using Windows.ApplicationModel; +using Windows.ApplicationModel.Activation; +#endif namespace ShareX { @@ -281,7 +285,11 @@ private static void Run() DebugHelper.WriteLine("Personal path: " + PersonalFolder); DebugHelper.WriteLine("Operating system: " + Helpers.GetWindowsProductName()); - SilentRun = CLI.IsCommandExist("silent", "s"); + SilentRun = CLI.IsCommandExist("silent", "s") +#if WindowsStore + || AppInstance.GetActivatedEventArgs().Kind == ActivationKind.StartupTask; +#endif + ; #if STEAM SteamFirstTimeConfig = CLI.IsCommandExist("SteamConfig"); diff --git a/ShareX/ShareX.csproj b/ShareX/ShareX.csproj index c94067509..799571f0a 100644 --- a/ShareX/ShareX.csproj +++ b/ShareX/ShareX.csproj @@ -123,12 +123,20 @@ $(MSBuildProgramFiles32)\Windows Kits\10\UnionMetadata\Facade\Windows.WinMD False + + $(MSBuildProgramFiles32)\Windows Kits\10\References\10.0.17134.0\Windows.ApplicationModel.Activation.ActivatedEventsContract\1.0.0.0\Windows.ApplicationModel.Activation.ActivatedEventsContract.winmd + False + - $(MSBuildProgramFiles32)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.StartupTaskContract\1.0.0.0\Windows.ApplicationModel.StartupTaskContract.winmd + $(MSBuildProgramFiles32)\Windows Kits\10\References\10.0.17134.0\Windows.ApplicationModel.StartupTaskContract\3.0.0.0\Windows.ApplicationModel.StartupTaskContract.winmd False - $(MSBuildProgramFiles32)\Windows Kits\10\References\10.0.15063.0\Windows.Foundation.FoundationContract\3.0.0.0\Windows.Foundation.FoundationContract.winmd + $(MSBuildProgramFiles32)\Windows Kits\10\References\10.0.17134.0\Windows.Foundation.FoundationContract\3.0.0.0\Windows.Foundation.FoundationContract.winmd + False + + + $(MSBuildProgramFiles32)\Windows Kits\10\References\10.0.17134.0\Windows.Foundation.UniversalApiContract\6.0.0.0\Windows.Foundation.UniversalApiContract.winmd False