From 2c0474a0e9bec1a06abf6aa8e3706c0ba4af45b8 Mon Sep 17 00:00:00 2001 From: Richard L King Date: Mon, 12 Feb 2018 18:30:53 +0000 Subject: [PATCH] Fix bug - window closed after exit from IBController with /INLINE --- resources/IBControllerGatewayStart.bat | 3 +++ resources/IBControllerStart.bat | 3 +++ resources/Scripts/DisplayBannerAndLaunch.bat | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/resources/IBControllerGatewayStart.bat b/resources/IBControllerGatewayStart.bat index 56d80cf..9d1cda9 100644 --- a/resources/IBControllerGatewayStart.bat +++ b/resources/IBControllerGatewayStart.bat @@ -160,7 +160,10 @@ if /I "%HIDE%" == "YES" ( ) if /I "%~1" == "/INLINE" ( + set INLINE=1 "%IBC_PATH%\Scripts\DisplayBannerAndLaunch.bat" ) else ( + set INLINE=0 start "%TITLE%" %MIN% "%IBC_PATH%\Scripts\DisplayBannerAndLaunch.bat" ) +exit /B diff --git a/resources/IBControllerStart.bat b/resources/IBControllerStart.bat index 63f68e8..e6cdf75 100644 --- a/resources/IBControllerStart.bat +++ b/resources/IBControllerStart.bat @@ -146,7 +146,10 @@ if /I "%HIDE%" == "YES" ( ) if /I "%~1" == "/INLINE" ( + set INLINE=1 "%IBC_PATH%\Scripts\DisplayBannerAndLaunch.bat" ) else ( + set INLINE=0 start "%TITLE%" %MIN% "%IBC_PATH%\Scripts\DisplayBannerAndLaunch.bat" ) +exit /B \ No newline at end of file diff --git a/resources/Scripts/DisplayBannerAndLaunch.bat b/resources/Scripts/DisplayBannerAndLaunch.bat index 4f0d631..b8cd799 100644 --- a/resources/Scripts/DisplayBannerAndLaunch.bat +++ b/resources/Scripts/DisplayBannerAndLaunch.bat @@ -69,7 +69,7 @@ if defined LOG_PATH ( echo + echo + ** Caution: closing this window will close %APP% %TWS_MAJOR_VRSN% ** -echo + (window will close automatically when you exit from %APP% %TWS_MAJOR_VRSN%) +if "%INLINE%" == "0" echo + (window will close automatically when you exit from %APP% %TWS_MAJOR_VRSN%) echo + :: now launch IBController @@ -96,6 +96,7 @@ if defined LOG_PATH ( ) color +if "%INLINE%" == "1" exit /B exit :err @@ -133,4 +134,5 @@ echo + echo + Press any key to close this window pause > NUL echo + +if "%INLINE%" == "1" exit /B exit