From a214138f895fa5d05d4d64ecec7de82565415ab7 Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Mon, 30 Aug 2010 22:19:58 -0700 Subject: [PATCH] Moving stuff around: medit-0.99 --- .gitignore | 34 - .hgignore | 63 +- CMakeLists.txt | 71 - Makefile.am | 13 + autogen.sh | 28 + cmake/dist.cmake | 115 - cmake/gtk.cmake | 72 - cmake/modules/FindMooCmake.cmake | 415 - cmake/modules/FindMooCmakeUtils.cmake | 31 - cmake/modules/FindMooCompilers.cmake | 328 - cmake/modules/FindMooDesktopFile.cmake | 22 - cmake/modules/FindMooI18n.cmake | 100 - cmake/modules/FindMooPython.cmake | 52 - cmake/moo-libs.cmake | 89 - cmake/moo.cmake | 72 - config-dirs.h.in | 11 - config.cmake | 61 - config.h.in | 238 +- configure.ac | 117 + doc/CMakeLists.txt | 60 - doc/Makefile.am | 51 + doc/genhelpsections.py | 20 + doc/help-sections.h | 32 + doc/help.html | 1500 ++++ doc/help/app-license.html | 49 + doc/help/editing-options.html | 104 + doc/help/gpl.html | 379 + doc/help/index.html | 47 + doc/help/lgpl.html | 544 ++ doc/help/license-lua-lfs.html | 50 + doc/help/license-lua.html | 74 + doc/help/license-xdg-utils.html | 76 + doc/help/prefs-file-filters.html | 70 + doc/help/prefs-file.html | 71 + doc/help/prefs-lang-options.html | 61 + doc/help/prefs-langs-and-filters.html | 48 + doc/help/prefs-user-tools.html | 164 + doc/help/regex-search.html | 44 + doc/help/regex.html | 43 + doc/help/sect-user-tools.html | 52 + doc/help/user-tools-files.html | 123 + doc/help/user-tools-lua.html | 108 + doc/help/user-tools-python.html | 76 + doc/help/user-tools-shell.html | 78 + doc/makedocs.cmake | 61 - doc/man-medit.t2t | 107 + doc/man-medit.t2t.in | 4 +- doc/medit.1 | 110 + doc/medit.t2t | 50 + doc/medit.t2t.in | 2 +- junk/completion/Makefile.am | 32 - junk/completion/completion-plugin.c | 256 - junk/completion/completion.c | 709 -- junk/completion/completion.glade | 70 - junk/completion/completion.h | 76 - junk/completion/files/gap.lst | 7676 ----------------- junk/completion/files/latex.cfg | 44 - junk/completion/files/texinfo.cfg | 243 - m4/moo-flags.m4 | 366 + m4/moo-gtk.m4 | 99 + m4/moo-os.m4 | 45 + medit/Makefile.am | 51 + medit/Makefile.ug | 2 +- medit/main.c | 1 - medit/medit.rc.in | 2 +- moo/CMakeLists.txt | 44 - moo/Makefile.am | 43 + moo/TODO | 30 - moo/eggsmclient/Makefile.am | 27 + .../smclient => eggsmclient}/eggdesktopfile.c | 0 .../smclient => eggsmclient}/eggdesktopfile.h | 0 .../eggsmclient-dummy.c | 0 .../eggsmclient-mangle.h | 0 .../eggsmclient-private.h | 0 .../eggsmclient-win32.c | 0 .../eggsmclient-xsmp.c | 0 .../smclient => eggsmclient}/eggsmclient.c | 0 .../smclient => eggsmclient}/eggsmclient.h | 0 moo/gendef.py | 325 - moo/gendummy.cmake | 6 - moo/genmarshal.cmake | 18 - moo/glade2c.cmake.in | 16 - moo/gtksourceview/Makefile.am | 40 + moo/gtksourceview/gtksourcebuffer.h | 1 + .../gtksourcecontextengine.c | 0 .../gtksourcecontextengine.h | 0 .../gtksourceengine.c | 0 .../gtksourceengine.h | 0 .../gtksourceiter.c | 0 .../gtksourceiter.h | 0 .../gtksourcelanguage-parser-1.c | 0 .../gtksourcelanguage-parser-2.c | 0 .../gtksourcelanguage-private.h | 0 .../gtksourcelanguage.c | 0 .../gtksourcelanguage.h | 0 .../gtksourcelanguagemanager.c | 6 +- .../gtksourcelanguagemanager.h | 0 .../gtksourcestyle-private.h | 0 .../gtksourcestyle.c | 0 .../gtksourcestyle.h | 0 .../gtksourcestylescheme.c | 0 .../gtksourcestylescheme.h | 0 .../gtksourcestyleschememanager.c | 8 +- .../gtksourcestyleschememanager.h | 0 moo/gtksourceview/gtksourceview-api.h | 10 + .../gtksourceview/gtksourceview-i18n.h | 0 .../gtksourceview/gtksourceview-marshal.h | 0 .../gtksourceview-utils.c | 20 +- .../gtksourceview-utils.h | 3 +- moo/gtksourceview/gtksourceview.h | 1 + .../gtktextregion.c | 0 .../gtktextregion.h | 0 moo/moo-dll.c | 11 - moo/mooapp/CMakeLists.txt | 31 - moo/mooapp/Makefile.am | 37 + moo/mooapp/marshals.list | 9 - moo/mooapp/mooapp.c | 2 +- moo/mooapp/mooappabout.c | 2 +- moo/mooapp/mooappabout.h | 35 +- moo/mooapp/smclient/CMakeLists.txt | 19 - moo/mooedit/CMakeLists.txt | 129 - moo/mooedit/Makefile.am | 137 + moo/mooedit/gtksourceview/CMakeLists.txt | 48 - moo/mooedit/gtksourceview/Makefile.incl | 118 - moo/mooedit/gtksourceview/gtksourceview-api.h | 53 - moo/mooedit/gtksourceview/mangle.py | 77 - moo/mooedit/gtksourceview/upstream/mangle.sh | 76 - moo/mooedit/langs/Makefile.incl | 83 + moo/mooedit/marshals.list | 20 - moo/mooedit/mooedit-enums.c | 190 + moo/mooedit/mooedit-enums.h | 118 + moo/mooedit/mooeditaction.c | 1 + moo/mooedit/moolang-private.h | 2 +- moo/mooedit/moolangmgr-private.h | 2 +- moo/mooedit/mootextsearch.c | 2 +- moo/mooedit/mootextstylescheme.c | 2 +- moo/mooedit/mootextview.c | 2 + moo/moofileview/CMakeLists.txt | 46 - moo/moofileview/Makefile.am | 60 + moo/moofileview/marshals.list | 12 - moo/moolua/CMakeLists.txt | 20 - moo/moolua/Makefile.am | 24 + moo/moolua/ext/{lfs.c => lfs.cpp} | 214 +- moo/moolua/{luaall.c => luaall.cpp} | 0 moo/moolua/luaconf.h | 8 + moo/moolua/{moolua.c => moolua.cpp} | 4 +- moo/mooutils/CMakeLists.txt | 215 - moo/mooutils/Makefile.am | 186 + moo/mooutils/genpixbufcsource.cmake.in | 14 - moo/mooutils/marshals.list | 19 - moo/mooutils/moo-mime.c | 2 +- moo/mooutils/moocpp-cont.h | 643 ++ moo/mooutils/moocpp-exc.h | 92 + moo/mooutils/moocpp-macros.h | 98 + moo/mooutils/moocpp-refptr.h | 240 + moo/mooutils/moocpp-types.h | 154 + moo/mooutils/moocpp.cpp | 61 + .../mooutils/moocpp.h | 24 +- moo/mooutils/moohelp.c | 1 - moo/mooutils/moopane.c | 4 +- moo/mooutils/moopane.h | 2 +- moo/mooutils/moostock.c | 2 +- moo/mooutils/mooutils-messages.h | 2 +- moo/mooutils/mooutils-misc.c | 8 +- moo/mooutils/mooutils-misc.h | 11 + moo/mooutils/mooutils-thread.c | 2 +- moo/mooutils/mooutils-win32.c | 42 +- moo/mooutils/xdgmime/CMakeLists.txt | 21 - moo/xdgmime/Makefile.am | 22 + moo/{mooutils => }/xdgmime/README | 0 moo/{mooutils => }/xdgmime/xdgmime.c | 0 moo/{mooutils => }/xdgmime/xdgmime.h | 0 moo/{mooutils => }/xdgmime/xdgmimealias.c | 0 moo/{mooutils => }/xdgmime/xdgmimealias.h | 0 moo/{mooutils => }/xdgmime/xdgmimecache.c | 0 moo/{mooutils => }/xdgmime/xdgmimecache.h | 0 moo/{mooutils => }/xdgmime/xdgmimeglob.c | 0 moo/{mooutils => }/xdgmime/xdgmimeglob.h | 0 moo/{mooutils => }/xdgmime/xdgmimeicon.c | 0 moo/{mooutils => }/xdgmime/xdgmimeicon.h | 0 moo/{mooutils => }/xdgmime/xdgmimeint.c | 0 moo/{mooutils => }/xdgmime/xdgmimeint.h | 0 moo/{mooutils => }/xdgmime/xdgmimemagic.c | 0 moo/{mooutils => }/xdgmime/xdgmimemagic.h | 0 moo/{mooutils => }/xdgmime/xdgmimeparent.c | 0 moo/{mooutils => }/xdgmime/xdgmimeparent.h | 0 plat/mac/Info.plist.in | 41 - plat/mac/Makefile.incl | 15 - plat/mac/environment.sh | 10 - plat/mac/gtkrc | 6 - plat/mac/medit | 3 - plat/mac/medit.bundle | 102 - plat/mac/medit.icns | Bin 41052 -> 0 bytes plat/unix/distcheck.in | 38 - plat/win32/intltool-wrapper.bat.in | 4 - plat/win32/run-medit.in | 3 - plat/win32/run-tests.in | 3 - plugins/CMakeLists.txt | 73 - plugins/Makefile.am | 37 + plugins/ctags/Makefile.incl | 12 + plugins/mooeditplugins.c | 3 +- plugins/moopython/CMakeLists.txt | 166 - plugins/moopython/Makefile.ug | 119 - plugins/moopython/codegen/README | 4 - plugins/moopython/codegen/__init__.py | 15 - plugins/moopython/codegen/argtypes.py | 1031 --- plugins/moopython/codegen/argtypes_m.py | 76 - plugins/moopython/codegen/codegen.py | 1726 ---- plugins/moopython/codegen/definitions.py | 547 -- plugins/moopython/codegen/defsparser.py | 153 - plugins/moopython/codegen/docgen.py | 751 -- plugins/moopython/codegen/mergedefs.py | 26 - plugins/moopython/codegen/mkskel.py | 89 - plugins/moopython/codegen/override.py | 281 - plugins/moopython/codegen/reversewrapper.py | 867 -- plugins/moopython/codegen/scmexpr.py | 143 - plugins/moopython/genpygtk.cmake | 79 - plugins/moopython/moo-mod.c | 44 - plugins/moopython/moo.rc.in | 31 - plugins/moopython/moopython-api.h | 545 -- plugins/moopython/moopython-builtin.c | 68 - plugins/moopython/moopython-loader.c | 346 - plugins/moopython/moopython-loader.h | 32 - plugins/moopython/moopython-mod.c | 194 - plugins/moopython/moopython-pygtkmod.h | 107 - plugins/moopython/moopython-utils.c | 461 - plugins/moopython/moopython-utils.h | 92 - plugins/moopython/plugins/CMakeLists.txt | 24 - plugins/moopython/plugins/Makefile.ug | 36 - .../plugins/lib/insert_date_and_time.py | 110 - plugins/moopython/plugins/lib/pyconsole.py | 674 -- plugins/moopython/plugins/medit/__init__.py | 14 - plugins/moopython/plugins/medit/runpython.py | 87 - plugins/moopython/plugins/pycmd.ini.in.in | 4 - plugins/moopython/plugins/pycmd.py | 96 - .../moopython/plugins/pyproject/Makefile.ug | 85 - .../plugins/pyproject/medit-mprj.xml.in | 8 - .../plugins/pyproject/mprj/__init__.py | 18 - .../plugins/pyproject/mprj/config/__init__.py | 21 - .../plugins/pyproject/mprj/config/_config.py | 71 - .../plugins/pyproject/mprj/config/_dict.py | 198 - .../plugins/pyproject/mprj/config/_group.py | 168 - .../plugins/pyproject/mprj/config/_item.py | 207 - .../plugins/pyproject/mprj/config/_setting.py | 136 - .../plugins/pyproject/mprj/config/_utils.py | 26 - .../plugins/pyproject/mprj/config/_xml.py | 234 - .../plugins/pyproject/mprj/config/test.py | 322 - .../plugins/pyproject/mprj/config/view.py | 456 - .../plugins/pyproject/mprj/factory.glade | 252 - .../plugins/pyproject/mprj/factory.py | 180 - .../plugins/pyproject/mprj/manager.py | 338 - .../plugins/pyproject/mprj/optdialog.py | 89 - .../plugins/pyproject/mprj/project.py | 102 - .../plugins/pyproject/mprj/session.py | 96 - .../plugins/pyproject/mprj/settings.py | 110 - .../plugins/pyproject/mprj/simple.glade | 169 - .../plugins/pyproject/mprj/simple.py | 196 - .../moopython/plugins/pyproject/mprj/test.py | 15 - .../plugins/pyproject/mprj/utils.glade | 87 - .../moopython/plugins/pyproject/mprj/utils.py | 213 - .../pyproject/project-plugin.ini.in.in | 13 - .../plugins/pyproject/project-plugin.py | 43 - .../moopython/plugins/pyproject/projects/c.py | 291 - .../pyproject/projects/cproj/__init__.py | 15 - .../pyproject/projects/cproj/config.py | 342 - .../pyproject/projects/cproj/optdialog.py | 240 - .../pyproject/projects/cproj/options.glade | 553 -- .../pyproject/projects/cproj/parser.py | 49 - .../pyproject/projects/pyproj/__init__.py | 15 - .../pyproject/projects/pyproj/config.py | 65 - .../pyproject/projects/pyproj/optdialog.py | 77 - .../pyproject/projects/pyproj/options.glade | 139 - .../plugins/pyproject/projects/python.py | 151 - plugins/moopython/plugins/pytest.py | 67 - plugins/moopython/plugins/python.ini.in.in | 11 - plugins/moopython/plugins/python.py | 121 - plugins/moopython/plugins/simple.ini | 14 - plugins/moopython/plugins/simple.py | 57 - plugins/moopython/plugins/terminal.ini.in.in | 11 - plugins/moopython/plugins/terminal.py | 262 - plugins/moopython/py2h.py | 37 - plugins/moopython/pygtk/Makefile.incl | 146 - plugins/moopython/pygtk/moo-mod.py | 18 - plugins/moopython/pygtk/moo-pygtk.c | 137 - plugins/moopython/pygtk/moo-pygtk.h | 48 - plugins/moopython/pygtk/mooapp-mod.c | 57 - plugins/moopython/pygtk/mooapp-mod.py | 17 - plugins/moopython/pygtk/mooapp-pygtk.defs | 102 - plugins/moopython/pygtk/mooapp-pygtk.override | 39 - plugins/moopython/pygtk/moocommand.defs | 434 - plugins/moopython/pygtk/mooedit-mod.c | 59 - plugins/moopython/pygtk/mooedit-mod.py | 120 - plugins/moopython/pygtk/mooedit-pygtk.defs | 1726 ---- .../moopython/pygtk/mooedit-pygtk.override | 686 -- plugins/moopython/pygtk/mooeditor.defs | 294 - plugins/moopython/pygtk/moofileview.defs | 36 - plugins/moopython/pygtk/moopaned.defs | 560 -- plugins/moopython/pygtk/moopaned.override | 46 - plugins/moopython/pygtk/mooplugin.defs | 373 - plugins/moopython/pygtk/mooutils-mod.c | 112 - plugins/moopython/pygtk/mooutils-mod.py | 68 - plugins/moopython/pygtk/mooutils-pygtk.defs | 2668 ------ .../moopython/pygtk/mooutils-pygtk.override | 878 -- plugins/moopython/pymoo.ini.in | 4 - plugins/moopython/pymoo.rc.in | 31 - plugins/script/Makefile.am | 16 + plugins/script/momscript-api.cpp | 2 + plugins/script/momscript-api.h | 68 + plugins/script/momscript-classes.cpp | 287 + plugins/script/momscript-classes.h | 210 + plugins/script/momscript-lua.cpp | 440 + plugins/script/momscript-lua.h | 14 + plugins/script/momscript-variant.h | 321 + plugins/script/momscript.cpp | 140 + plugins/script/momscript.h | 217 + plugins/usertools/CMakeLists.txt | 47 - plugins/usertools/Makefile.am | 48 + plugins/usertools/exe/Makefile.incl | 10 + .../{moocommand-sh.c => exe/moocommand-exe.c} | 6 +- .../{moocommand-sh.h => exe/moocommand-exe.h} | 4 +- .../usertools/glade/mooedittools-lua.glade | 47 +- plugins/usertools/lua/Makefile.incl | 21 + plugins/usertools/lua/lua2-tool-setup.lua | 10 + .../usertools/lua}/medit.lua | 0 .../moocommand-lua.cpp} | 223 +- plugins/usertools/{ => lua}/moocommand-lua.h | 2 +- .../usertools/lua/mooedit-lua-api1.cpp | 22 +- .../usertools/lua/mooedit-lua1.cpp | 24 +- .../usertools/lua/mooedit-lua1.h | 18 +- plugins/usertools/moocommand-private.h | 4 +- plugins/usertools/moocommand.c | 19 +- plugins/usertools/moocommanddisplay.c | 4 +- plugins/usertools/moocommanddisplay.h | 2 +- plugins/usertools/mookeyfile.c | 2 +- plugins/usertools/moooutputfilterregex.c | 6 +- plugins/usertools/moousertools-enums.c | 22 + plugins/usertools/moousertools-enums.h | 22 + plugins/usertools/moousertools-prefs.c | 10 +- plugins/usertools/moousertools.c | 7 +- plugins/usertools/moousertools.h | 2 +- .../{unix-context.cfg => unix/context.cfg} | 0 .../{unix-menu.cfg => unix/menu.cfg} | 0 .../{win32-context.cfg => win32/context.cfg} | 0 .../{win32-menu.cfg => win32/menu.cfg} | 0 tests/Makefile.am | 99 - tests/check.sh | 60 - tests/encodings/example_gb2312.txt | 1 - tests/encodings/example_utf8.txt | 1 - tests/markup.c | 104 - tests/medit.c | 125 - tests/medit.py | 267 - tests/miniglade.c | 85 - tests/run-mingw.sh | 16 - tests/testfileview.c | 27 - tests/testfold.c | 45 - tests/testhtml.c | 75 - tests/testkeyfile.c | 47 - tests/testobject.c | 94 - tests/testpaned.c | 84 - tests/testpanedfileview.c | 92 - tests/testtext.c | 21 - tests/testthreads.c | 166 - tests/testthreads2.c | 155 - tests/testthreads2.sh | 6 - tests/vttest.py | 827 -- {moo => tools}/genenums.py | 0 {moo => tools}/glade2c.py | 0 tools/rules.mk | 8 + {moo => tools}/xml2h.py | 0 ugly/i18n.mk | 22 - vs/medit.sln | 20 - vs/medit.vcproj | 2126 ----- 372 files changed, 9794 insertions(+), 41412 deletions(-) delete mode 100644 .gitignore delete mode 100644 CMakeLists.txt create mode 100644 Makefile.am create mode 100755 autogen.sh delete mode 100644 cmake/dist.cmake delete mode 100644 cmake/gtk.cmake delete mode 100644 cmake/modules/FindMooCmake.cmake delete mode 100644 cmake/modules/FindMooCmakeUtils.cmake delete mode 100644 cmake/modules/FindMooCompilers.cmake delete mode 100644 cmake/modules/FindMooDesktopFile.cmake delete mode 100644 cmake/modules/FindMooI18n.cmake delete mode 100644 cmake/modules/FindMooPython.cmake delete mode 100644 cmake/moo-libs.cmake delete mode 100644 cmake/moo.cmake delete mode 100644 config-dirs.h.in delete mode 100644 config.cmake create mode 100644 configure.ac delete mode 100644 doc/CMakeLists.txt create mode 100644 doc/Makefile.am create mode 100644 doc/genhelpsections.py create mode 100644 doc/help-sections.h create mode 100644 doc/help.html create mode 100644 doc/help/app-license.html create mode 100644 doc/help/editing-options.html create mode 100644 doc/help/gpl.html create mode 100644 doc/help/index.html create mode 100644 doc/help/lgpl.html create mode 100644 doc/help/license-lua-lfs.html create mode 100644 doc/help/license-lua.html create mode 100644 doc/help/license-xdg-utils.html create mode 100644 doc/help/prefs-file-filters.html create mode 100644 doc/help/prefs-file.html create mode 100644 doc/help/prefs-lang-options.html create mode 100644 doc/help/prefs-langs-and-filters.html create mode 100644 doc/help/prefs-user-tools.html create mode 100644 doc/help/regex-search.html create mode 100644 doc/help/regex.html create mode 100644 doc/help/sect-user-tools.html create mode 100644 doc/help/user-tools-files.html create mode 100644 doc/help/user-tools-lua.html create mode 100644 doc/help/user-tools-python.html create mode 100644 doc/help/user-tools-shell.html delete mode 100644 doc/makedocs.cmake create mode 100644 doc/man-medit.t2t create mode 100644 doc/medit.1 create mode 100644 doc/medit.t2t delete mode 100644 junk/completion/Makefile.am delete mode 100644 junk/completion/completion-plugin.c delete mode 100644 junk/completion/completion.c delete mode 100644 junk/completion/completion.glade delete mode 100644 junk/completion/completion.h delete mode 100644 junk/completion/files/gap.lst delete mode 100644 junk/completion/files/latex.cfg delete mode 100644 junk/completion/files/texinfo.cfg create mode 100644 m4/moo-flags.m4 create mode 100644 m4/moo-gtk.m4 create mode 100644 m4/moo-os.m4 create mode 100644 medit/Makefile.am delete mode 100644 moo/CMakeLists.txt create mode 100644 moo/Makefile.am delete mode 100644 moo/TODO create mode 100644 moo/eggsmclient/Makefile.am rename moo/{mooapp/smclient => eggsmclient}/eggdesktopfile.c (100%) rename moo/{mooapp/smclient => eggsmclient}/eggdesktopfile.h (100%) rename moo/{mooapp/smclient => eggsmclient}/eggsmclient-dummy.c (100%) rename moo/{mooapp/smclient => eggsmclient}/eggsmclient-mangle.h (100%) rename moo/{mooapp/smclient => eggsmclient}/eggsmclient-private.h (100%) rename moo/{mooapp/smclient => eggsmclient}/eggsmclient-win32.c (100%) rename moo/{mooapp/smclient => eggsmclient}/eggsmclient-xsmp.c (100%) rename moo/{mooapp/smclient => eggsmclient}/eggsmclient.c (100%) rename moo/{mooapp/smclient => eggsmclient}/eggsmclient.h (100%) delete mode 100644 moo/gendef.py delete mode 100644 moo/gendummy.cmake delete mode 100644 moo/genmarshal.cmake delete mode 100644 moo/glade2c.cmake.in create mode 100644 moo/gtksourceview/Makefile.am create mode 100644 moo/gtksourceview/gtksourcebuffer.h rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtksourcecontextengine.c (100%) rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtksourcecontextengine.h (100%) rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtksourceengine.c (100%) rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtksourceengine.h (100%) rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtksourceiter.c (100%) rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtksourceiter.h (100%) rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtksourcelanguage-parser-1.c (100%) rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtksourcelanguage-parser-2.c (100%) rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtksourcelanguage-private.h (100%) rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtksourcelanguage.c (100%) rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtksourcelanguage.h (100%) rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtksourcelanguagemanager.c (99%) rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtksourcelanguagemanager.h (100%) rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtksourcestyle-private.h (100%) rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtksourcestyle.c (100%) rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtksourcestyle.h (100%) rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtksourcestylescheme.c (100%) rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtksourcestylescheme.h (100%) rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtksourcestyleschememanager.c (99%) rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtksourcestyleschememanager.h (100%) create mode 100644 moo/gtksourceview/gtksourceview-api.h rename moo/{mooedit => }/gtksourceview/gtksourceview-i18n.h (100%) rename moo/{mooedit => }/gtksourceview/gtksourceview-marshal.h (100%) rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtksourceview-utils.c (86%) rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtksourceview-utils.h (97%) create mode 100644 moo/gtksourceview/gtksourceview.h rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtktextregion.c (100%) rename moo/{mooedit/gtksourceview/upstream => gtksourceview}/gtktextregion.h (100%) delete mode 100644 moo/moo-dll.c delete mode 100644 moo/mooapp/CMakeLists.txt create mode 100644 moo/mooapp/Makefile.am delete mode 100644 moo/mooapp/marshals.list delete mode 100644 moo/mooapp/smclient/CMakeLists.txt delete mode 100644 moo/mooedit/CMakeLists.txt create mode 100644 moo/mooedit/Makefile.am delete mode 100644 moo/mooedit/gtksourceview/CMakeLists.txt delete mode 100644 moo/mooedit/gtksourceview/Makefile.incl delete mode 100644 moo/mooedit/gtksourceview/gtksourceview-api.h delete mode 100644 moo/mooedit/gtksourceview/mangle.py delete mode 100755 moo/mooedit/gtksourceview/upstream/mangle.sh create mode 100644 moo/mooedit/langs/Makefile.incl delete mode 100644 moo/mooedit/marshals.list create mode 100644 moo/mooedit/mooedit-enums.c create mode 100644 moo/mooedit/mooedit-enums.h delete mode 100644 moo/moofileview/CMakeLists.txt create mode 100644 moo/moofileview/Makefile.am delete mode 100644 moo/moofileview/marshals.list delete mode 100644 moo/moolua/CMakeLists.txt create mode 100644 moo/moolua/Makefile.am rename moo/moolua/ext/{lfs.c => lfs.cpp} (76%) rename moo/moolua/{luaall.c => luaall.cpp} (100%) rename moo/moolua/{moolua.c => moolua.cpp} (97%) delete mode 100644 moo/mooutils/CMakeLists.txt create mode 100644 moo/mooutils/Makefile.am delete mode 100644 moo/mooutils/genpixbufcsource.cmake.in delete mode 100644 moo/mooutils/marshals.list create mode 100644 moo/mooutils/moocpp-cont.h create mode 100644 moo/mooutils/moocpp-exc.h create mode 100644 moo/mooutils/moocpp-macros.h create mode 100644 moo/mooutils/moocpp-refptr.h create mode 100644 moo/mooutils/moocpp-types.h create mode 100644 moo/mooutils/moocpp.cpp rename plugins/moopython/moopython-builtin.h => moo/mooutils/moocpp.h (57%) delete mode 100644 moo/mooutils/xdgmime/CMakeLists.txt create mode 100644 moo/xdgmime/Makefile.am rename moo/{mooutils => }/xdgmime/README (100%) rename moo/{mooutils => }/xdgmime/xdgmime.c (100%) rename moo/{mooutils => }/xdgmime/xdgmime.h (100%) rename moo/{mooutils => }/xdgmime/xdgmimealias.c (100%) rename moo/{mooutils => }/xdgmime/xdgmimealias.h (100%) rename moo/{mooutils => }/xdgmime/xdgmimecache.c (100%) rename moo/{mooutils => }/xdgmime/xdgmimecache.h (100%) rename moo/{mooutils => }/xdgmime/xdgmimeglob.c (100%) rename moo/{mooutils => }/xdgmime/xdgmimeglob.h (100%) rename moo/{mooutils => }/xdgmime/xdgmimeicon.c (100%) rename moo/{mooutils => }/xdgmime/xdgmimeicon.h (100%) rename moo/{mooutils => }/xdgmime/xdgmimeint.c (100%) rename moo/{mooutils => }/xdgmime/xdgmimeint.h (100%) rename moo/{mooutils => }/xdgmime/xdgmimemagic.c (100%) rename moo/{mooutils => }/xdgmime/xdgmimemagic.h (100%) rename moo/{mooutils => }/xdgmime/xdgmimeparent.c (100%) rename moo/{mooutils => }/xdgmime/xdgmimeparent.h (100%) delete mode 100644 plat/mac/Info.plist.in delete mode 100644 plat/mac/Makefile.incl delete mode 100644 plat/mac/environment.sh delete mode 100644 plat/mac/gtkrc delete mode 100755 plat/mac/medit delete mode 100644 plat/mac/medit.bundle delete mode 100644 plat/mac/medit.icns delete mode 100755 plat/unix/distcheck.in delete mode 100644 plat/win32/intltool-wrapper.bat.in delete mode 100644 plat/win32/run-medit.in delete mode 100644 plat/win32/run-tests.in delete mode 100644 plugins/CMakeLists.txt create mode 100644 plugins/Makefile.am create mode 100644 plugins/ctags/Makefile.incl delete mode 100644 plugins/moopython/CMakeLists.txt delete mode 100644 plugins/moopython/Makefile.ug delete mode 100644 plugins/moopython/codegen/README delete mode 100644 plugins/moopython/codegen/__init__.py delete mode 100644 plugins/moopython/codegen/argtypes.py delete mode 100644 plugins/moopython/codegen/argtypes_m.py delete mode 100644 plugins/moopython/codegen/codegen.py delete mode 100644 plugins/moopython/codegen/definitions.py delete mode 100644 plugins/moopython/codegen/defsparser.py delete mode 100644 plugins/moopython/codegen/docgen.py delete mode 100755 plugins/moopython/codegen/mergedefs.py delete mode 100755 plugins/moopython/codegen/mkskel.py delete mode 100644 plugins/moopython/codegen/override.py delete mode 100644 plugins/moopython/codegen/reversewrapper.py delete mode 100644 plugins/moopython/codegen/scmexpr.py delete mode 100644 plugins/moopython/genpygtk.cmake delete mode 100644 plugins/moopython/moo-mod.c delete mode 100644 plugins/moopython/moo.rc.in delete mode 100644 plugins/moopython/moopython-api.h delete mode 100644 plugins/moopython/moopython-builtin.c delete mode 100644 plugins/moopython/moopython-loader.c delete mode 100644 plugins/moopython/moopython-loader.h delete mode 100644 plugins/moopython/moopython-mod.c delete mode 100644 plugins/moopython/moopython-pygtkmod.h delete mode 100644 plugins/moopython/moopython-utils.c delete mode 100644 plugins/moopython/moopython-utils.h delete mode 100644 plugins/moopython/plugins/CMakeLists.txt delete mode 100644 plugins/moopython/plugins/Makefile.ug delete mode 100644 plugins/moopython/plugins/lib/insert_date_and_time.py delete mode 100755 plugins/moopython/plugins/lib/pyconsole.py delete mode 100644 plugins/moopython/plugins/medit/__init__.py delete mode 100644 plugins/moopython/plugins/medit/runpython.py delete mode 100644 plugins/moopython/plugins/pycmd.ini.in.in delete mode 100644 plugins/moopython/plugins/pycmd.py delete mode 100644 plugins/moopython/plugins/pyproject/Makefile.ug delete mode 100644 plugins/moopython/plugins/pyproject/medit-mprj.xml.in delete mode 100644 plugins/moopython/plugins/pyproject/mprj/__init__.py delete mode 100644 plugins/moopython/plugins/pyproject/mprj/config/__init__.py delete mode 100644 plugins/moopython/plugins/pyproject/mprj/config/_config.py delete mode 100644 plugins/moopython/plugins/pyproject/mprj/config/_dict.py delete mode 100644 plugins/moopython/plugins/pyproject/mprj/config/_group.py delete mode 100644 plugins/moopython/plugins/pyproject/mprj/config/_item.py delete mode 100644 plugins/moopython/plugins/pyproject/mprj/config/_setting.py delete mode 100644 plugins/moopython/plugins/pyproject/mprj/config/_utils.py delete mode 100644 plugins/moopython/plugins/pyproject/mprj/config/_xml.py delete mode 100644 plugins/moopython/plugins/pyproject/mprj/config/test.py delete mode 100644 plugins/moopython/plugins/pyproject/mprj/config/view.py delete mode 100644 plugins/moopython/plugins/pyproject/mprj/factory.glade delete mode 100644 plugins/moopython/plugins/pyproject/mprj/factory.py delete mode 100644 plugins/moopython/plugins/pyproject/mprj/manager.py delete mode 100644 plugins/moopython/plugins/pyproject/mprj/optdialog.py delete mode 100644 plugins/moopython/plugins/pyproject/mprj/project.py delete mode 100644 plugins/moopython/plugins/pyproject/mprj/session.py delete mode 100644 plugins/moopython/plugins/pyproject/mprj/settings.py delete mode 100644 plugins/moopython/plugins/pyproject/mprj/simple.glade delete mode 100644 plugins/moopython/plugins/pyproject/mprj/simple.py delete mode 100644 plugins/moopython/plugins/pyproject/mprj/test.py delete mode 100644 plugins/moopython/plugins/pyproject/mprj/utils.glade delete mode 100644 plugins/moopython/plugins/pyproject/mprj/utils.py delete mode 100644 plugins/moopython/plugins/pyproject/project-plugin.ini.in.in delete mode 100644 plugins/moopython/plugins/pyproject/project-plugin.py delete mode 100644 plugins/moopython/plugins/pyproject/projects/c.py delete mode 100644 plugins/moopython/plugins/pyproject/projects/cproj/__init__.py delete mode 100644 plugins/moopython/plugins/pyproject/projects/cproj/config.py delete mode 100644 plugins/moopython/plugins/pyproject/projects/cproj/optdialog.py delete mode 100644 plugins/moopython/plugins/pyproject/projects/cproj/options.glade delete mode 100644 plugins/moopython/plugins/pyproject/projects/cproj/parser.py delete mode 100644 plugins/moopython/plugins/pyproject/projects/pyproj/__init__.py delete mode 100644 plugins/moopython/plugins/pyproject/projects/pyproj/config.py delete mode 100644 plugins/moopython/plugins/pyproject/projects/pyproj/optdialog.py delete mode 100644 plugins/moopython/plugins/pyproject/projects/pyproj/options.glade delete mode 100644 plugins/moopython/plugins/pyproject/projects/python.py delete mode 100644 plugins/moopython/plugins/pytest.py delete mode 100644 plugins/moopython/plugins/python.ini.in.in delete mode 100644 plugins/moopython/plugins/python.py delete mode 100644 plugins/moopython/plugins/simple.ini delete mode 100644 plugins/moopython/plugins/simple.py delete mode 100644 plugins/moopython/plugins/terminal.ini.in.in delete mode 100644 plugins/moopython/plugins/terminal.py delete mode 100644 plugins/moopython/py2h.py delete mode 100644 plugins/moopython/pygtk/Makefile.incl delete mode 100644 plugins/moopython/pygtk/moo-mod.py delete mode 100644 plugins/moopython/pygtk/moo-pygtk.c delete mode 100644 plugins/moopython/pygtk/moo-pygtk.h delete mode 100644 plugins/moopython/pygtk/mooapp-mod.c delete mode 100644 plugins/moopython/pygtk/mooapp-mod.py delete mode 100644 plugins/moopython/pygtk/mooapp-pygtk.defs delete mode 100644 plugins/moopython/pygtk/mooapp-pygtk.override delete mode 100644 plugins/moopython/pygtk/moocommand.defs delete mode 100644 plugins/moopython/pygtk/mooedit-mod.c delete mode 100644 plugins/moopython/pygtk/mooedit-mod.py delete mode 100644 plugins/moopython/pygtk/mooedit-pygtk.defs delete mode 100644 plugins/moopython/pygtk/mooedit-pygtk.override delete mode 100644 plugins/moopython/pygtk/mooeditor.defs delete mode 100644 plugins/moopython/pygtk/moofileview.defs delete mode 100644 plugins/moopython/pygtk/moopaned.defs delete mode 100644 plugins/moopython/pygtk/moopaned.override delete mode 100644 plugins/moopython/pygtk/mooplugin.defs delete mode 100644 plugins/moopython/pygtk/mooutils-mod.c delete mode 100644 plugins/moopython/pygtk/mooutils-mod.py delete mode 100644 plugins/moopython/pygtk/mooutils-pygtk.defs delete mode 100644 plugins/moopython/pygtk/mooutils-pygtk.override delete mode 100644 plugins/moopython/pymoo.ini.in delete mode 100644 plugins/moopython/pymoo.rc.in create mode 100644 plugins/script/Makefile.am create mode 100644 plugins/script/momscript-api.cpp create mode 100644 plugins/script/momscript-api.h create mode 100644 plugins/script/momscript-classes.cpp create mode 100644 plugins/script/momscript-classes.h create mode 100644 plugins/script/momscript-lua.cpp create mode 100644 plugins/script/momscript-lua.h create mode 100644 plugins/script/momscript-variant.h create mode 100644 plugins/script/momscript.cpp create mode 100644 plugins/script/momscript.h delete mode 100644 plugins/usertools/CMakeLists.txt create mode 100644 plugins/usertools/Makefile.am create mode 100644 plugins/usertools/exe/Makefile.incl rename plugins/usertools/{moocommand-sh.c => exe/moocommand-exe.c} (99%) rename plugins/usertools/{moocommand-sh.h => exe/moocommand-exe.h} (98%) create mode 100644 plugins/usertools/lua/Makefile.incl create mode 100644 plugins/usertools/lua/lua2-tool-setup.lua rename {moo/mooedit => plugins/usertools/lua}/medit.lua (100%) rename plugins/usertools/{moocommand-lua.c => lua/moocommand-lua.cpp} (50%) rename plugins/usertools/{ => lua}/moocommand-lua.h (97%) rename moo/mooedit/mooedit-lua-api.c => plugins/usertools/lua/mooedit-lua-api1.cpp (97%) rename moo/mooedit/mooedit-lua.c => plugins/usertools/lua/mooedit-lua1.cpp (98%) rename moo/mooedit/mooedit-lua.h => plugins/usertools/lua/mooedit-lua1.h (63%) create mode 100644 plugins/usertools/moousertools-enums.c create mode 100644 plugins/usertools/moousertools-enums.h rename plugins/usertools/{unix-context.cfg => unix/context.cfg} (100%) rename plugins/usertools/{unix-menu.cfg => unix/menu.cfg} (100%) rename plugins/usertools/{win32-context.cfg => win32/context.cfg} (100%) rename plugins/usertools/{win32-menu.cfg => win32/menu.cfg} (100%) delete mode 100644 tests/Makefile.am delete mode 100644 tests/check.sh delete mode 100644 tests/encodings/example_gb2312.txt delete mode 100644 tests/encodings/example_utf8.txt delete mode 100644 tests/markup.c delete mode 100644 tests/medit.c delete mode 100755 tests/medit.py delete mode 100644 tests/miniglade.c delete mode 100755 tests/run-mingw.sh delete mode 100644 tests/testfileview.c delete mode 100644 tests/testfold.c delete mode 100644 tests/testhtml.c delete mode 100644 tests/testkeyfile.c delete mode 100644 tests/testobject.c delete mode 100644 tests/testpaned.c delete mode 100644 tests/testpanedfileview.c delete mode 100644 tests/testtext.c delete mode 100644 tests/testthreads.c delete mode 100644 tests/testthreads2.c delete mode 100644 tests/testthreads2.sh delete mode 100644 tests/vttest.py rename {moo => tools}/genenums.py (100%) rename {moo => tools}/glade2c.py (100%) create mode 100644 tools/rules.mk rename {moo => tools}/xml2h.py (100%) delete mode 100644 ugly/i18n.mk delete mode 100644 vs/medit.sln delete mode 100644 vs/medit.vcproj diff --git a/.gitignore b/.gitignore deleted file mode 100644 index f8af6ba3..00000000 --- a/.gitignore +++ /dev/null @@ -1,34 +0,0 @@ -*.orig -*.pyc -*.rej -*.bak -*~ -Makefile.in -Makefile.am -.Makefile.am.* -.globalvars -build/ -autom4te.cache/ -.hg/ -po*/dist -po*/intltool-update -po*/missing -po*/notexist -po*/pot -Makefile.in.in -*-old.* -*-old -moo/mooapp/mooapp-credits.h -.hgtags -.moo.mprj.session -aclocal.m4 -compile -config.guess -config.h.in -config.sub -configure -depcomp -install-sh -intltool-*.in -ltmain.sh -missing diff --git a/.hgignore b/.hgignore index 34f56514..008b4d0b 100644 --- a/.hgignore +++ b/.hgignore @@ -1,44 +1,25 @@ syntax: glob -plat/win32/gtk-win/jhbuild/ -plat/win32/gtk-win/debug/ -plat/win32/gtk-win/release/ -plat/win32/gtk-win/tarballs/ -plat/win32/gtk-win/*.log -plat/win32/gtk-win/*~ -.git/ -build/ -*-old -*-old.c -*.orig -*.rej -*.bak -*.pyc -*.tmp -*.gmo -*.stamp -*-gxml.h -*~ -*.a -.DS_Store Makefile.in -*-enums.[ch] -.moo.mprj.session -*.ncb -*.suo -*.vcproj.* -vs/Debug/ -vs/Release/ -doc/help/*.html -doc/help.html -doc/help-sections.h -doc/medit.1 -CMakeFiles/ -Makefile -cmake_install.cmake -moo/mooedit/gtksourceview/*-mangled.* +depcomp +compile +config.guess +config.sub +configure +doc/help.stamp +install-sh +ltmain.sh +m4/intltool.m4 +m4/libtool.m4 +m4/ltoptions.m4 +m4/ltsugar.m4 +m4/ltversion.m4 +m4/lt~obsolete.m4 +missing +po-gsv/Makefile.in.in +po/Makefile.in.in +build/ +autom4te.cache/ +aclocal.m4 +*~ +*.orig -syntax: regexp -^po(-gsv)?/(Makefile\.in\.in|dist|missing|notexist|pot|intltool-update)$ -^moo/mooapp/mooapp-credits\.h -^moo/mooutils/stock-(moo|medit)\.h -^doc/(man-)?medit\.t2t$ diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 5d281485..00000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,71 +0,0 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) -PROJECT(MOO) - -SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) -FIND_PACKAGE(MooCmake) - -MOO_DEFINE_VERSIONS("0.10.5-unstable") - -SET(MOO_PACKAGE_NAME moo) -SET(MOO_EMAIL "emuntyan@sourceforge.net") -SET(MOO_COPYRIGHT "2004-2010 Yevgen Muntyan <${MOO_EMAIL}>") -SET(PACKAGE_BUGREPORT ${MOO_EMAIL}) -SET(MOO_PACKAGE_VENDOR ${MOO_EMAIL}) - -MOO_OPTION(MOO_BUILD_CTAGS ${MOO_OS_UNIX} "Build Ctags plugin" HIDDEN ${MOO_OS_WIN32} HEADER TRUE) -MOO_OPTION(MOO_ENABLE_PROJECT FALSE "Build project plugin" HIDDEN TRUE) -MOO_OPTION(MOO_ENABLE_GENERATED_FILES ${MOO_OS_UNIX} "Run gtk-update-icon-cache on install") -MOO_OPTION(MOO_BROKEN_GTK_THEME FALSE "Work around bugs in gtk theme" HEADER TRUE) - -MOO_OPTION(MOO_ENABLE_UNIT_TESTS FALSE "Build unit tests" DEFINE TRUE) -IF(MOO_ENABLE_UNIT_TESTS) - ADD_DEFINITIONS(-DMOO_ENABLE_UNIT_TESTS) -ENDIF(MOO_ENABLE_UNIT_TESTS) - -INCLUDE(cmake/gtk.cmake) -INCLUDE(cmake/moo.cmake) -INCLUDE(cmake/dist.cmake) - -SET(MOO_MODULE_MAJOR_VERSION 1) -SET(MOO_MODULE_MINOR_VERSION 0) -SET(MOO_MODULE_VERSION \"${MOO_MODULE_MAJOR_VERSION}.${MOO_MODULE_MINOR_VERSION}\") - -ADD_DEFINITIONS(-DHAVE_CONFIG_H) -ADD_DEFINITIONS(-DGETTEXT_PACKAGE=\"moo\") -ADD_DEFINITIONS(-DG_LOG_DOMAIN=\"Moo\") -INCLUDE_DIRECTORIES(${MOO_BINARY_DIR} ${MOO_BINARY_DIR}/moo ${MOO_SOURCE_DIR}/moo) -ADD_DEFINITIONS(${GTK_CFLAGS} ${GTK_CFLAGS_OTHER}) - -INCLUDE(config.cmake) - -ADD_SUBDIRECTORY(doc) -ADD_SUBDIRECTORY(moo) -ADD_SUBDIRECTORY(plugins) -ADD_SUBDIRECTORY(medit) - -MOO_ADD_MSG_CATALOG(moo po) -MOO_ADD_MSG_CATALOG(moo-gsv po-gsv) - -MOO_WRITE_CONFIG_H(config.h.in config.h @ONLY) - -CONFIGURE_FILE(config-dirs.h.in config-dirs.h @ONLY) - -IF(WIN32) - GET_FILENAME_COMPONENT(_MOO_SOURCE_DIR ${MOO_SOURCE_DIR} ABSOLUTE) - # TO_NATIVE_PATH damn it! Cmake is such a wonderful piece of language... - STRING(REPLACE "/" "\\" _MOO_SOURCE_DIR "${_MOO_SOURCE_DIR}") - GET_FILENAME_COMPONENT(_MOO_BINARY_DIR ${MOO_BINARY_DIR} ABSOLUTE) - STRING(REPLACE "/" "\\" _MOO_BINARY_DIR "${_MOO_BINARY_DIR}") - SET(_MOO_RUN_HOW "@") - CONFIGURE_FILE(plat/win32/run-medit.in run-medit.bat) - SET(_MOO_RUN_HOW "gdb --args ") - CONFIGURE_FILE(plat/win32/run-medit.in run-medit-in-gdb.bat) - IF(MOO_ENABLE_UNIT_TESTS) - SET(_MOO_RUN_HOW "@") - CONFIGURE_FILE(plat/win32/run-tests.in run-tests.bat) - ENDIF(MOO_ENABLE_UNIT_TESTS) -ENDIF(WIN32) - -IF(NOT WIN32) - INSTALL(PROGRAMS plat/unix/xdg-open plat/unix/xdg-email plat/unix/moo-open-html-help DESTINATION ${MOO_DATA_DIR}/scripts) -ENDIF(NOT WIN32) diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 00000000..2932907d --- /dev/null +++ b/Makefile.am @@ -0,0 +1,13 @@ +ACLOCAL_AMFLAGS = -I m4 $(ACLOCAL_FLAGS) + +SUBDIRS = po po-gsv doc moo plugins medit + +unix_scripts = \ + plat/unix/xdg-open \ + plat/unix/xdg-email \ + plat/unix/moo-open-html-help +EXTRA_DIST = $(unix_scripts) +if MOO_OS_UNIX +scriptsdir = $(MOO_DATA_DIR)/scripts +scripts_DATA = $(unix_scripts) +endif MOO_OS_UNIX diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 00000000..016a131c --- /dev/null +++ b/autogen.sh @@ -0,0 +1,28 @@ +[ -z "$ACLOCAL" ] && ACLOCAL=aclocal +[ -z "$AUTOCONF" ] && AUTOCONF=autoconf +[ -z "$AUTOHEADER" ] && AUTOHEADER=autoheader +[ -z "$AUTOMAKE" ] && AUTOMAKE=automake + +workingdir=`pwd` +srcdir=`dirname "$0"` +srcdir=`cd "$srcdir" && pwd` + +cd "$srcdir" + +# autoreconf --verbose --install --force || exit $! + +run_cmd() { + echo "$@" + "$@" || exit $! +} + +run_cmd libtoolize --copy --force + +run_cmd intltoolize --copy --force +echo "sed -e s/@GETTEXT_PACKAGE@/moo-gsv/ po/Makefile.in.in > po-gsv/Makefile.in.in" +sed -e s/@GETTEXT_PACKAGE@/@GETTEXT_PACKAGE@-gsv/ po/Makefile.in.in > po-gsv/Makefile.in.in || exit $! + +run_cmd $ACLOCAL --force -I m4 $ACLOCAL_FLAGS +run_cmd $AUTOCONF --force +run_cmd $AUTOHEADER --force +run_cmd $AUTOMAKE --add-missing --copy --force-missing diff --git a/cmake/dist.cmake b/cmake/dist.cmake deleted file mode 100644 index f501e73f..00000000 --- a/cmake/dist.cmake +++ /dev/null @@ -1,115 +0,0 @@ -FILE(WRITE ${CMAKE_BINARY_DIR}/cmake_uninstall.cmake.in -" -IF(NOT EXISTS \"\@CMAKE_CURRENT_BINARY_DIR\@/install_manifest.txt\") - MESSAGE(FATAL_ERROR \"Cannot find install manifest: \\\"\@CMAKE_CURRENT_BINARY_DIR\@/install_manifest.txt\\\"\") -ENDIF(NOT EXISTS \"\@CMAKE_CURRENT_BINARY_DIR\@/install_manifest.txt\") - -FILE(READ \"\@CMAKE_CURRENT_BINARY_DIR\@/install_manifest.txt\" files) -STRING(REGEX REPLACE \"\\n\" \";\" files \"\${files}\") -FOREACH(file \${files}) - MESSAGE(STATUS \"Uninstalling \\\"\$ENV{DESTDIR}\${file}\\\"\") - IF(EXISTS \"\$ENV{DESTDIR}\${file}\") - EXECUTE_PROCESS( - COMMAND \"\@CMAKE_COMMAND\@\" -E remove \"\$ENV{DESTDIR}\${file}\" - RESULT_VARIABLE rm_retval - ) - IF(NOT rm_retval EQUAL 0) - MESSAGE(FATAL_ERROR \"Problem when removing \\\"\$ENV{DESTDIR}\${file}\\\": \${rm_retval}\") - ENDIF(NOT rm_retval EQUAL 0) - ENDIF(EXISTS \"\$ENV{DESTDIR}\${file}\") -ENDFOREACH(file) -") -CONFIGURE_FILE("${CMAKE_BINARY_DIR}/cmake_uninstall.cmake.in" "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake" @ONLY) -ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake") - - -############################################################################# -# -# Installation dirs -# - -IF(WIN32) - IF("${CMAKE_INSTALL_PREFIX}" STREQUAL "C:/Program Files/MOO") - SET(CMAKE_INSTALL_PREFIX "C:/Program Files/medit") - ELSEIF("${CMAKE_INSTALL_PREFIX}" STREQUAL "C:/Program Files (x86)/MOO") - SET(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/medit") - ENDIF("${CMAKE_INSTALL_PREFIX}" STREQUAL "C:/Program Files/MOO") -ENDIF(WIN32) - -SET(MOO_DATA_DIR ${DATADIR}/moo CACHE PATH "Where data files go") -SET(MOO_LIB_DIR ${LIBDIR}/moo CACHE PATH "Where lib files go") -SET(MOO_PLUGINS_DIR ${MOO_LIB_DIR}/plugins CACHE PATH "Where plugins go") -SET(MOO_TEXT_LANG_FILES_DIR ${MOO_DATA_DIR}/language-specs CACHE PATH "Where lang files go") -SET(MOO_DOC_DIR ${DATADIR}/doc/medit CACHE PATH "Where docs go") -SET(MOO_HELP_DIR ${MOO_DOC_DIR}/help CACHE PATH "Where html help files go") -FOREACH(name BINDIR DATADIR LIBDIR MOO_DATA_DIR MOO_LIB_DIR MOO_PLUGINS_DIR - MOO_TEXT_LANG_FILES_DIR LOCALEDIR MOO_DOC_DIR MOO_HELP_DIR) - SET(${name}_ABS ${${name}}) - IF(NOT IS_ABSOLUTE ${${name}}) - SET(${name}_ABS ${CMAKE_INSTALL_PREFIX}/${${name}}) - ENDIF(NOT IS_ABSOLUTE ${${name}}) - MARK_AS_ADVANCED(${name}_ABS) -ENDFOREACH(name) - -IF(WIN32) - SET(MEDIT_LIBRARIES ${CMAKE_SOURCE_DIR}/../medit-bin-dist CACHE PATH "Where Gtk libraries are located") - SET(MEDIT_PYTHON_LIBRARIES ${CMAKE_SOURCE_DIR}/../python-dist CACHE PATH "Where Python is located") - IF(EXISTS ${MEDIT_LIBRARIES}) - INSTALL(DIRECTORY ${MEDIT_LIBRARIES}/ DESTINATION ".") - ENDIF(EXISTS ${MEDIT_LIBRARIES}) - IF(MOO_ENABLE_PYTHON AND EXISTS ${MEDIT_PYTHON_LIBRARIES}) - INSTALL(DIRECTORY ${MEDIT_PYTHON_LIBRARIES}/ DESTINATION ".") - ENDIF(MOO_ENABLE_PYTHON AND EXISTS ${MEDIT_PYTHON_LIBRARIES}) -ENDIF(WIN32) - - -############################################################################# -# -# CPack -# - -SET(CPACK_PACKAGE_NAME "medit") -SET(CPACK_PACKAGE_VENDOR ${MOO_PACKAGE_VENDOR}) -STRING(REGEX REPLACE "([0-9]+)[.]([0-9]+)[.]([0-9]+)" "\\1" CPACK_PACKAGE_VERSION_MAJOR ${MOO_VERSION}) -STRING(REGEX REPLACE "([0-9]+)[.]([0-9]+)[.]([0-9]+)" "\\2" CPACK_PACKAGE_VERSION_MINOR ${MOO_VERSION}) -STRING(REGEX REPLACE "([0-9]+)[.]([0-9]+)[.]([0-9]+)" "\\3" CPACK_PACKAGE_VERSION_PATCH ${MOO_VERSION}) -SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "medit a text editor") -SET(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${MOO_PACKAGE_VERSION}) -SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/COPYING.GPL) -SET(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README) -# SET(CPACK_GENERATOR) -SET(CPACK_PACKAGE_EXECUTABLES medit medit) - -SET(CPACK_SOURCE_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME}) -SET(CPACK_SOURCE_IGNORE_FILES "/plat/win32/gtk-win/;/build/;/[.]hg;/[.]git;/junk/;/vs/;/ugly/;/_build/;/_install/;.*[.]orig$") - -SET(CPACK_PACKAGE_INSTALL_DIRECTORY "medit") -SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "medit") -# SET(CPACK_NSIS_MUI_ICON) -# SET(CPACK_NSIS_MUI_UNIICON) -# SET(CPACK_PACKAGE_ICON ${CMAKE_SOURCE_DIR}/moo/mooutils/pixmaps/medit.ico) -# SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS) -# SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS) -# SET(CPACK_NSIS_COMPRESSOR) -SET(CPACK_NSIS_DISPLAY_NAME "medit ${MOO_DISPLAY_VERSION}") -SET(CPACK_NSIS_PACKAGE_NAME "medit") -# SET(CPACK_NSIS_INSTALLED_ICON_NAME) -SET(CPACK_NSIS_HELP_LINK "http://mooedit.sourceforge.net/") -SET(CPACK_NSIS_URL_INFO_ABOUT "http://mooedit.sourceforge.net/") -SET(CPACK_NSIS_CONTACT ${MOO_PACKAGE_VENDOR}) -# SET(CPACK_NSIS_CREATE_ICONS_EXTRA) -# SET(CPACK_NSIS_DELETE_ICONS_EXTRA) - -IF(WIN32) - SET(CPACK_SOURCE_GENERATOR ZIP) - SET(CPACK_GENERATOR NSIS ZIP) -ELSE(WIN32) - SET(CPACK_SOURCE_GENERATOR TBZ2) -ENDIF(WIN32) - -INCLUDE(CPack) - -IF(NOT WIN32) - CONFIGURE_FILE(${MOO_SOURCE_DIR}/plat/unix/distcheck.in distcheck) - ADD_CUSTOM_TARGET(distcheck ${MOO_BINARY_DIR}/distcheck) -ENDIF(NOT WIN32) diff --git a/cmake/gtk.cmake b/cmake/gtk.cmake deleted file mode 100644 index b0b76821..00000000 --- a/cmake/gtk.cmake +++ /dev/null @@ -1,72 +0,0 @@ -FIND_PACKAGE(PkgConfig) - -MACRO(_MOO_GET_PKG_CONFIG_VARIABLE cmakevar pkgconfigvar pkgname) - MOO_EXEC_OR_DIE("pkg-config --variable=${pkgconfigvar} ${pkgname}" - COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=${pkgconfigvar} ${pkgname} - OUTPUT_VARIABLE ${cmakevar}) - STRING(STRIP ${${cmakevar}} ${cmakevar}) -ENDMACRO(_MOO_GET_PKG_CONFIG_VARIABLE) - -PKG_CHECK_MODULES(GTK REQUIRED gtk+-2.0>=2.14.0 glib-2.0 gio-2.0 gmodule-2.0 gthread-2.0 gobject-2.0) -LIST(APPEND MOO_DEP_LIBS ${GTK_LIBRARIES}) -INCLUDE_DIRECTORIES(${GTK_INCLUDE_DIRS}) -ADD_DEFINITIONS(${GTK_DEFINITIONS}) -LINK_DIRECTORIES(${GTK_LIBRARY_DIRS}) - -IF(WIN32 AND EXISTS "$ENV{GTKDIR}") - INCLUDE_DIRECTORIES("$ENV{GTKDIR}/include") -ENDIF(WIN32 AND EXISTS "$ENV{GTKDIR}") - -MOO_ADD_COMPILE_DEFINITIONS(RELEASE -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT) -MOO_ADD_COMPILER_FLAGS(GCC WIN32 -mms-bitfields) - -FIND_PACKAGE(MooPython) - -PKG_CHECK_MODULES(LIBXML2 REQUIRED libxml-2.0) -LIST(APPEND MOO_DEP_LIBS ${LIBXML2_LIBRARIES}) -INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIRS}) -ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) -LINK_DIRECTORIES(${LIBXML2_LIBRARY_DIRS}) -SET(MOO_USE_XML TRUE) -MOO_DEFINE_H(MOO_USE_XML) - -_MOO_GET_PKG_CONFIG_VARIABLE(_moo_gdk_target target gdk-2.0) -SET(GDK_X11 FALSE) -SET(GDK_WIN32 FALSE) -SET(GDK_QUARTZ FALSE) -IF("${_moo_gdk_target}" STREQUAL "x11") - SET(GDK_X11 TRUE) -ELSEIF("${_moo_gdk_target}" STREQUAL "quartz") - SET(GDK_QUARTZ TRUE) -ELSEIF("${_moo_gdk_target}" STREQUAL "win32") - SET(GDK_WIN32 TRUE) -ENDIF("${_moo_gdk_target}" STREQUAL "x11") - -SET(MOO_USE_QUARTZ FALSE) -IF(GDK_QUARTZ) - IF(FALSE) - SET(MOO_USE_QUARTZ TRUE) - MOO_DEFINE_H(MOO_USE_QUARTZ) - ENDIF(FALSE) -ENDIF(GDK_QUARTZ) - -MACRO(_MOO_FIND_PROGRAM_OR_DIE varname progname pkgvar pkgname) - _MOO_GET_PKG_CONFIG_VARIABLE(_moo_pkg_exec_prefix exec_prefix ${pkgname}) - IF(pkgvar) - _MOO_GET_PKG_CONFIG_VARIABLE(_moo_pkg_prog ${pkgvar} ${pkgname}) - SET(_moo_prg_names "${_moo_pkg_prog}" ${progname}) - ELSE(pkgvar) - SET(_moo_prg_names ${progname}) - ENDIF(pkgvar) - FIND_PROGRAM(${varname} - NAMES ${_moo_prg_names} - PATHS "${_moo_pkg_exec_prefix}/bin" - DOC "Path to ${progname} executable") - MARK_AS_ADVANCED(${varname}) - IF(NOT ${varname}) - MOO_ERROR("Could not find ${progname} executable") - ENDIF(NOT ${varname}) -ENDMACRO(_MOO_FIND_PROGRAM_OR_DIE) - -_MOO_FIND_PROGRAM_OR_DIE(GLIB_GENMARSHAL_EXECUTABLE glib-genmarshal glib_genmarshal glib-2.0) -_MOO_FIND_PROGRAM_OR_DIE(GDK_PIXBUF_CSOURCE_EXECUTABLE gdk-pixbuf-csource "" gtk+-2.0) diff --git a/cmake/modules/FindMooCmake.cmake b/cmake/modules/FindMooCmake.cmake deleted file mode 100644 index ae4f8334..00000000 --- a/cmake/modules/FindMooCmake.cmake +++ /dev/null @@ -1,415 +0,0 @@ -OPTION(MOO_DEV_MODE_CMAKE "Enable developer mode for cmake - bunch of checks, warnings, etc." OFF) -MARK_AS_ADVANCED(MOO_DEV_MODE_CMAKE) - -IF(MOO_DEV_MODE_CMAKE) - MACRO(MOO_DEBUG) - MESSAGE(${ARGN}) - ENDMACRO(MOO_DEBUG) -ELSE(MOO_DEV_MODE_CMAKE) - MACRO(MOO_DEBUG) - ENDMACRO(MOO_DEBUG) -ENDIF(MOO_DEV_MODE_CMAKE) - -MACRO(MOO_ERROR) - MESSAGE(FATAL_ERROR ${ARGN}) -ENDMACRO(MOO_ERROR) - -MACRO(MOO_DEFINE_VERSIONS version) - IF(NOT "${version}" MATCHES "^[0-9]+[.][0-9]+[.][0-9]+(-.*)?$") - MOO_ERROR("Bad version string '${version}'") - ENDIF(NOT "${version}" MATCHES "^[0-9]+[.][0-9]+[.][0-9]+(-.*)?$") - STRING(REGEX REPLACE "^([0-9]+)[.]([0-9]+)[.]([0-9]+)(-(.*))?$" "\\1" MOO_MAJOR_VERSION "${version}") - STRING(REGEX REPLACE "^([0-9]+)[.]([0-9]+)[.]([0-9]+)(-(.*))?$" "\\2" MOO_MINOR_VERSION "${version}") - STRING(REGEX REPLACE "^([0-9]+)[.]([0-9]+)[.]([0-9]+)(-(.*))?$" "\\3" MOO_MICRO_VERSION "${version}") - STRING(REGEX REPLACE "^([0-9]+)[.]([0-9]+)[.]([0-9]+)(-(.*))?$" "\\5" MOO_VERSION_SUFFIX "${version}") - SET(MOO_VERSION "${MOO_MAJOR_VERSION}.${MOO_MINOR_VERSION}.${MOO_MICRO_VERSION}") - IF("${MOO_VERSION_SUFFIX}" STREQUAL "") - SET(MOO_PACKAGE_VERSION "${MOO_VERSION}") - SET(MOO_DISPLAY_VERSION "${MOO_VERSION}") - ELSE("${MOO_VERSION_SUFFIX}" STREQUAL "") - SET(MOO_PACKAGE_VERSION "${MOO_VERSION}-${MOO_VERSION_SUFFIX}") - SET(MOO_DISPLAY_VERSION "${MOO_VERSION} ${MOO_VERSION_SUFFIX}") - ENDIF("${MOO_VERSION_SUFFIX}" STREQUAL "") -ENDMACRO(MOO_DEFINE_VERSIONS) - -########################################################################### -# -# Build type -# - -IF("${CMAKE_BUILD_TYPE}" STREQUAL "") - SET(CMAKE_BUILD_TYPE Release) -ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "") -STRING(TOUPPER ${CMAKE_BUILD_TYPE} MOO_BUILD_TYPE) -SET(MOO_BUILD_SUBTYPE ${MOO_BUILD_TYPE}) -IF("${MOO_BUILD_TYPE}" STREQUAL "RELWITHDEBINFO" OR "${MOO_BUILD_TYPE}" STREQUAL "MINSIZEREL") - SET(MOO_BUILD_TYPE RELEASE) -ELSEIF(NOT "${MOO_BUILD_TYPE}" STREQUAL "DEBUG" AND NOT "${MOO_BUILD_TYPE}" STREQUAL "RELEASE") - MOO_ERROR("Unknown build type '${MOO_BUILD_TYPE}'") -ENDIF("${MOO_BUILD_TYPE}" STREQUAL "RELWITHDEBINFO" OR "${MOO_BUILD_TYPE}" STREQUAL "MINSIZEREL") -MOO_DEBUG(STATUS "MOO_BUILD_TYPE: ${MOO_BUILD_TYPE}") - -IF("${MOO_BUILD_TYPE}" STREQUAL "DEBUG") - SET(MOO_DEBUG TRUE) -ELSE("${MOO_BUILD_TYPE}" STREQUAL "DEBUG") - SET(MOO_DEBUG FALSE) -ENDIF("${MOO_BUILD_TYPE}" STREQUAL "DEBUG") - -########################################################################### -# -# MOO_DEFINE_H -# - -SET(__MOO_DEFINE_H_FILE__ ${CMAKE_BINARY_DIR}/moo-config.h.in) -FILE(WRITE ${__MOO_DEFINE_H_FILE__} "") - -MACRO(MOO_DEFINE_H _moo_varname) - SET(_moo_comment) - FOREACH(_moo_arg ${ARGN}) - SET(_moo_comment ${_moo_arg}) - ENDFOREACH(_moo_arg) - IF(_moo_comment) - FILE(APPEND ${__MOO_DEFINE_H_FILE__} "/* ${_moo_comment} */\n") - ENDIF(_moo_comment) - FILE(APPEND ${__MOO_DEFINE_H_FILE__} "#moodefine ${_moo_varname}\n\n") -ENDMACRO(MOO_DEFINE_H) - -MACRO(MOO_MAKE_ABSOLUTE_INPUT_FILE file out_var) - SET(_moo_maif_abs_file "${file}") - IF(NOT EXISTS "${_moo_maif_abs_file}") - IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_moo_maif_abs_file}") - SET(_moo_maif_abs_file ${CMAKE_CURRENT_SOURCE_DIR}/${_moo_maif_abs_file}) - ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_moo_maif_abs_file}") - ENDIF(NOT EXISTS "${_moo_maif_abs_file}") - IF(NOT EXISTS "${_moo_maif_abs_file}") - MOO_ERROR("File '${_moo_maif_abs_file}' does not exist") - ENDIF(NOT EXISTS "${_moo_maif_abs_file}") - SET(${out_var} "${_moo_maif_abs_file}") -ENDMACRO(MOO_MAKE_ABSOLUTE_INPUT_FILE) - -MACRO(MOO_MAKE_ABSOLUTE_OUTPUT_FILE file out_var) - SET(_moo_maof_abs_file "${file}") - IF(NOT IS_ABSOLUTE "${_moo_maof_abs_file}") - SET(_moo_maof_abs_file "${CMAKE_CURRENT_BINARY_DIR}/${_moo_maof_abs_file}") - ENDIF(NOT IS_ABSOLUTE "${_moo_maof_abs_file}") - SET(${out_var} "${_moo_maof_abs_file}") -ENDMACRO(MOO_MAKE_ABSOLUTE_OUTPUT_FILE) - -MACRO(MOO_WRITE_CONFIG_H _moo_in_file _moo_out_file) - MOO_MAKE_ABSOLUTE_INPUT_FILE("${_moo_in_file}" _moo_abs_in_file) - MOO_MAKE_ABSOLUTE_OUTPUT_FILE("${_moo_out_file}" _moo_abs_out_file) - - FILE(WRITE ${_moo_abs_out_file}-in.moo "#ifndef __CONFIG_H__\n") - FILE(APPEND ${_moo_abs_out_file}-in.moo "#define __CONFIG_H__\n\n") - FILE(READ ${_moo_abs_in_file} _moo_contents) - FILE(APPEND ${_moo_abs_out_file}-in.moo ${_moo_contents}) - FILE(APPEND ${_moo_abs_out_file}-in.moo "\n") - - FILE(STRINGS ${__MOO_DEFINE_H_FILE__} _moo_wch_lines) - FOREACH(_moo_wch_l ${_moo_wch_lines}) - IF(_moo_wch_l MATCHES "^#moodefine (.*)$") - STRING(REGEX REPLACE "^#moodefine (.*)$" "\\1" _moo_wch_var "${_moo_wch_l}") - IF(${_moo_wch_var}) - FILE(APPEND ${_moo_abs_out_file}-in.moo "#define ${_moo_wch_var} 1\n\n") - ELSE(${_moo_wch_var}) - FILE(APPEND ${_moo_abs_out_file}-in.moo "/* #undef ${_moo_wch_var} */\n\n") - ENDIF(${_moo_wch_var}) - ELSE(_moo_wch_l MATCHES "^#moodefine (.*)$") - FILE(APPEND ${_moo_abs_out_file}-in.moo "${_moo_wch_l}\n") - ENDIF(_moo_wch_l MATCHES "^#moodefine (.*)$") - ENDFOREACH(_moo_wch_l) - - FILE(APPEND ${_moo_abs_out_file}-in.moo "#endif /* __CONFIG_H__ */\n") - - CONFIGURE_FILE(${_moo_abs_out_file}-in.moo ${_moo_abs_out_file} ${ARGN}) -ENDMACRO(MOO_WRITE_CONFIG_H) - -########################################################################### -# -# OS -# - -SET(_MOO_KNOWN_PLATFORMS CYGWIN WIN32 DARWIN UNIX FREEBSD BSD LINUX FDO) -FOREACH(_moo_os ${_MOO_KNOWN_PLATFORMS}) - SET(MOO_OS_${_moo_os} FALSE) -ENDFOREACH(_moo_os) - -IF(APPLE) - SET(MOO_OS_DARWIN TRUE) -ENDIF(APPLE) - -IF(CYGWIN) - SET(MOO_OS_CYGWIN TRUE) -ENDIF(CYGWIN) - -IF(WIN32 OR CYGWIN) - SET(MOO_OS_WIN32 TRUE) -ENDIF(WIN32 OR CYGWIN) - -IF(UNIX) - SET(MOO_OS_UNIX TRUE) -ENDIF(UNIX) - -IF(UNIX AND NOT WIN32 AND NOT APPLE) - SET(MOO_OS_FDO TRUE) -ENDIF(UNIX AND NOT WIN32 AND NOT APPLE) - -IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") - SET(MOO_OS_FREEBSD TRUE) -ENDIF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") - -IF(CMAKE_SYSTEM_NAME MATCHES "BSD") - SET(MOO_OS_BSD TRUE) -ENDIF(CMAKE_SYSTEM_NAME MATCHES "BSD") - -IF(CMAKE_SYSTEM_NAME MATCHES "Linux") - SET(MOO_OS_LINUX TRUE) -ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") - -IF(MOO_OS_DARWIN OR MOO_OS_FREEBSD) - SET(MOO_OS_BSD TRUE) -ENDIF(MOO_OS_DARWIN OR MOO_OS_FREEBSD) - -IF(MOO_OS_BSD OR MOO_OS_LINUX) - SET(MOO_OS_UNIX TRUE) -ENDIF(MOO_OS_BSD OR MOO_OS_LINUX) - -########################################################################### -# -# Installation dirs -# - -SET(BINDIR bin CACHE PATH "bin") -SET(DATADIR share CACHE PATH "share") -SET(DESKTOPFILEDIR ${DATADIR}/applications CACHE PATH "share/applications") -SET(LIBDIR lib CACHE PATH "lib") -SET(LOCALEDIR ${DATADIR}/locale CACHE PATH "Where mo files go") -SET(MANDIR ${DATADIR}/man CACHE PATH "Where man pages go") - -########################################################################### -# -# Stuff -# - -MACRO(MOO_ADD_GENERATED_FILE stampfile outputfiles) - FOREACH(_moo_f ${stampfile} ${outputfiles}) - GET_FILENAME_COMPONENT(_moo_d ${_moo_f} ABSOLUTE) - GET_FILENAME_COMPONENT(_moo_d ${_moo_d} PATH) - FILE(MAKE_DIRECTORY ${_moo_d}) - ENDFOREACH(_moo_f) - ADD_CUSTOM_COMMAND(OUTPUT ${stampfile} ${ARGN}) - MOO_APPEND_DIRECTORY_PROPERTY(MOO_STAMPS ${stampfile}) - SET_SOURCE_FILES_PROPERTIES(${stampfile} PROPERTIES EXTERNAL_OBJECT 1 GENERATED 1) - SET_SOURCE_FILES_PROPERTIES(${outputfiles} PROPERTIES GENERATED 1) - MOO_ADD_CLEAN_FILES(${stampfile} ${outputfiles}) - MOO_APPEND_DIRECTORY_PROPERTY(MOO_BUILT_SOURCES ${stampfile} ${outputfiles}) -ENDMACRO(MOO_ADD_GENERATED_FILE) - -########################################################################### -# -# Aux macros -# - -MACRO(MOO_APPEND_DIRECTORY_PROPERTY prop) - GET_DIRECTORY_PROPERTY(_madp_value ${prop}) - FOREACH(_moo_arg ${ARGN}) - LIST(APPEND _madp_value ${_moo_arg}) - ENDFOREACH(_moo_arg) - SET_DIRECTORY_PROPERTIES(PROPERTIES ${prop} "${_madp_value}") -ENDMACRO(MOO_APPEND_DIRECTORY_PROPERTY) - -MACRO(MOO_ADD_CLEAN_FILES) - MOO_APPEND_DIRECTORY_PROPERTY(ADDITIONAL_MAKE_CLEAN_FILES ${ARGN}) -ENDMACRO(MOO_ADD_CLEAN_FILES) - -# MOO_COLLECT_ARGS(ARG FOO VAR foo ARG BAR VAR bar ARGN ...) -# caller: SOME_MACRO(FOO foo1 foo2 foo3 BAR bar1) -MACRO(MOO_COLLECT_ARGS) - SET(_moo_args) - SET(_moo_vars) - SET(_moo_argn) - - SET(_moo_what) - - FOREACH(_moo_a ${ARGN}) - IF("${_moo_what}" STREQUAL "ARG") - LIST(APPEND _moo_args ${_moo_a}) - SET(_moo_what VAR) - ELSEIF("${_moo_what}" STREQUAL "VAR") - LIST(APPEND _moo_vars ${_moo_a}) - SET(_moo_what) - ELSEIF("${_moo_what}" STREQUAL "ARGN") - LIST(APPEND _moo_argn ${_moo_a}) - ELSEIF("${_moo_a}" STREQUAL "ARG") - SET(_moo_what ARG) - ELSEIF("${_moo_a}" STREQUAL "ARGN") - SET(_moo_what ARGN) - ELSE("${_moo_what}" STREQUAL "ARG") - MOO_ERROR("bad argument ${moo_a}") - ENDIF("${_moo_what}" STREQUAL "ARG") - ENDFOREACH(_moo_a) - -# MESSAGE("args: ${_moo_args}") -# MESSAGE("vars: ${_moo_vars}") -# MESSAGE("argn: ${_moo_argn}") - - SET(_moo_what -1) - FOREACH(_moo_arg ${_moo_argn}) - LIST(FIND _moo_args "${_moo_arg}" _moo_what2) - IF(NOT _moo_what2 EQUAL -1) - SET(_moo_what ${_moo_what2}) - ELSE(NOT _moo_what2 EQUAL -1) - IF(_moo_what EQUAL -1) - MOO_ERROR("Invalid argument ${_moo_arg}") - ENDIF(_moo_what EQUAL -1) - LIST(GET _moo_vars ${_moo_what} _moo_v) - LIST(APPEND ${_moo_v} "${_moo_arg}") - ENDIF(NOT _moo_what2 EQUAL -1) - ENDFOREACH(_moo_arg) - - LIST(LENGTH _moo_args _moo_nargs) - MATH(EXPR _moo_nargs "${_moo_nargs} - 1") - FOREACH(_moo_what RANGE ${_moo_nargs}) - LIST(GET _moo_args ${_moo_what} _moo_a) - LIST(GET _moo_vars ${_moo_what} _moo_v) - #MOO_DEBUG("${_moo_what}. ${_moo_v}: ${${_moo_v}}") - ENDFOREACH(_moo_what) -ENDMACRO(MOO_COLLECT_ARGS) - -MACRO(__MOO_SET_SIMPLE_VAR var) - SET(${var} ${ARGN}) -ENDMACRO(__MOO_SET_SIMPLE_VAR) - -# _MOO_COLLECT_ARGS_IMPL(FOO foo setfoo BAR bar setbar ARGN ...) -MACRO(_MOO_COLLECT_ARGS_IMPL) - SET(_moo__cai_args) - SET(_moo__cai_vars) - SET(_moo__cai_macros) - SET(_moo__cai_argn) - - SET(_moo__cai_what) - - FOREACH(_moo__cai_a ${ARGN}) - IF("${_moo__cai_what}" STREQUAL "VAR") - LIST(APPEND _moo__cai_vars ${_moo__cai_a}) - SET(_moo__cai_what SETVAR) - ELSEIF("${_moo__cai_what}" STREQUAL "SETVAR") - LIST(APPEND _moo__cai_macros ${_moo__cai_a}) - SET(_moo__cai_what) - ELSEIF("${_moo__cai_what}" STREQUAL "ARGN") - LIST(APPEND _moo__cai_argn ${_moo__cai_a}) - ELSEIF("${_moo__cai_a}" STREQUAL "ARGN") - SET(_moo__cai_what ARGN) - ELSE("${_moo__cai_what}" STREQUAL "VAR") - LIST(APPEND _moo__cai_args ${_moo__cai_a}) - SET(_moo__cai_what VAR) - ENDIF("${_moo__cai_what}" STREQUAL "VAR") - ENDFOREACH(_moo__cai_a) - -# MOO_DEBUG("args: ${_moo__cai_args}") -# MOO_DEBUG("vars: ${_moo__cai_vars}") -# MOO_DEBUG("macros: ${_moo__cai_macros}") -# MOO_DEBUG("argn: ${_moo__cai_argn}") - - SET(_moo__cai_what -1) - FOREACH(_moo__cai_arg ${_moo__cai_argn}) - LIST(FIND _moo__cai_args "${_moo__cai_arg}" _moo__cai_what2) - IF(NOT _moo__cai_what2 EQUAL -1) - SET(_moo__cai_what ${_moo__cai_what2}) - ELSE(NOT _moo__cai_what2 EQUAL -1) - IF(_moo__cai_what EQUAL -1) - MOO_ERROR("Invalid argument ${_moo__cai_arg}") - ENDIF(_moo__cai_what EQUAL -1) - LIST(GET _moo__cai_vars ${_moo__cai_what} _moo__cai_v) - LIST(GET _moo__cai_macros ${_moo__cai_what} _moo__cai_sv) - IF("${_moo__cai_sv}" STREQUAL "__MOO_SET_SIMPLE_VAR") -# MOO_DEBUG("${_moo__cai_v} = ${_moo__cai_arg}") - __MOO_SET_SIMPLE_VAR(${_moo__cai_v} ${_moo__cai_arg}) - ELSE("${_moo__cai_sv}" STREQUAL "__MOO_SET_SIMPLE_VAR") - MOO_ERROR("Invalid argument ${_moo__cai_sv}") - ENDIF("${_moo__cai_sv}" STREQUAL "__MOO_SET_SIMPLE_VAR") - ENDIF(NOT _moo__cai_what2 EQUAL -1) - ENDFOREACH(_moo__cai_arg) - - LIST(LENGTH _moo__cai_args _moo__cai_nargs) - MATH(EXPR _moo__cai_nargs "${_moo__cai_nargs} - 1") - FOREACH(_moo__cai_what RANGE ${_moo__cai_nargs}) - LIST(GET _moo__cai_args ${_moo__cai_what} _moo__cai_a) - LIST(GET _moo__cai_vars ${_moo__cai_what} _moo__cai_v) -# MOO_DEBUG("${_moo__cai_what}. ${_moo__cai_v}: ${${_moo__cai_v}}") - ENDFOREACH(_moo__cai_what) -ENDMACRO(_MOO_COLLECT_ARGS_IMPL) - -# MOO_COLLECT_SIMPLE_ARGS(FOO foo BAR bar ARGN ...) -MACRO(MOO_COLLECT_SIMPLE_ARGS) - SET(_moo_csa_impl_argn) - - SET(_moo_csa_argn ${ARGN}) - SET(_moo_csa_i 0) - LIST(LENGTH _moo_csa_argn _moo_csa_nargs) - WHILE(_moo_csa_i LESS _moo_csa_nargs) - LIST(GET _moo_csa_argn ${_moo_csa_i} _moo_csa_a) - IF("${_moo_csa_a}" STREQUAL "ARGN") - BREAK() - ENDIF("${_moo_csa_a}" STREQUAL "ARGN") - MATH(EXPR _moo_csa_i "${_moo_csa_i} + 1") - LIST(GET _moo_csa_argn ${_moo_csa_i} _moo_csa_v) - LIST(APPEND _moo_csa_impl_argn "${_moo_csa_a}") - LIST(APPEND _moo_csa_impl_argn "${_moo_csa_v}") - LIST(APPEND _moo_csa_impl_argn __MOO_SET_SIMPLE_VAR) - MATH(EXPR _moo_csa_i "${_moo_csa_i} + 1") - ENDWHILE(_moo_csa_i LESS _moo_csa_nargs) - - WHILE(_moo_csa_i LESS _moo_csa_nargs) - LIST(GET _moo_csa_argn ${_moo_csa_i} _moo_csa_a) - LIST(APPEND _moo_csa_impl_argn "${_moo_csa_a}") - MATH(EXPR _moo_csa_i "${_moo_csa_i} + 1") - ENDWHILE(_moo_csa_i LESS _moo_csa_nargs) - -# MOO_DEBUG("MOO_COLLECT_SIMPLE_ARGS: ${_moo_csa_argn}") -# MOO_DEBUG("MOO_COLLECT_SIMPLE_ARGS: ${_moo_csa_impl_argn}") - - _MOO_COLLECT_ARGS_IMPL(${_moo_csa_impl_argn}) -ENDMACRO(MOO_COLLECT_SIMPLE_ARGS) - -########################################################################### -# -# MOO_OPTION -# - -MACRO(MOO_OPTION variable dfltval helpstring) - IF(DEFINED __MOO_OPTION_SET_${variable}) - MOO_ERROR("Option ${variable} is already created") - ENDIF(DEFINED __MOO_OPTION_SET_${variable}) - SET(_moo_option_hidden) - SET(_moo_option_header) - SET(_moo_option_define) - MOO_COLLECT_SIMPLE_ARGS(HIDDEN _moo_option_hidden HEADER _moo_option_header DEFINE _moo_option_define ARGN ${ARGN}) - IF(NOT _moo_option_hidden) - OPTION(${variable} "${helpstring}" "${dfltval}") - ELSE(NOT _moo_option_hidden) - SET(${variable} "${dfltval}" CACHE BOOL "${helpstring}") - MARK_AS_ADVANCED(${variable}) - ENDIF(NOT _moo_option_hidden) - IF(_moo_option_header) -# MOO_DEBUG(${variable}) - MOO_DEFINE_H(${variable} "${helpstring}") - ENDIF(_moo_option_header) - IF(_moo_option_define AND ${variable}) - ADD_DEFINITIONS(-D${variable}=1) - ENDIF(_moo_option_define AND ${variable}) - SET(__MOO_OPTION_SET_${variable} 1) -# MOO_DEBUG(STATUS "Option ${variable}") -ENDMACRO(MOO_OPTION) - -MACRO(MOO_CHECK_OPTION variable) - IF(NOT DEFINED __MOO_OPTION_SET_${variable}) - MOO_ERROR("Option ${variable} is not set") - ENDIF(NOT DEFINED __MOO_OPTION_SET_${variable}) -ENDMACRO(MOO_CHECK_OPTION) - -MOO_OPTION(MOO_DEV_MODE FALSE "Enable developer mode - bunch of checks, warnings, etc." DEFINE 1) - -FIND_PACKAGE(MooCompilers) -FIND_PACKAGE(MooCmakeUtils) -FIND_PACKAGE(MooI18n) diff --git a/cmake/modules/FindMooCmakeUtils.cmake b/cmake/modules/FindMooCmakeUtils.cmake deleted file mode 100644 index ad8c542d..00000000 --- a/cmake/modules/FindMooCmakeUtils.cmake +++ /dev/null @@ -1,31 +0,0 @@ -MACRO(MOO_EXEC_OR_DIE command) - EXECUTE_PROCESS(${ARGN} - RESULT_VARIABLE __moo_command_result - ERROR_VARIABLE __moo_command_error - ) - IF(NOT __moo_command_result EQUAL 0) - MESSAGE(FATAL_ERROR "Command ${command} failed: ${__moo_command_error}") - ENDIF(NOT __moo_command_result EQUAL 0) -ENDMACRO(MOO_EXEC_OR_DIE) - -MACRO(MOO_COPY_FILE file1 file2) - MOO_EXEC_OR_DIE("copy ${file1} ${file2}" - COMMAND ${CMAKE_COMMAND} -E copy ${file1} ${file2} - ) -ENDMACRO(MOO_COPY_FILE) - -MACRO(MOO_COPY_IF_CHANGED file1 file2) - SET(__moo_do_copy) - IF(NOT EXISTS ${file2}) - SET(__moo_do_copy 1) - ELSE(NOT EXISTS ${file2}) - FILE(READ ${file1} __moo_contents1) - FILE(READ ${file2} __moo_contents2) - IF(NOT "${__moo_contents1}" STREQUAL "${__moo_contents2}") - SET(__moo_do_copy 1) - ENDIF(NOT "${__moo_contents1}" STREQUAL "${__moo_contents2}") - ENDIF(NOT EXISTS ${file2}) - IF(__moo_do_copy) - MOO_COPY_FILE(${file1} ${file2}) - ENDIF(__moo_do_copy) -ENDMACRO(MOO_COPY_IF_CHANGED) diff --git a/cmake/modules/FindMooCompilers.cmake b/cmake/modules/FindMooCompilers.cmake deleted file mode 100644 index 4decb936..00000000 --- a/cmake/modules/FindMooCompilers.cmake +++ /dev/null @@ -1,328 +0,0 @@ -MACRO(_MOO_JOIN_STRING_LIST outvar sep) - SET(_moo__jsl_result) - SET(_moo__jsl_first TRUE) - FOREACH(_moo__jsl_arg ${ARGN}) - IF(_moo__jsl_first) - SET(_moo__jsl_result "${_moo__jsl_arg}") - SET(_moo__jsl_first FALSE) - ELSE(_moo__jsl_first) - SET(_moo__jsl_result "${_moo__jsl_result}${sep}${_moo__jsl_arg}") - ENDIF(_moo__jsl_first) - ENDFOREACH(_moo__jsl_arg) - SET(${outvar} "${_moo__jsl_result}") -ENDMACRO(_MOO_JOIN_STRING_LIST) - -MACRO(_MOO_CHECK_COMPILER_LANG lang var) - STRING(TOUPPER ${lang} _moo__ccl_lang) - IF("${_moo__ccl_lang}" STREQUAL "ALL") - SET(_moo__ccl_langs C CXX) - ELSEIF("${_moo__ccl_lang}" STREQUAL "C" OR "${_moo__ccl_lang}" STREQUAL "CXX") - SET(_moo__ccl_langs ${_moo__ccl_lang}) - ELSE("${_moo__ccl_lang}" STREQUAL "ALL") - MOO_ERROR("Invalid lang '${lang}'") - ENDIF("${_moo__ccl_lang}" STREQUAL "ALL") - SET(${var} ${_moo__ccl_langs}) -ENDMACRO(_MOO_CHECK_COMPILER_LANG) - -MACRO(_MOO_CHECK_BUILD_TYPE build prefix var) - STRING(TOUPPER ${build} _moo__cbt_build) - IF("${_moo__cbt_build}" STREQUAL "ALL") - SET(_moo__cbt_vars ${prefix}) - ELSEIF("${_moo__cbt_build}" STREQUAL "RELEASE") - SET(_moo__cbt_vars ${prefix}_RELEASE ${prefix}_RELWITHDEBINFO ${prefix}_MINSIZEREL) - ELSEIF("${_moo__cbt_build}" STREQUAL "RELEASEONLY") - SET(_moo__cbt_vars ${prefix}_RELEASE) - ELSEIF("${_moo__cbt_build}" STREQUAL "DEBUG" OR "${_moo__cbt_build}" STREQUAL "RELWITHDEBINFO" OR "${_moo__cbt_build}" STREQUAL "MINSIZEREL") - SET(_moo__cbt_vars ${prefix}_${_moo__cbt_build}) - ELSE("${_moo__cbt_build}" STREQUAL "ALL") - MOO_ERROR("Invalid build type '${build}'") - ENDIF("${_moo__cbt_build}" STREQUAL "ALL") - SET(${var} ${_moo__cbt_vars}) -ENDMACRO(_MOO_CHECK_BUILD_TYPE) - -MACRO(_MOO_GET_COMPILER_CONFIG_ARGS var_lang var_build_prefix var_build_vars var_args) - SET(_moo__gcca_langs C CXX) - SET(_moo__gcca_args) - SET(_moo__gcca_do TRUE) - _MOO_CHECK_BUILD_TYPE("ALL" ${var_build_prefix} _moo__gcca_bvars) - - FOREACH(_moo__gcca_arg ${ARGN}) - IF("${_moo__gcca_arg}" STREQUAL "GCC" OR "${_moo__gcca_arg}" STREQUAL "GNUCC") - IF(NOT CMAKE_COMPILER_IS_GNUCC) - SET(_moo__gcca_do FALSE) - ENDIF(NOT CMAKE_COMPILER_IS_GNUCC) - ELSEIF("${_moo__gcca_arg}" STREQUAL "MSVC") - IF(NOT MSVC) - SET(_moo__gcca_do FALSE) - ENDIF(NOT MSVC) - ELSEIF("${_moo__gcca_arg}" STREQUAL "DEBUG" OR "${_moo__gcca_arg}" STREQUAL "RELEASE" OR - "${_moo__gcca_arg}" STREQUAL "RELEASEONLY" OR "${_moo__gcca_arg}" STREQUAL "RELWITHDEBINFO" OR - "${_moo__gcca_arg}" STREQUAL "MINSIZEREL") - _MOO_CHECK_BUILD_TYPE(${_moo__gcca_arg} ${var_build_prefix} _moo__gcca_bvars) - ELSEIF("${_moo__gcca_arg}" STREQUAL "C" OR "${_moo__gcca_arg}" STREQUAL "CXX") - SET(_moo__gcca_langs ${_moo__gcca_arg}) - ELSEIF("${_moo__gcca_arg}" STREQUAL "WIN32" OR "${_moo__gcca_arg}" STREQUAL "UNIX") - IF("${_moo__gcca_arg}" STREQUAL "WIN32" AND NOT WIN32) - SET(_moo__gcca_do FALSE) - ELSEIF("${_moo__gcca_arg}" STREQUAL "UNIX" AND WIN32) - SET(_moo__gcca_do FALSE) - ENDIF("${_moo__gcca_arg}" STREQUAL "WIN32" AND NOT WIN32) - ELSE("${_moo__gcca_arg}" STREQUAL "GCC" OR "${_moo__gcca_arg}" STREQUAL "GNUCC") - LIST(APPEND _moo__gcca_args ${_moo__gcca_arg}) - ENDIF("${_moo__gcca_arg}" STREQUAL "GCC" OR "${_moo__gcca_arg}" STREQUAL "GNUCC") - ENDFOREACH(_moo__gcca_arg) - - #MESSAGE("_MOO_GET_COMPILER_CONFIG_ARGS(var_lang=${var_lang}, var_build_prefix=${var_build_prefix}, var_build_vars=${var_build_vars}, var_args=${var_args}, args=${ARGN})") - IF(_moo__gcca_do) - SET(${var_lang} ${_moo__gcca_langs}) - SET(${var_build_vars} ${_moo__gcca_bvars}) - SET(${var_args} ${_moo__gcca_args}) - #MESSAGE(" var_lang=${_moo__gcca_langs}, var_build_vars=${_moo__gcca_bsfxs}, var_args=${_moo__gcca_args}") - ELSE(_moo__gcca_do) - SET(${var_lang}) - SET(${var_build_vars}) - SET(${var_args}) - #MESSAGE(" DISABLED") - ENDIF(_moo__gcca_do) -ENDMACRO(_MOO_GET_COMPILER_CONFIG_ARGS) - -MACRO(MOO_ADD_COMPILER_FLAGS) - _MOO_GET_COMPILER_CONFIG_ARGS(_moo_acf_langs "FLAGS" _moo_acf_bvars _moo_acf_args ${ARGN}) - IF(_moo_acf_args) - _MOO_JOIN_STRING_LIST(_moo_acf_flags " " ${_moo_acf_args}) - FOREACH(_moo_acf_lang ${_moo_acf_langs}) - FOREACH(_moo_acf_bvar ${_moo_acf_bvars}) - SET(_moo__acf_var CMAKE_${_moo_acf_lang}_${_moo_acf_bvar}) - SET(${_moo__acf_var} "${${_moo__acf_var}} ${_moo_acf_flags}") - MOO_DEBUG(STATUS "${_moo__acf_var} += ${_moo_acf_flags}") - ENDFOREACH(_moo_acf_bvar) - ENDFOREACH(_moo_acf_lang) - ENDIF(_moo_acf_args) -ENDMACRO(MOO_ADD_COMPILER_FLAGS) - - -INCLUDE(CheckCCompilerFlag) -INCLUDE(CheckCXXCompilerFlag) - -MACRO(MOO_COMPILER_FLAG_VAR_NAME flag lang var) - STRING(REGEX REPLACE "[-=]" "_" _moo_cfvn_name MOO_${lang}FLAG${flag}) - STRING(REPLACE "+" "x" _moo_cfvn_name ${_moo_cfvn_name}) - SET(${var} ${_moo_cfvn_name}) -ENDMACRO(MOO_COMPILER_FLAG_VAR_NAME) - -MACRO(MOO_CHECK_COMPILER_FLAGS) - _MOO_GET_COMPILER_CONFIG_ARGS(_moo_ccf_langs "FLAGS" _moo_ccf_bvars _moo_ccf_args ${ARGN}) - FOREACH(_moo_ccf_lang ${_moo_ccf_langs}) - SET(_moo_ccf_good_flags) - FOREACH(_moo_ccf_flag ${_moo_ccf_args}) - MOO_COMPILER_FLAG_VAR_NAME(${_moo_ccf_flag} ${_moo_ccf_lang} _moo_ccf_flag_name) - - IF("${_moo_ccf_lang}" STREQUAL "C") - CHECK_C_COMPILER_FLAG("${_moo_ccf_flag}" ${_moo_ccf_flag_name}) - ELSEIF("${_moo_ccf_lang}" STREQUAL "CXX") - CHECK_CXX_COMPILER_FLAG("${_moo_ccf_flag}" ${_moo_ccf_flag_name}) - ELSE("${_moo_ccf_lang}" STREQUAL "C") - MOO_ERROR("Unknown lang '${lang}'") - ENDIF("${_moo_ccf_lang}" STREQUAL "C") - - IF(${_moo_ccf_flag_name}) - LIST(APPEND _moo_ccf_good_flags "${_moo_ccf_flag}") - ENDIF(${_moo_ccf_flag_name}) - ENDFOREACH(_moo_ccf_flag) - IF(_moo_ccf_good_flags) - _MOO_JOIN_STRING_LIST(_moo_ccf_good_flags " " ${_moo_ccf_good_flags}) - FOREACH(_moo_ccf_bvar ${_moo_ccf_bvars}) - SET(_moo_ccf_flags_var CMAKE_${_moo_ccf_lang}_${_moo_ccf_bvar}) - SET(${_moo_ccf_flags_var} "${${_moo_ccf_flags_var}} ${_moo_ccf_good_flags}") - MOO_DEBUG(STATUS "${_moo_ccf_flags_var} += ${_moo_ccf_good_flags}") - ENDFOREACH(_moo_ccf_bvar) - ENDIF(_moo_ccf_good_flags) - ENDFOREACH(_moo_ccf_lang) -ENDMACRO(MOO_CHECK_COMPILER_FLAGS) - - -MACRO(MOO_ADD_COMPILE_DEFINITIONS) - _MOO_GET_COMPILER_CONFIG_ARGS(_moo_acd_langs "COMPILE_DEFINITIONS" _moo_acd_bvars _moo_acd_args ${ARGN}) - SET(_moo_acd_defs) - FOREACH(_moo_acd_a ${_moo_acd_args}) - STRING(REGEX REPLACE "^(-D|/D)" "" _moo_acd_a "${_moo_acd_a}") - LIST(APPEND _moo_acd_defs "${_moo_acd_a}") - ENDFOREACH(_moo_acd_a) - #MESSAGE("MOO_ADD_COMPILE_DEFINITIONS(${ARGN}) => ${_moo_acd_langs}, ${_moo_acd_bvars}, ${_moo_acd_args}") - FOREACH(_moo_acd_bvar ${_moo_acd_bvars}) - SET_PROPERTY(DIRECTORY APPEND PROPERTY ${_moo_acd_bvar} ${_moo_acd_defs}) - _MOO_JOIN_STRING_LIST(_moo_acd_defs_string " " ${_moo_acd_defs}) - MOO_DEBUG(STATUS "${_moo_acd_bvar} += ${_moo_acd_defs_string}") - ENDFOREACH(_moo_acd_bvar) -ENDMACRO(MOO_ADD_COMPILE_DEFINITIONS) - - -########################################################################### -# -# DEBUG -# - -MOO_ADD_COMPILE_DEFINITIONS(DEBUG -DMOO_DEBUG -DDEBUG) - - -########################################################################### -# -# GCC -# - -# Set this first because it may affect checks below -IF(MOO_DEV_MODE) - MOO_ADD_COMPILER_FLAGS(GCC -Werror) -ENDIF(MOO_DEV_MODE) - -MOO_ADD_COMPILER_FLAGS(GCC -Wall -Wextra) -MOO_CHECK_COMPILER_FLAGS(GCC -fexceptions -fno-strict-aliasing -fno-strict-overflow) -MOO_CHECK_COMPILER_FLAGS(GCC -Wno-missing-field-initializers -Wno-overlength-strings -Wno-missing-declarations) - -MOO_CHECK_COMPILER_FLAGS(GCC DEBUG -ftrapv) - -MOO_ADD_COMPILER_FLAGS(GCC CXX -std=c++98) -MOO_CHECK_COMPILER_FLAGS(GCC CXX -fno-rtti) -MOO_CHECK_COMPILER_FLAGS(GCC CXX RELEASE -fno-enforce-eh-specs) - -IF(MOO_DEV_MODE) - MOO_CHECK_COMPILER_FLAGS(GCC - -Wcast-align -Wlogical-op - -Wmissing-format-attribute -Wnested-externs -Wlong-long -Wvla - -Wuninitialized -Winit-self) - MOO_CHECK_COMPILER_FLAGS(GCC CXX -fno-nonansi-builtins -fno-gnu-keywords) - MOO_CHECK_COMPILER_FLAGS(GCC CXX - -Wctor-dtor-privacy -Wnon-virtual-dtor -Wabi - -Wstrict-null-sentinel -Woverloaded-virtual -Wsign-promo - ) -ENDIF(MOO_DEV_MODE) - - -############################################################################### -# -# Windows -# - -MOO_ADD_COMPILE_DEFINITIONS(WIN32 -D__WIN32__ -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -DSTRICT) - -MOO_ADD_COMPILER_FLAGS(MSVC /W4 /GS) -MOO_ADD_COMPILER_FLAGS(MSVC CXX /Zc:wchar_t,forScope /GR /EHc /EHsc) - -MOO_ADD_COMPILER_FLAGS(MSVC - /wd4221 /wd4204 /wd4996 /wd4244 /wd4055 /wd4127 /wd4100 - /wd4054 /wd4152 /wd4706 /wd4125 /wd4389 /wd4132 /wd4018 -) - -IF(MOO_DEV_MODE) - MOO_ADD_COMPILER_FLAGS(MSVC /WX) - MOO_ADD_COMPILER_FLAGS(MSVC DEBUG /RTCsu /RTCc) -ENDIF(MOO_DEV_MODE) - - -############################################################################### -# -# Mac OS X -# - -IF(APPLE) - MOO_OPTION(MOO_ENABLE_UNIVERSAL FALSE "Build a universal binary on Mac OS X" HIDDEN !${MOO_OS_DARWIN}) -ENDIF(APPLE) - -IF(APPLE AND MOO_ENABLE_UNIVERSAL) - SET(CMAKE_OSX_ARCHITECTURES "ppc;i386") - SET(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.4u.sdk") -ENDIF(APPLE AND MOO_ENABLE_UNIVERSAL) - - -############################################################################### -# -# Precompiled headers -# - -MOO_OPTION(MOO_ENABLE_PCH FALSE "Enable precompiled headers. May be broken.") - -MACRO(__MOO_PCH_GNUCXX_GET_COMPILE_FLAGS outvar target) - - STRING(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" _moo_varname) - LIST(APPEND ${outvar} ${${_moo_varname}}) - - GET_TARGET_PROPERTY(target_type ${target} TYPE) - IF("${target_type}" STREQUAL "SHARED_LIBRARY") - LIST(APPEND ${outvar} -fPIC) - ENDIF("${target_type}" STREQUAL "SHARED_LIBRARY") - - GET_DIRECTORY_PROPERTY(includes INCLUDE_DIRECTORIES) - FOREACH(item ${includes}) - LIST(APPEND ${outvar} "-I${item}") - ENDFOREACH(item) - - STRING(TOUPPER "COMPILE_DEFINITIONS_${CMAKE_BUILD_TYPE}" _moo_varname) - GET_DIRECTORY_PROPERTY(flags ${_moo_varname}) - FOREACH(item ${flags}) - LIST(APPEND ${outvar} "-D${item}") - ENDFOREACH(item) - GET_DIRECTORY_PROPERTY(flags COMPILE_DEFINITIONS) - FOREACH(item ${flags}) - LIST(APPEND ${outvar} "-D${item}") - ENDFOREACH(item) - - GET_DIRECTORY_PROPERTY(flags DEFINITIONS) - LIST(APPEND ${outvar} ${flags}) - LIST(APPEND ${outvar} ${CMAKE_CXX_FLAGS} ) - - SEPARATE_ARGUMENTS(${outvar}) -ENDMACRO(__MOO_PCH_GNUCXX_GET_COMPILE_FLAGS) - -MACRO(__MOO_PCH_GNUCXX_GET_COMMAND outvar target input output) - __MOO_PCH_GNUCXX_GET_COMPILE_FLAGS(_moo_compile_flags target) - SET(_moo_pch_compile_command - ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} ${_moo_compile_flags} -x c++-header -o ${output} ${input} - ) -ENDMACRO(__MOO_PCH_GNUCXX_GET_COMMAND) - -MACRO(__MOO_PRECOMPILE_HEADER_GNUCXX header target) - SET(_moo_pch_output_dir ${CMAKE_CURRENT_BINARY_DIR}/${header}.gch) - SET(_moo_pch_output ${_moo_pch_output_dir}/c++) - SET(_moo_pch_input_s ${CMAKE_CURRENT_SOURCE_DIR}/${header}) - SET(_moo_pch_input_b ${CMAKE_CURRENT_BINARY_DIR}/${header}) - SET(_moo_pch_lib ${target}_pchlib) - - SET_SOURCE_FILES_PROPERTIES(${_moo_pch_input_b} PROPERTIES GENERATED 1) - - MOO_SUBDIR_NAME(_moo_subdir) - - ADD_CUSTOM_COMMAND(OUTPUT ${_moo_pch_input_b} - COMMAND ${CMAKE_COMMAND} -E copy ${_moo_pch_input_s} ${_moo_pch_input_b} - DEPENDS ${_moo_pch_input_s} - COMMENT "Generating ${_moo_subdir}/${header}" - ) - - ADD_CUSTOM_TARGET(${target}_pch DEPENDS ${_moo_pch_output}) - ADD_DEPENDENCIES(${target} ${target}_pch) - - __MOO_PCH_GNUCXX_GET_COMMAND(_moo_pch_compile_command ${target} ${_moo_pch_input_b} ${_moo_pch_output}) - ADD_CUSTOM_COMMAND(OUTPUT ${_moo_pch_output} - COMMAND ${CMAKE_COMMAND} -E make_directory ${_moo_pch_output_dir} - COMMAND ${_moo_pch_compile_command} - DEPENDS ${_moo_pch_input_s} ${_moo_pch_input_b} # ${_moo_pch_lib} - COMMENT "Generating ${_moo_subdir}/${header}.gch/c++" - ) - - GET_TARGET_PROPERTY(_moo_old_flags ${target} COMPILE_FLAGS) - IF(NOT _moo_old_flags) - SET(_moo_old_flags) - ENDIF(NOT _moo_old_flags) - SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_FLAGS - "-include ${_moo_pch_input_b} -Winvalid-pch ${_moo_old_flags}" - ) -ENDMACRO(__MOO_PRECOMPILE_HEADER_GNUCXX) - -MACRO(MOO_PRECOMPILE_HEADER header target) - IF(MOO_ENABLE_PCH) - IF(CMAKE_COMPILER_IS_GNUCXX) - __MOO_PRECOMPILE_HEADER_GNUCXX(${header} ${target}) - ELSE(CMAKE_COMPILER_IS_GNUCXX) - MESSAGE(STATUS "*** IMPLEMENT ME: precompiled headers for this compiler") - ENDIF(CMAKE_COMPILER_IS_GNUCXX) - ENDIF(MOO_ENABLE_PCH) -ENDMACRO(MOO_PRECOMPILE_HEADER) diff --git a/cmake/modules/FindMooDesktopFile.cmake b/cmake/modules/FindMooDesktopFile.cmake deleted file mode 100644 index 8eac2cd7..00000000 --- a/cmake/modules/FindMooDesktopFile.cmake +++ /dev/null @@ -1,22 +0,0 @@ -MACRO(MOO_INSTALL_DESKTOP_FILE) - IF(MOO_OS_FDO) - FOREACH(_moo_idf_desktop_file ${ARGN}) - IF("${_moo_idf_desktop_file}" MATCHES "\\.desktop\\.in$") - MOO_MAKE_ABSOLUTE_INPUT_FILE("${_moo_idf_desktop_file}" _moo_idf_desktop_file) - GET_FILENAME_COMPONENT(_moo_idf_desktop_file_base "${_moo_idf_desktop_file}" NAME_WE) - SET(_moo_idf_desktop_file_real "${_moo_idf_desktop_file_base}.desktop") - MOO_MAKE_ABSOLUTE_OUTPUT_FILE("${_moo_idf_desktop_file_real}" _moo_idf_desktop_file_real) - ADD_CUSTOM_COMMAND(OUTPUT "${_moo_idf_desktop_file_real}" - COMMAND ${MOO_SOURCE_DIR}/moo/mooutils/moo-intltool-merge "${_moo_idf_desktop_file}" "${_moo_idf_desktop_file_real}" - MAIN_DEPENDENCY "${_moo_idf_desktop_file}") - ADD_CUSTOM_TARGET("gen-${_moo_idf_desktop_file_base}.desktop" ALL - DEPENDS "${_moo_idf_desktop_file_real}") - INSTALL(FILES "${_moo_idf_desktop_file_real}" DESTINATION "${DESKTOPFILEDIR}") - ELSEIF("${_moo_idf_desktop_file}" MATCHES "\\.desktop$") - INSTALL(FILES "${_moo_idf_desktop_file}" DESTINATION "${DESKTOPFILEDIR}") - ELSE("${_moo_idf_desktop_file}" MATCHES "\\.desktop\\.in$") - MOO_ERROR("Don't know what to do with file ${_moo_idf_desktop_file}") - ENDIF("${_moo_idf_desktop_file}" MATCHES "\\.desktop\\.in$") - ENDFOREACH(_moo_idf_desktop_file) - ENDIF(MOO_OS_FDO) -ENDMACRO(MOO_INSTALL_DESKTOP_FILE) diff --git a/cmake/modules/FindMooI18n.cmake b/cmake/modules/FindMooI18n.cmake deleted file mode 100644 index 08df8aa0..00000000 --- a/cmake/modules/FindMooI18n.cmake +++ /dev/null @@ -1,100 +0,0 @@ -MOO_OPTION(ENABLE_NLS TRUE "Enable i18n" HEADER TRUE) - -IF(ENABLE_NLS) - FIND_PACKAGE(Gettext) - IF(NOT GETTEXT_FOUND) - MOO_ERROR("Gettext has not been found, translations will not be enabled") - ENDIF(NOT GETTEXT_FOUND) -ENDIF(ENABLE_NLS) - -MACRO(MOO_TRANSFORM_INI_FILES outvar) - FOREACH(_moo_ini_in_in_file ${ARGN}) - SET(_moo_ini_in_in_file_abs ${CMAKE_CURRENT_SOURCE_DIR}/${_moo_ini_in_in_file}) - STRING(REPLACE ".ini.in.in" ".ini.in" _moo_ini_in_file ${_moo_ini_in_in_file}) - SET(_moo_ini_in_file ${CMAKE_CURRENT_BINARY_DIR}/${_moo_ini_in_file}) - CONFIGURE_FILE(${_moo_ini_in_in_file} ${_moo_ini_in_file}) - STRING(REPLACE ".ini.in.in" ".ini" _moo_ini_file ${_moo_ini_in_in_file}) - SET(_moo_ini_file ${_moo_ini_file}) - LIST(APPEND ${outvar} ${CMAKE_CURRENT_BINARY_DIR}/${_moo_ini_file}) - IF(ENABLE_NLS) - ADD_CUSTOM_COMMAND(OUTPUT ${_moo_ini_file} - COMMAND ${INTLTOOL_MERGE_COMMAND} -d -u -c ${CMAKE_BINARY_DIR}/po/.intltool-merge-cache ${CMAKE_SOURCE_DIR}/po ${_moo_ini_in_file} ${_moo_ini_file} - DEPENDS ${_moo_ini_in_file}) - ELSE(ENABLE_NLS) - ADD_CUSTOM_COMMAND(OUTPUT ${_moo_ini_file} - COMMAND ${MOO_CMAKE_COMMAND} -D MOO_OS_BSD=${MOO_OS_BSD} - -D INPUT_FILE=${_moo_ini_in_file} - -D OUTPUT_FILE=${_moo_ini_file} - -P ${CMAKE_SOURCE_DIR}/moo/mooutils/moo-intltool-merge.cmake - DEPENDS ${_moo_ini_in_file}) - ENDIF(ENABLE_NLS) - ENDFOREACH(_moo_ini_in_in_file) -ENDMACRO(MOO_TRANSFORM_INI_FILES) - -MACRO(MOO_ADD_MSG_CATALOG catalogname dir) - IF(ENABLE_NLS) - FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${dir}) - FILE(GLOB _moo_po_files ${dir}/*.po) - SET(_moo_langs) - SET(_moo_gmo_files) - FOREACH(_moo_po_file ${_moo_po_files}) - GET_FILENAME_COMPONENT(_moo_lang_code ${_moo_po_file} NAME_WE) - LIST(APPEND _moo_langs ${_moo_lang_code}) - SET(_moo_gmo_file ${CMAKE_BINARY_DIR}/${dir}/${_moo_lang_code}.gmo) - LIST(APPEND _moo_gmo_files ${_moo_gmo_file}) - ADD_CUSTOM_COMMAND(OUTPUT ${_moo_gmo_file} - COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} --check -o ${_moo_gmo_file} ${_moo_po_file} - DEPENDS ${_moo_po_file}) - INSTALL(FILES ${_moo_gmo_file} DESTINATION ${LOCALEDIR}/${_moo_lang_code}/LC_MESSAGES/ RENAME ${catalogname}.mo) - ENDFOREACH(_moo_po_file) - SET_SOURCE_FILES_PROPERTIES(${_moo_gmo_files} PROPERTIES GENERATED 1 EXTERNAL_OBJECT 1) - ADD_CUSTOM_TARGET(intl-${catalogname} ALL SOURCES ${_moo_gmo_files}) - ENDIF(ENABLE_NLS) -ENDMACRO(MOO_ADD_MSG_CATALOG) - -IF(ENABLE_NLS) - IF(WIN32) - MACRO(_MOO_FIND_INTLTOOL_VAR var script) - SET(${var} $ENV{${var}}) - IF(NOT "${var}") - FIND_FILE(${var} ${script}) - ENDIF(NOT "${var}") - ENDMACRO(_MOO_FIND_INTLTOOL_VAR) - FOREACH(_moo_i18n_tool update extract merge) - STRING(TOUPPER ${_moo_i18n_tool} _moo_i18n_TOOL) - _MOO_FIND_INTLTOOL_VAR(INTLTOOL_${_moo_i18n_TOOL} intltool-${_moo_i18n_tool}) - SET(__MOO_INTLTOOL_SCRIPT ${INTLTOOL_${_moo_i18n_TOOL}}) - CONFIGURE_FILE(${MOO_SOURCE_DIR}/plat/win32/intltool-wrapper.bat.in ${MOO_BINARY_DIR}/intltool-${_moo_i18n_tool}-wrapper.bat) - SET(INTLTOOL_${_moo_i18n_TOOL}_COMMAND ${MOO_BINARY_DIR}/intltool-${_moo_i18n_tool}-wrapper.bat) - ENDFOREACH(_moo_i18n_tool) - ELSE(WIN32) - FIND_PROGRAM(INTLTOOL_UPDATE_COMMAND intltool-update) - FIND_PROGRAM(INTLTOOL_MERGE_COMMAND intltool-merge) - FIND_PROGRAM(INTLTOOL_EXTRACT_COMMAND intltool-extract) - ENDIF(WIN32) - - SET(MOO_PO_DIR ${MOO_SOURCE_DIR}/po) - - ADD_CUSTOM_TARGET( - intl-check - ${INTLTOOL_UPDATE_COMMAND} --gettext-package=moo -m - WORKING_DIRECTORY ${MOO_PO_DIR} - ) - - ADD_CUSTOM_TARGET( - intl-pot - COMMAND ${INTLTOOL_UPDATE_COMMAND} --gettext-package=moo -p - WORKING_DIRECTORY ${MOO_PO_DIR} - ) - - FILE(STRINGS ${MOO_PO_DIR}/LINGUAS MOO_PO_LINGUAS) - ADD_CUSTOM_TARGET(intl-update-po) - FOREACH(_moo_lang ${MOO_PO_LINGUAS}) - ADD_CUSTOM_TARGET( - intl-update-${_moo_lang}-po - ${INTLTOOL_UPDATE_COMMAND} --gettext-package=moo -d ${_moo_lang} - WORKING_DIRECTORY ${MOO_PO_DIR} - ) - ADD_DEPENDENCIES(intl-update-po intl-update-${_moo_lang}-po) - ENDFOREACH(_moo_lang) -ENDIF(ENABLE_NLS) diff --git a/cmake/modules/FindMooPython.cmake b/cmake/modules/FindMooPython.cmake deleted file mode 100644 index 3dc40add..00000000 --- a/cmake/modules/FindMooPython.cmake +++ /dev/null @@ -1,52 +0,0 @@ -MOO_OPTION(MOO_ENABLE_PYTHON TRUE "Enable Python" HEADER TRUE) - -SET(PYTHON_DEV_FOUND FALSE) - -MACRO(MOO_GET_PYTHON_SYSCONFIG_VAR var value error) - SET(${error} FALSE) - EXECUTE_PROCESS(COMMAND "${PYTHON_EXECUTABLE}" -c "import distutils.sysconfig; print distutils.sysconfig.get_config_vars('${var}')[0]" - RESULT_VARIABLE _moo_gpsv_result - OUTPUT_VARIABLE _moo_gpsv_output - ERROR_VARIABLE _moo_gpsv_error - OUTPUT_STRIP_TRAILING_WHITESPACE) - IF(_moo_gpsv_result EQUAL 0) - SET(${value} "${_moo_gpsv_output}") - ELSE(_moo_gpsv_result EQUAL 0) - SET(${error} TRUE) - ENDIF(_moo_gpsv_result EQUAL 0) -ENDMACRO(MOO_GET_PYTHON_SYSCONFIG_VAR) - -IF(MOO_ENABLE_PYTHON) - PKG_CHECK_MODULES(PYGTK pygtk-2.0) - IF(PYGTK_FOUND) - _MOO_GET_PKG_CONFIG_VARIABLE(PYGTK_DEFS_DIR defsdir pygtk-2.0) - _MOO_GET_PKG_CONFIG_VARIABLE(PYGTK_CODEGEN_DIR codegendir pygtk-2.0) - MOO_GET_PYTHON_SYSCONFIG_VAR("INCLUDEPY" _moo_fp_includepy _moo_fp_error) - IF(NOT _moo_fp_error) - MOO_GET_PYTHON_SYSCONFIG_VAR("VERSION" _moo_fp_pyversion _moo_fp_error) - ENDIF(NOT _moo_fp_error) - IF(NOT _moo_fp_error AND WIN32) - MOO_GET_PYTHON_SYSCONFIG_VAR("prefix" _moo_fp_pyprefix _moo_fp_error) - ENDIF(NOT _moo_fp_error AND WIN32) - IF(NOT _moo_fp_error) - SET(PYTHON_LIBRARIES "python${_moo_fp_pyversion}") - FILE(TO_CMAKE_PATH "${_moo_fp_includepy}" PYTHON_INCLUDE_DIRS) - FILE(TO_CMAKE_PATH "${_moo_fp_pyprefix}/libs" PYTHON_LIBRARY_DIRS) - SET(PYTHON_DEV_FOUND TRUE) - ENDIF(NOT _moo_fp_error) - ENDIF(PYGTK_FOUND) -ENDIF(MOO_ENABLE_PYTHON) - -MOO_DEBUG(STATUS "PYTHON_DEV_FOUND = ${PYTHON_DEV_FOUND}") - -IF(PYTHON_DEV_FOUND) - MOO_DEBUG(STATUS "PYTHON_INCLUDE_DIRS = ${PYTHON_INCLUDE_DIRS}") - MOO_DEBUG(STATUS "PYTHON_LIBRARIES = ${PYTHON_LIBRARIES}") - MOO_DEBUG(STATUS "PYTHON_LIBRARY_DIRS = ${PYTHON_LIBRARY_DIRS}") - LIST(APPEND MOO_DEP_LIBS ${PYTHON_LIBRARIES}) - LINK_DIRECTORIES(${PYTHON_LIBRARY_DIRS} ${PYGTK_LIBRARY_DIRS}) -ELSE(PYTHON_DEV_FOUND) - SET(MOO_ENABLE_PYTHON FALSE) -ENDIF(PYTHON_DEV_FOUND) - -# -%- strip:true, indent-width:2 -%- diff --git a/cmake/moo-libs.cmake b/cmake/moo-libs.cmake deleted file mode 100644 index 76758583..00000000 --- a/cmake/moo-libs.cmake +++ /dev/null @@ -1,89 +0,0 @@ -MACRO(MOO_ADD_COMPILE_FLAGS target flags) - GET_TARGET_PROPERTY(__moo_prop_value ${target} COMPILE_FLAGS) - IF(__moo_prop_value) - SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_FLAGS "${flags}") - ELSE(__moo_prop_value) - SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_FLAGS "${__moo_prop_value} ${flags}") - ENDIF(__moo_prop_value) -ENDMACRO(MOO_ADD_COMPILE_FLAGS) - -MACRO(MOO_ADD_DEFINITIONS target defs) - GET_TARGET_PROPERTY(__moo_prop_value ${target} COMPILE_DEFINITIONS) - IF(__moo_prop_value) - LIST(APPEND __moo_prop_value ${defs}) - ELSE(__moo_prop_value) - SET(__moo_prop_value ${defs}) - ENDIF(__moo_prop_value) - SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_DEFINITIONS "${__moo_prop_value}") -ENDMACRO(MOO_ADD_DEFINITIONS) - -# MACRO(MOO_ADD_SOURCE_FILE_SET name subdir) -# _MOO_MODULE_SOURCES_VAR_NAMES(${name} _moo_s _moo_bs _moo_st) -# -# IF(_moo_code_module_created_${name}) -# MESSAGE(FATAL_ERROR "MOO_ADD_SOURCE_FILE_SET(${name}) called twice") -# ENDIF(_moo_code_module_created_${name}) -# SET(_moo_code_module_created_${name} 1) -# -# SET(_moo_source_file_prefix "") -# IF(NOT "" STREQUAL "${subdir}") -# SET(_moo_source_file_prefix "${subdir}/") -# ENDIF(NOT "" STREQUAL "${subdir}") -# -# # SET(${name}_cmake_dummy ${CMAKE_CURRENT_BINARY_DIR}/${name}-cmake-dummy.c) -# # ADD_CUSTOM_COMMAND(OUTPUT ${${name}_cmake_dummy} -# # COMMAND ${CMAKE_COMMAND} -D LIBNAME=${name} -D OUTPUT=${${name}_cmake_dummy} -P ${CMAKE_SOURCE_DIR}/moo/gendummy.cmake -# # DEPENDS ${${name}_stamps} ${CMAKE_SOURCE_DIR}/moo/gendummy.cmake) -# # SET_SOURCE_FILES_PROPERTIES(${${name}_cmake_dummy} PROPERTIES GENERATED 1) -# -# IF(_moo_source_file_prefix) -# SET(_moo_sources_set_tmp ${${_moo_s}}) -# SET(${_moo_s}) -# FOREACH(_moo_source_file ${_moo_sources_set_tmp}) -# LIST(APPEND ${_moo_s} "${_moo_source_file_prefix}${_moo_source_file}") -# ENDFOREACH(_moo_source_file) -# ENDIF(_moo_source_file_prefix) -# -# LIST(APPEND moo_all_sources ${${_moo_s}} ${${_moo_bs}} ${${_moo_st}}) -# -# ENDMACRO(MOO_ADD_SOURCE_FILE_SET) - -MACRO(MOO_ADD_LIBRARY libname) - STRING(TOUPPER ${libname} _mal_mod) - GET_DIRECTORY_PROPERTY(_mal_stamps MOO_STAMPS) - GET_DIRECTORY_PROPERTY(_mal_built_sources MOO_BUILT_SOURCES) -# FOREACH(_moo_source_file ${${_mal_mod}_SOURCES} ${_mal_built_sources}) -# IF("${_moo_source_file}" MATCHES ".*[.]c$") -# IF(NOT "${_moo_source_file}" STREQUAL "moofontsel.c") -# set_source_files_properties(${_moo_source_file} PROPERTIES LANGUAGE CXX) -# ENDIF(NOT "${_moo_source_file}" STREQUAL "moofontsel.c") -# ENDIF("${_moo_source_file}" MATCHES ".*[.]c$") -# ENDFOREACH(_moo_source_file) - ADD_LIBRARY(${libname} STATIC ${ARGN} ${${_mal_mod}_SOURCES} ${_mal_stamps} ${_mal_built_sources}) -ENDMACRO(MOO_ADD_LIBRARY) - -MACRO(MOO_ADD_MOO_CODE_MODULE) - MOO_ADD_LIBRARY(${ARGN}) - INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) -ENDMACRO(MOO_ADD_MOO_CODE_MODULE) - -MACRO(MOO_WIN32_RESOURCE rc_in module module_sources module_libs) - IF(WIN32) - SET(_moo_rc_file ${CMAKE_CURRENT_BINARY_DIR}/${module}.rc) - SET_SOURCE_FILES_PROPERTIES(${_moo_rc_file} PROPERTIES GENERATED 1) - SET(_moo_res_file ${CMAKE_CURRENT_BINARY_DIR}/${module}.res) - CONFIGURE_FILE(${rc_in} ${_moo_rc_file} @ONLY) - IF(MSVC) - LIST(APPEND ${module_sources} ${_moo_rc_file}) - ELSE(MSVC) - ADD_CUSTOM_COMMAND(OUTPUT ${_moo_res_file} - COMMAND ${WINDRES_EXECUTABLE} -i ${_moo_rc_file} --input-format=rc -o ${_moo_res_file} -O coff - DEPENDS ${_moo_rc_file} - ) - SET_SOURCE_FILES_PROPERTIES(${_moo_res_file} PROPERTIES EXTERNAL_OBJECT 1 GENERATED 1) - LIST(APPEND ${module_sources} ${_moo_res_file}) - LIST(APPEND ${module_libs} ${_moo_res_file}) - # FIXME rebuilding just doesn't work - ENDIF(MSVC) - ENDIF(WIN32) -ENDMACRO(MOO_WIN32_RESOURCE) diff --git a/cmake/moo.cmake b/cmake/moo.cmake deleted file mode 100644 index 40fa2223..00000000 --- a/cmake/moo.cmake +++ /dev/null @@ -1,72 +0,0 @@ -FIND_PACKAGE(PythonInterp) -IF(NOT PYTHONINTERP_FOUND) - MESSAGE(FATAL_ERROR "Python not found") -ENDIF(NOT PYTHONINTERP_FOUND) - -IF(WIN32 AND NOT MSVC) - FIND_PROGRAM(WINDRES_EXECUTABLE windres - DOC "Path to the windres executable") - IF(NOT WINDRES_EXECUTABLE) - MESSAGE(FATAL_ERROR "Could not find windres") - ENDIF(NOT WINDRES_EXECUTABLE) -ENDIF(WIN32 AND NOT MSVC) - -SET(MOO_CMAKE_COMMAND "${CMAKE_COMMAND}" - -D "MOO_SOURCE_DIR=${MOO_SOURCE_DIR}" - -D "MOO_BINARY_DIR=${MOO_BINARY_DIR}" - -D "GLIB_GENMARSHAL_EXECUTABLE=${GLIB_GENMARSHAL_EXECUTABLE}" - -D "GDK_PIXBUF_CSOURCE_EXECUTABLE=${GDK_PIXBUF_CSOURCE_EXECUTABLE}" - -D "PKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}" - -D "PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" -) - -CONFIGURE_FILE(${MOO_SOURCE_DIR}/moo/glade2c.cmake.in ${CMAKE_BINARY_DIR}/moo/glade2c.cmake @ONLY) -MACRO(MOO_GEN_GXML) - FOREACH(_mgg_gladefile ${ARGN}) - STRING(REGEX REPLACE "(.*)\\.glade" "\\1-gxml.h" _mgg_header ${_mgg_gladefile}) - SET(_mgg_header_full ${CMAKE_CURRENT_BINARY_DIR}/${_mgg_header}) - SET(_mgg_header_stamp ${_mgg_header_full}.stamp) - MOO_ADD_GENERATED_FILE( - ${_mgg_header_stamp} ${_mgg_header_full} - COMMAND ${MOO_CMAKE_COMMAND} -D INPUT=${_mgg_gladefile} -D OUTPUT=${_mgg_header} -D SRCDIR=${CMAKE_CURRENT_SOURCE_DIR} -P "${CMAKE_BINARY_DIR}/moo/glade2c.cmake" - DEPENDS ${_mgg_gladefile} ${CMAKE_BINARY_DIR}/moo/glade2c.cmake ${MOO_GLADE2C_PY} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - ) - ENDFOREACH(_mgg_gladefile) -ENDMACRO(MOO_GEN_GXML) - -MACRO(MOO_GEN_ENUMS enummodule) - SET(_moo_enum_input ${enummodule}-enums-in.py) - SET(_moo_enum_output ${enummodule}-enums) - GET_FILENAME_COMPONENT(_moo_enum_gen_py ${CMAKE_SOURCE_DIR}/moo/genenums.py ABSOLUTE) - GET_FILENAME_COMPONENT(_moo_enum_stamp ${CMAKE_CURRENT_BINARY_DIR}/${_moo_enum_output}.stamp ABSOLUTE) - MOO_ADD_GENERATED_FILE( - ${_moo_enum_stamp} - "${CMAKE_CURRENT_SOURCE_DIR}/${_moo_enum_output}.c;${CMAKE_CURRENT_SOURCE_DIR}/${_moo_enum_output}.h" - COMMAND ${PYTHON_EXECUTABLE} ${_moo_enum_gen_py} ${enummodule} ${_moo_enum_input} ${_moo_enum_output} ${_moo_enum_stamp} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_moo_enum_input} ${_moo_enum_gen_py} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - ) -ENDMACRO(MOO_GEN_ENUMS) - -MACRO(MOO_GEN_UIXML) - FOREACH(uifile ${ARGN}) - GET_FILENAME_COMPONENT(basename ${uifile} NAME_WE) - STRING(REPLACE "-" "_" varname ${basename}) - SET(varname ${varname}_ui_xml) - SET(header ${basename}-ui.h) - SET(header_full ${CMAKE_CURRENT_BINARY_DIR}/${header}) - SET(header_stamp ${header_full}.stamp) - MOO_ADD_GENERATED_FILE( - ${header_stamp} ${header_full} - COMMAND ${PYTHON_EXECUTABLE} ${MOO_XML2H_PY} - ${CMAKE_CURRENT_SOURCE_DIR}/${uifile} - ${CMAKE_CURRENT_BINARY_DIR}/${header} - ${varname} - DEPENDS ${uifile} ${MOO_XML2H_PY} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - ) - ENDFOREACH(uifile) -ENDMACRO(MOO_GEN_UIXML) - -# -%- indent-width:2 -%- diff --git a/config-dirs.h.in b/config-dirs.h.in deleted file mode 100644 index 33a0fe61..00000000 --- a/config-dirs.h.in +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef CONFIG_DIRS_H -#define CONFIG_DIRS_H - -#include - -#define MOO_DATA_DIR "@MOO_DATA_DIR_ABS@" -#define MOO_LIB_DIR "@MOO_LIB_DIR_ABS@" -#define MOO_LOCALE_DIR "@LOCALEDIR_ABS@" -#define MOO_HELP_DIR "@MOO_HELP_DIR_ABS@" - -#endif /* CONFIG_DIRS_H */ diff --git a/config.cmake b/config.cmake deleted file mode 100644 index 17d5a2e0..00000000 --- a/config.cmake +++ /dev/null @@ -1,61 +0,0 @@ -IF(GDK_X11) - FIND_PACKAGE(X11) - LIST(APPEND MOO_DEP_LIBS ${X11_LIBRARIES} ${X11_ICE_LIB}) -ENDIF(GDK_X11) - -INCLUDE(CheckFunctionExists) -INCLUDE(CheckIncludeFile) -INCLUDE(CheckStructHasMember) - -MACRO(MOO_CHECK_FUNCTIONS) - FOREACH(_moo_func ${ARGN}) - STRING(REGEX REPLACE "[/.-]" "_" _moo_func_var ${_moo_func}) - STRING(TOUPPER HAVE_${_moo_func_var} _moo_func_var) - CHECK_FUNCTION_EXISTS(${_moo_func} ${_moo_func_var}) - MOO_DEFINE_H(${_moo_func_var}) - ENDFOREACH(_moo_func) -ENDMACRO(MOO_CHECK_FUNCTIONS) - -MACRO(MOO_CHECK_HEADERS) - FOREACH(_moo_func ${ARGN}) - STRING(REGEX REPLACE "[/.-]" "_" _moo_func_var ${_moo_func}) - STRING(TOUPPER HAVE_${_moo_func_var} _moo_func_var) - CHECK_INCLUDE_FILE(${_moo_func} ${_moo_func_var}) - MOO_DEFINE_H(${_moo_func_var}) - ENDFOREACH(_moo_func) -ENDMACRO(MOO_CHECK_HEADERS) - -MACRO(MOO_CHECK_STRUCT_HAS_MEMBER struct field incfile varname) - CHECK_STRUCT_HAS_MEMBER(${struct} ${field} ${incfile} ${varname}) - MOO_DEFINE_H(${varname}) -ENDMACRO(MOO_CHECK_STRUCT_HAS_MEMBER) - - -# for xdgmime -MOO_CHECK_FUNCTIONS(getc_unlocked) -# for GMappedFile and xdgmime -MOO_CHECK_FUNCTIONS(mmap) -MOO_CHECK_HEADERS(unistd.h) -# for mooappabout.h -MOO_CHECK_HEADERS(sys/utsname.h) -# for mooapp.c -MOO_CHECK_HEADERS(signal.h) -MOO_CHECK_FUNCTIONS(signal) -# for mooutils-fs.c -MOO_CHECK_HEADERS(sys/wait.h) - - -IF(WIN32) - INCLUDE_DIRECTORIES(${MOO_SOURCE_DIR}/moo/mooutils/moowin32/mingw) - SET(HAVE_MMAP ON) # using fake mmap on windows - # gettimeofday is present in recent mingw - CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY) - IF(NOT HAVE_GETTIMEOFDAY) - SET(HAVE_GETTIMEOFDAY 1) - SET(MOO_NEED_GETTIMEOFDAY 1) - INCLUDE_DIRECTORIES(${MOO_SOURCE_DIR}/moo/mooutils/moowin32/ms) - ENDIF(NOT HAVE_GETTIMEOFDAY) - MOO_DEFINE_H(MOO_NEED_GETTIMEOFDAY) -ENDIF(WIN32) - -# -%- indent-width:2 -%- diff --git a/config.h.in b/config.h.in index 17c7b864..04c1b07b 100644 --- a/config.h.in +++ b/config.h.in @@ -1,23 +1,217 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +#ifndef __CONFIG_H__ +#define __CONFIG_H__ + +/* always defined to indicate that i18n is enabled */ +#undef ENABLE_NLS + +/* moo */ +#undef GETTEXT_PACKAGE + +/* Define to 1 if you have the `bind_textdomain_codeset' function. */ +#undef HAVE_BIND_TEXTDOMAIN_CODESET + +/* configargs.h is created */ +#undef HAVE_CONFIGARGS_H + +/* Define to 1 if you have the `dcgettext' function. */ +#undef HAVE_DCGETTEXT + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the `FAMMonitorDirectory' function. */ +#undef HAVE_FAMMONITORDIRECTORY + +/* fam.h has FAMNoExists defined */ +#undef HAVE_FAMNOEXISTS + +/* Define to 1 if you have the `FAMOpen' function. */ +#undef HAVE_FAMOPEN + +/* Define to 1 if you have the header file. */ +#undef HAVE_FAM_H + +/* Define to 1 if you have the `getc_unlocked' function. */ +#undef HAVE_GETC_UNLOCKED + +/* Define if the GNU gettext() function is already present or preinstalled. */ +#undef HAVE_GETTEXT + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define if your file defines LC_MESSAGES. */ +#undef HAVE_LC_MESSAGES + +/* Define to 1 if you have the header file. */ +#undef HAVE_LOCALE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `mmap' function. */ +#undef HAVE_MMAP + +/* Define if libXrender is available. */ +#undef HAVE_RENDER + +/* Define to 1 if you have the header file. */ +#undef HAVE_SIGNAL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_UTSNAME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + +/* broken gtk theme */ +#undef MOO_BROKEN_GTK_THEME + +/* MOO_BUILD_APP */ +#undef MOO_BUILD_APP + +/* MOO_BUILD_EDIT */ +#undef MOO_BUILD_EDIT + +/* MOO_BUILD_LUA */ +#undef MOO_BUILD_LUA + +/* MOO_BUILD_UTILS */ +#undef MOO_BUILD_UTILS + +/* must be 1 */ +#undef MOO_COMPILATION + +/* MOO_COPYRIGHT */ +#undef MOO_COPYRIGHT + +/* MOO_DISPLAY_VERSION */ +#undef MOO_DISPLAY_VERSION + +/* MOO_EMAIL */ +#undef MOO_EMAIL + +/* Enable unit tests */ +#undef MOO_ENABLE_UNIT_TESTS + +/* MOO_MAJOR_VERSION */ +#undef MOO_MAJOR_VERSION + +/* MOO_MICRO_VERSION */ +#undef MOO_MICRO_VERSION + +/* MOO_MINOR_VERSION */ +#undef MOO_MINOR_VERSION + +/* MOO_MODULE_MAJOR_VERSION */ +#undef MOO_MODULE_MAJOR_VERSION + +/* MOO_MODULE_MINOR_VERSION */ +#undef MOO_MODULE_MINOR_VERSION + +/* MOO_PACKAGE_NAME */ +#undef MOO_PACKAGE_NAME + +/* use libfam for monitoring files */ +#undef MOO_USE_FAM + +/* whether libfam is provided by gamin */ +#undef MOO_USE_GAMIN + +/* use libxml2 */ +#undef MOO_USE_XML + +/* MOO_VERSION */ +#undef MOO_VERSION + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +#undef NO_MINUS_C_MINUS_O + +/* Name of package */ +#undef PACKAGE + +/* PACKAGE_BUGREPORT */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + + +/* Version number of package */ +#undef VERSION + +/* Define to 1 if the X Window System is missing or not being used. */ +#undef X_DISPLAY_MISSING + +/* Define to 1 if on MINIX. */ +#undef _MINIX + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +#undef _POSIX_1_SOURCE + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +#undef _POSIX_SOURCE + #include - -#define MOO_BUILD_APP 1 -#define MOO_BUILD_EDIT 1 -#define MOO_BUILD_LUA 1 -#define MOO_BUILD_UTILS 1 - -#define MOO_VERSION "@MOO_VERSION@" -#define MOO_DISPLAY_VERSION "@MOO_DISPLAY_VERSION@" -#define MOO_PACKAGE_VERSION "@MOO_PACKAGE_VERSION@" - -#define MOO_MAJOR_VERSION @MOO_MAJOR_VERSION@ -#define MOO_MICRO_VERSION @MOO_MICRO_VERSION@ -#define MOO_MINOR_VERSION @MOO_MINOR_VERSION@ -#define MOO_MODULE_MAJOR_VERSION @MOO_MODULE_MAJOR_VERSION@ -#define MOO_MODULE_MINOR_VERSION @MOO_MODULE_MINOR_VERSION@ - -#define MOO_OS_NAME "@CMAKE_SYSTEM@" - -#define MOO_EMAIL "@MOO_EMAIL@" -#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@" -#define MOO_PACKAGE_NAME "@MOO_PACKAGE_NAME@" -#define MOO_COPYRIGHT "@MOO_COPYRIGHT@" +#endif // __CONFIG_H__ diff --git a/configure.ac b/configure.ac new file mode 100644 index 00000000..941acf6e --- /dev/null +++ b/configure.ac @@ -0,0 +1,117 @@ +m4_define([_moo_major_version_],[0]) +m4_define([_moo_minor_version_],[99]) +m4_define([_moo_micro_version_],[0]) +m4_define([_moo_version_suffix_],[unstable]) +m4_define([_moo_module_major_version_],[2]) +m4_define([_moo_module_minor_version_],[0]) +m4_define([_moo_version_],[_moo_major_version_._moo_minor_version_._moo_micro_version_]) + +m4_if([_moo_version_suffix_],[],[m4_define([_moo_display_version_],[_moo_version_])],[m4_define([_moo_display_version_],[_moo_version_-_moo_version_suffix_])]) + +m4_define([_moo_email_],[emuntyan@sourceforge.net]) +m4_define([_moo_copyright_],[2004-2010 Yevgen Muntyan <_moo_email_>]) + +AC_PREREQ([2.65]) +AC_INIT([medit], [_moo_display_version_], [_moo_email_]) +AC_GNU_SOURCE +AC_CONFIG_MACRO_DIR([m4]) +AC_SUBST(ACLOCAL_FLAGS) + +AM_INIT_AUTOMAKE([1.11 silent-rules foreign dist-bzip2 dist-zip no-dist-gzip]) +LT_INIT([disable-shared]) + +AC_ARG_ENABLE(release, + AC_HELP_STRING([--enable-release],[assume it's a release build]),[ + MOO_RELEASE_BUILD="$enable_release" + ],[ + MOO_RELEASE_BUILD="no" +]) +AM_CONDITIONAL(MOO_RELEASE_BUILD, test "x$MOO_RELEASE_BUILD" = "xMOO_RELEASE_BUILD") + +MOO_MAJOR_VERSION=_moo_major_version_ +MOO_MINOR_VERSION=_moo_minor_version_ +MOO_MICRO_VERSION=_moo_micro_version_ +MOO_MODULE_MAJOR_VERSION=_moo_module_major_version_ +MOO_MODULE_MINOR_VERSION=_moo_module_minor_version_ +MOO_VERSION=_moo_version_ +MOO_DISPLAY_VERSION=_moo_display_version_ +MOO_EMAIL="_moo_email_" +MOO_COPYRIGHT="_moo_copyright_" +MOO_PACKAGE_NAME=moo +AC_SUBST(MOO_EMAIL) +AC_SUBST(MOO_DISPLAY_VERSION) +AC_SUBST(MOO_COPYRIGHT) + +GETTEXT_PACKAGE=moo +AC_SUBST(GETTEXT_PACKAGE) +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[moo]) +AM_GLIB_GNU_GETTEXT +IT_PROG_INTLTOOL +IT_PO_SUBDIR([po-gsv]) + +AC_PROG_CC +AC_PROG_CXX +AC_PROG_INSTALL +AC_PROG_MKDIR_P +AM_PROG_CC_C_O + +AC_ARG_VAR([WINDRES], [windres]) +AC_CHECK_TOOL(WINDRES, windres, :) + +AC_ARG_VAR([PYTHON], [Python executable, used to run build scripts]) +AC_CHECK_PROGS(PYTHON, python, [AC_MSG_ERROR([Python not found])]) +AC_ARG_VAR([PERL], [Perl executable, used to run build scripts]) +AC_CHECK_PROGS(PERL, perl, [AC_MSG_ERROR([Perl not found])]) + +MOO_AC_FLAGS + +AC_CONFIG_HEADERS([config.h]) +AH_TOP([#ifndef __CONFIG_H__ +#define __CONFIG_H__]) +AH_BOTTOM([#include +#endif // __CONFIG_H__]) + +LT_LIB_M + +AC_DEFINE(MOO_BUILD_APP,[1],[MOO_BUILD_APP]) +AC_DEFINE(MOO_BUILD_EDIT,[1],[MOO_BUILD_EDIT]) +AC_DEFINE(MOO_BUILD_LUA,[1],[MOO_BUILD_LUA]) +AC_DEFINE(MOO_BUILD_UTILS,[1],[MOO_BUILD_UTILS]) + +AM_CONDITIONAL(MOO_BUILD_CTAGS, [$MOO_OS_UNIX]) + +AC_DEFINE_UNQUOTED(MOO_VERSION,["$MOO_VERSION"],[MOO_VERSION]) +AC_DEFINE_UNQUOTED(MOO_DISPLAY_VERSION,["$MOO_DISPLAY_VERSION"],[MOO_DISPLAY_VERSION]) +AC_DEFINE_UNQUOTED(MOO_MAJOR_VERSION,[$MOO_MAJOR_VERSION],[MOO_MAJOR_VERSION]) +AC_DEFINE_UNQUOTED(MOO_MICRO_VERSION,[$MOO_MICRO_VERSION],[MOO_MICRO_VERSION]) +AC_DEFINE_UNQUOTED(MOO_MINOR_VERSION,[$MOO_MINOR_VERSION],[MOO_MINOR_VERSION]) +AC_DEFINE_UNQUOTED(MOO_MODULE_MAJOR_VERSION,[$MOO_MODULE_MAJOR_VERSION],[MOO_MODULE_MAJOR_VERSION]) +AC_DEFINE_UNQUOTED(MOO_MODULE_MINOR_VERSION,[$MOO_MODULE_MINOR_VERSION],[MOO_MODULE_MINOR_VERSION]) + +AC_DEFINE_UNQUOTED(MOO_EMAIL,["$MOO_EMAIL"],MOO_EMAIL) +AC_DEFINE_UNQUOTED(PACKAGE_BUGREPORT,["$PACKAGE_BUGREPORT"],PACKAGE_BUGREPORT) +AC_DEFINE_UNQUOTED(MOO_PACKAGE_NAME,["$MOO_PACKAGE_NAME"],MOO_PACKAGE_NAME) +AC_DEFINE_UNQUOTED(MOO_COPYRIGHT,["$MOO_COPYRIGHT"],MOO_COPYRIGHT) + +MOO_AC_CHECK_OS + +AC_CONFIG_FILES([ + Makefile + doc/Makefile + po/Makefile.in + po-gsv/Makefile.in + moo/Makefile + moo/xdgmime/Makefile + moo/mooutils/Makefile + moo/moolua/Makefile + moo/moofileview/Makefile + moo/gtksourceview/Makefile + moo/mooedit/Makefile + moo/eggsmclient/Makefile + moo/mooapp/Makefile + medit/Makefile + plugins/Makefile + plugins/script/Makefile + plugins/usertools/Makefile +]) +AC_OUTPUT diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt deleted file mode 100644 index 261682d8..00000000 --- a/doc/CMakeLists.txt +++ /dev/null @@ -1,60 +0,0 @@ -FIND_PACKAGE(Perl) - -GET_FILENAME_COMPONENT(MOO_HELP_FILES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/help ABSOLUTE) -FILE(MAKE_DIRECTORY ${MOO_HELP_FILES_DIR}) - -SET(_moo_build_docs) -IF(MOO_DEV_MODE OR NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/help-sections.h) - SET(_moo_build_docs TRUE) - MESSAGE(STATUS "Will build docs") -ENDIF(MOO_DEV_MODE OR NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/help-sections.h) - -IF(_moo_build_docs) - SET(MOO_HELP_T2T_FILES - license.t2t - prefs-file.t2t - prefs.t2t - user-tools.t2t - regex.t2t - man-medit.t2t - ) - - GET_FILENAME_COMPONENT(MOO_HELP_T2T_MAIN ${CMAKE_CURRENT_SOURCE_DIR}/medit.t2t ABSOLUTE) - GET_FILENAME_COMPONENT(MOO_HELP_T2T_MAN ${CMAKE_CURRENT_SOURCE_DIR}/man-medit.t2t ABSOLUTE) - CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/medit.t2t.in ${MOO_HELP_T2T_MAIN} @ONLY) - CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/man-medit.t2t.in ${MOO_HELP_T2T_MAN} @ONLY) - - GET_FILENAME_COMPONENT(MOO_HELP_HTML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/help.html ABSOLUTE) - GET_FILENAME_COMPONENT(MOO_MAKEDOCS_CMAKE ${CMAKE_CURRENT_SOURCE_DIR}/makedocs.cmake ABSOLUTE) - GET_FILENAME_COMPONENT(MOO_HELP_MAN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/medit.1 ABSOLUTE) - GET_FILENAME_COMPONENT(MOO_HELP_SECTIONS_H ${CMAKE_CURRENT_SOURCE_DIR}/help-sections.h ABSOLUTE) - GET_FILENAME_COMPONENT(MOO_HELP_TXT2TAGS_PY ${CMAKE_CURRENT_SOURCE_DIR}/txt2tags/txt2tags.py ABSOLUTE) - - ADD_CUSTOM_COMMAND(OUTPUT ${MOO_HELP_HTML_FILE} - COMMAND ${CMAKE_COMMAND} -D INPUT_FILE=${MOO_HELP_T2T_MAIN} - -D OUTPUT_FILE=${MOO_HELP_HTML_FILE} - -D OUTPUT_DIR=${MOO_HELP_FILES_DIR} - -D SECTIONS_FILE=${MOO_HELP_SECTIONS_H} - -D MAN_INPUT_FILE=${MOO_HELP_T2T_MAN} - -D MAN_OUTPUT_FILE=${MOO_HELP_MAN_FILE} - -D PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} - -D PERL_EXECUTABLE=${PERL_EXECUTABLE} - -D TXT2TAGS=${MOO_HELP_TXT2TAGS_PY} - -P ${MOO_MAKEDOCS_CMAKE} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - MAIN_DEPENDENCY ${MOO_HELP_T2T_MAIN} - DEPENDS ${MOO_MAKEDOCS_CMAKE} ${MOO_HELP_T2T_FILES}) - - SET_SOURCE_FILES_PROPERTIES(${MOO_HELP_MAN_FILE} PROPERTIES EXTERNAL_OBJECT 1 GENERATED 1) - SET_SOURCE_FILES_PROPERTIES(${MOO_HELP_SECTIONS_H} ${MOO_HELP_T2T_MAIN} ${MOO_HELP_T2T_MAN} PROPERTIES GENERATED 1) - - ADD_CUSTOM_TARGET(doc ALL DEPENDS ${MOO_HELP_HTML_FILE}) -ENDIF(_moo_build_docs) - -INSTALL(DIRECTORY ${MOO_HELP_FILES_DIR}/ DESTINATION ${MOO_HELP_DIR}) - -IF(UNIX) - INSTALL(FILES medit.1 DESTINATION ${MANDIR}/man1) -ENDIF(UNIX) - -# ADD_CUSTOM_TARGET(doc-clean COMMAND ${CMAKE_COMMAND} -E remove ${MOO_DOC_MEDIT_TXT} ${MOO_DOC_HTML_FILE} ${MOO_HELP_SECTIONS_H} ${MOO_DOC_STAMP_FILE}) diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 00000000..16d238ba --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,51 @@ +MOO_HELP_FILES_DIR = $(srcdir)/help + +if MOO_DEV_MODE + +MOO_HELP_T2T_FILES = \ + license.t2t \ + prefs-file.t2t \ + prefs.t2t \ + user-tools.t2t \ + regex.t2t \ + medit.t2t + +man-medit.t2t: man-medit.t2t.in $(top_builddir)/config.status + cd $(top_builddir) && ./config.status --file=doc/man-medit.t2t + mv man-medit.t2t $(srcdir)/man-medit.t2t + +medit.1: man-medit.t2t + cd $(srcdir) && $(PYTHON) txt2tags/txt2tags.py --target=man --outfile=medit.1.tmp man-medit.t2t && \ + mv medit.1.tmp medit.1 + +medit.t2t: medit.t2t.in $(top_builddir)/config.status + cd $(top_builddir) && ./config.status --file=doc/medit.t2t + mv medit.t2t $(srcdir)/medit.t2t + +help.html: $(MOO_HELP_T2T_FILES) + cd $(srcdir) && $(PYTHON) txt2tags/txt2tags.py --outfile=help.html.tmp medit.t2t && \ + mv help.html.tmp help.html + +help.stamp: help.html genhelpsections.py + $(MKDIR_P) $(MOO_HELP_FILES_DIR) + cd $(MOO_HELP_FILES_DIR) && $(PERL) -I.. ../splity/splity.pl -index ../splity/index-template.html -page ../splity/page-template.html ../help.html + echo stamp > $(srcdir)/help.stamp + cd $(srcdir) && $(PYTHON) genhelpsections.py help.html > help-sections.h.tmp && \ + ( cmp -s help-sections.h.tmp help-sections.h || mv help-sections.h.tmp help-sections.h ) + rm -f $(srcdir)/help-sections.h.tmp + +all-am: doc +doc: help.stamp + +endif + +install-data-local: + $(MKDIR_P) $(DESTDIR)$(MOO_HELP_DIR) + cd $(srcdir) && $(INSTALL_DATA) help/*.html $(DESTDIR)$(MOO_HELP_DIR) + +uninstall-local: + rm -f $(DESTDIR)$(MOO_HELP_DIR)/*.html + +if MOO_OS_UNIX +dist_man_MANS = medit.1 +endif MOO_OS_UNIX diff --git a/doc/genhelpsections.py b/doc/genhelpsections.py new file mode 100644 index 00000000..c440dcf9 --- /dev/null +++ b/doc/genhelpsections.py @@ -0,0 +1,20 @@ +# genhelpsections.py help.html + +import sys +import re + +print '#ifndef HELP_SECTIONS_H' +print '#define HELP_SECTIONS_H' +print '' + +for line in open(sys.argv[1]): + m = re.search(r"##(.+)##", line) + if m: + section = m.group(1) + if section.startswith("fake-"): + section = section[5:] + section_cap = section.replace('-', '_').upper() + print '#define HELP_SECTION_%s "%s"' % (section_cap, section) + +print '' +print '#endif /* HELP_SECTIONS_H */' diff --git a/doc/help-sections.h b/doc/help-sections.h new file mode 100644 index 00000000..3abf6676 --- /dev/null +++ b/doc/help-sections.h @@ -0,0 +1,32 @@ +#ifndef HELP_SECTIONS_H +#define HELP_SECTIONS_H + +#define HELP_SECTION_PREFS_LANGS_AND_FILTERS "prefs-langs-and-filters" +#define HELP_SECTION_PREFS_LANG_OPTIONS "prefs-lang-options" +#define HELP_SECTION_PREFS_FILE_FILTERS "prefs-file-filters" +#define HELP_SECTION_EDITING_OPTIONS "editing-options" +#define HELP_SECTION_SECT_USER_TOOLS "sect-user-tools" +#define HELP_SECTION_PREFS_USER_TOOLS "prefs-user-tools" +#define HELP_SECTION_USER_TOOLS_FILES "user-tools-files" +#define HELP_SECTION_USER_TOOLS_LUA "user-tools-lua" +#define HELP_SECTION_USER_TOOLS_SHELL "user-tools-shell" +#define HELP_SECTION_PREFS_FILE "prefs-file" +#define HELP_SECTION_REGEX "regex" +#define HELP_SECTION_REGEX_SEARCH "regex-search" +#define HELP_SECTION_APP_LICENSE "app-license" +#define HELP_SECTION_GPL "gpl" +#define HELP_SECTION_LGPL "lgpl" +#define HELP_SECTION_LICENSE_LUA "license-lua" +#define HELP_SECTION_LICENSE_LUA_LFS "license-lua-lfs" +#define HELP_SECTION_LICENSE_XDG_UTILS "license-xdg-utils" +#define HELP_SECTION_DIALOG_REPLACE "dialog-replace" +#define HELP_SECTION_DIALOG_FIND "dialog-find" +#define HELP_SECTION_PREFS_DIALOG "prefs-dialog" +#define HELP_SECTION_PREFS_PLUGINS "prefs-plugins" +#define HELP_SECTION_PREFS_ACCELS "prefs-accels" +#define HELP_SECTION_PREFS_FILE_SELECTOR "prefs-file-selector" +#define HELP_SECTION_DIALOG_FIND_IN_FILES "dialog-find-in-files" +#define HELP_SECTION_DIALOG_FIND_FILE "dialog-find-file" +#define HELP_SECTION_FILE_SELECTOR "file-selector" + +#endif /* HELP_SECTIONS_H */ diff --git a/doc/help.html b/doc/help.html new file mode 100644 index 00000000..27ba50d8 --- /dev/null +++ b/doc/help.html @@ -0,0 +1,1500 @@ + + + + + +medit 0.99.0-unstable Manual + + + + + +
+

