source: trunk/howto.txt@ 433

Last change on this file since 433 was 413, checked in by ataylor, 7 years ago

Revamp of build system, and added ConfigApps to repository.

  • Property svn:eol-style set to native
File size: 12.1 KB
Line 
1Sibyl Libraries & Applications - HOWTO
2======================================
3
4Copyright 2003-2006 Aaron Lawrence
5Copyright 2006-2019 Ronald Brill
6
7
8The major parts of the code are developed in SpeedSoft Sibyl.
9
10*Important Note*: This setup will use these updated Sibyl libraries instead
11of the ones installed with Sibyl. Aaron has made many bug fixes and a few
12enhancements. Some things will not build with the original Sibyl Fixpack 3
13libraries, for example some components depend on parts of the SPCC being
14changed from Private to Protected. (There were apparently problems with
15Sibyl Fixpack 4 and so it is not used, although some of the bug fixes from
16FP4 are included.)
17
18
19Your directory structure should look like
20
21 <top>
22 build output directory for built files
23 ConfigApps source code for the ConfigApps program
24 Components Sibyl components used by these applications
25 hlpmgr replacement for OS/2 HelpMgr.dll
26 The HelpMgr DLL is compiled with Watcom C++.
27 It generates a DLL containing both 16 and 32 bit
28 entry points,like the original HelpMgr.dll.
29 See http://www.openwatcom.org.
30 installer install program used by NewView
31 Library library functions used by both applications and components
32 NewView the NewView source code
33 Sibyl updated Sibyl libraries (based on fixpack 3)
34 unittests Some tests used by NewView
35
36
37Required Tools
38--------------
39
40 - Speedsoft Sibyl (FP 3)
41
42 Make sure Sibyl (FP 3) is installed and working.
43 You should be able to run spc20, the Sibyl command line compiler.
44
45 - OpenWatcom 1.5
46
47 If you want to work on the HelpMgr.dll, make sure Watcom C/C++ is
48 installed and working. You should be able to run wmake, the
49 Watcom make utility.
50
51
52Setting Up the Build
53--------------------
54
551. Copy `env.inc.sample` to `env.inc` and adjust the definitions as indicated
56 in the file.
57
582. Adjust directories in the .spr (Sibyl project) files.
59
60 Sibyl unfortunately requires absolute paths in several places in its project
61 setup files. To avoid committing working-copy-specific configuration to the
62 repository, templates are provided, along with a script to generate the
63 working project files from them.
64
65 From the top-level directory, run `project-setup.cmd`. This will create
66 the .spr files in each directory.
67
68 Alternatively, you can also generate the project files manually yourself.
69 This can be done by copying each of the following files to the indicated
70 filename, and then replacing every instance of `@NV_DEV@` in the new files
71 with the full path of your working copy's top level directory.
72
73 Components\Components.spr.def --> Components\Components.spr
74
75 ConfigApps\ConfigApps.spr.def --> ConfigApps\ConfigApps.spr
76
77 installer\NewViewInstall.spr.def --> installer\NewViewInstall.spr
78
79 Library\ACLTest.spr.def --> Library\acl_build.spr
80 Library\acl_build.spr.def --> Library\acl_build.spr
81
82 NewView\NewView.spr.def --> NewView\NewView.spr
83 NewView\viewstub.spr.def --> NewView\viewstub.spr
84
85 unittests\NewViewTests.spr.def --> unittests\NewViewTests.spr
86
873. Open a command line window and do the following:
88
89 Change to directory `Sibyl`.
90 Execute `makeall.cmd`
91
92 Change to directory `Library'.
93 Execute `makeall.cmd`
94
95 Change to directory `Components`.
96 Execute `makeall.cmd`
97
98
99Conventionally, I compile the libraries (Sibyl, Library, Components) with
100debug information. You can then turn debugging on or off when compiling
101NewView itself; if debugging is off, the library debug info will be discarded
102at link stage.
103
104As for all useful Sibyl projects, optimisation CANNOT be used as it produces
105incorrect results.
106
107Build notes for the individual projects are below.
108
109
110Building Components
111-------------------
112
113The Components project (`Components\Components.spr`) contains the updated
114Sibyl controls used by NewView and other projects (including custom ones
115such as the rich text viewer).
116
117For the Sibyl IDE to be able to use these classes, they are compiled into
118`CompLib.DLL`. When building applications like NewView, however, the object
119files will be linked statically into the application.
120
121The `makeall.cmd` script in the `Components` directory will rebuild all the
122object files (and the test app, `Components.EXE`. To rebuild `CompLib.DLL`,
123load `Components.spr` in the Sibyl IDE and rebuild it.
124
125*Note:* Because the IDE requires `CompLib.DLL` to actually load a project
126using those classes, and the Components project includes a demo form with the
127classes on it, this rather unintuitively means that you can't build
128`CompLib.DLL` unless a previously-built `CompLib.DLL` already exists. For
129this reason, a prebuilt version with all the new/modified classes is included
130in this repository.
131
132
133Building NewView
134----------------
135
136Make sure steps 1-3 above have been completed.
137
138You should be able to build NewView.EXE and ViewStub.EXE with debug symbols
139from a command line by running `makeall.cmd` in the `NewView` directory. Do
140not do this for a release version.
141
142To build a release version, you should build the executables from the GUI.
143When doing this, make sure that the directories `build\newview` and
144`build\newview_stub` exist and are writable.
145
146To build NewView.EXE from the GUI, open the project file `NewView\NewView.spr`
147from the Sibyl IDE. You should be able to build it from the Project menu.
148NewView.EXE will be placed in the `build\newview` directory.
149
150*Note:* If you get errors about classes not being found, or CompLib.DLL
151unable to be loaded, make sure that CompLib.DLL exists in the directory
152indicated in `NewView.spr` - this _must_ be the version of CompLib.DLL from
153this project, and _not_ the default one shipped with Sibyl. See the section
154above for details.
155
156You can build ViewStub.EXE from the GUI in the same way as NewView.EXE, by
157opening `NewView\ViewStub.spr` in the IDE and building it from the Project
158menu. ViewStub.EXE will be placed in `build\newview_stub`.
159
160
161### HelpMgr DLL ###
162
163Go to the `hlpmgr` directory and run `makeall.cmd`; helpmgr.dll will be placed
164in the `build\hlpmgr` directory.
165
166Alternatively, if OpenWatcom is available in PATH, INCLUDE, and LIB, you can
167run `wmake` directly. However, note that the Watcom C makefile for HelpMgr
168will build hlpmgr2.dll by default. To build helpmgr.dll instead, build with
169`wmake helpmgr.dll` (which `makeall.cmd` does).
170
171helpmgr.dll is normally in use by the WPS (WorkPlace Shell, the desktop) so to
172put it into use, you must either use a DLL-unlocking utility like replmod (on
173Hobbes.nmsu.edu) or boot to a command prompt, and replace the dll in
174`c:\os2\dll`.
175
176Building hlpmgr2 is easier for debugging - you can then use the dllrname
177utility to modify existing executeables to use hlpmgr2 instead of helpmgr and
178therefore, you don't need to reboot to try your changes.
179
180
181### NewView DLL ###
182
183Go to the `newview_dll` directory and run `makeall.cmd`. Or, if OpenWatcom
184and PMPrintF are already installed and available in PATH, INCLUDE, and LIB,
185you can simply run `wmake` directly.
186
187
188### Help & Language Files ###
189
190The NewView help file was is in .ipf format and can be compiled with the
191OS/2 IPFC compiler. The language files use Aaron's language support module
192(see `NewView\Design.txt` for technical information) and are simply structured
193text files.
194
195Run `makeall.cmd` from the `i18n` directory to build/copy all the help and
196language files. Each language lives in a subdirectory with its own
197`makeall.cmd` that gets called by the parent script.
198
199
200### Install EXE ###
201
202This is another Sibyl project that can be opened in the IDE and compiled. It
203is the old standalone installer for NewView. The project will create the
204executable NewViewInstall.EXE - you are recommended to rename it to install.exe
205if you need distribute it as part of a NewView installation ZIP file.
206
207The install executable requires Aaron's renmodul.dll, a copy of which is in the
208`installer` directory (the sources are not included here, but are available on
209Hobbes and elsewhere).
210
211I expect there should be little need to change this in the future.
212
213
214### Building an Installation ZIP File ###
215
216Pull together these files into a ZIP:
217
218 newview.exe (from build\newview)
219 viewstub.exe (from build\newview_stub)
220 newview.dll (from build\newview_dll)
221 helpmgr.dll (from build\hlpmgr)
222 install.exe (from build\installer)
223 renmodul.dll (from installer)
224 gpl.txt (from newview)
225 (language files) (from build\newview_i18n)
226
227Things to do before releasing: see `NewView\VersionUnit.pas`.
228
229Note: convention for ZIP files is `NewViewA_B_C.zip` for version A.B.C.
230
231Underscores are more compatible than dots for certain broken bits of OS/2.
232
233There is a template for uploading NewView ZIPs to Hobbes.nmsu.edu
234
235
236Building ConfigApps
237-------------------
238
239Make sure steps 1-3 above have been completed.
240
241Also make sure the directory `build\ConfigApps` exists.
242
243Open the project file `ConfigApps\ConfigApps.spr` in the Sibyl IDE. You should
244be able to build it from the Project menu. ConfigApps.EXE will be placed in
245the `build\ConfigApps` directory.
246
247
248
249
250
251
252Old Notes from Aaron
253--------------------
254
255The following are left over pieces from Aaron's original build notes.
256They should not be needed anymore, but are included for posterity.
257
258--
259
2602. Unzip all files.
261
262
2633. Adjust directories in the .spr (Sibyl project) files.
264
265I have them set up so that they output the EXE, DLL and SPU (Compiled unit) files into subdirectories under D:\Temp\. They could equally well all go to the same directory.
266
267Adjust the unit directories in each of the .spr files to match the output directories so that dependencies can be found.
268
269You can do these adjustments either manually with a text editor or by loading the project files into the Sibyl IDE.
270
271OutDir=D:\temp\newview
272- this is where the EXE, DLL and SPU files go.
273
274LibDir=D:\Temp\sibyl;D:\Temp\Library;D:\Temp\Components
275- this is where Sibyl looks for SPU files when compiling (in addition to OutDir)
276
277LibSrcDir=W:\sibyl\rtl;W:\sibyl\spcc;W:\components;W:\library
278- this is where Sibyl finds source files when debugging (in addition to the project dir)
279
2805. Run makelibs.cmd
281
282This should build the Sibyl, Library and Components directories. Unfortunately, NewView itself cannot be compiled from the command line due to bugs in Sibyl.
283
284The Library and Components directories could alternatively be loaded into the IDE and compiled if you want.
285
2866. Install Components into Sibyl IDE
287
288Before you can open the NewView project in the IDE (which is not essential, but likely to be helpful :), you will need to install each component used by NewView into Sibyl, so the the IDE can find them.
289
290Use the Component - Install menu. Find the .spu file in question and click OK.
291
292When installing components, Sibyl must be able to find all the SPUs of already installed components. This is the only time that the component directory setting matters. So make sure you update it to the output directory for the Components project.
293
294The components are:
295 In individual files (same name, without the T on the front):
296 TCustomListBox
297 TOutline2
298 TCoolbar2
299 TSplitBar
300 TMultiColumnListBox
301
302 In CustomFileControls unit:
303 TCustomDriveComboBox
304 TCustomDirectoryListBox
305 TCustomFilterComboBox
306
307 In ColorWheel unit:
308 TColorWheel
309 TValueBar
310
311Yes, this is extremely tedious, and no there is no short cut as far as I know.
312
313Other components can be installed or not as you see fit.
314
3157. Open the NewView project
316
317Open Newview in the Sibyl IDE, and you should now be able to compile it and change it.
318
319Conventionally, I compile the libraries (Sibyl, Library, Components) with debug information. You can then turn debugging on or off when compiling NewView itself; if debugging is off, the library debug info will be discarded at link stage.
320
321As for all useful Sibyl projects, optimisation CANNOT be used as it produces incorrect results.
322
323Bug/Todo List
324-------------
325
326TODO
327
328You can find a list in versionunit.pas
329There are also some bugs in the ecomstation bugtracker under newview, but I think they are all duplicated here.
330
Note: See TracBrowser for help on using the repository browser.