quanticc / lawena-recording-tool

Simple movie recording tool for Source Engine games
http://lawena.github.io/
GNU General Public License v3.0
80 stars 16 forks source link

Reducing conflicts with SrcDemo2? #36

Closed nosoop closed 10 years ago

nosoop commented 10 years ago

Hiya. Just would like to note that since LWRT writes a log file (?) into the recording output directory, there ends up needing to run this and SrcDemo2 in a specific order to get everything working properly.

Going to double-check this myself, but there definitely seems to be a conflict one way or another.

quanticc commented 10 years ago

Hi, I'll appreciate any extra detail you can give me about this, like what steps cause problems and what works.

I don't think it's related to the logging mechanism but this is not the first time I heard about some conflicts between these two tools.

Lawena shouldn't log anything to the recording output folder, it's not expected at least. Give me more details about that.

nosoop commented 10 years ago

Alrighty, here we go. Thanks for the quick response!

Reproduce by first activating SrcDemo2 and then attempting to start up TF2 through Lawena. The following settings to note:

Log window:

[18:08:59.658] Settings saved
[18:08:59.774] Problem while saving settings to file
Caused by java.nio.file.NoSuchFileException: S:\My Documents\My Videos\TF2-Lawena

Status message: Failed to save lawena settings to file

Using version 4.1.2 of LWRT and build 2012-04-07 of SrcDemo2. Both SrcDemo2 and Lawena are using the same Java 7 32-bit install on a 64-bit Windows 7 machine and running with administrative privileges.

What does work: Starting TF2 through LWRT and then activating SrcDemo2 before recording.

Other thing to note is that the directory SrcDemo2 creates in place appears as a mounted volume under Explorer. I'd suspect that Java just doesn't recognize the mounted volume as a valid directory.

And yeah, LWRT definitely isn't saving anything to the directory, so there's no issue with that. If you need any other information, let me know.

quanticc commented 10 years ago

Thank you very much for the detailed response. I did some testing and you are right, SrcDemo mounts a volume in the segments folder and Lawena needs to check on that folder to:

It's not behaving like a normal symbolic link because there's a fake filesystem mounted there, so one of the options to avoid this would be launching SrcDemo via command-line however, it's not very customizable, I can't set a determined frame rate, etc, only folders.

Another option is to add a "SrcDemo mode" check to skip past those cases I mentioned above. This looks simple enough.

A third option would be integrating with some of the code used in SrcDemo to read that Dokan-based file system. That might not be quick to implement though.

The workaround will have to do until I decide what's the best solution. Thanks again for reporting.

nosoop commented 10 years ago

Of course!

Instead of integrating with code used in SrcDemo, it looks like you can at least check that the directory is a mounted volume / NTFS junction on Windows by running dir /A:L %PARENT_OF_SEGMENTS_FOLDER% as shown here, then parsing the output. Alternate solution with JNA.

From there, you can decide what to do, knowing there's at least a special case to handle there.

Thanks as well!

quanticc commented 10 years ago

Quick solution for now, should solve the conflict but it will introduce issues if the user already had files in the movie folder because they will get overwritten.

Available on development update channel for now. Go to Help > About > Press Updater Channel and select "Development". Restart Lawena and you're done.

My plan is to make Lawena call SrcDemo2 via command-line on a later version.