From fdb40c8b07725869bb6b7e64f312bc77e2af1e7b Mon Sep 17 00:00:00 2001 From: Ken Date: Thu, 10 Aug 2017 11:27:34 +0800 Subject: [PATCH] #44 #32 - adjustment for windows cli helper and baseline option - define php path for windows cli helper and output carriage return + line feed for generated tagui_helper.cmd - baseline option set flow file name variable correctly --- src/erina.cmd | 1 + src/tagui.cmd | 6 +++--- src/tagui_helper.php | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) mode change 100755 => 100644 src/erina.cmd diff --git a/src/erina.cmd b/src/erina.cmd old mode 100755 new mode 100644 index b6344fd9..803f44cd --- a/src/erina.cmd +++ b/src/erina.cmd @@ -14,6 +14,7 @@ rem delete helper file if it exists to prevent running an old call if exist "tagui_helper.cmd" del "tagui_helper.cmd" rem call php helper to interpret parameters passed in to cli helper +if exist "%~dp0php\php.exe" set "path=%~dp0php;%path%" php -q tagui_helper.php %1 %2 %3 %4 %5 %6 %7 %8 %9 rem run generated output from php helper to call automation flow diff --git a/src/tagui.cmd b/src/tagui.cmd index 64fbd3bf..8794a0f7 100644 --- a/src/tagui.cmd +++ b/src/tagui.cmd @@ -110,10 +110,10 @@ if %tagui_baseline_mode%==false ( if "%flow_file%"=="" set "flow_file=%~dpnx1" ) else ( if "%flow_file%"=="" set "flow_file=%~dpnx1" - for %%i in ("%flow_file%") do set "flow_folder=%%~dpi" - for %%i in ("%flow_file%") do set "flow_filename=%%~nxi" + for %%i in ("!flow_file!") do set "flow_folder=%%~dpi" + for %%i in ("!flow_file!") do set "flow_filename=%%~nxi" if not exist "!flow_folder!baseline" mkdir "!flow_folder!baseline" - copy "%flow_file%" "!flow_folder!baseline\." > nul + copy "!flow_file!" "!flow_folder!baseline\." > nul set "flow_file=!flow_folder!baseline\!flow_filename!" ) diff --git a/src/tagui_helper.php b/src/tagui_helper.php index 2446ff3c..db9c2c65 100644 --- a/src/tagui_helper.php +++ b/src/tagui_helper.php @@ -72,9 +72,9 @@ fwrite($output_file,"./tagui " . $helper_flow_filename . " quiet " . $helper_flow_options . "\n"); fclose($output_file); chmod ('tagui_helper',0700); $output_file = fopen('tagui_helper.cmd','w') or die("cannot open tagui_helper.cmd, raise an issue on TagUI GitHub page" . "\n"); -fwrite($output_file,"@echo off" . "\n"); -fwrite($output_file,"rem # GENERATED HELPER ASSISTANT SCRIPT FOR RUNNING TAGUI FRAMEWORK ~ TEBEL.ORG #" . "\n"); -fwrite($output_file,"tagui " . $helper_flow_filename . " quiet " . $helper_flow_options . "\n"); +fwrite($output_file,"@echo off" . "\r\n"); +fwrite($output_file,"rem # GENERATED HELPER ASSISTANT SCRIPT FOR RUNNING TAGUI FRAMEWORK ~ TEBEL.ORG #" . "\r\n"); +fwrite($output_file,"tagui " . $helper_flow_filename . " quiet " . $helper_flow_options . "\r\n"); fclose($output_file); chmod ('tagui_helper.cmd',0700); ?>