@@ -10,14 +10,15 @@ function createCommands(product, type, input, outputs)
1010 hppCmd . description = "wayland-scanner " + input . fileName + " -> " + hppOutput . fileName ;
1111 hppCmd . highlight = "codegen" ;
1212 hppCmd . exe = waylandScanner ;
13- hppCmd . hppOutput = hppOutput ;
13+ hppCmd . inputFilePath = input . filePath ;
14+ hppCmd . outputFilePath = hppOutput . filePath ;
1415 hppCmd . type = type === "client" ? "client-header" : "server-header" ;
1516 hppCmd . sourceCode = function ( ) {
1617 var p = new Process ( ) ;
1718 try {
1819 p . setEnv ( "LC_ALL" , "C" ) ;
19- p . setWorkingDirectory ( FileInfo . path ( hppOutput . filePath ) ) ;
20- var hppArgs = [ type , input . filePath , hppOutput . filePath ] ;
20+ p . setWorkingDirectory ( FileInfo . path ( outputFilePath ) ) ;
21+ var hppArgs = [ type , inputFilePath , outputFilePath ] ;
2122 p . exec ( exe , hppArgs , true ) ;
2223 } finally {
2324 p . close ( ) ;
@@ -29,13 +30,14 @@ function createCommands(product, type, input, outputs)
2930 cppCmd . description = "wayland-scanner " + input . fileName + " -> " + cppOutput . fileName ;
3031 cppCmd . highlight = "codegen" ;
3132 cppCmd . exe = waylandScanner ;
32- cppCmd . cppOutput = cppOutput ;
33+ cppCmd . inputFilePath = input . filePath ;
34+ cppCmd . outputFilePath = cppOutput . filePath ;
3335 cppCmd . sourceCode = function ( ) {
3436 var p = new Process ( ) ;
3537 try {
3638 p . setEnv ( "LC_ALL" , "C" ) ;
37- p . setWorkingDirectory ( FileInfo . path ( cppOutput . filePath ) ) ;
38- var cppArgs = [ "code" , input . filePath , cppOutput . filePath ] ;
39+ p . setWorkingDirectory ( FileInfo . path ( outputFilePath ) ) ;
40+ var cppArgs = [ "code" , inputFilePath , outputFilePath ] ;
3941 p . exec ( exe , cppArgs , true ) ;
4042 } finally {
4143 p . close ( ) ;
@@ -54,16 +56,17 @@ function createQtCommands(product, type, input, outputs)
5456 hppCmd . description = "qtwaylandscanner " + input . fileName + " -> " + hppOutput . fileName ;
5557 hppCmd . highlight = "codegen" ;
5658 hppCmd . exe = qtwaylandScanner ;
57- hppCmd . hppOutput = hppOutput ;
59+ hppCmd . inputFilePath = input . filePath ;
60+ hppCmd . outputFilePath = hppOutput . filePath ;
5861 hppCmd . type = type === "client" ? "client-header" : "server-header" ;
5962 hppCmd . sourceCode = function ( ) {
6063 var p = new Process ( ) ;
6164 try {
6265 p . setEnv ( "LC_ALL" , "C" ) ;
63- p . setWorkingDirectory ( FileInfo . path ( hppOutput . filePath ) ) ;
64- var hppArgs = [ type , input . filePath , "" ] ;
66+ p . setWorkingDirectory ( FileInfo . path ( outputFilePath ) ) ;
67+ var hppArgs = [ type , inputFilePath , "" ] ;
6568 p . exec ( exe , hppArgs , true ) ;
66- var file = new TextFile ( hppOutput . filePath , TextFile . WriteOnly ) ;
69+ var file = new TextFile ( outputFilePath , TextFile . WriteOnly ) ;
6770 file . write ( p . readStdOut ( ) ) ;
6871 file . close ( ) ;
6972 } finally {
@@ -76,16 +79,17 @@ function createQtCommands(product, type, input, outputs)
7679 cppCmd . description = "qtwaylandscanner " + input . fileName + " -> " + cppOutput . fileName ;
7780 cppCmd . highlight = "codegen" ;
7881 cppCmd . exe = qtwaylandScanner ;
79- cppCmd . cppOutput = cppOutput ;
82+ cppCmd . inputFilePath = input . filePath ;
83+ cppCmd . outputFilePath = cppOutput . filePath ;
8084 cppCmd . type = type === "client" ? "client-code" : "server-code" ;
8185 cppCmd . sourceCode = function ( ) {
8286 var p = new Process ( ) ;
8387 try {
8488 p . setEnv ( "LC_ALL" , "C" ) ;
85- p . setWorkingDirectory ( FileInfo . path ( cppOutput . filePath ) ) ;
86- var cppArgs = [ type , input . filePath , "" ] ;
89+ p . setWorkingDirectory ( FileInfo . path ( outputFilePath ) ) ;
90+ var cppArgs = [ type , inputFilePath , "" ] ;
8791 p . exec ( exe , cppArgs , true ) ;
88- var file = new TextFile ( cppOutput . filePath , TextFile . WriteOnly ) ;
92+ var file = new TextFile ( outputFilePath , TextFile . WriteOnly ) ;
8993 file . write ( p . readStdOut ( ) ) ;
9094 file . close ( ) ;
9195 } finally {
0 commit comments