Jump to content
blackosx

Clover SVG Theme Builder

9 posts in this topic

Recommended Posts

Vector themes for Clover are new and currently still under development. Setting out to re-create my BGM theme to vector I realised there was some learning needed in order to create a theme.svg file for Clover to use. As SVG files are text based, I quickly realised that they could be manipulated from the command line and looking at the Clovy theme I decided to break it down in to parts for creating other themes.

 

As a result, I've been working on Clover SVG Theme Builder

https://bitbucket.org/blackosx/cloversvgthemebuilder

 

Current Version:

0.3.2

 

Latest Updates:

- Allow just two checkboxes, instead of expecting night icons also.

- Include Selection Indicator.

- Can now process multiple themes from Themes directory.

- Improved logging.

 

Overview

The idea is to allow a theme designer to work on individual images and not worry about the required overall file structure which Clover expects. The designer can populate a Theme directory with a settings file and individual .svg files and let the script generate a final theme.svg file for using with Clover.

 

I've created a basic sample theme to help demonstrate the script.
https://bitbucket.org/blackosx/cloversvgthemebuilder/downloads/Theme.zip

 

The Theme directory contains Adobe Illustrator and SVG files for each image in the required folder structure for the script.

 

Using this sample theme, the script will generate this theme from the files.

 

e533YdK.png

 

The idea is these can be used to build new themes and I'm currently using it to build my BGM_SVG theme.

 

I can imagine far more complicated themes will be generated in the future, but for now I hope this may serve to help kickstart basic vector theme development.

 

Notes:
• Clover's SVG theme development is still underway and things are likely to change so this script and it's supporting template file will need to change with Clover.
• I've only tested this using SVG files saved from Adobe Illustrator using the following settings, for files from other apps may need added support.


v03hzKP.png


• For the script to correctly inject SVG code in to the template, each SVG image must contain a group of elements.

• Font files are currently not included in the final theme file but this can be an option.

• In time, maybe other templates can be added which have different layouts??

 

These are early days, so I'll update this post when necessary.

Edited by blackosx
Add tags

Share this post


Link to post
Share on other sites
Advertisement

Yeah, this could also be easily solved by implementing the use element. The problem is that nanosvg is pretty incomplete, and actually straight up wrong about a lot of stuff...

 

EDIT: Actually this appears to be implemented but unsure if it actually works.

EDIT2: Nevermind it's not properly implemented... I should have known better than to assume it was. lol

Edited by apianti

Share this post


Link to post
Share on other sites

Thanks for the info. I didn't know about the use element until now. How do you know all the stuff you know? ;)


So yeah, referencing an identifier from an external file is exactly the same kinda thing I'm doing here. Though my script does ensure each id is unique as I discovered issues when multiple instances of an id were contained in the same file.
 

Share this post


Link to post
Share on other sites

I research stuff before I talk about it and since I already researched which format for drawing would be the best to use for v3 as per properly scaling across many different display sizes and not look terrible, I have been researching SVG a lot. Also, yeah, multiple instances of the same identifier is not a properly formatted SVG. The difference is that the use element could reference any file structure at all that the theme designer decided on, except for of course needing theme.svg. Having multiple same identifiers in different files is totally acceptable and I do not think that the identifiers are imported because you can use the same identifier to import multiple times, also from multiple files. If I inspect the DOM tree in a browser there are no identifiers given to use imported elements (unless you explicitly assign an id to the use element doing the importing/duplicating). However, there is one drawback, you have to create a separate CSS file as CSS is not duplicated by the use element, which means you would need to have a

<?xml-stylesheet type="text/css" href="style.css" ?>
or
<link rel="stylesheet" type="text/css" href="style.css" />