+medit 0.99.0-unstable Manual +

+ +

Selecting editing options and languages

+

+Languages and files tab in the Editor +section of the Preferences dialog allows customizing +how syntax highlighting language and editing options are chosen +depending on the document filename, as well as setting editing options for +all documents which use given language and choosing file patterns and mime types +for which the given language should be used. +

+ +

Language-specific options

+

+Here you can set editing options on per-language basis, as well as define +for which file patterns and mime types given language should be used. +

+ + + + + + + + + + + + + + + + + +
Language combo boxChoose the language you want to customize. Settings for None will apply to documents for which no syntax highlighting language was chosen.
Mime typesThe given language will be used for files with these mime types, unless the language is chosen based on the filename or overridden in the File filters section.
ExtensionsThe given language will be used for files whose filenames match these patterns, unless overridden in the File filters section.
OptionsDefault editing options to use in documents which use the given language. These options can be overridden using File filters section, and options set in the file text have a higher priority as well. See the Editing options section for the format of this entry content.
+ + +

File filters

+

+File filters section allows to customize editing options, +as well as syntax highlighting language, on per-document basis using regular expressions +which are matched against the document filename. Full file paths are used, so one can +have per-directory settings. +

+

+Use dollar if you need to match ends of filenames, e.g. "\.doc$" will work as "*.doc" +pattern. +

