Zenity for Windows
Zenity is a utility used to add GUI forms to scripts and receive feedback from the user. It was designed for use with Linux and GNOME. It uses GTK+ and GLADE libraries. The official website for Zenity is: http://live.gnome.org/Zenity. I have ported the latest version (2.28.0) of this software to Windows (win32). It should work for both XP and Vista.
|
|
Win32 installer: | |
| Source code: | http://ftp.gnome.org/pub/gnome/sources/zenity/ |
1: Help files don't build.
2: When executing from a batch script, the annoying black window belonging to "cmd.exe" stays in the background all the time. I have a written a program, "bg_start", to take care of this http://www.placella.com/software/bg_start/.
3: Even though the "win32-3" version is built with support for LIBNOTIFY, this feature does not really work as it requires a "notification daemon", yet I'm not able to find one that works in windows.
Warning: this is my personal experience, correct as of October 2009 for Zenity 2.28.0, your results may vary!
First thing required is a build environment consisting of a console, a compiler, as well as, GTK+ and GLADE. I set one up as described here: http://www.gtkforums.com/post-4848.html#4848. I also installed "Strawberry PERL", required by intltool, and added the path to PERL binaries to the "$PATH" environment variable in "/etc/profile". And since "intltool" provided with MINGW was outdated I build one from source code and installed it. After downloading Zenity source code and extracting it it, I went ahead and ran the "configure" script. There were many missing dependencies. Most of these are available as binaries from http://ftp.gnome.org/pub/GNOME/binaries/win32/ and http://gnuwin32.sourceforge.net/packages.html. They can be downloaded as a compressed file and extracted into either your GTK or your mingw directory (as you see fit). There are, however, also a few pesky ones, like "scrollkeeper". As far as I know, there is no way to build it using MINGW and MSYS. To get around this, one can execute the following commands from your bash shell (MSYS) (excluding the dollar signs):
$ echo "int main(){}" > foo.c
$ gcc foo.c -o /bin/scrollkeeper-config
$ rm foo.c
$ gcc foo.c -o /bin/scrollkeeper-config
$ rm foo.c
After the configure script was happy that all the dependencies were satisfied, Zenity still didn't build and "GCC" was complaining about not being able to find "langinfo.h". Eventually I found it in the form of the "libgw32c" library from http://gnuwin32.sourceforge.net/packages.html. I extracted the archive in "/mingw". To make the system aware of this library and resolve a conflict, the following commands need to be issued in MSYS (modify the path to libgw32c to match it's location on your PC):
$ export CFLAGS="-I/mingw/include/glibc -DMINGW_BUILD"
$ export LIBS="-lgw32c"
$ mv /mingw/include/glibc/stdlib.h /mingw/include/glibc/stdlib.h.bak
$ export LIBS="-lgw32c"
$ mv /mingw/include/glibc/stdlib.h /mingw/include/glibc/stdlib.h.bak
$ patch -p0 < zenity-2.28.0_win32-3.patch
$ make
I'm not going to explain how the program should be packaged for it to work correctly, if you need to know this I suggest you download the installer and have a look around. Also, you can look at my NSIS script here: zenity-2.28.0_win32-3.nsi
Comments to date: 5. Page 1 of 1. Average Rating: 
Agnus Brazil | 2:19pm on Wednesday, July 21st, 2010 |
Thanks a lot! | |
Hans Austria | 1:38am on Monday, April 19th, 2010 |
Fine tool, this makes life for scripters much easier. | |
Jack France | 5:07pm on Friday, January 29th, 2010 |
I am trying to run it with a portable version of Octave. How to make zenity on win portable. | |
Eric HAMON Gretz, FRANCE | 3:38am on Tuesday, December 29th, 2009 |
Excellent. It's very easy to make it portable too. | |
steve Hungary | 4:44am on Monday, November 30th, 2009 |
Thanks a lot! :) | |
This page was last updated: 8/Nov/2009