Skip to content

Commit

Permalink
Merge pull request #163 from JiriVanek/master
Browse files Browse the repository at this point in the history
New Dokan version, changed gin-cli version

LGTM
  • Loading branch information
achilleas-k committed Aug 6, 2020
2 parents 2a54372 + c5c19df commit 624e3b3
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 12 deletions.
13 changes: 7 additions & 6 deletions GinClientApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,24 @@ internal static class Program
/// unsupported dokan from old WinGIN bundle
/// </summary>
private const string dokanAppOld = "Dokan Library 1.1.0.2000 Bundle";
private const string dokanAppOld2 = "Dokan Library 1.3.0.1000 Bundle";
private const string dokanAppOld3 = "Dokan Library 1.3.1.1000 Bundle";
/// <summary>
/// supported dokan version
/// </summary>
private const string dokanApp = "Dokan Library 1.3.0.1000 Bundle";
private const string dokanApp = "Dokan Library 1.4.0.1000 Bundle";
/// <summary>
/// supported dokan version
/// </summary>
private const string dokanApp2 = "Dokan Library 1.3.1.1000 Bundle";
#endregion

#region Forms Strings
/// <summary>
/// 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 now?";
private const string oldDokanInstalled = "Old Dokan library is installed! Dokan 1.3.0 is necessary for WinGIN to work. Please uninstall old version.";
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 winginIsRunning = "WinGIN is already running.";
#endregion
Expand Down Expand Up @@ -117,10 +118,10 @@ private static void Main(string[] args)
var curPath = AppDomain.CurrentDomain.BaseDirectory;
///check if supported dokan is installed
MessageBoxResult dokanResult = MessageBoxResult.No;
if (!CheckInstalled(dokanApp) && !CheckInstalled(dokanApp2))
if (!CheckInstalled(dokanApp))
{
/// no supported dokan installed
if (CheckInstalled(dokanAppOld))
if (CheckInstalled(dokanAppOld) || CheckInstalled(dokanAppOld2) || CheckInstalled(dokanAppOld3))
///check if old version of dokan is installed
{
///installed old dokan. Show warning and exit.
Expand Down
4 changes: 2 additions & 2 deletions GinClientLibrary/GinClientLibrary.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
<AssemblyOriginatorKeyFile>TempKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="DokanNet, Version=1.3.0.0, Culture=neutral, PublicKeyToken=cef3dedf553bda55, processorArchitecture=MSIL">
<HintPath>..\packages\DokanNet.1.3.0\lib\net46\DokanNet.dll</HintPath>
<Reference Include="DokanNet, Version=1.4.0.0, Culture=neutral, PublicKeyToken=cef3dedf553bda55, processorArchitecture=MSIL">
<HintPath>..\packages\DokanNet.1.4.0\lib\net46\DokanNet.dll</HintPath>
</Reference>
<Reference Include="MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a, processorArchitecture=MSIL">
<HintPath>..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.dll</HintPath>
Expand Down
2 changes: 1 addition & 1 deletion GinClientLibrary/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DokanNet" version="1.3.0" targetFramework="net461" />
<package id="DokanNet" version="1.4.0" targetFramework="net461" />
<package id="MetroModernUI" version="1.4.0.0" targetFramework="net461" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net461" />
</packages>
28 changes: 25 additions & 3 deletions InstallerLibrary/Installer1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,32 @@ namespace InstallerLibrary
public partial class Installer1 : Installer
{
private bool is64BitOperatingSystem = Environment.Is64BitOperatingSystem;

private static readonly string _ginURL =
/*
/// <summary>
/// latest version of gin-cli for windows 32 bit (not tested)
/// is not used currently
/// </summary>
private static readonly string _ginURL_latest =
"https://gin.g-node.org/G-Node/gin-cli-releases/raw/master/gin-cli-latest-windows32.zip";
private static readonly string _gin64URL =
/// <summary>
/// latest version of gin-cli for windows 64 bit (not tested)
/// is not used currently
/// </summary>
private static readonly string _gin64URL_latest =
"https://gin.g-node.org/G-Node/gin-cli-releases/raw/master/gin-cli-latest-windows64.zip";
*/

/// <summary>
/// gin-cli for windows 32 bit that was tested
/// </summary>
private static readonly string _ginURL =
"https://github.com/G-Node/gin-cli/releases/download/v1.11/gin-cli-1.11-windows32.zip";
/// <summary>
/// gin-cli for windows 34 bit that was tested
/// </summary>
private static readonly string _gin64URL =
"https://github.com/G-Node/gin-cli/releases/download/v1.11/gin-cli-1.11-windows64.zip";

private volatile bool _downloadComplete;

Expand Down Expand Up @@ -58,6 +78,8 @@ private void Installer1_Committed(object sender, InstallEventArgs e)

_downloadComplete = false;
var wb = new WebClient();
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
wb.Headers.Add("user-agent","archive_download");
//Download the current gin-cli release and unpack it into our install directory
wb.DownloadFileCompleted += Wb_DownloadFileCompleted;
wb.DownloadProgressChanged += WbOnDownloadProgressChanged;
Expand Down
Binary file modified Setup/Dokan/DokanSetup.exe
Binary file not shown.
Binary file modified Setup64/Dokan/DokanSetup.exe
Binary file not shown.

0 comments on commit 624e3b3

Please sign in to comment.