From 68d0c23246c54fd95a8f20d116d4d66e88e7416a Mon Sep 17 00:00:00 2001 From: Heiko Voigt <184958+hvoigt@users.noreply.github.com> Date: Tue, 21 May 2019 18:25:54 +0200 Subject: [PATCH] make copying of files windows localization agnostic (#741) * make copying of files windows localization agnostic On a german Windows when building I get the following error: (D = Datei, V = Verzeichnis)? Ist das Ziel ...\Terminal\x64\Debug\TerminalSettings.pdb ein Dateiname oder ein Verzeichnisname (D = Datei, V = Verzeichnis)? f The trick with piping 'f' for file into stdin does not work here, since in german file is called 'Datei'. Due to the fact that the UI is translated a 'd' is expected. Lets use '*' at the end of the target filename which is a hack to trick 'xcopy' into assuming it is a filename her a target is a folder, if the target does not exist. * start fixing commandline tools to run new windows terminal * opencas should do the same as openterm. * correct the filename in openterm openterm is able to start the terminal again, but it does not start properly because of a missing dependency. * remove openterm command There is currently no plan on fixing this, because WindowsTerminal.exe does not support unpackaged activation. Let's remove them for now. --- tools/echokey.cmd | 4 ++-- tools/opencas.cmd | 29 ----------------------------- tools/opencon.cmd | 10 +++++----- tools/openterm.cmd | 33 --------------------------------- tools/openvt.cmd | 8 ++++---- 5 files changed, 11 insertions(+), 73 deletions(-) delete mode 100644 tools/opencas.cmd delete mode 100644 tools/openterm.cmd diff --git a/tools/echokey.cmd b/tools/echokey.cmd index 90cc5cac3..691162d19 100644 --- a/tools/echokey.cmd +++ b/tools/echokey.cmd @@ -18,8 +18,8 @@ set _r=%random% set copy_dir=OpenConsole\%_r% rem Generate a unique name, so that we can debug multiple revisions of the binary at the same time if needed. -(echo f | xcopy /Y %_last_build%\OpenConsole.exe %TEMP%\%copy_dir%\OpenConsole.exe) > nul -(echo f | xcopy /Y %_last_build%\conechokey.exe %TEMP%\%copy_dir%\conechokey.exe) > nul +(xcopy /Y %_last_build%\OpenConsole.exe %TEMP%\%copy_dir%\OpenConsole.exe*) > nul +(xcopy /Y %_last_build%\conechokey.exe %TEMP%\%copy_dir%\conechokey.exe*) > nul rem start %TEMP%\%copy_dir%\OpenConsole.exe %TEMP%\%copy_dir%\conechokey.exe %* %TEMP%\%copy_dir%\conechokey.exe %* diff --git a/tools/opencas.cmd b/tools/opencas.cmd deleted file mode 100644 index 311dc4730..000000000 --- a/tools/opencas.cmd +++ /dev/null @@ -1,29 +0,0 @@ -@echo off - -rem opencon - launch the openconsole binary. -rem Runs the OpenConsole.exe binary generated by the build in the debug directory. -rem Passes any args along. - -if not exist %OPENCON%\bin\%ARCH%\%_LAST_BUILD_CONF%\OpenConsole.exe ( - echo Could not locate the OpenConsole.exe in %OPENCON%\bin\%ARCH%\%_LAST_BUILD_CONF%. Double check that it has been built and try again. - goto :eof -) -if not exist %OPENCON%\bin\%ARCH%\%_LAST_BUILD_CONF%\cascadia.exe ( - echo Could not locate the cascadia.exe in %OPENCON%\bin\%ARCH%\%_LAST_BUILD_CONF%. Double check that it has been built and try again. - goto :eof -) - -setlocal -rem Generate a unique name, so that we can debug multiple revisions of the binary at the same time if needed. -set rand_val=%random% -set _r=%random% -set _last_build=%OPENCON%\bin\%ARCH%\%_LAST_BUILD_CONF% -set copy_dir=OpenConsole\%_r% - -(echo f | xcopy /Y %_last_build%\OpenConsole.exe %TEMP%\%copy_dir%\OpenConsole.exe) > nul -(echo f | xcopy /Y %_last_build%\cascadia.exe %TEMP%\%copy_dir%\cascadia.exe) > nul -(echo f | xcopy /Y %_last_build%\VtPipeTerm.exe %TEMP%\%copy_dir%\VtPipeTerm.exe) > nul -(echo f | xcopy /Y %_last_build%\Nihilist.exe %TEMP%\%copy_dir%\Nihilist.exe) > nul -(echo f | xcopy /Y %_last_build%\console.dll %TEMP%\%copy_dir%\console.dll) > nul - -start %TEMP%\%copy_dir%\cascadia.exe %* diff --git a/tools/opencon.cmd b/tools/opencon.cmd index 96425a99a..40746db9b 100644 --- a/tools/opencon.cmd +++ b/tools/opencon.cmd @@ -16,10 +16,10 @@ set _r=%random% set _last_build=%OPENCON%\bin\%ARCH%\%_LAST_BUILD_CONF% set copy_dir=OpenConsole\%_r% -(echo f | xcopy /Y %_last_build%\OpenConsole.exe %TEMP%\%copy_dir%\OpenConsole.exe) > nul -(echo f | xcopy /Y %_last_build%\OpenConsole.exe %TEMP%\%copy_dir%\conhost.exe) > nul -(echo f | xcopy /Y %_last_build%\VtPipeTerm.exe %TEMP%\%copy_dir%\VtPipeTerm.exe) > nul -(echo f | xcopy /Y %_last_build%\Nihilist.exe %TEMP%\%copy_dir%\Nihilist.exe) > nul -(echo f | xcopy /Y %_last_build%\console.dll %TEMP%\%copy_dir%\console.dll) > nul +(xcopy /Y %_last_build%\OpenConsole.exe %TEMP%\%copy_dir%\OpenConsole.exe*) > nul +(xcopy /Y %_last_build%\OpenConsole.exe %TEMP%\%copy_dir%\conhost.exe*) > nul +(xcopy /Y %_last_build%\VtPipeTerm.exe %TEMP%\%copy_dir%\VtPipeTerm.exe*) > nul +(xcopy /Y %_last_build%\Nihilist.exe %TEMP%\%copy_dir%\Nihilist.exe*) > nul +(xcopy /Y %_last_build%\console.dll %TEMP%\%copy_dir%\console.dll*) > nul start %TEMP%\%copy_dir%\OpenConsole.exe %* diff --git a/tools/openterm.cmd b/tools/openterm.cmd deleted file mode 100644 index 92333249f..000000000 --- a/tools/openterm.cmd +++ /dev/null @@ -1,33 +0,0 @@ -@echo off - -rem opencon - launch the openconsole binary. -rem Runs the OpenConsole.exe binary generated by the build in the debug directory. -rem Passes any args along. - -if not exist %OPENCON%\%PLATFORM%\%_LAST_BUILD_CONF%\CascadiaWin32.exe ( - echo Could not locate the CascadiaWin32.exe in %OPENCON%\bin\%PLATFORM%\%_LAST_BUILD_CONF%. Double check that it has been built and try again. - goto :eof -) - -setlocal -rem Generate a unique name, so that we can debug multiple revisions of the binary at the same time if needed. -set rand_val=%random% -set _r=%random% -set _last_build=%OPENCON%\bin\%PLATFORM%\%_LAST_BUILD_CONF% -set _last_cascadia_build=%OPENCON%\%PLATFORM%\%_LAST_BUILD_CONF% -set copy_dir=OpenConsole\%_r% -set cascadia_copy_dir=OpenConsole\%_r%\Cascadia - -(echo f | xcopy /Y %_last_build%\OpenConsole.exe %TEMP%\%copy_dir%\OpenConsole.exe) > nul -(echo f | xcopy /Y %_last_build%\OpenConsole.exe %TEMP%\%cascadia_copy_dir%\conhost.exe) > nul -(echo f | xcopy /Y %_last_build%\VtPipeTerm.exe %TEMP%\%copy_dir%\VtPipeTerm.exe) > nul -(echo f | xcopy /Y %_last_build%\Nihilist.exe %TEMP%\%copy_dir%\Nihilist.exe) > nul -(echo f | xcopy /Y %_last_build%\console.dll %TEMP%\%copy_dir%\console.dll) > nul -(echo f | xcopy /Y %_last_cascadia_build%\CascadiaWin32.exe %TEMP%\%cascadia_copy_dir%\CascadiaWin32.exe) > nul -(echo f | xcopy /Y %_last_cascadia_build%\TerminalConnection.dll %TEMP%\%cascadia_copy_dir%\TerminalConnection.dll) > nul -(echo f | xcopy /Y %_last_cascadia_build%\TerminalControl.dll %TEMP%\%cascadia_copy_dir%\TerminalControl.dll) > nul -(echo f | xcopy /Y %_last_cascadia_build%\TerminalSettings.dll %TEMP%\%cascadia_copy_dir%\TerminalSettings.dll) > nul -(echo f | xcopy /Y %_last_cascadia_build%\TerminalApp.dll %TEMP%\%cascadia_copy_dir%\TerminalApp.dll) > nul - -echo Launching %TEMP%\%cascadia_copy_dir%\CascadiaWin32.exe... -start %TEMP%\%cascadia_copy_dir%\CascadiaWin32.exe %* diff --git a/tools/openvt.cmd b/tools/openvt.cmd index c3bc3d387..eaa47390d 100644 --- a/tools/openvt.cmd +++ b/tools/openvt.cmd @@ -16,10 +16,10 @@ set _r=%random% set copy_dir=OpenConsole\%_r% rem Generate a unique name, so that we can debug multiple revisions of the binary at the same time if needed. -(echo f | xcopy /Y %_last_build%\OpenConsole.exe %TEMP%\%copy_dir%\conhost.exe) > nul -(echo f | xcopy /Y %_last_build%\console.dll %TEMP%\%copy_dir%\console.dll) > nul -(echo f | xcopy /Y %_last_build%\VtPipeTerm.exe %TEMP%\%copy_dir%\VtPipeTerm.exe) > nul -(echo f | xcopy /Y %_last_build%\Nihilist.exe %TEMP%\%copy_dir%\Nihilist.exe) > nul +(xcopy /Y %_last_build%\OpenConsole.exe %TEMP%\%copy_dir%\conhost.exe*) > nul +(xcopy /Y %_last_build%\console.dll %TEMP%\%copy_dir%\console.dll*) > nul +(xcopy /Y %_last_build%\VtPipeTerm.exe %TEMP%\%copy_dir%\VtPipeTerm.exe*) > nul +(xcopy /Y %_last_build%\Nihilist.exe %TEMP%\%copy_dir%\Nihilist.exe*) > nul start %TEMP%\%copy_dir%\conhost.exe %TEMP%\%copy_dir%\VtPipeTerm.exe %* echo Launching %TEMP%\%copy_dir%\VtPipeTerm.exe...