Plumb the interface change through

This commit is contained in:
Paul Betts
2014-09-25 13:35:45 -07:00
parent 4759fadf71
commit c5f773989c
3 changed files with 25 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
@@ -99,9 +100,18 @@ namespace Squirrel
key.DeleteSubKeyTree(applicationName);
}
public void CreateShortcutsForExecutable(string exeName)
public void CreateShortcutsForExecutable(string exeName, ShortcutLocation locations)
{
var releases = Utility.LoadLocalReleases(Utility.LocalReleaseFileForAppDir(rootAppDirectory));
var thisRelease = Utility.FindCurrentVersion(releases);
var zf = new ZipPackage(thisRelease.Filename);
var fileVerInfo = FileVersionInfo.GetVersionInfo(
Path.Combine(Utility.AppDirForRelease(rootAppDirectory, thisRelease), exeName));
}
public void RemoveShortcutsForExecutable(string exeName, ShortcutLocation locations)
{
throw new NotImplementedException();
}
}
}

View File

@@ -101,10 +101,16 @@ namespace Squirrel
installHelpers.RemoveUninstallerRegistryEntry();
}
public void CreateShortcutsForExecutable(string exeName)
public void CreateShortcutsForExecutable(string exeName, ShortcutLocation locations)
{
var installHelpers = new InstallHelperImpl(applicationName, rootAppDirectory);
installHelpers.CreateShortcutsForExecutable(exeName);
installHelpers.CreateShortcutsForExecutable(exeName, locations);
}
public void RemoveShortcutsForExecutable(string exeName, ShortcutLocation locations)
{
var installHelpers = new InstallHelperImpl(applicationName, rootAppDirectory);
installHelpers.RemoveShortcutsForExecutable(exeName, locations);
}
public Version CurrentlyInstalledVersion(string executable = null)

View File

@@ -283,6 +283,11 @@ namespace Squirrel
return Tuple.Create(path, (Stream) File.OpenWrite(path));
}
public static string AppDirForRelease(string rootAppDirectory, ReleaseEntry entry)
{
return Path.Combine(rootAppDirectory, "app-" + entry.Version.ToString());
}
public static string PackageDirectoryForAppDir(string rootAppDirectory)
{
return Path.Combine(rootAppDirectory, "packages");