It is currently April 23rd, 2024, 8:06 pm

[Request] Only overwrite the 'Variables' section in variables files

Report bugs with the Rainmeter application and suggest features.
User avatar
raiguard
Posts: 660
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

[Request] Only overwrite the 'Variables' section in variables files

Post by raiguard »

I recently discovered the 'Variables files' function in the .RMSKIN packager, which solves ALL of my problems. Seriously, I created an entire convoluted system of settings backups and imports using LUA to read the variables files and import the values, all for naught, because that functionality was baked-in to the skin installer this entire time!

Anyway, rant over. My problem is a very specific usecase that relates to the new HWiNFO SMV that stangowner made recently. To make the SMV work for a suite, one needs to add new sections to the corresponding .INC file, so the SMV knows what sensors to have in its list.

For example, the following section produces the corresponding list in the SMV:

Code: Select all

[HWiNFO-Config-General]
HWiNFO-CPU0-RingClock=Ring/LLC Clock (MHz)
HWiNFO-CPU0-PackageTemp=CPU Package Temperature (degrees)
HWINFO-CPU0-PackageTt=CPU Package Thermal Throttling (yes/no)
HWiNFO-CPU0-Core0TjMax=Core 0 Distance to TjMax (degrees)
HWiNFO-MOBO-CPUFan=CPU Fan (Motherboard Sensor) (RPM)
2018-10-19 21_41_23-HWiNFO Shared Memory Viewer.png
This is all well and good, except for the fact that the 'variables files' functionality will overwrite any changes made to these values, effectively freezing them as they are. If I were to accidentally leave in a typo, or simply wish to rename an item, it would never be able to be changed.

So could the functionality be changed to only overwrite values in the [Variables] section, rather than the entire file?
You do not have the required permissions to view the files attached to this post.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
Virginityrocks
Posts: 478
Joined: February 26th, 2011, 10:22 pm

Re: [Request] Only overwrite the 'Variables' section in variables files

Post by Virginityrocks »

I try to make sure my skins are as complete as possible and that there is very little that might be changed to a "Variables Files" file. These are basically for user settings that you don't want changed if the user decides to upgrade their skin. Just be careful. And if you do need an overhaul of a variables files, I guess you're going to have to ask the user to do a clean install.

If I may, I want to take the time to inject my own suggestion: Using directories in the Variables Files section to protect all files and subfolders within that location from being overwritten or removed by an update. This could include all images within a location, all .inis, all shortcuts, etc. Rather than needing to include each and every file individually.
User avatar
raiguard
Posts: 660
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: [Request] Only overwrite the 'Variables' section in variables files

Post by raiguard »

Virginityrocks wrote: October 20th, 2018, 8:58 pm I try to make sure my skins are as complete as possible and that there is very little that might be changed to a "Variables Files" file. These are basically for user settings that you don't want changed if the user decides to upgrade their skin. Just be careful. And if you do need an overhaul of a variables files, I guess you're going to have to ask the user to do a clean install.

If I may, I want to take the time to inject my own suggestion: Using directories in the Variables Files section to protect all files and subfolders within that location from being overwritten or removed by an update. This could include all images within a location, all .inis, all shortcuts, etc. Rather than needing to include each and every file individually.
The variables files contain a multitude of user settings that are meant to be configured at the user's leisure. Take for example the CPU Meter settings:
2018-10-20 16_27_54-D__Settings_Caleb_Rainmeter_Skins_ModernGadgets_CpuMeter_Settings_CpuMeterSettin.png
This settings UI changes variables contained within the CPU Meter variables file. These are the kinds of things that a user would wish to preserve across updates. I already made a system to import a user's customizations after updating, but if I can use variables files instead, it would save me a whole load of trouble.

Preventing the variables files from changing completely would break a lot of things. I add and remove variables with every update, so keeping them static would cause errors all over the place. My skins are meant to be as configurable as possible without the user needing to directly edit the skin's code, so there are TONS of options in each file.
You do not have the required permissions to view the files attached to this post.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Request] Only overwrite the 'Variables' section in variables files

Post by jsmorley »

Wouldn't it serve to have a separate Variables.inc file and HWiNFOStuff.inc file, and not mix the two? Then just @Include them both in the skin(s).

Anyway, to be honest, this is a large change to the skin installer, and one that would need very careful thought, design and testing. I wouldn't hold my breath while everyone is really tied up with the work on D2D that is going on, as well as some other significant improvements that are in the works.
User avatar
raiguard
Posts: 660
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: [Request] Only overwrite the 'Variables' section in variables files

Post by raiguard »

jsmorley wrote: October 20th, 2018, 11:47 pm Wouldn't it serve to have a separate Variables.inc file and HWiNFOStuff.inc file, and not mix the two? Then just @Include them both in the skin(s).

Anyway, to be honest, this is a large change to the skin installer, and one that would need very careful thought, design and testing. I wouldn't hold my breath while everyone is really tied up with the work on D2D that is going on, as well as some other significant improvements that are in the works.
I understand, I can deal without having this request fulfilled. The issue with having a separate HWiNFOStuff file is that it needs to include both the actual HWiNFO ID variables, as well as the SMV config sections, in one file (this is a limitation of the SMV's design). If I excluded that file from the variables files list, then the user would need to reconfigure their IDs on every update, which is exactly what I'm trying to avoid in the first place.

Anyway, thanks for considering.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017