+

+The filters are applied in the order they appear in the list, one by one. All filters +are applied to every file, so several filters may affect options in the same file. In this +way one can set some options for a set of files or a directory, then set or modify some +additional options for certain files in that set, etc. +

+

+To add a filter, use New button. Click the filter in the list to +select it, then click the Filter or Options +part of it to edit. Use Delete button to delete a filter, +and Up and Down buttons to change the order in +which they are applied. +

+

+Filter field contains a regular expression matched agains the +document filename. If it is found in the filename, then the options from the +Options field are applied to the document. +

+

+Options field contains the options, in format described in the +Editing options section. +

+ +

Editing options

+

+medit has some editing options which can be set in the document text, +or in the Preferences dialog for sets of files or for given syntax +highlighting language. +

+

+To set the options in the document text, place the following on the first, +second or the last line of the document: +

+
+-%- options -%-
+
+

+where options is the option string +

+
+key: value; key: value; ...
+
+

+(the latter is the format used also in the Preferences dialog). +

+

+Values can be strings, integers, or booleans. +

+

+Booleans are yes, no, true, false, 1, 0. +

+

+If a string value contains : character, then the following syntax may be used: key=/value/. +Any character may be used instead of slash (and it must not occur in the value). +Example: word-chars=@-/:@ +

