Subversion Repositories SvarDOS

Rev

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

Rev 46 Rev 47
Line 25... Line 25...
25
static unsigned short COLOR_SELECTCUR[2] = {0x1F00,0x0700};
25
static unsigned short COLOR_SELECTCUR[2] = {0x1F00,0x0700};
26
 
26
 
27
/* mono flag */
27
/* mono flag */
28
static int mono = 0;
28
static int mono = 0;
29
 
29
 
-
 
30
/* how much disk space does Svarog386 require (in MiB) */
-
 
31
#define SVAROG_DISK_REQ 8
-
 
32
 
30
 
33
 
31
/* reboot the computer */
34
/* reboot the computer */
32
static void reboot(void) {
35
static void reboot(void) {
33
  void ((far *bootroutine)()) = (void (far *)()) 0xFFFF0000L;
36
  void ((far *bootroutine)()) = (void (far *)()) 0xFFFF0000L;
34
  int far *rstaddr = (int far *)0x00400072L; /* BIOS boot flag is at 0040:0072 */
37
  int far *rstaddr = (int far *)0x00400072L; /* BIOS boot flag is at 0040:0072 */
Line 252... Line 255...
252
      list[2] = kittengets(0, 2, list[2]);
255
      list[2] = kittengets(0, 2, list[2]);
253
      sprintf(buff, kittengets(3, 0, "ERROR: Drive %c: could not be found. Perhaps your hard disk needs to be"), cselecteddrive);
256
      sprintf(buff, kittengets(3, 0, "ERROR: Drive %c: could not be found. Perhaps your hard disk needs to be"), cselecteddrive);
254
      video_putstring(4, 2, COLOR_BODY[mono], buff);
257
      video_putstring(4, 2, COLOR_BODY[mono], buff);
255
      putstringnls(5, 2, COLOR_BODY[mono], 3, 1, "       partitioned first. Please create at least one partition on your");
258
      putstringnls(5, 2, COLOR_BODY[mono], 3, 1, "       partitioned first. Please create at least one partition on your");
256
      putstringnls(6, 2, COLOR_BODY[mono], 3, 2, "       hard disk, so Svarog386 can be installed on it. Note, that");
259
      putstringnls(6, 2, COLOR_BODY[mono], 3, 2, "       hard disk, so Svarog386 can be installed on it. Note, that");
257
      sprintf(buff, kittengets(3, 3, "       Svarog386 requires at least %d MiB of available disk space."), 16);
260
      sprintf(buff, kittengets(3, 3, "       Svarog386 requires at least %d MiB of available disk space."), SVAROG_DISK_REQ);
258
      video_putstring(7, 2, COLOR_BODY[mono], buff);
261
      video_putstring(7, 2, COLOR_BODY[mono], buff);
259
      putstringnls(9, 2, COLOR_BODY[mono], 3, 4, "You can use the FDISK partitioning tool for creating the required partition");
262
      putstringnls(9, 2, COLOR_BODY[mono], 3, 4, "You can use the FDISK partitioning tool for creating the required partition");
260
      putstringnls(10, 2, COLOR_BODY[mono], 3, 5, "manually, or you can let the installer partitioning your disk");
263
      putstringnls(10, 2, COLOR_BODY[mono], 3, 5, "manually, or you can let the installer partitioning your disk");
261
      putstringnls(11, 2, COLOR_BODY[mono], 3, 6, "automatically. You can also abort the installation to use any other");
264
      putstringnls(11, 2, COLOR_BODY[mono], 3, 6, "automatically. You can also abort the installation to use any other");
262
      putstringnls(12, 2, COLOR_BODY[mono], 3, 7, "partition manager of your choice.");
265
      putstringnls(12, 2, COLOR_BODY[mono], 3, 7, "partition manager of your choice.");
Line 302... Line 305...
302
    }
305
    }
303
    sprintf(buff, "%c:\\SVWRTEST.123", cselecteddrive);
306
    sprintf(buff, "%c:\\SVWRTEST.123", cselecteddrive);
304
    rmdir(buff);
307
    rmdir(buff);
305
    /* check total disk space */
308
    /* check total disk space */
306
    ds = disksize(selecteddrive);
309
    ds = disksize(selecteddrive);
307
    if (ds < 16) {
310
    if (ds < SVAROG_DISK_REQ) {
308
      sprintf(buff, kittengets(3, 12, "ERROR: Drive %c: is not big enough!"), cselecteddrive);
311
      sprintf(buff, kittengets(3, 12, "ERROR: Drive %c: is not big enough!"), cselecteddrive);
309
      video_putstring(9, 2, COLOR_BODY[mono], buff);
312
      video_putstring(9, 2, COLOR_BODY[mono], buff);
310
      sprintf(buff, kittengets(3, 13, "      Svarog386 requires a disk of at least %d MiB."), 16);
313
      sprintf(buff, kittengets(3, 13, "      Svarog386 requires a disk of at least %d MiB."), SVAROG_DISK_REQ);
311
      video_putstring(10, 2, COLOR_BODY[mono], buff);
314
      video_putstring(10, 2, COLOR_BODY[mono], buff);
312
      putstringnls(12, 2, COLOR_BODY[mono], 0, 5, "Press any key...");
315
      putstringnls(12, 2, COLOR_BODY[mono], 0, 5, "Press any key...");
313
      input_getkey();
316
      input_getkey();
314
      return(-1);
317
      return(-1);
315
    }
318
    }