mintty / wsltty

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

use custom $installdir when it is used #180

Closed jmlucjav closed 5 years ago

jmlucjav commented 5 years ago

The same change should be applied to lnk files (but they are not text based): add default to context menu.lnk add to context menu.lnk configure WSL shortcuts.lnk remove from context menu.lnk

Biswa96 commented 5 years ago

Why the commit diff shows everything is change? Did you change tab/space or CR/LF?

jmlucjav commented 5 years ago

I was wondering the same. I used the online, in place editing feature of github....it is just a single line change

mintty commented 5 years ago

Thanks for catching this. Adapting the .lnk files will require generating them instead of just deploying them, so some more coding is required. Also, following Biswa's hint, let's only merge minimal and complete patches. If you don't care the merge committership, I'll work that out.

jmlucjav commented 5 years ago

@mintty yeah sure, no problem about ownership of the merge, go ahead, and thanks!

mintty commented 5 years ago

@Biswa96, the patch is not complete anyway (generate .lnk files) and @jmlucjav agreed that I implement the change, so we'll just close this pull request afterwards.

mintty commented 5 years ago

Actually, the patch would not work anyway, due to the different path name syntax of Windows paths (as used e.g. for referring to mintty.exe or to the icon in the shortcut) and cygwin path:

installdir=${installdir:-'%LOCALAPPDATA%\wsltty'}
    icon="$installdir"'\wsl.ico'
  target="$installdir"'\bin\mintty.exe'
-   (cd "$LOCALAPPDATA/wsltty/bin"; wsl.exe -d "$distro" chmod +x wslbridge-backend)
+   (cd "$installdir/bin"; wsl.exe -d "$distro" chmod +x wslbridge-backend)

If no installdir is set explicitly, the fallback, including a variable in Windows syntax, will be used (first line above) and the cd command will not work. @jmlucjav, what value do you use for installdir?

jmlucjav commented 5 years ago

@mintty I install to c:\Users\myuser\Dropbox\wsltty\

mintty commented 5 years ago

Please test 3.0.2.3.