Skip to content

Commit c4c3703

Browse files
authored
Merge pull request #4 from Rookiestyle/clickable-plugin-url-on-mono
Make plugin url clickable on Mono
2 parents 7e65734 + fd50c24 commit c4c3703

File tree

4 files changed

+27
-48
lines changed

4 files changed

+27
-48
lines changed

src/EarlyUpdateCheck.csproj

Lines changed: 16 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,9 @@
55
<LangVersion>5</LangVersion>
66
</PropertyGroup>
77
<PropertyGroup>
8-
<!-- For building .plgx -->
9-
<PlgxConfiguration>
10-
<Prerequisites>
11-
<KeePassVersion>2.31</KeePassVersion>
12-
<DotNetVersion>4.0</DotNetVersion>
13-
</Prerequisites>
14-
</PlgxConfiguration>
8+
<PlgxKeePassVersion>2.38</PlgxKeePassVersion>
9+
<PlgXOS>
10+
</PlgXOS>
1511
</PropertyGroup>
1612
<PropertyGroup>
1713
<ProjectGuid>{78C152F3-EAF8-4FFC-9BE3-F5DC0CD66E5D}</ProjectGuid>
@@ -22,7 +18,7 @@
2218
<OutputType>Library</OutputType>
2319
<RootNamespace>EarlyUpdateCheck</RootNamespace>
2420
<AssemblyName>EarlyUpdateCheck</AssemblyName>
25-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
21+
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
2622
<AppDesignerFolder>Properties</AppDesignerFolder>
2723
<NoWin32Manifest>False</NoWin32Manifest>
2824
<SignAssembly>False</SignAssembly>
@@ -51,29 +47,16 @@
5147
<DefineConstants>DEBUG;TRACE</DefineConstants>
5248
<StartAction>Project</StartAction>
5349
</PropertyGroup>
54-
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
55-
<OutputPath>bin\Release\</OutputPath>
56-
<DebugSymbols>False</DebugSymbols>
57-
<DebugType>None</DebugType>
58-
<Optimize>False</Optimize>
59-
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
60-
<DefineConstants>TRACE</DefineConstants>
61-
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
62-
</PropertyGroup>
6350
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleasePlgx|AnyCPU' ">
6451
<DebugType>none</DebugType>
6552
<Optimize>true</Optimize>
66-
<OutputPath>..\..\KeePass_Release\Plugins\</OutputPath>
53+
<OutputPath>bin\Release</OutputPath>
6754
</PropertyGroup>
6855
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
69-
<OutputPath>..\..\KeePass_Debug\Plugins\</OutputPath>
56+
<OutputPath>..\..\_KeePass_Debug\Plugins\</OutputPath>
7057
<Prefer32Bit>false</Prefer32Bit>
7158
<DebugType>full</DebugType>
7259
</PropertyGroup>
73-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
74-
<DebugType>pdbonly</DebugType>
75-
<DebugSymbols>true</DebugSymbols>
76-
</PropertyGroup>
7760
<ItemGroup>
7861
<Compile Include="CheckedGroupBox.cs" />
7962
<Compile Include="TranslationUpdateForm.cs">
@@ -102,21 +85,17 @@
10285
<Reference Include="System.Xml" />
10386
</ItemGroup>
10487
<ItemGroup>
105-
<PackageReference Include="KeePass">
106-
<Version>2.45.0.30441</Version>
107-
<ExcludeFromPlgx />
108-
</PackageReference>
109-
<PackageReference Include="PlgxTool">
110-
<Version>1.0.0</Version>
111-
<ExcludeFromPlgx />
112-
</PackageReference>
88+
<ProjectReference Include="..\..\_KeePass_Source\KeePass\KeePass.csproj">
89+
<Project>{10938016-dee2-4a25-9a5a-8fd3444379ca}</Project>
90+
<Name>KeePass</Name>
91+
</ProjectReference>
11392
</ItemGroup>
11493
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
115-
<Target Name="AfterBuild" Condition="'$(Configuration)' == 'ReleasePlgx'">
116-
<CallTarget Targets="BuildPlgx" />
117-
<Delete Files="$(OutDir)Keepass.xml" />
118-
<Delete Files="$(OutDir)Keepass.exe" />
119-
<Delete Files="$(OutDir)Keepass.config.xml" />
120-
<Delete Files="$(OutDir)EarlyUpdateCheck.dll" />
94+
<Target Name="BeforeBuild" Condition=" '$(Configuration)' == 'Debug' ">
95+
<Exec Command="..\translationcopy.cmd $(Configuration)" />
96+
</Target>
97+
<Target Name="AfterBuild" Condition=" '$(Configuration)' == 'ReleasePlgx' ">
98+
<Exec Command="..\translationcopy.cmd $(Configuration)" />
99+
<Exec Command="..\plgxcreate.cmd $(TargetFrameworkVersion.Replace('v', '')) $(PlgxKeePassVersion) $(PlgXOS)" />
121100
</Target>
122101
</Project>

