Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Skovhede <kenneth@hexad.dk>2017-10-11 13:50:10 +0300
committerKenneth Skovhede <kenneth@hexad.dk>2017-10-11 13:50:10 +0300
commit762035c309878efd67933dc95aad3d912b1e9391 (patch)
tree862a570561ffb0f28fee38c3985b88aacd332655 /Duplicati
parent6ad0fa649e837382fa7376ff2a223ee7ba4c0037 (diff)
parentba94d36a80f7a1a195196f8cc19aa8247a0ce336 (diff)
Merge branch 'experiment/autoupdate_service' into feature/improve-autoupdater
Diffstat (limited to 'Duplicati')
-rw-r--r--Duplicati/Service/Program.cs10
-rw-r--r--Duplicati/WindowsService/Program.cs10
-rw-r--r--Duplicati/WindowsService/WindowsService.csproj6
3 files changed, 22 insertions, 4 deletions
diff --git a/Duplicati/Service/Program.cs b/Duplicati/Service/Program.cs
index a7fdc7ca6..17a01c82b 100644
--- a/Duplicati/Service/Program.cs
+++ b/Duplicati/Service/Program.cs
@@ -19,9 +19,15 @@ using System;
namespace Duplicati.Service
{
- class MainClass
+ public class Program
{
- public static void Main(string[] args)
+ [STAThread]
+ public static int Main(string[] args)
+ {
+ return Duplicati.Library.AutoUpdater.UpdaterManager.RunFromMostRecent(typeof(Program).GetMethod("RealMain"), args, Duplicati.Library.AutoUpdater.AutoUpdateStrategy.Never);
+ }
+
+ public static void RealMain(string[] args)
{
using(var runner = new Runner(args))
runner.Wait();
diff --git a/Duplicati/WindowsService/Program.cs b/Duplicati/WindowsService/Program.cs
index ee0fc6ca9..9decd6f4e 100644
--- a/Duplicati/WindowsService/Program.cs
+++ b/Duplicati/WindowsService/Program.cs
@@ -9,9 +9,15 @@ using System.Threading.Tasks;
namespace Duplicati.WindowsService
{
- class Program
+ public class Program
{
- public static void Main(string[] args)
+ [STAThread]
+ public static int Main(string[] args)
+ {
+ return Duplicati.Library.AutoUpdater.UpdaterManager.RunFromMostRecent(typeof(Program).GetMethod("RealMain"), args, Duplicati.Library.AutoUpdater.AutoUpdateStrategy.Never);
+ }
+
+ public static void RealMain(string[] args)
{
var install = args != null && args.Where(x => string.Equals("install", x, StringComparison.OrdinalIgnoreCase)).Any();
var uninstall = args != null && args.Where(x => string.Equals("uninstall", x, StringComparison.OrdinalIgnoreCase)).Any();
diff --git a/Duplicati/WindowsService/WindowsService.csproj b/Duplicati/WindowsService/WindowsService.csproj
index 8bf71c5d3..33a467803 100644
--- a/Duplicati/WindowsService/WindowsService.csproj
+++ b/Duplicati/WindowsService/WindowsService.csproj
@@ -75,6 +75,12 @@
<None Include="App.config" />
<None Include="Duplicati.snk" />
</ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Library\AutoUpdater\Duplicati.Library.AutoUpdater.csproj">
+ <Project>{7E119745-1F62-43F0-936C-F312A1912C0B}</Project>
+ <Name>Duplicati.Library.AutoUpdater</Name>
+ </ProjectReference>
+ </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.