Jump to content

Clover General discussion


ErmaC
29,869 posts in this topic

Recommended Posts

23 hours ago, graphine said:

Hello,

 

Any way to get oem logo or default windows logo to show when booting windows?

Currently it only shows the loading animation.

 

20 hours ago, Slice said:

Booting Windows with Clover 5112 I see Windows blue flag as Microsoft proposed.

 

Actually the Windows logo doesn't depend on Clover but on the presence of the BGRT table, which, if you don't get logo means is present on your motherboard.

I implemented now in Clover (commit) an option to drop tables also for Windows. Please look in the commit config-sample.plist an example of what you will need to add to config.plist to drop that table - that should bring you the wanted windows logo.

(Of course you will need to compile the current version from sources to have the functionality.)

Edited by Pene
  • Like 2
Link to comment
Share on other sites

19 hours ago, Pene said:

Hi @Slice,

After your commit 2a731df ("fix vector theme appearance"), badge images are really small, in all themes that use badges (regular and svg).

(And in case you aren't aware of it, I'll also mention that vertical scroll in cesium still doesn't appear properly).

I agree, there are bugs and should be resolved.

  • Like 1
Link to comment
Share on other sites

21 minutes ago, Pene said:

 

 

Actually the Windows logo doesn't depend on Clover but on the presence of the BGRT table, which, if you don't get logo means is present on your motherboard.

I implemented now in Clover (commit) an option to drop tables also for Windows. Please look in the commit config-sample.plist an example of what you will need to add to config.plist to drop that table - that should bring you the wanted windows logo.

(Of course you will need to compile the current version from sources to have the functionality.)

It works, windows logo now shows.

  • Like 1
Link to comment
Share on other sites

18 minutes ago, lisai9093 said:

Tried r5113 Clover but has several glitches:

1. Arrow under OS is not shown. I enabled "bootcampstyle" option which works for older version of Clover

2. Font is not proportional anymore, even in the title of the OS

The problems are probably with your theme. The fact that it worked before does not mean your theme is ok. For example, I bet your bootcamp indicator is in the no longer supported .icns instead of png. But if it is png, attach your theme and someone might take a look.

Edited by Pene
Link to comment
Share on other sites

4 minutes ago, Pene said:

The problems are probably with your theme. The fact that it worked before does not mean your theme is ok. For example, I bet your bootcamp indicator is in the no longer supported .icns instead of png. But if it is png, attach your theme and someone might take a look.

I think the bootcampstyle=yes is built-in for Clover and I don't have any arrow png or icns for it to work. Here is the link when Needy implemented it: 

 

Link to comment
Share on other sites

2 hours ago, lisai9093 said:

I think the bootcampstyle=yes is built-in for Clover and I don't have any arrow png or icns for it to work. Here is the link when Needy implemented it: 

You are correct, getting an embedded icon in case one did not get loaded wasn't working properly. I committed a correction. Build from sources and try again.

 

If you want me to look also at what's happening with your font, attach your theme.

Edited by Pene
  • Like 1
Link to comment
Share on other sites

8 hours ago, Pene said:

You are correct, getting an embedded icon in case one did not get loaded wasn't working properly. I committed a correction. Build from sources and try again.

 

If you want me to look also at what's happening with your font, attach your theme.

Thanks for your help! Here is my theme: OSS1. The font is not proportional any more. Usually the font is proportional in title screen but not under option screen.

OSS1.zip

Link to comment
Share on other sites

@Slice


Hi, something is unclear to me about .icns support.

I thought it was removed, but then I see in LoadXImage:

 XStringW FileName = L"icons\\" + IconName + L".icns";
  Status = egLoadFile(BaseDir, FileName.data(), &FileData, &FileDataLength);
  if (EFI_ERROR(Status)) {
    XStringW FileName = L"icons\\" + IconName + L".png";
    Status = egLoadFile(BaseDir, FileName.data(), &FileData, &FileDataLength);

But after that, there is only png decode:

  Status = FromPNG(FileData, FileDataLength);

So, currently, if an .icns exists, it is loaded, but then decoding fails. Is this a mistake? What was the intention - to support icns or not?

Edited by Pene
Link to comment
Share on other sites

1 hour ago, Pene said:

@Slice


Hi, something is unclear to me about .icns support.

I thought it was removed, but then I see in LoadXImage:


 XStringW FileName = L"icons\\" + IconName + L".icns";
  Status = egLoadFile(BaseDir, FileName.data(), &FileData, &FileDataLength);
  if (EFI_ERROR(Status)) {
    XStringW FileName = L"icons\\" + IconName + L".png";
    Status = egLoadFile(BaseDir, FileName.data(), &FileData, &FileDataLength);

But after that, there is only png decode:


  Status = FromPNG(FileData, FileDataLength);

So, currently, if an .icns exists, it is loaded, but then decoding fails. Is this a mistake? What was the intention - to support icns or not?

It is right for retro compatibility, but images with .icns exstension must be in png format for real. If you remove it, then all existing themes will be in a non working state? 

example: https://github.com/CloverHackyColor/CloverThemes/tree/master/ClassicalDark/icons

and this is an icon: https://github.com/CloverHackyColor/CloverThemes/blob/master/ClassicalDark/icons/os_centos.icns?raw=true

... that is a png image even if the extension say otherwise. 

 

EDIT

But now i can see that this icon is 176x176 pixels.... should not be 128x128 instead? :worried_anim:

Edited by vector sigma
  • Like 1
Link to comment
Share on other sites

16 minutes ago, Slice said:

AFAIK it must be 128.  But BGM256 has icons of size 256 somehow so it is also pissoble.

Clover.app actually, during the optimizing, resize the images:

          let image = try ThemeImage(themeImageAtPath: fullPath)
          let size = image.size
          let fileName = fullPath.lastPath
          if file.hasPrefix("icons/") || file.hasPrefix("alternative_icons/") {
            if (fileName.hasPrefix("os_") || fileName.hasPrefix("vol_")) { // 128x128 pixels
              if size.width != 128 || size.height != 128 {
                image.size = NSMakeSize(128, 128)
              }
            } else if (fileName.hasPrefix("func_") ||
              fileName.hasPrefix("tool_") ||
              fileName == "pointer.png") { // 32x32 pixels
              if size.width != 32 || size.height != 32 {
                image.size = NSMakeSize(32, 32)
              }
            }
          } else {
            if file == logo { // logo 128x128 pixels
              if size.width != 128 || size.height != 128 {
                image.size = NSMakeSize(128, 128)
              }
            } else if file == Selection_big { // selection_big 144x144 pixels
              if size.width != 144 || size.height != 144 {
                image.size = NSMakeSize(144, 144)
              }
            } else if file == Selection_small { // selection_small 64x64 pixels
              if size.width != 64 || size.height != 64 {
                image.size = NSMakeSize(64, 64)
              }
            } else if (file == "radio_button" ||
              file == "radio_button_selected" ||
              file == "checkbox" ||
              file == "checkbox_checked") { // 15x15 pixels
              if size.width != 15 || size.height != 15 {
                image.size = NSMakeSize(15, 15)
              }
            }
          }
          try image.pngData.write(to: URL(fileURLWithPath: fullPath))

Sorry is in swift, but I think is understandable. I saw some authors that uses real . icns in the past had very big images up to 512x512 pixels so the app resize them.

I can make this happen for all the relevant images but I need to know the size. Supposing both os_ and vol_ images are 256x256 I can leave as is when found (same for 128x128). Anyway you can see something wrong in the code I can improve? 

Edited by vector sigma
  • Like 1
Link to comment
Share on other sites

@vector sigma 

I think, since many have also monitors up to 5k, having icons constraint to 128px would be a bit awkward

so the best i guess would be leaving the icon size as it is  [ if (fileName.hasPrefix("os_ ") || fileName.hasPrefix("vol_")  (as per theme built-in choice) ] since it always worked fine.

Then the real issue here is not your app, but how clover now interprets those vol_ files and why it resize them.

 

Link to comment
Share on other sites

53 minutes ago, LAbyOne said:

@vector sigma 

I think, since many have also monitors up to 5k, having icons constraint to 128px would be a bit awkward

so the best i guess would be leaving the icon size as it is  [ if (fileName.hasPrefix("os_ ") || fileName.hasPrefix("vol_")  (as per theme built-in choice) ] since it always worked fine.

 

Hi, the optimizing task is only for wrong themes.  if a real icns is present we need to know a size as it can be any, see here:

https://github.com/CloverHackyColor/CloverThemes/blob/master/CloverCamp/icons/os_mac.icns?raw=true

and from the same theme:

https://github.com/CloverHackyColor/CloverThemes/blob/master/CloverCamp/icons/os_win.icns?raw=true

 

the first contains pngs up to 512 pixels, the second up to 128. Not sure this is ok. I agree this must be free, but what when is clearly wrong?

So when is 5k should have a max size any way? And averyone agreed that at least 128x128 is the minimum size? 

 

53 minutes ago, LAbyOne said:

Then the real issue here is not your app, but how clover now interprets those vol_ files and why it resize them.

True

Edited by vector sigma
Link to comment
Share on other sites

28 minutes ago, vector sigma said:

Hi, the optimizing task is only for wrong themes.  if a real icns is present we need to know a size as it can be any, see here:

https://github.com/CloverHackyColor/CloverThemes/blob/master/CloverCamp/icons/os_mac.icns?raw=true

and from the same theme:

https://github.com/CloverHackyColor/CloverThemes/blob/master/CloverCamp/icons/os_win.icns?raw=true

 

the first contains pngs up to 512 pixels, the second up to 128. Not sure this is ok. I agree this must be free, but what when is clearly wrong?

So when is 5k should have a max size any way? And averyone agreed that at least 128x128 is the minimum size? 

 

I see, well there obviously the major inconsistence is given by the fact not only he/she mixed up real .icns

and .png files but also with different sizes into same theme, and it ends in a big mess

 

btw even on a 5k screen 512px will be huge i guess as an icon (don't know for sure as i do not have a 5k)

but for a 4k 256pix is more then enough, to have a good visual.

 

 

 

  • Like 1
Link to comment
Share on other sites

25 minutes ago, LAbyOne said:

I see, well there obviously the major inconsistence is given by the fact not only he/she mixed up real .icns

and .png files but also with different sizes into same theme, and it ends in a big mess

ha ha. What I want to do is to make in a working state those themes. Suppose you have a raw theme (unfinished) and you want to not lose time to resize images manually... maybe Clover.app can be used to finish the job, just respect the aspect ratio of the images and "voilà" :)

 

25 minutes ago, LAbyOne said:

btw even on a 5k screen 512px will be huge i guess as an icon (don't know for sure as i do not have a 5k)

but for a 4k 256pix is more then enough, to have a good visual.

 

How can I detect a 4k themes? From the background size? I want to make an algo that recognize them..

 

12 minutes ago, Badruzeus said:

Yeah, my uploaded themes contain diff icon sizes: 128 (small), 176 (medium), 256 (large) and 384 (extra large) pixels. :D

You mean in the same theme?

Edited by vector sigma
  • Like 1
Link to comment
Share on other sites

1 hour ago, vector sigma said:

You mean in the same theme?

Nope. Seems like 'Aero' theme uses 128px, while Classical* 176px, Apocalypse 256px, and Catalina4k uses 384px.

 

Anyway, with Clover r5113 (stolen from Slice on another thread) I got "System halted" immediately when choosen random theme has 'anime'. Hmmb..

 

debug.log_r5113_AOH.zip

 

Edited by Badruzeus
Link to comment
Share on other sites

38 minutes ago, vector sigma said:

How can I detect a 4k themes? From the background size? I want to make an algo that recognize them..

 

well is not easy, to guess what would be the best option to follow...

I mean, before involving a such algo into the app, it would be optimal for you to know how Clover will eventually work in the future...

 

i.e.

i made a few themes for the nkd's opencore branch, and themes are put in place (resized) by given screen resolution into config.plist, so when scanning themes folder it adapts the background (normal 1920x1080 or 4k 3840x2160) to actual given resolution by the user... and also the icons made at max given resolution to fit a 4k to be downsized by the engine in case of a smaller reso.

 

If Clover (would/could) act the same way this would be the best option, giving the possibility to include both backgrounds into a theme and having always different reso covered. And your app at that point could simply adapt to that concept with just one algo.

 

Then even not involving such a drastic changes, the algo should take in account mostly the user parameters given by its config, or any optimizazion (resize etc) could be compromised... if different resolutions are present in all themes.

 

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...