keepass: 2.33 -> 2.34

This commit is contained in:
Marcin Janczyk 2016-09-15 22:24:36 +02:00
parent 51314631d6
commit 5cbda61791
3 changed files with 43 additions and 11 deletions

View file

@ -8,11 +8,11 @@
# plugin derivations in the Nix store and nowhere else.
with builtins; buildDotnetPackage rec {
baseName = "keepass";
version = "2.33";
version = "2.34";
src = fetchurl {
url = "mirror://sourceforge/keepass/KeePass-${version}-Source.zip";
sha256 = "0n4rkx2awyq1gbqiby1lkf2zw82brji96s4fkjsahmci528a882i";
sha256 = "e3f184e4deddd1aa5ee2b52e2373c772d3f3975e5eddb2fd729eb27b437011aa";
};
sourceRoot = ".";
@ -20,7 +20,7 @@ with builtins; buildDotnetPackage rec {
buildInputs = [ unzip makeWrapper icoutils ];
pluginLoadPathsPatch =
let outputLc = toString (add 8 (length plugins));
let outputLc = toString (add 7 (length plugins));
patchTemplate = readFile ./keepass-plugins.patch;
loadTemplate = readFile ./keepass-plugins-load.patch;
loads =

View file

@ -1 +1 @@
+ m_pluginManager.LoadAllPlugins("$PATH$/lib/dotnet/keepass");
+ m_pluginManager.LoadAllPlugins("$PATH$/lib/dotnet/keepass", SearchOption.TopDirectoryOnly, new string[] {});

View file

@ -1,13 +1,45 @@
--- old/KeePass/Forms/MainForm.cs
+++ new/KeePass/Forms/MainForm.cs
@@ -384,9 +384,$OUTPUT_LC$ @@ namespace KeePass.Forms
m_pluginManager.Initialize(m_pluginDefaultHost);
@@ -386,42 +386,$OUTPUT_LC$ @@ namespace KeePass.Forms
m_pluginManager.UnloadAllPlugins();
- if(AppPolicy.Current.Plugins)
- m_pluginManager.LoadAllPlugins(UrlUtil.GetFileDirectory(
- WinUtil.GetExecutable(), false, true));
+ if(AppPolicy.Current.Plugins) {
if(AppPolicy.Current.Plugins)
{
- string[] vExclNames = new string[] {
- AppDefs.FileNames.Program, AppDefs.FileNames.XmlSerializers,
- AppDefs.FileNames.NativeLib32, AppDefs.FileNames.NativeLib64,
- AppDefs.FileNames.ShInstUtil
- };
-
- string strPlgRoot = UrlUtil.GetFileDirectory(
- WinUtil.GetExecutable(), false, true);
- m_pluginManager.LoadAllPlugins(strPlgRoot, SearchOption.TopDirectoryOnly,
- vExclNames);
-
- if(!NativeLib.IsUnix())
- {
- string strPlgSub = UrlUtil.EnsureTerminatingSeparator(strPlgRoot,
- false) + AppDefs.PluginsDir;
- m_pluginManager.LoadAllPlugins(strPlgSub, SearchOption.AllDirectories,
- vExclNames);
- }
- else // Unix
- {
- try
- {
- DirectoryInfo diPlgRoot = new DirectoryInfo(strPlgRoot);
- foreach(DirectoryInfo diSub in diPlgRoot.GetDirectories())
- {
- if(diSub == null) { Debug.Assert(false); continue; }
-
- if(string.Equals(diSub.Name, AppDefs.PluginsDir,
- StrUtil.CaseIgnoreCmp))
- m_pluginManager.LoadAllPlugins(diSub.FullName,
- SearchOption.AllDirectories, vExclNames);
- }
- }
- catch(Exception) { Debug.Assert(false); }
- }
- }
$DO_LOADS$+ }
// Delete old files *after* loading plugins (when timestamps