Skip to content

Commit fc30511

Browse files
committed
Force .ic extension for debug
1 parent 6958a5c commit fc30511

1 file changed

Lines changed: 22 additions & 2 deletions

File tree

ZXBStudio/BuildSystem/ZXProjectBuilder.cs

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,9 @@ private static void CheckNextCreator()
331331
OutputLogWritter.WriteLine("Building map files...");
332332

333333
foreach (var file in files)
334+
{
334335
file.CreateBuildFile(files);
336+
}
335337

336338
OutputLogWritter.WriteLine("Building program map...");
337339

@@ -344,7 +346,10 @@ private static void CheckNextCreator()
344346
return null;
345347
}
346348

347-
var proc = Process.Start(new ProcessStartInfo(Path.GetFullPath(ZXOptions.Current.ZxbcPath), $"\"{Path.Combine(codeFile.Directory, codeFile.TempFileName)}\" -M MEMORY_MAP " + args) { WorkingDirectory = project.ProjectPath, RedirectStandardError = true, CreateNoWindow = true });
349+
var proc = Process.Start(
350+
new ProcessStartInfo(
351+
Path.GetFullPath(ZXOptions.Current.ZxbcPath),
352+
$"\"{Path.Combine(codeFile.Directory, codeFile.TempFileName)}\" -M MEMORY_MAP " + args) { WorkingDirectory = project.ProjectPath, RedirectStandardError = true, CreateNoWindow = true });
348353

349354
OutputProcessLog(OutputLogWritter, proc, out logOutput);
350355

@@ -364,7 +369,22 @@ private static void CheckNextCreator()
364369

365370
OutputLogWritter.WriteLine("Building variable map...");
366371

367-
proc = Process.Start(new ProcessStartInfo(Path.GetFullPath(ZXOptions.Current.ZxbcPath), $"\"{Path.Combine(codeFile.Directory, codeFile.TempFileName)}\" -E " + args) { WorkingDirectory = project.ProjectPath, RedirectStandardError = true, CreateNoWindow = true });
372+
// DUEFECTU: 2024.09.11 -> Force .ic extension for debug
373+
//proc = Process.Start(new ProcessStartInfo(Path.GetFullPath(ZXOptions.Current.ZxbcPath), $"\"{Path.Combine(codeFile.Directory, codeFile.TempFileName)}\" -E " + args) { WorkingDirectory = project.ProjectPath, RedirectStandardError = true, CreateNoWindow = true });
374+
var pi = new ProcessStartInfo();
375+
pi.WorkingDirectory = project.ProjectPath;
376+
pi.RedirectStandardError = true;
377+
pi.CreateNoWindow = true;
378+
// Compile command
379+
var tempFileName = Path.Combine(codeFile.Directory, codeFile.TempFileName);
380+
var debugFile = Path.GetFileNameWithoutExtension(tempFileName) + ".ic"; // force .ic extension
381+
pi.FileName = Path.GetFullPath(ZXOptions.Current.ZxbcPath); // ZXBC.exe
382+
pi.Arguments = string.Format("\"{0}\" -E -o {1} {2}",
383+
tempFileName, // Main project file
384+
debugFile, // Debug file
385+
args); // user arguments
386+
// Go for it
387+
proc = Process.Start(pi);
368388

369389
OutputProcessLog(OutputLogWritter, proc, out logOutput);
370390

0 commit comments

Comments
 (0)