Merge from 0.4 branch


git-svn-id: http://texworks.googlecode.com/svn/trunk@860 9a2a4a0b-1251-0410-9248-99fc04669920
Ensure events are processed after show and before layout in TeXDocument::loadFile (line number issue)


git-svn-id: http://texworks.googlecode.com/svn/trunk@862 9a2a4a0b-1251-0410-9248-99fc04669920
Add Lua(La)TeX to default engines, remove LaTeXmk

LuaTeX is claimed to replace (some) other engines in the future, and seems to be installed by default with modern distros

LaTeXmk is not installed by default at least by TeXLive (except for installation schemes medium or full), and doesn't work out of the box on Windows (due to the dependency on Perl)



git-svn-id: http://texworks.googlecode.com/svn/trunk@865 9a2a4a0b-1251-0410-9248-99fc04669920
Return created document from TWApp::newFile and TWApp::newFromTemplate (Paul Norman's suggestion)

newFile() can be called from scripts, and it seems reasonable for it to return the new object.
Return type is QObject* because TeXDocument* is not registered as (scriptable) metatype and because in the future we might use a generic base class here.



git-svn-id: http://texworks.googlecode.com/svn/trunk@866 9a2a4a0b-1251-0410-9248-99fc04669920
Add information about customizing the build to PACKAGING


git-svn-id: http://texworks.googlecode.com/svn/trunk@867 9a2a4a0b-1251-0410-9248-99fc04669920
Resolve symlinks when looking for scripts (issue 520)


git-svn-id: http://texworks.googlecode.com/svn/trunk@869 9a2a4a0b-1251-0410-9248-99fc04669920
Add CMake build system

Basic CMake build system which:

  * Finds package dependencies
  * Builds a Mac Application bundle

So far, only tested on a Mac.

git-svn-id: http://texworks.googlecode.com/svn/trunk@870 9a2a4a0b-1251-0410-9248-99fc04669920
Bundling and packaging for OS X

The fixup_bundle function from the CMake BundleUtilities is invoked to copy all
non-system dependencies into TeXworks.app during installation.

CPack is set up to generate Drag-And-Drop .dmg installers.

git-svn-id: http://texworks.googlecode.com/svn/trunk@871 9a2a4a0b-1251-0410-9248-99fc04669920
Fix Info.plist generation

For some reason `SET(MACOSX_BUNDLE_INFO_PLIST ...)` wasn't working.
`SET_TARGET_PROPERTIES` is working.

git-svn-id: http://texworks.googlecode.com/svn/trunk@872 9a2a4a0b-1251-0410-9248-99fc04669920
Don't depend on on poppler's include directory

TeXworks only uses includes from poppler/qt4, and the xpdf headers (which are checked separately)

git-svn-id: http://texworks.googlecode.com/svn/trunk@873 9a2a4a0b-1251-0410-9248-99fc04669920
Use QtDbus on *nix

git-svn-id: http://texworks.googlecode.com/svn/trunk@874 9a2a4a0b-1251-0410-9248-99fc04669920
Make executable name lowercase on *nix

For historical reasons, the program is called "texworks" on *nix
systems, while it is called "TeXworks" on other platforms

git-svn-id: http://texworks.googlecode.com/svn/trunk@875 9a2a4a0b-1251-0410-9248-99fc04669920
Set version info from sources

git-svn-id: http://texworks.googlecode.com/svn/trunk@876 9a2a4a0b-1251-0410-9248-99fc04669920
Reorganize top-level CMake file

Following changes:

  - File has been clearly seperated into setup, configure, build and packaging
    sections

  - Configuration of Qt4 has been updated to use new methods availble with
    CMake 2.8

  - On OS X, the default installation path is set to `/Applications`

Many of these changes were inspired by an example Mike McQuaid posted on the
Homebrew mailing list:

http://librelist.com/browser/homebrew/2011/4/4/bundling-homebrew-built-packages

Some more of Mike's setup may creep into the CMake build as he is pretty
expierienced with CMake, Qt and KDE.

Thanks Mike!

git-svn-id: http://texworks.googlecode.com/svn/trunk@877 9a2a4a0b-1251-0410-9248-99fc04669920
Add support for Lua scripting plugin

No longer stripping binaries as part of packaging as it causes a lot of noise
when processing the Lua library and does not seem to save much space.

git-svn-id: http://texworks.googlecode.com/svn/trunk@878 9a2a4a0b-1251-0410-9248-99fc04669920
Add support for Python scripting plugin

git-svn-id: http://texworks.googlecode.com/svn/trunk@879 9a2a4a0b-1251-0410-9248-99fc04669920
Udate Poppler find script

Three changes:

  - pkg-config is no longer allowed to affect CMake variables like
    POPPLER_LIBRARIES

  - FindPopplerQT4.cmake has been merged into FindPoppler.cmake

  - Macros from CMake's GetPrerequisites are used to scan the dependencies of
    libpoppler for Fontconfig.

git-svn-id: http://texworks.googlecode.com/svn/trunk@880 9a2a4a0b-1251-0410-9248-99fc04669920
Make the Fontconfig dependency conditional

git-svn-id: http://texworks.googlecode.com/svn/trunk@881 9a2a4a0b-1251-0410-9248-99fc04669920
Don't depend on pkg-config output

pkg-config may not be installed on a system. This patch downgrades its
involvment in library/header finding to hinting at locations instead of setting
actual linker commands.

git-svn-id: http://texworks.googlecode.com/svn/trunk@882 9a2a4a0b-1251-0410-9248-99fc04669920
Search /usr/local before /usr

On OS X there is an old libhunspell in /usr that does not have any header
files.

git-svn-id: http://texworks.googlecode.com/svn/trunk@883 9a2a4a0b-1251-0410-9248-99fc04669920