source: trunk/howto.txt@ 478

Last change on this file since 478 was 476, checked in by ataylor, 2 years ago

Various fixes to i18n files build.

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