Changeset 413
- Timestamp:
- Feb 22, 2019, 1:44:06 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 32 added
- 11 deleted
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:ignore
set to
[Ee][Nn][Vv].[Ii][Nn][Cc]
-
Property svn:ignore
set to
-
trunk/Components/makeall.cmd
r15 r413 1 /* Rexx */2 3 1 /* ------------------------------------------------------------------------- */ 4 2 /* NewView - a new OS/2 Help Viewer */ 5 3 /* */ 6 4 /* Copyright 2003-2006 Aaron Lawrence (aaronl at consultant dot com) */ 7 /* Copyright 2006 Ronald Brill (rbri at rbri.org)*/5 /* Copyright 2006-2017 Ronald Brill (rbri at rbri.org) */ 8 6 /* */ 9 7 /* This software is released under the Gnu Public License */ … … 14 12 /* 3.) Compile */ 15 13 /* ------------------------------------------------------------------------- */ 14 Signal On NoValue 15 Signal On Error 16 Call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs' 17 Call SysLoadFuncs 18 19 Call SetLocal 20 nv_rc = SetUpPaths() 21 If nv_rc <> 0 Then Exit rc 22 23 nv_build_dir = Value('NV_BUILD',,'OS2ENVIRONMENT') 24 nv_rc = SysMkDir( nv_build_dir ) 16 25 17 26 18 nv_i18n_dir = directory() 19 20 nv_build_dir = value('NV_BUILD', , 'OS2ENVIRONMENT') 21 nv_rc = SysMkDir(nv_build_dir) 27 /* Project-specific section follows */ 22 28 23 29 nv_build_dir_components = nv_build_dir||'\components' 24 nv_rc = SysMkDir( nv_build_dir_components)30 nv_rc = SysMkDir( nv_build_dir_components ) 25 31 26 /* TODO dir cleanup */ 27 28 29 say 'Building Aaron''s Components...' 30 31 32 Say 'Building Aaron''s Components...' 32 33 'rcomp20 ControlsUtility.rc ' nv_build_dir_components 33 34 'rcomp20 DialogIcons.rc ' nv_build_dir_components 34 35 'rcomp20 FileImages.rc ' nv_build_dir_components 35 36 36 'spc20 components.spr' 37 37 38 Call EndLocal 39 Exit 0 40 41 42 /* -------------------------------------------------------------------------- * 43 * SetUpPaths * 44 * -------------------------------------------------------------------------- */ 45 SetUpPaths: PROCEDURE EXPOSE g. 46 g.!env_inc = Stream('..\env.inc', 'C', 'QUERY EXISTS') 47 g.!watcom = GetVar('WATCOM') 48 If g.!watcom == '' Then Do 49 Say '%WATCOM% environment variable is not set.' 50 Say 'Please set %WATCOM% to the location of your OpenWatcom installation.' 51 Return 1 52 End 53 g.!nv_dev = GetVar('NV_DEV') 54 If g.!nv_dev == '' Then Do 55 Say '%NV_DEV% environment variable is not set.' 56 Say 'Please set %NV_DEV% to the top-level path of the development tree.' 57 Return 1 58 End 59 '@SET NV_BUILD='g.!nv_dev'\build' 60 '@SET PATH=%WATCOM%\BINP;%WATCOM%\BINW;%NV_BUILD%\newview;%NV_BUILD%\newview_stub;%PATH%' 61 '@SET INCLUDE=%WATCOM%\H;%WATCOM%\H\OS2;' || GetVar('PMPRINTF_PATH') 62 '@SET LIB=%PMPRINTF_PATH%;' 63 '@SET HELP=%WATCOM%\BINP\HELP;%HELP%' 64 '@SET BOOKSHELF=%WATCOM%\BINP\HELP;%BOOKSHELF%' 65 '@SET BEGINLIBPATH=%WATCOM%\BINP\DLL;%BEGINLIBPATH%;' 66 Return 0 67 68 69 /* -------------------------------------------------------------------------- * 70 * GetVar * 71 * -------------------------------------------------------------------------- */ 72 GetVar: Procedure Expose g. 73 Parse Upper Arg env_var 74 val = Value( env_var,, 'OS2ENVIRONMENT') 75 If val == '' Then Do 76 if g.!env_inc <> '' Then Do 77 match.0 = 0 78 mstring = 'SET' env_var'=' 79 Call SysFileSearch mstring, g.!env_inc, 'match.' 80 If match.0 > 0 Then Do i = 1 to match.0 81 match.i = Translate( Strip( match.i )) 82 If Left( match.i, Length( mstring )) == mstring Then Do 83 Parse Var match.i '='val 84 Call Value env_var, val, 'OS2ENVIRONMENT' 85 Leave 86 End 87 End 88 End 89 End 90 Return val 91 92 93 /* -------------------------------------------------------------------------- * 94 * Condition Handlers * 95 * -------------------------------------------------------------------------- */ 96 NoValue: 97 Say 98 Call Lineout 'STDERR:', Right( sigl, 6 ) '+++' STRIP( SOURCELINE( sigl )) 99 Call Lineout 'STDERR:', Right( sigl, 6 ) '+++ Non-initialized variable.' 100 Say 101 Exit sigl 102 103 Error: 104 Say 105 Call Lineout 'STDERR:', '+++ Error:' Condition('D') 106 Say 107 Exit sigl 108 109 -
trunk/Library/makeall.cmd
r17 r413 1 /* Rexx */2 3 1 /* ------------------------------------------------------------------------- */ 4 2 /* NewView - a new OS/2 Help Viewer */ 5 3 /* */ 6 4 /* Copyright 2003-2006 Aaron Lawrence (aaronl at consultant dot com) */ 7 /* Copyright 2006 Ronald Brill (rbri at rbri.org)*/5 /* Copyright 2006-2017 Ronald Brill (rbri at rbri.org) */ 8 6 /* */ 9 7 /* This software is released under the Gnu Public License */ … … 14 12 /* 3.) Compile */ 15 13 /* ------------------------------------------------------------------------- */ 14 Signal On NoValue 15 Signal On Error 16 Call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs' 17 Call SysLoadFuncs 18 19 Call SetLocal 20 nv_rc = SetUpPaths() 21 If nv_rc <> 0 Then Exit rc 22 23 nv_build_dir = Value('NV_BUILD',,'OS2ENVIRONMENT') 24 nv_rc = SysMkDir( nv_build_dir ) 16 25 17 26 18 nv_build_dir = value('NV_BUILD', , 'OS2ENVIRONMENT') 19 nv_rc = SysMkDir(nv_build_dir) 27 /* Project-specific section follows */ 20 28 21 29 nv_build_dir_lib = nv_build_dir||'\library' 22 nv_rc = SysMkDir(nv_build_dir_lib) 23 24 /* TODO dir cleanup */ 25 30 nv_rc = SysMkDir( nv_build_dir_lib ) 26 31 27 32 /* create temp project file */ 28 33 sprFile = 'acl_build.spr' 29 34 30 if STREAM(sprFile,'C','QUERY EXISTS') <> "" 31 then do 32 say sprFile 'exists, deleting' 33 'erase ' sprFile 34 end 35 36 call lineout sprFile, '[Directories]' 37 call lineout sprFile, '' 38 call lineout sprFile, 'OutDir='||nv_build_dir_lib 39 call lineout sprFile, 'LibDir='||nv_build_dir||'\sibyl\lib' 40 call lineout sprFile, '' 41 call lineout sprFile, '[Project Files]' 42 call lineout sprFile, '' 43 call lineout sprFile, 'Primary=.\ACLLibrary.pas' 44 call lineout sprFile 45 46 say sprFile 'created' 35 If Stream( sprFile,'C','QUERY EXISTS') == '' Then Do 36 Call Lineout sprFile, '[Directories]' 37 Call Lineout sprFile, '' 38 Call Lineout sprFile, 'OutDir='||nv_build_dir_lib 39 Call Lineout sprFile, 'LibDir='||nv_build_dir||'\sibyl\lib' 40 Call Lineout sprFile, '' 41 Call Lineout sprFile, '[Project Files]' 42 Call Lineout sprFile, '' 43 Call Lineout sprFile, 'Primary=.\ACLLibrary.pas' 44 Call Lineout sprFile 45 Say sprFile 'created' 46 End 47 47 48 48 'spc20' sprFile 49 49 50 /* spc20 acllibrary.spr */ 50 Call EndLocal 51 Exit 0 51 52 53 54 /* -------------------------------------------------------------------------- * 55 * SetUpPaths * 56 * -------------------------------------------------------------------------- */ 57 SetUpPaths: PROCEDURE EXPOSE g. 58 g.!env_inc = Stream('..\env.inc', 'C', 'QUERY EXISTS') 59 g.!watcom = GetVar('WATCOM') 60 If g.!watcom == '' Then Do 61 Say '%WATCOM% environment variable is not set.' 62 Say 'Please set %WATCOM% to the location of your OpenWatcom installation.' 63 Return 1 64 End 65 g.!nv_dev = GetVar('NV_DEV') 66 If g.!nv_dev == '' Then Do 67 Say '%NV_DEV% environment variable is not set.' 68 Say 'Please set %NV_DEV% to the top-level path of the development tree.' 69 Return 1 70 End 71 '@SET NV_BUILD='g.!nv_dev'\build' 72 '@SET PATH=%WATCOM%\BINP;%WATCOM%\BINW;%NV_BUILD%\newview;%NV_BUILD%\newview_stub;%PATH%' 73 '@SET INCLUDE=%WATCOM%\H;%WATCOM%\H\OS2;%PMPRINTF_PATH%;' 74 '@SET HELP=%WATCOM%\BINP\HELP;%HELP%' 75 '@SET BOOKSHELF=%WATCOM%\BINP\HELP;%BOOKSHELF%' 76 '@SET BEGINLIBPATH=%WATCOM%\BINP\DLL;%BEGINLIBPATH%;' 77 Return 0 78 79 80 /* -------------------------------------------------------------------------- * 81 * GetVar * 82 * -------------------------------------------------------------------------- */ 83 GetVar: Procedure Expose g. 84 Parse Upper Arg env_var 85 val = Value( env_var,, 'OS2ENVIRONMENT') 86 If val == '' Then Do 87 if g.!env_inc <> '' Then Do 88 match.0 = 0 89 mstring = 'SET' env_var'=' 90 Call SysFileSearch mstring, g.!env_inc, 'match.' 91 If match.0 > 0 Then Do i = 1 to match.0 92 match.i = Translate( Strip( match.i )) 93 If Left( match.i, Length( mstring )) == mstring Then Do 94 Parse Var match.i '='val 95 Leave 96 End 97 End 98 End 99 End 100 Return val 101 102 103 /* -------------------------------------------------------------------------- * 104 * Condition Handlers * 105 * -------------------------------------------------------------------------- */ 106 NoValue: 107 Say 108 Call Lineout 'STDERR:', Right( sigl, 6 ) '+++' STRIP( SOURCELINE( sigl )) 109 Call Lineout 'STDERR:', Right( sigl, 6 ) '+++ Non-initialized variable.' 110 Say 111 Exit sigl 112 113 Error: 114 Say 115 Call Lineout 'STDERR:', '+++ Error:' Condition('D') 116 Say 117 Exit sigl 118 119 -
trunk/Sibyl/makeall.cmd
r21 r413 1 /* Rexx */2 3 1 /* ------------------------------------------------------------------------- */ 4 2 /* NewView - a new OS/2 Help Viewer */ 5 3 /* */ 6 4 /* Copyright 2003-2006 Aaron Lawrence (aaronl at consultant dot com) */ 7 /* Copyright 2006 Ronald Brill (rbri at rbri.org)*/5 /* Copyright 2006-2017 Ronald Brill (rbri at rbri.org) */ 8 6 /* */ 9 7 /* This software is released under the Gnu Public License */ … … 14 12 /* 3.) Compile */ 15 13 /* ------------------------------------------------------------------------- */ 14 Signal On NoValue 15 Signal On Error 16 Call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs' 17 Call SysLoadFuncs 18 19 Call SetLocal 20 nv_rc = SetUpPaths() 21 If nv_rc <> 0 Then Exit rc 22 23 nv_build_dir = Value('NV_BUILD',,'OS2ENVIRONMENT') 24 nv_rc = SysMkDir( nv_build_dir ) 16 25 17 26 18 nv_build_dir = value('NV_BUILD', , 'OS2ENVIRONMENT') 19 nv_rc = SysMkDir(nv_build_dir) 27 /* Project-specific section follows */ 20 28 21 29 nv_build_dir_sibyl = nv_build_dir||'\sibyl' … … 24 32 nv_build_dir_sibyl_lib = nv_build_dir_sibyl||'\lib' 25 33 nv_rc = SysMkDir(nv_build_dir_sibyl_lib) 26 27 /* TODO dir cleanup */28 29 34 30 35 'cd spcc' … … 35 40 'rcomp20 mmedia.rc ' nv_build_dir_sibyl_lib 36 41 'rcomp20 tabctrls.rc ' nv_build_dir_sibyl_lib 37 cd .. 42 'cd ..' 38 43 39 44 'cd addon' … … 59 64 'spc20.exe makeall.pas' nv_build_dir_sibyl_lib 'appexp rtl;spcc;addon;appexp; -B -t1 -L -D -O0 -$i+ -$W6-' 60 65 66 Call EndLocal 67 Exit 0 68 69 70 /* -------------------------------------------------------------------------- * 71 * SetUpPaths * 72 * -------------------------------------------------------------------------- */ 73 SetUpPaths: PROCEDURE EXPOSE g. 74 g.!env_inc = Stream('..\env.inc', 'C', 'QUERY EXISTS') 75 g.!watcom = GetVar('WATCOM') 76 If g.!watcom == '' Then Do 77 Say '%WATCOM% environment variable is not set.' 78 Say 'Please set %WATCOM% to the location of your OpenWatcom installation.' 79 Return 1 80 End 81 g.!nv_dev = GetVar('NV_DEV') 82 If g.!nv_dev == '' Then Do 83 Say '%NV_DEV% environment variable is not set.' 84 Say 'Please set %NV_DEV% to the top-level path of the development tree.' 85 Return 1 86 End 87 '@SET NV_BUILD='g.!nv_dev'\build' 88 '@SET PATH=%WATCOM%\BINP;%WATCOM%\BINW;%NV_BUILD%\newview;%NV_BUILD%\newview_stub;%PATH%' 89 '@SET INCLUDE=%WATCOM%\H;%WATCOM%\H\OS2;%PMPRINTF_PATH%;' 90 '@SET HELP=%WATCOM%\BINP\HELP;%HELP%' 91 '@SET BOOKSHELF=%WATCOM%\BINP\HELP;%BOOKSHELF%' 92 '@SET BEGINLIBPATH=%WATCOM%\BINP\DLL;%BEGINLIBPATH%;' 93 Return 0 94 95 96 /* -------------------------------------------------------------------------- * 97 * GetVar * 98 * -------------------------------------------------------------------------- */ 99 GetVar: Procedure Expose g. 100 Parse Upper Arg env_var 101 val = Value( env_var,, 'OS2ENVIRONMENT') 102 If val == '' Then Do 103 if g.!env_inc <> '' Then Do 104 match.0 = 0 105 mstring = 'SET' env_var'=' 106 Call SysFileSearch mstring, g.!env_inc, 'match.' 107 If match.0 > 0 Then Do i = 1 to match.0 108 match.i = Translate( Strip( match.i )) 109 If Left( match.i, Length( mstring )) == mstring Then Do 110 Parse Var match.i '='val 111 Leave 112 End 113 End 114 End 115 End 116 Return val 117 118 119 /* -------------------------------------------------------------------------- * 120 * Condition Handlers * 121 * -------------------------------------------------------------------------- */ 122 NoValue: 123 Say 124 Call Lineout 'STDERR:', Right( sigl, 6 ) '+++' STRIP( SOURCELINE( sigl )) 125 Call Lineout 'STDERR:', Right( sigl, 6 ) '+++ Non-initialized variable.' 126 Say 127 Exit sigl 128 129 Error: 130 Say 131 Call Lineout 'STDERR:', '+++ Error:' Condition('D') 132 Say 133 Exit sigl 134 135 -
trunk/hlpmgr/viewer.c
r361 r413 51 51 SAF_INSTALLEDCMDLINE ); // options 52 52 53 if ( hApplication == NULL )53 if ( hApplication == NULLHANDLE ) 54 54 { 55 55 LogEvent( " Failed to launch viewer, rc=%8X", WinGetLastError( hab ) ); -
trunk/howto.txt
r383 r413 1 NewView and libraries - HOWTO2 ----------------------------- 1 Sibyl Libraries & Applications - HOWTO 2 ====================================== 3 3 4 4 Copyright 2003-2006 Aaron Lawrence 5 Copyright 2006-201 7Ronald Brill5 Copyright 2006-2019 Ronald Brill 6 6 7 7 8 8 The major parts of the code are developed in SpeedSoft Sibyl. 9 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 10 *Important Note*: This setup will use these updated Sibyl libraries instead 11 of the ones installed with Sibyl. Aaron has made many bug fixes and a few 12 enhancements. Some things will not build with the original Sibyl Fixpack 3 13 libraries, for example some components depend on parts of the SPCC being 14 changed from Private to Protected. (There were apparently problems with 15 Sibyl Fixpack 4 and so it is not used, although some of the bug fixes from 16 FP4 are included.) 17 24 18 25 19 Your directory structure should look like 26 20 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. 21 <top> 22 build output directory for built files 23 ConfigApps source code for the ConfigApps program 24 Components Sibyl components used by these applications 25 hlpmgr replacement for OS/2 HelpMgr.dll 26 The HelpMgr DLL is compiled with Watcom C++. 27 It generates a DLL containing both 16 and 32 bit 28 entry points,like the original HelpMgr.dll. 29 See http://www.openwatcom.org. 30 installer install program used by NewView 31 Library library functions used by both applications and components 32 NewView the NewView source code 33 Sibyl updated Sibyl libraries (based on fixpack 3) 34 unittests Some tests used by NewView 35 36 37 Required Tools 38 -------------- 39 40 - Speedsoft Sibyl (FP 3) 41 42 Make sure Sibyl (FP 3) is installed and working. 43 You should be able to run spc20, the Sibyl command line compiler. 44 45 - OpenWatcom 1.5 46 47 If you want to work on the HelpMgr.dll, make sure Watcom C/C++ is 48 installed and working. You should be able to run wmake, the 49 Watcom make utility. 50 51 52 Setting Up the Build 53 -------------------- 54 55 1. Copy `env.inc.sample` to `env.inc` and adjust the definitions as indicated 56 in the file. 54 57 55 58 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 59 60 Sibyl unfortunately requires absolute paths in several places in its project 61 setup files. To avoid committing working-copy-specific configuration to the 62 repository, templates are provided, along with a script to generate the 63 working project files from them. 64 65 From the top-level directory, run `project-setup.cmd`. This will create 66 the .spr files in each directory. 67 68 Alternatively, you can also generate the project files manually yourself. 69 This can be done by copying each of the following files to the indicated 70 filename, and then replacing every instance of `@NV_DEV@` in the new files 71 with the full path of your working copy's top level directory. 72 73 Components\Components.spr.def --> Components\Components.spr 74 75 ConfigApps\ConfigApps.spr.def --> ConfigApps\ConfigApps.spr 76 77 installer\NewViewInstall.spr.def --> installer\NewViewInstall.spr 78 79 Library\ACLTest.spr.def --> Library\acl_build.spr 80 Library\acl_build.spr.def --> Library\acl_build.spr 81 82 NewView\NewView.spr.def --> NewView\NewView.spr 83 NewView\viewstub.spr.def --> NewView\viewstub.spr 84 85 unittests\NewViewTests.spr.def --> unittests\NewViewTests.spr 86 87 3. Open a command line window and do the following: 88 89 Change to directory `Sibyl`. 90 Execute `makeall.cmd` 91 92 Change to directory `Library'. 93 Execute `makeall.cmd` 94 95 Change to directory `Components`. 96 Execute `makeall.cmd` 97 98 99 Conventionally, I compile the libraries (Sibyl, Library, Components) with 100 debug information. You can then turn debugging on or off when compiling 101 NewView itself; if debugging is off, the library debug info will be discarded 102 at link stage. 103 104 As for all useful Sibyl projects, optimisation CANNOT be used as it produces 105 incorrect results. 106 107 Build notes for the individual projects are below. 108 109 110 Building Components 111 ------------------- 112 113 The Components project (`Components\Components.spr`) contains the updated 114 Sibyl controls used by NewView and other projects (including custom ones 115 such as the rich text viewer). 116 117 For the Sibyl IDE to be able to use these classes, they are compiled into 118 `CompLib.DLL`. When building applications like NewView, however, the object 119 files will be linked statically into the application. 120 121 The `makeall.cmd` script in the `Components` directory will rebuild all the 122 object files (and the test app, `Components.EXE`. To rebuild `CompLib.DLL`, 123 load `Components.spr` in the Sibyl IDE and rebuild it. 124 125 *Note:* Because the IDE requires `CompLib.DLL` to actually load a project 126 using those classes, and the Components project includes a demo form with the 127 classes on it, this rather unintuitively means that you can't build 128 `CompLib.DLL` unless a previously-built `CompLib.DLL` already exists. For 129 this reason, a prebuilt version with all the new/modified classes is included 130 in this repository. 131 132 133 Building NewView 134 ---------------- 135 136 Make sure steps 1-3 above have been completed. 137 138 You should be able to build NewView.EXE and ViewStub.EXE with debug symbols 139 from a command line by running `makeall.cmd` in the `NewView` directory. Do 140 not do this for a release version. 141 142 To build a release version, you should build the executables from the GUI. 143 When doing this, make sure that the directories `build\newview` and 144 `build\newview_stub` exist and are writable. 145 146 To build NewView.EXE from the GUI, open the project file `NewView\NewView.spr` 147 from the Sibyl IDE. You should be able to build it from the Project menu. 148 NewView.EXE will be placed in the `build\newview` directory. 149 150 *Note:* If you get errors about classes not being found, or CompLib.DLL 151 unable to be loaded, make sure that CompLib.DLL exists in the directory 152 indicated in `NewView.spr` - this _must_ be the version of CompLib.DLL from 153 this project, and _not_ the default one shipped with Sibyl. See the section 154 above for details. 155 156 You can build ViewStub.EXE from the GUI in the same way as NewView.EXE, by 157 opening `NewView\ViewStub.spr` in the IDE and building it from the Project 158 menu. ViewStub.EXE will be placed in `build\newview_stub`. 159 160 161 ### HelpMgr DLL ### 162 163 Go to the `hlpmgr` directory and run `makeall.cmd`; helpmgr.dll will be placed 164 in the `build\hlpmgr` directory. 165 166 Alternatively, if OpenWatcom is available in PATH, INCLUDE, and LIB, you can 167 run `wmake` directly. However, note that the Watcom C makefile for HelpMgr 168 will build hlpmgr2.dll by default. To build helpmgr.dll instead, build with 169 `wmake helpmgr.dll` (which `makeall.cmd` does). 170 171 helpmgr.dll is normally in use by the WPS (WorkPlace Shell, the desktop) so to 172 put it into use, you must either use a DLL-unlocking utility like replmod (on 173 Hobbes.nmsu.edu) or boot to a command prompt, and replace the dll in 174 `c:\os2\dll`. 175 176 Building hlpmgr2 is easier for debugging - you can then use the dllrname 177 utility to modify existing executeables to use hlpmgr2 instead of helpmgr and 178 therefore, you don't need to reboot to try your changes. 179 180 181 ### NewView DLL ### 182 183 Go to the `newview_dll` directory and run `makeall.cmd`. Or, if OpenWatcom 184 and PMPrintF are already installed and available in PATH, INCLUDE, and LIB, 185 you can simply run `wmake` directly. 186 187 188 ### Help & Language Files ### 189 190 The NewView help file was is in .ipf format and can be compiled with the 191 OS/2 IPFC compiler. The language files use Aaron's language support module 192 (see `NewView\Design.txt` for technical information) and are simply structured 193 text files. 194 195 Run `makeall.cmd` from the `i18n` directory to build/copy all the help and 196 language files. Each language lives in a subdirectory with its own 197 `makeall.cmd` that gets called by the parent script. 198 199 200 ### Install EXE ### 201 202 This is another Sibyl project that can be opened in the IDE and compiled. It 203 is the old standalone installer for NewView. The project will create the 204 executable NewViewInstall.EXE - you are recommended to rename it to install.exe 205 if you need distribute it as part of a NewView installation ZIP file. 206 207 The install executable requires Aaron's renmodul.dll, a copy of which is in the 208 `installer` directory (the sources are not included here, but are available on 209 Hobbes and elsewhere). 210 211 I expect there should be little need to change this in the future. 212 213 214 ### Building an Installation ZIP File ### 215 216 Pull together these files into a ZIP: 217 218 newview.exe (from build\newview) 219 viewstub.exe (from build\newview_stub) 220 newview.dll (from build\newview_dll) 221 helpmgr.dll (from build\hlpmgr) 222 install.exe (from build\installer) 223 renmodul.dll (from installer) 224 gpl.txt (from newview) 225 (language files) (from build\newview_i18n) 226 227 Things to do before releasing: see `NewView\VersionUnit.pas`. 228 229 Note: convention for ZIP files is `NewViewA_B_C.zip` for version A.B.C. 230 231 Underscores are more compatible than dots for certain broken bits of OS/2. 232 233 There is a template for uploading NewView ZIPs to Hobbes.nmsu.edu 234 235 236 Building ConfigApps 237 ------------------- 238 239 Make sure steps 1-3 above have been completed. 240 241 Also make sure the directory `build\ConfigApps` exists. 242 243 Open the project file `ConfigApps\ConfigApps.spr` in the Sibyl IDE. You should 244 be able to build it from the Project menu. ConfigApps.EXE will be placed in 245 the `build\ConfigApps` directory. 246 247 248 249 250 251 252 Old Notes from Aaron 253 -------------------- 254 255 The following are left over pieces from Aaron's original build notes. 256 They should not be needed anymore, but are included for posterity. 257 258 -- 98 259 99 260 2. Unzip all files. … … 160 321 As for all useful Sibyl projects, optimisation CANNOT be used as it produces incorrect results. 161 322 162 HelpMgr DLL163 -----------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 EXE174 -----------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 zip181 -----------------------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.exe187 helpmgr.dll188 install.exe189 readme.txt190 changes.txt191 gpl.txt192 193 Things to do before releasing: see VersionUnit.pas.194 195 Note: convention for ZIP files is196 NewViewA_B_C.zip197 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.edu202 203 Help File204 ---------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 323 Bug/Todo List 209 324 ------------- -
trunk/i18n/de/makeall.cmd
r183 r413 1 /* Rexx */2 3 1 /* ------------------------------------------------------------------------- */ 4 2 /* NewView - a new OS/2 Help Viewer */ 5 3 /* */ 6 4 /* Copyright 2003-2006 Aaron Lawrence (aaronl at consultant dot com) */ 7 /* Copyright 2006 /2007 Ronald Brill (rbri at rbri.org) */5 /* Copyright 2006-2017 Ronald Brill (rbri at rbri.org) */ 8 6 /* */ 9 7 /* This software is released under the Gnu Public License */ … … 13 11 /* directory. */ 14 12 /* ------------------------------------------------------------------------- */ 13 Parse Arg nv_build_dir_i18n 15 14 16 17 18 nv_i18n_dir = directory() 19 20 nv_build_dir = value('NV_BUILD', , 'OS2ENVIRONMENT') 21 nv_rc = SysMkDir(nv_build_dir) 22 23 /* copy changes.txt */ 24 /* copy Changes.txt nv_build_dir */ 25 26 /* copy the readme.txt file */ 27 /* TODO copy 'readme.txt' nv_build_dir */ 15 nv_build_dir = Value('NV_BUILD',, 'OS2ENVIRONMENT') 16 If nv_build_dir == '' Then Do 17 Say '%NV_BUILD% not defined in environment!' 18 Return 1 19 End 20 If nv_build_dir_i18n == '' Then 21 nv_build_dir_i18n = nv_build_dir 22 nv_rc = SysMkDir( nv_build_dir_i18n ) 28 23 29 24 /* copy the lang file */ 30 copy 'newview_de.lng' nv_build_dir 25 'copy newview_de.lng' nv_build_dir_i18n 31 26 32 27 /* compile the ipf file */ 33 ipfc NewView_de.ipf nv_build_dir||'\NewView_de.hlp -D:049 -C:850 -L:DEU'28 'ipfc NewView_de.ipf' nv_build_dir_i18n||'\NewView_de.hlp -D:049 -C:850 -L:DEU' 34 29 30 Return rc 31 -
trunk/i18n/fr/makeall.cmd
r308 r413 1 /* Rexx */2 3 1 /* ------------------------------------------------------------------------- */ 4 2 /* NewView - a new OS/2 Help Viewer */ 5 3 /* */ 6 4 /* Copyright 2003-2006 Aaron Lawrence (aaronl at consultant dot com) */ 7 /* Copyright 2006 /2007 Ronald Brill (rbri at rbri.org) */5 /* Copyright 2006-2017 Ronald Brill (rbri at rbri.org) */ 8 6 /* */ 9 7 /* This software is released under the Gnu Public License */ … … 13 11 /* directory. */ 14 12 /* ------------------------------------------------------------------------- */ 13 Parse Arg nv_build_dir_i18n 15 14 16 17 18 nv_i18n_dir = directory() 19 20 nv_build_dir = value('NV_BUILD', , 'OS2ENVIRONMENT') 21 nv_rc = SysMkDir(nv_build_dir) 22 23 /* copy changes.txt */ 24 /* copy Changes.txt nv_build_dir */ 15 nv_build_dir = Value('NV_BUILD',, 'OS2ENVIRONMENT') 16 If nv_build_dir == '' Then Do 17 Say '%NV_BUILD% not defined in environment!' 18 Return 1 19 End 20 If nv_build_dir_i18n == '' Then 21 nv_build_dir_i18n = nv_build_dir 22 nv_rc = SysMkDir( nv_build_dir_i18n ) 25 23 26 24 /* copy the readme.txt file */ 27 copy 'lisezmoi.txt' nv_build_dir 25 'copy lisezmoi.txt' nv_build_dir_i18n 28 26 29 27 /* copy the lang file */ 30 copy 'newview_fr.lng' nv_build_dir 28 'copy newview_fr.lng' nv_build_dir_i18n 31 29 32 30 /* compile the ipf file */ 33 ipfc NewView_fr.ipf nv_build_dir||'\NewView_fr.hlp -s -x-D:033 -C:850 -L:FRA'31 'ipfc NewView_fr.ipf' nv_build_dir_i18n||'\NewView_fr.hlp -D:033 -C:850 -L:FRA' 34 32 33 Return rc 34 -
trunk/i18n/ja/makeall.cmd
r338 r413 1 /* Rexx */2 3 1 /* ------------------------------------------------------------------------- */ 4 2 /* NewView - a new OS/2 Help Viewer */ 5 3 /* */ 6 4 /* Copyright 2003-2006 Aaron Lawrence (aaronl at consultant dot com) */ 7 /* Copyright 2006 /2007 Ronald Brill (rbri at rbri.org) */5 /* Copyright 2006-2017 Ronald Brill (rbri at rbri.org) */ 8 6 /* */ 9 7 /* This software is released under the Gnu Public License */ … … 13 11 /* directory. */ 14 12 /* ------------------------------------------------------------------------- */ 13 Parse Arg nv_build_dir_i18n 15 14 16 17 18 nv_i18n_dir = directory() 19 20 nv_build_dir = value('NV_BUILD', , 'OS2ENVIRONMENT') 21 nv_rc = SysMkDir(nv_build_dir) 22 23 /* copy changes.txt */ 24 /* copy Changes.txt nv_build_dir */ 25 26 /* copy the readme.txt file */ 27 /* TODO copy 'readme.txt' nv_build_dir */ 15 nv_build_dir = Value('NV_BUILD',, 'OS2ENVIRONMENT') 16 If nv_build_dir == '' Then Do 17 Say '%NV_BUILD% not defined in environment!' 18 Return 1 19 End 20 If nv_build_dir_i18n == '' Then 21 nv_build_dir_i18n = nv_build_dir 22 nv_rc = SysMkDir( nv_build_dir_i18n ) 28 23 29 24 /* copy the lang file */ 30 copy 'newview_ja.lng' nv_build_dir 25 'copy newview_ja.lng' nv_build_dir_i18n 31 26 32 27 /* compile the ipf file */ 33 /* ipfc NewView_ja.ipf nv_build_dir||'\NewView_ja.hlp -D:081 -C:850-L:JPN' */34 copy 'NewView_ja.hlp' nv_build_dir 28 /* 'ipfc NewView_ja.ipf' nv_build_dir_i18n||'\NewView_ja.hlp -D:081 -C:932 -L:JPN' */ 29 'copy newview_ja.hlp' nv_build_dir_i18n 35 30 31 Return rc 32 -
trunk/i18n/makeall.cmd
r302 r413 1 /* Rexx */2 3 1 /* ------------------------------------------------------------------------- */ 4 2 /* NewView - a new OS/2 Help Viewer */ 5 3 /* */ 6 4 /* Copyright 2003-2006 Aaron Lawrence (aaronl at consultant dot com) */ 7 /* Copyright 2006-20 07 Ronald Brill (rbri at rbri.org) */5 /* Copyright 2006-2017 Ronald Brill (rbri at rbri.org) */ 8 6 /* */ 9 7 /* This software is released under the Gnu Public License */ 10 8 /* */ 11 9 /* */ 12 /* Compiles the help files and copys the lanugage files to the build */ 13 /* directory. */ 10 /* 1.) Create all needed output directories */ 11 /* 2.) Build all the resource files for our customized sibyl */ 12 /* 3.) Compile */ 14 13 /* ------------------------------------------------------------------------- */ 14 Signal On NoValue 15 Signal On Error 16 Call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs' 17 Call SysLoadFuncs 18 19 Call SetLocal 20 nv_rc = SetUpPaths() 21 If nv_rc <> 0 Then Exit rc 22 23 nv_build_dir = Value('NV_BUILD',,'OS2ENVIRONMENT') 24 nv_rc = SysMkDir( nv_build_dir ) 15 25 16 26 27 /* Project-specific section follows */ 17 28 18 nv_i18n_dir = directory() 29 nv_i18n_dir = Directory() 30 nv_build_dir_i18n = nv_build_dir||'\newview_i18n' 31 nv_rc = SysMkDir( nv_build_dir_i18n ) 19 32 20 nv_build_dir = value('NV_BUILD', , 'OS2ENVIRONMENT') 21 nv_rc = SysMkDir(nv_build_dir) 33 'SET IPFCARTWORK='nv_i18n_dir'\images' 22 34 23 35 /* copy changes.txt */ 24 copy Changes.txt nv_build_dir 36 'copy Changes.txt' nv_build_dir_i18n 25 37 26 38 27 39 /* compile the ipf file */ 28 ipfc NewView.ipf nv_build_dir||'\NewView.hlp -D:001 -C:850 -L:ENU'40 'ipfc NewView.ipf' nv_build_dir_i18n||'\NewView.hlp -D:001 -C:850 -L:ENU' 29 41 30 call SysFileTree nv_i18n_dir||'\', subdirs, 'DO'42 call SysFileTree nv_i18n_dir||'\', 'subdirs.', 'DO' 31 43 do i=1 to subdirs.0 32 44 if 0 = lastpos('images', subdirs.i) then … … 34 46 if 0 = lastpos('.svn', subdirs.i) then 35 47 do 36 cdsubdirs.i48 'cd' subdirs.i 37 49 /* call makeall for every dir */ 38 makeall.cmd39 cd ..50 'call makeall.cmd' nv_build_dir_i18n 51 'cd ..' 40 52 end 41 53 end 42 54 end 43 55 56 Call EndLocal 57 exit 0 58 59 60 61 /* -------------------------------------------------------------------------- * 62 * SetUpPaths * 63 * -------------------------------------------------------------------------- */ 64 SetUpPaths: PROCEDURE EXPOSE g. 65 g.!env_inc = Stream('..\env.inc', 'C', 'QUERY EXISTS') 66 g.!watcom = GetVar('WATCOM') 67 If g.!watcom == '' Then Do 68 Say '%WATCOM% environment variable is not set.' 69 Say 'Please set %WATCOM% to the location of your OpenWatcom installation.' 70 Return 1 71 End 72 g.!nv_dev = GetVar('NV_DEV') 73 If g.!nv_dev == '' Then Do 74 Say '%NV_DEV% environment variable is not set.' 75 Say 'Please set %NV_DEV% to the top-level path of the development tree.' 76 Return 1 77 End 78 '@SET NV_BUILD='g.!nv_dev'\build' 79 '@SET PATH=%WATCOM%\BINP;%WATCOM%\BINW;%NV_BUILD%\newview;%NV_BUILD%\newview_stub;%PATH%' 80 '@SET INCLUDE=%WATCOM%\H;%WATCOM%\H\OS2;%PMPRINTF_PATH%;' 81 '@SET HELP=%WATCOM%\BINP\HELP;%HELP%' 82 '@SET BOOKSHELF=%WATCOM%\BINP\HELP;%BOOKSHELF%' 83 '@SET BEGINLIBPATH=%WATCOM%\BINP\DLL;%BEGINLIBPATH%;' 84 Return 0 85 86 87 /* -------------------------------------------------------------------------- * 88 * GetVar * 89 * -------------------------------------------------------------------------- */ 90 GetVar: Procedure Expose g. 91 Parse Upper Arg env_var 92 val = Value( env_var,, 'OS2ENVIRONMENT') 93 If val == '' Then Do 94 if g.!env_inc <> '' Then Do 95 match.0 = 0 96 mstring = 'SET' env_var'=' 97 Call SysFileSearch mstring, g.!env_inc, 'match.' 98 If match.0 > 0 Then Do i = 1 to match.0 99 match.i = Translate( Strip( match.i )) 100 If Left( match.i, Length( mstring )) == mstring Then Do 101 Parse Var match.i '='val 102 Leave 103 End 104 End 105 End 106 End 107 Return val 108 109 110 /* -------------------------------------------------------------------------- * 111 * Condition Handlers * 112 * -------------------------------------------------------------------------- */ 113 NoValue: 114 Say 115 Call Lineout 'STDERR:', Right( sigl, 6 ) '+++' STRIP( SOURCELINE( sigl )) 116 Call Lineout 'STDERR:', Right( sigl, 6 ) '+++ Non-initialized variable.' 117 Say 118 Exit sigl 119 120 Error: 121 Say 122 Call Lineout 'STDERR:', '+++ Error:' Condition('D') 123 Say 124 Exit sigl 125 126 -
trunk/i18n/nl/makeall.cmd
r326 r413 1 /* Rexx */2 3 1 /* ------------------------------------------------------------------------- */ 4 2 /* NewView - a new OS/2 Help Viewer */ 5 3 /* */ 6 4 /* Copyright 2003-2006 Aaron Lawrence (aaronl at consultant dot com) */ 7 /* Copyright 2006 /2007 Ronald Brill (rbri at rbri.org) */5 /* Copyright 2006-2017 Ronald Brill (rbri at rbri.org) */ 8 6 /* */ 9 7 /* This software is released under the Gnu Public License */ … … 13 11 /* directory. */ 14 12 /* ------------------------------------------------------------------------- */ 13 Parse Arg nv_build_dir_i18n 15 14 16 17 18 nv_i18n_dir = directory() 19 20 nv_build_dir = value('NV_BUILD', , 'OS2ENVIRONMENT') 21 nv_rc = SysMkDir(nv_build_dir) 22 23 /* copy changes.txt */ 24 /* copy Changes.txt nv_build_dir */ 25 26 /* copy the readme.txt file */ 27 /* copy 'lisezmoi.txt' nv_build_dir */ 15 nv_build_dir = Value('NV_BUILD',, 'OS2ENVIRONMENT') 16 If nv_build_dir == '' Then Do 17 Say '%NV_BUILD% not defined in environment!' 18 Return 1 19 End 20 If nv_build_dir_i18n == '' Then 21 nv_build_dir_i18n = nv_build_dir 22 nv_rc = SysMkDir( nv_build_dir_i18n ) 28 23 29 24 /* copy the lang file */ 30 copy 'newview_nl.lng' nv_build_dir 25 'copy newview_nl.lng' nv_build_dir_i18n 31 26 32 27 /* compile the ipf file */ 33 /* ipfc NewView_fr.ipf nv_build_dir||'\NewView_fr.hlp -s -x -D:033 -C:850 -L:FRA' */34 copy 'newview_nl.hlp' nv_build_dir 28 /* 'ipfc NewView_nl.ipf' nv_build_dir_i18n||'\NewView_nl.hlp -s -x -D:031 -C:850 -L:NLD' */ 29 'copy newview_nl.hlp' nv_build_dir_i18n 35 30 31 Return rc -
trunk/i18n/sv/makeall.cmd
r334 r413 1 /* Rexx */2 3 1 /* ------------------------------------------------------------------------- */ 4 2 /* NewView - a new OS/2 Help Viewer */ 5 3 /* */ 6 4 /* Copyright 2003-2006 Aaron Lawrence (aaronl at consultant dot com) */ 7 /* Copyright 2006 /2007 Ronald Brill (rbri at rbri.org) */5 /* Copyright 2006-2017 Ronald Brill (rbri at rbri.org) */ 8 6 /* */ 9 7 /* This software is released under the Gnu Public License */ … … 13 11 /* directory. */ 14 12 /* ------------------------------------------------------------------------- */ 13 Parse Arg nv_build_dir_i18n 15 14 16 17 18 nv_i18n_dir = directory() 19 20 nv_build_dir = value('NV_BUILD', , 'OS2ENVIRONMENT') 21 nv_rc = SysMkDir(nv_build_dir) 22 23 /* copy changes.txt */ 24 /* copy Changes.txt nv_build_dir */ 25 26 /* copy the readme.txt file */ 27 /* copy 'lisezmoi.txt' nv_build_dir */ 15 nv_build_dir = Value('NV_BUILD',, 'OS2ENVIRONMENT') 16 If nv_build_dir == '' Then Do 17 Say '%NV_BUILD% not defined in environment!' 18 Return 1 19 End 20 If nv_build_dir_i18n == '' Then 21 nv_build_dir_i18n = nv_build_dir 22 nv_rc = SysMkDir( nv_build_dir_i18n ) 28 23 29 24 /* copy the lang file */ 30 copy 'newview_sv.lng' nv_build_dir 25 'copy newview_sv.lng' nv_build_dir_i18n 31 26 32 27 /* compile the ipf file */ 33 /* ipfc NewView_sv.ipf nv_build_dir||'\NewView_fr.hlp -s -x -D:033 -C:850 -L:FRA' */34 copy 'newview_sv.hlp' nv_build_dir 28 /* 'ipfc NewView_sv.ipf' nv_build_dir_i18n||'\NewView_sv.hlp -D:046 -C:850 -L:SVE' */ 29 'copy newview_sv.hlp' nv_build_dir_i18n 35 30 31 Return rc 32 -
trunk/newview_dll/makefile
r363 r413 45 45 46 46 newview.obj: newview.c 47 48 clean : .SYMBOLIC 49 -del .\*.obj 2>nul 50 -del .\*.err 2>nul -
trunk/newview_dll/newview.def
r363 r413 6 6 option stack=1M 7 7 8 LIBRARY P :\newview_dev\tools\pmprintf\PMPRINTF.LIB8 LIBRARY PMPRINTF.LIB 9 9 10 10 export LZWDECOMPRESSBLOCK .1 = LZWDecompressBlock
Note:
See TracChangeset
for help on using the changeset viewer.