It is currently April 20th, 2024, 12:43 am

relative SkinPath on portable mode

Get help with installing and using Rainmeter.
Primula
Posts: 2
Joined: December 31st, 2010, 8:15 pm

relative SkinPath on portable mode

Post by Primula »

hi
i've been searching in this forum (and google) to no avail, or maybe i did it wrong..
anyway, I use rainmeter as a portableapps and i notice something
as you know, with portableapps you can't expect the drive letter to be the same everytime you insert your flashdisk/harddisk in different computer, unfortunately it seems that rainmeter uses absolute path in its configuration..
i've been tried using relative path but failed miserably... (something like "SkinPath=..\Rainmeter\Skins\")
the question is, can we use relative path, especially on SkinPath configuration so we don't need to change the drive letters manually?
currently after i change computer and run rainmeter it always shows warning message "There are no available skins at : [path]"
anyhelp appreciated, thanks before :)

EDIT :
after trying it some more, i notice that i can use relative path for "configs" but not "themes", when i try to load themes it always shows that warning message so maybe the problem lies withing themes only
thing is, some of advance (and some that are really beautiful) skins are package as themes...

EDIT#2 :
if you right click the skin -> edit skins.. it says the system cannot find the path specified and only shows blank notepad
dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: relative SkinPath on portable mode

Post by dragonmage »

There does seem to be something amiss. I'm in the middle of moving now so it may be a few days but I will investigate further.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: relative SkinPath on portable mode

Post by jsmorley »

I'm not sure I completely understand the issue, but Rainmeter does indeed (and always has) resolve "SkinPath" when run, and write it to Rainmeter.ini if it does not already exist. Everything else revolves around this. RainThemes and RainBrowser have no hard coded paths at all, but use "SkinPath" when they look for skins.

RainThemes and RainBrowser actually worked ok for for me with "SkinPath=\Rainmeter\Skins" or "SkinPath=.\Skins" or "SkinPath=Skins\" hard coded in Rainmeter.ini when Rainmeter was in "C:\Rainmeter\", as they are designed to resolve a relative path to a full one at runtime, and as long as you have your skins and themes and addons in folders under the one containing Rainmeter.exe, they worked ok. I didn't fully test them though. They just didn't blow up right out of the gate.

RainBackup fails for sure. Also any skin using the built-in #SKINSPATH# variable fails as things are at a different "relative" position when you are in a skin, and I suspect lots of other things will as well. I have no idea what impact this would have on the many 3rd party plugins and addons written for Rainmeter. Some might be fine with it, some might not.

So I don't think putting a relative path as "SkinPath" in Rainmeter.ini is going to work well. The best alternative I think, is for PortableApps, or any home grown solution to "taking Rainmeter on the road" remove the SkinPath= line from Rainmeter.ini before launching Rainmeter. That would solve all issues I believe, as SkinPath would be automatically recreated when Rainmeter starts, and everything is happy.

Here is a tiny app you can put in the same folder with Rainmeter.exe, and run it instead of Rainmeter.exe to start Rainmeter. It will remove the "SkinPath" setting from Rainmeter.ini and launch Rainmeter. Works like a charm.
RunRainmeter.zip
You do not have the required permissions to view the files attached to this post.
Primula
Posts: 2
Joined: December 31st, 2010, 8:15 pm

Re: relative SkinPath on portable mode

Post by Primula »

jsmorley wrote:RainThemes and RainBrowser actually worked ok for for me with "SkinPath=\Rainmeter\Skins" or "SkinPath=.\Skins" or "SkinPath=Skins\" hard coded in Rainmeter.ini when Rainmeter was in "C:\Rainmeter\", as they are designed to resolve a relative path to a full one at runtime, and as long as you have your skins and themes and addons in folders under the one containing Rainmeter.exe, they worked ok. I didn't fully test them though. They just didn't blow up right out of the gate.
ah, so i set the wrong path? XD
ok, thanks for your enlightment
jsmorley wrote:RainBackup fails for sure. Also any skin using the built-in #SKINSPATH# variable fails as things are at a different "relative" position when you are in a skin, and I suspect lots of other things will as well. I have no idea what impact this would have on the many 3rd party plugins and addons written for Rainmeter. Some might be fine with it, some might not.
maybe that's the problem, all skin that i tried using #SKINPATH# variable
jsmorley wrote:So I don't think putting a relative path as "SkinPath" in Rainmeter.ini is going to work well. The best alternative I think, is for PortableApps, or any home grown solution to "taking Rainmeter on the road" remove the SkinPath= line from Rainmeter.ini before launching Rainmeter. That would solve all issues I believe, as SkinPath would be automatically recreated when Rainmeter starts, and everything is happy.

Here is a tiny app you can put in the same folder with Rainmeter.exe, and run it instead of Rainmeter.exe to start Rainmeter. It will remove the "SkinPath" setting from Rainmeter.ini and launch Rainmeter. Works like a charm.
RunRainmeter.zip
wow, thanks for the help, tried it and it works wonder until now