Commit 0cda2cd3 authored by Tor Lillqvist's avatar Tor Lillqvist Committed by Tor Lillqvist
Browse files

New file, shell script used to build zipfiles for distribution of Windows

2003-10-09  Tor Lillqvist  <tml@iki.fi>

	* gimp-zip.in: New file, shell script used to build zipfiles for
	distribution of Windows runtime and developer packages.

	* Makefile.am
	* configure.in: Add it, expand it.

	* libgimp*/Makefile.am: On Windows, install and uninstall the .def
	files.

	* app/config/gimpguiconfig.c: On Windows, don't use the internal
	help browser by default, as it isn't there. Don't use a fixed
	guess for Internet Explorer's path on Windows. We don't even need
	to know the path to the web browser, we can use ShellExecute() in
	the webbrowser plug-in.

	* plug-ins/common/webbrowser.c: Use ShellExecute() on Windows.

	* po*/makefile.cygwin: Remove, unmaintained.
parent 7dc4c155
2003-10-09 Tor Lillqvist <tml@iki.fi>
 
* gimp-zip.in: New file, shell script used to build zipfiles for
distribution of Windows runtime and developer packages.
* Makefile.am
* configure.in: Add it, expand it.
* libgimp*/Makefile.am: On Windows, install and uninstall the .def
files.
* app/config/gimpguiconfig.c: On Windows, don't use the internal
help browser by default, as it isn't there. Don't use a fixed
guess for Internet Explorer's path on Windows. We don't even need
to know the path to the web browser, we can use ShellExecute() in
the webbrowser plug-in.
* plug-ins/common/webbrowser.c: Use ShellExecute() on Windows.
* po*/makefile.cygwin: Remove, unmaintained.
* libgimpmath/gimpmath.def: Fix typo.
 