element in all your SVGs to properly style everything. Actually, that's something I'm not 100% sure about, you may only need it in the theme.svg. Most likely that is the only place when I think about it, since everything will have to be styled by CSS. You can always have multiple CSS files as well if they become unwieldy or you want to store them directly with each file or something, but once again this leaves the design AND structure up to the designer. This should make it infinitely easier to create themes knowing you only need to have theme.svg and specifically named items for the GUI. However, it is possible to even remove the second restriction with javascript, since it is supported by SVG as well. There would then have to be a DOM like structure prepared by the GUI but this allows another cool feature, effects and animation by code. No need to duplicate each and every frame of an animation.

 

EDIT: Javascript also allows the theme to decide how and where to draw everything, and when to initiate the booting through the DOM, like say after animating a full screen fade away. Any information that would be needed would be provided by the DOM and retrieved by the theme to fulfill what it needs to do like create entries, get menu information, tools, etc. Themes could have unique menus if they wanted, and even perform GUI stuff like a built in shell, pretty much anything that you wanted.

EDIT2: There's actually a second drawback that I just realized, either anything you use import will (should) not have identifiers so you would have to use classes and stuff to actually do anything or it does import child identifiers which brings the same naming conflicts. Using classes could possibly cause a naming conflict similar to multiple identifiers, luckily though this is acceptable and only the last thing provided for a class would be used. However, in javascript there may be unintended side effects if you are not careful since you would have to most likely use classes to represent what you wanted to deal with. I think you should see though that this basically creates a website, and the same rules apply to coding a website...

EDIT3: Attributes still override CSS and are imported so if you use attributes to style everything then that would be fine. I need to look into the importing child identifiers, as I can't seem to find any information about it. Although it would be easy to test by creating some SVGs and using them in multiple browsers. I don't have time for that right now, nor is it really relevant currently since I'm talking entirely hypothetically about all of this since none of it is implemented, lol. It could be implemented in anyway that is needed in the end...

EDIT4: Oh yeah, forgot you can totally do a link element to import a stylesheet too, changed above.

Edited by apianti

Share this post


Link to post
Share on other sites

Yeah, pretty much. I think I made some posts about it somewhere, either in the general discussion or the v3 topic. I wrote a language parser for v3 so that it would be easier to parse text based formats, like xml, plist, svg, and programming languages with the same object interface. As it stands now, v2 basically parses everything independently even though both plist and svg are just xml with more rules enforcing the structure. Also, I wanted to create a more fluid settings structure that is tree based, instead of the current large memory structure. This allows the current settings to just be converted to and from a plist and that can be pushed onto the datahub to show the exact current configuration instead of regenerating it from partial memory structure like genconfig does. My time is just so limited because by the time I get free time, I'm super exhausted or sick from dealing with lights or screens from my migraines and vertigo. I also have lots of trouble sleeping from pain so I frequently black out when I'm doing things and just wake up in random places with no memory of what happened. This entire comment is super off topic for this thread though, lol.

 

EDIT: I guess I forgot the most important part, redesigning the GUI to allow better management of resources and directly drawing to the video buffer from another thread like the OSes do to prevent the random little freezes that happen when certain events happen. As well as starting the GUI immediately and then populating what's going on with everything so that there is very little time wasted just being at a blank screen. I haven't gotten this far yet, it's pretty much where I'm at now but I have to implement svg in order to actually have anything useful to draw and that takes a concerted amount of effort to design before hand to prevent having the same problem that v2 does which there are so many pieces of dead code and its impossible to tell what needs to be cleaned and what doesn't work and what some code actually even does because there are no comments, or confusing comments. There are plenty of comments from slice and I wondering what entire parts of code are doing/for.

Edited by apianti

Share this post


Link to post
Share on other sites

I've been updating and improving CloverSvgThemeBuilder to now include some support for using symbols and to also better handle generating either a day or night preview. I've also updated the sample theme which the script downloads.

 

The script is now at version 0.2.7 and can be found at https://bitbucket.org/blackosx/cloversvgthemebuilder/src/master/

 

I'm aware the script is not perfect (yet), has bugs and doesn't do much error checking either but all can be improved in time.


