source: trunk/readme.txt@ 77

Last change on this file since 77 was 35, checked in by umoeller, 25 years ago

Added XML.

  • Property svn:eol-style set to CRLF
  • Property svn:keywords set to Author Date Id Revision
File size: 7.2 KB
RevLine 
[21]1XWP Helpers 0.9.7 README
[7]2(W) Ulrich M”ller, October 26, 2000
[21]3Last updated January 6, 2001, Ulrich M”ller
[7]4
5
60. CONTENTS OF THIS FILE
7========================
8
9 1. LICENSE, COPYRIGHT, DISCLAIMER
10 2. INTRODUCTION
11 3. CREATING CODE DOCUMENTATION
12 4. COMPILING
13 5. INCLUDING HEADER FILES
14
15
161. LICENSE, COPYRIGHT, DISCLAIMER
17=================================
18
[35]19 Copyright (C) 1997-2001 Ulrich M”ller,
[7]20 Christian Langanke,
21 and others (see the individual source files).
22
[35]23 Most of this library is published under the GNU General Public Licence.
24 You can redistribute it and/or modify those parts under the terms of the
25 GNU General Public License as contained in the file COPYING in the
26 main directory.
[7]27
[35]28 Parts of this library are published under MIT licence. See the
29 COPYING.MIT file in the main directory.
30
31 See the individual source files for what licence applies.
32
[7]33 This program is distributed in the hope that it will be useful,
34 but WITHOUT ANY WARRANTY; without even the implied warranty of
35 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
36
37
382. INTRODUCTION
39===============
40
41 Welcome to the XWorkplace Helpers.
42
43 This CVS archive is intended to support OS/2 developers with any
44 code they might need writing OS/2 programs.
45
46 The XWPHelpers are presently used in XWorkplace and WarpIN. They
47 started out from various code snippets I created for XFolder,
48 the predecessor of XWorkplace. I then isolated the code which could
49 be used independently and put that code into separate directories
50 in the WarpIN CVS repository (also at Netlabs).
51
52 At Warpstock Europe 2000 in Karlsruhe, I talked to a number of
53 developers and then decided that this should become an independent
54 Netlabs CVS archive so that other people can more easily contribute.
55
56 Even though the helpers are called "XWorkplace helpers", they
57 have nothing to do with WPS and SOM programming. They can help
58 any OS/2 programmer.
59
60 The XWPHelpers offer you frequently used code for writing all
61 sorts of OS/2 programs, including:
62
63 -- standard C code which is independent of the OS/2 platform;
64
65 -- OS/2-specific code which can be used in any OS/2 program
66 (text mode or PM);
67
68 -- PM-specific code which assists you in writing PM programs.
69
70 The XWPHelpers can be compiled with EMX/GCC or IBM VisualAge
71 C++ 3.08. They can be used with C or C++ programs.
72
73
74 Getting Sources from Netlabs CVS
75 --------------------------------
76
77 First set the CVS enviroment:
78 CVSROOT=:pserver:guest@www.netlabs.org:d:/netlabs.src/xwphelpers
79 USER=guest
80
81 Then, to check out the most current XWPHelpers sources, create
82 a subdirectory in your CVS root dir called "xwphelpers".
83
84 Do a "cvs login" with "readonly" as your password and do a
85 "cvs checkout ." from the "xwphelpers" subdirectory. Don't forget
86 the dot.
87
88 Alternatively, use the Netlabs Open Source Archive Client (NOSAC).
89 See http://www.netlabs.org/nosa for details.
90
91 In any case, I strongly recommend to create a file in $(HOME)
92 called ".cvsrc" and add "cvs -z9" in there to enable maximum
93 compression during transfers. This greatly speeds up things.
94
95
963. CREATING CODE DOCUMENTATION
97==============================
98
99 The XWPHelpers do not come with pre-made documentation. However,
100 you can automatically have documentation generated from the sources
101 using my "xdoc" utility, which resides in the main directory of
102 the helpers. (The source code for xdoc is in the WarpIN CVS
103 repository because it shares some C++ code with WarpIN.)
104
105 To have the code generated, call "createdoc.cmd" in the main
106 directory. This will call xdoc in turn with the proper parameters
107 and create a new "HTML" directory, from where you should start
108 with the "index.html" file.
109
110
1114. COMPILING
112============
113
114 Compiling is a bit tricky because the code and the makefiles
115 were designed to be independent of any single project. As a
116 result, I had to used environment variables in order to pass
117 parameters to the makefiles.
118
119 The most important environment variable is PROJECT_BASE_DIR.
120 This should point to the root directory of your own project.
121 In this directory, src\helpers\makefile expects a file called
122 "setup.in" which sets up more environment variables. You can
123 take the one from the XWPHelpers makefile as a template.
124
[16]125 Here's an example: Say you have a CVS root directory of
126 "C:\cvs" on your system. The XWPHelpers reside in
127 "C:\cvs\xwphelpers". Your own project resides in
128 "C:\cvs\myproject" (plus subdirectories). So set
129 PROJECT_BASE_DIR to "C:\cvs\myproject" and put setup.in
130 in that directory.
131
132 Note that the XWPHelpers also expect a "setup.h" header
133 file to be somewhere on your INCLUDE path. See remarks
134 below.
135
[7]136 See the top of src\helpers\makefile for additional variables.
137
138 Of course, nothing stops you from writing your own makefile
[21]139 if you find all this too complicated. However, if you choose
[7]140 to use my makefile from within your own project, you can
141 then simply change to the src\helpers directory and start a
142 second nmake from your own makefile like this:
143
144 @cd xxx\src\helpers
145 nmake -nologo "PROJECT_BASE_DIR=C:\myproject" "MAINMAKERUNNING=YES"
146 @cd olddir
147
148
1495. INCLUDING HEADER FILES
150=========================
151
152 The "include policy" of the helpers is that the "include"
153 directory in the helpers source tree should be part of your
154 include path. This way you can include helper headers in
155 your own project code using
156
157 #include "helpers\header.h"
158
159 so that the helpers headers won't interfere with your own
160 headers.
161
[13]162 Note that all the helpers C code includes their own include
163 files this way. As a result, the XWPHelpers "include"
164 directory must be in your include path, or this won't
165 compile.
[7]166
[21]167 I have a "flat" include policy, meaning that include files
168 may not include other files. Instead, #include's may only
169 occur in C files. This makes makefile dependencies easier
170 to maintain.
171
[13]172 Besides, the helpers C code expects a file called "setup.h"
[16]173 in your include path somewhere. This is included by _all_
[13]174 the C files so you can (re)define certain macros there.
[16]175 XWorkplace and WarpIN both have such a header file in their
176 respective "include" directories.
[7]177
[16]178 With V0.9.7, many function prototypes have been changed in
179 the helpers headers to allow exporting them in a DLL.
180 (This was necessary for creating XWorkplace plugin DLLs.)
181 As a result, you now MUST define XWPENTRY in your setup.h
182 to contain the linkage for the helpers functions. This
183 can look like this:
[13]184
[16]185 #ifdef __EMX__
186 // with EMX, do nothing; EMX always uses _System linkage
187 #define XWPENTRY
188 #elif defined (__IBMCPP__) || defined (__IBMC__)
189 // with VAC, use _Optlink; that's faster than _System
190 #define XWPENTRY _Optlink
[21]191 // or: #define XWPENTRY _System
[16]192 #endif
193
194
Note: See TracBrowser for help on using the repository browser.