Subversion Repositories SvarDOS

Rev

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

Rev 1035 Rev 1104
Line 668... Line 668...
668
  if (fd == NULL) return;
668
  if (fd == NULL) return;
669
  fprintf(fd, "DOS=UMB,HIGH\r\n"
669
  fprintf(fd, "DOS=UMB,HIGH\r\n"
670
              "LASTDRIVE=Z\r\n"
670
              "LASTDRIVE=Z\r\n"
671
              "FILES=50\r\n");
671
              "FILES=50\r\n");
672
  fprintf(fd, "DEVICE=C:\\SVARDOS\\BIN\\HIMEMX.EXE\r\n");
672
  fprintf(fd, "DEVICE=C:\\SVARDOS\\BIN\\HIMEMX.EXE\r\n");
673
  if (strcmp(locales->lang, "EN") == 0) {
-
 
674
    strcpy(buff, "COMMAND");
-
 
675
  } else {
-
 
676
    snprintf(buff, sizeof(buff), "CMD-%s", locales->lang);
-
 
677
  }
-
 
678
  fprintf(fd, "SHELLHIGH=C:\\SVARDOS\\BIN\\%s.COM /E:512 /P\r\n", buff);
673
  fprintf(fd, "SHELL=C:\\COMMAND.COM /E:512 /P\r\n");
679
  fprintf(fd, "REM COUNTRY=001,%u,C:\\SVARDOS\\CFG\\COUNTRY.SYS\r\n", locales->codepage);
674
  fprintf(fd, "REM COUNTRY=001,%u,C:\\SVARDOS\\CFG\\COUNTRY.SYS\r\n", locales->codepage);
680
  fprintf(fd, "REM DEVICE=C:\\DRIVERS\\UDVD2\\UDVD2.SYS /D:SVCD0001 /H\r\n");
675
  fprintf(fd, "REM DEVICE=C:\\DRIVERS\\UDVD2\\UDVD2.SYS /D:SVCD0001 /H\r\n");
681
  fclose(fd);
676
  fclose(fd);
682
  /*** AUTOEXEC.BAT ***/
677
  /*** AUTOEXEC.BAT ***/
683
  snprintf(buff, sizeof(buff), "%c:\\TEMP\\AUTOEXEC.BAT", targetdrv);
678
  snprintf(buff, sizeof(buff), "%c:\\TEMP\\AUTOEXEC.BAT", targetdrv);
Line 689... Line 684...
689
  fprintf(fd, "SET NLSPATH=%%DOSDIR%%\\NLS;.\r\n");
684
  fprintf(fd, "SET NLSPATH=%%DOSDIR%%\\NLS;.\r\n");
690
  fprintf(fd, "SET DIRCMD=/OGNE/P/4\r\n");
685
  fprintf(fd, "SET DIRCMD=/OGNE/P/4\r\n");
691
  fprintf(fd, "SET WATTCP.CFG=%%DOSDIR%%\\CFG\r\n");
686
  fprintf(fd, "SET WATTCP.CFG=%%DOSDIR%%\\CFG\r\n");
692
  fprintf(fd, "PATH %%DOSDIR%%\\BIN\r\n");
687
  fprintf(fd, "PATH %%DOSDIR%%\\BIN\r\n");
693
  fprintf(fd, "PROMPT $P$G\r\n");
688
  fprintf(fd, "PROMPT $P$G\r\n");
694
  fprintf(fd, "ALIAS REBOOT=FDAPM COLDBOOT\r\n");
-
 
695
  fprintf(fd, "ALIAS HALT=FDAPM POWEROFF\r\n");
-
 
696
  fprintf(fd, "FDAPM APMDOS\r\n");
689
  fprintf(fd, "FDAPM APMDOS\r\n");
697
  fprintf(fd, "\r\n");
690
  fprintf(fd, "\r\n");
698
  genlocalesconf(fd, locales);
691
  genlocalesconf(fd, locales);
699
  fprintf(fd, "\r\n");
692
  fprintf(fd, "\r\n");
700
  fprintf(fd, "REM Uncomment the line below for CDROM support\r\n");
693
  fprintf(fd, "REM Uncomment the line below for CDROM support\r\n");
Line 786... Line 779...
786
  snprintf(buff, sizeof(buff), "%c:\\temp\\postinst.bat", targetdrv);
779
  snprintf(buff, sizeof(buff), "%c:\\temp\\postinst.bat", targetdrv);
787
  fd = fopen(buff, "wb");
780
  fd = fopen(buff, "wb");
788
  if (fd == NULL) return(-1);
781
  if (fd == NULL) return(-1);
789
  fprintf(fd, "@ECHO OFF\r\nECHO INSTALLING SVARDOS BUILD %s\r\n", buildstring);
782
  fprintf(fd, "@ECHO OFF\r\nECHO INSTALLING SVARDOS BUILD %s\r\n", buildstring);
790
 
783
 
-
 
784
  /* move COMMAND.COM so it does not clashes with the installation of the SVARCOM package */
-
 
785
  fprintf(fd, "COPY \\COMMAND.COM \\CMD.COM\r\n");
-
 
786
  fprintf(fd, "SET COMSPEC=%c:\\CMD.COM\r\n", targetdrv);
-
 
787
  fprintf(fd, "DEL \\COMMAND.COM\r\n");
-
 
788
 
791
  /* copy packages */
789
  /* copy packages */
792
  pkgptr = pkglist;
790
  pkgptr = pkglist;
793
  for (i = 0;; i++) {
791
  for (i = 0;; i++) {
794
    /* move forward to nearest entry or end of list */
792
    /* move forward to nearest entry or end of list */
795
    while (*pkgptr == 0) pkgptr++;
793
    while (*pkgptr == 0) pkgptr++;
Line 825... Line 823...
825
  fprintf(fd, "DEL pkg.exe\r\n"
823
  fprintf(fd, "DEL pkg.exe\r\n"
826
              "COPY CONFIG.SYS C:\\\r\n"
824
              "COPY CONFIG.SYS C:\\\r\n"
827
              "DEL CONFIG.SYS\r\n"
825
              "DEL CONFIG.SYS\r\n"
828
              "DEL C:\\AUTOEXEC.BAT\r\n"
826
              "DEL C:\\AUTOEXEC.BAT\r\n"
829
              "COPY AUTOEXEC.BAT C:\\\r\n"
827
              "COPY AUTOEXEC.BAT C:\\\r\n"
830
              "DEL AUTOEXEC.BAT\r\n");
828
              "DEL AUTOEXEC.BAT\r\n"
-
 
829
              "DEL \\CMD.COM\r\n");
831
  /* print out the "installation over" message */
830
  /* print out the "installation over" message */
832
  fprintf(fd, "ECHO.\r\n"
831
  fprintf(fd, "ECHO.\r\n"
833
              "ECHO ");
832
              "ECHO ");
834
  fprintf(fd, svarlang_strid(0x0501), buildstring); /* "SvarDOS installation is over. Please restart your computer now" */
833
  fprintf(fd, svarlang_strid(0x0501), buildstring); /* "SvarDOS installation is over. Please restart your computer now" */
835
  fprintf(fd, "\r\n"
834
  fprintf(fd, "\r\n"