To also help others with vector themes, I've uploaded the Adobe Illustrator and resulting SVG files for BGM_SVG. There are two versions, one which uses individual images and a second which uses symbols for Functions, OSBadges, Volumes, Checkbox and RadioButtons.  Both versions of the theme can be built with CloverSvgThemeBuilder.


https://bitbucket.org/blackosx/cloversvgthemebuilder/downloads/

 

 

On 12/1/2018 at 11:12 PM, apianti said:

Yeah, pretty much. I think I made some posts about it somewhere, either in the general discussion or the v3 topic. I wrote a language parser for v3 so that it would be easier to parse text based formats, like xml, plist, svg, and programming languages with the same object interface. As it stands now, v2 basically parses everything independently even though both plist and svg are just xml with more rules enforcing the structure. Also, I wanted to create a more fluid settings structure that is tree based, instead of the current large memory structure. This allows the current settings to just be converted to and from a plist and that can be pushed onto the datahub to show the exact current configuration instead of regenerating it from partial memory structure like genconfig does. My time is just so limited because by the time I get free time, I'm super exhausted or sick from dealing with lights or screens from my migraines and vertigo. I also have lots of trouble sleeping from pain so I frequently black out when I'm doing things and just wake up in random places with no memory of what happened. This entire comment is super off topic for this thread though, lol.

 

EDIT: I guess I forgot the most important part, redesigning the GUI to allow better management of resources and directly drawing to the video buffer from another thread like the OSes do to prevent the random little freezes that happen when certain events happen. As well as starting the GUI immediately and then populating what's going on with everything so that there is very little time wasted just being at a blank screen. I haven't gotten this far yet, it's pretty much where I'm at now but I have to implement svg in order to actually have anything useful to draw and that takes a concerted amount of effort to design before hand to prevent having the same problem that v2 does which there are so many pieces of dead code and its impossible to tell what needs to be cleaned and what doesn't work and what some code actually even does because there are no comments, or confusing comments. There are plenty of comments from slice and I wondering what entire parts of code are doing/for.

I totally missed this post! Yeah OT, but thanks for all the info.

 

Clover V3 sounds like it could/would be amazing but I understand the amount of work involved especially when you're working alone. Spare time is hard to find these days and to dedicate to such a large project is a massive undertaking. Add your health issues on top and no wonder you're exhausted. All we can do is what we can, and when we can.

 

Regards

Edited by blackosx

Share this post


Link to post
Share on other sites

The script is now at version 0.3.2 and can be found at https://bitbucket.org/blackosx/cloversvgthemebuilder/src/master/

 

Changelog

- Allow just two checkboxes, instead of expecting night icons also.

- Include Selection Indicator.

- Can now process multiple themes from Themes directory.

