mirror of
https://github.com/mintty/wsltty.git
synced 2025-01-18 12:05:47 +00:00
This commit is contained in:
parent
d7b4840c92
commit
52b6a57e09
@ -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= -
|
||||
|
@ -15,9 +15,7 @@ call dequote oldconfigdir
|
||||
|
||||
rem override installdir, configdir if parameters given
|
||||
set arg1=%1
|
||||
echo %arg1%
|
||||
call dequote arg1
|
||||
echo %arg1%
|
||||
if "%arg1%" == "%%arg1%%" goto deploy
|
||||
set refinstalldir=%arg1%
|
||||
set installdir=%arg1%
|
||||
|
Loading…
Reference in New Issue
Block a user