From 36ac744a7854343080866e4f0313eeb2f62829e0 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Mon, 22 Feb 2010 22:05:05 +0200 Subject: update readme and install text files * Also relocated the src/readme.txt file to the docs directory. --- docs/INSTALL.txt | 135 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ docs/README.txt | 53 ++++++++++++++++++++++ docs/readme.txt | 52 --------------------- 3 files changed, 188 insertions(+), 52 deletions(-) create mode 100644 docs/INSTALL.txt create mode 100644 docs/README.txt delete mode 100644 docs/readme.txt (limited to 'docs') diff --git a/docs/INSTALL.txt b/docs/INSTALL.txt new file mode 100644 index 00000000..a0e7d670 --- /dev/null +++ b/docs/INSTALL.txt @@ -0,0 +1,135 @@ + + fpGUI Toolkit + + INSTALLATION NOTES + + + + Building fpGUI from the Command Line + ==================================== + +This is still a work in progress until I can find a suitable solution. I'm +not 100% satisfied with this, but it's a quick and dirty way to get things +to compile. I'll assume you have the 'fpc' executable setup in your PATH so it +can be run from any location on your computer. I'll also assume your global +fpc.cfg file has been setup correctly so the FPC compiler can find the RTL and +FCL units. + +Under Linux run: + cd /src + build.sh + +Under Windows run: + cd \src + build.bat + + +The extrafpc.cfg file located in the src directory is combined with your global +fpc.cfg file. The local extrafpc.cfg file sets up all the required search and +include paths to compile the CoreLib and GUI directories. + +All compiled units (*.o and *.ppu) are saved in the /lib directory. This +makes the search paths for you applications a little easier to setup. + + + Building fpGUI using Lazarus + ============================ + +I use a Lazarus feature call Packages that compiles the required +units and keeps track of the compiled units and paths when creating +applications. + + * Start Lazarus + * Select Components->Open Package File (*.lpk) and select the + src/corelib//fpgui_toolkit.lpk + Under Linux/FreeBSD the .lpk file will be in the 'x11' directory. + Under Windows the .lpk file will be in the 'gdi' directory. + A new dialog will appear - click Compile. + * Lazarus has now compiled the package and will keep track of + all the compiled units and paths. + * Now lets open a project. Select Project->Open Project and select + any project in the examples/gui directory. Select the *.lpi file. + * Now select Run->Build and Lazarus will compile the project for + you. The executable will be located in the same directory as the + source. The compiled units will be placed in the /units + directory. + +When you create you own project, all you need to do is tell Lazarus to +associate the 'fpgui_package.lpk' with your project and it will automatically +find all the fpGUI compiled units and source for you. + + * Creating a new project. Select Project->New Project. Select + Program and click the Create button. + * Save the project in your preferred directory. + * Associate fpGUI with your project. Select Project->Project Inspector. + An new dialog will appear. Select Add then New Requirements. In the + Package Name combobox, select the 'fpgui_package' package and + click OK. + * You can now write your program and use any fpGUI units. Lazarus will + automatically include the paths to the fpGUI compiled units for you. + + + Building fpGUI from the Free Pascal Text IDE + ============================================ + +First you would need to setup the 'fp' IDE to find the related files. +As far as I understand the text mode IDE has it's own built-in compiler +so doesn't read the standard fpc.cfg file. + + * Run the text mode IDE from the command line: fp + * Navigate the menus to: Options|Directories and select the 'Units' + tab. + * Now enter the following directories replacing the relevant parts with + your actual paths. The example below is valid on my system only. + I was using FPC 2.2.0 under Linux and the X11 corelib backend. + + /opt/fpc_2.2.0/lib/fpc/2.2.0/units/i386-linux/* + /opt/fpc_2.2.0/lib/fpc/2.2.0/units/i386-linux/rtl + /home/graemeg/programming/fpGUI/src/corelib + /home/graemeg/programming/fpGUI/src/corelib/x11 + /home/graemeg/programming/fpGUI/src/gui + + * Now select the 'Include files' tab and enter the following paths. + Again change the paths to point to your actual directories and + X11 or GDI corelib backend. + + /home/graemeg/programming/fpGUI/src/corelib + /home/graemeg/programming/fpGUI/src/corelib/x11 + + * Now changes to 'Miscellaneous' tab, PPU output directory. Type in + the edit box: units + + NOTE: + This will place all the compiled *.ppu and *.o files into a 'units' + directory inside you current directory. So make sure you create it + before you try to compile for the first time. FPC doesn't create + directories for you! + + * Now you are ready to open your projects main program unit (F3) and + compiling it by pressing (F9). + + + Compiling any of the examples from the Command Line + =================================================== + +You need to compile fpGUI first as mentioned above! +Every project in the ../examples directory has it's own extrafpc.cfg file. +You only need to specify that config file and the project unit to compile +it. + +fpc @extrafpc.cfg + +Example: + fpc @extrafpc.cfg docedit.lpr + + + + +Regards, + - Graeme - + + =========================================== + + + + diff --git a/docs/README.txt b/docs/README.txt new file mode 100644 index 00000000..e08a5212 --- /dev/null +++ b/docs/README.txt @@ -0,0 +1,53 @@ + +fpGUI information +================= + This version of fpGUI is based on a implementation where every + widget has a window handle. In other words every widget is actually + an embedded window inside a top-level window (aka Form). + + If you wanted to look at the old design of fpGUI - the one based on + a single handle per Form - then create a local branch based on the + tag 'single_handle_fpgui', or the slightly newer branch called + 'v0.4_fixes'. + + Release v0.5 and later is the new design (multi-handle implementation). + It was a complete rewrite of the code. + + + +To install FPC under Debian/Ubuntu +================================== + Select the fpc.deb metapackage, which depends on a number of sub-packages + containing the compiler, the units and so on. The 'libc' unit provided by + FPC is included in the fp-units-i386.deb package, which is however marked + as "deprecated" by the Ubuntu package manager and is therefore *not* + installed by default using fpc.deb. + + The following command will set up FPC under Ubuntu in order to be used with + fpGUI: + + sudo apt-get install fpc fp-units-i386 + + + +How to compile fpGUI +==================== + Please see the INSTALL.txt file for detailed instructions. + + + +System requirements under Linux +=============================== +To be able to compile and link fpGUI based applications you need to install +the following library dependencies. The packages will pull in all the other +required packages too. + + $ sudo apt-get install libX11-dev + $ sudo apt-get install libXft-dev + + + +Regards, + - Graeme Geldenhuys - + + ============================================ \ No newline at end of file diff --git a/docs/readme.txt b/docs/readme.txt deleted file mode 100644 index 27bbfa6f..00000000 --- a/docs/readme.txt +++ /dev/null @@ -1,52 +0,0 @@ - -fpGUI information -================= - This version of fpGUI is based on a implementation where every - widget has a window handle. In other words every widget is actually - an embedded window in the Form (yet another window). - - Revision 127 was the last revision which still had the old design - one - handle per Form. - It has been tagged in SubVersion as /tags/single_handle_fpgui - - From revision 227, the new design (multi-handle implementation) has - become the new default implementation of fpGUI. It was a complete - rewrite of the code. - - - -To install FPC under Debian/Ubuntu -================================== - Select the fpc.deb metapackage, which depends on a number of sub-packages - containing the compiler, the units and so on. The 'libc' unit provided by - FPC is included in the fp-units-i386.deb package, which is however marked - as "deprecated" by the Ubuntu package manager and is therefore *not* - installed by default using fpc.deb. - - The following command will set up FPC under Ubuntu in order to be used with - fpGUI: - - sudo apt-get install fpc fp-units-i386 - - - -How to compile fpGUI -==================== - Please see the readme.txt file in the "src" directory. - - -System requirements under Linux -=============================== -To be able to compile and link fpGUI based applications you need to install -the following library dependencies. The packages will pull in all the other -required packages too. - - $ sudo apt-get install libX11-dev - $ sudo apt-get install libXft-dev - - - ------ - Graeme Geldenhuys - - -- cgit v1.2.3-54-g00ecf