From 8e0990f5e964711e7895064943ee5b22ff27efd9 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 15 Jul 2012 23:00:27 -0400 Subject: Include CDK directly instead of requiring it as a dependency. --- FAQ.md | 4 ++-- README.md | 3 +-- doc/02_Installation.md | 18 ++++++++---------- doc/12_Compiling.md | 16 +++++++++------- src/Makefile | 27 +++++++++++++++++---------- src/textadept.c | 2 +- 6 files changed, 38 insertions(+), 32 deletions(-) diff --git a/FAQ.md b/FAQ.md index 11f2a414..8481b294 100644 --- a/FAQ.md +++ b/FAQ.md @@ -12,8 +12,8 @@ example, `libpng14` has been available for many distributions since late 2009 while the latest 2012 Ubuntu still uses `libpng12`. Unfortunately in these cases, the best idea is to compile Textadept. This process is actually very simple though. See the [compiling][] page. Only the GTK development libraries -are needed for the GUI version. (The ncurses and CDK development libraries are -required for the terminal version.) +are needed for the GUI version. (The ncurses development library is required for +the terminal version.) [compiling]: 12_Compiling.html diff --git a/README.md b/README.md index 8a945ef0..c07eb9ec 100644 --- a/README.md +++ b/README.md @@ -28,11 +28,10 @@ Linux. Lua is pre-compiled into Textadept on all platforms and a GTK runtime is included on Windows and Mac OSX. The _experimental_ version of Textadept for the terminal requires only -[ncurses][] and [CDK][]. +[ncurses][]. [GTK+ 2.0]: http://gtk.org [ncurses]: http://invisible-island.net/ncurses/ncurses.html -[CDK]: http://invisible-island.net/cdk/ ## Download diff --git a/doc/02_Installation.md b/doc/02_Installation.md index 1204c688..5de119a4 100644 --- a/doc/02_Installation.md +++ b/doc/02_Installation.md @@ -7,9 +7,8 @@ only thing it needs is [GTK+][] >= 2.18 on Linux systems. GTK is already included in Windows and Mac OSX packages. Textadept also has its own version of Lua. -The _experimental_ terminal version of Textadept requires [ncurses][] and -[CDK][]. These dependencies are only necessary if you wish to run Textadept from -a terminal. +The _experimental_ terminal version of Textadept requires [ncurses][]. This +dependency is only necessary if you wish to run Textadept from a terminal. Notes: @@ -23,7 +22,6 @@ Notes: [GTK+]: http://gtk.org [ncurses]: http://invisible-island.net/ncurses/ncurses.html -[CDK]: http://invisible-island.net/cdk/ ### Linux @@ -31,14 +29,14 @@ Most Linux systems already have GTK+ installed. If not, it is probably available through your package manager. Otherwise, compile and install it from the [GTK+ website][]. -Most Linux systems already have ncurses installed, but probably not CDK. Look -for them in your package manager, or compile and install them from their -[respective][] [websites][]. For Debian-based distributions like Ubuntu, the -packages are typically called `libncursesw5` and `libcdk5`. +Most Linux systems already have ncurses installed. If not, look for it in your +package manager, or compile and install it from the [ncurses website][]. For +Debian-based distributions like Ubuntu, the package is typically called +`libncursesw5`. Note: you should have a version of ncurses compiled with "wide" +(multibyte) character support installed. [GTK+ website]: http://www.gtk.org/download-linux.html -[respective]: http://invisible-island.net/ncurses/#download_ncurses -[websites]: http://invisible-island.net/cdk/#download +[ncurses website]: http://invisible-island.net/ncurses/#download_ncurses ### Mac OSX diff --git a/doc/12_Compiling.md b/doc/12_Compiling.md index a0ff59db..2a3d0634 100644 --- a/doc/12_Compiling.md +++ b/doc/12_Compiling.md @@ -16,17 +16,19 @@ distribution through its package manager. For example, Ubuntu includes these tools in the `build-essential` package. If you would like to compile the terminal version of Textadept, you will need -the ncurses and CDK development libraries. Similarly, they should be available -from your package manager. For Debian-based distributions like Ubuntu, the -packages are typically called `libncurses5-dev` and `libcdk5-dev`. Otherwise, -compile and install them from their [respective][] [websites][]. BSD users will -also need to have [libiconv][]. +the ncurses development library. Similarly, it should be available from your +package manager. For Debian-based distributions like Ubuntu, the package is +typically called `libncurses5-dev`. Otherwise, compile and install ncurses from +the [ncurses website][]. Note: you should have a development version of ncurses +compiled with "wide" (multibyte) character support installed. (Therefore, Debian +users will also need `libncursesw5-dev`.) + +In addition, BSD users will need to have [libiconv][] installed. [GTK+ website]: http://www.gtk.org/download/linux.html [GNU C compiler]: http://gcc.gnu.org [GNU Make]: http://www.gnu.org/software/make/ -[respective]: http://invisible-island.net/ncurses/#download_ncurses -[websites]: http://invisible-island.net/cdk/#download +[ncurses website]: http://invisible-island.net/ncurses/#download_ncurses [libiconv]: http://www.gnu.org/software/libiconv/ ### Windows diff --git a/src/Makefile b/src/Makefile index 54f39cc2..2f973e45 100644 --- a/src/Makefile +++ b/src/Makefile @@ -148,6 +148,10 @@ lua_objs = lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o \ lpeg.o lfs.o luajit_objs = lpegjit.o lfsjit.o termkey_objs = termkey.o driver-ti.o driver-csi.o +cdk_objs = binding.o buttonbox.o button.o cdk.o cdk_display.o cdk_objs.o \ + cdk_params.o cdkscreen.o debug.o draw.o entry.o fselect.o \ + itemlist.o label.o mentry.o menu.o popup_label.o position.o \ + scroll.o select_file.o traverse.o version.o # Build. @@ -162,7 +166,7 @@ tmp: rm -rf /tmp/tabuild && hg clone ../ /tmp/tabuild cp -rL ../Doxyfile ../doc ../lexers ../modules /tmp/tabuild/ cp -r gtdialog gtkosx LexLPeg.cxx libluajit.osx.a lua luajit lua51.dll \ - scintilla termkey win32gtk /tmp/tabuild/src/ + scintilla termkey cdk win32gtk /tmp/tabuild/src/ cd /tmp/tabuild/src/luajit && $(MAKE) clean ln -s `pwd`/../releases /tmp/tabuild @echo /tmp/tabuild ready for building. @@ -176,7 +180,7 @@ $(scintilla_gtk_objs): scintilla/gtk/*.cxx scintilla-marshal.o: scintilla/gtk/scintilla-marshal.c $(CROSS)$(CC) -c $(CFLAGS) $(gtk_flags) $< ScintillaTerm.o: scintilla/term/ScintillaTerm.cxx - $(CROSS)$(CXX) -c $(CXXFLAGS) $(sci_flags) -Iscintilla/term -Itermkey $^ + $(CROSS)$(CXX) -c $(CXXFLAGS) $(sci_flags) -Iscintilla/term $^ LexLPeg.o: LexLPeg.cxx $(CROSS)$(CXX) -c $(CXXFLAGS) $(LUAFLAGS) $(sci_flags) -DLPEG_LEXER \ -DNO_SCITE -Ilua/src $< @@ -190,10 +194,10 @@ textadeptjit.o: textadept.c -o $@ textadept-ncurses.o: textadept.c $(CROSS)$(CC) -c $(CFLAGS) $(ta_flags) -Ilua/src -Iscintilla/term -Itermkey \ - $< -o $@ + -Icdk $< -o $@ textadeptjit-ncurses.o: textadept.c $(CROSS)$(CC) -c $(CFLAGS) $(ta_flags) -DLUAJIT -Iluajit/src \ - -Iscintilla/term -Itermkey $< -o $@ + -Iscintilla/term -Itermkey -Icdk $< -o $@ $(lua_objs): lua/src/*.c lua/src/lib/*.c $(CROSS)$(CC) -c $(CFLAGS) $(LUAFLAGS) -Ilua/src $^ $(luajit_objs): lua/src/lib/*.c @@ -212,9 +216,11 @@ libluajit.osx.a: gtdialog.o: gtdialog/gtdialog.c $(CROSS)$(CC) -c $(CFLAGS) -DGTK -DNOHELP -DLIBRARY $(gtk_flags) $< gtdialog-ncurses.o: gtdialog/gtdialog.c - $(CROSS)$(CC) -c $(CFLAGS) -DNCURSES -DNOHELP -DLIBRARY $< -o $@ + $(CROSS)$(CC) -c $(CFLAGS) -DNCURSES -DNOHELP -DLIBRARY -Icdk $< -o $@ $(termkey_objs): termkey/*.c $(CROSS)$(CC) -c $(CFLAGS) -std=c99 $^ +$(cdk_objs): cdk/*.c + $(CROSS)$(CC) -c $(CFLAGS) -D_GNU_SOURCE -Icdk $^ textadept_rc.o: textadept.rc $(CROSS)$(WINDRES) $^ $@ @@ -228,12 +234,12 @@ textadeptjit: $(scintilla_objs) $(scintilla_gtk_objs) scintilla-marshal.o \ $(CROSS)$(CXX) $(CXXFLAGS) -o ../$@ $^ $(gtk_libs) $(LDFLAGS) textadept-ncurses: $(scintilla_objs) ScintillaTerm.o LexLPeg.o \ textadept-ncurses.o $(lua_objs) gtdialog-ncurses.o \ - $(termkey_objs) - $(CROSS)$(CXX) $(CXXFLAGS) -o ../$@ $^ -lncursesw -lcdk $(LDFLAGS) + $(termkey_objs) $(cdk_objs) + $(CROSS)$(CXX) $(CXXFLAGS) -o ../$@ $^ -lncursesw $(LDFLAGS) textadeptjit-ncurses: $(scintilla_objs) ScintillaTerm.o LexLPegjit.o \ textadeptjit-ncurses.o $(luajit_objs) $(libluajit) \ - gtdialog-ncurses.o $(termkey_objs) - $(CROSS)$(CXX) $(CXXFLAGS) -o ../$@ $^ -lncursesw -lcdk $(LDFLAGS) + gtdialog-ncurses.o $(termkey_objs) $(cdk_objs) + $(CROSS)$(CXX) $(CXXFLAGS) -o ../$@ $^ -lncursesw $(LDFLAGS) textadept32: ../textadept; mv $< ../$@ textadeptjit32: ../textadeptjit; mv $< ../$@ textadept32-ncurses: ../textadept-ncurses; mv $< ../$@ @@ -312,7 +318,8 @@ $(basedir).osx: ../textadept.osx ../textadeptjit.osx | $(basedir) $@/Textadept.app/Contents/Resources/ mv $@/Textadept.app/Contents/MacOS/ta $@ $(basedir).src: | $(basedir) - cp -r $| $@ && cp -rL lua luajit scintilla gtdialog LexLPeg.cxx termkey $@/src + cp -r $| $@ + cp -rL lua luajit scintilla gtdialog LexLPeg.cxx termkey cdk $@/src cd $@/src/luajit && $(MAKE) clean && cd ../../../ rm -r $@/src/scintilla/.hg $(basedir).modules: diff --git a/src/textadept.c b/src/textadept.c index de99f86b..0c776f9d 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -28,7 +28,7 @@ #include #include #include -#include +#include "cdk.h" #define PLAT_TERM 1 #endif -- cgit v1.2.3