+

+The following options are available: +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
langsyntax highlighting language to use in this document.
stripa boolean value, whether trailing whitespace should be removed from the document on save.
add-newlinea boolean value, whether the editor should ensure that saved files have a trailing new line character.
tab-widthdisplayed width of the Tab character. NOTE: This is not an indentation offset, this is the visual width of a Tab character.
use-tabswhether the Tab character should be used for indentation.
indent-widthan integer specifying indentation offset used when the Tab key is pressed to indent text.
+ +

+medit tries to understand modelines of Vim, Emacs, and Kate text editors, so chances are it will correctly +pick up the conventional settings from source files. +

+ +

User-defined Tools

+

+medit allows extending its functionality with user-defined +tools. It can be a Lua or Python (provided medit has been +built with Python support) script which is executed inside medit, +or a shell script which can use the text of the open document as +its input and/or output. +

+

+There are some predefined tools which you can use as +an example or to modify to suit your needs. +

+ +

Managing tools

+

+To create a new tool or to modify existing ones, open +Preferences dialog and select Tools in the list on the left. +

+

+Select the tool in the list or click the New +button to create a new one. To modify the order in which the tools +appear in the Tools menu (or in the document +context menu), use Up and Down buttons. To rename a tool, +click its name in the list to select it and then click again to +edit the name. Use the Delete button to delete a tool. +

