Building the CLX with FPC: what changed
Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.
| Old | New | Line | |
|---|---|---|---|
| 1 | 1 | ## Introduction | |
| 2 | 2 | ||
| 3 | 3 | There are some efforts to build the (Free)CLX with FPC, here is a short explanation how to build it. For Win32 the Delphi 7 CLX is used while on linux the Kylix 3 CLX is used. | |
| 4 | 4 | ||
| 5 | 5 | Further, FPC from svn (2.3.1 or 2.2.1) is used. | |
| 6 | 6 | ||
| 7 | 7 | ## Status | |
| 8 | 8 | ||
| 9 | 9 | Current status is that all units except the database related units build. | |
| 10 | 10 | ||
| 11 | 11 | That's 39 of 44 units. | |
| 12 | 12 | ||
| 13 | 13 | Today (02.07.2007) I get perfectly compiled Qxxx units and test application (written with Kylix). fpc-2.0.4 (i386 rpm from lazarus snapshots build 20070701), fpc-2.1.5 (build 20070702) cannot do the job. | |
| 14 | 14 | ||
| 15 | 15 | ## Howto | |
| 16 | 16 | ||
| 17 | 17 | - Build and install FPC from SVN sources: [[How to start]] | |
| 18 | 18 | - copy the clx sources to a newly created directory as well as the | |
| 19 | 19 | - Win32 only: CommDlg.pas from Source/Rtl/Win/ | |
| 20 | 20 | - Win32 only: CommCtrl.pas from Source/Rtl/Win/ | |
| 21 | 21 | - Win32 only: ShlObj.pas from Source/Rtl/Win/ | |
| 22 | 22 | - Win32 only: RegStr.pas from Source/Rtl/Win/ | |
| 23 | 23 | - Win32 only: WinInet.pas from Source/Rtl/Win/ | |
| 24 | 24 | - Win32 only: UrlMon.pas from Source/Rtl/Win/ | |
| 25 | 25 | - Win32 only: WinSpool.pas from Source/Rtl/Win/ | |
| 26 | 26 | - Linux only: XLib.pas from source/rtl/linux/ | |
| 27 | 27 | - MaskUtils.pas from Source/Rtl/Common/ | |
| 28 | 28 | - Contnrs.pas from Source/Rtl/Common/ | |
| 29 | 29 | - HelpIntfs.pas from Sources/Common/ | |
| 30 | 30 | - IniFiles.pas from Source/Rtl/Common/ | |
| 31 | 31 | - Registry.pas from Source/Rtl/Common/ | |
| 32 | 32 | - Linux only: QFileCtrls.res from Lib/ ~~and rename it to qfilectrls.res~~ | |
| 33 | 33 | - ~~Linux only: rename DirSel.xfm to dirsel.xfm~~ | |
| 34 | 34 | - QButtons.res from Lib/ | |
| 35 | 35 | - QDialogs.res from Lib/ | |
| 36 | 36 | - QDBCtrls.res from Lib/ | |
| 37 | 37 | - QCheckLst.res from Lib/ | |
| 38 | 38 | - QFileCtrls.res from Lib/ | |
| 39 | 39 | - ~~Linux only: rename QFileDialog.res to qfiledialog.res~~ | |
| 40 | 40 | - ~~Linux only: rename QDialogs.res to qdialogs.res~~ | |
| 41 | 41 | - ~~Linux only: rename QDBPWDlg.xfm to qdbpwdlg.xfm~~ | |
| 42 | 42 | - ~~Linux only: rename QDBLogDlg.xfm to qdblogdlg.xfm~~ | |
| 43 | 43 | - ~~remove all references to *.xfm files, fpc can't handled them yet (fix this!!)~~ | |
| 44 | 44 | - D7 CLX only: remove usage of sysinit namespace in qdialogs.pas; system can be used instead | |
| 45 | 45 | - ~~replace all RTLConsts with RTLConst (fix this!!) (should be fixed after 1.9.8)~~ | |
| 46 | 46 | - D7 CLX only: fix ShlObj.pas: the lines 3554 to 3557 miss a semicolon at the end; FPC won't emulate bugs in the Delphi parser | |
| 47 | 47 | - ~~Linux ONLY : Add dynlibs unit after implementation (LoadLibrary & FreeLibrary needs it).~~ Compiling with the -Sk switch should be enough | |
| 48 | 48 | - Remove sysutils from uses clause of implementation section of QStyle.pas | |
| 49 | 49 | - 2.2.1 only: | |
| 50 | 50 | - Change {\$R *.xfm} to {\$R *.res} in QFileDialog.pas | |
| 51 | 51 | - Convert QFileDialog.xfm to resource. It can be done with fpcres utility **from a 2.3.1 snapshot**: `fpcres -of res QFileDialog.xfm` | |
| 52 | 52 | - create a dummy unit to build the clx:\ | |
| 53 | 53 | ||
| 54 | 54 | ``` pascal | |
| 55 | 55 | unit buildclx; | |
| 56 | 56 | interface | |
| 57 | 57 | uses | |
| 58 | 58 | BindHelp, QDBActns, QFileCtrls, | |
| 59 | 59 | QActnList, QFileDialog, QSearch, | |
| 60 | 60 | QButtons, QForms, QStdActns, | |
| 61 | 61 | QCheckLst, QGraphics, QStdCtrls, | |
| 62 | 62 | QClipbrd, QGrids, QStyle, | |
| 63 | 63 | QComCtrls, QImgList, QTypes, | |
| 64 | 64 | QConsts, QDialogs, QMask, | |
| 65 | 65 | QControls, QExtCtrls, QMenus, | |
| 66 | 66 | Qt, QPrinters; | |
| 67 | 67 | implementation | |
| 68 | 68 | end. | |
| 69 | 69 | ``` | |
| 70 | 70 | ||
| 71 | 71 | - build the CLX with | |
| 72 | 72 | ||
| 73 | - | ||
| 73 | + | ```text | |
| 74 | 74 | fpc -Sd buildclx -Rintel | |
| 75 | 75 | ``` | |
| 76 | 76 | ||
| 77 | 77 | on windows and | |
| 78 | 78 | ||
| 79 | - | ||
| 79 | + | ```text | |
| 80 | 80 | fpc -Sdk buildclx -Rintel | |
| 81 | 81 | ``` | |
| 82 | 82 | ||
| 83 | 83 | on linux. | |
| 84 | 84 | ||
| 85 | 85 | ### Building the DB units | |
| 86 | 86 | ||
| 87 | 87 | Building of the DB units isn't possible yet, however, at least the following steps must be done: | |
| 88 | 88 | ||
| 89 | 89 | - copy the following files into the directory where you put the clx source: | |
| 90 | 90 | - DB.pas from Sources/Vcl | |
| 91 | 91 | - SqlTimSt.pas from Sources/Vcl | |
| 92 | 92 | - DBConsts.pas from Sources/Vcl | |
| 93 | 93 | ||
| 94 | 94 | ## Todo | |
| 95 | 95 | ||
| 96 | 96 | As you might guess, there is also stuff to do: | |
| 97 | 97 | ||
| 98 | 98 | - The ClassGrouping functions are only dummies in FPC (StartClassGroup et al.) | |
| 99 | 99 | ||
| 100 | 100 | --- | |
| 101 | 101 | *From the Free Pascal wiki, page "Building the CLX with FPC", as it stood on 2013-09-21 after a change by Jwdietrich, 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).* | |
| 102 | 102 | Category: CLX | |
| 103 | 103 | Category: FPC |
