mirror of
				https://github.com/mintty/wsltty.git
				synced 2025-10-30 22:54:03 +00:00 
			
		
		
		
	This commit is contained in:
		| @@ -1,29 +1,34 @@ | |||||||
| @echo off | @echo off | ||||||
|  |  | ||||||
|  | chcp 65001 > nul | ||||||
|  |  | ||||||
| echo Installing WSL Terminal Portable | echo Installing WSL Terminal Portable | ||||||
| echo Select target folder in popup dialog ... | echo Select target folder in popup dialog ... | ||||||
|  |  | ||||||
| set sel="Select folder to place installation of portable wsltty" | 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 | 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 | set instdir=%f%\wsltty | ||||||
| if exist %f%\LICENSE.mintty set instdir=%f% | if exist %f%\LICENSE.mintty set instdir=%f% | ||||||
|  |  | ||||||
| if "%f%"=="" ( | if "%f%"=="" ( | ||||||
| 	echo no installation | 	echo No installation selected | ||||||
|  | 	pause | ||||||
| 	exit | 	exit | ||||||
| ) else if not exist "%f%" ( | ) else if not exist "%f%" ( | ||||||
| 	echo invalid installation folder %instdir% | 	echo Invalid installation folder %instdir% | ||||||
|  | 	pause | ||||||
| 	exit | 	exit | ||||||
| ) | ) | ||||||
|  |  | ||||||
| rem call main installation | rem call main installation | ||||||
| call install "%instdir%" "%instdir%" /P | call install "%instdir%" "%instdir%" /P | ||||||
|  | rem this already changes into "%instdir%" | ||||||
|  |  | ||||||
| rem create shortcut | rem create shortcut | ||||||
|  | cd /D "%instdir%" | ||||||
|  | rem set drive-relative path for shortcut working directory and icon | ||||||
| set instpath=%instdir:~2% | set instpath=%instdir:~2% | ||||||
| cd /D "%instpath%" |  | ||||||
| set target=%%COMSPEC%% | set target=%%COMSPEC%% | ||||||
| set minttyargs=/C bin\mintty.exe --WSL= --icon=/wsl.ico --configdir=. -~ | set minttyargs=/C bin\mintty.exe --WSL= --icon=/wsl.ico --configdir=. -~ | ||||||
| set bridgeargs= - | set bridgeargs= - | ||||||
|   | |||||||
| @@ -15,9 +15,7 @@ call dequote oldconfigdir | |||||||
|  |  | ||||||
| rem override installdir, configdir if parameters given | rem override installdir, configdir if parameters given | ||||||
| set arg1=%1 | set arg1=%1 | ||||||
| echo %arg1% |  | ||||||
| call dequote arg1 | call dequote arg1 | ||||||
| echo %arg1% |  | ||||||
| if "%arg1%" == "%%arg1%%" goto deploy | if "%arg1%" == "%%arg1%%" goto deploy | ||||||
| set refinstalldir=%arg1% | set refinstalldir=%arg1% | ||||||
| set installdir=%arg1% | set installdir=%arg1% | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user