src/PluginTools.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ private static void AddPluginToOverview(string sPluginName, TabControl tcPlugins
226226
GetLoadedPluginsName().TryGetValue(sPluginName.Replace("Ext", string.Empty) + "." + sPluginName, out v);
227227
string ver = v.ToString();
228228
if (ver.EndsWith(".0")) ver = ver.Substring(0, ver.Length - 2);
229-
else ver += " (Dev)";
229+
else ver += " (Dev)";
230230
lvi.SubItems.Add(ver);
231231
lv.Items.Add(lvi);
232232
tcPlugins.TabPages.Remove(tpOverview);
@@ -291,7 +291,7 @@ public static void ShowOptions()
291291
private static void AddPluginLink(UserControl uc)
292292
{
293293
LinkLabel llUrl = new LinkLabel();
294-
llUrl.Links.Add(0, 0, PluginURL);
294+
llUrl.Links.Add(0, PluginURL.Length, PluginURL);
295295
llUrl.Text = PluginURL;
296296
uc.Controls.Add(llUrl);
297297
llUrl.Dock = DockStyle.Bottom;
@@ -488,8 +488,8 @@ public static Image Scale(Image img, int x, int y)
488488

489489
public static class PluginDebug
490490
{
491-
[Flags]
492-
public enum LogLevelFlags
491+
[Flags]
492+
public enum LogLevelFlags
493493
{
494494
None = 0,
495495
Info = 1,
@@ -517,7 +517,7 @@ public static bool DebugMode
517517
if (m_DebugMode == value) return;
518518
bool b = m_DebugMode;
519519
m_DebugMode = true;
520-
AddInfo("DebugMode changed", "Old: " + b.ToString(), "New: "+value.ToString());
520+
AddInfo("DebugMode changed", "Old: " + b.ToString(), "New: " + value.ToString());
521521
m_DebugMode = value;
522522
}
523523
}
@@ -536,7 +536,7 @@ static PluginDebug()
536536
ulong uInst = KeePass.Util.WinUtil.GetMaxNetFrameworkVersion();
537537
DotNetVersion = new Version(StrUtil.VersionToString(uInst));
538538
RegistryKey rkRel = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full", false);
539-
try { m_DotNetRelease = (int)rkRel.GetValue("Release"); }
539+
try { m_DotNetRelease = (int)rkRel.GetValue("Release"); }
540540
catch { }
541541
if (rkRel != null) rkRel.Close();
542542

@@ -705,7 +705,7 @@ public static void SaveOrShow()
705705
{
706706
if (m_DebugEntries.Count == 0) return;
707707
SaveDebugMessages();
708-
if (AutoOpen || (AskOpen && Tools.AskYesNo("DebugFile: "+DebugFile+"\n\nOpen debug file?") == DialogResult.Yes))
708+
if (AutoOpen || (AskOpen && Tools.AskYesNo("DebugFile: " + DebugFile + "\n\nOpen debug file?") == DialogResult.Yes))
709709
System.Diagnostics.Process.Start(DebugFile);
710710
}
711711

@@ -871,7 +871,7 @@ public void GetXml(System.Xml.XmlWriter xw)
871871
foreach (var f in sf)
872872
{
873873
xw.WriteStartElement("StackFrame");
874-
xw.WriteElementString("Method", f.GetMethod().Name + " ("+ f.GetMethod().DeclaringType.FullName + ")");
874+
xw.WriteElementString("Method", f.GetMethod().Name + " (" + f.GetMethod().DeclaringType.FullName + ")");
875875
xw.WriteElementString("FileName", System.IO.Path.GetFileName(f.GetFileName()));
876876
xw.WriteElementString("Line", f.GetFileLineNumber().ToString());
877877
xw.WriteEndElement();

src/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
//
2525
// You can specify all the values or you can use the default the Revision and
2626
// Build Numbers by using the '*' as shown below:
27-
[assembly: AssemblyVersion("2.0.1")]
28-
[assembly: AssemblyFileVersion("2.0.1")]
27+
[assembly: AssemblyVersion("2.0.2")]
28+
[assembly: AssemblyFileVersion("2.0.2")]
2929
[assembly: Guid("672570AF-CC57-4980-86F9-D48FD1CC707D")]

version.info

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
:
2-
Early update check:2.0.1
2+
Early update check:2.0.2
33
Early update check!de:3
44
Early update check!ru:2
55
:

0 commit comments

Comments
 (0)