* libgimp/gimp.def: Add gimp_rgn_iterator_src_dest.
......@@ -51,6 +51,7 @@ EXTRA_DIST = \
config.h.win32 \
gimp.spec.in \
gimp.spec \
gimp-zip.in \
gimptool-win32.c.in \
intltool-extract.in \
intltool-merge.in \
......
......@@ -52,8 +52,10 @@ static void gimp_gui_config_get_property (GObject *object,
#define DEFAULT_THEME "Default"
#ifdef G_OS_WIN32
#define DEFAULT_WEB_BROWSER "\"C:\Program Files\Internet Explorer\iexplore.exe\" \"%s\""
#define DEFAULT_GIMP_HELP_BROWSER GIMP_HELP_BROWSER_WEBBROWSER
#define DEFAULT_WEB_BROWSER "not used on Windows"
#else
#define DEFAULT_GIMP_HELP_BROWSER GIMP_HELP_BROWSER_GIMP
#define DEFAULT_WEB_BROWSER "mozilla \"%s\""
#endif
......@@ -212,7 +214,7 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_HELP_BROWSER,
"help-browser", HELP_BROWSER_BLURB,
GIMP_TYPE_HELP_BROWSER_TYPE,
GIMP_HELP_BROWSER_GIMP,
DEFAULT_GIMP_HELP_BROWSER,
0);
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_WEB_BROWSER,
"web-browser", WEB_BROWSER_BLURB,
......
......@@ -1402,6 +1402,7 @@ gimptool-1.3
gimp-1.3.pc
gimpui-1.3.pc
gimp.spec
gimp-zip
Makefile
])
......
#!/bin/sh
# Build zipfiles for GIMP on Win32: separate runtime and developer
# packages, and a separate zipfile for the gif plug-in.
ZIP=/tmp/gimp-@GIMP_VERSION@-`date +%Y%m%d`.zip
DEVZIP=/tmp/gimp-dev-@GIMP_VERSION@-`date +%Y%m%d`.zip
GIFZIP=/tmp/gimp-gif-@GIMP_VERSION@-`date +%Y%m%d`.zip
cd @prefix@
rm $ZIP
zip -r $ZIP -@ <<EOF
etc/gimp/@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@
bin/gimp-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@.exe
bin/libgimp-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@-@LT_CURRENT_MINUS_AGE@.dll
bin/libgimpbase-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@-@LT_CURRENT_MINUS_AGE@.dll
bin/libgimpcolor-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@-@LT_CURRENT_MINUS_AGE@.dll
bin/libgimpmath-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@-@LT_CURRENT_MINUS_AGE@.dll
bin/libgimpmodule-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@-@LT_CURRENT_MINUS_AGE@.dll
bin/libgimpui-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@-@LT_CURRENT_MINUS_AGE@.dll
bin/libgimpwidgets-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@-@LT_CURRENT_MINUS_AGE@.dll
lib/gimp/@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@/environ
lib/gimp/@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@/plug-ins
share/gimp/@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@
man/man1/gimp-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@.1
man/man5/gimprc-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@.5
EOF
zip $ZIP lib/gimp/@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@/modules/*.dll
zip $ZIP lib/locale/*/LC_MESSAGES/gimp20*.mo
rm $DEVZIP
zip -r $DEVZIP -@ <<EOF
bin/gimptool-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@.exe
lib/libgimp-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@.dll.a
lib/gimp-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@.lib
lib/gimp.def
lib/libgimpbase-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@.dll.a
lib/gimpbase-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@.lib
lib/gimpbase.def
lib/libgimpcolor-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@.dll.a
lib/gimpcolor-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@.lib
lib/gimpcolor.def
lib/libgimpmath-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@.dll.a
lib/gimpmath-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@.lib
lib/gimpmath.def
lib/libgimpmodule-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@.dll.a
lib/gimpmodule-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@.lib
lib/gimpmodule.def
lib/libgimpui-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@.dll.a
lib/gimpui-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@.lib
lib/gimpui.def
lib/libgimpwidgets-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@.dll.a
lib/gimpwidgets-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@.lib
lib/gimpwidgets.def
include/gimp-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@
man/man1/gimptool-@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@.1
EOF
zip -d $ZIP lib/gimp/@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@/plug-ins/gif.exe
rm $GIFZIP
zip $GIFZIP lib/gimp/@GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@/plug-ins/gif.exe
......@@ -18,10 +18,14 @@ libgimpui_export_symbols = -export-symbols gimpui.def
install-libtool-import-lib:
$(INSTALL) .libs/libgimp-$(LT_RELEASE).dll.a $(DESTDIR)$(libdir)
$(INSTALL) .libs/libgimpui-$(LT_RELEASE).dll.a $(DESTDIR)$(libdir)
$(INSTALL) gimp.def $(DESTDIR)$(libdir)
$(INSTALL) gimpui.def $(DESTDIR)$(libdir)
uninstall-libtool-import-lib:
-rm $(DESTDIR)$(libdir)/libgimp-$(LT_RELEASE).dll.a
-rm $(DESTDIR)$(libdir)/libgimpui-$(LT_RELEASE).dll.a
-rm $(DESTDIR)$(libdir)/gimp.def
-rm $(DESTDIR)$(libdir)/gimpui.def
else
install-libtool-import-lib:
uninstall-libtool-import-lib:
......
......@@ -10,9 +10,11 @@ libgimpbase_export_symbols = -export-symbols gimpbase.def
install-libtool-import-lib:
$(INSTALL) .libs/libgimpbase-$(LT_RELEASE).dll.a $(DESTDIR)$(libdir)
$(INSTALL) gimpbase.def $(DESTDIR)$(libdir)
uninstall-libtool-import-lib:
-rm $(DESTDIR)$(libdir)/libgimpbase-$(LT_RELEASE).dll.a
-rm $(DESTDIR)$(libdir)/gimpbase.def
else
install-libtool-import-lib:
uninstall-libtool-import-lib:
......
......@@ -17,9 +17,11 @@ libgimpcolor_export_symbols = -export-symbols gimpcolor.def
install-libtool-import-lib:
$(INSTALL) .libs/libgimpcolor-$(LT_RELEASE).dll.a $(DESTDIR)$(libdir)
$(INSTALL) gimpcolor.def $(DESTDIR)$(libdir)
uninstall-libtool-import-lib:
-rm $(DESTDIR)$(libdir)/libgimpcolor-$(LT_RELEASE).dll.a
-rm $(DESTDIR)$(libdir)/gimpcolor.def
else
install-libtool-import-lib:
uninstall-libtool-import-lib:
......
......@@ -17,9 +17,11 @@ libgimpmath_export_symbols = -export-symbols gimpmath.def
install-libtool-import-lib:
$(INSTALL) .libs/libgimpmath-$(LT_RELEASE).dll.a $(DESTDIR)$(libdir)
$(INSTALL) gimpmath.def $(DESTDIR)$(libdir)
uninstall-libtool-import-lib:
-rm $(DESTDIR)$(libdir)/libgimpmath-$(LT_RELEASE).dll.a
-rm $(DESTDIR)$(libdir)/gimpmath.def
else
install-libtool-import-lib:
uninstall-libtool-import-lib:
......
......@@ -10,9 +10,11 @@ libgimpmodule_export_symbols = -export-symbols gimpmodule.def
install-libtool-import-lib:
$(INSTALL) .libs/libgimpmodule-$(LT_RELEASE).dll.a $(DESTDIR)$(libdir)
$(INSTALL) gimpmodule.def $(DESTDIR)$(libdir)
uninstall-libtool-import-lib:
-rm $(DESTDIR)$(libdir)/libgimpmodule-$(LT_RELEASE).dll.a
-rm $(DESTDIR)$(libdir)/gimpmodule.def
else
install-libtool-import-lib:
uninstall-libtool-import-lib:
......
......@@ -17,9 +17,11 @@ libgimpwidgets_export_symbols = -export-symbols gimpwidgets.def
install-libtool-import-lib:
$(INSTALL) .libs/libgimpwidgets-$(LT_RELEASE).dll.a $(DESTDIR)$(libdir)
$(INSTALL) gimpwidgets.def $(DESTDIR)$(libdir)
uninstall-libtool-import-lib:
-rm $(DESTDIR)$(libdir)/libgimpwidgets-$(LT_RELEASE).dll.a
-rm $(DESTDIR)$(libdir)/gimpwidgets.def
else
install-libtool-import-lib:
uninstall-libtool-import-lib:
......
......@@ -29,6 +29,9 @@
#include "libgimp/stdplugins-intl.h"
#ifdef G_OS_WIN32
#include <windows.h>
#endif
#define PLUG_IN_NAME "plug_in_web_browser"
......@@ -40,10 +43,12 @@ static void run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals);
static gboolean browser_open_url (const gchar *url);
#ifndef G_OS_WIN32
static gchar* strreplace (const gchar *string,
const gchar *delimiter,
const gchar *replacement);
#endif
GimpPlugInInfo PLUG_IN_INFO =
{
......@@ -114,6 +119,12 @@ run (const gchar *name,
static gboolean
browser_open_url (const gchar *url)
{
#ifdef G_OS_WIN32
return ((gint) ShellExecute (HWND_DESKTOP, "open", url, NULL, NULL, SW_SHOWNORMAL) > 32);
#else
GError *error = NULL;
gchar *browser;
gchar *cmd;
......@@ -164,8 +175,12 @@ browser_open_url (const gchar *url)
g_strfreev (argv);
return retval;
#endif
}
#ifndef G_OS_WIN32
static gchar*
strreplace (const gchar *string,
const gchar *delimiter,
......@@ -184,3 +199,5 @@ strreplace (const gchar *string,
return ret;
}
#endif /* !G_OS_WIN32 */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment