okamibl / xy-vsfilter

Automatically exported from code.google.com/p/xy-vsfilter
0 stars 0 forks source link

Support for unrar.dll to be in same Folder as vsfilter.dll #137

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. VSFilter supports RAR'ed subtitles.
2. The Zoom Player developer has asked me to post here, requesting support in 
VSFilter for the unrar.dll file to be in the same folder as vsfilter.dll
3. Currently, xy-vsfilter is used by Zoom Player's Install Center. It installs 
to Program Files (Program Files (x86) on 64bit) and if the unrar.dll file could 
be located in the same folder as xy-vsfilter, then Zoom could support RAR'ed 
subtitles.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide related subtitle script (if any). And the less characters
the script is, the less effort I have to make to fix the issue, so if you
could make the script as simple as possible, that would be appreciated.

Please provide any additional information below.

Original issue reported on code.google.com by forum.an...@gmail.com on 23 Feb 2013 at 8:04

GoogleCodeExporter commented 8 years ago
> unrar.dll file to be in the same folder as vsfilter.dll

I'm a bit confused as to why this change is being requested. Please elaborate.

Original comment by cyber.sp...@gmail.com on 23 Feb 2013 at 11:19

GoogleCodeExporter commented 8 years ago
I will check with Blight (Zoom's dev) and get back to you - I'm unsure of the 
reason.

Original comment by forum.an...@gmail.com on 4 Mar 2013 at 9:51

GoogleCodeExporter commented 8 years ago
Hi, bLight here,
As far as I can tell, without unrar.dll either in the searchable system path or 
in the same directory as vsfilter.dll, the filter will not unrar subs.

This is the case where the subs are ripped from directly from a DVD and come in 
a combination of an ".idx" files with a RARed ".sub" files.

For example:

Movie.mkv
Movie.idx
Movie.rar (containing movie.sub)

Since you can't guarantee that the user has unrar.dll in the system path, the 
support for this subtitle format is broken.

This is why I recommend including unrar.dll in the installer.

Original comment by inmat...@gmail.com on 4 Mar 2013 at 2:32

GoogleCodeExporter commented 8 years ago
VSFIlter uses LoadLibrary for unrar.dll which follows the DLL search order as 
described here:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586

> Since you can't guarantee that the user has unrar.dll in the system path
> This is why I recommend including unrar.dll in the installer.

Our official installer includes unrar.dll, and installs it to the system path. 
This behavior was inherited from an older version of the MPC-HC's Inno Setup 
install script for VSFilter. Is there a reason why this can't be done by the 
custom xy-VSFilter installer you've been using in the Zoom Player Install 
Center?

If there is a problem, we'll consider merging MPC-HC's support for integrated 
unrar in our next release, which would eliminate the need for an external dll 
altogether.

Original comment by cyber.sp...@gmail.com on 4 Mar 2013 at 5:59

GoogleCodeExporter commented 8 years ago
Eliminating the need for an external DLL would be the best option, but I can 
include it with our custom installer if it's too much of a headache for you.

Let me know and I'll act accordingly.

Original comment by inmat...@gmail.com on 5 Mar 2013 at 11:01

GoogleCodeExporter commented 8 years ago
unrar.dll added to DirectVobSub installer in Install Center (silent update, no 
version number change to xy-vsfilter). unrar.dll installed to same folder as 
VSFilter.dll.

Original comment by forum.an...@gmail.com on 6 Mar 2013 at 1:57

GoogleCodeExporter commented 8 years ago
> Let me know and I'll act accordingly.

I don't suspect it would be an issue to merge, but the main setback at the 
moment is time until the next official release. YuZhuoHuang is spending all of 
his time working on xy_sub_filter for madVR. A follow up "normal" release to 
xy-VSFilter 3.0.0.211 would likely come after that, worse case, a few months 
from now.

Next week, I'll make an attempt at merging the "integrated unrar" change 
myself. If I'm successful, I'll attach a GIT Patch here.

> unrar.dll added to DirectVobSub installer in Install Center
> unrar.dll installed to same folder as VSFilter.dll

Is this something new, or are you just saying this is what DirectVobSub 
installer in Zoom Player's Install Center has been doing, hence the problem? 
Since as you already mentioned, unrar.dll installed to same folder as 
VSFilter.dll won't be loaded.

Original comment by cyber.sp...@gmail.com on 7 Mar 2013 at 12:22

GoogleCodeExporter commented 8 years ago
> 
Is this something new, or are you just saying this is what DirectVobSub 
installer in Zoom Player's Install Center has been doing, hence the problem? 
Since as you already mentioned, unrar.dll installed to same folder as 
VSFilter.dll won't be loaded.

It is something new, yes. By the above notes, I believe that Blight thought 
that adding unrar.dll to the VSFilter folder would in fact enable RAR'd 
subtitles to work, as did I.

I have no samples to test with, but one of the Zoom Player forum users has 
tested, and has verified that it indeed does not work 
(http://forum.inmatrix.com/index.php?showtopic=13971 - post #2 and following).

Anyway, I have asked Blight to pop back in here to comment, and I have reopened 
the Zoom Player tracker report that prompted the request to the xy-vsfilter 
tracker (I assumed Blight's adding of unrar.dll to the installer would have 
resolved it).

(And yes, now that you mention it, I do remember issue #117 and the paths 
required for this to work - I had forgotten)

Original comment by forum.an...@gmail.com on 8 Mar 2013 at 8:49

GoogleCodeExporter commented 8 years ago
The current options are essentially one of the following:

1) Install unrar.dll 32-bit to one of the system directories like ./System32 
(w/ x86 OS) or ./SysWOW64 (w/ x64 OS) to mimic the behavior of our official 
installer

OR

2) Install unrar.dll to the same directory as the application VSFilter is 
called from. For example, the same directory as zplayer.exe if unrar 
functionally only needs to function with Zoom Player, but not system wide.

OR

3) Create a sub-directory which only contains unrar.dll, and add that ./unrar 
directory to the to the PATH environment variable. Please do not add the 
vsfilter.dll install directory to PATH, since that could just lead to problems 
down the line.

OR

4) Wait for an new version

Original comment by cyber.sp...@gmail.com on 8 Mar 2013 at 11:02

GoogleCodeExporter commented 8 years ago
Thanks, I've passed this information to Blight. He is busy with the preparation 
for the final release of Zoom v8.6 at the moment, but I;m sure he will respond 
soon after that.

Personally, I think #2 is the best option.

Original comment by forum.an...@gmail.com on 10 Mar 2013 at 1:48

GoogleCodeExporter commented 8 years ago
I'm confused.
Under windows, the usual method of loading a DLL is:
1. Look at the same directory as your own code is running from.
2. The Windows system directory.
3. The rest of the path.

Is it the case that because vsfilter is a DLL being run under zoom player that 
vsfilter.dll doesn't check for the unrar.dll in the path vsfilter.dll itself is 
installed?  Is this something that can be easily patched into .212?

I hate having to install these types of DLLs into the system directory. Over 
the years I experienced major hassle with other software overwriting these type 
of DLLs with older and not always compatible versions...

And the reason I'm not placing the DLL in the Zoom Player directory as I feel 
it may leave an folder on uninstall under certain conditions.

Original comment by inmat...@gmail.com on 10 Mar 2013 at 3:54

GoogleCodeExporter commented 8 years ago
Courtesy of BrunoReX, xy-VSFilter now supports static unrar linking (ported 
from MPC-HC), which removes the need to ship a separate unrar.dll.

Original comment by cyber.sp...@gmail.com on 3 Mar 2014 at 1:51