belkiss / niftyplugins

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

Invoking p4vc with file location as working dir creates debug.log files with QT resource error #68

Closed belkiss closed 1 year ago

belkiss commented 1 year ago

Cf. #44

The previous attempt at a fix failed because all the commands invoking p4v required the environment to be set properly.

To work around that, we could start with the changes from #44 to start p4vc using its location as working dir, and pass the environment as arguments to p4vc:

p4vc [options] command [arg ...]

Options:
    -h -?           print this message
    -V              print client version
    -c client       set client name (default $P4CLIENT)
    -C charset      set character set (default $P4CHARSET)
    -p port         set server port (default $P4PORT)
    -u user         set user's username (default $P4USER)

To get the proper values, Nifty would invoke p4 set at file location before starting p4v, and extract the P4CLIENT, P4CHARSET, P4PORT and P4USER values.