Installing Lazarus on Haiku: what changed
Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.
| Old | New | Line | |
|---|---|---|---|
| 1 | 1 | > **Warning:** Work in progress ... | |
| 2 | 2 | ||
| 3 | 3 | Lazarus requires Qt under Haiku. Qt is not installed by default under Haiku. You need to install package available from [this site](http://qt-haiku.ru/). Currently, there is no binary package to install Lazarus. You will have to compile Lazarus from sources. | |
| 4 | 4 | ||
| 5 | 5 | ## Installing from sources | |
| 6 | 6 | ||
| 7 | 7 | ### Building Qt under Haiku | |
| 8 | 8 | ||
| 9 | 9 | Instructions are available there : <http://qt-haiku.ru/index.php?option=com_content&view=article&id=53&Itemid=67> | |
| 10 | 10 | ||
| 11 | 11 | Building Qt is not required. You can just download lastest binaries at <http://www.qt-haiku.ru/index.php?option=com_rokdownloads&view=folder&Itemid=60> and uncompress them to /boot/. | |
| 12 | 12 | ||
| 13 | 13 | In order to compile the Qt4 binding below, you should get the development package. | |
| 14 | 14 | ||
| 15 | 15 | ### Building Qt4 binding for Free Pascal under Haiku | |
| 16 | 16 | ||
| 17 | 17 | Download the source from <http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html>. The current binding is "V2.5 (Qt 4.5.X, compatible till Qt 4.8.X)". Choose the entry "Library source" under Linux X11. | |
| 18 | 18 | ||
| 19 | 19 | You need to add QMAKE_CXXFLAGS to Qt4Pas.pro before build libQt4Pas: | |
| 20 | 20 | ||
| 21 | 21 | QMAKE_CXXFLAGS += -mstackrealign -mincoming-stack-boundary=2 | |
| 22 | 22 | ||
| 23 | 23 | On previous versions (at least 2.1), it was necessary to edit some files before compiling the package under Haiku : | |
| 24 | 24 | ||
| 25 | - | ||
| 26 | - | ||
| 27 | - | ||
| 25 | + | ```text | |
| 26 | + | In Qt4Pas.pro, change the supported version according to the version of Qt you have downloaded (It also works with Qt 4.8.0). | |
| 27 | + | Then, add ":!Haiku" at line 50 inside Qt4Pas.pro : | |
| 28 | + | unix:!embedded:!mac:!haiku:PLATFORM = BINUX | |
| 29 | + | ``` | |
| 28 | 30 | ||
| 29 | 31 | Finally, run : | |
| 30 | 32 | ||
| 31 | - | ||
| 32 | - | ||
| 33 | - | ||
| 33 | + | ```text | |
| 34 | + | qmake | |
| 35 | + | make | |
| 36 | + | make install | |
| 37 | + | ``` | |
| 34 | 38 | ||
| 35 | 39 | You should have libQt4Pas.so in /boot/common/lib/. The last step is to add a link to this library in /boot/develop/abi/c86/gcc4/lib. | |
| 36 | 40 | ||
| 37 | 41 | More information about this binding is available here : [[Qt4 binding]] | |
| 38 | 42 | ||
| 39 | 43 | ### Building Lazarus under Haiku | |
| 40 | 44 | ||
| 41 | 45 | #### Required tools | |
| 42 | 46 | ||
| 43 | 47 | fpc 2.4.0 for Haiku is not suitable to build Lazarus. Some bugs were fixed while porting Lazarus to Haiku. | |
| 44 | 48 | ||
| 45 | 49 | The 2.4 fix branch or trunk should compile Lazarus. | |
| 46 | 50 | ||
| 47 | 51 | Current official version (2.6.0) is able to compile Lazarus. Binaries for Haiku are available at : <http://freepascal.org/down/i386/haiku.var>. | |
| 48 | 52 | ||
| 49 | 53 | #### Getting sources | |
| 50 | 54 | ||
| 51 | 55 | As usual : | |
| 52 | 56 | ||
| 53 | - | ||
| 57 | + | ```text | |
| 58 | + | svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus | |
| 59 | + | ``` | |
| 54 | 60 | ||
| 55 | 61 | #### Compiling Lazarus | |
| 56 | 62 | ||
| 57 | 63 | Once you have a good enough compiler and the source tree, just run at the root of the source tree | |
| 58 | 64 | ||
| 59 | 65 | Make sure gcc 4 is the default compiler. | |
| 60 | 66 | ||
| 61 | 67 | Under Haiku with package management : | |
| 62 | 68 | ||
| 63 | - | ||
| 69 | + | ```text | |
| 70 | + | setarch x86 | |
| 71 | + | ``` | |
| 64 | 72 | ||
| 65 | 73 | On older versions of Haiku, use : | |
| 66 | 74 | ||
| 67 | - | ||
| 75 | + | ```text | |
| 76 | + | setgcc gcc4 | |
| 77 | + | ``` | |
| 68 | 78 | ||
| 69 | 79 | then : | |
| 70 | 80 | ||
| 71 | - | ||
| 81 | + | ```text | |
| 82 | + | make LCL_PLATFORM=qt | |
| 83 | + | ``` | |
| 72 | 84 | ||
| 73 | 85 | --- | |
| 74 | 86 | *From the Free Pascal wiki, page "Installing Lazarus on Haiku", as it stood on 2020-07-02 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* |