- Improved logging.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Simon's InsaneMac
      Hi, I'm kind of lost when scrolling to Clover Configurator, so I decided to use an EFI from the web and just configure the most basic stuff. But that sadly didn't work, im always getting the attached screen IMG_0054.HEIC (and I don't know whether all the errors are listed, as I can't scroll). 
      Anyways I thought it'd be better to do a custom setup. Can anyone give me some help with what to choose in the settings? Here's my rig:
      i7 8700k
      Asus z370-G (Rog Strix)
      gtx 1060 6gb
      samsung ssd (SATA)
      WD hard drive
       
      Your help would be much appreciated!
    • By kylon
      A big thanks to wegface for teaching me a lot of things.
       
       
      Tested on Catalina 10.15.4 and Clover EFI 5104 (Catalina Patcher)
       
      Not Working:
      - realtek sd card reader (pm me if you have a fix)
       
      Notes:
      **CPU patches are disabled, if you are using a locked BIOS you must enable them**
       
      Clover EFI:
      - Install it in UEFI Mode and change your hdd partition table to GPT.
      - You will be able to install ANY OS in EFI mode, even if this pc does not support EFI at all! (No guide available for this)
       
      You will need:
      My unlocked BIOS (OPTIONAL) (here) Latest Clover config from CCE Bank (here) (asus k53sj-kylon) Rehabman Voodoo PS2 Controller (here) acidanthera AppleALC (here) acidanthera Lilu (here) acidanthera VirtualSMC (here) acidanthera SMCBatteryManager (here) acidanthera SMCLightSensor (here) acidanthera WhateverGreen (here) Mieze Realtek RTL8111 (here)
    • By y010204025
      Disclaimer: All files of this article are from itpwd.com and rehabman ’s github.com

       
      After Testing:
       
      Graphics card: NVIDIA K1000M / K2000M / K2100M / K3000M / K3100M / K4000M / M1000M (ordinary TN1600x900 or 1920x1080), AMD W5170M / W7170M (DC2 or 4K), Intel HD4000 (ordinary TN1600x900 or 1920x1080) can be driven normally, but NVIDIA graphics card Brightness adjustment is disabled. AMD W5170m and w7170m are the best choices on 8570W and 8770W. The brightness can be adjusted normally and the graphics performance is very good. For WX7100m and WX4170m, the graphics card fans cannot be controlled, and other methods are required to control the fans. CPU: 3rd generation Intel Core i3, i5 and i7 (Ivy Bridge architecture, including all dual-core and quad-core. Celeron and Pentium are not supported), frequency conversion is normal. In general: If you have 8570W, 8770W, and hope you can get the best Hackintosh experience, it is recommended to replace the CPU with i7-3840QM / i7-3940XM, 8570W is recommended to choose W5170M, 8770W, and it is recommended to choose W7170M. In addition: If you want to have a 4K experience or perfect HIDPI, W5170m / W7170M supports 4K output, you can choose a suitable 4K screen to replace, but because 4K screens are mostly edp interface, and 8570W / 8770W motherboard is lvds interface, This requires a custom screen cable, which seems to be a difficult choice, but you can choose to do it yourself or buy it separately. In China, taobao.com is almighty and may be more suitable for you than eBay.
       
      EFI features:
      out of the box, the relevant hardware can be driven after the OS is installed, and it is easy to use without code operation.
      Supported models: HP EliteBook 8470p, 8570p, 8570w, 8770w (click the model for official specifications)
      Wireless network card: Recommended: BCM94360cd (requires ipex4 to ipex1,3 antenna 1300mbps), BCM94352HMB / DW1550 (2 antennas, 867mbps)
      Wireless characteristics: no white list, wireless network card with Bluetooth does not support the Bluetooth function of the wireless network card (also does not need to shield the pins), but the wireless normal use, you need the Bluetooth function to use this machine comes with Bluetooth:
      Clover version: 5103, keyboard mapping has been added Command key = Alt key, Option key = Win key
      Supported systems: macOS Mojave 10.14.6 (18G103)-macOS Catalina 10.15.x,
       
      Notes on known issues:
      1. The touchpad and the left and right keys under the touchpad are normal, the pointing stick and the left and right keys above the touchpad are temporarily unavailable (recommended to use the second generation of Apple Magic Trackpad)
      2. Indicator display problem (can be ignored, function is normal): Caps light is sometimes not switched in time, mute / wireless key may be yellow
      3.AMD graphics card / Intel nuclear display has supported sleep and 15 levels of brightness adjustment, NVIDIA has no
      4. If the AMD graphics card enters Huaping, refer to editing the Clover startup parameters, and add the Boot parameter radpg = 15 (the EFI file that has been configured with this parameter has been uploaded, refer to the following EFI-guided download link)
      5. Using the above NVIDIA graphics card with a normal TN screen 1600x900 or 1920x1080 can not enter the installation interface, please check whether the VBiOS of the graphics card is exclusively for HP, thank you for your test face K1000M
      6. Due to product design defects, the MSata positions of 8570w and 8770w cannot be used as boot disks, so EFI boot can only be placed on the main hard disk (turn the machine over and open the hard disk in the lower left corner of the cover, which is the main hard disk). Put on msata plate
      +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      Hardware requirements:
      Model: 8470p, 8570p, 8570W, 8770W 1 or more, it is recommended to use another notebook for emergency Hard disk: It is recommended to choose an SSD hard disk of 240g or more. Samsung or Intel SATA hard disk is a good choice. Wireless card: BCM94352HMB, DW1550, BCM94360CD, miniPCIe slot U disk: 1 for 16g and above, another winPE emergency USB disk is recommended If you use a rescue USB flash drive, it means that you read this post carefully
       
      Make and install a USB flash drive:
      Get the mirror: please do it your way Making and installing a USB flash drive: macOS command line production is recommended, whether it is a real macOS model or a virtual machine (although this is not allowed to be discussed in many forums)Or you can choose to use TransMac or ether under Windows. This is not recommended, but it is simple enough for those new to Hackintosh. Make boot U disk: If you know how to put the boot into the installation U disk, unzip the EFI file and put it in the EFI partition, or you can choose a fat32 format U disk to store the EFI file separately Note: EFI is an unzipped folder, not a zip or ISO suffix file.
       
      BIOS settings From RehabMan
      To start, set BIOS to defaults.
      Then insure:
      UEFI boot is enabled (hybrid/with CSM for best result) secure boot is disabled disable fast boot IGPU graphics memory set to 64mb, if available disable the serial port via BIOS option, if available disable "LAN/WLAN switching", if available disable "Extended Idle Power States" if you find it under "Power Management Options" disable "Wake on LAN" and "Wake on USB" disable Firewire/IEEE 1394, if your laptop has it for Skylake and KabyLake laptop, enable "Launch Hotkeys without Fn keypress" Note: If you have a laptop with switchable graphics, leave it enabled. You can still use it on Windows, although the discrete card will be disabled when running OS X by the ACPI patches provided here. If you want to also disable it in Windows (via BIOS option), make sure you read about the DGPU option in your model specific SSDT (source is in SSDT-HACK.dsl), as in the scenario where the DGPU is disabled by BIOS, DGPU should be set to zero.
       
      Install:
      Please modify according to the above BIOS settings: Press F9 after booting, select the boot efi to file option, which is generally the last item. Enter your boot USB disk to find the location of cloverx64.efi, select cloverx64.efi, press Enter, and enter the clover boot interface. Select the location of the install entry and press Enter. Enter the macOS interface, use the disk tool to format the partition you need to install to hfs + or apfs format, do not choose the encryption option, this will make your efforts in vain. Note: The disk must be in gpt format, and the remaining EFI space is greater than 200M, 300mb + is recommended. If it is not, please try to modify it in WindowsPE environment. This may cause you to lose the Windows system boot and disk data. Please prepare for backup.
      After formatting the partition successfully, close the disk tool and select install, you will find the partition you installed, and follow the interface prompts. When the installation reaches a certain progress, it will restart. When restarting, select F9, enter from the boot U disk, select the disk partition where you installed macOS (no longer the U disk installation), the installation will continue, and it may restart 2 ~ 3 times Every time, you need F9 to select the boot. After entering the installation interface, except for the first installation, select the U disk, and then select the disk installation partition. Eventually you will enter the settings interface. After following the interface prompts, you will enter the macOS system interface. Remember the system password and turn off the Find my mac option.  
      Post install:
       
      After the installation is complete, you need to hang the EFI partition of the disk, copy the EFI file of the U disk to the EFI partition of the disk, so that you can directly use the disk to boot, otherwise you need to select the U disk to boot each time. The mount tool can choose cloverconfigurator. If after copying the EFI file to the disk, the computer cannot recognize your clover boot, you can use the custom boot option of bios: set the custom boot path to \efi\clover\cloverx64.efi, and set it as the first boot, Use bootice or easyUEFI to increase the clover boot option under Windows and set it as the first boot. If you do not have a wireless network card available temporarily, you can use the USB binding function of your Android phone to share the network. This may require the HoRndis driver. It is not recommended to use a US wireless network card. If you need Windows or Linux, you can install it normally. Be careful not to let Windows overwrite your boot files.  
      For other uses of macOS and brew, please pay attention to forums and other communities. Hackintosh is just the beginning.
       
      Finally, I would like to thank rehabman, vit9696 and others who contributed to Hackintosh. I also thank Cwen for his efforts to modify files and hardware tests. I hope that Hackintosh will be eternal.
       
      Please comply with the laws and regulations of your country or region. My description may not be clear or professional, but I think it is necessary. I think the existence of Hackintosh is everyone's technical hobby and experience macOS, not as a substitute for macOS cheap hardware.

      EFI_8x70_5103_W7170m_20200116 .zip
    • By StarFighter_77
      I built this hack years ago now. Started with Lion, now on El Cap. I want to update now to High Sierra.

      I think I messed up my Clover when I downloaded the update .pkg and just installed it without taking my time or customizing the install. Was on Clover r3423, now I think I'm on r5104

      I've been searching and reading this site and others for a few days before making this thread, but I need help compiling what I've learned to get my system running correctly again and ready to update to High Sierra. Then, eventually, I want to update my graphics card, switch to UEFI (if necessary) and update to Mojave.

      I couldn't get system to boot. Could get to Clover and all the options, except the Shell... I hit enter on the Shell and I get black screen and nothing.

      The only way I got it to boot was to add -v to boot args, and change smbios from 14,2 to 13,2. Not sure why that worked still. Also I'm running two monitors, but I can only now run one of them off the Intel 3000 Graphics and the second one off my GFX Card.

      So now I'm afraid to shut down or reboot.... I could really use some help with Clover.

      I'm pretty sure my config file in Clover is not right. Also, some of the files in my Clover backups are not in the new Clover install. (2.5k 5104)

      If someone could please take a look at the files I've attached and help me sort this out, I would be grateful. Thank you, Thank you, Thank you.

      I've attached
      - The last boot log
      - The current Clover folder from the EFI partition after performing Clover update. (.zip)
      - The Clover backup that was working before Clover update (.zip)
      - Library/Extensions Folder (screen shot)
      - System/Library/Extensions Folder (.zip)

      Here is my current hardware:

      Mobo: GIGABYTE GA-Z68MX-UD2H-B3

      CPU: Intel Core i7-2600K

      GPU: GIGABYTE ATI Radeon HD6870 1GB DDR5 2DVI/HDMI/2x

      RAM: Corsair Vengeance Blue 16 GB DDR3 SDRAM Dual Channel Memory Kit CMZ16GX3M4A1600?C9B

      HD0 (for OS and Apps): OCZ Technology 120 GB Vertex Series SATA II Solid State Drive

      HD1 (file storage, Adobe scratch disk): Samsung 1 TB Spinpoint 7200 RPM 32MB Cache SATA

      BURNER: LG CD/DVD Burner Model GH22NS50

      CPU COOLER: Corsair Cooling Hydro Series H50 All in One High-performanc?e CPU Cooler CWCH50-1

      P/S: Antec CP-850 850 Watt CPX Power Supply Unit

      CASE: Antec Performance One P183 V3 Case
      CLOVER.zip
      CloverBackup.zip
      bootlog.txt

      S_L_E.zip
    • By rodrinico19
      Hola a todos, primero que nada estoy muy contento de a ver econtrado un foro de español sobre hackintosh.
      Mi problema consesite en que descargue unos drivers de esta pagina: https://github.com/chris1111/Wireless-USB-Adapter-Clover
      Seguí los pasos instale los kets en la carpeta EFI/CLOVER/OTHERS todo tal cual como dice ahi la instalación. luego segui los pasos de configurar la red dentro de configuracion del sistema etc.
      Lo cual el nombre me quedo en en0.
      El driver o kets funciona bien es reconocible por el S.O de hecho conecta la red, pero me dice que no tiene IP AUTO ASIGNADA Y LA OTRA QUE HAY UNA DESCONEXION A CADA RATO(como que desconectaras y conectaras el dispositvo usb a cada rato)
      Me gustaria que me ayuden con eso si es posible, Muchas Gracias!!
×