diff --git a/.cvsignore b/.cvsignore index c89d15ee32..1725bc7ba4 100644 --- a/.cvsignore +++ b/.cvsignore @@ -10,3 +10,4 @@ config.status libtool aclocal.m4 gimprc_user +gimptool diff --git a/ChangeLog b/ChangeLog index 3b7827cbcf..1b0857b09d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,12 @@ -Sat May 2 16:10:05 EDT 1998 EDT 1998 Matthew Wilson +Sat May 2 14:31:46 PDT 1998 Manish Singh + + * app/about_dialog.c + * app/app_procs.c + * app/main.c: use GIMP_VERSION from config.h now + + * gimptool made to ease plug-in development and installation + +Sat May 2 16:10:05 EDT 1998 Matthew Wilson * app/channels_dialog.c: removed my broken fix, put in a fix that works diff --git a/Makefile.am b/Makefile.am index 127efe3446..bee50af783 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,6 +2,8 @@ SUBDIRS = libgimp plug-ins app data +bin_SCRIPTS = gimptool + EXTRA_DIST = TODO NOTES gtkrc gimp_logo.ppm gimp_splash.ppm rmshm user_install gimp_tips.txt ps-menurc gimpdata_DATA = gimprc gimprc_user gtkrc gimp_logo.ppm gimp_splash.ppm gimp_tips.txt ps-menurc diff --git a/acconfig.h b/acconfig.h index ca47c3b2d3..efd031acf9 100644 --- a/acconfig.h +++ b/acconfig.h @@ -14,10 +14,7 @@ Leave the following blank line there!! Autoheader needs it. */ -/* These get defined to the version numbers in configure.in */ -#undef GIMP_MAJOR_VERSION_NUMBER -#undef GIMP_MINOR_VERSION_NUMBER -#undef GIMP_MICRO_VERSION_NUMBER +#undef GIMP_VERSION #undef HAVE_DIRENT_H #undef HAVE_DOPRNT diff --git a/app/Makefile.am b/app/Makefile.am index d17e873a28..545d3725dc 100644 --- a/app/Makefile.am +++ b/app/Makefile.am @@ -287,8 +287,7 @@ EXTRA_DIST = \ CPPFLAGS = \ -DLIBDIR=\""$(gimpplugindir)"\" \ -DDATADIR=\""$(gimpdatadir)"\" \ - -DGIMPDIR=\""$(gimpdir)"\" \ - -DVERSION=\"$(VERSION)\" + -DGIMPDIR=\""$(gimpdir)"\" INCLUDES = \ $(X_CFLAGS) \ diff --git a/app/about_dialog.c b/app/about_dialog.c index a84e9e8756..790d0156d7 100644 --- a/app/about_dialog.c +++ b/app/about_dialog.c @@ -1,10 +1,29 @@ +/* The GIMP -- an image manipulation program + * Copyright (C) 1995 Spencer Kimball and Peter Mattis + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ #include #include #include -#include "gtk/gtk.h" +#include #include "about_dialog.h" #include "interface.h" +#include "config.h" + #define ANIMATION_STEPS 16 #define ANIMATION_SIZE 2 @@ -167,7 +186,7 @@ about_dialog_create (int timeout) style->font = gdk_font_load ("-Adobe-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*"); gtk_widget_push_style (style); - label = gtk_label_new ("Version " VERSION " brought to you by"); + label = gtk_label_new ("Version " GIMP_VERSION " brought to you by"); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0); gtk_widget_show (label); diff --git a/app/app_procs.c b/app/app_procs.c index 314d6fe7e3..e79b615d1a 100644 --- a/app/app_procs.c +++ b/app/app_procs.c @@ -55,6 +55,8 @@ #include "xcf.h" #include +#include "config.h" + #define LOGO_WIDTH_MIN 350 #define LOGO_HEIGHT_MIN 110 #define NAME "The GIMP" @@ -262,9 +264,9 @@ splash_text_draw (GtkWidget *widget) gdk_draw_string (widget->window, font, widget->style->black_gc, - ((logo_area_width - gdk_string_width (font, VERSION)) / 2), + ((logo_area_width - gdk_string_width (font, GIMP_VERSION)) / 2), (0.45 * logo_area_height), - VERSION); + GIMP_VERSION); gdk_draw_string (widget->window, font, widget->style->black_gc, diff --git a/app/dialogs/about-dialog.c b/app/dialogs/about-dialog.c index a84e9e8756..790d0156d7 100644 --- a/app/dialogs/about-dialog.c +++ b/app/dialogs/about-dialog.c @@ -1,10 +1,29 @@ +/* The GIMP -- an image manipulation program + * Copyright (C) 1995 Spencer Kimball and Peter Mattis + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ #include #include #include -#include "gtk/gtk.h" +#include #include "about_dialog.h" #include "interface.h" +#include "config.h" + #define ANIMATION_STEPS 16 #define ANIMATION_SIZE 2 @@ -167,7 +186,7 @@ about_dialog_create (int timeout) style->font = gdk_font_load ("-Adobe-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*"); gtk_widget_push_style (style); - label = gtk_label_new ("Version " VERSION " brought to you by"); + label = gtk_label_new ("Version " GIMP_VERSION " brought to you by"); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0); gtk_widget_show (label); diff --git a/app/gui/about-dialog.c b/app/gui/about-dialog.c index a84e9e8756..790d0156d7 100644 --- a/app/gui/about-dialog.c +++ b/app/gui/about-dialog.c @@ -1,10 +1,29 @@ +/* The GIMP -- an image manipulation program + * Copyright (C) 1995 Spencer Kimball and Peter Mattis + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ #include #include #include -#include "gtk/gtk.h" +#include #include "about_dialog.h" #include "interface.h" +#include "config.h" + #define ANIMATION_STEPS 16 #define ANIMATION_SIZE 2 @@ -167,7 +186,7 @@ about_dialog_create (int timeout) style->font = gdk_font_load ("-Adobe-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*"); gtk_widget_push_style (style); - label = gtk_label_new ("Version " VERSION " brought to you by"); + label = gtk_label_new ("Version " GIMP_VERSION " brought to you by"); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0); gtk_widget_show (label); diff --git a/app/main.c b/app/main.c index 54388139c3..4ff205daa0 100644 --- a/app/main.c +++ b/app/main.c @@ -175,7 +175,7 @@ main (int argc, char **argv) } if (show_version) - g_print ("GIMP version " VERSION "\n"); + g_print ("GIMP version " GIMP_VERSION "\n"); if (show_help) { diff --git a/config.h.in b/config.h.in index e7359d6db1..600fdee8c1 100644 --- a/config.h.in +++ b/config.h.in @@ -46,6 +46,8 @@ /* Define if you can safely include both and . */ #undef TIME_WITH_SYS_TIME +#undef GIMP_VERSION + #undef HAVE_DIRENT_H #undef HAVE_DOPRNT #undef HAVE_IPC_H diff --git a/configure.in b/configure.in index 828811968c..52f6975346 100644 --- a/configure.in +++ b/configure.in @@ -2,15 +2,17 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(gimprc.in) dnl Initialize automake stuff -dnl $Format: "GIMP_MAJOR_VERSION_NUMBER=$ReleaseMajorVersion$" $ -GIMP_MAJOR_VERSION_NUMBER=0 -dnl $Format: "GIMP_MINOR_VERSION_NUMBER=$ReleaseMinorVersion$" $ -GIMP_MINOR_VERSION_NUMBER=99 -dnl $Format: "GIMP_MICRO_VERSION_NUMBER=$ReleaseMicroVersion$" $ -GIMP_MICRO_VERSION_NUMBER=28 +dnl $Format: "GIMP_MAJOR_VERSION=$ReleaseMajorVersion$" $ +GIMP_MAJOR_VERSION=0 +dnl $Format: "GIMP_MINOR_VERSION=$ReleaseMinorVersion$" $ +GIMP_MINOR_VERSION=99 +dnl $Format: "GIMP_MICRO_VERSION=$ReleaseMicroVersion$" $ +GIMP_MICRO_VERSION=28 + +GIMP_VERSION=$GIMP_MAJOR_VERSION.$GIMP_MINOR_VERSION.$GIMP_MICRO_VERSION dnl $Format: "AM_INIT_AUTOMAKE(gimp, $ReleaseVersion$)" $ -AM_INIT_AUTOMAKE(gimp, 0.99.28) +AM_INIT_AUTOMAKE(gimp, $GIMP_VERSION) dnl Specify a header configuration file AM_CONFIG_HEADER(config.h) @@ -304,7 +306,7 @@ CPPFLAGS="$gimp_save_CPPFLAGS" LIBS="$gimp_save_LIBS" gimpdatadir=$datadir/gimp -gimpplugindir=$libdir/$PACKAGE/$GIMP_MAJOR_VERSION_NUMBER.$GIMP_MINOR_VERSION_NUMBER +gimpplugindir=$libdir/$PACKAGE/$GIMP_MAJOR_VERSION.$GIMP_MINOR_VERSION brushdata=`ls -1 $srcdir/data/brushes | grep -v Makefile` gradientdata=`ls -1 $srcdir/data/gradients | grep -v Makefile` @@ -380,6 +382,9 @@ if test $ac_cv_path_LPC_COMMAND != ":"; then LPC_DEF="-DLPC_COMMAND=\\\"$ac_cv_path_LPC_COMMAND\\\"" fi +AC_DEFINE_UNQUOTED(GIMP_VERSION, "$GIMP_VERSION") + +AC_SUBST(GIMP_VERSION) AC_SUBST(gimpdir) AC_SUBST(gimpdatadir) AC_SUBST(gimpplugindir) @@ -416,6 +421,7 @@ AC_OUTPUT( Makefile gimprc gimprc_user +gimptool libgimp/Makefile plug-ins/Makefile plug-ins/build @@ -555,5 +561,6 @@ data/Makefile data/brushes/Makefile data/gradients/Makefile data/palettes/Makefile -data/patterns/Makefile +data/patterns/Makefile, +chmod +x gimptool ) diff --git a/gimptool-1.2.in b/gimptool-1.2.in new file mode 100644 index 0000000000..3311d00ea5 --- /dev/null +++ b/gimptool-1.2.in @@ -0,0 +1,84 @@ +#!/bin/sh + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +exec_prefix_set=no + +usage="\ +Usage: gimptool [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags] [--build plug-in.c]" + +if test $# -eq 0; then + echo "${usage}" 1>&2 + exit 1 +fi + +if test x${GTK_CONFIG+set} != xset ; then + gtk_config=@GTK_CONFIG@ +else + gtk_config=$GTK_CONFIG +fi + +if test x${CC+set} != xset ; then + cc=@CC@ +else + cc=$CC +fi + +if test x${CFLAGS+set} != xset ; then + cflags='@CFLAGS@' +else + cflags="$CFLAGS" +fi + +while test $# -gt 0; do + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + case $1 in + --prefix=*) + prefix=$optarg + if test $exec_prefix_set = no ; then + exec_prefix=$optarg + fi + ;; + --prefix) + echo $prefix + ;; + --exec-prefix=*) + exec_prefix=$optarg + exec_prefix_set=yes + ;; + --exec-prefix) + echo $exec_prefix + ;; + --version) + echo @GIMP_VERSION@ + ;; + --cflags) + if test @includedir@ != /usr/include ; then + includes=-I@includedir@ + fi + echo $includes `$gtk_config --cflags` + ;; + --libs) + echo -L@libdir@ -lgimpui -lgimp `$gtk_config --libs` + ;; + --build) + if test @includedir@ != /usr/include ; then + includes=-I@includedir@ + fi + shift + cmd="$cc $cflags $includes `gtk-config --cflags` -o `echo $1|sed 's/\.[^\.]*$//'` $1 -L@libdir@ -lgimpui -lgimp `$gtk_config --libs`" + echo $cmd + eval $cmd + ;; + *) + echo "${usage}" 1>&2 + exit 1 + ;; + esac + shift +done + diff --git a/gimptool.in b/gimptool.in new file mode 100644 index 0000000000..3311d00ea5 --- /dev/null +++ b/gimptool.in @@ -0,0 +1,84 @@ +#!/bin/sh + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +exec_prefix_set=no + +usage="\ +Usage: gimptool [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags] [--build plug-in.c]" + +if test $# -eq 0; then + echo "${usage}" 1>&2 + exit 1 +fi + +if test x${GTK_CONFIG+set} != xset ; then + gtk_config=@GTK_CONFIG@ +else + gtk_config=$GTK_CONFIG +fi + +if test x${CC+set} != xset ; then + cc=@CC@ +else + cc=$CC +fi + +if test x${CFLAGS+set} != xset ; then + cflags='@CFLAGS@' +else + cflags="$CFLAGS" +fi + +while test $# -gt 0; do + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + case $1 in + --prefix=*) + prefix=$optarg + if test $exec_prefix_set = no ; then + exec_prefix=$optarg + fi + ;; + --prefix) + echo $prefix + ;; + --exec-prefix=*) + exec_prefix=$optarg + exec_prefix_set=yes + ;; + --exec-prefix) + echo $exec_prefix + ;; + --version) + echo @GIMP_VERSION@ + ;; + --cflags) + if test @includedir@ != /usr/include ; then + includes=-I@includedir@ + fi + echo $includes `$gtk_config --cflags` + ;; + --libs) + echo -L@libdir@ -lgimpui -lgimp `$gtk_config --libs` + ;; + --build) + if test @includedir@ != /usr/include ; then + includes=-I@includedir@ + fi + shift + cmd="$cc $cflags $includes `gtk-config --cflags` -o `echo $1|sed 's/\.[^\.]*$//'` $1 -L@libdir@ -lgimpui -lgimp `$gtk_config --libs`" + echo $cmd + eval $cmd + ;; + *) + echo "${usage}" 1>&2 + exit 1 + ;; + esac + shift +done +