@@ -58,12 +58,7 @@ private void CreateBatchFile()
5858 sbBatchFile . Append ( "\\ pcpatr64\" -t " ) ;
5959 sbBatchFile . Append ( takeFileName ) ;
6060 sbBatchFile . Append ( "\n " ) ;
61- string removeCRs = sbBatchFile . ToString ( ) . Replace ( "\r " , "" ) . Replace ( "
" , "" ) ;
62- File . WriteAllText ( BatchFile , removeCRs ) ;
63- Console . WriteLine ( "\n batch file =" ) ;
64- Console . WriteLine ( "=================================================" ) ;
65- Console . Write ( removeCRs ) ;
66- Console . WriteLine ( "=================================================" ) ;
61+ File . WriteAllText ( BatchFile , sbBatchFile . ToString ( ) ) ;
6762 }
6863
6964 private string GetPcPatr64ExePath ( )
@@ -91,22 +86,14 @@ public void Invoke()
9186 using ( var process = Process . Start ( processInfo ) )
9287 {
9388 process . PriorityClass = ProcessPriorityClass . High ;
94- Console . WriteLine ( "\n Before WaitForExit" ) ;
9589 process . WaitForExit ( ) ;
96- Console . WriteLine ( "\t After WaitForExit" ) ;
9790 string error = process . StandardError . ReadToEnd ( ) ;
98- Console . WriteLine ( "\n StdErr=" ) ;
99- Console . WriteLine ( "=================================================" ) ;
100- Console . Write ( error ) ;
101- Console . WriteLine ( "=================================================" ) ;
10291 if ( error . Contains ( "ERROR " ) )
10392 {
104- Console . WriteLine ( "\t Failure" ) ;
10593 InvocationSucceeded = false ;
10694 }
10795 else
10896 {
109- Console . WriteLine ( "\t Success" ) ;
11097 InvocationSucceeded = true ;
11198 }
11299 process . StandardOutput . Close ( ) ;
@@ -118,8 +105,6 @@ public void Invoke()
118105 private void CreateTakeFile ( )
119106 {
120107 string takeFile = Path . Combine ( Path . GetTempPath ( ) , takeFileName ) ;
121- //StringBuilder sbTakeFileShortPath = new StringBuilder(255);
122- //int i = GetShortPathName(takeFile, sbTakeFileShortPath, sbTakeFileShortPath.Capacity);
123108 var sbTake = new StringBuilder ( ) ;
124109 sbTake . Append ( "set comment |\n " ) ;
125110 sbTake . Append ( "log " ) ;
@@ -128,15 +113,6 @@ private void CreateTakeFile()
128113 sbTake . Append ( "load grammar " ) ;
129114 sbTake . Append ( GrammarFile ) ;
130115 sbTake . Append ( "\n " ) ;
131- // See if the failure we're getting in GitHub is due to not finding the grammr file:
132- // We'll put it in the temp directory now.
133- //StringBuilder sbGrammarFileShortPath = new StringBuilder(255);
134- //i = GetShortPathName(
135- // GrammarFile,
136- // sbGrammarFileShortPath,
137- // sbGrammarFileShortPath.Capacity
138- //);
139- //sbTake.Append(sbGrammarFileShortPath.ToString() + "\n");
140116 sbTake . Append ( "set timing on\n " ) ;
141117 sbTake . Append ( "set gloss on\n " ) ;
142118 sbTake . Append ( "set features all\n " ) ;
@@ -155,13 +131,8 @@ private void CreateTakeFile()
155131 // since the batch fle defaults to the temp directory, we just use the invoker files as they are
156132 sbTake . Append ( "file disambiguate Invoker.ana Invoker.and\n " ) ;
157133 sbTake . Append ( "exit\n " ) ;
158- string removeCRs = sbTake . ToString ( ) . Replace ( "\r " , "" ) . Replace ( "
" , "" ) ;
159- File . WriteAllText ( takeFile , removeCRs ) ;
134+ File . WriteAllText ( takeFile , sbTake . ToString ( ) ) ;
160135 AndFile = Path . Combine ( Path . GetTempPath ( ) , "Invoker.and" ) ;
161- Console . WriteLine ( "\n take file =" ) ;
162- Console . WriteLine ( "=================================================" ) ;
163- Console . Write ( removeCRs ) ;
164- Console . WriteLine ( "=================================================" ) ;
165136 }
166137
167138 private void HandleRootGloss ( StringBuilder sbTake )
0 commit comments