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
RevLine 
[413]1Sibyl Libraries & Applications - HOWTO
2======================================
[383]3
4Copyright 2003-2006 Aaron Lawrence
[413]5Copyright 2006-2019 Ronald Brill
[475]6Copyright 2019-2023 Alex Taylor
[383]7
8
9The major parts of the code are developed in SpeedSoft Sibyl.
10
[475]11*Important Note*: This setup will use these updated Sibyl libraries instead
[413]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
[475]14libraries, for example some components depend on parts of the SPCC being
15changed from Private to Protected. (There were apparently problems with
[413]16Sibyl Fixpack 4 and so it is not used, although some of the bug fixes from
17FP4 are included.)
[383]18
19
[413]20Your directory structure should look like
[383]21
[413]22 <top>
[462]23 ae source code for the AE program
[413]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++.
[475]29 It generates a DLL containing both 16 and 32 bit
[413]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
[383]37
38
[413]39Required Tools
40--------------
[383]41
[413]42 - Speedsoft Sibyl (FP 3)
[383]43
[413]44 Make sure Sibyl (FP 3) is installed and working.
45 You should be able to run spc20, the Sibyl command line compiler.
[383]46
[413]47 - OpenWatcom 1.5
[383]48
[413]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.
[383]52
[413]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
[383]602. Adjust directories in the .spr (Sibyl project) files.
61
[413]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
[475]65 working project files from them.
[383]66
[413]67 From the top-level directory, run `project-setup.cmd`. This will create
68 the .spr files in each directory.
[383]69
[413]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
[475]73 with the full path of your working copy's top level directory.
[383]74
[462]75 ae\ae.spr.def --> ae\ae.spr
76
[413]77 Components\Components.spr.def --> Components\Components.spr
[383]78
[413]79 ConfigApps\ConfigApps.spr.def --> ConfigApps\ConfigApps.spr
[383]80
[413]81 installer\NewViewInstall.spr.def --> installer\NewViewInstall.spr
[383]82
[413]83 Library\ACLTest.spr.def --> Library\acl_build.spr
84 Library\acl_build.spr.def --> Library\acl_build.spr
[383]85
[413]86 NewView\NewView.spr.def --> NewView\NewView.spr
87 NewView\viewstub.spr.def --> NewView\viewstub.spr
[383]88
[413]89 unittests\NewViewTests.spr.def --> unittests\NewViewTests.spr
[383]90
[413]913. Open a command line window and do the following:
[383]92
[413]93 Change to directory `Sibyl`.
94 Execute `makeall.cmd`
[383]95
[413]96 Change to directory `Library'.
97 Execute `makeall.cmd`
[383]98
[413]99 Change to directory `Components`.
100 Execute `makeall.cmd`
[383]101
102
[475]103Conventionally, I compile the libraries (Sibyl, Library, Components) with
104debug information. You can then turn debugging on or off when compiling
[413]105NewView itself; if debugging is off, the library debug info will be discarded
106at link stage.
[383]107
[413]108As for all useful Sibyl projects, optimisation CANNOT be used as it produces
109incorrect results.
[383]110
[413]111Build notes for the individual projects are below.
[383]112
113
[413]114Building Components
115-------------------
[383]116
[413]117The Components project (`Components\Components.spr`) contains the updated
[475]118Sibyl controls used by NewView and other projects (including custom ones
[413]119such as the rich text viewer).
[383]120
[475]121For the Sibyl IDE to be able to use these classes, they are compiled into
[413]122`CompLib.DLL`. When building applications like NewView, however, the object
123files will be linked statically into the application.
[383]124
[413]125The `makeall.cmd` script in the `Components` directory will rebuild all the
[475]126object files (and the test app, `Components.EXE`. To rebuild `CompLib.DLL`,
[413]127load `Components.spr` in the Sibyl IDE and rebuild it.
[383]128
[475]129*Note:* Because the IDE requires `CompLib.DLL` to actually load a project
[413]130using those classes, and the Components project includes a demo form with the
[475]131classes on it, this rather unintuitively means that you can't build
132`CompLib.DLL` unless a previously-built `CompLib.DLL` already exists. For
[413]133this reason, a prebuilt version with all the new/modified classes is included
[475]134in this repository.
[383]135
136
[413]137Building NewView
138----------------
[383]139
[413]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.
[475]147When doing this, make sure that the directories `build\newview` and
148`build\newview_stub` exist and are writable.
[413]149
150To build NewView.EXE from the GUI, open the project file `NewView\NewView.spr`
[475]151from the Sibyl IDE. You should be able to build it from the Project menu.
[413]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
[475]160You can build ViewStub.EXE from the GUI in the same way as NewView.EXE, by
[413]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
[475]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
[413]173`wmake helpmgr.dll` (which `makeall.cmd` does).
174
[475]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
[413]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
[475]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,
[413]189you can simply run `wmake` directly.
190
191
192### Help & Language Files ###
193
[475]194The NewView help file was is in .ipf format and can be compiled with the
[413]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
[475]200language files. Each language lives in a subdirectory with its own
[413]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
[475]209if you need distribute it as part of a NewView installation ZIP file.
[413]210
[475]211Make sure steps 1-3 above have been completed.
212
213Also make sure the directory `build\installer` exists and is writable.
214
[413]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
[475]248Also make sure the directory `build\ConfigApps` exists.
[413]249
250Open the project file `ConfigApps\ConfigApps.spr` in the Sibyl IDE. You should
[475]251be able to build it from the Project menu. ConfigApps.EXE will be placed in
[413]252the `build\ConfigApps` directory.
253
254
[462]255Building AE
256-------------------
[413]257
[462]258Make sure steps 1-3 above have been completed.
[413]259
[475]260Also make sure the directory `build\AE` exists.
[413]261
[475]262Open the project file `ae\ae.spr` in the Sibyl IDE. You should be able to build
[462]263it from the Project menu. AE.EXE will be placed in the `build\AE` directory.
[413]264
[462]265
266
267
268
[413]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
[475]275--
[413]276
[383]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.