; Crossroads version 1.00g.

label main
  begin
  Product   = Crossroads for MBBS 6.x
  FreeSpace = 2 megabytes
  HuntFile  = MAJORBBS.EXE

  MainFiles = HVSXROAD.MDF HVSXRSYS.DOC HVSXROAD.DOC HVSXROAD.DLL HVSXROOM.XVI HVSXTABL.XVI HVSXSTOC.XVI HVSXSCOR.XVI HVSXPLAY.VIR
  VirFiles  = HVSXROOM HVSXTABL HVSXSTOC HVSXSCOR

  Path

  echo Checking current installation...

  exist HVSXROAD.MSG
    alert Crossroads is already installed!$N$Press <Esc> to abort or <Return> to continue.

  ; Begin main installation stuff.

  ZipFile = HVSXMESS.ZIP

  copy $ZipFile$

  echo UnZIPping $DestPath$$ZipFile$...
  exec $ZIPPath$pkunzip -o $DestPath$$ZipFile$ $DestPath$

  erase $ZipFile$

  ; Done with ZIP, do other files.

  echo Copying main files...

  for MainFiles ThisFile
    copy $ThisFile$

  echo Copying empty data files...

  for VirFiles ThisFile
    begin
    copy $DestPath$$ThisFile$.XVI $ThisFile$.XDA

    exist $DestPath$$ThisFile$.DAT
      erase $DestPath$$ThisFile$.DAT

    end

  ; Check for player dat file before stomping that one.

  exist HVSXPLAY.DAT
    begin
    query KillPlayers Do you want to clear the existing player data file?
    end
  else
    KillPlayers = Yes

  if $KillPlayers$ == Yes
    copy $DestPath$HVSXPLAY.VIR HVSXPLAY.DAT
  else
    echo Skipped $DestPath$HVSXPLAY.VIR...

  exist $SourcePath$V6SOURCE.ZIP
    query InstSource Do you want to install the source code?
  else
    InstSource = No

  if $InstSource$ == Yes
    begin
    mkdir xroads
    copy V6SOURCE.ZIP $DestPath$XROADS\V6SOURCE.ZIP
    echo UnZIPping $DestPath$XROADS\V6SOURCE.ZIP...
    exec $ZIPPath$pkunzip -o $DestPath$XROADS\V6SOURCE.ZIP $DestPath$\XROADS
    erase $DestPath$XROADS\V6SOURCE.ZIP
    copy XLIB.OBJ $DestPath$PHOBJ\XLIB.OBJ
    end

  ; Copy the on-line catalog if it's lying around.

  exist $SourcePath$HVSCAT.EXE
    query InstCat Do you want to install the HVS Graphic Catalog?
  else
    InstCat = No

  if $InstCat$ == Yes
    copy HVSCAT.EXE

  ; Everything went according to plan.

  echo Installation completed!
  end

label abort
  begin
  echo (Aborting...)
  alert Aborting installation!$N$Reason: $Fail$
  terminate
  end









