INSTALL.TXT 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. INSTALLATION INSTRUCTIONS
  2. These instructions refer to the package you are installing as
  3. some-package.tar.gz or some-package.zip. The .zip file is intended for use
  4. on Windows.
  5. The directory you choose for the installation will be referred to as
  6. your-install-dir.
  7. Note to Qt Visual Studio Integration users: In the instructions below,
  8. instead of building from command line with nmake, you can use the menu
  9. command 'Qt->Open Solution from .pro file' on the .pro files in the
  10. example and plugin directories, and then build from within Visual
  11. Studio.
  12. Unpacking and installation
  13. --------------------------
  14. 1. Unpacking the archive (if you have not done so already).
  15. On Unix and Mac OS X (in a terminal window):
  16. cd your-install-dir
  17. gunzip some-package.tar.gz
  18. tar xvf some-package.tar
  19. This creates the subdirectory some-package containing the files.
  20. On Windows:
  21. Unpack the .zip archive by right-clicking it in explorer and
  22. choosing "Extract All...". If your version of Windows does not
  23. have zip support, you can use the infozip tools available
  24. from www.info-zip.org.
  25. If you are using the infozip tools (in a command prompt window):
  26. cd your-install-dir
  27. unzip some-package.zip
  28. 2. Configuring the package.
  29. The configure script is called "configure" on unix/mac and
  30. "configure.bat" on Windows. It should be run from a command line
  31. after cd'ing to the package directory.
  32. You can choose whether you want to use the component by including
  33. its source code directly into your project, or build the component
  34. as a dynamic shared library (DLL) that is loaded into the
  35. application at run-time. The latter may be preferable for
  36. technical or licensing (LGPL) reasons. If you want to build a DLL,
  37. run the configure script with the argument "-library". Also see
  38. the note about usage below.
  39. (Components that are Qt plugins, e.g. styles and image formats,
  40. are by default built as a plugin DLL.)
  41. The configure script will prompt you in some cases for further
  42. information. Answer these questions and carefully read the license text
  43. before accepting the license conditions. The package cannot be used if
  44. you do not accept the license conditions.
  45. 3. Building the component and examples (when required).
  46. If a DLL is to be built, or if you would like to build the
  47. examples, next give the commands
  48. qmake
  49. make [or nmake if your are using Microsoft Visual C++]
  50. The example program(s) can be found in the directory called
  51. "examples" or "example".
  52. Components that are Qt plugins, e.g. styles and image formats, are
  53. ready to be used as soon as they are built, so the rest of this
  54. installation instruction can be skipped.
  55. 4. Building the Qt Designer plugin (optional).
  56. Some of the widget components are provided with plugins for Qt
  57. Designer. To build and install the plugin, cd into the
  58. some-package/plugin directory and give the commands
  59. qmake
  60. make [or nmake if your are using Microsoft Visual C++]
  61. Restart Qt Designer to make it load the new widget plugin.
  62. Note: If you are using the built-in Qt Designer from the Qt Visual
  63. Studio Integration, you will need to manually copy the plugin DLL
  64. file, i.e. copy
  65. %QTDIR%\plugins\designer\some-component.dll
  66. to the Qt Visual Studio Integration plugin path, typically:
  67. C:\Program Files\Trolltech\Qt VS Integration\plugins
  68. Note: If you for some reason are using a Qt Designer that is built
  69. in debug mode, you will need to build the plugin in debug mode
  70. also. Edit the file plugin.pro in the plugin directory, changing
  71. 'release' to 'debug' in the CONFIG line, before running qmake.
  72. Solutions components are intended to be used directly from the package
  73. directory during development, so there is no 'make install' procedure.
  74. Using a component in your project
  75. ---------------------------------
  76. To use this component in your project, add the following line to the
  77. project's .pro file (or do the equivalent in your IDE):
  78. include(your-install-dir/some-package/src/some-package.pri)
  79. This adds the package's sources and headers to the SOURCES and HEADERS
  80. project variables respectively (or, if the component has been
  81. configured as a DLL, it adds that library to the LIBS variable), and
  82. updates INCLUDEPATH to contain the package's src
  83. directory. Additionally, the .pri file may include some dependencies
  84. needed by the package.
  85. To include a header file from the package in your sources, you can now
  86. simply use:
  87. #include <SomeClass>
  88. or alternatively, in pre-Qt 4 style:
  89. #include <some-class.h>
  90. Refer to the documentation to see the classes and headers this
  91. components provides.
  92. Install documentation (optional)
  93. --------------------------------
  94. The HTML documentation for the package's classes is located in the
  95. your-install-dir/some-package/doc/html/index.html. You can open this
  96. file and read the documentation with any web browser.
  97. To install the documentation into Qt Assistant (for Qt version 4.4 and
  98. later):
  99. 1. In Assistant, open the Edit->Preferences dialog and choose the
  100. Documentation tab. Click the Add... button and select the file
  101. your-install-dir/some-package/doc/html/some-package.qch
  102. For Qt versions prior to 4.4, do instead the following:
  103. 1. The directory your-install-dir/some-package/doc/html contains a
  104. file called some-package.dcf. Execute the following commands in a
  105. shell, command prompt or terminal window:
  106. cd your-install-dir/some-package/doc/html/
  107. assistant -addContentFile some-package.dcf
  108. The next time you start Qt Assistant, you can access the package's
  109. documentation.
  110. Removing the documentation from assistant
  111. -----------------------------------------
  112. If you have installed the documentation into Qt Assistant, and want to uninstall it, do as follows, for Qt version 4.4 and later:
  113. 1. In Assistant, open the Edit->Preferences dialog and choose the
  114. Documentation tab. In the list of Registered Documentation, select
  115. the item com.nokia.qtsolutions.some-package_version, and click
  116. the Remove button.
  117. For Qt versions prior to 4.4, do instead the following:
  118. 1. The directory your-install-dir/some-package/doc/html contains a
  119. file called some-package.dcf. Execute the following commands in a
  120. shell, command prompt or terminal window:
  121. cd your-install-dir/some-package/doc/html/
  122. assistant -removeContentFile some-package.dcf
  123. Using the component as a DLL
  124. ----------------------------
  125. 1. Normal components
  126. The shared library (DLL) is built and placed in the
  127. some-package/lib directory. It is intended to be used directly
  128. from there during development. When appropriate, both debug and
  129. release versions are built, since the run-time linker will in some
  130. cases refuse to load a debug-built DLL into a release-built
  131. application or vice versa.
  132. The following steps are taken by default to help the dynamic
  133. linker to locate the DLL at run-time (during development):
  134. Unix: The some-package.pri file will add linker instructions to
  135. add the some-package/lib directory to the rpath of the
  136. executable. (When distributing, or if your system does not support
  137. rpath, you can copy the shared library to another place that is
  138. searched by the dynamic linker, e.g. the "lib" directory of your
  139. Qt installation.)
  140. Mac: The full path to the library is hardcoded into the library
  141. itself, from where it is copied into the executable at link time,
  142. and ready by the dynamic linker at run-time. (When distributing,
  143. you will want to edit these hardcoded paths in the same way as for
  144. the Qt DLLs. Refer to the document "Deploying an Application on
  145. Mac OS X" in the Qt Reference Documentation.)
  146. Windows: the .dll file(s) are copied into the "bin" directory of
  147. your Qt installation. The Qt installation will already have set up
  148. that directory to be searched by the dynamic linker.
  149. 2. Plugins
  150. For Qt Solutions plugins (e.g. image formats), both debug and
  151. release versions of the plugin are built by default when
  152. appropriate, since in some cases the release Qt library will not
  153. load a debug plugin, and vice versa. The plugins are automatically
  154. copied into the plugins directory of your Qt installation when
  155. built, so no further setup is required.
  156. Plugins may also be built statically, i.e. as a library that will be
  157. linked into your application executable, and so will not need to
  158. be redistributed as a separate plugin DLL to end users. Static
  159. building is required if Qt itself is built statically. To do it,
  160. just add "static" to the CONFIG variable in the plugin/plugin.pro
  161. file before building. Refer to the "Static Plugins" section in the
  162. chapter "How to Create Qt Plugins" for explanation of how to use a
  163. static plugin in your application. The source code of the example
  164. program(s) will also typically contain the relevant instructions
  165. as comments.
  166. Uninstalling
  167. ------------
  168. The following command will remove any fils that have been
  169. automatically placed outside the package directory itself during
  170. installation and building
  171. make distclean [or nmake if your are using Microsoft Visual C++]
  172. If Qt Assistant documentation or Qt Designer plugins have been
  173. installed, they can be uninstalled manually, ref. above.
  174. Enjoy! :)
  175. - The Qt Solutions Team.