-
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add GTK to the dotnet template
- Loading branch information
Showing
8 changed files
with
260 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace NewApp.Gtk | ||
open System.Reflection | ||
open System.Runtime.CompilerServices | ||
|
||
[<assembly: AssemblyTitle("NewApp.Gtk")>] | ||
[<assembly: AssemblyDescription("")>] | ||
[<assembly: AssemblyConfiguration("")>] | ||
[<assembly: AssemblyCompany("")>] | ||
[<assembly: AssemblyProduct("")>] | ||
[<assembly: AssemblyCopyright("")>] | ||
[<assembly: AssemblyTrademark("")>] | ||
|
||
// The assembly version has the format {Major}.{Minor}.{Build}.{Revision} | ||
|
||
[<assembly: AssemblyVersion("1.0.0.0")>] | ||
|
||
//[<assembly: AssemblyDelaySign(false)>] | ||
//[<assembly: AssemblyKeyFile("")>] | ||
|
||
() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace NewApp.Gtk | ||
module Main = | ||
|
||
open System | ||
open Xamarin.Forms | ||
open Xamarin.Forms.Platform.GTK | ||
|
||
[<EntryPoint>] | ||
let Main(args) = | ||
Gtk.Application.Init() | ||
Forms.Init() | ||
|
||
let app = new NewApp.App() | ||
let window = new FormsWindow() | ||
window.LoadApplication(app) | ||
window.SetApplicationTitle("Hello Fabulous GTK#") | ||
window.Show(); | ||
|
||
Gtk.Application.Run() | ||
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="..\packages\Xamarin.Forms.XamarinFormsSdk\build\netstandard2.0\Xamarin.Forms.props" Condition="Exists('..\packages\Xamarin.Forms.XamarinFormsSdk\build\netstandard2.0\Xamarin.Forms.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{C6A6BA94-897C-48B5-8046-3DF33897BA94}</ProjectGuid> | ||
<UseStandardResourceNames>true</UseStandardResourceNames> | ||
<OutputType>WinExe</OutputType> | ||
<RootNamespace>NewApp.Gtk</RootNamespace> | ||
<AssemblyName>NewApp.Gtk</AssemblyName> | ||
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug</OutputPath> | ||
<DefineConstants>DEBUG</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<PlatformTarget></PlatformTarget> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release</OutputPath> | ||
<DefineConstants></DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<GenerateTailCalls>true</GenerateTailCalls> | ||
<PlatformTarget></PlatformTarget> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0' OR '$(VisualStudioVersion)' == '11.0'"> | ||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="mscorlib" /> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="gtk-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> | ||
<Package>gtk-sharp-2.0</Package> | ||
<SpecificVersion>False</SpecificVersion> | ||
</Reference> | ||
<Reference Include="gdk-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> | ||
<Package>gtk-sharp-2.0</Package> | ||
<SpecificVersion>False</SpecificVersion> | ||
</Reference> | ||
<Reference Include="glib-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> | ||
<Package>glib-sharp-2.0</Package> | ||
<SpecificVersion>False</SpecificVersion> | ||
</Reference> | ||
<Reference Include="glade-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> | ||
<SpecificVersion>False</SpecificVersion> | ||
</Reference> | ||
<Reference Include="pango-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> | ||
<Package>gtk-sharp-2.0</Package> | ||
<SpecificVersion>False</SpecificVersion> | ||
</Reference> | ||
<Reference Include="atk-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> | ||
<Package>gtk-sharp-2.0</Package> | ||
<SpecificVersion>False</SpecificVersion> | ||
</Reference> | ||
<Reference Include="OpenTK"> | ||
<HintPath>..\packages\Xamarin.Forms.Platform.GTK.XamarinFormsSdk\lib\net45\OpenTK.dll</HintPath> | ||
</Reference> | ||
<Reference Include="webkit-sharp"> | ||
<HintPath>..\packages\Xamarin.Forms.Platform.GTK.XamarinFormsSdk\lib\net45\webkit-sharp.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Xamarin.Forms.Platform.GTK"> | ||
<HintPath>..\packages\Xamarin.Forms.Platform.GTK.XamarinFormsSdk\lib\net45\Xamarin.Forms.Platform.GTK.dll</HintPath> | ||
</Reference> | ||
<Reference Include="FSharp.Core"> | ||
<HintPath>..\packages\FSharp.Core.FSharpCorePkgVersion\lib\net45\FSharp.Core.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Xamarin.Forms.Core"> | ||
<HintPath>..\packages\Xamarin.Forms.XamarinFormsSdk\lib\netstandard2.0\Xamarin.Forms.Core.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Xamarin.Forms.Platform"> | ||
<HintPath>..\packages\Xamarin.Forms.XamarinFormsSdk\lib\netstandard2.0\Xamarin.Forms.Platform.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Xamarin.Forms.Xaml"> | ||
<HintPath>..\packages\Xamarin.Forms.XamarinFormsSdk\lib\netstandard2.0\Xamarin.Forms.Xaml.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Fabulous.Core"> | ||
<HintPath>..\packages\Fabulous.Core.FabulousPkgsVersion\lib\netstandard2.0\Fabulous.Core.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Fabulous.CustomControls"> | ||
<HintPath>..\packages\Fabulous.CustomControls.FabulousPkgsVersion\lib\netstandard2.0\Fabulous.CustomControls.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Newtonsoft.Json"> | ||
<HintPath>..\packages\Newtonsoft.Json.NewtonsoftJsonPkg\lib\net45\Newtonsoft.Json.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="AssemblyInfo.fs" /> | ||
<Compile Include="Main.fs" /> | ||
<None Include="packages.config" /> | ||
<None Include="webkit-sharp.dll.config" /> | ||
<None Include="OpenTK.dll.config" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\NewApp\NewApp.fsproj"> | ||
<Project>{B7ADC7B5-53E0-424E-A43F-D59B8638B9C5}</Project> | ||
<Name>NewApp</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<Import Project="$(FSharpTargetsPath)" /> | ||
<Import Project="..\packages\Xamarin.Forms.XamarinFormsSdk\build\netstandard2.0\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.XamarinFormsSdk\build\netstandard2.0\Xamarin.Forms.targets')" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<configuration> | ||
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/> | ||
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/> | ||
<dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/> | ||
<dllmap os="linux" dll="alut.dll" target="libalut.so.0"/> | ||
<dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/> | ||
<dllmap os="linux" dll="libX11" target="libX11.so.6"/> | ||
<dllmap os="linux" dll="libXi" target="libXi.so.6"/> | ||
<dllmap os="linux" dll="SDL2.dll" target="libSDL2-2.0.so.0"/> | ||
<dllmap os="osx" dll="opengl32.dll" target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/> | ||
<dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" /> | ||
<dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" /> | ||
<dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> | ||
<dllmap os="osx" dll="libGLESv1_CM.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> | ||
<dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" /> | ||
<dllmap os="osx" dll="opencl.dll" target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/> | ||
<dllmap os="osx" dll="SDL2.dll" target="libSDL2.dylib"/> | ||
<!-- XQuartz compatibility (X11 on Mac) --> | ||
<dllmap os="osx" dll="libGL.so.1" target="/usr/X11/lib/libGL.dylib"/> | ||
<dllmap os="osx" dll="libX11" target="/usr/X11/lib/libX11.dylib"/> | ||
<dllmap os="osx" dll="libXcursor.so.1" target="/usr/X11/lib/libXcursor.dylib"/> | ||
<dllmap os="osx" dll="libXi" target="/usr/X11/lib/libXi.dylib"/> | ||
<dllmap os="osx" dll="libXinerama" target="/usr/X11/lib/libXinerama.dylib"/> | ||
<dllmap os="osx" dll="libXrandr.so.2" target="/usr/X11/lib/libXrandr.dylib"/> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Fabulous.Core" version="FabulousPkgsVersion" targetFramework="net471" /> | ||
<package id="Fabulous.CustomControls" version="FabulousPkgsVersion" targetFramework="net472" /> | ||
<package id="FSharp.Core" version="FSharpCorePkgVersion" targetFramework="net451" /> | ||
<package id="Newtonsoft.Json" version="NewtonsoftJsonPkg" targetFramework="net471" /> | ||
<package id="Xamarin.Forms" version="XamarinFormsSdk" targetFramework="net471" /> | ||
<package id="Xamarin.Forms.Platform.GTK" version="XamarinFormsSdk" targetFramework="net451" /> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<configuration> | ||
<dllmap dll="webkit-1.0" target="/usr/lib/x86_64-linux-gnu/libwebkitgtk-1.0.so"/> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters