It is currently January 22nd, 2021, 3:18 pm

[BUG] Variable files overwritten when Merge skins is selected in package installer

Report bugs with the Rainmeter application and suggest features.
User avatar
mpurses
Posts: 14
Joined: May 12th, 2020, 6:17 pm

[BUG] Variable files overwritten when Merge skins is selected in package installer

Post by mpurses »

I need to be able to merge (not delete user created files, because I let them create presets for Themes/Visualizers) AND preserve their variables upon upgrading a skin.

Looking at the docs and the code give conflicting info. This says it should preserve variables:
https://docs.rainmeter.net/tips/advanced-rmskin-options/
Both Variables files and Merge skins:
One or more .ini (or .inc) files are listed in Variables files, and Merge skins is checked.
Result:
Both actions are done.
Can be used used to change a skin .ini file while leaving existing variable values set by the user unchanged.
Can be used to add lines to a .inc file, while leaving existing variable values set by the user unchanged.
But the Rainmeter code does not seem to allow it:
https://github.com/rainmeter/rainmeter/blob/7bd5279964f3302be53c84a2e83a0dde947f21fa/Library/DialogInstall.cpp#L856-L859

Code: Select all

 if (!m_MergeSkins && m_BackupSkins) 
 { 
 	KeepVariables(); 
 } 
Image
Can test with my skin: https://github.com/mpurses/Sonder/releases/download/v2.6.4/Sonder_2.6.4.rmskin
I've posted this issue in the forum/github before, but haven't been able to make friends with a developer yet. Can we be friends? :welcome:
User avatar
SilverAzide
Rainmeter Sage
Posts: 1092
Joined: March 23rd, 2015, 5:26 pm

Re: [BUG] Variable files overwritten when Merge skins is selected in package installer

Post by SilverAzide »

Well, I guess I can't be your friend because I'm not a developer, but I do see what you are saying at least. Perhaps the ! operator was accidently copied from the if statement up above that section of code? The way it stands now, it does appears as if a "merge skin" cannot preserve variables, as you noted.

It also will not create a backup, which seems to be required for the variables to be preserved. In fact, if you have a normal "non-merge" skin and UNcheck the option to create a backup when you install, it also will not preserve your variables. :confused:
Gadgets Wiki GitHub More Gadgets...
User avatar
Brian
Developer
Posts: 2074
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: [BUG] Variable files overwritten when Merge skins is selected in package installer

Post by Brian »

We are aware of the bug report(s), but have not had time to look into them as of yet.

Since there is another thread about this and a github issue, I am going to lock this thread.

Sorry about the lack of response.

-Brian