Subversion Repositories SvarDOS

Rev

Rev 42 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 42 Rev 46
Line 383... Line 383...
383
  fprintf(fd, "DEVICE=%c:\\SYSTEM\\SVAROG.386\\BIN\\CDROM.SYS /D:FDCD0001\r\n", targetdrv);
383
  fprintf(fd, "DEVICE=%c:\\SYSTEM\\SVAROG.386\\BIN\\CDROM.SYS /D:FDCD0001\r\n", targetdrv);
384
  fclose(fd);
384
  fclose(fd);
385
}
385
}
386
 
386
 
387
 
387
 
388
static void installpackages(void) {
388
static void installpackages(int targetdrv) {
389
  char *pkglist[] = {
389
  char *pkglist[] = {
390
    "APPEND",
390
    "APPEND",
391
    "ASSIGN",
391
    "ASSIGN",
392
    "ATTRIB",
392
    "ATTRIB",
393
    "CHKDSK",
393
    "CHKDSK",
Line 438... Line 438...
438
    "UNDELETE",
438
    "UNDELETE",
439
    "XCOPY",
439
    "XCOPY",
440
    NULL
440
    NULL
441
  };
441
  };
442
  int i, pkglistlen;
442
  int i, pkglistlen;
-
 
443
  char buff[64];
443
  newscreen();
444
  newscreen();
444
  /* count how long the pkg list is */
445
  /* count how long the pkg list is */
445
  for (pkglistlen = 0; pkglist[pkglistlen] != NULL; pkglistlen++);
446
  for (pkglistlen = 0; pkglist[pkglistlen] != NULL; pkglistlen++);
-
 
447
  /* set DOSDIR and friends */
-
 
448
  snprintf(buff, sizeof(buff), "%c:\\SYSTEM\\SVAROG.386", targetdrv);
-
 
449
  setenv("DOSDIR", buff, 1);
-
 
450
  snprintf(buff, sizeof(buff), "%c:\\TEMP", targetdrv);
-
 
451
  setenv("TEMP", buff, 1);
446
  /* install packages */
452
  /* install packages */
447
  for (i = 0; pkglist[i] != NULL; i++) {
453
  for (i = 0; pkglist[i] != NULL; i++) {
448
    char buff[128];
454
    char buff[128];
449
    snprintf(buff, sizeof(buff), kittengets(4, 0, "Installing package %d/%d: %s"), i+1, pkglistlen, pkglist[i]);
455
    snprintf(buff, sizeof(buff), kittengets(4, 0, "Installing package %d/%d: %s"), i+1, pkglistlen, pkglist[i]);
450
    strcat(buff, "       ");
456
    strcat(buff, "       ");
451
    video_putstring(10, 2, COLOR_BODY[mono], buff);
457
    video_putstring(10, 2, COLOR_BODY[mono], buff);
452
    sprintf(buff, "FDNPKG INSTALL %s > NUL");
458
    sprintf(buff, "FDINST INSTALL X:\\BASE\\%s.ZIP > NUL", pkglist[i]);
453
    system(buff);
459
    system(buff);
454
  }
460
  }
455
}
461
}
456
 
462
 
457
 
463
 
Line 506... Line 512...
506
    /*selectkeyb();*/ /* what keyb layout should we use? */
512
    /*selectkeyb();*/ /* what keyb layout should we use? */
507
    if (welcomescreen() != 0) break; /* what svarog386 is, ask whether to run live dos or install */
513
    if (welcomescreen() != 0) break; /* what svarog386 is, ask whether to run live dos or install */
508
    targetdrv = preparedrive(); /* what drive should we install to? check avail. space */
514
    targetdrv = preparedrive(); /* what drive should we install to? check avail. space */
509
    if (targetdrv < 0) break;
515
    if (targetdrv < 0) break;
510
    /*askaboutsources();*/ /* IF sources are available, ask if installing with them */
516
    /*askaboutsources();*/ /* IF sources are available, ask if installing with them */
511
    installpackages();   /* install packages */
517
    installpackages(targetdrv);   /* install packages */
512
    bootfilesgen(targetdrv, lang); /* generate simple boot files */
518
    bootfilesgen(targetdrv, lang); /* generate simple boot files */
513
    /*localcfg();*/ /* show local params (currency, etc), and propose to change them (based on localcfg) */
519
    /*localcfg();*/ /* show local params (currency, etc), and propose to change them (based on localcfg) */
514
    /*netcfg();*/ /* basic networking config */
520
    /*netcfg();*/ /* basic networking config */
515
    /* TODO compute a customized FDNPKG file that looks either to local CD or net */
521
    /* TODO compute a customized FDNPKG file that looks either to local CD or net */
516
    finalreboot(); /* remove the CD and reboot */
522
    finalreboot(); /* remove the CD and reboot */