source: trunk/howto.txt@ 401

Last change on this file since 401 was 383, checked in by RBRi, 10 years ago

initial description how to build

  • Property svn:eol-style set to native
File size: 7.2 KB
Line 
1NewView and libraries - HOWTO
2-----------------------------
3
4Copyright 2003-2006 Aaron Lawrence
5Copyright 2006-2017 Ronald Brill
6
7
8The major parts of the code are developed in SpeedSoft Sibyl.
9
10Important Note:
11 This setup will use these updated Sibyl libraries instead of
12 the ones installed on your development PC. I (Aaron) have made many bug fixes
13 and a few enhancements. Some things will not build with the original
14 Sibyl Fixpack 3 libraries, for example some components depend on parts
15 of the SPCC being changed from Private to Protected. I had problems
16 with Sibyl Fixpack 4 and have not used it although some of the bug
17 fixes from FP4 are included.
18
19
20The whole dev environment uses hardcoded paths at some places. Because of this
21you have to use NetDrive to place the code inside the directory
22
23 P:\newview_dev
24
25Your directory structure should look like
26
27 P:\newview_dev
28 build
29 Components Sibyl components used by NewView
30 hlpmgr replacement for OS/2 HelpMgr.dll
31 The HelpMgr DLL is compiled with Watcom C++.
32 It generates a DLL containing both 16 and 32 bit entry points,
33 like the original HelpMgr.dll.
34 See http://www.openwatcom.org.
35 installer NewView install program
36 Library library functions used by NewView itself and the components
37 NewView the NewView source code
38 Sibyl updated Sibyl libraries (based on fixpack 3)
39 unittests
40
41Building
42--------
43
441. Required Tools
45
46 Sibyl (FP 3)
47 Make sure Sibyl (FP 3) is installed and working.
48 You should be able to run spc20, the Sibyl command line compiler.
49
50 OpenWatcom 1.5
51 If you want to work on the HelpMgr.dll, make sure Watcom C/C++ is
52 installed and working. You should be able to run wmake, the
53 Watcom make utility.
54
552. Adjust directories in the .spr (Sibyl project) files.
56 Sibyl uses absolute paths in its project setup files. Fix the location of your
57 Sibyl installation.
58
593. Open a command line window and make P:\newview_dev the current directory
60 execute env.cmd
61
62 change to directory Sibl
63 execute makeall.cmd
64
65 change to directory library
66 execute makeall.cmd
67
68 change to directory Components
69 execute makeall.cmd
70
714. Open the NewView project from the Sibyl IDE
72 Open Newview in the Sibyl IDE, and you should now be able to compile it and change it.
73 Conventionally, I compile the libraries (Sibyl, Library, Components) with debug information.
74 You can then turn debugging on or off when compiling NewView itself; if debugging is off,
75 the library debug info will be discarded at link stage.
76
77 As for all useful Sibyl projects, optimisation CANNOT be used as it produces incorrect results.
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97TODO
98
992. Unzip all files.
100
101
1023. Adjust directories in the .spr (Sibyl project) files.
103
104I 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.
105
106Adjust the unit directories in each of the .spr files to match the output directories so that dependencies can be found.
107
108You can do these adjustments either manually with a text editor or by loading the project files into the Sibyl IDE.
109
110OutDir=D:\temp\newview
111- this is where the EXE, DLL and SPU files go.
112
113LibDir=D:\Temp\sibyl;D:\Temp\Library;D:\Temp\Components
114- this is where Sibyl looks for SPU files when compiling (in addition to OutDir)
115
116LibSrcDir=W:\sibyl\rtl;W:\sibyl\spcc;W:\components;W:\library
117- this is where Sibyl finds source files when debugging (in addition to the project dir)
118
1195. Run makelibs.cmd
120
121This should build the Sibyl, Library and Components directories. Unfortunately, NewView itself cannot be compiled from the command line due to bugs in Sibyl.
122
123The Library and Components directories could alternatively be loaded into the IDE and compiled if you want.
124
1256. Install Components into Sibyl IDE
126
127Before 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.
128
129Use the Component - Install menu. Find the .spu file in question and click OK.
130
131When 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.
132
133The components are:
134 In individual files (same name, without the T on the front):
135 TCustomListBox
136 TOutline2
137 TCoolbar2
138 TSplitBar
139 TMultiColumnListBox
140
141 In CustomFileControls unit:
142 TCustomDriveComboBox
143 TCustomDirectoryListBox
144 TCustomFilterComboBox
145
146 In ColorWheel unit:
147 TColorWheel
148 TValueBar
149
150Yes, this is extremely tedious, and no there is no short cut as far as I know.
151
152Other components can be installed or not as you see fit.
153
1547. Open the NewView project
155
156Open Newview in the Sibyl IDE, and you should now be able to compile it and change it.
157
158Conventionally, 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.
159
160As for all useful Sibyl projects, optimisation CANNOT be used as it produces incorrect results.
161
162HelpMgr DLL
163-----------
164
165The Watcom C makefile for HelpMgr will build hlpmgr2.dll by default.
166
167You have to tell it to build helpmgr.dll instead, as makeall.cmd does, by typing wmake helpmgr.dll.
168
169helpmgr.dll is normally in use by the WPS (WorkPlace Shell, the desktop) so to put it into use, you must either use a DLL-unlocking utility like replmod (on Hobbes.nmsu.edu) or boot to a command prompt, and replace the dll in c:\os2\dll.
170
171Building hlpmgr2 is easier for debugging - you can then use the dllrname utility to modify existing executeables to use hlpmgr2 instead of helpmgr and therefore, you don't need to reboot to try your changes.
172
173Install EXE
174-----------
175
176This is another Sibyl project that can be opened in the IDE and compiled.
177
178I expect there should be little need to change this in the future.
179
180Building an Install zip
181-----------------------
182
183distr.cmd in the NewView directory pulls everything together into a zip file that can be released. It runs E on a couple of files to remind me to update them :)
184
185It moves files around rather confusingly, but basically it just pulls together these files:
186 newview.exe
187 helpmgr.dll
188 install.exe
189 readme.txt
190 changes.txt
191 gpl.txt
192
193Things to do before releasing: see VersionUnit.pas.
194
195Note: convention for ZIP files is
196NewViewA_B_C.zip
197for version A.B.C.
198
199Underscores are more compatible than dots for certain broken bits of OS/2.
200
201There is a template for uploading NewView zips to Hobbes.nmsu.edu
202
203Help File
204---------
205
206The NewView help file was written with VyperHelp and the source for this is the NewView.vyd file. This is then exported to .ipf and can be compiled with the OS/2 IPFC compiler. This compilation is done in the distr.cmd file.
207
208Bug/Todo List
209-------------
210
211TODO
212
213You can find a list in versionunit.pas
214There are also some bugs in the ecomstation bugtracker under newview, but I think they are all duplicated here.
215
Note: See TracBrowser for help on using the repository browser.