Update Xwt and support GTK3

cc @cra0zy and #233
This commit is contained in:
Drew DeVault 2016-03-17 18:46:52 -04:00
parent 64cc248b86
commit 6d36fc82a6
7 changed files with 48 additions and 6 deletions

View File

@ -14,9 +14,18 @@ namespace TrueCraft.Launcher
public static void Main(string[] args)
{
if (RuntimeInfo.IsLinux)
Application.Initialize(ToolkitType.Gtk);
{
try
{
Application.Initialize(ToolkitType.Gtk3);
}
catch
{
Application.Initialize(ToolkitType.Gtk);
}
}
else if (RuntimeInfo.IsMacOSX)
Application.Initialize(ToolkitType.Gtk);
Application.Initialize(ToolkitType.Gtk); // TODO: Cocoa
else if (RuntimeInfo.IsWindows)
Application.Initialize(ToolkitType.Wpf);
UserSettings.Local = new UserSettings();

View File

@ -66,9 +66,6 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<EmbeddedResource Include="Content\truecraft_logo.png" />
<Content Include="Xwt.Gtk.dll.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\TrueCraft.API\TrueCraft.API.csproj">
@ -101,6 +98,18 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="packages.config" />
<None Include="..\lib\Xwt.Gtk3.dll">
<Link>Xwt.Gtk3.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\lib\Xwt.Gtk.dll.config">
<Link>Xwt.Gtk.dll.config</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\lib\Xwt.Gtk3.dll.config">
<Link>Xwt.Gtk3.dll.config</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Content\truecraft-logo.png" />

Binary file not shown.

View File

@ -8,6 +8,7 @@
<dllmap os="!windows,osx" dll="libpango-1.0-0.dll" target="libpango-1.0.so.0"/>
<dllmap os="!windows,osx" dll="libpangocairo-1.0-0.dll" target="libpangocairo-1.0.so.0"/>
<dllmap os="!windows,osx" dll="libwebkitgtk-1.0-0.dll" target="libwebkitgtk-1.0.so.0"/>
<dllmap os="!windows,osx" dll="fontconfig" target="libfontconfig.so.1"/>
<dllmap os="osx" dll="libglib-2.0-0.dll" target="libglib-2.0.0.dylib"/>
<dllmap os="osx" dll="libgobject-2.0-0.dll" target="libgobject-2.0.0.dylib"/>
@ -17,4 +18,5 @@
<dllmap os="osx" dll="libpango-1.0-0.dll" target="libpango-1.0.0.dylib"/>
<dllmap os="osx" dll="libpangocairo-1.0-0.dll" target="libpangocairo-1.0.0.dylib"/>
<dllmap os="osx" dll="libwebkitgtk-1.0-0.dll" target="libwebkitgtk-1.0.0.dylib"/>
</configuration>
<dllmap os="osx" dll="fontconfig" target="libfontconfig.1.dylib"/>
</configuration>

BIN
lib/Xwt.Gtk3.dll Executable file

Binary file not shown.

22
lib/Xwt.Gtk3.dll.config Normal file
View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap os="!windows,osx" dll="libglib-2.0-0.dll" target="libglib-2.0.so.0"/>
<dllmap os="!windows,osx" dll="libgobject-2.0-0.dll" target="libgobject-2.0.so.0"/>
<dllmap os="!windows,osx" dll="libatk-1.0-0.dll" target="libatk-1.0.so.0"/>
<dllmap os="!windows,osx" dll="libgtk-3-0.dll" target="libgtk-3.so.0"/>
<dllmap os="!windows,osx" dll="libgdk-3-0.dll" target="libgdk-3.so.0"/>
<dllmap os="!windows,osx" dll="libpango-1.0-0.dll" target="libpango-1.0.so.0"/>
<dllmap os="!windows,osx" dll="libpangocairo-1.0-0.dll" target="libpangocairo-1.0.so.0"/>
<dllmap os="!windows,osx" dll="libwebkitgtk-3.0-0.dll" target="libwebkitgtk-3.0.so.0"/>
<dllmap os="!windows,osx" dll="fontconfig" target="libfontconfig.so.1"/>
<dllmap os="osx" dll="libglib-2.0-0.dll" target="libglib-2.0.0.dylib"/>
<dllmap os="osx" dll="libgobject-2.0-0.dll" target="libgobject-2.0.0.dylib"/>
<dllmap os="osx" dll="libatk-1.0-0.dll" target="libatk-1.0.0.dylib"/>
<dllmap os="osx" dll="libgtk-3-0.dll" target="libgtk-quartz-3.0.0.dylib"/>
<dllmap os="osx" dll="libgdk-3-0.dll" target="libgdk-quartz-3.0.0.dylib"/>
<dllmap os="osx" dll="libpango-1.0-0.dll" target="libpango-1.0.0.dylib"/>
<dllmap os="osx" dll="libpangocairo-1.0-0.dll" target="libpangocairo-1.0.0.dylib"/>
<dllmap os="osx" dll="libwebkitgtk-3.0-0.dll" target="libwebkitgtk-3.0.0.dylib"/>
<dllmap os="osx" dll="fontconfig" target="libfontconfig.1.dylib"/>
</configuration>

Binary file not shown.