terminal/tools/echokey.cmd
Heiko Voigt 68d0c23246 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.
2019-05-21 16:25:54 +00:00

26 lines
926 B
Batchfile

@echo off
setlocal
set _last_build=%OPENCON%\bin\%ARCH%\%_LAST_BUILD_CONF%
if not exist %_last_build%\OpenConsole.exe (
echo Could not locate the OpenConsole.exe in %_last_build%. Double check that it has been built and try again.
goto :eof
)
if not exist %_last_build%\conechokey.exe (
echo Could not locate the conechokey.exe in %_last_build%. Double check that it has been built and try again.
goto :eof
)
rem %_last_build%\conechokey.exe %*
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.
(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 %*