40 cfg (str, prog_intersector, ""); |
40 cfg (str, prog_intersector, ""); |
41 cfg (str, prog_coverer, ""); |
41 cfg (str, prog_coverer, ""); |
42 cfg (str, prog_ytruder, ""); |
42 cfg (str, prog_ytruder, ""); |
43 cfg (str, prog_rectifier, ""); |
43 cfg (str, prog_rectifier, ""); |
44 |
44 |
|
45 #ifndef _WIN32 |
|
46 cfg (bool, prog_isecalc_wine, false); |
|
47 cfg (bool, prog_intersector_wine, false); |
|
48 cfg (bool, prog_coverer_wine, false); |
|
49 cfg (bool, prog_ytruder_wine, false); |
|
50 cfg (bool, prog_rectifier_wine, false); |
|
51 |
|
52 boolconfig* const g_extProgWine[] = { |
|
53 &prog_isecalc_wine, |
|
54 &prog_intersector_wine, |
|
55 &prog_coverer_wine, |
|
56 &prog_ytruder_wine, |
|
57 &prog_rectifier_wine, |
|
58 }; |
|
59 #endif // _WIN32 |
|
60 |
45 const char* g_extProgNames[] = { |
61 const char* g_extProgNames[] = { |
46 "Isecalc", |
62 "Isecalc", |
47 "Intersector", |
63 "Intersector", |
48 "Coverer", |
64 "Coverer", |
49 "Ytruder", |
65 "Ytruder", |
159 void runUtilityProcess (extprog prog, str path, QString argvstr) { |
175 void runUtilityProcess (extprog prog, str path, QString argvstr) { |
160 QTemporaryFile input, output; |
176 QTemporaryFile input, output; |
161 str inputname, outputname; |
177 str inputname, outputname; |
162 QStringList argv = argvstr.split (" ", QString::SkipEmptyParts); |
178 QStringList argv = argvstr.split (" ", QString::SkipEmptyParts); |
163 |
179 |
164 printf ("cmdline: %s %s\n", qchars (path), qchars (argvstr)); |
180 print ("cmdline: %1 %2\n", path, argvstr); |
|
181 |
|
182 #ifndef _WIN32 |
|
183 if (g_extProgWine[prog]) { |
|
184 argv.insert (0, path); |
|
185 path = "wine"; |
|
186 } |
|
187 #endif // _WIN32 |
165 |
188 |
166 if (!mkTempFile (input, inputname) || !mkTempFile (output, outputname)) |
189 if (!mkTempFile (input, inputname) || !mkTempFile (output, outputname)) |
167 return; |
190 return; |
168 |
191 |
169 QProcess proc; |
192 QProcess proc; |