Changeset 1289
- Timestamp:
- Nov 21, 2008, 9:30:11 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ReleaseEdit.cmd
r1287 r1289 27 27 * - support for environment variables 28 28 * - edits length of all fields in option description 29 * - added support for changing copyright years in: 30 * - dll\copyright.c 31 * - dll\fm3res.rc 32 * - dll\fm3res.dlg (About box) 29 * - added support for changing copyright years 33 30 * - improved error handling: tmp file renamed back to deleted file 34 31 * - improved "usage" routine … … 71 68 mkstr_makefile = 'DLL\INTERNAL\MAKEFILE' 72 69 warpin_makefile = 'WARPIN\MAKEFILE' 70 copyright_h = 'DLL\COPYRIGHT.H' 73 71 parse value date('s') with year 5 month 7 day 74 72 last_year = year - 1 … … 83 81 exit 1 84 82 end 85 if wordpos(ext, ' C RC DLG') = 0 then83 if wordpos(ext, 'H') = 0 then 86 84 'del' file 87 85 … … 127 125 'sed -r -e "/option description/s' || sed_separator || '.*' || sed_separator || option_description || sed_separator || '" ' || tmpfile || ' >' file 128 126 end 129 when wordpos(ext, 'C RC DLG') > 0 then130 do131 signal off error132 'grep -E "Copyright.*' || last_year || '[^,]" ' || file || ' >nul && del ' || file || ' && sed -r -e "/Copyright.*' || last_year || '[^,]/s/' || last_year || '/' || year || '/" ' || tmpfile || ' >' file133 signal on error134 end135 127 when ext = 'H' then 136 128 do 137 'sed -r -e "/#define[ \t]+VERMAJOR/s/(#define[ \t]+VERMAJOR[ \t]+)[^ \t]+/\1' || major || '/g" -e "/#define[ \t]+VERMINOR/s/(#define[ \t]+VERMINOR[ \t]+)[^ \t]+/\1' || minor || '/g" ' || tmpfile || ' >' file 129 if translate(file) = copyright_h then 130 'grep -E "^#define.*COPYRIGHT_YEAR.*' || year || '" ' || file || ' >nul || del ' || file || ' && sed -r -e "/#define.*COPYRIGHT_YEAR/s/[0-9]+/' || year || '/" ' || tmpfile || ' >' file 131 else 132 do /* change below to delete and then update version.h only if version is different? */ 133 'del' file 134 'sed -r -e "/#define[ \t]+VERMAJOR/s/(#define[ \t]+VERMAJOR[ \t]+)[^ \t]+/\1' || major || '/g" -e "/#define[ \t]+VERMINOR/s/(#define[ \t]+VERMINOR[ \t]+)[^ \t]+/\1' || minor || '/g" ' || tmpfile || ' >' file 135 end 138 136 end 139 137 when ext = 'DIZ' then … … 141 139 'sed -r "/FM\/2 v/s/(FM\/2 v)[0-9]+\.[0-9.]+/\1' || ver || '/" ' || tmpfile || ' >' file 142 140 end 143 when right(ext, length(mkstr_makefile))= mkstr_makefile then141 when ext = mkstr_makefile then 144 142 do 145 143 'sed -r -e "/desc/s/(SLAInc:).*(\$#@\$#\$#1\$#\$# )[0-9/]+ [0-9:]+/\1' || ver || '\2' || month || '\/' || day || '\/' || year right(major, 2, '0') || ':' || right(minor, 2, '0') || ':' || right(CSDlevel, 2, '0') || '/" ' || tmpfile || ' >' file 146 144 end 147 when right(ext, length(warpin_makefile))= warpin_makefile then145 when ext = warpin_makefile then 148 146 do 149 147 warpin_db_ver = (major + 0) || '\\' || (minor + 0) || '\\' || (CSDlevel + 0) … … 228 226 trace '?A' 229 227 say 'Exiting.' 230 ' ren' tmpfile file228 'if exist' tmpfile 'move' tmpfile file 231 229 call 'SYSSLEEP' 2 232 230 exit 'CONDITION'('C') -
trunk/ReleaseTool.cmd
r1287 r1289 27 27 * 28 28 * Change log: 29 * 30 * 31 * 32 * 33 * 34 * 35 * 29 * 18 Nov 08 JBS Ticket 297: Various build improvements/corrections 30 * - Use same file list for option 8 and option 20 31 * - Set the file list for option 8 and option 20 once, in Init routine 32 * - Removed fm2.wis from the file list for option 8 and option 20 (not needed) 33 * - Added optional commit to option 20 34 * - Removed extraneous 'pause' in option 20 35 * - Fixed a bug in option 0 (run a command shell) 36 36 * 37 37 */ … … 54 54 parse arg ver next_ver 55 55 if (pos('?', ver) > 0 | pos('h', ver) > 0) then 56 signal Usage 56 signal Usage /* and exit */ 57 57 58 58 call Init … … 74 74 '@'cmd '/c 'action 75 75 signal on Error 76 action = -1 76 action = -1 /* Skip SELECT below */ 77 77 end 78 78 end … … 132 132 file = word(version_filelist2, f) 133 133 call SysCls 134 135 136 137 138 139 140 141 142 134 say;say;say 135 say 'Next, edit the' file 'file.' 136 say 137 say 'Include descriptions of salient changes to FM/2.' 138 say 139 say 'And be sure to update the version number to' ver 140 say 141 '@pause' 142 editor file editorcmds 143 143 end 144 144 call BuildHobbesTxt(ver) … … 210 210 do /* Test the release code */ 211 211 if tester == '' then 212 213 212 do 213 call NotYet action 214 214 say 'Test the (compressed) release code.' 215 215 say … … 290 290 call CommitifOK version_filelist 291 291 end 292 293 292 otherwise 293 nop 294 294 end 295 296 297 '@pause'295 say;say;say 296 if action \= 0 then 297 '@pause' 298 298 end 299 299 … … 315 315 316 316 Usage: 317 318 319 320 321 317 say;say;say 318 lastline = sigl - 10 319 do i = 1 to lastline 320 say sourceline(i) 321 end 322 322 exit 323 323 … … 327 327 call SysLoadFuncs 328 328 329 330 331 332 cmd 333 prompt 329 action = 0 330 331 editor = value('SVN_EDITOR',,'OS2ENVIRONMENT') 332 cmd = value('COMSPEC',,'OS2ENVIRONMENT') 333 prompt = value('PROMPT',,'OS2ENVIRONMENT') 334 334 tester = value('SVN_TESTER',,'OS2ENVIRONMENT') 335 335 killpid = value('SVN_KILL',,'OS2ENVIRONMENT') 336 336 337 337 editorcmds = "" 338 339 338 if editor == '' then 339 editor = 'tedit' 340 340 else 341 342 343 344 345 end 341 do 342 upperwrd1 = translate(word(editor, 1)) 343 if upperwrd1 = 'EPM' | upperwrd1 = 'EPM.EXE' then 344 editorcmds = "'3'" 345 end 346 346 if killpid == '' then 347 347 killpid = 'killpid' 348 348 killtarget = ' FM/2' 349 350 351 352 353 354 version_filelist = version_filelist 'dll\copyright.c dll\fm3res.rc dll\fm3res.dlg'349 version_filelist = 'av2.def databar.def dirsize.def dll\fm3dll.def dll\fm3res.def' 350 version_filelist = version_filelist 'dll\version.h eas.def fm3.def fm4.def global.def ini.def' 351 version_filelist = version_filelist 'killproc.def sysinfo.def undel.def vcollect.def vdir.def' 352 version_filelist = version_filelist 'viewinfs.def vtree.def file_id.diz' 353 version_filelist = version_filelist 'warpin\makefile dll\internal\makefile' 354 version_filelist = version_filelist 'dll\copyright.h' 355 355 return 356 356 357 357 DisplayMenu: procedure 358 359 360 361 362 363 364 365 366 367 358 do forever 359 call SysCls 360 say;say;say 361 say 'Release Tasks' 362 say 363 say '1. Ensure all work for this release is committed.' 364 say '2. Verify completed tickets are marked closed.' 365 say '3. (svn) update local files.' 366 say '4. Check (svn) status of local files.' 367 say '5. Edit various files with version #''s and date''s.' 368 368 say '6. Ensure the edits build.' 369 369 say '7. Test built code.' … … 395 395 if action <= 20 then 396 396 leave 397 397 end 398 398 return action 399 399 400 400 NotYet: procedure 401 402 403 404 405 406 407 401 parse arg action 402 call SysCls 403 say;say;say 404 say 'This option, ' || action || ', has not yet been (and may never be) automated.' 405 say 406 say 'You will have to do this manually. See instructions below:' 407 say;say;say 408 408 return 409 409 410 410 GetVer: procedure 411 412 413 411 parse arg ver_text 412 say 413 say 'Please enter the version (x.yy.zz) for' ver_text ':' 414 414 parse value linein() with major '.' minor '.' CSDlevel 415 415 if minor = '' then … … 423 423 424 424 Tag_ver: procedure 425 425 parse arg ver 426 426 parse var ver major '.' minor '.' CSDlevel 427 427 return major || '_' || right(minor, 2, '0') || '_' || right(CSDlevel, 2, 0) … … 432 432 433 433 BuildHobbesTxt: procedure expose (globals) 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 default_name= 'Gregg Young'452 default_email= 'ygk@qwest.net'453 default_OKtoListEmail= 'yes'454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 434 parse arg ver 435 wpi_version = WPI_ver(ver) 436 HobbesTxtFilename = 'FM2-' || wpi_version || '.txt' 437 if stream(HobbesTxtFilename, 'c', 'query exists') \= '' then 438 do 439 say;say;say 440 say HobbesTxtFilename 'already exists!' 441 call charout , 'Do you want to replace this file? (y/N) ' 442 if translate(SysGetKey()) \= 'Y' then 443 do 444 say;say; 445 say HobbesTxtFilename 'update aborted.' 446 return 447 end 448 call SysFileDelete HobbesTxtFilename 449 end 450 /* Prompt for user input (name, email, permission to email, previous version) here? */ 451 default_name = 'Gregg Young' 452 default_email = 'ygk@qwest.net' 453 default_OKtoListEmail = 'yes' 454 entry = '' 455 do until (entry = 'Y' | entry = '0d'x) 456 say;say 457 say 'You will now be prompted for potentially variable fields within' HobbesTxtFilename 458 say 459 say 'A default value will be given for most fields.' 460 say 'To accept the default just press the Enter key.' 461 say 462 call charout , 'Name of the relaser (default:' default_name '): ' 463 entry = strip(linein()) 464 if entry = '' then 465 name = default_name 466 else 467 name = entry 468 say;say 469 call charout , 'Email address of the relaser (default:' default_email '): ' 470 entry = strip(linein()) 471 if entry = '' then 472 email = default_email 473 else 474 email = entry 475 say;say 476 call charout , 'OK to list email address of the relaser (default:' default_OKtoListEmail '): ' 477 entry = strip(linein()) 478 if entry = '' then 479 OKtoListEmail = default_OKtoListEmail 480 else 481 if translate(left(entry, 1)) = translate(left(default_OKtoListEmail, 1)) then 482 OKtoListEmail = default_OKtoListEmail 483 else 484 if left(default_OKtoListEmail, 1) = 'y' then 485 OKtoListEmail = 'no' 486 else 487 OKtoListEmail = 'yes' 488 say;say 489 replaced_ver = WPI_Ver(GetVer('version to be replaced')) 490 replaced_ver_wpi = 'fm2-' || replaced_ver || '.wpi' 491 say;say 492 say 'Data entered:' 493 say ' Name of releaser :' name 494 say ' Email of releaser :' email 495 say ' OK to list email :' OKtoListEmail 496 say ' WPI to be replaced:' replaced_ver_wpi 497 say;say 498 call charout , 'OK to proceed with file write? (Y/n) ' 499 entry = translate(SysGetKey()) 500 say;say 'Hex(key):' c2x(entry) 501 end 502 503 rm1 = 73 504 rm2 = 25 505 505 call lineout HobbesTxtFilename, right('Upload Information Template for Hobbes.nmsu.edu', rm1) 506 506 call lineout HobbesTxtFilename, right(copies('=', length('Upload Information Template for Hobbes.nmsu.edu')), rm1) … … 562 562 563 563 CommitIfOK: procedure 564 564 parse arg filelist 565 565 svn_cmd = 'svn commit' 566 566 say;say;say -
trunk/dll/copyright.c
r1287 r1289 6 6 * Change Log: 7 7 * 21 Nov 08 JBS Initial addition to SVN repository 8 * 21 Nov 08 JBS Added use of copyright.h 8 9 * 9 10 */ 10 static char szCopyRight[] = "Copyright (c) 1993, 1998 M. Kimes, " \11 "Copyright (c) 2001, 2008 Steven Levine and Associates, Inc." \12 "All rights reserved";13 11 12 #include "copyright.h" 13 static char szCopyRight[] = COPYRIGHT_STRING; 14 -
trunk/dll/fm3res.dlg
r1140 r1289 37 37 31 Jul 08 JBS Added a missing mnemonic and replaced "Mommy make it stop!" with useful text. 38 38 01 Sep 08 GKY Change User-defined BMP text to better match what it actually does. 39 21 Nov 08 JBS Ticket 297: Added use of COPYRIGHT_YEAR in About dialog 39 40 40 41 ***********************************************************************/ … … 42 43 DLGINCLUDE 1 fm3dlg.h 43 44 DLGINCLUDE 2 fm3dll2.h 45 DLGINCLUDE 3 copyright.h 44 46 45 47 DLGTEMPLATE MSK_FRAME LOADONCALL MOVEABLE DISCARDABLE … … 1043 1045 CTEXT "All rights reserved", -1, 10, 88, 164, 8, 1044 1046 DT_VCENTER | NOT WS_GROUP 1045 CTEXT "Copyright ž 1998, 2007", -1, 10, 80, 164, 8,1047 CTEXT "Copyright ž 1998, " COPYRIGHT_YEAR, -1, 10, 80, 164, 8, 1046 1048 DT_VCENTER | NOT WS_GROUP 1047 1049 CTEXT "Steven Levine and Associates, Inc.", -1, 10, 72, -
trunk/dll/fm3res.rc
r1287 r1289 38 38 20 Jul 08 GKY Add save/append filename to clipboard. 39 39 Change menu wording to make these easier to find 40 21 Nov 08 JBS Ticket 297: Added STRINGTABLE with COPYRIGHT_STRING 40 41 41 42 ***********************************************************************/ … … 45 46 #include "fm3dll2.h" 46 47 #include "fm3dlg.h" 47 48 #define IDS_COPYRIGHT 1 48 #include "copyright.h" 49 49 50 50 ICON MAIN_FRAME ..\icons\FM3.ICO … … 2340 2340 STRINGTABLE 2341 2341 BEGIN 2342 IDS_COPYRIGHT, "Copyright (c) 1993, 1998 M. Kimes, " \ 2343 "Copyright (c) 2001, 2008 Steven Levine and Associates, Inc." \ 2344 "All rights reserved"; 2342 IDS_COPYRIGHT, COPYRIGHT_STRING; 2345 2343 END 2346 2344 -
trunk/dll/makefile
r1288 r1289 44 44 # 18 Nov 08 JBS Ticket 297: Various build improvements/corrections 45 45 # 19 Nov 08 JBS Ticket 297: Removed bldlevel calls 46 # 21 Nov 08 JBS Ticket 297: Added support for copyright.c and copyright.h 46 47 47 48 # Environment: … … 224 225 @%append $^@ library os2386.lib 225 226 226 copyright.obj: copyright.c 227 copyright.obj: copyright.c copyright.h 227 228 $(CC) $(COPYRIGHT_CFLAGS) copyright.c 228 229 … … 260 261 $(CC) $(CFLAGSR) $(BASERES).c 261 262 262 $(BASERES).res: *.rc *.dlg fm3dll2.h fm3dlg.h $(ICONS)263 $(BASERES).res: *.rc *.dlg fm3dll2.h fm3dlg.h copyright.h $(ICONS) 263 264 @echo. 264 265 @echo Compiling resource: $*
Note:
See TracChangeset
for help on using the changeset viewer.