Skip to content

Commit

Permalink
Merge pull request #167 from JiriVanek/master
Browse files Browse the repository at this point in the history
Increased version number

LGTM
  • Loading branch information
achilleas-k committed Oct 30, 2020
2 parents b53884c + a941cac commit 520b1c0
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 71 deletions.
5 changes: 4 additions & 1 deletion GinClientApp/Dialogs/GinCliDownloadDlg.cs
Expand Up @@ -71,14 +71,16 @@ private void BackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
/// <param name="e"></param>
private void BackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
///remove downloaded archive
File.Delete(gincli);
if (e.Error != null)
{
MessageBox.Show(e.Error.Message);
this.DialogResult = DialogResult.Abort;
}
else
{
///fix config.yml git binary key
///detect in config.yml git binary key
if (File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\g-node\gin\config.yml"))
{
/*
Expand Down Expand Up @@ -170,6 +172,7 @@ public void DownloadGinCli()
}
catch (Exception e)
{
this.DialogResult = DialogResult.Abort;
MessageBox.Show(e.Message);
}
}
Expand Down
7 changes: 0 additions & 7 deletions GinClientApp/Dialogs/HelpForm.cs
@@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace GinClientApp.Dialogs
Expand Down
1 change: 0 additions & 1 deletion GinClientApp/Dialogs/MetroCreateNewRepoDlg.cs
Expand Up @@ -2,7 +2,6 @@
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Windows;
using System.Windows.Forms;
using GinClientApp.Properties;
using GinClientLibrary;
Expand Down
3 changes: 1 addition & 2 deletions GinClientApp/Dialogs/ServerEditDlg.cs
@@ -1,5 +1,4 @@
using GinClientApp.GinService;
using GinClientLibrary;
using GinClientLibrary;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
Expand Down
51 changes: 25 additions & 26 deletions GinClientApp/Program.cs
Expand Up @@ -50,10 +50,10 @@ internal static class Program
/// error messages
/// </summary>
private const string connectionError = "Cannot connect to G-Node server.";
private const string dokanNotInstalled = "Dokan library is missing or wrong version is installed! Dokan is necessary for WinGIN to work. Do you want to install Dokan 1.4.0 now?";
private const string oldDokanInstalled = "Old Dokan library is installed! Dokan 1.4.0 is necessary for WinGIN to work. Please uninstall old version.";
private const string ginNotInstalled = "Local GIN binary is missing. Please reinstall application.";
private const string dokanNotInstalled = "Dokan library is missing or unsupported version is installed! Dokan is necessary for WinGIN to work. \nDo you want to install Dokan 1.4.0 now?";
private const string oldDokanInstalled = "Unsupported Dokan library is installed! Dokan 1.4.0 is necessary for WinGIN to work. Please uninstall old version.";
private const string winginIsRunning = "WinGIN is already running.";
private const string ginCliInstallError = "Error during gin-cli installation.";
#endregion

/// <summary>
Expand Down Expand Up @@ -134,48 +134,47 @@ private static void Main(string[] args)
return;
}
}
///No dokan installed, ask for installation
dokanResult = MessageBox.Show(dokanNotInstalled, "WinGIN", MessageBoxButton.YesNo, MessageBoxImage.Warning);
if (dokanResult == MessageBoxResult.Yes)
{
///No dokan installed, ask for installation
dokanResult = MessageBox.Show(dokanNotInstalled, "WinGIN", MessageBoxButton.YesNo, MessageBoxImage.Warning);
if (dokanResult == MessageBoxResult.Yes)
///try to install dokan
var procstartinfo = new ProcessStartInfo
{
///try to install dokan
var procstartinfo = new ProcessStartInfo
{
FileName = curPath + @"dokan/DokanSetup.exe",
CreateNoWindow = true,
UseShellExecute = true,
Verb = "runas"
};
var process = Process.Start(procstartinfo);
Environment.Exit(0);
}
else
{
///no dokan installed, exit application
return;
}
FileName = curPath + @"dokan/DokanSetup.exe",
CreateNoWindow = true,
UseShellExecute = true,
Verb = "runas"
};
var process = Process.Start(procstartinfo);
Environment.Exit(0);
}
else
{
///no dokan installed, exit application
return;
}
}
///check if local gin-cli is present

if (!File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + @"\g-node\WinGIN\gin-cli\bin\gin.exe"))
{
///gin cli not installed in AppData location, try to install it
GinCliDownloadDlg dlg = new GinCliDownloadDlg();
dlg.ShowDialog();
if (dlg.DialogResult != System.Windows.Forms.DialogResult.OK)
{
MessageBox.Show("Error during gin-cli installation.");
///installation was unsuccessful
MessageBox.Show(ginCliInstallError,"Error", MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
else
{
//MessageBox.Show("Gin-Cli installed.");
///Restart application with installed gin-cli
Application.Restart();
Environment.Exit(0);
}
}

///add gin-cli to path
var path = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + @"\g-node\WinGIN\";
var value = Environment.GetEnvironmentVariable("PATH", EnvironmentVariableTarget.Process);
Expand Down
2 changes: 0 additions & 2 deletions GinClientApp/ServiceComponent/IGinService.cs
@@ -1,6 +1,4 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.ServiceModel;
using GinClientLibrary;

Expand Down
3 changes: 0 additions & 3 deletions GinShellExtension/GinShellExtension.csproj
Expand Up @@ -37,9 +37,6 @@
<AssemblyOriginatorKeyFile>TempKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="SharpShell, Version=2.2.0.0, Culture=neutral, PublicKeyToken=f14dc899472fe6fb, processorArchitecture=MSIL">
<HintPath>..\packages\SharpShellTools.2.2.0.0\lib\SharpShell.dll</HintPath>
</Reference>
Expand Down
2 changes: 0 additions & 2 deletions GinShellExtension/GinShellExtensionClass.cs
Expand Up @@ -3,11 +3,9 @@
using System.Linq;
using System.Runtime.InteropServices;
using System.ServiceModel;
using System.ServiceProcess;
using System.Windows.Forms;
using GinClientLibrary;
using GinShellExtension.GinService;
using Newtonsoft.Json;
using SharpShell.Attributes;
using SharpShell.SharpContextMenu;
using static GinClientLibrary.GinRepository;
Expand Down
10 changes: 1 addition & 9 deletions GinShellExtension/IconOverlay.cs
@@ -1,16 +1,8 @@
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Drawing;
using System.Runtime.InteropServices;
using System.ServiceModel;
using System.ServiceProcess;
using GinClientLibrary;
using GinShellExtension.GinService;
using GinShellExtension.Properties;
using Newtonsoft.Json;
using SharpShell.Interop;
using SharpShell.SharpIconOverlayHandler;
using GinRepositoryData = GinClientLibrary.GinRepositoryData;

namespace GinShellExtension
{
Expand Down
1 change: 0 additions & 1 deletion GinShellExtension/packages.config
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net461" />
<package id="SharpShell" version="2.2.0.0" targetFramework="net461" />
<package id="SharpShellTools" version="2.2.0.0" targetFramework="net461" />
</packages>
3 changes: 0 additions & 3 deletions InstallerLibrary/Installer1.cs
Expand Up @@ -5,10 +5,7 @@
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using Ionic.Zip;
using IWshRuntimeLibrary;
using Newtonsoft.Json;
using File = System.IO.File;
Expand Down
3 changes: 0 additions & 3 deletions InstallerLibrary/InstallerLibrary.csproj
Expand Up @@ -33,9 +33,6 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Ionic.Zip.Reduced, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">
<HintPath>..\packages\DotNetZip.Reduced.1.9.1.8\lib\net20\Ionic.Zip.Reduced.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
Expand Down
1 change: 0 additions & 1 deletion InstallerLibrary/packages.config
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DotNetZip.Reduced" version="1.9.1.8" targetFramework="net45" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net45" />
</packages>
2 changes: 1 addition & 1 deletion Updater/UpdateChecker.cs
Expand Up @@ -48,7 +48,7 @@ public static void DoUpdate()
process.WaitForExit();
}
/// <summary>
/// uninstalls old version of WinGIN
/// uninstall old version of WinGIN
/// </summary>
/// <param name="ProgramName">Name of program</param>
/// <returns>true for success</returns>
Expand Down
4 changes: 0 additions & 4 deletions Updater/Updater.csproj
Expand Up @@ -32,9 +32,6 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.Configuration" />
Expand All @@ -55,7 +52,6 @@
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
4 changes: 0 additions & 4 deletions Updater/packages.config

This file was deleted.

2 changes: 1 addition & 1 deletion appveyor.yml
@@ -1,4 +1,4 @@
version: 1.1.{build}
version: 1.2.{build}

image: Visual Studio 2017
shallow_clone: true
Expand Down

0 comments on commit 520b1c0

Please sign in to comment.