1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[dos] remove the fixed drive letter from system files

* On some systems, the UFD may boot as A:, not C:, in which case
  FreeDOS and WinME DOS will fail to be setup properly
* Fix suggested by Klaus Hohenauer
This commit is contained in:
Pete Batard 2013-01-30 23:24:02 +00:00
parent 4b0196de32
commit f1902c0040
2 changed files with 10 additions and 10 deletions

View file

@ -967,7 +967,7 @@ BOOL SetDOSLocale(const char* path, BOOL bFreeDOS)
return FALSE; return FALSE;
} }
fprintf(fd, "@echo off\n"); fprintf(fd, "@echo off\n");
fprintf(fd, "set PATH=.;C:\\;C:\\LOCALE\n"); fprintf(fd, "set PATH=.;\\;\\LOCALE\n");
fprintf(fd, "echo Using %s keyboard with %s codepage [%d]\n", kb_to_hr("us"), cp_to_hr(437), 437); fprintf(fd, "echo Using %s keyboard with %s codepage [%d]\n", kb_to_hr("us"), cp_to_hr(437), 437);
fclose(fd); fclose(fd);
uprintf("Succesfully wrote 'AUTOEXEC.BAT'\n"); uprintf("Succesfully wrote 'AUTOEXEC.BAT'\n");
@ -994,7 +994,7 @@ BOOL SetDOSLocale(const char* path, BOOL bFreeDOS)
bFreeDOS?"MENU ":"MENUITEM=", bFreeDOS?')':',', kb_to_hr(kb), cp_to_hr(cp), (int)cp); bFreeDOS?"MENU ":"MENUITEM=", bFreeDOS?')':',', kb_to_hr(kb), cp_to_hr(cp), (int)cp);
fprintf(fd, "%s2%c Use %s keyboard with %s codepage [%d]\n", fprintf(fd, "%s2%c Use %s keyboard with %s codepage [%d]\n",
bFreeDOS?"MENU ":"MENUITEM=", bFreeDOS?')':',', kb_to_hr("us"), cp_to_hr(437), 437); bFreeDOS?"MENU ":"MENUITEM=", bFreeDOS?')':',', kb_to_hr("us"), cp_to_hr(437), 437);
fprintf(fd, "%s", bFreeDOS?"MENU\n12?\n":"[1]\ndevice=C:\\locale\\display.sys con=(ega,,1)\n[2]\n"); fprintf(fd, "%s", bFreeDOS?"MENU\n12?\n":"[1]\ndevice=\\locale\\display.sys con=(ega,,1)\n[2]\n");
fclose(fd); fclose(fd);
uprintf("Succesfully wrote 'CONFIG.SYS'\n"); uprintf("Succesfully wrote 'CONFIG.SYS'\n");
@ -1007,14 +1007,14 @@ BOOL SetDOSLocale(const char* path, BOOL bFreeDOS)
return FALSE; return FALSE;
} }
fprintf(fd, "@echo off\n"); fprintf(fd, "@echo off\n");
fprintf(fd, "set PATH=.;C:\\;C:\\LOCALE\n"); fprintf(fd, "set PATH=.;\\;\\LOCALE\n");
if (bFreeDOS) if (bFreeDOS)
fprintf(fd, "display con=(ega,,1)\n"); fprintf(fd, "display con=(ega,,1)\n");
fprintf(fd, "GOTO %%CONFIG%%\n"); fprintf(fd, "GOTO %%CONFIG%%\n");
fprintf(fd, ":1\n"); fprintf(fd, ":1\n");
fprintf(fd, "mode con codepage prepare=((%d) C:\\locale\\%s) > NUL\n", (int)cp, egadrv); fprintf(fd, "mode con codepage prepare=((%d) \\locale\\%s) > NUL\n", (int)cp, egadrv);
fprintf(fd, "mode con codepage select=%d > NUL\n", (int)cp); fprintf(fd, "mode con codepage select=%d > NUL\n", (int)cp);
fprintf(fd, "keyb %s,,C:\\locale\\%s\n", kb, kbdrv); fprintf(fd, "keyb %s,,\\locale\\%s\n", kb, kbdrv);
fprintf(fd, ":2\n"); fprintf(fd, ":2\n");
fclose(fd); fclose(fd);
uprintf("Succesfully wrote 'AUTOEXEC.BAT'\n"); uprintf("Succesfully wrote 'AUTOEXEC.BAT'\n");

View file

@ -30,7 +30,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 206, 316 IDD_DIALOG DIALOGEX 12, 12, 206, 316
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW EXSTYLE WS_EX_APPWINDOW
CAPTION "Rufus v1.3.2.232" CAPTION "Rufus v1.3.2.233"
FONT 8, "MS Shell Dlg", 400, 0, 0x1 FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN BEGIN
DEFPUSHBUTTON "Start",IDC_START,94,278,50,14 DEFPUSHBUTTON "Start",IDC_START,94,278,50,14
@ -274,8 +274,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,3,2,232 FILEVERSION 1,3,2,233
PRODUCTVERSION 1,3,2,232 PRODUCTVERSION 1,3,2,233
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -292,13 +292,13 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus" VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "1.3.2.232" VALUE "FileVersion", "1.3.2.233"
VALUE "InternalName", "Rufus" VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "(c) 2011-2012 Pete Batard (GPL v3)" VALUE "LegalCopyright", "(c) 2011-2012 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe" VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus" VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "1.3.2.232" VALUE "ProductVersion", "1.3.2.233"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"