aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/12_Compiling.md30
-rw-r--r--src/Makefile39
2 files changed, 56 insertions, 13 deletions
diff --git a/doc/12_Compiling.md b/doc/12_Compiling.md
index b285ebc1..35ab5167 100644
--- a/doc/12_Compiling.md
+++ b/doc/12_Compiling.md
@@ -34,29 +34,33 @@ users _also_ need "libncursesw5-dev".)
### Windows
-Compiling Textadept on Windows is no longer supported. Doing so requires a C
-compiler that supports the C99 standard, the [GTK+ for Windows bundle][]
-(2.24 is recommended), and [libiconv for Windows][] (the "Developer files" and
-"Binaries" zip files). The terminal (pdcurses) version requires my
-[win32curses bundle][] instead of GTK+ and libiconv.
-
-The preferred way to compile for Windows is cross-compiling from Linux. To do
-so, in addition to the GTK+ and/or curses bundles mentioned above, you need
-[MinGW][] with the Windows header files. Your package manager should offer them.
+Compiling Textadept on Windows is no longer supported. The preferred way to
+compile for Windows is cross-compiling from Linux. To do so, you need [MinGW][]
+with the Windows header files. Your package manager should offer them. Run
+`make win32gtk` and/or `make win32curses` to prepare the GTK and/or curses build
+environments.
+
+Note: compiling on Windows requires a C compiler that supports the C99 standard,
+the [GTK+ for Windows bundle][] (2.24 is recommended), and
+[libiconv for Windows][] (the "Developer files" and "Binaries" zip files). The
+terminal (pdcurses) version requires my [win32curses bundle][] instead of GTK+
+and libiconv.
+[MinGW]: http://mingw.org
[GTK+ for Windows bundle]: http://www.gtk.org/download/win32.php
[libiconv for Windows]: http://gnuwin32.sourceforge.net/packages/libiconv.htm
[win32curses bundle]: download/win32curses.zip
-[MinGW]: http://mingw.org
### Mac OSX
Compiling Textadept on Mac OSX is no longer supported. The preferred way is
-cross-compiling from Linux. To do so, you need my [GTK+ for OSX bundle][] and
-the [Apple Cross-compiler][] binaries.
+cross-compiling from Linux. To do so, you need the [Apple Cross-compiler][]
+binaries. Run `make gtkosx` to prepare the GTK build environment.
+
+Note: compiling on Mac OSX requires my [GTK+ for OSX bundle][].
-[GTK+ for OSX bundle]: download/gtkosx-2.24.16.zip
[Apple Cross-compiler]: https://launchpad.net/~flosoft/+archive/cross-apple
+[GTK+ for OSX bundle]: download/gtkosx-2.24.16.zip
## Compiling
diff --git a/src/Makefile b/src/Makefile
index b8e45a1f..52d596b9 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -444,3 +444,42 @@ cleanup: ../releases/$(basedir).x86_64.tgz ../releases/$(basedir).i386.tgz \
../releases/$(basedir).src.zip ../releases/$(basedir).modules.zip | \
$(basedir)
rm -r $|
+
+# Platform UI directories.
+
+win32gtk_zip = gtk+-bundle_2.24.10-20120208_win32.zip
+win32iconv_bin_zip = libiconv-bin-zip.php
+win32iconv_lib_zip = libiconv-lib-zip.php
+win32curses_zip = win32curses.zip
+pdcurses_zip = download
+gtkosx_zip = gtkosx-2.24.16.zip
+
+$(win32gtk_zip):
+ wget "http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.24/$@"
+$(win32iconv_bin_zip):
+ wget "http://gnuwin32.sourceforge.net/downlinks/$@"
+$(win32iconv_lib_zip):
+ wget "http://gnuwin32.sourceforge.net/downlinks/$@"
+win32gtk: $(win32gtk_zip) $(win32iconv_bin_zip) $(win32iconv_lib_zip)
+ mkdir $@
+ unzip -d $@ $(win32gtk_zip)
+ for zip in $(win32iconv_bin_zip) $(win32iconv_lib_zip); do \
+ unzip -d $@ $$zip; \
+ done
+$(win32curses_zip):
+ wget "http://foicica.com/textadept/download/$@"
+$(pdcurses_zip):
+ wget "http://sf.net/projects/pdcurses/files/pdcurses/3.4/pdcurs34.zip/$@"
+win32curses: $(win32curses_zip) $(pdcurses_zip)
+ unzip $(win32curses_zip)
+ mkdir $@/src
+ unzip -d $@/src $(pdcurses_zip)
+ cp $@/lib/pdckbd.c $@/src/win32
+ cd $@/src/win32 && $(MAKE) -f gccwin32.mak CC="$(CROSS)$(CC) $(CFLAGS)" \
+ LIBEXE=$(CROSS)ar LINK="$(CROSS)$(CC) $(CFLAGS)" WIDE=Y UTF8=Y
+ cp $@/src/win32/pdcurses.a $@/lib/
+$(gtkosx_zip):
+ wget "http://foicica.com/textadept/download/$@"
+gtkosx: $(gtkosx_zip)
+ unzip $(gtkosx_zip)
+ mv $(shell echo $(gtkosx_zip) | sed -e 's/.zip//;') $@