sys-bio / tellurium

Python Environment for Modeling and Simulating Biological Systems
http://tellurium.analogmachine.org/
Apache License 2.0
108 stars 36 forks source link

Uninstalling Tellurium notebook does not remove files #351

Closed kirichoi closed 6 years ago

kirichoi commented 6 years ago

On Windows, even after 'uninstalling' Tellurium notebook, the core seems to be untouched at Users\AppData\Roaming\Tellurium

0u812 commented 6 years ago

I looked into this when I was originally writing the code. There isn't a cross-platform way to fix this afaik. On Mac, to uninstall an app, you just drag it to the bin. There's no opportunity for scripts to run to clean up files etc. On the other hand, options for platform-specific scripts are usually pretty limited in Electron, so even if there was a platform-specific fix I doubt there's a way to implement it...

0u812 commented 6 years ago

In 2.0.14 it does overwrite the old Python environment with a new one, however.

hsauro commented 6 years ago

That's sounds like sloppy work by the Electron developers. Applications shouldn't leave their detritus after an uninstall. Imagine if every application did that, a user's harddrive would just fill up with unwanted files. After an uninstall the only thing that tends to be left behind are user created files, since the uninstaller isn't aware of those. Anything installed by the installer is removed. I don't know how Electron applications work but I assume they can be installed using standard installers? If it comes with its own installers then it sounds like very poor design on their part. Using standard installer on Windows would mean a clean uninstall.

On the Mac does the application copy files outside where it is installed? In not then dragging to the trash would be sufficient.

Herbert

On Tue, Mar 20, 2018 at 9:27 PM Kyle Medley notifications@github.com wrote:

I looked into this when I was originally writing the code. There isn't a cross-platform way to fix this afaik. On Mac, to uninstall an app, you just drag it to the bin. There's no opportunity for scripts to run to clean up files etc. On the other hand, options for platform-specific scripts are usually pretty limited in Electron, so even if there was a platform-specific fix I doubt there's a way to implement it...

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sys-bio/tellurium/issues/351#issuecomment-374831337, or mute the thread https://github.com/notifications/unsubscribe-auth/ABAZDrXz8M5UXVgNzCrIeec-jpUvqLXAks5tgdaZgaJpZM4SwRir .

kirichoi commented 6 years ago

That's quite unfortunate, especially because the installation is quite large (~2 GB), and the install directory is generally hidden for the most users. From a quick search, there might be a way to remove AppData on uninstall through some custom script. Or maybe we should switch to NSIS instead for windows installer specifically?

hsauro commented 6 years ago

If it's possible, I agree use either nsis or inno setup. The later is particularly easy to use. We can't leave 2gb on a user machine after an uninstall.

Herbert

On Wed, Mar 21, 2018 at 1:40 AM Kiri Choi notifications@github.com wrote:

That's quite unfortunate, especially because the installation is quite large (~2 GB), and the install directory is generally hidden for the most users. From a quick search, there might be a way to remove AppData on uninstall through some custom script. Or maybe we should switch to NSIS instead for windows installer specifically?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/sys-bio/tellurium/issues/351#issuecomment-374865878, or mute the thread https://github.com/notifications/unsubscribe-auth/ABAZDj16q-B1ERgK3b3SvbRez6FVer4hks5tghHsgaJpZM4SwRir .

0u812 commented 6 years ago

Again, on the Mac, it isn't possible to do this due to the operating system not providing a way. On Linux it isn't possible for different reasons. It might be possible on Windows through some sort of custom script, but that would only cover 1/3 of the supported platforms. I'll look into it to see if there is a way on that one platform...

kirichoi commented 6 years ago

On Mac and Linux, I presume you are supposed to delete the directory? You can do the same on Windows, but the problem is Tellurium is installed to appdata, which is a hidden directory. Probably the majority of Windows users doesn't even know that such directory exists. I think we can simply add a documentation somewhere (maybe even add a notice in the notebook app) and call it a day.

hsauro commented 6 years ago

The professional approach is to do it properly, and in the case of Windows we know how to do it unless Electron apps are doing something very weird. If you pick the right installer, e.g. Innosetup, there aren't even any scripts to write, innosetup knows what files it installed and where they are stored and it will automatically uninstall the files.

Kyle, on the Mac and Linux are you suggesting that these OSes copy files out of the install directory and not record this information?

As I said we can't leave 2gb of material on a user's hard drive when they uninstall. On windows that is frowned upon, on the Mac and Linux things may be different and users aren't so worried about accumulating dead installs.

Herbert

On Wed, Mar 21, 2018 at 9:35 AM Kiri Choi notifications@github.com wrote:

On Mac ans Linux, I presume you are supposed to delete the directory? You can do the same on Windows, but the problem is Tellurium is installed to appdata, which is a hidden directory. Probably the majority of Windows users doesn't even know that such directory exists. I think we can simply add a documentation somewhere (maybe even add a notice in the notebook) and call it a day.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/sys-bio/tellurium/issues/351#issuecomment-375008509, or mute the thread https://github.com/notifications/unsubscribe-auth/ABAZDl-rmT1Ntop3KGLDPK1VoQzr6FHeks5tgoE-gaJpZM4SwRir .

0u812 commented 6 years ago

The install directory on Mac/Linux isn't user-writable, so the viewer has to copy files to a user-writable directory (otherwise the user can't install new Python packages, which is one of the requirements the notebook viewer was designed to satisfy). Since the user-writable directory is outside of the installation directory, it doesn't get deleted when you uninstall the app. Windows is different so it might be possible to run a custom script on uninstall to remove the extra files.

hsauro commented 6 years ago

On windows you should be able do a clean uninstall, it won't uninstall user created files as it won't know about those, but that's the user responsibility. I feel sorry for the Mac users who over time have to put up with accumulated detritus

Herbert

On Wed, Mar 21, 2018 at 10:53 AM Kyle Medley notifications@github.com wrote:

The install directory on Mac/Linux isn't user-writable, so the viewer has to copy files to a user-writable directory (otherwise the user can't install new Python packages, which is one of the requirements the notebook viewer was designed to satisfy). Since the user-writable directory is outside of the installation directory, it doesn't get deleted when you uninstall the app. Windows is different so it might be possible to run a custom script on uninstall to remove the extra files.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/sys-bio/tellurium/issues/351#issuecomment-375037410, or mute the thread https://github.com/notifications/unsubscribe-auth/ABAZDtKQwen7iQVrb6nveRcwtjv0R-rdks5tgpORgaJpZM4SwRir .