mintty / wsltty

Mintty as a terminal for Bash on Ubuntu on Windows / WSL
Other
3.1k stars 103 forks source link

Portable wsltty won't install to requested folder, breaking updates #359

Open Raven-Singularity opened 4 hours ago

Raven-Singularity commented 4 hours ago

The installer for wsltty allows you to select an install folder, but installs it to a sub-directory of this folder.

For instance I tell the installer to install wsltty to:

C:\Portable_Apps\General\Terminal_Emulators\MinTTY-WSL

But instead it installs it to:

C:\Portable_Apps\General\Terminal_Emulators\MinTTY-WSL\wsltty

This forces me to move all the files up one level, to the location I actually requested. This move then breaks all the prebuilt wsltty shortcuts. This move also prevents me from automatically installing updates for wsltty, because the installer then puts the updated files into a sub-folder of the old files.

At that point my only options for performing an update of wsltty are:

  1. Use Windows Explorer to drag-and-drop the files inside the new folder over top of the old files to merge them. But I have messed up a lot of directory structures trying to use this merge feature in the past, now I don't trust it, and don't want to use it.
  2. Creating a custom tar archive from inside the new wsltty folder, then extracting it over the top level of my old files. But that's too much work every update.
  3. Manually dragging each folder of updated files onto the respective folder in my old install. Even more time-consuming than the previous method.
  4. Rename the folder every update to include the version number, then copy over my configuration, icons, and update my shortcuts to point to the updated location. This is the least time-consuming, but still quite frustrating -- I should be able to update my wsltty portable in-place.

I don't think the installer should demand a specific install directory name -- especially for portable apps -- which by their nature are installed to very random places like secondary hard drives or USB memory sticks.

If you simply want wsltty to be the default install folder, most wizard-style installers let you browse for a folder, and then append the default name like \wsltty\ to it. After browsing for a folder, the user can then manually erase the default sub-folder from the text before installing.

Example wizard-style installer that allows the path to be edited after choosing an install folder:

Wizard_Installer

In the wsltty installer, there is no way to edit the path after browsing for a folder, it immediately copies files to a sub-directory of the chosen folder.

There are FOSS wizard-style installers available that could avoid this issue, for example:

Inno Setup:

mintty commented 2 hours ago

With most installers, the question of whether you install to a given directory or into it is quite ambiguous. However, nothing has changed in the wsltty installer, and its final installation directory has always been called wsltty. Maybe the Windows function BrowseForFolder has changed? Thanks for mentioning your favourite installer. However, when I used to take a look at them, almost every installer would need considerable time of investigation into its configuration philosophy and details, which I cannot afford, that's why wsltty uses rather primitive ancient tools for it.