diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 0000000..7d93cd8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,53 @@ +name: Bug Report +description: File a bug report. +title: "[Bug]: " +labels: ["bug", "triage"] +projects: ["boriel-basic/2"] +assignees: + - duefectu +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + - type: input + id: contact + attributes: + label: Contact Details + description: How can we get in touch with you if we need more info? + placeholder: e.g. Telegram @nickname + validations: + required: false + - type: input + id: version + attributes: + label: IDE version + description: | + Always check you have the latest version. + placeholder: 0.2-beta + validations: + required: true + - type: textarea + id: what-happened + attributes: + label: What happened? + description: Also tell us, what did you expect to happen? + placeholder: Tell us what you see! + validations: + required: true + - type: textarea + id: logs + attributes: + label: Error and Warning messages + description: | + Please copy and paste any relevant log output. + This will be automatically formatted into code, so no need for backticks. + render: shell + - type: checkboxes + id: terms + attributes: + label: Code of Conduct + description: By submitting this issue, you agree to follow our [Code of Conduct](https://boriel-basic/zxbasic/blob/main/CODE_OF_CONDUCT.md). + options: + - label: I agree to follow this project's Code of Conduct + required: true diff --git a/ZXBStudio/BuildSystem/ZXProjectBuilder.cs b/ZXBStudio/BuildSystem/ZXProjectBuilder.cs index 42e50f6..37ad8cd 100644 --- a/ZXBStudio/BuildSystem/ZXProjectBuilder.cs +++ b/ZXBStudio/BuildSystem/ZXProjectBuilder.cs @@ -331,7 +331,9 @@ private static void CheckNextCreator() OutputLogWritter.WriteLine("Building map files..."); foreach (var file in files) + { file.CreateBuildFile(files); + } OutputLogWritter.WriteLine("Building program map..."); @@ -344,7 +346,10 @@ private static void CheckNextCreator() return null; } - 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 }); + 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 }); OutputProcessLog(OutputLogWritter, proc, out logOutput); @@ -364,7 +369,22 @@ private static void CheckNextCreator() OutputLogWritter.WriteLine("Building variable map..."); - 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 }); + // DUEFECTU: 2024.09.11 -> Force .ic extension for debug + //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 }); + var pi = new ProcessStartInfo(); + pi.WorkingDirectory = project.ProjectPath; + pi.RedirectStandardError = true; + pi.CreateNoWindow = true; + // Compile command + var tempFileName = Path.Combine(codeFile.Directory, codeFile.TempFileName); + var debugFile = Path.GetFileNameWithoutExtension(tempFileName) + ".ic"; // force .ic extension + pi.FileName = Path.GetFullPath(ZXOptions.Current.ZxbcPath); // ZXBC.exe + pi.Arguments = string.Format("\"{0}\" -E -o {1} {2}", + tempFileName, // Main project file + debugFile, // Debug file + args); // user arguments + // Go for it + proc = Process.Start(pi); OutputProcessLog(OutputLogWritter, proc, out logOutput); diff --git a/ZXBasicStudio.sln b/ZXBasicStudio.sln index 4c8ad37..a227bd4 100644 --- a/ZXBasicStudio.sln +++ b/ZXBasicStudio.sln @@ -25,7 +25,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Elementos de la soluciĆ³n", README.md = README.md EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeadlessEmulator", "HeadlessEmulator\HeadlessEmulator.csproj", "{D99C36AE-072A-4885-9585-CFD78FC6763E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HeadlessEmulator", "HeadlessEmulator\HeadlessEmulator.csproj", "{D99C36AE-072A-4885-9585-CFD78FC6763E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXBasicStudioTest", "ZXBasicStudioTest\ZXBasicStudioTest.csproj", "{6A0F3D17-4AC4-43AC-BA18-2133D61D6F23}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -107,6 +109,14 @@ Global {D99C36AE-072A-4885-9585-CFD78FC6763E}.Release|Any CPU.Build.0 = Release|Any CPU {D99C36AE-072A-4885-9585-CFD78FC6763E}.Release|x64.ActiveCfg = Release|Any CPU {D99C36AE-072A-4885-9585-CFD78FC6763E}.Release|x64.Build.0 = Release|Any CPU + {6A0F3D17-4AC4-43AC-BA18-2133D61D6F23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6A0F3D17-4AC4-43AC-BA18-2133D61D6F23}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6A0F3D17-4AC4-43AC-BA18-2133D61D6F23}.Debug|x64.ActiveCfg = Debug|Any CPU + {6A0F3D17-4AC4-43AC-BA18-2133D61D6F23}.Debug|x64.Build.0 = Debug|Any CPU + {6A0F3D17-4AC4-43AC-BA18-2133D61D6F23}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6A0F3D17-4AC4-43AC-BA18-2133D61D6F23}.Release|Any CPU.Build.0 = Release|Any CPU + {6A0F3D17-4AC4-43AC-BA18-2133D61D6F23}.Release|x64.ActiveCfg = Release|Any CPU + {6A0F3D17-4AC4-43AC-BA18-2133D61D6F23}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ZXBasicStudioTest/UnitTest1.cs b/ZXBasicStudioTest/UnitTest1.cs new file mode 100644 index 0000000..e6a0eb5 --- /dev/null +++ b/ZXBasicStudioTest/UnitTest1.cs @@ -0,0 +1,14 @@ +namespace ZXBasicStudioTest +{ + public class UnitTest1 + { + [Fact] + public void Test1() + { + int a = 10; + int b = 20; + + Assert.NotEqual(a, b); + } + } +} \ No newline at end of file diff --git a/ZXBasicStudioTest/ZXBasicStudioTest.csproj b/ZXBasicStudioTest/ZXBasicStudioTest.csproj new file mode 100644 index 0000000..7767c58 --- /dev/null +++ b/ZXBasicStudioTest/ZXBasicStudioTest.csproj @@ -0,0 +1,29 @@ + + + + net8.0 + enable + enable + + false + true + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + +