Patch title: Release 92 bulk changes
Abstract:
File: /fullpliant/install.pli
Key:
    Removed line
    Added line
   
abstract
  [This module will install a ready to operate FullPliant sy


function install_floppy c file kernel_root kernel_options ->
  arg Data:Computer c ; arg Str file kernel_root kernel_opti
  kernel_load_module "floppy"
  if (file_query "file:/fullpliant/unix/bin/floppy" standard
    status := build_grub_floppy
    if status=failure
      return
  if (file_copy "file:/fullpliant/unix/bin/floppy" file)=fai
    return failure:"No boot floppy image available"
  file_tree_create "file:/mnt/floppy/"
  filesystem_dismount "file:/mnt/floppy/"
  if (file parse "device:" any)
    if (filesystem_mount file "file:/mnt/floppy/" "")=failur
      return failure:"Failed to mount boot floppy image"
  else
    kernel_load_module "loop"
abstract
  [This module will install a ready to operate FullPliant sy


function install_floppy c file kernel_root kernel_options ->
  arg Data:Computer c ; arg Str file kernel_root kernel_opti
  kernel_load_module "floppy"
  if (file_query "file:/fullpliant/unix/bin/floppy" standard
    status := build_grub_floppy
    if status=failure
      return
  if (file_copy "file:/fullpliant/unix/bin/floppy" file)=fai
    return failure:"No boot floppy image available"
  file_tree_create "file:/mnt/floppy/"
  filesystem_dismount "file:/mnt/floppy/"
  if (file parse "device:" any)
    if (filesystem_mount file "file:/mnt/floppy/" "")=failur
      return failure:"Failed to mount boot floppy image"
  else
    kernel_load_module "loop"
    execute file_os_name:"embedded:/sbin/losetup"+" "+file_o
    if (filesystem_mount "embedded:/dev/loop0" "file:/mnt/fl
    kernel_make_device "device:/loop0"
    execute "losetup /dev/loop0"+" "+file_os_name:file
    if (filesystem_mount "device:/loop0" "file:/mnt/floppy/" "")=failure
      return failure:"Failed to mount boot floppy image (may
  grub_configure c "file:/mnt/floppy/" "fd0" "fd0" kernel_ro
  var Str kversion := c:env:"kernel":"constant":"linux_versi
  var Str sign := c:env:"kernel":"constant":"signature"
  file_tree_delete "file:/tmp/kernel/"
  file_extract kernel_binary_path+"kernel-"+kversion+"-"+sig
  if (file_copy "file:/tmp/kernel/boot/kernel" "file:/mnt/fl
    status := failure "The kernel image "+kversion+" "+sign+
  else
    status := success
  file_tree_delete "file:/tmp/kernel/"
  filesystem_dismount "file:/mnt/floppy/"
  if not (file parse "device:" any)
    execute file_os_name:"embedded:/sbin/losetup"+" -d "+fil



  console "Copying Pliant tree" eol
  file_tree_copy "/pliant/" "target:/pliant/pliant/" extende
  file_copy "/index.page" "target:/pliant/index.page"
  var Str compiler := "gcc"
  var Str include_options := ""
  var Str compiler_options := "-O2 -m486 -mregparm=3 -mrtd -
  var Str debug0_options := "-s -D_NOCHECK_ -fomit-frame-poi
  var Str debug1_options := "-s -D_NOCHECK_ -D_LISTING_"
  var Str debug2_options := "-s -D_CHECK_"
  var Str debug_options := shunt debugging_level=0 debug0_op
  var Str link_options := "-nostdlib"
  var Str exe_options := pliant_root_path+"pliant/language/s
  if not static
    exe_options += " -ldl -D_SO2_"
      return failure:"Failed to mount boot floppy image (may
  grub_configure c "file:/mnt/floppy/" "fd0" "fd0" kernel_ro
  var Str kversion := c:env:"kernel":"constant":"linux_versi
  var Str sign := c:env:"kernel":"constant":"signature"
  file_tree_delete "file:/tmp/kernel/"
  file_extract kernel_binary_path+"kernel-"+kversion+"-"+sig
  if (file_copy "file:/tmp/kernel/boot/kernel" "file:/mnt/fl
    status := failure "The kernel image "+kversion+" "+sign+
  else
    status := success
  file_tree_delete "file:/tmp/kernel/"
  filesystem_dismount "file:/mnt/floppy/"
  if not (file parse "device:" any)
    execute file_os_name:"embedded:/sbin/losetup"+" -d "+fil



  console "Copying Pliant tree" eol
  file_tree_copy "/pliant/" "target:/pliant/pliant/" extende
  file_copy "/index.page" "target:/pliant/index.page"
  var Str compiler := "gcc"
  var Str include_options := ""
  var Str compiler_options := "-O2 -m486 -mregparm=3 -mrtd -
  var Str debug0_options := "-s -D_NOCHECK_ -fomit-frame-poi
  var Str debug1_options := "-s -D_NOCHECK_ -D_LISTING_"
  var Str debug2_options := "-s -D_CHECK_"
  var Str debug_options := shunt debugging_level=0 debug0_op
  var Str link_options := "-nostdlib"
  var Str exe_options := pliant_root_path+"pliant/language/s
  if not static
    exe_options += " -ldl -D_SO2_"
    if (file_query "file:/lib/libdl.so" standard)=undefined
      file_link "file:/lib/libdl.so.2" "file:/lib/libdl.so"
  var Str context_options := "-D_i386_ -D_LINUX_API_ -D_LINU
  if static
    context_options += " -D_STATIC_"
  var Str extra_options := ""
  var Str detail := "-debug"+(string debugging_level)+"-stat
  if (file_query fullpliant_binary_path+"init" standard)=und
    console "Compiling init executable" eol
    file_tree_create fullpliant_binary_path
    execute compiler+" "+compiler_options+" "+include_option
    (var Stream t) open "file:/tmp/compile.log" out+safe
    t writeline compiler+" "+compiler_options+" "+include_op
    t close
    file_configure fullpliant_binary_path+"init" "mode "+(st
  if (file_copy fullpliant_binary_path+"init" "target:/bin/i
    return failure:"Failed to build /bin/init"
  if static
    file_tree_delete "target:/pliant/binary/"
    file_tree_create "target:/pliant/binary/" 
    if (file_query fullpliant_binary_path+"pliant"+detail st
      console "Compiling static Pliant executable" eol
      file_tree_create fullpliant_binary_path
      execute compiler+" "+compiler_options+" "+include_opti
    file_copy fullpliant_binary_path+"pliant"+detail "target
  else
    file_tree_copy "/binary/" "target:/pliant/binary/" exten
    var Array:FileInfo files := file_list "target:/pliant/bi
    for (var Int i) 0 files:size-1
      if files:i:extension=".dump"
        file_delete files:i:name
    file_link "/binary/pliant-debug"+string:debugging_level+


  pliant_multi_file_system dismount "target:/"
  console "done." eol
  status := success
  
export install_tree
  var Str context_options := "-D_i386_ -D_LINUX_API_ -D_LINU
  if static
    context_options += " -D_STATIC_"
  var Str extra_options := ""
  var Str detail := "-debug"+(string debugging_level)+"-stat
  if (file_query fullpliant_binary_path+"init" standard)=und
    console "Compiling init executable" eol
    file_tree_create fullpliant_binary_path
    execute compiler+" "+compiler_options+" "+include_option
    (var Stream t) open "file:/tmp/compile.log" out+safe
    t writeline compiler+" "+compiler_options+" "+include_op
    t close
    file_configure fullpliant_binary_path+"init" "mode "+(st
  if (file_copy fullpliant_binary_path+"init" "target:/bin/i
    return failure:"Failed to build /bin/init"
  if static
    file_tree_delete "target:/pliant/binary/"
    file_tree_create "target:/pliant/binary/" 
    if (file_query fullpliant_binary_path+"pliant"+detail st
      console "Compiling static Pliant executable" eol
      file_tree_create fullpliant_binary_path
      execute compiler+" "+compiler_options+" "+include_opti
    file_copy fullpliant_binary_path+"pliant"+detail "target
  else
    file_tree_copy "/binary/" "target:/pliant/binary/" exten
    var Array:FileInfo files := file_list "target:/pliant/bi
    for (var Int i) 0 files:size-1
      if files:i:extension=".dump"
        file_delete files:i:name
    file_link "/binary/pliant-debug"+string:debugging_level+


  pliant_multi_file_system dismount "target:/"
  console "done." eol
  status := success
  
export install_tree