[texworks] Building TeXworks on Windows using MinGW (was: Running on Windows XP)

Stefan Löffler st.loeffler at gmail.com
Thu Jun 11 17:46:35 CEST 2009


Hi again,

On 2009-06-10 15:17, Stefan Löffler wrote:
> T T schrieb:
>   
>> I wonder how difficult it would be to compile TW with MSYS/MinGW. That
>> would get rid of this dependency.
>>   
>>     
>
> I tried that once but didn't succeed. I'm no mingw pro at all, though.
> IIRC my problem was getting all the dependencies to compile, but I may
> be mistaken.
> If you succeed I'd greatly appreciate a guide/walk-through. If you can
> compile it on Windows using mingw, you may also be able to cross-compile
> it from other platforms (e.g. Linux). That could make automatic
> compilation/redistribution of the binaries much simpler.
>
> Good luck :)
>   

I changed my mind (mainly because VC++ 2005 seems to be no longer
available) since I booted into my Windows partition again today and
managed to build TW using MinGW. I'll give a short overview over what I
did in the hopes that some people on this list will try it and give me
feedback. In that case I'll write a more comprehensive guide and send it
to Jonathan for putting it on the wiki.

In the following guide, #wiki# refers to the existing "Building On
Windows" page on the wiki (see:
http://code.google.com/p/texworks/wiki/BuildingOnWindows).

Required Software:
Same as on #wiki# except for Visual C++ and Platform SDK.
Additional dependency: MinGW (with support for c++ and make) + MSYS

Directory structure:
Same as on #wiki#

Obtaining the necessary libraries from KDE on Windows:
Same as on #wiki#, except for:
Compiler Mode: *mingw*
required packages:
 - freetype-mingw
 - jpeg
 - poppler-data
 - poppler-mingw
 - qt-mingw
 - zlib

Downloading and building Hunspell:
Downloading is the same as on #wiki#
For building, run MSYS and type:
    cd /c/texworks/hunspell-1.2.8
    ./configure
    cd src/hunspell
    make

Obtaining and building TeXworks:
Obtaining is the same as on #wiki#
For building, you have to modify TeXworks.pro by replacing the lines reading
    INCLUDEPATH += z:/cross-tools/usr/local/include
    INCLUDEPATH += z:/cross-tools/usr/local/include/poppler
    INCLUDEPATH += z:/cross-tools/usr/local/include/poppler/qt4
    INCLUDEPATH += z:/cross-tools/usr/local/include/hunspell
    LIBS += -Lz:/cross-tools/usr/local/lib
by
    INCLUDEPATH += C:/KDE/include/poppler/qt4
    INCLUDEPATH += C:/texworks-mingw/hunspell-1.2.8/src/hunspell
    LIBS += -LC:/texworks-mingw/hunspell-1.2.8/src/hunspell/.libs

Then run
    qmake
    mingw32-make
on the command line in the texworks-read-only directory


Running TeXworks for the first time:
In order to run TeXworks, you may need to copy the following dlls from
C:\KDE\bin to C:\texworks\texworks-read-only\release:
 - jpeg62.dll
 - libfontconfig.dll
 - libfreetype.dll
 - libpoppler-qt4.dll
 - libpoppler.dll
 - mingwm10.dll
 - QtCore4.dll
 - QtGui4.dll
 - QtXml4.dll
 - zlib1.dll

I hope this helps and is comprehensible. I'm looking forward to your
feedback.

-Stefan


More information about the texworks mailing list