Skip to content
Curtis Wensley edited this page Dec 4, 2014 · 10 revisions

Contributing to Eto.Forms

Code conventions

The following general guidelines are used for Eto:

  • Use Tabs, not Spaces
  • Otherwise, follow Visual Studio default formatting rules

In Xamarin Studio, the rules are set in the project files so that code written should follow these guidelines when formatted regardless of your default settings.

For Visual Studio (and other editors), install the Editor Config addin to automatically use the correct settings without having to change them globally.

System Requirements

These are the system requirements for developing and/or contributing to Eto.Forms. Note that these are not necessarily the same requirements for running Eto.Forms apps, which are outlined in Supported Platforms.

Windows

On Windows, you can target WPF, WinRT, Windows Forms, and GTK#2.

Notes:

  • Cannot build or run Xamarin.Mac applications
  • Can build/run Xamarin.iOS applications, with the purchase of Xamarin for Visual Studio (and a Mac).
  • Can build and package MonoMac applications, but cannot run them

OS X

On Mac OS X, you can target MonoMac, Xamarin.Mac and GTK#2.

Notes:

  • If you have not downloaded/purchased Xamarin.Mac, you can use the Eto - Free.sln since Xamarin Studio won't allow you to load the net40 or net45 solutions without it (yet).
  • Cannot build or run WPF applications
  • Windows Forms applications can be built, but do not run properly due to bugs in mono's implementation

Linux

On Linux, you can target GTK#2 or GTK#3

Notes:

  • Only Eto - net40.sln can be used for development on linux, as mono doesn't ship with the PCL reference assemblies required for the net45 build.
  • Some distros have packages available for GTK#3, such as Ubuntu 14.04 or greater.
  • For Nuget packages to download properly on linux, you need to import the SSL root certificates using the mozroots --import --sync command.
  • Cannot build WPF, Xamarin.iOS, Xamarin.Android, or Xamarin.Mac applications
  • Can build MonoMac applications, but not run them
  • Windows Forms applications can be built, but do not run properly due to bugs in mono's implementation

Building

To build with Xamarin Studio/Monodevelop (5.x+), or Visual Studio (2013+), you can use one of the solution files:

  • Eto - net45.sln - PCL Profile 259 for Eto.dll, and .NET 4.5 for platform dll's. Compatible with Mono 3.10 in linux, but cannot build.
  • Eto - Android.sln - Android build using PCL Profile 259 for Eto.dll
  • Eto - iOS.sln - iOS build using PCL Profile 259 for Eto.dll
  • Eto - net40.sln - .NET 4.0 version, compatible with mono 3.2.x to support popular linux distros
  • Eto - Free.sln - Same as Eto - net40.sln, but excludes Xamarin.Mac projects.

To build Eto.Forms and associated NuGet packages outside of your IDE, you can run the Resources/package.sh (mac) or Resources\package.cmd (windows) scripts. You can also pass a parameter to these scripts to set the new version. E.g.

./package.sh 2.1.0 or package.cmd 2.1.0

On linux, use xbuild with mono >= 3.10, or mdtool with mono < 3.10 on Eto - net40.sln. Mono on linux does not come with the PCL reference assemblies, so you cannot build the PCL version on linux.

Pull Requests

Ensure your pull request builds and passes all tests on the CI (Continuous Integration) server here. A check or X will show next to your pull request on github showing you the build status.

Also, it is preferred if you rebase and squash your commits on the current develop branch instead of merging. This keeps the change log clean and easy to read when looking at history, and also avoids many errors when manually merging conflicted files. Read up about it here.

Contributing Guidelines

  1. You agree to the licensing terms

    Eto.Forms is BSD-3 Licensed. By sending a pull request, you agree to license your contributions by the same license.