It is currently October 19th, 2020, 9:49 pm

General Question About .inc Files [retracted/solved]

Help with creating, editing & fixing problems with skins
User avatar
CodeCode
Posts: 102
Joined: September 7th, 2020, 2:24 pm

General Question About .inc Files [retracted/solved]

Post by CodeCode »

Is it possible and/or reasonable to have several .inc files to also each @include=Superparent.inc?

I am compiling a huge number of skins into a single MegaSuite. Many skins already have local .inc files and I wish to link them together with a 'superparent.inc'. This way I can hopefully minimise editing time but using this idea.

Thanks.
Last edited by CodeCode on October 15th, 2020, 8:46 am, edited 1 time in total.
Can't fix it if it ain't broke - unless it is in code.
User avatar
CodeCode
Posts: 102
Joined: September 7th, 2020, 2:24 pm

Re: General Question About .inc Files

Post by CodeCode »

I am finding using a single .inc to be more logical and easier to modify the edits required for all of my skins to function together with colour and font settings, and similar global variables.

So not going to pursue this, but I am still curious if it is possible without compromising the logic rainmeter functions on - e.g. more likely to generate an endless loop for example.

Thanks.
Can't fix it if it ain't broke - unless it is in code.
User avatar
Yincognito
Posts: 2760
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: General Question About .inc Files

Post by Yincognito »

CodeCode wrote: October 15th, 2020, 8:45 am I am finding using a single .inc to be more logical and easier to modify the edits required for all of my skins to function together with colour and font settings, and similar global variables.

So not going to pursue this, but I am still curious if it is possible without compromising the logic rainmeter functions on - e.g. more likely to generate an endless loop for example.

Thanks.
I don't know if I understood this correctly, but were you referring to some sort of a "base" .INC that your other .INCs would use through an @Include? If so, yes, it's possible, assuming there aren't conflicts between variable, measure, meter names and / or behavior. You must keep in mind though that if you use such a structure and you have identically named variables, measures, or meters, only one of those instances will be used. In the case of variables, for example, subsequent variable declaration will override previous declarations, if both have the same name. Bottom line, it all depends on the particularities of your scenario.

That being said, using a single .INC (at least for "shared" variables and / or elements between the skins) is the best idea. I already do this in my suite, where I have single Variables.inc, Styles.inc and Rainmeter.inc (i.e. Rainmeter section) files for all the skins in the suite. When doing that though, it may be useful to remember that although you include the same .INC file(s) in all your skins, each inclusion is separate from the others, meaning that each skin will have "duplicates" of the included variables and elements (compared to the other skins), which can be modified on a per skin basis.