1. gedit for Windows
1.1. The Easy Way
1.1.1. Download Binaries
Ready-built binaries are available from:
http://ftp.gnome.org/pub/gnome/binaries/win32/gedit/
1.2. The harder, but cooler way
1.2.1. Compile gEdit for Windows
step 1)
Download the tortoisesvn client for windows at:
http://tortoisesvn.tigris.org/
step 2)
Download MinGW, and do a full install.
ftp://gd.tuwien.ac.at/gnu/mingw/
step 3)
Download MSYS, and do a full install.
step 4)
create new directory called C:\devel
step 5)
cd to c:\devel
svn co http://svn.gnome.org/svn/gedit/trunk/ gedit
create a new directory called c:\devel\gedit
step 6)
download:
ftp://ftp.gnome.org/pub/gnome/sources/gnome-common/2.20
create and extract into a new directory called C:\devel\gnome-common
step 7)
create C:\opt
create c:\opt\gtk
step 10)
download autogen-5.9.2-MSYS-1.0.11.tar.tar
download perl-5.6.1-MSYS-1.0.11.tar.bz2
step 11)
extract each file at to msys, just above the /usr directory to your C:\MSYS\1.0\ directory
These files are found in the: C:\msys\1.0\local\bin directory
step 12)
download automake and autoconf sources from:
I tried using the precompiled versions from the MSYS website but the most recent ones were buggy. The versions I built from source were:
autoconf-2.61
automake-1.10.1
In case you dont know how to build from sources run the following commands:
./configure
make
make install
step 13)
add these environment varibales to /etc/profile
export INTLTOOL_PERL="/c/Perl/bin/perl" export PKG_CONFIG="/opt/gtk/bin/pkg-configh.sh" export PKG_CONFIG_PATH="/opt/gtk/lib/pkg-config" export ACLOCAL_FLAGS="-I /opt/gtk/share/aclocal"
And this paths to your path argument:
/opt/gtk/bin
step 14)
At this point you should create two download folders one for dev packages and one for binary packages
download libtool1.5-1.5.25a-1-bin.tar
and put it in the bin folder
download http://gnuwin32.sourceforge.net/downlinks/libtool-lib-zip.php
and put it in the dev folder
It is good to keep these downloads seperate because later it's easier to package
These are available from:
http://gnuwin32.sourceforge.net/packages.html
extract the both archives into /opt/gtk
step 15)
download and install the following
http://gnuwin32.sourceforge.net/packages.html LibIntl (dev and bin)?
(extract into your /opt/gtk directory)
step 16)
download and install these to opt/gnome http://www.gtk.org/download-windows.html
libiconv-1.9.1.bin.woe32 (extract this one into c:\msys\1.0
then create this in /usr/lib/libiconv.la
# libiconv.la - a libtool library file # Generated by ltmain.sh - GNU libtool fake dlname='../bin/iconv.dll' library_names='libiconv.a' old_library='libiconv.dll' dependency_libs= installed=yes dlopen= dlpreopen= libdir='/c/msys/1.0'
step 17 )
the pkg-config found on websites dont seem to work so it needs to be built from sources
http://pkg-config.freedesktop.org/wiki/
run ./configure --prefix /opt/gtk/
edit the Makefile the following things needed to be changed:
PKG_CONFIG = /opt/gtk/bin/pkg-config.sh included_glib_includes = -I/opt/gtk/include/glib-2.0 -I/opt/gtk/lib/glib-2.0/include pkg_config_LDADD = -L/opt/gtk/lib -lglib-2.0 -liconv
create a pkg-config.sh file where your pkg-config file was installed to. Insert this code into it.
if pkg-config "$@" > /dev/null 2>&1 ; then res=true else res=false fi pkg-config "$@" | tr -d \\r && $res
step 18 )
open MYSYS and cd into /devel/gnome-common
run ./configure make make install
step 19 )
change the following lines:
REQUIRED_GNOME_DOC_UTILS_VERSION=${REQUIRED_GNOME_DOC_UTILS_VERSION:-0.4.2} ... if grep "^GNOME_DOC_INIT" $configure_ac >/dev/null; then want_gnome_doc_utils=true fi ... if $want_gnome_doc_utils; then version_check gnome-doc-utils GNOME_DOC_PREPARE gnome-doc-prepare $REQUIRED_GNOME_DOC_UTILS_VERSION \ "http://ftp.gnome.org/pub/GNOME/sources/gnome-doc-utils/" || DIE=1 fi ... if grep "^GNOME_DOC_INIT" $basename >/dev/null; then printbold "Running $GNOME_DOC_PREPARE..." $GNOME_DOC_PREPARE --force --copy || exit 1 fi ... if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then version_check gnome-common DOC_COMMON gnome-doc-common \ $REQUIRED_DOC_COMMON_VERSION " " || DIE=1 fi
to
#REQUIRED_GNOME_DOC_UTILS_VERSION=${REQUIRED_GNOME_DOC_UTILS_VERSION:-0.4.2} ... #if grep "^GNOME_DOC_INIT" $configure_ac >/dev/null; then # want_gnome_doc_utils=true #fi ... #if $want_gnome_doc_utils; then # version_check gnome-doc-utils GNOME_DOC_PREPARE gnome-doc-prepare $REQUIRED_GNOME_DOC_UTILS_VERSION \ # "http://ftp.gnome.org/pub/GNOME/sources/gnome-doc-utils/" || DIE=1 #fi ... #if grep "^GNOME_DOC_INIT" $basename >/dev/null; then # printbold "Running $GNOME_DOC_PREPARE..." # $GNOME_DOC_PREPARE --force --copy || exit 1 #fi ... #if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then # version_check gnome-common DOC_COMMON gnome-doc-common \ # $REQUIRED_DOC_COMMON_VERSION " " || DIE=1 #fi
step 20 ) get the gtk-doc package
copy gtkdocize.in to gtkdocize
edit it:
@PACKGAGE@ => gtk-doc @VERSION@ => 1.3 @PREFIX@ => /opt/gtk @datadir@ => /opt/gtk/share
then run the following commands
cp gtk-doc.m4 /opt/gtk/share/aclocal cp gtkdocize /opt/gtk/bin mkdir -p /opt/gtk/share/gtk-doc/data/ cp gtk gtk-doc.make /opt/gtk/share/gtk-doc/data
Step 21 )
http://www.gtk.org/download-windows.html
extract this into /opt/gtk
step 22 )
download the latest verions of these (the devel versions):
gnome-vfs
gtksourceview
libart_lgpl
libbonobo
libbonoboui
libgnome
libgnomecanvas
Atk-1.22.0
from:
http://ftp.acc.umu.se/pub/gnome/binaries/win32/
extract these into /opt/gtk/
also download the binaries as you will need these to actually run gedit after you compile it
extract these (the binaries) into a seperate folder for packaging gedit.
step 23 )
libart-2.3.20
FreeType 2-9.16.3
libZ
from
http://gnuwin32.sourceforge.net/
libXML-2.6.30
from
http://developer.pidgin.im/static/win32/libxml2-2.6.30.tar.gz
create libxml.pc in /opt/gtk/lib/pkgconfig
prefix=/devel/target/f395ca5ef06001c341567c2c0043b7d3 exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: libxml-2.0 Description: Libxml Version: 2.6.30 Libs: -L${libdir} -llibxml Libs.private: -L/opt/misc/lib -lexpat Cflags: -I${includedir}
gettext gettext-runtime
from
http://ftp.gnu.org/gnu/gettext/
Fontconfig-2.4.1
libexpat (extract the binary)
From:
http://www.gtk.org/download-windows.html
step 24)
The version of gtksourceview available on gnome win32 is too old so we have to build it from source...
download the latest version from:
http://gtksourceview.sourceforge.net/
./configure --prefix=/opt/gtk make make install
step 25)
Finally !
cd /devel/gedit ./configure --prefix=/c/gedit make make install
make this dir C:\gedit\share\gedit-2\ui copy gedit-ui.xml into it
make a .bat file at the root (C:\gedit)
set PATH=C:\gedit\gtk\bin;%PATH% C:\gedit\bin\gedit.exe
1.2.2. What is left to be done
gedit-local-document-saver.c
// hacked but not as much
//commented out some permissions stuff
gedit-help.c
//commented out some line about an include that doesnt exist because we arnt going to use gnome help
gedit-print.c // hacked beyound reconigtion
gedit.c //if (startup_timestamp <= 0) // startup_timestamp = gdk_x11_get_server_time (GTK_WIDGET (window)->window);
//gdk_x11_window_set_user_time (GTK_WIDGET (window)->window, // startup_timestamp);
gedit-app.c
// getppid stuff needs to be converted to windows
bacon-message.c
// hacked damaged
// SOCKETS BROKEN
gedit-mmap-document-loader.c
// damaged really bad too
// working on compiling a newer version of gtksourceview which should fix this i think
1.3. Screen Shot
1.4. External Credits
Some steps were taken from:
http://www.go-evolution.org/Building_Evolution_on_Windows
Useful Links
http://marcin.af.gliwice.pl/gtk-win32-development
http://ftp.gnome.org/pub/gnome/platform/2.14/2.14.2/win32/
ftp://ftp.gtk.org/pub/gtk/v2.8/win32/
http://wiki.filezilla-project.org/Compiling_FileZilla_3_under_Windows