View Single Post
Old 07-22-2022, 12:52 PM   #9
rtiangha
Evangelist
rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.
 
Posts: 495
Karma: 356531
Join Date: Jul 2016
Location: 'burta, Canada
Device: Kobo Glo HD
Quote:
Originally Posted by asettico View Post
I store my patch selections and values' customization in a .patch file I build running the command:
Code:
diff -ru "original patches folder" "my patches folder" > mycustom.patch
When new firmware and patches are released, I apply mycustom.patch to the new patch folder, fixing possible conflicts.

My 2 cents.
That is the most geeky way I've seen to manage this. Respect.

For those on Windows or who don't have access to the diff/patch commandline utilities, you can separate any patches where you need to edit values into their own file and maintain those; that way, when a new patch set comes out, you can copy over everything in the folder (except for kobopatch.yaml) without having to worry about your customizations getting overwritten. You may need to update your customized patches if things like offsets change later on, but that's usually rare, especially for patches that affect CSS.

To do this, first you need to map your overrides file to the binary being patched. For example, this is what I have near the top of kobopatch.yaml for customized libnickel patches:

Code:
patches:
  src/libnickel.so.1.0.0.yaml: usr/local/Kobo/libnickel.so.1.0.0
  src/libnickel.so.1.0.0_custom.yaml: usr/local/Kobo/libnickel.so.1.0.0
I put all of the libnickel patches that I need to edit into src/libnickel.so.1.0.0_custom.yaml (you can name it whatever you want).

Let's say I want my own values for the Dictionary text font-family/font-size/line-height patch. I would copy/paste that patch from src/libnickel.so.1.0.0.yaml into src/libnickel.so.1.0.0_custom.yaml and make my edits. Then in my overrides section, I have this:

Code:
overrides:
  src/libnickel.so.1.0.0.yaml:
    Dictionary text font-family/font-size/line-height: no
  src/libnickel.so.1.0.0_custom.yaml:
    Dictionary text font-family/font-size/line-height: yes
This makes kobopatch use my customized version of the dictionary patch, rather than the default one. The first entry is optional since all the stock patches ship as 'no' for enabled by default, but I like setting it explicitly for completeness sake.

If my customized dictionary patch fails in future versions because something changed in the firmware, then all I need to do to update it is to copy over the updated stock patch and reapply my edits.

Many paths up the mountain, lol.
rtiangha is offline   Reply With Quote