On this page you will find information for setting up a development system under Mac OSX and under Windows; we will have information about Linux up soon -- it's pretty straightforward.
Linguistica for Mac
Building Linguistica as an XCode project with Qt
Getting started with XCode and Qt
It is recommended that you use an Integrated Development Environment (or IDE
) to work on Linguistica,
due to its complexity and the number of files within the project. If you are using a Mac, then
you may already have XCode (a Mac IDE) installed.
NOTE: You must install XCode BEFORE you install Qt, or XCode will fail to install. You might have to uninstall Qt if you have installed it without having installed XCode first.
The next step is to install Qt. Linguistica is built on Qt 3, which can be downloaded via FTP from ftp://ftp.trolltech.com/qt/source. We recommend installing version 3.3.8b.
In order to successfully use Qt, three environment variables have to be set up: QTDIR, PATH and QMAKESPEC.
QTDIR has to be set to the directory containing the Qt distribution. (This may be /usr/lib/qt3, for example.)
To be able to invoke the Qt tools from the command line the PATH variable needs to be set. Simply add ${QTDIR}/bin to the end of your PATH.
For Leopard Users
If you are using OS X 10.5 (Leopard) or higher, you will need to install a patch to get Qt 3 to compile successfully. (The patch is taken from http://forum.qtfr.org/viewtopic.php?id=6337.)Open the file $QTDIR/include/qglobal.h. This is the file that checks whether your operating system is compatible with Qt. Since Qt 3 was released before Leopard, it fails to recognize the operating system even though OS X 10.5 is otherwise perfectly compatible with Qt 3. In order to get around the compatibility check, add the following lines right after line 188 in the original file.
# if !defined (MAC_OS_X_VERSION_10_5)You also need edit the lines immediately following your insertion. The original reads
# define MAC_OS_X_VERSION_10_5 MAC_OS_X_VERSION_10_4 + 1
# endif
# if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_4)Of course, to allow 10.5, this must be edited to
# error "This version of Mac OS X is unsupported"
# endif
# if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5)That's it for qglobal.h. Now open $QTDIR/src/kernel/qt_mac.h. Replace the line 64 block
# error "This version of Mac OS X is unsupported"
# endif
#if !defined(Q_WS_MACX) || QT_MACOSX_VERSION < 0x1020 || QT_MACOSX_VERSION >= 0x1030by
# define QMAC_NO_FAKECURSOR
#endif
# if! defined (Q_WS_MACX) | | QT_MACOSX_VERSION <0x1020 | | (QT_MACOSX_VERSION> = 0x1030 & & QT_MACOSX_VERSION <= 0x1040)Finally, open $QTDIR/src/kernel/qcursor_mac.cpp. Replace the block starting on line 184 which reads
# define QMAC_NO_FAKECURSOR
#endif
#ifdef QMAC_USE_BIG_CURSOR_APIby
char *big_cursor_name;
#endif
CursorImageRec *ci;
struct {
QMacAnimateCursor *anim;
ThemeCursor curs;
#ifdef QMAC_USE_BIG_CURSOR_APIAlso replace the block starting on line 274
char *big_cursor_name;
#endif
#ifdef QMAC_NO_FAKECURSOR
CursorImageRec *ci;
#endif
struct {
QMacAnimateCursor *anim;
ThemeCursor curs;
if(type == TYPE_CursPtr) {with
if(curs.cp.hcurs && curs.cp.my_cursor)
free(curs.cp.hcurs);
} else if(type == TYPE_CursorImage) {
free(curs.ci);
if(type == TYPE_CursPtr) {You should now be able to build Qt 3 on your machine.
if(curs.cp.hcurs && curs.cp.my_cursor)
free(curs.cp.hcurs);
#ifdef QMAC_NO_FAKECURSOR
} else if(type == TYPE_CursorImage) {
free(curs.ci);
#endif
Compiling Linguistica with XCode
At this point, you should have both Qt 3 and XCode successfully installed.
Once you have saved the source (.cpp) and header (.h) files of Linguistica, place them all into a single folder. In Terminal, navigate to the location of the files. (For example, if you have saved them on the Desktop in a folder called Linguistica, your current working directory should be ~/Desktop/Linguistica.) In that directory, type the following to build the Linguistica project file.
$ qmake -projectand:
$ qmake -spec macx-pbuilderLinguistica has now successfully been built as an XCode project. To open the project, either type
$ open filename.pbprojor click on filename.pbproj in Finder.
XCode will now prompt you to upgrade the project to an ".xcodeproj" (rather than a ".pbproj") file. Click "Upgrade a Copy" and save.
One last step: Select Project in the menubar and click on "Upgrade All Targets in Project to Native". Click "Agree" on the ensuing dialog box and close the popup log file.
You should be on your way!