+

+The following controls are available to modify the tools behavior: +

+ + + + + + + + + + + + + + + + + +
FilesSpecifies for which files the tool is going to be available.
OptionsSpecifies under which conditions the tool should be enabled.
Command typeThe type of the tool: a Python script, a Lua script, or a shell script.
Code text fieldHere you enter the actual script text.
+ +

+Options entry content is a comma-separated list of the following: +

+ + + + + + + + + + + + + + + + + +
need-docthe tool needs an open document
need-filethe tool will not work in new unsaved documents.
need-savethe document will be saved before the command is executed.
need-save-allall open documents will be saved before the command is executed.
+ +

+Files entry content can be the following: +

+
    +
  • a comma-separated list of file patterns, e.g. "*.c,*.h"; +
  • a comma-separated list of languages prefixed with "langs:", e.g. "langs: c, c++, objc"; +
  • a regular expression matching document filename prefixed with "regex:", e.g. the above +pattern list may be written as "regex:\.[ch]$". +
+ +

+Empty entry means that the tool will be available for all documents. +

+

+Shell script tools also have the following controls available: +

+

+Input entry specifies what text from the document should be passed to the command via its standard input: +

+ + + + + + + + + + + + + + + + + +
Noneno input text.
Selected linesthe lines containing selection or the line containing the cursor in case when no text is selected.
Selectionexact selected text. This will be different from "Selected lines" if selection does not span whole lines of the document, for instance if it is a single word.
Whole documentwhole document contents.
+ +

