From: srs5694 Date: Tue, 22 Jan 2013 16:49:31 +0000 (-0500) Subject: Fixed bug that prevented "icon" token in refind.conf manual boot X-Git-Url: https://code.delx.au/refind/commitdiff_plain/540ffcdf8002b03afb9e9ea7b4bbf027aa357997 Fixed bug that prevented "icon" token in refind.conf manual boot stanza from working. --- diff --git a/NEWS.txt b/NEWS.txt index cc1773d..b3d016b 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,3 +1,12 @@ +0.6.6 (?/??/2013): +------------------ + +- Fixed bug that caused rEFInd to ignore the "icon" token in refind.conf + manual boot stanzas. + +- Fixed bug in install.sh that caused the script to fail to update + drivers when rEFInd was installed in EFI/BOOT/. + 0.6.5 (1/16/2013): ------------------ diff --git a/docs/refind/configfile.html b/docs/refind/configfile.html index 49c2ed6..bc9cf98 100644 --- a/docs/refind/configfile.html +++ b/docs/refind/configfile.html @@ -176,7 +176,7 @@ timeout 20 hideui banner, label, singleuser, safemode, hwtest, arrows, hints, editor, or all - Removes the specified user interface features. banner removes the banner graphic, label removes the text description of each tag and the countdown timer, singleuser removes the single-user option from the OS X sub-menu, safemode removes the option to boot to safe mode from the OS X sub-menu, hwtest removes the Macintosh hardware test option, arrows removes the arrows to the right or left of the OS tags when rEFInd finds too many OSes to display simultaneously, hints removes the brief description of what basic keypresses do, editor disables the options editor, and all removes all of these options. You can specify multiple parameters with this option. The default is to set none of these values. + Removes the specified user interface features. banner removes the banner graphic or background image, label removes the text description of each tag and the countdown timer, singleuser removes the single-user option from the OS X sub-menu, safemode removes the option to boot to safe mode from the OS X sub-menu, hwtest removes the Macintosh hardware test option, arrows removes the arrows to the right or left of the OS tags when rEFInd finds too many OSes to display simultaneously, hints removes the brief description of what basic keypresses do, editor disables the options editor, and all removes all of these options. You can specify multiple parameters with this option. The default is to set none of these values. icons_dir diff --git a/install.sh b/install.sh index 8268e40..5dd99c1 100755 --- a/install.sh +++ b/install.sh @@ -29,6 +29,7 @@ # # Revision history: # +# 0.6.6 -- Bug fix: Upgrade drivers when installed to EFI/BOOT. # 0.6.4 -- Copies ext2 driver rather than ext4 driver for ext2/3fs # 0.6.3 -- Support for detecting rEFInd in EFI/BOOT and EFI/Microsoft/Boot # directories & for installing to EFI/BOOT in BIOS mode @@ -261,6 +262,12 @@ CopyRefindFiles() { if [[ $InstallDrivers == "all" ]] ; then cp -r $RefindDir/drivers_* $InstallDir/$TargetDir/ 2> /dev/null cp -r $ThisDir/drivers_* $InstallDir/$TargetDir/ 2> /dev/null + elif [[ $Upgrade == 1 ]] ; then + if [[ $Platform == 'EFI64' ]] ; then + CopyDrivers x64 + else + CopyDrivers ia32 + fi fi Refind="" CopyKeys diff --git a/refind.conf-sample b/refind.conf-sample index 6cc17cd..e5380f8 100644 --- a/refind.conf-sample +++ b/refind.conf-sample @@ -10,7 +10,7 @@ timeout 20 # Hide user interface elements for personal preference or to increase # security: -# banner - the rEFInd title banner +# banner - the rEFInd title banner (built-in or loaded via "banner") # label - boot option text label in the menu # singleuser - remove the submenu options to boot Mac OS X in single-user # or verbose modes; affects ONLY MacOS X diff --git a/refind/icns.c b/refind/icns.c index 0f55c8d..c6cac90 100644 --- a/refind/icns.c +++ b/refind/icns.c @@ -130,8 +130,7 @@ EG_IMAGE * LoadOSIcon(IN CHAR16 *OSIconName OPTIONAL, IN CHAR16 *FallbackIconNam // try the fallback name with os_ instead of boot_ if (BootLogo && (Image == NULL)) - Image = LoadIconAnyFormat(GlobalConfig.IconsDir ? GlobalConfig.IconsDir : DEFAULT_ICONS_DIR, - L"os", FallbackIconName); + Image = LoadIconAnyFormat(GlobalConfig.IconsDir ? GlobalConfig.IconsDir : DEFAULT_ICONS_DIR, L"os", FallbackIconName); if (Image != NULL) return Image; diff --git a/refind/main.c b/refind/main.c index ccbf97d..cd13fe8 100644 --- a/refind/main.c +++ b/refind/main.c @@ -128,7 +128,7 @@ static VOID AboutrEFInd(VOID) if (AboutMenu.EntryCount == 0) { AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT); - AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.6.5"); + AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.6.5.2"); AddMenuInfoLine(&AboutMenu, L""); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer"); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith"); @@ -726,7 +726,8 @@ VOID SetLoaderDefaults(LOADER_ENTRY *Entry, CHAR16 *LoaderPath, REFIT_VOLUME *Vo MergeStrings(&IconNames, Temp, L'.'); MyFreePool(Temp); } - Entry->me.Image = LoadIcns(Volume->RootDir, IconNames, 128); + if (!Entry->me.Image) + Entry->me.Image = LoadIcns(Volume->RootDir, IconNames, 128); if (!Entry->me.Image) Entry->me.Image = Volume->VolIconImage; MyFreePool(IconNames); diff --git a/refind/menu.c b/refind/menu.c index dbf88a1..071017b 100644 --- a/refind/menu.c +++ b/refind/menu.c @@ -931,9 +931,9 @@ static VOID PaintIcon(IN EG_EMBEDDED_IMAGE *BuiltInIcon, IN CHAR16 *ExternalFile } } // static VOID PaintIcon() -inline UINTN ComputeRow0PosX(VOID) { +inline UINTN ComputeRow0PosY(VOID) { return ((UGAHeight / 2) - ROW0_TILESIZE / 2); -} // UINTN ComputeRow0PosX() +} // UINTN ComputeRow0PosY() // Display (or erase) the arrow icons to the left and right of an icon's row, // as appropriate. @@ -999,7 +999,7 @@ VOID MainMenuStyle(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, IN UINT } } row0PosX = (UGAWidth + TILE_XSPACING - (ROW0_TILESIZE + TILE_XSPACING) * row0Count) >> 1; - row0PosY = ComputeRow0PosX(); + row0PosY = ComputeRow0PosY(); row1PosX = (UGAWidth + TILE_XSPACING - (ROW1_TILESIZE + TILE_XSPACING) * row1Count) >> 1; row1PosY = row0PosY + ROW0_TILESIZE + TILE_YSPACING; if (row1Count > 0) diff --git a/refind/menu.h b/refind/menu.h index 6023502..aeb1c96 100644 --- a/refind/menu.h +++ b/refind/menu.h @@ -94,7 +94,7 @@ struct _refit_menu_screen; VOID AddMenuInfoLine(IN REFIT_MENU_SCREEN *Screen, IN CHAR16 *InfoLine); VOID AddMenuEntry(IN REFIT_MENU_SCREEN *Screen, IN REFIT_MENU_ENTRY *Entry); -inline UINTN ComputeRow0PosX(VOID); +inline UINTN ComputeRow0PosY(VOID); VOID MainMenuStyle(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, IN UINTN Function, IN CHAR16 *ParamText); UINTN RunMenu(IN REFIT_MENU_SCREEN *Screen, OUT REFIT_MENU_ENTRY **ChosenEntry); UINTN RunMainMenu(IN REFIT_MENU_SCREEN *Screen, IN CHAR16* DefaultSelection, OUT REFIT_MENU_ENTRY **ChosenEntry); diff --git a/refind/screen.c b/refind/screen.c index 7ee1a18..cd2af67 100644 --- a/refind/screen.c +++ b/refind/screen.c @@ -463,7 +463,7 @@ VOID BltClearScreen(IN BOOLEAN ShowBanner) egClearScreen(&MenuBackgroundPixel); if (Banner != NULL) { BannerPosX = (Banner->Width < UGAWidth) ? ((UGAWidth - Banner->Width) / 2) : 0; - BannerPosY = (ComputeRow0PosX() / 2) - Banner->Height; + BannerPosY = (INTN) (ComputeRow0PosY() / 2) - (INTN) Banner->Height; if (BannerPosY < 0) BannerPosY = 0; GlobalConfig.BannerBottomEdge = BannerPosY + Banner->Height; @@ -478,7 +478,7 @@ VOID BltClearScreen(IN BOOLEAN ShowBanner) GraphicsScreenDirty = FALSE; egFreeImage(GlobalConfig.ScreenBackground); GlobalConfig.ScreenBackground = egCopyScreen(); -} +} /* VOID BltClearScreen() */ VOID BltImage(IN EG_IMAGE *Image, IN UINTN XPos, IN UINTN YPos) {