source: trunk/howto.txt@ 462

Last change on this file since 462 was 462, checked in by ataylor, 3 years ago

Add AE build instructions

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