belkiss / niftyplugins

Simple Perforce integration for Visual Studio 2017 to 2022
MIT License
24 stars 4 forks source link

Fixed a bug where NiftyPerforce would cause p4v to litter the local workspace folders with log files. #44

Closed gamma09 closed 2 years ago

gamma09 commented 2 years ago

I noticed that whenever NiftyPerforce runs a perforce command on a file (such as view in p4v), it would end up polluting the workspace directory where the targeted file lives with a debug.log file containing this message:

[0518/111147.930:WARNING:resource_bundle_qt.cpp(115)] locale_file_path.empty() for locale

It appears the perforce executables (or at least p4v.exe) expect the working directory to be the perforce install directory, or else it can't find the Qt resource packs.

belkiss commented 2 years ago

Oh nice! I have noticed those files but never took the time to investigate!

I wonder if we could just change the directory when invoking p4v?

Thanks!

gamma09 commented 2 years ago

I wonder if we could just change the directory when invoking p4v?

Done! To be safe, though, I left p4vc using the perforce install directory because it is a wrapper around p4v for some operations.

belkiss commented 2 years ago

Merged! Thank you again very much! I'll tag a new version asap

belkiss commented 2 years ago

Seems none of the p4vc commands work anymore after this MR if the global environment variables are not set :(

I'll probably have to backout this change unless we can find a way to indicate where to find the resources

gamma09 commented 2 years ago

Seems none of the p4vc commands work anymore after this MR if the global environment variables are not set :(

Which global environment variables are you talking about?

belkiss commented 2 years ago

I mean P4CLIENT, P4PORT, P4USER, either as regular env var or set with p4 set