/*
   Build and compare trapdoor dos7 bins to the original country version
     Pre-reqs: Replace original dos7 source files from dos build server (\\dosbuild\build) or
               CMVC (family=dos, release=dos7yus, paths are \BIOS and \DEV\EMM386, files in upper case)
                 g:\src\hybernat\dos7\bios\msinit.asm
                 g:\src\hybernat\dos7\bios\sysinit1.asm
                 g:\src\hybernat\dos7\bios\sysinit2.asm
                 g:\src\hybernat\dos7\dev\emm386\init.asm
                 g:\src\hybernat\dos7\dev\emm386\int15.asm
                 g:\src\hybernat\dos7\dev\emm386\pagetrap.asm
     Country dos7 version are on the dos archive server (\\dosbuild\archive)
     Must be run from \src\hybernat\dos7
*/

src_drive = 'g:'
src_path = '\src\hybernat\trapdoor\'
trg_drive = 't:'

cc.1  = 'br \br\dosfiles\'
cc.2  = 'de \gr\'
cc.3  = 'dk \dk\dosfiles\'
cc.4  = 'en \us\dosfiles\'
cc.5  = 'es \sp\dosfiles\'
cc.6  = 'fi \su\'
cc.7  = 'fr \fr\'
cc.8  = 'it \it\'
cc.9  = 'nl \nl\dosfiles\'
cc.10 = 'no \no\'
cc.11 = 'pt \po\'
cc.12 = 'ru \ru\'
cc.13 = 'sv \sv\'

bin.1 = 'command.com'
bin.2 = 'ibmbio.com'
bin.3 = 'ibmdos.com'
bin.4 = 'share.exe'
bin.5 = 'emm386.exe'

do i=1 while (symbol('cc.i') = 'VAR')
  parse var cc.i nlv_name trg_path
  call newbuild
  'set nlv='nlv_name
  'nmake'
  do j=1 while (symbol('bin.j') = 'VAR')
     'superc2' src_drive||src_path||bin.j trg_drive||trg_path||bin.j 'menu=n ctyp=b outp=nul'
     if (rc <> 0) then do
       say 'Compare failed for' src_drive||src_path||bin.j trg_drive||trg_path||bin.j
       say 'Continue?'
       parse upper pull ans
       if (ans <> 'Y') then
         exit 1 
     end
  end
end
