Re: Confirm Installed Run-Time Version



hi john,

well that explains the dearth of google results, thanks.

i have to do this for MAC platforms as well, (where installing gtk+ is a right-old PITA), so i will use solution 2 and simply provide all the necessary gtk+ libraries as part of the app install itself.

however, as you note, this is a cumbersome burden i don't want to have to unnecessarily suffer on LINUX as well. �so, i've gone for a third option, namely:
cheers,

richard

====== VERSION CHECK BEGIN ========
#include <gtk/gtk.h>

// minimum version required = 2.14.0
#define GTK_MAJOR_VER_MIN 2
#define GTK_MINOR_VER_MIN 14
#define GTK_MICRO_VER_MIN 0
#define SUCCESS "TRUE"
#define FAILURE "FALSE"

int main(int argc, char **argv)
{
� const gchar *verCheck = gtk_check_version(GTK_MAJOR_VER_MIN,�
� � � � � � � � � � � � � � � � � � � � � � � GTK_MINOR_VER_MIN,
� � � � � � � � � � � � � � � � � � � � � � � GTK_MICRO_VER_MIN);
� printf("%s\n", (verCheck ? FAILURE : SUCCESS));
� return 0;
}
====== VERSION CHECK END ========


On Mon, Jul 18, 2011 at 11:05 PM, <jcupitt gmail com> wrote:
Hi Richard,

On Monday, 18 July 2011, richard boaz <ivor boaz gmail com> wrote:
> i'm trying to create an installer of my program for all variants LINUX, but am having trouble with something i had hoped/though would be trivial.
> how does one confirm from the shell which version of the run-time GTK+ libraries are installed?

I think you have two possible solutions.

The easiest is to make a useful and popular program and simply let
other people package it for you for the various distributions. I think
this is probably the only way to safely link to the users existing set
of packages without having to do a crazy amount of work.

Second best is to do what people do on OS X and Windows and bundle the
libs you use with your program, plus a wrapper script that makes your
program pick up your gtk rather than the host one (if any). This is
what firefox does, for example. You'll find this is a lot of work,
sadly.

There are projects which aim to provide cross- Linux binary packaging
systems, but I've not tried any of them.

John



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]