+Output entry specifies how the standard output of the command should be redirected. +

+ + + + + + + + + + + + + + + + + + + + + +
Nonethe command output will be suppressed.
None, asynchronousthe command output will be suppressed, and the command will be executed in background. For instance, you should use this if you need to launch some external program like a web browser.
Output panethe command output will be displayed in an output pane. This is useful for running programs like compilers, where you want to see the output.
Insert into the documentoutput will be inserted into the current document at the cursor position. It will replace the text used as an input, if any.
New documentnew document will be created and the command output will be inserted into it.
+ +

+Filter combo. If the output pane is used, then it can be passed through a filter: +the filter can match filenames and line numbers, so when you click the text in the +output pane it will open the corresponding file. This is used for compilers and similar +commands, which output locations of errors in processed files. +

+ +

Storing tools in files

+

+It is possible to create tools without using the Preferences dialog, +they can be stored in files in tools subfolder of the medit data +folders (or tools-context for tools which appear in the document context +menu). In particular, on Unix systems you can place files into +$HOME/.local/share/medit/tools/ folder. +

+

+Names of the files in the tools folder are used as their menu item +labels, after stripping first three characters, so you can use trhee-character +prefix to affect the order of the menu items, e.g. you can have 00-Do Something, +01-Another tool files to have them in that order in the menu. The files +may be of three types: files with extension ".py", they will be used +as Python scripts; files with extension ".lua", they will be used +as Lua scripts; and executable files, they will be executed in the same way +as shell commands. +

