You are here

VLCPortable Rebuild Font Cache Fixed... Was:nsis action CopyFiles for randomly named file with known file extension

6 posts / 0 new
Last post
spchtr
Offline
Last seen: 5 years 7 months ago
Joined: 2006-08-10 20:26
VLCPortable Rebuild Font Cache Fixed... Was:nsis action CopyFiles for randomly named file with known file extension

Hello there. I have an issue with VLCPortable wanting to rebuild the font cache every time it's launched. This to me is undesirable behavior, and to be avoided. The new VLC 1.1.0 is creating a file xxxxxxxxxxxxxxxxx-i386.cache-2 in $Appdata/vlc. The x's there appear to be a random string generated some how from what it was able to build. I think I've found where to copy this file in VLCPortable.nsi but need to figure out how to express wildcards for the file as the actual file name is unknown.

I'd like to add a line before the first CopyFiles to copy the xx-i386.cache-2 file to my $settingsdirectory.

Ok I figured out the wildcard. simple *-i686.cache-2 should do it I think.
Getting a couple of errors on the compile though in macro CheckForPlatformSplashDisable Macro. It appears to be looking for the PortableApps.com Platform, which I do not have installed. I use the apps individually with my own launcher, so I'm not really planning on having this installed when I run the app... Any way around this?

It's also claiming there's an error in the VLCPortable\Other\Source\VLCPortable.ini file. when I try to compile. New to this compiling so any help appreciated.

The lines added were:

		CopyFiles /SILENT `$SETTINGSDIRECTORY\*.cache-2` `$APPDATA\vlc\`

;==Just before

		CopyFiles /SILENT `$SETTINGSDIRECTORY\ml.xspf` `$APPDATA\vlc\ml.xspf`

And

		CopyFiles /SILENT '$APPDATA\vlc\*.cache-2' '$SETTINGSDIRECTORY\'

;==Just before

		CopyFiles /SILENT `$APPDATA\vlc\ml.xspf` `$SETTINGSDIRECTORY\ml.xspf`

I did have to comment out some of the CheckForPlatformSplashDisable code which seems to check durring compile to get company information out of the PortableApps.com/Platform. As I do not have this installed it would not compile on my system without commenting these lines out, however if someone were to compile it with these added lines I'd be pleased as punch to download that copy.

Simeon
Simeon's picture
Offline
Last seen: 9 years 5 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
ok

the wildcard is correct. I guess you are missing the CheckForPlatformSplashDisable.nsh which is included in all recent releases I guess. Just put it into the same folder as the vlcportable.nsi.
As for errors: I cant help you there as I dont know their exact words. Posting them in pre tags would help a lot.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

spchtr
Offline
Last seen: 5 years 7 months ago
Joined: 2006-08-10 20:26
Errors when compiling:

Error in macro CheckForPlatformSplashDisable on macroline 16
Error in script "D:\Pub\Var\Experimental\VLCPortable\Other\Source\VLCPortable.nsi" on line 176 -- aborting creation process

Basically in CheckForPlatformSplashDisable.nsh I commented out the lines where it's checking for PortableApps.comDisableSplash, and the like. About 15~18 lines or so, it compiled fine after that, no errors. Disabling the splash screen works fine if put in the VLCPortable.ini file.

These lines were commented out in CheckForPlatformSplashDisable.nsh:

		ReadEnvStr $1 PortableApps.comDisableSplash
		StrCmp $1 "true" "" _CFPSDStackEnd

		${GetParent} $EXEDIR $1
		IfFileExists $1\PortableApps.com\PortableAppsPlatform.exe "" _CFPSDStackEnd

		MoreInfo::GetProductName `$1\PortableApps.com\PortableAppsPlatform.exe`
		Pop $R0
		StrCmp $R0 "PortableApps.com Platform" "" _CFPSDStackEnd

		MoreInfo::GetCompanyName `$1\PortableApps.com\PortableAppsPlatform.exe`
		Pop $R0
		StrCmp $R0 PortableApps.com "" _CFPSDStackEnd

		!ifdef NSIS_UNICODE
		FindProc $R0 PortableAppsPlatform.exe
		!else
		FindProcDLL::FindProc PortableAppsPlatform.exe ; Onto $R0
		!endif
		IntCmp $R0 1 "" _CFPSDStackEnd _CFPSDStackEnd

Since I don't have the whole suite installed, or the platform itself installed, or in place, it can't find PortableAppsPlatform.exe to get the info it's looking for. The information appears to be company name and the like. Which is why I was kinda hoping John or one of the original developers could take what I've got here and run with it. I'm quite enjoying the change it's made to the startup time when launching from *.avi files.

The cache file is only about 1MB on my system so it's not too much space considering how much vlc takes up.

One of these days I've really got to learn how to code.

Mark Sikkema
Offline
Last seen: 12 years 6 months ago
Developer
Joined: 2009-07-20 14:55
Missing MoreInfo plug-in

You can get the plug-in here: http://nsis.sourceforge.net/MoreInfo_plug-in

Formerly Gringoloco
Windows XP Pro sp3 x32

spchtr
Offline
Last seen: 5 years 7 months ago
Joined: 2006-08-10 20:26
fair enough

That did it, though I'm not sure why it's not giving me an error, PortableAppsPlatform.exe is nowhere on my system.

Mark Sikkema
Offline
Last seen: 12 years 6 months ago
Developer
Joined: 2009-07-20 14:55
Compile-time and run-time are

Compile-time and run-time are two separate things.

What CheckForPlatformSplashDisable.nsh does is check if there is the env.var. to disable the splash, if it exists it checks if the menu is the official PAMenu, and only then it will disable the splash.

So your VLCPortable is now able to pick-up this global setting from the PAMenu, although I believe this will be an option for a future release of PAM and only currently available as a test some where on the forum.

I like the splashes anyway, so I don't really care about it !

Formerly Gringoloco
Windows XP Pro sp3 x32

Log in or register to post comments