It is currently April 26th, 2024, 10:12 am

Include metadata does not work

Get help with creating, editing & fixing problems with skins
User avatar
Sundance
Posts: 4
Joined: November 5th, 2012, 6:19 am

Include metadata does not work

Post by Sundance »

Hi all,

I have a weird problem and can't figure. I am including files from my @Resource folder. That works fine except for Metadata. Is there a restriction of some kind.

My main file looks like this:

Code: Select all

[Metadata]
Name=
Author=
Information=
License=
Version=
@include=#@#Metadata.inc

[Variables]
FontFace=Tahoma
@include=#@#Variables.inc
My Metadata include file located in the @Resources folder

Code: Select all

[Metadata]
Name=MySkin
Author=MyName
Information=MyInfo
License=Free
Version=1.0
My Variables include file located in the @Resources folder

Code: Select all

[Variables]
FontFace=Calibiri
While the variables are overwritten by the inlcude file, the metadata seem to be not. When I refresh the skin and select Manage skin from the context menu, the Metadata are empty.

Any idea?
Best regards, Sundance
User avatar
jsmorley
Developer
Posts: 22630
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Include metadata does not work

Post by jsmorley »

Sundance wrote:Hi all,

I have a weird problem and can't figure. I am including files from my @Resource folder. That works fine except for Metadata. Is there a restriction of some kind.

My main file looks like this:

Code: Select all

[Metadata]
Name=
Author=
Information=
License=
Version=
@include=#@#Metadata.inc

[Variables]
FontFace=Tahoma
@include=#@#Variables.inc
My Metadata include file located in the @Resources folder

Code: Select all

[Metadata]
Name=MySkin
Author=MyName
Information=MyInfo
License=Free
Version=1.0
My Variables include file located in the @Resources folder

Code: Select all

[Variables]
FontFace=Calibiri
While the variables are overwritten by the inlcude file, the metadata seem to be not. When I refresh the skin and select Manage skin from the context menu, the Metadata are empty.

Any idea?
Metadata is not read and interpreted at all by the main Rainmeter application, only the Manage window. That is just reading the .ini file and will never see anything in an @Include file. You really can't, nor is there any real need to, put Metadata in a .inc file.
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: Include metadata does not work

Post by MerlinTheRed »

Well, if you want the same metadata information in all skins of a suite, @including it and only having it in one file would seem to be a sensible approach to me...
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
jsmorley
Developer
Posts: 22630
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Include metadata does not work

Post by jsmorley »

MerlinTheRed wrote:Well, if you want the same metadata information in all skins of a suite, @including it and only having it in one file would seem to be a sensible approach to me...
Well you can't... ;-)

The Manage window is the only thing that needs or uses Metadata, and it would be crazy to actually load the skin in Rainmeter (or some subset of Rainmeter) every time you viewed it (don't forget, nothing in Manage says a skin must be "loaded" to view the Metadata) just to resolve information in include files, not to forget that we would also have to resolve any variables using in the @Include option, like #@#.

I'm sure something light-weight could be done in Manage itself to accomplish this, but I have a hard time thinking of anything I would see as a lower priority...
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: Include metadata does not work

Post by Kaelri »

I would oppose this, actually. The purpose of metadata is to make it as easy and reliable as possible to identify a skin .ini file without an external reference - in other words, it's something that needs to be in the code.

Skins are frequently copied and excerpted around the Internet without any context. Readme files get lost or deleted; support links get broken; older versions become mismatched with newer versions; modifications eventually distort the original skin beyond recognition. Having good, accurate metadata right there in the file makes it so much easier (and faster) to trace those skins back to their original sources and find whatever solution is needed.

Besides which, how much metadata can you really include? "Name" is supposed to be unique for every .ini. "Information" typically is anyway, if the instructions are any good. "Author," "Version" and "License" might be identical for a whole suite, but in my opinion, those three are probably the most important elements to have embedded in the code, for the reasons I described above.

In short, I think it's really important to have this stuff hard-coded, and I would continue doing so in my skins even if an include option were available.