Changeset 597
- Timestamp:
- Apr 2, 2007, 10:42:36 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/warpin/bld_fm2_wpidirs.cmd (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/warpin/bld_fm2_wpidirs.cmd
r584 r597 5 5 * 6 6 * TODO: 7 * - Once the new dummy file idea is accepted and debugged, change this and *.TXT8 * so that the filename is not included in *.TXT. (Or implement the9 * auto-determination of needed dummy files.)10 * - Add logic to figure out "DUMMYFILE" needs automatically11 * - Try setting +r attrib on DUMMYFILE's?12 7 * - Add logic to read script to determine 13 8 * - Number of packages … … 50 45 dest_dir = dest_basedir || '\' || WPI.pkg.p.file.f.dest 51 46 '@if not exist 'dest_dir'\. md 'dest_dir 52 if WPI.pkg.p.file.f.src = 'DUMMY:' then 53 do 54 dummy_filename = dest_dir || '\' || 'Keep_Me.' || right(WPI.pkg.p.number, length(WPI.max_package_number), '0') 55 '@if exist 'dummy_filename' del 'dummy_filename' 1>NUL 2>NUL' 56 call lineout dummy_filename, '' 57 call lineout dummy_filename, 'Due to limitations of Warpin that existed at the time this FM/2 install' 58 call lineout dummy_filename, 'was developed, this otherwise pointless file is REQUIRED.' 59 call lineout dummy_filename, '' 60 call lineout dummy_filename, 'Please do NOT modify or delete this file.' 61 call lineout dummy_filename, '' 62 call lineout dummy_filename /* This closes the file */ 63 /* 64 'attrib 'dummy_filename' +r' 65 */ 66 say 'Warpin dummy file: "'dummy_filename || '" written.' 67 end 68 else 69 do 70 'copy ' || WPI.src_basedir || WPI.pkg.p.file.f.src || '\' || WPI.pkg.p.file.f.name || ' ' || dest_dir 71 /* 72 if translate(right(WPI.pkg.p.file.f.name, 4)) == '.CMD' then 73 'eautil ' || dest_dir || '\' || WPI.pkg.p.file.f.name || ' NUL /s' 74 */ 75 end 47 'copy ' || WPI.src_basedir || WPI.pkg.p.file.f.src || '\' || WPI.pkg.p.file.f.name || ' ' || dest_dir 76 48 end 77 49 end 78 50 79 if WPI.retval \= 0 then 80 signal ErrorExit 81 '@if exist bld_fm2_wpidirs.last del bld_fm2_wpidirs.last' 82 call lineout 'bld_fm2_wpidirs.last' 51 if WPI.retval = 0 then 83 52 signal NormalExit 84 53 85 54 ErrorExit: 86 55 parse arg errorcode 87 say 'Error code: 'errorcode 56 select 57 when errorcode = 1 then 58 say 'Error: More than one PACKAGECOUNT line in 'WPI.infile 59 when errorcode = 2 then 60 say 'Error: More than PACKAGECOUNT PACKAGE lines in 'WPI.infile 61 when errorcode = 3 then 62 do 63 say 'Error: Too many tokens on a line in 'WPI.infile 64 say 'Line : 'txtline 65 end 66 when errorcode = 4 then 67 say 'Error: Keyword is not PACKAGECOUNT, PACKAGE or FILE in 'WPI.infile 68 when errorcode = 5 then 69 novalue: 70 do 71 say 'Error: Unitialized value: "' || condition('D') || ' encountered on line: 'sigl 72 say ' 'sourceline(sigl) 73 signal NormalExit 74 end 75 when errorcode = 6 then 76 do 77 say 'Error: Duplicate PACKAGE line in 'WPI.infile 78 say 'Line : 'txtline 79 end 80 when errorcode = 7 then 81 do 82 say 'Error: Invalid package number in 'WPI.infile 83 say 'Line : 'txtline 84 end 85 otherwise 86 say 'Error: unknown error code: 'errorcode 87 end 88 88 say 89 89 say 'Exiting...' … … 93 93 n = endlocal() 94 94 exit WPI.retval 95 96 novalue:97 say 'Error: Unitialized value: "' || condition('D') || ' encountered on line: 'sigl98 say ' 'sourceline(sigl)99 call ErrorExit 5100 95 101 96 ReadFile: procedure expose (globals) … … 119 114 WPI.pkg.0 = word(txtline, 2) 120 115 else 121 call ErrorExit 1 /* More than one PACKAGECOUNT */116 call ErrorExit 1 /* More than one PACKAGECOUNT */ 122 117 when word1 == 'PACKAGE:' then 123 118 do 124 119 parse var txtline . pkgnum pkgdesc 125 120 if wordpos(pkgnum, package_number_list) > 0 then 126 call ErrorExit 6 121 call ErrorExit 6 /* Repeated package line */ 127 122 package_number_list = package_number_list pkgnum 128 123 p = words(package_number_list) 129 if p > WPI.pkg.0 then /* More packages than PACKAGECOUNT? */130 call ErrorExit 2 124 if p > WPI.pkg.0 then 125 call ErrorExit 2 /* More packages than PACKAGECOUNT */ 131 126 WPI.pkg.p.number = pkgnum 132 127 WPI.pkg.p.desc = strip(pkgdesc) 133 128 end 134 when (word1 == 'FILE:' | word1 == 'DUMMYFILE:') then129 when (word1 == 'FILE:') then 135 130 do 136 if word1 == 'DUMMYFILE:' then 137 parse var txtline . filename pkgnum filedest rest 138 else 139 parse var txtline . filename pkgnum filesrc filedest rest 131 parse var txtline . filename pkgnum filesrc filedest rest 140 132 p = wordpos(pkgnum, package_number_list) 141 133 if p = 0 then … … 153 145 WPI.pkg.p.file.0 = i 154 146 WPI.pkg.p.file.i.name = filename 155 if word1 == 'DUMMYFILE:' then156 WPI.pkg.p.file.i.src = ' DUMMY:'147 if WPI.src_basedir \= '..\' then /* Ignore src-dir if not using build subtree */ 148 WPI.pkg.p.file.i.src = '.' 157 149 else 158 if WPI.src_basedir \= '..\' then /* Ignore src-dir if not using build subtree */ 159 WPI.pkg.p.file.i.src = '.' 160 else 161 WPI.pkg.p.file.i.src = filesrc 150 WPI.pkg.p.file.i.src = filesrc 162 151 WPI.pkg.p.file.i.dest = filedest 163 152 end
Note:
See TracChangeset
for help on using the changeset viewer.
