always create cloverx64.efi
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
parent
aea5deed32
commit
5dbf1e0360
|
@ -186,6 +186,8 @@
|
|||
A547126E22D6E5F300FD2D2D /* postinstall */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = postinstall; sourceTree = "<group>"; };
|
||||
A547127022D6E60000FD2D2D /* postinstall */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = postinstall; sourceTree = "<group>"; };
|
||||
A547127222D6E61E00FD2D2D /* preinstall */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = preinstall; sourceTree = "<group>"; };
|
||||
A5F9FDAC2412AA6C00A31474 /* cbuild.bat */ = {isa = PBXFileReference; lastKnownFileType = text; name = cbuild.bat; path = ../../cbuild.bat; sourceTree = "<group>"; };
|
||||
A5F9FDAF2412AA7A00A31474 /* hebuild.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; name = hebuild.sh; path = ../../hebuild.sh; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
@ -292,6 +294,8 @@
|
|||
129261621A305A8F005F1426 /* utils */,
|
||||
129261C41A305AA5005F1426 /* CloverPrefpane */,
|
||||
129262621A305AA6005F1426 /* CloverUpdater */,
|
||||
A5F9FDAC2412AA6C00A31474 /* cbuild.bat */,
|
||||
A5F9FDAF2412AA7A00A31474 /* hebuild.sh */,
|
||||
129262E01A305AB6005F1426 /* Makefile */,
|
||||
129262E11A305AB6005F1426 /* makeiso */,
|
||||
129262E21A305AB6005F1426 /* makepkg */,
|
||||
|
@ -1090,6 +1094,7 @@
|
|||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
English,
|
||||
en,
|
||||
de,
|
||||
es,
|
||||
|
|
|
@ -485,8 +485,8 @@ rem # drop compiled files to EFI folder
|
|||
|
||||
call:copybin "%BUILD_DIR%\FV\boot%TARGETARCH_INT%" "%DEST_BOOTLOADERS%\%TARGETARCH%" "%cloverEFIFile%"
|
||||
call:copybin "%BUILD_DIR_ARCH%\bdmesg.efi" "%DEST_TOOLS%" "bdmesg-%TARGETARCH_INT%.efi"
|
||||
call:copybin "%BUILD_DIR_ARCH%\CLOVER.efi" "%DEST_CLOVER%" "CLOVER%TARGETARCH%.efi"
|
||||
call:copybin "%BUILD_DIR_ARCH%\CLOVER.efi" "%DEST_BOOT%" "BOOT%TARGETARCH%.efi"
|
||||
call:copybin "%BUILD_DIR_ARCH%\CLOVERX64.efi" "%DEST_CLOVER%" "CLOVER%TARGETARCH%.efi"
|
||||
call:copybin "%BUILD_DIR_ARCH%\CLOVERX64.efi" "%DEST_BOOT%" "BOOT%TARGETARCH%.efi"
|
||||
|
||||
if not defined CLOVER_EDK2SHELL goto donebuild
|
||||
|
||||
|
|
|
@ -771,8 +771,8 @@ MainPostBuildScript() {
|
|||
if [[ "$GENPAGE" -eq 0 ]]; then
|
||||
setInitBootMsg "$CLOVER_PKG_DIR"/Bootloaders/x64/$cloverEFIFile
|
||||
fi
|
||||
copyBin "$BUILD_DIR_ARCH"/CLOVER.efi "$CLOVER_PKG_DIR"/EFI/BOOT/BOOTX64.efi
|
||||
copyBin "$BUILD_DIR_ARCH"/CLOVER.efi "$CLOVER_PKG_DIR"/EFI/CLOVER/CLOVERX64.efi
|
||||
copyBin "$BUILD_DIR_ARCH"/CLOVERX64.efi "$CLOVER_PKG_DIR"/EFI/BOOT/BOOTX64.efi
|
||||
copyBin "$BUILD_DIR_ARCH"/CLOVERX64.efi "$CLOVER_PKG_DIR"/EFI/CLOVER/CLOVERX64.efi
|
||||
|
||||
# Mandatory drivers
|
||||
echo "Copy Mandatory drivers:"
|
||||
|
@ -906,8 +906,8 @@ export BUILD_DIR_ARCH="${BUILD_DIR}/$TARGETARCH"
|
|||
if [[ -z $MODULEFILE ]] && (( $NOBOOTFILES == 0 )); then
|
||||
MainPostBuildScript
|
||||
else
|
||||
copyBin "$BUILD_DIR_ARCH"/CLOVER.efi "$CLOVER_PKG_DIR"/EFI/CLOVER/CLOVERX64.efi
|
||||
copyBin "$BUILD_DIR_ARCH"/CLOVER.efi "$CLOVER_PKG_DIR"/EFI/BOOT/BOOTX64.efi
|
||||
copyBin "$BUILD_DIR_ARCH"/CLOVERX64.efi "$CLOVER_PKG_DIR"/EFI/CLOVER/CLOVERX64.efi
|
||||
copyBin "$BUILD_DIR_ARCH"/CLOVERX64.efi "$CLOVER_PKG_DIR"/EFI/BOOT/BOOTX64.efi
|
||||
fi
|
||||
|
||||
# Local Variables: #
|
||||
|
|
|
@ -763,8 +763,8 @@ MainPostBuildScript() {
|
|||
if [[ "$GENPAGE" -eq 0 ]]; then
|
||||
setInitBootMsg "$CLOVER_PKG_DIR"/Bootloaders/x64/$cloverEFIFile
|
||||
fi
|
||||
copyBin "$BUILD_DIR_ARCH"/CLOVER.efi "$CLOVER_PKG_DIR"/EFI/BOOT/BOOTX64.efi
|
||||
copyBin "$BUILD_DIR_ARCH"/CLOVER.efi "$CLOVER_PKG_DIR"/EFI/CLOVER/CLOVERX64.efi
|
||||
copyBin "$BUILD_DIR_ARCH"/CLOVERX64.efi "$CLOVER_PKG_DIR"/EFI/BOOT/BOOTX64.efi
|
||||
copyBin "$BUILD_DIR_ARCH"/CLOVERX64.efi "$CLOVER_PKG_DIR"/EFI/CLOVER/CLOVERX64.efi
|
||||
|
||||
# Mandatory drivers
|
||||
echo "Copy Mandatory drivers:"
|
||||
|
@ -895,8 +895,8 @@ export BUILD_DIR_ARCH="${BUILD_DIR}/$TARGETARCH"
|
|||
if [[ -z $MODULEFILE ]] && (( $NOBOOTFILES == 0 )); then
|
||||
MainPostBuildScript
|
||||
else
|
||||
copyBin "$BUILD_DIR_ARCH"/CLOVER.efi "$CLOVER_PKG_DIR"/EFI/CLOVER/CLOVERX64.efi
|
||||
copyBin "$BUILD_DIR_ARCH"/CLOVER.efi "$CLOVER_PKG_DIR"/EFI/BOOT/BOOTX64.efi
|
||||
copyBin "$BUILD_DIR_ARCH"/CLOVERX64.efi "$CLOVER_PKG_DIR"/EFI/CLOVER/CLOVERX64.efi
|
||||
copyBin "$BUILD_DIR_ARCH"/CLOVERX64.efi "$CLOVER_PKG_DIR"/EFI/BOOT/BOOTX64.efi
|
||||
fi
|
||||
|
||||
# Local Variables: #
|
||||
|
|
|
@ -420,26 +420,26 @@ public:
|
|||
|
||||
|
||||
REFIT_MENU_SCREEN()
|
||||
: ID(0), Title(0), TitleImage(0),
|
||||
: mPointer(), ID(0), Title(0), TitleImage(0),
|
||||
TimeoutSeconds(0), TimeoutText(0), Theme(0), AnimeRun(0),
|
||||
Once(0), LastDraw(0), CurrentFrame(0),
|
||||
Frames(0), FrameTime(0), FilmPlace({0,0,0,0}),
|
||||
Film(0), mAction(ActionNone), mItemID(0), mPointer() //, StyleFunc(&REFIT_MENU_SCREEN::TextMenuStyle)
|
||||
Film(0), mAction(ActionNone), mItemID(0) //, StyleFunc(&REFIT_MENU_SCREEN::TextMenuStyle)
|
||||
{};
|
||||
|
||||
REFIT_MENU_SCREEN(UINTN ID, CONST CHAR16* Title, CONST CHAR16* TimeoutText)
|
||||
: ID(ID), Title(Title), TitleImage(0),
|
||||
: mPointer(), ID(ID), Title(Title), TitleImage(0),
|
||||
TimeoutSeconds(0), TimeoutText(TimeoutText), Theme(0), AnimeRun(0),
|
||||
Once(0), LastDraw(0), CurrentFrame(0),
|
||||
Frames(0), FrameTime(0), FilmPlace({0,0,0,0}),
|
||||
Film(0), mAction(ActionNone), mItemID(0), mPointer() //, StyleFunc(&REFIT_MENU_SCREEN::TextMenuStyle)
|
||||
Film(0), mAction(ActionNone), mItemID(0) //, StyleFunc(&REFIT_MENU_SCREEN::TextMenuStyle)
|
||||
{};
|
||||
REFIT_MENU_SCREEN(UINTN ID, CONST CHAR16* Title, CONST CHAR16* TimeoutText, REFIT_ABSTRACT_MENU_ENTRY* entry1, REFIT_ABSTRACT_MENU_ENTRY* entry2)
|
||||
: ID(ID), Title(Title), TitleImage(0),
|
||||
: mPointer(), ID(ID), Title(Title), TitleImage(0),
|
||||
TimeoutSeconds(0), TimeoutText(TimeoutText), Theme(0), AnimeRun(0),
|
||||
Once(0), LastDraw(0), CurrentFrame(0),
|
||||
Frames(0), FrameTime(0), FilmPlace({0,0,0,0}),
|
||||
Film(0), mAction(ActionNone), mItemID(0), mPointer() //, StyleFunc(&REFIT_MENU_SCREEN::TextMenuStyle)
|
||||
Film(0), mAction(ActionNone), mItemID(0) //, StyleFunc(&REFIT_MENU_SCREEN::TextMenuStyle)
|
||||
{
|
||||
Entries.AddReference(entry1, false);
|
||||
Entries.AddReference(entry2, false);
|
||||
|
|
|
@ -19,7 +19,9 @@ XImage::XImage()
|
|||
{
|
||||
Width = 0;
|
||||
Height = 0;
|
||||
#if USE_ARRAY
|
||||
PixelData = nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
XImage::XImage(UINTN W, UINTN H)
|
||||
|
@ -34,6 +36,19 @@ XImage::XImage(UINTN W, UINTN H)
|
|||
#endif
|
||||
}
|
||||
|
||||
XImage::XImage(UINTN W, UINTN H, const EFI_GRAPHICS_OUTPUT_BLT_PIXEL* Data)
|
||||
{
|
||||
Width = W;
|
||||
Height = H;
|
||||
#if !USE_ARRAY
|
||||
PixelData.CheckSize(GetWidth()*GetHeight()); // change the allocated size, but not the size. size is still 0 here. PixelData[0] won't work.
|
||||
PixelData.SetLength(GetWidth()*GetHeight());
|
||||
PixelData.AddArray(Data, W*H);
|
||||
#else
|
||||
PixelData = (__typeof__(PixelData))AllocateCopyPool(W * H * sizeof(*PixelData), Data);
|
||||
#endif
|
||||
}
|
||||
|
||||
XImage::XImage(EG_IMAGE* egImage)
|
||||
{
|
||||
if ( egImage) {
|
||||
|
@ -373,16 +388,11 @@ void XImage::GetArea(INTN x, INTN y, UINTN W, UINTN H)
|
|||
UgaDraw = NULL;
|
||||
}
|
||||
|
||||
//this should be somewhere else
|
||||
INTN ScreenWidth = 0;
|
||||
INTN ScreenHeight = 0;
|
||||
egGetScreenSize(&ScreenWidth, &ScreenHeight);
|
||||
|
||||
if (W == 0) W = Width;
|
||||
if (H == 0) H = Height;
|
||||
|
||||
INTN AreaWidth = (x + W > (UINTN)ScreenWidth) ? ((UINTN)ScreenWidth - x) : W;
|
||||
INTN AreaHeight = (y + H > (UINTN)ScreenHeight) ? ((UINTN)ScreenHeight - y) : H;
|
||||
INTN AreaWidth = (x + W > (UINTN)UGAWidth) ? (UGAWidth - x) : W;
|
||||
INTN AreaHeight = (y + H > (UINTN)UGAHeight) ? ((UINTN)UGAHeight - y) : H;
|
||||
// INTN AreaWidth = (W > Width) ? W : Width;
|
||||
// INTN AreaHeight = (H > Height) ? H : Height;
|
||||
DBG("area is {%d, %d, %d, %d}\n", x, y, W, H);
|
||||
|
@ -422,26 +432,26 @@ void XImage::GetArea(INTN x, INTN y, UINTN W, UINTN H)
|
|||
|
||||
void XImage::Draw(INTN x, INTN y, float scale)
|
||||
{
|
||||
const EFI_GRAPHICS_OUTPUT_BLT_PIXEL BlueColor = { 200, 0, 0, 160 };
|
||||
// const EFI_GRAPHICS_OUTPUT_BLT_PIXEL BlueColor = { 200, 0, 0, 160 };
|
||||
//prepare images
|
||||
INTN ScreenWidth = 0;
|
||||
INTN ScreenHeight = 0;
|
||||
egGetScreenSize(&ScreenWidth, &ScreenHeight);
|
||||
// INTN ScreenWidth = 0;
|
||||
// INTN ScreenHeight = 0;
|
||||
// egGetScreenSize(&ScreenWidth, &ScreenHeight);
|
||||
// DBG("1\n");
|
||||
// XImage Background(ScreenWidth, ScreenHeight);
|
||||
// XImage* Background = new XImage(Width, Height);
|
||||
// DBG("2\n");
|
||||
// Background.GetArea(x, y, Width, Height);
|
||||
// Background->GetArea(x, y, Width, Height); //from screen
|
||||
// DBG("3\n");
|
||||
// XImage Top(*this, scale);
|
||||
// XImage Top(Width, Height);
|
||||
// XImage Top(*this, 1.f);
|
||||
// XImage* Top = new XImage(Width, Height, GetData());
|
||||
// DBG("4\n");
|
||||
// Top.CopyScaled(*this, 1.f);
|
||||
// Top.Fill(BlueColor);
|
||||
// DBG("5\n");
|
||||
// Background.Compose(x, y, Top, true);
|
||||
// Background.Compose(0, 0, Top, true);
|
||||
// DBG("6\n");
|
||||
UINTN AreaWidth = (x + Width > (UINTN)ScreenWidth) ? (ScreenWidth - x) : Width;
|
||||
UINTN AreaHeight = (y + Height > (UINTN)ScreenHeight) ? (ScreenHeight - y) : Height;
|
||||
UINTN AreaWidth = (x + Width > (UINTN)UGAWidth) ? (UGAWidth - x) : Width;
|
||||
UINTN AreaHeight = (y + Height > (UINTN)UGAHeight) ? (UGAHeight - y) : Height;
|
||||
// DBG("width: own=%d, Background=%d, Area=%d\n", Width, Background.GetWidth(), AreaWidth);
|
||||
|
||||
// prepare protocols
|
||||
|
@ -461,15 +471,17 @@ void XImage::Draw(INTN x, INTN y, float scale)
|
|||
//output combined image
|
||||
// DBG("7\n");
|
||||
if (GraphicsOutput != NULL) {
|
||||
GraphicsOutput->Blt(GraphicsOutput, (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *)GetData(),
|
||||
GraphicsOutput->Blt(GraphicsOutput, (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *)GetPixelPtr(0,0),
|
||||
EfiBltBufferToVideo,
|
||||
0, 0, //source x,y
|
||||
x, y, //destination x,y
|
||||
AreaWidth, AreaHeight, ScreenWidth * sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
|
||||
AreaWidth, AreaHeight, UGAWidth * sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
|
||||
}
|
||||
else if (UgaDraw != NULL) {
|
||||
UgaDraw->Blt(UgaDraw, (EFI_UGA_PIXEL *)GetPixelPtr(0, 0), EfiUgaBltBufferToVideo,
|
||||
0, 0, x, y,
|
||||
AreaWidth, AreaHeight, ScreenWidth * sizeof(EFI_UGA_PIXEL));
|
||||
AreaWidth, AreaHeight, UGAWidth * sizeof(EFI_UGA_PIXEL));
|
||||
}
|
||||
// delete Background;
|
||||
// delete Top;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ extern "C" {
|
|||
//#include "nanosvg.h"
|
||||
//#include "FloatLib.h"
|
||||
|
||||
#define USE_ARRAY 1
|
||||
#define USE_ARRAY 0
|
||||
|
||||
#if 0 //ndef EFI_GRAPHICS_OUTPUT_BLT_PIXEL
|
||||
typedef struct {
|
||||
|
@ -59,6 +59,7 @@ public:
|
|||
XImage(UINTN W, UINTN H);
|
||||
XImage(EG_IMAGE* egImage);
|
||||
XImage(const XImage& Image, float scale);
|
||||
XImage(UINTN W, UINTN H, const EFI_GRAPHICS_OUTPUT_BLT_PIXEL* Data);
|
||||
~XImage();
|
||||
|
||||
protected:
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#define POINTER_HEIGHT 32
|
||||
|
||||
XPointer::XPointer()
|
||||
: PointerImage(BuiltinIcon(BUILTIN_ICON_POINTER)),
|
||||
: PointerImage(NULL),
|
||||
newImage(POINTER_WIDTH, POINTER_HEIGHT),
|
||||
oldImage(POINTER_WIDTH, POINTER_HEIGHT)
|
||||
{
|
||||
|
@ -74,21 +74,26 @@ EFI_STATUS XPointer::MouseBirth()
|
|||
}
|
||||
|
||||
if (EFI_ERROR(Status)) {
|
||||
MsgLog("No mouse!\n");
|
||||
delete PointerImage;
|
||||
PointerImage = NULL;
|
||||
MouseEvent = NoEvents;
|
||||
SimplePointerProtocol = NULL;
|
||||
MsgLog("No mouse!\n");
|
||||
gSettings.PointerEnabled = FALSE;
|
||||
return Status;
|
||||
}
|
||||
|
||||
if ( PointerImage.isEmpty() ) {
|
||||
if ( !PointerImage->isEmpty() ) {
|
||||
//this is impossible after BuiltinIcon
|
||||
MsgLog("No pointer image!\n");
|
||||
SimplePointerProtocol = NULL;
|
||||
Alive = false;
|
||||
return EFI_NOT_FOUND;
|
||||
MsgLog(" pointer image! Renew it\n");
|
||||
//SimplePointerProtocol = NULL;
|
||||
//Alive = false;
|
||||
//return EFI_NOT_FOUND;
|
||||
delete PointerImage;
|
||||
}
|
||||
DBG("Now update image because of other theme\n");
|
||||
PointerImage = new XImage(BuiltinIcon(BUILTIN_ICON_POINTER));
|
||||
DBG("new image created\n");
|
||||
LastClickTime = 0; //AsmReadTsc();
|
||||
oldPlace.XPos = (INTN)(UGAWidth >> 2);
|
||||
oldPlace.YPos = (INTN)(UGAHeight >> 2);
|
||||
|
@ -112,15 +117,15 @@ VOID XPointer::Draw()
|
|||
|
||||
// take background image
|
||||
oldImage.GetArea(newPlace);
|
||||
// DBG("got area\n");
|
||||
DBG("got area\n");
|
||||
CopyMem(&oldPlace, &newPlace, sizeof(EG_RECT)); //can we use oldPlace = newPlace; ?
|
||||
|
||||
// CopyMem(newImage->PixelData, oldImage->PixelData, (UINTN)(POINTER_WIDTH * POINTER_HEIGHT * sizeof(EG_PIXEL)));
|
||||
// newImage.CopyScaled(oldImage, 1.f);
|
||||
|
||||
DBG("Draw pointer\n");
|
||||
// newImage.Compose(0, 0, PointerImage, true);
|
||||
// newImage.Draw(newPlace.XPos, newPlace.YPos, 1.f);
|
||||
PointerImage.Draw(newPlace.XPos, newPlace.YPos, 1.f);
|
||||
PointerImage->Draw(newPlace.XPos, newPlace.YPos, 1.f);
|
||||
}
|
||||
|
||||
VOID XPointer::KillMouse()
|
||||
|
@ -130,11 +135,15 @@ VOID XPointer::KillMouse()
|
|||
if (!SimplePointerProtocol) {
|
||||
return;
|
||||
}
|
||||
|
||||
DBG("KillMouse\n");
|
||||
// newImage.setEmpty(); // Don't empty them, we'll need them at the next mouse birth
|
||||
// oldImage.setEmpty();
|
||||
|
||||
// delete PointerImage;
|
||||
if (PointerImage) {
|
||||
delete PointerImage;
|
||||
PointerImage = nullptr;
|
||||
}
|
||||
|
||||
|
||||
MouseEvent = NoEvents;
|
||||
SimplePointerProtocol = NULL;
|
||||
|
|
|
@ -14,7 +14,7 @@ public:
|
|||
|
||||
protected:
|
||||
EFI_SIMPLE_POINTER_PROTOCOL *SimplePointerProtocol;
|
||||
XImage PointerImage;
|
||||
XImage* PointerImage;
|
||||
XImage newImage;
|
||||
XImage oldImage;
|
||||
|
||||
|
@ -35,7 +35,7 @@ public:
|
|||
bool MouseInRect(EG_RECT *Place);
|
||||
EFI_STATUS CheckMouseEvent(REFIT_MENU_SCREEN *Screen);
|
||||
|
||||
bool isEmpty() const { return PointerImage.isEmpty(); }
|
||||
bool isEmpty() const { return PointerImage->isEmpty(); }
|
||||
|
||||
protected:
|
||||
VOID Draw();
|
||||
|
|
Loading…
Reference in New Issue