+

+To set parameters for a tool, place them on the first or the second line of the file in +the following format: +

+
+!! key=value; key=value; ... !!
+
+

+

+key may be one of the following: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
positionit can be start or end, and defines whether the menu item will be located at the start or at the end of the menu.
idthe tool identificator.
namethe tool name, i.e. the label used in the menu item. Overrides the file name.
oswindows or unix. If specified, then the tool will not be used when medit is running on a different operating system.
acceldefault keyboard accelerator used to invoke this tool.
menuthe menu to place this tool into. By default the tools are located in the Tools menu, but they can be as well put into any other menu.
langscomma-separated list of languages for which this tool will be enabled.
file-filterdefines for which files this tool will be enabled. The value has the same format as in the Preferences dialog.
optionssame as the Options entry content in the Preferences dialog.
+ +

+In addition to these, you can set input and output options for executable files: +

+ + + + + + + + + + + + + +
inputcan be none, lines, selection, or doc.
outputcan be none, async, pane, insert, or new-doc.
filterthe output filter name.
+ + +

Lua scripts

+

+Lua scripts can use the standard Lua library, lfs library, and medit package +which provides some text editor API. Lua scripts have the following variables and functions available. +

+
    +
  • doc: a table with the following fields: +
+ + + + + + + + + + + + + + + + + + + + + + +
filethe document file path.
namethe document file basename.
dirthe document file directory.
extthe document filename extension including the period.
basethe document filename without the extension: the basename is always base..ext.
+ +
    +
  • Cut(), Copy(), Paste(): clipboard operations. +
  • Backspace(), Delete(): corresponding key actions. +
  • Up(), Down(), Left(), Right(): move cursor as the arrow keys do. +
  • Selection(): returns selected text as a string. Returns nil when no text is selected. +
  • Select(n): selects n characters to the right if n is positive, and -n characters to the left if it is negative. +
  • Insert(...): inserts text at cursor. Namely, it converts each argument to a string and inserts the result into the document. +
  • NewLine(): inserts new line character. +

    +The following functions are provided for more advanced text manipulation. Position in the +document is denoted by the character offset from the beginning of the document, starting +from 1, so the first character is at position 1. Functions which take or return ranges use pairs of +offsets, a pair start, end denotes range of text from +start to end, not including the character at offset end. For instance, the +single-character range consisting of the first character in the document corresponds to the +pair 1, 2. Non-positive offset denotes the end of the document. +

    +
  • InsertText(pos, ...): inserts text at the position pos. +
  • DeleteText(start, end): deletes text in the range [start..end). +
  • GetInsert(): returns position of the cursor in the document. +
  • GetSelectionBounds(): returns positions of the selection start and end. If no text is + selected, returns pair pos, pos where pos is the cursor position. +
  • GetLine([pos]): returns line number of the character at the position pos. If pos + is not specified, it defaults to the cursor position. +
  • GetPosAtLine(n): returns position at the beginning of the n-th line. +
  • LineStart([pos]): returns the position of the beginning of the line which contains character at pos. + If pos is not specified, it defaults to the cursor position. +
  • LineEnd([pos]): returns the position of the end of the line which contains character at pos. + If pos is not specified, it defaults to the cursor position. +
  • ForwardLine([pos, [n]]): returns the position of the beginning of the next line (or + n-th line if n is specified). pos defaults to the cursor position if not + specified. +
  • BackwardLine([pos, [n]]): returns the position of the beginning of the previous line + (or n-th line backwards if n is specified). pos defaults to the cursor position + if not specified. +
  • GetText(start, end): returns the text in the [start..end). If start == end, it + returns an empty string, not nil. +
