Repository: psychopy/psychopy

Issue:
uninstall: cannot change path
Hello,
the current uninst.exe is fixed to the path C:\Program Files\PsychoPy3,
which makes it impossible to uninstall an old version in another fold or disk.
Best
PJ


Discussion:
It looks like it's coded to the install directory from this: https://github.com/psychopy/psychopy/blob/fd5ec48ae2569b36db866a4f7818bc0a7e3a204b/buildCompleteInstaller.nsi#L127
> It looks like it's coded to the install directory from this:
> 
> https://github.com/psychopy/psychopy/blob/fd5ec48ae2569b36db866a4f7818bc0a7e3a204b/buildCompleteInstaller.nsi#L127

thanks for the reply.
![image](https://user-images.githubusercontent.com/50408937/95774217-4244ee80-0cc0-11eb-9196-7ee099510ac2.png)


This was installed to drive D. But the uninstall path is still for drive C...
![image](https://user-images.githubusercontent.com/50408937/95774171-2f321e80-0cc0-11eb-8abf-1454aac340cb.png)

I wonder if it was installed to C: and then moved to D:? 
Or maybe a new drive has been added/moved so that what was C is now D?
> I wonder if it was installed to C: and then moved to D:?
> Or maybe a new drive has been added/moved so that what was C is now D?

it was installed directly to D:
the thing is, that we could specify a different directory during the install, but this is not possible for the uninstall.

It isn't surprising that the uninstall folder is fixed. It should point only the location of the installation. What I don't understand is how it could end up pointing to the wrong folder
Just want to report that I have the same issue on Win10 after installing PsychoPy 3 2020.2.4 on my D: drive. The Path is fixed to C:\Progam Files\... as well. 

I am wondering if it's save to simply remove the PsychoPy folder and maybe remove the PsychoPy Path?
So maybe this is a bug with NSIS and D drive. As a workaround yes, I would have thought you can delete the folder. The un/installer also adds/removes a couple of entries to the registry and I suppose one issue might be that if you then try to install psychopy again later it will think it's still installed and try/fail to uninstall again

Resolving patch:
diff --git a/psychopy/__init__.py b/psychopy/__init__.py
--- a/psychopy/__init__.py
+++ b/psychopy/__init__.py
@@ -12,7 +12,7 @@
 import os
 import sys
 
-__version__ = '2022.1.0rc5'
+__version__ = '2022.1.0rc7'
 __license__ = 'GNU GPLv3 (or more recent equivalent)'
 __author__ = 'Jonathan Peirce'
 __author_email__ = 'jon.peirce@gmail.com'
diff --git a/setupApp.py b/setupApp.py
--- a/setupApp.py
+++ b/setupApp.py
@@ -6,9 +6,12 @@
 import os
 import sys
 from sys import platform
+import setuptools  # noqa: setuptools complains if it isn't implicitly imported before distutils
 from distutils.core import setup
 from pkg_resources import parse_version
-# import versioneer
+import bdist_mpkg  # noqa: needed to build bdist, even though not explicitly used here
+import py2app  # noqa: needed to build app bundle, even though not explicitly used here
+
 import psychopy
 version = psychopy.__version__
 
@@ -28,8 +31,6 @@
 if platform != 'darwin':
     raise RuntimeError("setupApp.py is only for building Mac Standalone bundle")
 
-import bdist_mpkg
-import py2app
 resources = glob.glob('psychopy/app/Resources/*')
 frameworks = [ # these installed using homebrew
               "/usr/local/opt/libevent/lib/libevent.dylib", 


Test patch: