Copyright © 2014 - Mario Wan Stadnik Harbour Beginners' Guide v1.2 www.harbour-

Copyright © 2014 - Mario Wan Stadnik Harbour Beginners' Guide v1.2 www.harbour-project.org Copyright © 2014 - Mario Wan Stadnik Harbour Beginners' Guide v1.2 1 / 23 Table of contents Introduction ................................................................................................................2 Step-by-step ...............................................................................................................4 Conclusion ................................................................................................................ 21 Harbour Beginners' Guide v1.2 2 / 23 Introduction Welcome to Harbour! This is a basic guide intended to help programmers moving from other xBase languages (f.e. CA-Clipper®) to Harbour. It will show all the steps from downloading and installing Harbour to build a simple program and create a project file. It is not intended to give all the information necessary to do the conversion of a complete application to Harbour. For such task other considerations should be taken in place because the process can be straight forward or pretty complex depending of how the source code was designed and eventual dependencies in other libraries. In some cases it will be necessary to rewrite functions that you do not have as a source code. That is a typical situation of trying to build an application in Harbour from other xBase sources that uses an external library Harbour does not know. Keep in mind that no library that worked for that application before will work in Harbour. The libraries from other xBase flavors are incompatible with Harbour. If you do not have the sources to rebuild with Harbour then you will have to substitute for other functions that will do the same or rewrite them. Fortunately Harbour has some of the well know libraries included and has many powerful extensions that may directly replace what is missing or help you to create better alternatives. Please look carefully the 'Harbour directory structure' to know the libraries included. In the last part of this guide you will find a list of websites with tutorials, manuals, guides and examples that may be very helpful to give you more information and ideas. Harbour Beginners' Guide v1.2 3 / 23 For advanced users: More information how to download and build Harbour from sources, build options, other platforms, libraries, tools, etc..., can be found reading the README.md file directly on the GitHub website. It is not necessary to read all that to follow this guide although it is required for those who want to build applications for other platforms (f.e: Linux, Darwin, OS/2 etc...) and those who want to download Harbour source code, build it and explore all the new possibilities. Harbour is compatible with Clipper® but it has many other interesting extensions that may greatly empower your application. More information for advanced users: o Clipper x Harbour differences o xHarbour x Harbour differences o Harbour Documentation files (NanFor format) o Harbour Changelog (History of changes) o Harbour source files directory structure The only requirements to follow this guide are: a) A computer with Windows® (XP to 10) and some free space (Note); b) Time to carefully read, understand and execute the instructions; c) Some knowledge of any xBase language. (Note) Harbour is multi-platform and that means it works on most operating systems but for this guide the only operating system that is being considered is Windows®. The guide was prepared using 'Windows® 7 Professional 32 bits' so the steps and the screen shoots may differ a bit on other versions of that operating system. The good news are that to install Harbour, configure and build a program are very simple and easy tasks. The step-by-step guide to do so will be given on the following topic. Step-by-step Harbour Beginners' Guide v1.2 4 / 23 Step-by-step Attention!  It may be easier than what you thought... 1. You have to download Harbour from the project website. Open your browser and go to http://harbour- project.org [Fig.1]: Fig.1 - Harbour Project home page Harbour Beginners' Guide v1.2 5 / 23 2. On the home page look for "Nightly binary: (exe)" [Fig.2] - that's the most updated Harbour build. Although it is updated daily and may contain eventual bugs, it is still considered pretty safe for most users not to mention that it will have the latest features and bug fixes. The "stable version" ('Download Harbour' button) is not recommended because it is outdated but there is always a chance that the main developers will create a newer one to make it available on the website. The actual version of the "Nighly binary" is v3.2.0dev ('dev' means "in .development") - that is the recommended version to install. Fig.2 - Detail of the download link on the home page 3. The size of the downloaded file is about 35MB and it is hosted on the Sourceforge website [Fig.3]: Fig.3 - Details about the download of Harbour's nightly binary install file 4. Execute the install file [Fig.4]. It will require less than 400MB of your hard disk. Fig.4 - Harbour's nightly binary install file Harbour Beginners' Guide v1.2 6 / 23 5. It will behave in an expected way like any other Windows® installation. It is recommended to leave the options as they come. The default is all the components selected to install [Fig.5]: Fig.5 - Harbour install - Choosing the components to install Harbour Beginners' Guide v1.2 7 / 23 6. Choose the default location to install Harbour (C:\hb32). You can change it if it is more convenient but if you do not have a good reason for doing it then just keep it as is [Fig.6]: Fig.6 - Harbour install - Choosing the default location to install Harbour Beginners' Guide v1.2 8 / 23 7. Once Harbour is installed it will create shortcuts on the program list [Fig.7a] and on the desktop [Fig.7b]: Fig.7a - Windows® start menu and list of programs featuring Harbour shortcuts Fig.7b - Harbour folder shortcut on the Desktop Harbour Beginners' Guide v1.2 9 / 23 8. On Harbour folder you will find information about 'Changelog', 'Copying', 'Release Notes' and a the README.md with information for advanced users [Fig.8a]. You can read those files directly from the GitHub website and it is recommended because it is better formated with working links [Fig.8b]: Fig.8a - Harbour folder with information files Harbour Beginners' Guide v1.2 10 / 23 Fig.8b - Harbour on GitHub website 9. The Harbour directory structure is well organized and it is recommended to explore all the folders because it will help you to understand what are the available libraries and other options. You will find many working examples that you give you better idea of the formating style, good programming practices and other possibilities. Here you have the Harbour directory structure in the form of a tree with a small explanation of what is on each folder: Harbour Beginners' Guide v1.2 11 / 23 Harbour directory structure <harbour> - Main Harbour directory. Contains important | information and the Changelog (changes history) | +---addons - Reserved to copy/install 3rd party Harbour | libraries | +---bin - Executables, DLLs and build scripts | Contains Harbour, HBMK2 (Harbour Make utility) | and other related tools | +---comp - ANSI C compiler directory tree | | | +---mingw - Installed MinGW GNU C compiler (good for 32/64 bit) | | | +---mingw64 - Reserved for MingW64 compiler | | | +---mingwarm - Reserved for MinGW GNU C ARM | | | +---pocc - Reserved for Pelles C | | | +---watcom - Reserved for Open Watcom C/C++ | +---contrib - Contrib library tree | | | +---3rd - 3rd party library components (internal) | | | +---gtalleg - GT for Allegro backend (GUI) | | | +---gtwvg - GUI emulation of GTWVT (win only) | | | +---hbamf - AMF3 file format handling (encoder/decoder) | | | +---hbblat - BLAT wrapper class (email - win only) | | | +---hbblink - BLinker compatibility | | | +---hbbz2 - BZ2 file compression wrapper (compression) | | | +---hbcairo - Cairo graphics library (imaging) | | | +---hbcomio - ComIO File IO redirector COM<n>: (Comm) | | | +---hbcomm - Comm compatibility - xhb.com, MiniGUI (Comm) | | | +---hbct - CA-Cl*pper Tools library | | | +---hbcurl - Curl library interface (IP communication) | | | +---hbexpat - Expat library interface (XML parser) | | | +---hbfbird - Firebird wrapper (SQL) | | | +---hbfimage - FreeImage wrapper (imaging) | | | +---hbformat - Harbour source code formatter tool (utility) | | | +---hbfoxpro - Visual FoxPro compatibility | | | +---hbfship - FlagShip compatibility | | | +---hbgd - GD API wrapper (imaging) | | | +---hbgt - GT library | | | +---hbhpdf - HaruPDF library wrapper (PDF) | | | +---hbhttpd - micro HTTPD server Harbour Beginners' Guide v1.2 12 / 23 | | | +---hblzf - LZF API wrapper (compression) | | | +---hbmemio - Memory I/O (RDD) | | | +---hbmisc - Miscelaneous functions collection | | | +---hbmlzo - Mini LZO wrapper (compression) | | | +---hbmxml - Mini XML wrapper (XML parser/generator) | | | +---hbmysql - MySQL wrapper (SQL) | | | +---hbmzip - Mini Zip wrapper (compression) | | | +---hbnetio - NET I/O (RDD) uploads/S4/ harbour-beginners-x27-guide.pdf

  • 23
  • 0
  • 0
Afficher les détails des licences
Licence et utilisation
Gratuit pour un usage personnel Attribution requise
Partager
  • Détails
  • Publié le Fev 25, 2022
  • Catégorie Law / Droit
  • Langue French
  • Taille du fichier 1.6125MB