| [383] | 1 | NewView and libraries - HOWTO
|
|---|
| 2 | -----------------------------
|
|---|
| 3 |
|
|---|
| 4 | Copyright 2003-2006 Aaron Lawrence
|
|---|
| 5 | Copyright 2006-2017 Ronald Brill
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 | The major parts of the code are developed in SpeedSoft Sibyl.
|
|---|
| 9 |
|
|---|
| 10 | Important 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 |
|
|---|
| 20 | The whole dev environment uses hardcoded paths at some places. Because of this
|
|---|
| 21 | you have to use NetDrive to place the code inside the directory
|
|---|
| 22 |
|
|---|
| 23 | P:\newview_dev
|
|---|
| 24 |
|
|---|
| 25 | Your 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 |
|
|---|
| 41 | Building
|
|---|
| 42 | --------
|
|---|
| 43 |
|
|---|
| 44 | 1. 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 |
|
|---|
| 55 | 2. 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 |
|
|---|
| 59 | 3. 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 |
|
|---|
| 71 | 4. 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 |
|
|---|
| 97 | TODO
|
|---|
| 98 |
|
|---|
| 99 | 2. Unzip all files.
|
|---|
| 100 |
|
|---|
| 101 |
|
|---|
| 102 | 3. Adjust directories in the .spr (Sibyl project) files.
|
|---|
| 103 |
|
|---|
| 104 | I 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 |
|
|---|
| 106 | Adjust the unit directories in each of the .spr files to match the output directories so that dependencies can be found.
|
|---|
| 107 |
|
|---|
| 108 | You can do these adjustments either manually with a text editor or by loading the project files into the Sibyl IDE.
|
|---|
| 109 |
|
|---|
| 110 | OutDir=D:\temp\newview
|
|---|
| 111 | - this is where the EXE, DLL and SPU files go.
|
|---|
| 112 |
|
|---|
| 113 | LibDir=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 |
|
|---|
| 116 | LibSrcDir=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 |
|
|---|
| 119 | 5. Run makelibs.cmd
|
|---|
| 120 |
|
|---|
| 121 | This should build the Sibyl, Library and Components directories. Unfortunately, NewView itself cannot be compiled from the command line due to bugs in Sibyl.
|
|---|
| 122 |
|
|---|
| 123 | The Library and Components directories could alternatively be loaded into the IDE and compiled if you want.
|
|---|
| 124 |
|
|---|
| 125 | 6. Install Components into Sibyl IDE
|
|---|
| 126 |
|
|---|
| 127 | Before 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 |
|
|---|
| 129 | Use the Component - Install menu. Find the .spu file in question and click OK.
|
|---|
| 130 |
|
|---|
| 131 | When 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 |
|
|---|
| 133 | The 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 |
|
|---|
| 150 | Yes, this is extremely tedious, and no there is no short cut as far as I know.
|
|---|
| 151 |
|
|---|
| 152 | Other components can be installed or not as you see fit.
|
|---|
| 153 |
|
|---|
| 154 | 7. Open the NewView project
|
|---|
| 155 |
|
|---|
| 156 | Open Newview in the Sibyl IDE, and you should now be able to compile it and change it.
|
|---|
| 157 |
|
|---|
| 158 | Conventionally, 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 |
|
|---|
| 160 | As for all useful Sibyl projects, optimisation CANNOT be used as it produces incorrect results.
|
|---|
| 161 |
|
|---|
| 162 | HelpMgr DLL
|
|---|
| 163 | -----------
|
|---|
| 164 |
|
|---|
| 165 | The Watcom C makefile for HelpMgr will build hlpmgr2.dll by default.
|
|---|
| 166 |
|
|---|
| 167 | You have to tell it to build helpmgr.dll instead, as makeall.cmd does, by typing wmake helpmgr.dll.
|
|---|
| 168 |
|
|---|
| 169 | helpmgr.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 |
|
|---|
| 171 | Building 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 |
|
|---|
| 173 | Install EXE
|
|---|
| 174 | -----------
|
|---|
| 175 |
|
|---|
| 176 | This is another Sibyl project that can be opened in the IDE and compiled.
|
|---|
| 177 |
|
|---|
| 178 | I expect there should be little need to change this in the future.
|
|---|
| 179 |
|
|---|
| 180 | Building an Install zip
|
|---|
| 181 | -----------------------
|
|---|
| 182 |
|
|---|
| 183 | distr.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 |
|
|---|
| 185 | It 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 |
|
|---|
| 193 | Things to do before releasing: see VersionUnit.pas.
|
|---|
| 194 |
|
|---|
| 195 | Note: convention for ZIP files is
|
|---|
| 196 | NewViewA_B_C.zip
|
|---|
| 197 | for version A.B.C.
|
|---|
| 198 |
|
|---|
| 199 | Underscores are more compatible than dots for certain broken bits of OS/2.
|
|---|
| 200 |
|
|---|
| 201 | There is a template for uploading NewView zips to Hobbes.nmsu.edu
|
|---|
| 202 |
|
|---|
| 203 | Help File
|
|---|
| 204 | ---------
|
|---|
| 205 |
|
|---|
| 206 | The 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 |
|
|---|
| 208 | Bug/Todo List
|
|---|
| 209 | -------------
|
|---|
| 210 |
|
|---|
| 211 | TODO
|
|---|
| 212 |
|
|---|
| 213 | You can find a list in versionunit.pas
|
|---|
| 214 | There are also some bugs in the ecomstation bugtracker under newview, but I think they are all duplicated here.
|
|---|
| 215 |
|
|---|