HiDPI support in GTK+

2016-12-26 Thread Andoni Morales
Hi everyone!

We have a cross platform application named LongoMatch running in several
platforms in which we use GTK+, Linux, Windows and OS X. For historical
reasons and being a Mono C# app we are still using GTK+ 2, the latest
release in the 2.24 series and Cairo 1.14.
We are having some troubles rendering correctly images and themes in HiDPI
displays. Fonts and our custom widgets using Cairo are rendered correctly
so GDK and Cairo seems to be doing their job correctly with respect to
device scales. But Gtk.Images, like the ones in buttons, and
icons/resources from the theme are being upscaled. All our image resources
are SVG, so they can scale correctly. For example, in a retina display with
x2, a GTK image of 22x22 dp is being drawn in 22x22px and than upscaled to
44X44px. If I have a button of 22dp I would like to pass it an Image of
22px x Scale = 44px so that the image is rendered correctly without being
upscaled.
Is this possible with the current release of Gtk+2 or should I backport
something from Gtk+3 to make it happen?

Cheers,
Andoni
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Outdated win32 bundle

2015-06-12 Thread Andoni Morales
.

 MSYS2 is for developers, not for end users.

 Ok. Still I don't get it. I wanted a local directory install for GTK libs for
 compiling Wesnoth. I don't want system global install of MSYS2 - I
 already have MinGW unpacked locally and building with SCons. Is that
 possible?

 That's possible if you build GTK+ for yourself.

 There have been no binary builds of GTK+ since January 2013, but there
 have been five new development cycles, so if you want to use an up to
 date version of GTK+, your current choices for building your
 application on Windows are either to build GTK yourself, alongside its
 dependencies, or use MSYS2 and its packages.

 Telling your users to download your application; download DLLs from
 gtk.org; shove them into some directory; and, finally, hope for the
 best, was never a good software distribution mechanism.

 What about developers? I find it much better workflow when DLLs are
 local to the project being built rather then installed globally, because
 often you need to test several lib versions for testing different bugs and
 branches.

 That's what I said above.

 Can GTK be cross-compiled for Windows?

 Yes, it can, and it routinely is.

 Is there a single command to run to do this?

 There isn't. On Fedora you can use the mingw(32|64) toolchain packages
 to build your own packages.

 What the GTK team would love, on the other hand, is somebody putting
 the effort in setting up and maintaining a continuous integration
 service — similar to https://build.gnome.org — for Windows builds.
 This way we would be able to catch build regressions after every
 commit, without relying on the application developers to file bugs.

 http://www.appveyor.com/ if using closed source service is okay.

 No, it's really not — especially if it has to run on the gnome.org
 infrastructure.

 But it should be compiled using MinGW, not Visual Studio, right?
 Because appveyor is the only known CI service (to me) that compiles
 the stuff with VS.

 Visual Studio is another beast entirely.

 The GNOME Foundation kindly provided us with a VM that we can use to
 do Windows builds — which is what Tarnyko was using — using
 cross-compilation.

 Ciao,
  Emmanuele.

 --
 https://www.bassi.io
 [@] ebassi [@gmail.com]
 ___
 gtk-devel-list mailing list
 gtk-devel-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/gtk-devel-list



-- 
Andoni Morales Alastruey

LongoMatch:The Digital Coach
http://www.longomatch.ylatuya.es
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: GTK+3 win32/64 build environment

2013-04-14 Thread Andoni Morales
Hi,

I hope I am not too late in the discussion, Marc-André pointed me to it
yesterday :) i was not in the mailing list before so I don't know how to
jump in the discussion.

I am the author and current maintainer of cerbero, and like he described it
previously in this thread we are currently using it to build and package
GStreamer and its dependencies (more than 100) for Linux, Windows, OS X,
Android and IOS. You can check the results in
http://docs.gstreamer.com/display/GstSDK/Home

I believe cerbero could be very helpful for building  and packaging Gtk+ on
Windows and OS X. It's a build system that is platform and architecture
aware using recipes that are Python classes, which make it's very useful
for building software for different platforms and architecture and work
around all the build issues that are specific to a given platform or
architecture. I will try to highlight its different features to help you in
making your decision.


Bootstrap
===
Bootstrapping is handled internally by cerbero, taking care of installing
the toolchain and building or installing all the build dependencies (m4,
libtool, autoconf, automake, gettext, yasm, cmake, etc...). On Linux it
requires a base system with python and git, on OS X is requires
additionally installing XCode (for the packaging tools) and on Windows it
also requires Mingw/msys and WiX (for the packaging)

Bootstrapping is as easy as:
  $ cerbero bootstrap

Or for Windows cross-compilation:
  $ cerbero -c config/cross-win64 bootstrap

For Windows we provide pre-compiled  native and cross toolchain for w32 and
w64 using mingw-w64 (that are also built using cerbero), so it's not
tighted to a specific distro for cross-compilation.


Build

The build process is split in 2 big steps: source handling and build
handling. We have backends for SVN, Git and tarballs for the sources and
Makefiles, Autotools and CMake for the build.
Projects are described using recipes, which are Python classes, so it's
really easy customizing the build process for any kind of project, adding
new backends or overwriting the steps in the recipe itself sub-classing the
step functions.

cerbero supports native and cross-compilation for Windows and universal
builds in OS X, where each project is built in a separate tree for the
different target archs (ppc, i386, x86_64) and merged into universal
binaries.


Packaging

Besides building, cerbero is also able to create native packages such as
MSI installer in Windows and .pkg packages in OSX. There are 3 kind of
packages available:
  * Package: base package that creates merge modules in Windows and .pkg in
OS X
  * SdkPackage: collection of Package's creating final installer (MSI
installer in Windows and a meta-package .pkg in OS X)
  * Application: creates an installer for applications (MSI installer in
Windows, .app package in OSX)
For each package, a runtime and a development package is created to make
the distribution easier.

Redistribution and bundling in applications
==
It's also very easy for applications to embed an redistribute the runtime.
On Windows each package included in the final installer is made using Merge
Modules and the same for OS X using .pkg
We have documented the deployment strategies for applications here:
http://docs.gstreamer.com/display/GstSDK/Deploying+your+application


Integration with IDE's
===
Unfortunately not every body likes the shell, make,  the autotools and
pkg-config, so the integration with the native IDE's is very important.
The development package of the SDK allows developers using the regular
build process in unix systems, including the libtool libraries and the
pkgconfig files but it also allows developers to use VS or XCode.

For VS cerbero creates import libraries and a set of VS property sheets
similar to pkg-config files. So including Gtk+ in a Visual Studio project
is as simple as including the gtk+.props file, which will in turn include
all the dependency .props files and set the correct build and link flags.

For XCode cerbero creates a real OS X frameworks, so using the SDK is as
easy as drag and drop the Gtk+.framework into XCode .

I probably missed other features but I hope it's a good starting point to
convince you!

Cheers,
Andoni



-- 
Andoni Morales Alastruey

LongoMatch:The Digital Coach
http://www.longomatch.ylatuya.es
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list