install.txt 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. Installing wxWidgets
  2. --------------------
  3. This is wxWidgets for IBM OS/2 Warp3 and Warp4. This is an unstable
  4. development release and OS/2 is considered to be in beta.
  5. IMPORTANT NOTE: If you experience problems installing, please
  6. re-read this instructions and other related files (changes.txt,
  7. readme.txt, notes on the Web site) carefully before mailing
  8. wx-users or the author. Preferably, try to fix the problem first and
  9. then send a patch to the author. Please report bugs using the
  10. bug report form on the wxWidgets web site.
  11. Unarchiving
  12. -----------
  13. At this time there is no comprehensive setup.exe type installation program.
  14. wxWidgets for OS/2 requires you download various .zip files and unpack them
  15. to your desired location on your system. Pick a location say,
  16. C:\wx\wxWidgets-2.8.0, copy the .zip files to there and unzip them ensuring you
  17. unzip the subdirectories as well. You will need:
  18. - All common, generic and OS2-specific wxWidgets source;
  19. - samples;
  20. - documentation in HTML Help format;
  21. - makefiles for VisualAge V3.0 (possibly for EMX and Watcom C++);
  22. - JPEG, TIFF, PNG, ZLIB, wxSTC, REGEX, EXPAT library sources.
  23. All but the documentation is included in wxOS2-2.8.0.zip, documentation
  24. must be downloaded separately from the wxWidgets Web site.
  25. General installation notes
  26. --------------------------
  27. After unzipping everything your directory tree should look something like
  28. this:
  29. x:\wx\wxWidgets-2.8.0\docs (your HTML reference manual)
  30. x:\wx\wxWidgets-2.8.0\include\wx
  31. x:\wx\wxWidgets-2.8.0\include\wx\generic
  32. x:\wx\wxWidgets-2.8.0\include\wx\html
  33. x:\wx\wxWidgets-2.8.0\include\wx\os2
  34. x:\wx\wxWidgets-2.8.0\samples\.... (all the sample directories)
  35. x:\wx\wxWidgets-2.8.0\src
  36. x:\wx\wxWidgets-2.8.0\src\common
  37. x:\wx\wxWidgets-2.8.0\src\generic
  38. x:\wx\wxWidgets-2.8.0\src\html
  39. x:\wx\wxWidgets-2.8.0\src\jpeg
  40. x:\wx\wxWidgets-2.8.0\src\os2
  41. x:\wx\wxWidgets-2.8.0\src\png
  42. x:\wx\wxWidgets-2.8.0\src\tiff
  43. x:\wx\wxWidgets-2.8.0\src\zlib
  44. If you are using VisualAge, you will also need to ensure you have a
  45. \lib directory as well, x:\wx\wxWidgets-2.8.0\lib
  46. and you will have to set a WXWIN environment variable in your
  47. config.sys,
  48. SET WXWIN=X:\WX\WXWINDOWS-2.8.0;
  49. Compilation
  50. -----------
  51. For now, only VisualAge V3.0 FP 8 and EMX-0.9d (with fix4) are supported.
  52. However, the library has been successfully compiled with Watcom C++ as
  53. well. As those build environments get a bit more "formalized", I will add
  54. them here.
  55. Compilation with VisualAge on the one hand and EMX on the other hand are
  56. rather different, VisualAge is essentially following Windows' way of doing
  57. it, EMX is following the example of the unix ports.
  58. Compilation with VisualAge
  59. --------------------------
  60. In addition to VisualAge V3.0 Fixpack 8 you will need the following in order
  61. to successfully build and use wxWidgets for OS/2:
  62. 1. IBM OS/2 Toolkit Version 4.5 or later
  63. 2. IBM TCPIP V4.0 or later
  64. 3. You will need the IBMLAN Lan Requester service and UPM if you wish to use
  65. network based components of the library (generally a standard part of any
  66. Warp Connect 3.0 or Warp 4.0 installation.
  67. 4. I strongly suggest that you have the latest IBM fixpacks installed for
  68. all your components.
  69. Go to the \src directory and open the file, makeva.env (there should be a
  70. .env for each supported compiler when they are fully supported), for edit.
  71. This is where the "make" environment for wxOS2 is set. Locate UMPLIB, NETLIB,
  72. and TCPIP environment variables about 20 lines down. Set these to match
  73. your system.
  74. There are number of possible outputs you can produce. There is a static
  75. lib and a dynamically linked lib, and both can be built in debug or release
  76. mode. Since wxOS2 is a beta and a rough one at that, I suggest, for now,
  77. you stick to the debug builds. The resultant linkable binaries will be
  78. output to the \lib directory as will the .dll files. The statically linked
  79. lib will be named wx.lib. Each of the third party libs will be there as well,
  80. including png.lib, jpeg.lib, tiff.lib, and zlib.lib. For DLL builds the
  81. import libs will have the same name, only with a 'd' appended. Thus the
  82. import library for the main lib in a dll build is wxd.lib.
  83. Object modules will be output into paths dictated by the build mode. For
  84. example, for debug static the outputs will be in DebugOS2, for DLLs in
  85. DebugOS2DLL.
  86. For your first build, you can directly build the library. For subsequent
  87. builds you will want to "clean" the output paths. To build the static library
  88. go to \src and execute nmake all -f makefile.va. To clean out the outputs
  89. execute nmake clean -f makefile.va.
  90. To build the wx.dll execut nmake all -f makefile.va WXMAKINGDLL=1. To clean
  91. the outputs execute namek clean -f makefile.va WXMAKINGDLL=1. For
  92. VisualAge 3.0 we use the module definition file method.
  93. If, for some reason you encounter linking problems with your dll build you may
  94. need to rebuild the module definition file, wx23.def, found in \src\os2. To
  95. do this you need to have a static version built. Go to the \lib directoy and
  96. execute CPPFILT /B /P wx.lib>temp.def. Copy this file to \src\os2. Delete
  97. the temp.def from your \lib directory.
  98. I find the following to be the easiest to reconstruct the .def file. Open
  99. both the wx23.def and the temp.def file. Copy the header of the wx23.def to
  100. the clipboard and paste it into the top of the temp.def file. If you have
  101. a valid SQL database client with its SDK on your system you can skip the next
  102. step. wxWidgets included some ODBC and SQL modules. They expect the standard
  103. sql.h and such to available. If you do not have a database client with its
  104. SDK (such as DB/2) then for the .dll build you need to delete the exports for
  105. the following three modules from your temp.def file, db.cpp, dbgrid.cpp and
  106. dbtable.cpp. save you changes to temp.def. Delete wx23.def and rename your
  107. temp.def to wx23.def and you are ready to go.
  108. I hope to clean up the .dll builds at some point before the library is
  109. a full fledged production caliber product. Fortunately EMX and Watcom can use
  110. the import and export pragmas successfully negating the need for manual .def
  111. files. VA 3.0, unfortunately in C++ does not properly export the mangled
  112. names so we are stuck with the CPPFILT .def file method of .dll builds for
  113. now.
  114. When building an application that uses the wx.dll you need to build it using
  115. the WXUSINGDLL=1 macro. For example to build the minimal sample you would
  116. go to \samples\minimal and execute nmake all -f makefile.va WXUSINGDLL=1.
  117. I strongly suggest when developing apps using wxWidgets for OS/2 under old
  118. VisualAge 3.0, that you use the dynamically linked library. The library is
  119. very large and even the most trivial statically linked .exe can be very
  120. large and take a long time to link. The release builds are much smaller,
  121. however. Fortunately, EMX seems to build much smaller static executables.
  122. Compilation using EMX
  123. ---------------------
  124. In addition to EMX-0.9d you will need a rather complete Unix-like
  125. environment, starting with a shell (e.g. ash) and most of the
  126. GNU file/text/shell utilities, but also flex, bison, sed, grep, awk
  127. and GNU make. Particularly note that uname is relevant to get the
  128. configure script working - the one from GNU shell utilities 1.12
  129. does work (check that uname -s returns "OS/2" and uname -m returns "i386"
  130. and you should be mostly fine.
  131. The first thing to do is to decide on a build directory. You can either
  132. do in-tree builds or you can do the build in a directory separated from
  133. the source directory. The later has the advantage, that it is much easier
  134. to compile and maintain several ports of wxWidgets on OS/2 - if you are
  135. developping cross-platform applications you might want to compile (and
  136. update) e.g. wxGTK or wxX11 as well.
  137. In the following, let's assume you decided to build in
  138. \wx\wxWidgets-2.8.0\build\pm. Now we need to set some environment
  139. variables, namely MAKESHELL (to a Unix like shell, let's assume ash)
  140. and INSTALL (to point to the install script. If you omit this, configure
  141. might find something like the system's tcpip\pcomos\install.exe which will
  142. not do the thing you want), e.g.
  143. SET MAKESHELL=ash
  144. SET INSTALL=/wx/wxWidgets-2.8.0/install-sh -c
  145. Be warned that depending on the precise version of your make, the
  146. variable that needs to be set might be MAKE_SHELL instead of MAKESHELL.
  147. If you have a really deficient version of GNU make, it might even be
  148. necessary to set SHELL or even COMSPEC to a unix like shell as well.
  149. Now run the provided configure script by executing e.g.
  150. `ash -c "../../configure \
  151. --prefix=directory_where_you_want_wxWidgets_to_be_installed"'
  152. from within the build directory (the relative path might be different
  153. depending on the build directory you selected).
  154. If you are already running some unix-like shell and not cmd, you may
  155. of course ommit the `ash -c' part in the above command.
  156. This will create a whole directory structure containing lib and sample
  157. directories which each essentially contain a suitable makefile.
  158. Calling `make' now should start a compile run which hopefully ends
  159. with a library being placed in the lib subdirectory.
  160. Now you can change in the samples subdirectory and call make to compile
  161. all samples, however currently not all will work on OS/2, so you might
  162. prefer to change into the directory of a specific sample
  163. (e.g. samples\minimal) and call make there to just build this one example.
  164. Essentially, each sample that's not working indicates an area, where help
  165. in porting wxWidgets to OS/2 would be appreciated.
  166. Finally, you can run `make install' which should install wxWidgets to
  167. the desired place.
  168. Note that we also install the wx-config script which wants to help you
  169. compiling your own applications, e.g. `wx-config --cxxflags` will emit the
  170. flags that are needed for compiling source code which includes wxWidgets
  171. headers, `wx-config --libs` will emit the flags needed for linking against
  172. wxWidgets (wx-config is assuming you are calling it from a unix-like shell!).
  173. For building a DLL, the only supported way currently is to first build the
  174. static library and then use Andrew Zabolotny's dllar.cmd. However, this
  175. works quite nicely.
  176. Finally, if you also want to build a different port, e.g. wxGTK, you
  177. essentially have to use the procedure described above, the only difference
  178. being that you have to pass a switch to configure indicating which port
  179. to build. If you do not do this in a separate build directory (e.g.
  180. \wxWidgets-2.8.0\build\gtk), you'll have to do a `make clean' first.
  181. The magical switches that have to be passed to configure for the various
  182. ports are --with-gtk (wxGTK), --with-motif (wxMotif), --with-x11 (wxX11),
  183. and --disable-gui (wxBase). Note that contrary to the native, PM based
  184. OS/2 port, all of those ports work slightly better with POSIX/2's cExt
  185. library. If include and library path include the suitable paths, -lcExt
  186. is automatically appended to the linker flags by the configure script.