It is currently March 28th, 2024, 2:18 pm

Automation of writing skins using Java

General topics related to Rainmeter.
Post Reply
rxtd
Posts: 100
Joined: April 30th, 2017, 11:51 am

Automation of writing skins using Java

Post by rxtd »

Hi everyone!
Long time ago I tried to make some skins, and turned out if what I want is not a single skin that you are not going to modify in future, I have two options:
1) Rewrite hundreds on lines every time you modify few lines, because these changes require you to modify other skins.
2) Use include with dozens of files and still have to modify files a lot, optionally with hundreds of variables.
3) Use some external tool to generate skins.
I actually gave up on creating my skins the time I tried includes, mostly because skin sources became unreadable after some point. Using first approach I didn't even make something moderately complex because life is too short.

This summer I created a simple Java library that allows me to write my skins without caring about "what if I need to move this element by 5 pixels in 10 skins which require moving other 30 elements in every skin in different directions" and reuse parts of the skin in other skins. Yes, I know that this and a lot more can be achieved with variables and formulas of various complexity — see second approach above, and includes are not flexible enough for my needs.
Additionally now I don't have to create unique names for measures/meters. I don't have typos in my skins — some are eliminated by design, some can't be made because java code won't compile. Also I have autocomplete and all this stuff.

I'm not sure if someone need it but I saw people complaining about automation and code reuse, so I think that my library can be useful. I wanted to post it here but I don't have much time now and I didn't finish some parts — for example, most of the plugins are missing, I didn't create useful way to use Shape meter and includes, documentation is missing although almost everything can be found online. The majority of what documentation contains is already working, though.

As I don't nave time until at least end of this year, if I post it the way it is now, it will remain unchanged and therefore will require using handwork to use some parts of the Rainmeter features. Well, if someone else won't help me finishing this.

I write this post to ask: does someone need a tool like this and can tolerate some missing parts, or would like to help finish it?
If so, I can post it somewhere in the Plugins & Addons forum.
Here is what using it looks like:
2018-09-18_17-00-14.png
To clarify:
  • It does not create skins all by itself. You need to write java code for skin generation.
  • It does not make skin creation easy: you need to understand what exactly you want to write in terms of Rainmeter .ini file.
It is possible to create some snippets to make life easier, and that's what I did after making it work. I can create a lot of skins with similar elements without effort but I need to create an element template the first time I use it.
I published my skin suite, and I think you can understand why I didn't want to create it using notepad or some other text editor.
Post Reply