1
0
mirror of https://github.com/mintty/wsltty.git synced 2025-10-31 23:21:59 +00:00
This commit is contained in:
mintty
2024-11-23 00:00:00 +01:00
parent d7b4840c92
commit 52b6a57e09
2 changed files with 9 additions and 6 deletions

View File

@@ -1,29 +1,34 @@
@echo off
chcp 65001 > nul
echo Installing WSL Terminal Portable
echo Select target folder in popup dialog ...
set sel="Select folder to place installation of portable wsltty"
chcp 65001 > nul
for /f "usebackq delims=" %%f in (`powershell "(new-object -COM Shell.Application).BrowseForFolder(0, '%sel%', 0, 0).self.path"`) do set f=%%f
set instdir=%f%\wsltty
if exist %f%\LICENSE.mintty set instdir=%f%
if "%f%"=="" (
echo no installation
echo No installation selected
pause
exit
) else if not exist "%f%" (
echo invalid installation folder %instdir%
echo Invalid installation folder %instdir%
pause
exit
)
rem call main installation
call install "%instdir%" "%instdir%" /P
rem this already changes into "%instdir%"
rem create shortcut
cd /D "%instdir%"
rem set drive-relative path for shortcut working directory and icon
set instpath=%instdir:~2%
cd /D "%instpath%"
set target=%%COMSPEC%%
set minttyargs=/C bin\mintty.exe --WSL= --icon=/wsl.ico --configdir=. -~
set bridgeargs= -