+ + +

Shell scripts

+

+In addition to the document text passed via standard input, +shell scripts have a number of environment variables set. $APP_PID +variable is set to the current process process id, so that opening a file in the +same instance of medit is as simple as medit filename (on the other +hand, you will have to use command line options if you need to run a new medit instance). +The following environment variables are set when scripts are executed: +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
DOCthe document basename.
DOC_DIRthe document file directory. The full file path is $DOC_DIR/$DOC.
DOC_BASEthe basename without extension.
DOC_EXTthe document filename extension including the period. The basename is always $DOC_BASE$DOC_EXT.
LINEthe number of the line containing cursor.
DATA_DIRthe user data directory. For example the tools are stored in $DATA_DIR/menu.cfg file and in files in the $DATA_DIR/tools/ directory.
+ +

+Additionally, all processes ran from inside medit will have DATADIR/scripts +directories in $PATH, so you may place some medit-specific programs +or scripts into USERDATADIR/scripts/ to be used from shell script tools. +

+ +

Preferences files

+

+medit preferences are stored in $HOME/.config/meditrc file. +It is an XML file which may be edited to set preferences which have not found +their place in the <interface>Preferences</interface> dialog. +

+

+NOTE: medit reads the preferences file on startup and writes it whenever OK +or Apply button is clicked in the Preferences dialog. Therefore, if you +modify the preferences file, your changes may be overwritten, and they not take +the effect until you restart medit. +

+

+The following "hidden" settings are available. +

+
    +
  • Editor/window_title: Format of the window title. It is a string which may +contain format sequences: percent sign followed by a character: +
      +
    • %a: application name; +
    • %b: current document basename; +
    • %f: full path of the current document; +
    • %u: URI of the current document; +
    • %s: the status of the current document, e.g. "`` [modified]``". It is prefixed + with space, so that "%b%s" will produce a nice string; +
    • %%: the percent character. +

      +Default value is "%a - %f%s" which produces something like "medit - /home/user/file [modified]". +

      +
    +
  • Editor/window_title_no_doc: Same as Editor/window_title, used when no document is open. Default value is "%a". +
  • Editor/tab_width: Visual width of the Tab character, 8 by default. +
+ + +

Regular expressions

+

+Medit uses regular expressions functionality provided by Glib, which in turn uses +PCRE library. See Glib manual +for complete description of regular expressions syntax. +

+ +

Search

+

+Regular expression searches in a document text are limited to single lines, unless the +search pattern includes newline. For example, pattern ".*" will match every line in the +document, pattern ".*\n.*" will match pairs of consecutive lines. This means that it is +mostly impossible to perform searches for text which spawns multiple lines. +

+ +

License

+

+medit as a whole is distributed under the terms of the GNU General +Public License, version 2, but most of its code is released under the +GNU Lesser General Public License. Full text of these licenses, as well +as licenses and acknowledgements for third-party software incorporated +in medit, can be found in this section. +

+ +

GNU General Public License

+
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
+
+ +

GNU Lesser General Public License

+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+		       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+
+
+ +

Lua License

+
+Lua License
+-----------
+
+Lua is licensed under the terms of the MIT license reproduced below.
+This means that Lua is free software and can be used for both academic
+and commercial purposes at absolutely no cost.
+
+For details and rationale, see http://www.lua.org/license.html .
+
+===============================================================================
+
+Copyright (C) 1994-2008 Lua.org, PUC-Rio.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+===============================================================================
+
+(end of COPYRIGHT)
+
+ +

LuaFileSystem License

+
+LuaFileSystem - File System Library for Lua
+Copyright 2003-2007 PUC-Rio
+http://www.keplerproject.org/luafilesystem
+
+LuaFileSystem is a Lua library developed to complement the set of functions
+related to file systems offered by the standard Lua distribution. LuaFileSystem
+offers a portable way to access the underlying directory structure and file
+attributes. LuaFileSystem is free software and uses the same license as Lua 5.1
+Current version is 1.2.1.
+
+

+ +

xdg-utils License

+
+Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
+Copyright 2006, Jeremy White <jwhite@codeweavers.com>
+
+LICENSE:
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+

+

+ + + + + + + + + +

+
+ + + diff --git a/doc/help/app-license.html b/doc/help/app-license.html new file mode 100644 index 00000000..6beafa96 --- /dev/null +++ b/doc/help/app-license.html @@ -0,0 +1,49 @@ + + + + + +License + + + +