jtilander / niftyplugins

Visual Studio productivity plugins
MIT License
40 stars 24 forks source link

NiftyPerforce "finds" perforce executable in wrong directory #71

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open perforce controlled project (you can see in output window)
2. Any time a perforce operation is attempted, get an error saying the 
executable cannot be found in the perforce directory.
3.

What is the expected output? What do you see instead?
I am running 64-bit windows, and I have p4v installed in Program 
Files\Perforce.  Nifty reports that it finds p4 in Program Files(x86)\Perforce

What version of the product are you using? On what operating system?
NiftyPerforce v1.3.1. Windows 7 64-bit, Visual Studio 2008, Rev. Perforce 
Visual Client/NTX86/2010.1/276058

Please provide any additional information below.

Attached captures of output window and error.

Original issue reported on code.google.com by bardic...@gmail.com on 28 Jun 2011 at 9:43

Attachments:

GoogleCodeExporter commented 9 years ago
I used a symlink to branch from c:\program files\perforce to the 86 version.

Original comment by AndySFi...@gmail.com on 16 Sep 2011 at 10:11

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
It also seems to prefer P4win over P4v

Original comment by bigsandw...@gmail.com on 14 Nov 2011 at 3:41

GoogleCodeExporter commented 9 years ago
Check to see if you have the registry value P4INSTROOT set to the x86 path.  
That's where NiftyPerforce looks before it attempts to use your PATH 
environment variable to locate your 'perforce install'.  This was the issue I 
had (I believe this P4INSTROOT registry value was added to my registry when I 
installed the Perforce SCC Plug-in, which in the end I won't need now that I 
have NiftyPerforce working properly).

Editing this P4INSTROOT registry value to point to the 64-bit install of 
Perforce should fix the problem for you.  Or you could remove the P4INSTROOT 
registry value altogether and make sure your PATH environment variable includes 
the path to your 64-bit install and NiftyPerforce will find the correct install 
that way instead.

Original comment by jacob.en...@gmail.com on 11 May 2012 at 2:12

GoogleCodeExporter commented 9 years ago
If you end up with both 32 and 64 bit versions of perforce on your machine. 
Fixing P4INSTROOT to point to the correct installation directory also fixes the 
error that it can not find "p4win" or "p4v." It would be helpful if the error 
message printed the directory it was checking for these programs.

Original comment by icode...@gmail.com on 17 Sep 2012 at 5:47

jtilander commented 9 years ago

I believe that I "fixed" this in commit 9967d5a7125fd9eb400cb8d7f604cdacd3f1d763 with the new logic to just search the default directories first -- and choose the 64 bit directory by default. This assumes that you have p4v and p4win in the 64 bit directory together (even though p4win is a 32 bit executable). Well, you really should have niftyp4win installed :)