You are here

VLCPortable v1.1.0 font rebuild issue

2 posts / 0 new
Last post
spchtr
Offline
Last seen: 4 years 3 months ago
Joined: 2006-08-10 20:26
VLCPortable v1.1.0 font rebuild issue

Ok, I've worked it out for myself at least. I don't know how to upload the updated files here though.

I recompiled VLCPortable.exe using the /Other/Source/VLCPortable.nsi file.

I added two lines to it. Comments are at the end of the line where I added with comments at the beginning a couple lines above each added line.

	LaunchNow:
		StrCmp $SECONDARYLAUNCH "true" LaunchAndClose
		;=== Backup local VLC files if present
		Rename `$APPDATA\vlc` `$APPDATA\vlc-BackupByVLCPortable`
		Rename `$APPDATA\dvdcss` `$APPDATA\dvdcss-BackupByVLCPortable`
		CreateDirectory `$APPDATA\vlc`

;== Ok Here's where we're actually copying the files.

		CopyFiles /SILENT `$SETTINGSDIRECTORY\*.cache-2` `$APPDATA\vlc\` ;==I added this line

		CopyFiles /SILENT `$SETTINGSDIRECTORY\ml.xspf` `$APPDATA\vlc\ml.xspf`
		CopyFiles /SILENT `$SETTINGSDIRECTORY\vlc-qt-interface.ini` `$APPDATA\vlc\vlc-qt-interface.ini`
		ExecWait $EXECSTRING
		CheckRunning:
			Sleep 1000
			FindProcDLL::FindProc "$PROGRAMEXECUTABLE"                  
			StrCmp $R0 "1" CheckRunning

;== Here is where it copys the files from $APPDATA\Roaming, etc.  It's missing the cache-2 file...

		CopyFiles /SILENT '$APPDATA\vlc\*.cache-2' '$SETTINGSDIRECTORY\' ;== I added this line

		CopyFiles /SILENT `$APPDATA\vlc\ml.xspf` `$SETTINGSDIRECTORY\ml.xspf`
		CopyFiles /SILENT `$APPDATA\vlc\vlc-qt-interface.ini` `$SETTINGSDIRECTORY\vlc-qt-interface.ini`

;== Here is where the deleting happens.

		RMDir /r `$APPDATA\vlc`
		RMDir /r `$APPDATA\dvdcss`
		Rename `$APPDATA\vlc-BackupByVLCPortable` `$APPDATA\vlc`
		Rename `$APPDATA\dvdcss-BackupByVLCPortable` `$APPDATA\dvdcss`
		GoTo TheEnd

I downloaded UnicodeNSISPortable: https://portableapps.com/node/21879
and PortableApps.comInstaller: https://portableapps.com/apps/development/portableapps.com_installer

I also had to download MoreInfo.dll because it was not included in UnicodeNSISPortable. It goes in the App/plugins folder.
I got it here: http://nsis.sourceforge.net/MoreInfo_plug-in

If you install VLCPortable 1.1.0, PortableApps.comInstaller, and UnicodeNSISPortable in the same parent folder, then make the changes to VLCPortable.nsi I described above. You can delete the VLCPortable.exe that comes in the installer. You then run UnicodeNSISPortable, and tell it to compile VLCPortable.nsi. It should compile with no problem. After compiling run VLCPortable.exe and open a video or something. It should create the font cache, then you should be able to close VLCPortable, reopen it, and it should not rebuild the font cache after that. I'm not sure where to send these instructions to get someone to put up a version of it that uses these two extra lines, so if someone has that information, or has the ability to put it up with the changes, please let me know.

Mark Sikkema
Offline
Last seen: 11 years 2 months ago
Developer
Joined: 2009-07-20 14:55
I have to add something here,

The official VLC Portable launcher is compiled with the official NSIS Portable, which is still the ANSI version. And due to a recent addition to the PA.c launcher still it does need the MoreInfo plug-in added.

But anyway, I had a quick look through the VLC Portable launcher source and I believe there should not be a difference in compile for unicode or ansi. Actually this will be an additional test for the unicode branch.

For unicode probably one line could be modified to prevent unwanted behavior.
VLCPortable.nsi, line 104 (remove the A):

System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${NAME}") i .r1 ?e'

to,

System::Call 'kernel32::CreateMutex(i 0, i 0, t "${NAME}") i .r1 ?e'

Formerly Gringoloco
Windows XP Pro sp3 x32

Log in or register to post comments