zwcloud / CairoSharp

A C# wrapper of cairo http://cairographics.org/
GNU Lesser General Public License v3.0
65 stars 12 forks source link

Current clone-build-run experience is not seamless. #3

Open zwcloud opened 6 years ago

zwcloud commented 6 years ago

We must ensure that the following process is never interrupted by any errors that is hard to solve.

  1. git clone
  2. build solution
  3. debug/release run demo projects

Some hard errors that should be avoided:

  1. Windows SDK version not right: users need to download the required windows SDK, which is really time-consuming.
  2. .NET Framework / .NET Core not installed: time-consuming
  3. Provide pre-built dll/so if a developer don't want to build native libraries by him/herself, which is time-consuming.

Target: Clone, build C# projects and run demos seamlessly on Win10 with VS2017 only.

zwcloud commented 6 years ago

Windows

Done for specific environment on Windows in https://github.com/zwcloud/CairoSharp/commit/1a2618181348bed1a9b6048ece5d775c709140b8:

The built demos now runs on Win7/10 x64 without any additional configuration. For Win7/Win10 x86, the property of demo projects should be changed to x86 (Not AnyCPU and prefer 32bit).

Note: Native dll and pdb files are copied with NativeLibraryCopier.exe in the pre-build event of C# projects. The copier has taken all platforms(x64/x86) and Debug/Release version into consideration.

zwcloud commented 6 years ago

Linux

Trying to build native cairo in Windows Subsystem for Linux. See Targeting the Windows Subsystem for Linux from Visual Studio.

TODO