mjrgh / PinballY

A table browser and launcher ("front end") for virtual pinball cabinets.
Other
47 stars 22 forks source link

unable to drag-drop media pack #14

Closed toccata10 closed 5 years ago

toccata10 commented 6 years ago

It seems a very cool feature, but I can't make it work. I tried with this on my acdc table: http://vpuniverse.com/forums/files/file/3118-acdc-stern-2013-media-pack/ Tried with various other media pack. No luck so far: I need to unack and drag the wheel or playfield. drag-pb-01

mjrgh commented 6 years ago

I tried that same file, and it's working fine for me. When you download it, what's the file name you're seeing in the local file system? For that particular file, it should be ending with .rar to indicate that it's a RAR archive. The drop file mechanism senses the file type based on the name suffix, so if that's not being set right, that would explain why it's not being seen as an archive when you drop it.

And just to be clear, you need to do this in two steps:

  1. Download the file to your local disk
  2. Drop the downloaded file

In other words, you can't just drop the hyperlink from the Web browser.

toccata10 commented 6 years ago

ACDC (Stern 2013)HPMP.rar is the name of the file. Draging an individual file works (playfield still image or video for example), but not the pack. I tried to install pinbally with the x64 msi files (I had it just uncompressed before). No difference. It's located in c:\Visual_Pinball\PinballY Could something be missing on my system ?

mjrgh commented 6 years ago

What's the exact sequence of messages you see on the screen during the drag operation?

Also, perhaps you could try manually renaming the file to something really simple, say "Test.rar", just to make sure there aren't any mysterious hidden characters in the name or anything weird like that.

In terms of external dependencies, no, there are basically none. (If you're thinking "Do I need a separate RAR tool installed?", the answer is no.)

toccata10 commented 6 years ago

A screen recording of my pb drag-drop-pb.zip

mjrgh commented 5 years ago

I'll have to add some more logging to figure out what's going on. It looks like PinballY isn't seeing any media files when it tries to unpack the RAR. The thing that's weird is that the identical file (assuming you're using the same file you linked earlier in the thread) works for me doing the same operation. So I guess I'll have to add some logging to list exactly the files that the program thinks it sees on your machine when it tries to unpack the RAR. I'll get back to you when I have something for you to try out.

Out of curiosity, does the same thing happen if you use a ZIP file? Maybe try this:

  1. Unpack the RAR into a folder on your hard disk (looks like you've already done that)
  2. Re-pack the folder into a ZIP file
  3. Do the same drag-and-drop operation with the ZIP file that's been failing with the RAR
toccata10 commented 5 years ago

Yes, that's the same if I create a zip or .7z file (starting from the same ACDC archive. It tried with numrous media packs (so different compressions, different folders structure,...) and it failed everytime.

mjrgh commented 5 years ago

One more question. I noticed in the video that none of the individual image filenames have extensions (.JPG, .PNG, etc) in your unpacked folder tree. I'm assuming that's just because you have Windows Explorer set to "hide filename extensions", and that the files actually do have the extensions. And the copy of the RAR that I downloaded from your link does have the extensions, so again, assuming we're really using the same file, it shouldn't be any different on your system. But just to be sure, when you look at the RAR with a RAR tool, you do see the extensions, right? (Because if they're missing from the file listing inside the RAR, that's the whole problem.)

MikePinball commented 5 years ago

I tried with several different HyperPin media packs and it failed for me too. Same error message as toccata.

I haven't read the source code, yet, but do you have an internal, debugging build that turns on a more detailed error log? That might help.

mjrgh commented 5 years ago

I finally had a chance to look into this and figured out what's going on. The problem is that I've been including the 32-bit version of 7z.dll in the 64-bit distribution, so it's just not able to unpack archive files at all in the 64-bit build. (When I tested the RAR you pointed me to, I had my build machine set to the 32-bit version and didn't think to try switching it over, which is why it was working when I tried it.)

I've fixed the installer so that future updates will have the right DLL version. If you want to fix it in on your machine immediately, you should be able to download a copy of the current official 7-zip 64-bit Windows distribution, install it, and copy the 7z.dll from there into your PinballY\7-zip folder. Or maybe easier still, just download the 64-bit 7z.dll from the PinballY repos, here:

https://github.com/mjrgh/PinballY/tree/master/7-Zip/x64

mjrgh commented 5 years ago

Should be fixed now in the Beta 2 release.

toccata10 commented 5 years ago

Thanks for the beta release with all these improvements. I updated using the minimal update, but the new 7z.dll is not included in the package, so it didn't work until I downloaded the 7z.dll from github. I think it should be added to this package (7z.dll doesn't seem to be included in the x64 zip package either).

mjrgh commented 5 years ago

I updated using the minimal update, but the new 7z.dll is not included in the package,

Right: per the description...

"The Minimal ZIP package is much smaller because it only has the core PinballY files, without any of the required third-party components."

7z.dll being a third-party component, it's not included. (If I started including third-party components in the "minimal" update, it would be exactly the same as the "full" update, so there'd be no point in having a separate version.)

Unfortunately, it's not possible to create a true minimal updater that only consists of the files that have been changed since you last installed, since that would be different for everyone. At least, it wouldn't be possible to create such a thing as a pre-packaged download of this sort. That would require a Web-based installer that compares what's on your machine to what's on the server before downloading anything. Such things exist, but I'm not currently equipped with anything like that.

mjrgh commented 5 years ago

And by the way, you should probably grab the full install for this round, since the minimal installer doesn't have the new Javascript DLL either, being another third-party DLL.

toccata10 commented 5 years ago

OK. Thanks. Unless I make a mistake, I can't see this 7z.dll in the full portable version neither (http://www.mjrnet.org/pinscape/downloads/PinballY/PinballY-64bit-20190122.zip)

mjrgh commented 5 years ago

Unless I make a mistake, I can't see this 7z.dll in the full portable version neither

You're quite right! My release script change to put the appropriate bit version of the DLL in each ZIP accidentally put BOTH DLLs in the 32-bit ZIP. Oops. I'll fix that. (The MSIs look like they have the right ones, though.)

toccata10 commented 5 years ago

On a side note, with my computer, I had to rename the "ffmepg64" folder to "ffmepg", otherwise I couldn't capture anymedia. Maybe, it should look 1st in the "ffmpeg64", then in the "ffmpeg".

mjrgh commented 5 years ago

On a side note, with my computer, I had to rename the "ffmepg64" folder to "ffmepg"

I'm guessing you installed from the ZIP download rather than the MSI? It looks like this is another bug in my script that builds the ZIP; the files should have been installed into .\ffmpeg in the first place. I'll fix it for future updates.