Replace XULRunner with GeckoFX

This commit is contained in:
Sean Kaim
2016-06-07 15:43:44 -04:00
parent 678194f4f7
commit 29c7859ea1
26 changed files with 67 additions and 29 deletions

View File

@@ -1,5 +1,6 @@
using System;
using System.Windows.Forms;
using Gecko;
using mRemoteNG.Tools;
using mRemoteNG.App;
using TabPage = Crownwood.Magic.Controls.TabPage;
@@ -24,8 +25,8 @@ namespace mRemoteNG.Connection.Protocol.Http
{
if (RenderingEngine == RenderingEngine.Gecko)
{
Control = new MiniGeckoBrowser.MiniGeckoBrowser();
((MiniGeckoBrowser.MiniGeckoBrowser)Control).XULrunnerPath = Convert.ToString(Settings.Default.XULRunnerPath);
Xpcom.Initialize("Firefox");
Control = new GeckoWebBrowser();
}
else
{
@@ -64,14 +65,14 @@ namespace mRemoteNG.Connection.Protocol.Http
if (InterfaceControl.Info.RenderingEngine == RenderingEngine.Gecko)
{
MiniGeckoBrowser.MiniGeckoBrowser objMiniGeckoBrowser = wBrowser as MiniGeckoBrowser.MiniGeckoBrowser;
if (objMiniGeckoBrowser != null)
{
objMiniGeckoBrowser.TitleChanged += geckoBrowser_DocumentTitleChanged;
objMiniGeckoBrowser.LastTabRemoved += wBrowser_LastTabRemoved;
}
}
else
GeckoWebBrowser GeckoBrowser = (GeckoWebBrowser) wBrowser;
if (GeckoBrowser != null)
{
GeckoBrowser.DocumentTitleChanged += geckoBrowser_DocumentTitleChanged;
//GeckoBrowser.Tab.LastTabRemoved += wBrowser_LastTabRemoved;
}
}
else
{
WebBrowser objWebBrowser = (WebBrowser)wBrowser;
//SHDocVw.WebBrowserClass objAxWebBrowser = (SHDocVw.WebBrowserClass)objWebBrowser.ActiveXInstance;
@@ -121,7 +122,7 @@ namespace mRemoteNG.Connection.Protocol.Http
if (InterfaceControl.Info.RenderingEngine == RenderingEngine.Gecko)
{
((MiniGeckoBrowser.MiniGeckoBrowser)wBrowser).Navigate(strHost + ":" + InterfaceControl.Info.Port);
((GeckoWebBrowser)wBrowser).Navigate(strHost + ":" + InterfaceControl.Info.Port);
}
else
{
@@ -137,7 +138,7 @@ namespace mRemoteNG.Connection.Protocol.Http
if (InterfaceControl.Info.RenderingEngine == RenderingEngine.Gecko)
{
((MiniGeckoBrowser.MiniGeckoBrowser)wBrowser).Navigate(strHost);
((GeckoWebBrowser)wBrowser).Navigate(strHost);
}
else
{
@@ -203,13 +204,13 @@ namespace mRemoteNG.Connection.Protocol.Http
if (InterfaceControl.Info.RenderingEngine == RenderingEngine.Gecko)
{
if (((MiniGeckoBrowser.MiniGeckoBrowser) wBrowser).Title.Length >= 30)
if (((GeckoWebBrowser) wBrowser).DocumentTitle.Length >= 30)
{
shortTitle = ((MiniGeckoBrowser.MiniGeckoBrowser) wBrowser).Title.Substring(0, 29) + " ...";
shortTitle = ((GeckoWebBrowser) wBrowser).DocumentTitle.Substring(0, 29) + " ...";
}
else
{
shortTitle = ((MiniGeckoBrowser.MiniGeckoBrowser) wBrowser).Title;
shortTitle = ((GeckoWebBrowser) wBrowser).DocumentTitle;
}
}
else
@@ -226,7 +227,7 @@ namespace mRemoteNG.Connection.Protocol.Http
if (!string.IsNullOrEmpty(tabTitle))
{
tabP.Title = tabTitle + " - " + shortTitle;
tabP.Title = tabTitle + @" - " + shortTitle;
}
else
{
@@ -241,7 +242,7 @@ namespace mRemoteNG.Connection.Protocol.Http
}
private void geckoBrowser_DocumentTitleChanged(object sender, string e)
private void geckoBrowser_DocumentTitleChanged(object sender, EventArgs e)
{
try
{
@@ -253,13 +254,13 @@ namespace mRemoteNG.Connection.Protocol.Http
if (InterfaceControl.Info.RenderingEngine == RenderingEngine.Gecko)
{
if (((MiniGeckoBrowser.MiniGeckoBrowser) wBrowser).Title.Length >= 30)
if (((GeckoWebBrowser)wBrowser).DocumentTitle.Length >= 30)
{
shortTitle = ((MiniGeckoBrowser.MiniGeckoBrowser) wBrowser).Title.Substring(0, 29) + " ...";
shortTitle = ((GeckoWebBrowser) wBrowser).DocumentTitle.Substring(0, 29) + " ...";
}
else
{
shortTitle = ((MiniGeckoBrowser.MiniGeckoBrowser) wBrowser).Title;
shortTitle = ((GeckoWebBrowser) wBrowser).DocumentTitle;
}
}
else
@@ -276,7 +277,7 @@ namespace mRemoteNG.Connection.Protocol.Http
if (!string.IsNullOrEmpty(tabTitle))
{
tabP.Title = tabTitle + " - " + shortTitle;
tabP.Title = tabTitle + @" - " + shortTitle;
}
else
{

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
mRemoteV1/Firefox/nss3.dll Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
mRemoteV1/Firefox/omni.ja Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
mRemoteV1/Firefox/xul.dll Normal file

Binary file not shown.

View File

@@ -42,6 +42,8 @@
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -96,6 +98,14 @@
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<ItemGroup>
<Reference Include="Geckofx-Core, Version=45.0.19.0, Culture=neutral, PublicKeyToken=3209ac31600d1857, processorArchitecture=x86">
<HintPath>..\packages\Geckofx45.45.0.19.0\lib\net40\Geckofx-Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Geckofx-Winforms, Version=45.0.19.0, Culture=neutral, PublicKeyToken=3209ac31600d1857, processorArchitecture=MSIL">
<HintPath>..\packages\Geckofx45.45.0.19.0\lib\net40\Geckofx-Winforms.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="ADTree, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@@ -114,18 +124,10 @@
<HintPath>References\MagicLibrary.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MiniGeckoBrowser, Version=1.0.3142.33318, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>References\MiniGeckoBrowser.dll</HintPath>
</Reference>
<Reference Include="Org.Mentalis.Security, Version=1.0.13.715, Culture=neutral">
<SpecificVersion>False</SpecificVersion>
<HintPath>References\Org.Mentalis.Security.dll</HintPath>
</Reference>
<Reference Include="Skybound.Gecko, Version=1.8.1.4, Culture=neutral, PublicKeyToken=3209ac31600d1857, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>References\Skybound.Gecko.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
@@ -677,12 +679,36 @@
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="Firefox\omni.ja" />
<None Include="packages.config" />
<None Include="Properties\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="Firefox\AccessibleMarshal.dll" />
<Content Include="Firefox\breakpadinjector.dll" />
<Content Include="Firefox\D3DCompiler_43.dll" />
<Content Include="Firefox\d3dcompiler_47.dll" />
<Content Include="Firefox\freebl3.dll" />
<Content Include="Firefox\icudt56.dll" />
<Content Include="Firefox\icuin56.dll" />
<Content Include="Firefox\icuuc56.dll" />
<Content Include="Firefox\lgpllibs.dll" />
<Content Include="Firefox\libEGL.dll" />
<Content Include="Firefox\libGLESv2.dll" />
<Content Include="Firefox\mozglue.dll" />
<Content Include="Firefox\msvcp120.dll" />
<Content Include="Firefox\msvcr120.dll" />
<Content Include="Firefox\nss3.dll" />
<Content Include="Firefox\nssckbi.dll" />
<Content Include="Firefox\nssdbm3.dll" />
<Content Include="Firefox\plugin-container.exe" />
<Content Include="Firefox\plugin-hang-ui.exe" />
<Content Include="Firefox\sandboxbroker.dll" />
<Content Include="Firefox\softokn3.dll" />
<Content Include="Firefox\xul.dll" />
<Content Include="Resources\Help\CMDSwitches.htm">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -1226,4 +1252,11 @@ editbin /largeaddressaware $(TargetPath)</PostBuildEvent>
</Target>
-->
<Import Project="$(MSBuildBinPath)/Microsoft.CSharp.targets" />
<Import Project="..\packages\Geckofx45.45.0.19.0\build\Geckofx45.targets" Condition="Exists('..\packages\Geckofx45.45.0.19.0\build\Geckofx45.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Geckofx45.45.0.19.0\build\Geckofx45.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Geckofx45.45.0.19.0\build\Geckofx45.targets'))" />
</Target>
</Project>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Geckofx45" version="45.0.19.0" targetFramework="net40" />
</packages>