Skip to content

Commit 8227c9d

Browse files
committed
Merge branch 'master' into features/zxgraphics
2 parents 61766e8 + 577007b commit 8227c9d

5 files changed

Lines changed: 129 additions & 3 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Bug Report
2+
description: File a bug report.
3+
title: "[Bug]: "
4+
labels: ["bug", "triage"]
5+
projects: ["boriel-basic/2"]
6+
assignees:
7+
- duefectu
8+
body:
9+
- type: markdown
10+
attributes:
11+
value: |
12+
Thanks for taking the time to fill out this bug report!
13+
- type: input
14+
id: contact
15+
attributes:
16+
label: Contact Details
17+
description: How can we get in touch with you if we need more info?
18+
placeholder: e.g. Telegram @nickname
19+
validations:
20+
required: false
21+
- type: input
22+
id: version
23+
attributes:
24+
label: IDE version
25+
description: |
26+
Always check you have the latest version.
27+
placeholder: 0.2-beta
28+
validations:
29+
required: true
30+
- type: textarea
31+
id: what-happened
32+
attributes:
33+
label: What happened?
34+
description: Also tell us, what did you expect to happen?
35+
placeholder: Tell us what you see!
36+
validations:
37+
required: true
38+
- type: textarea
39+
id: logs
40+
attributes:
41+
label: Error and Warning messages
42+
description: |
43+
Please copy and paste any relevant log output.
44+
This will be automatically formatted into code, so no need for backticks.
45+
render: shell
46+
- type: checkboxes
47+
id: terms
48+
attributes:
49+
label: Code of Conduct
50+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://boriel-basic/zxbasic/blob/main/CODE_OF_CONDUCT.md).
51+
options:
52+
- label: I agree to follow this project's Code of Conduct
53+
required: true

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

ZXBasicStudio.sln

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Elementos de la solución",
2525
README.md = README.md
2626
EndProjectSection
2727
EndProject
28-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeadlessEmulator", "HeadlessEmulator\HeadlessEmulator.csproj", "{D99C36AE-072A-4885-9585-CFD78FC6763E}"
28+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HeadlessEmulator", "HeadlessEmulator\HeadlessEmulator.csproj", "{D99C36AE-072A-4885-9585-CFD78FC6763E}"
29+
EndProject
30+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXBasicStudioTest", "ZXBasicStudioTest\ZXBasicStudioTest.csproj", "{6A0F3D17-4AC4-43AC-BA18-2133D61D6F23}"
2931
EndProject
3032
Global
3133
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -107,6 +109,14 @@ Global
107109
{D99C36AE-072A-4885-9585-CFD78FC6763E}.Release|Any CPU.Build.0 = Release|Any CPU
108110
{D99C36AE-072A-4885-9585-CFD78FC6763E}.Release|x64.ActiveCfg = Release|Any CPU
109111
{D99C36AE-072A-4885-9585-CFD78FC6763E}.Release|x64.Build.0 = Release|Any CPU
112+
{6A0F3D17-4AC4-43AC-BA18-2133D61D6F23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
113+
{6A0F3D17-4AC4-43AC-BA18-2133D61D6F23}.Debug|Any CPU.Build.0 = Debug|Any CPU
114+
{6A0F3D17-4AC4-43AC-BA18-2133D61D6F23}.Debug|x64.ActiveCfg = Debug|Any CPU
115+
{6A0F3D17-4AC4-43AC-BA18-2133D61D6F23}.Debug|x64.Build.0 = Debug|Any CPU
116+
{6A0F3D17-4AC4-43AC-BA18-2133D61D6F23}.Release|Any CPU.ActiveCfg = Release|Any CPU
117+
{6A0F3D17-4AC4-43AC-BA18-2133D61D6F23}.Release|Any CPU.Build.0 = Release|Any CPU
118+
{6A0F3D17-4AC4-43AC-BA18-2133D61D6F23}.Release|x64.ActiveCfg = Release|Any CPU
119+
{6A0F3D17-4AC4-43AC-BA18-2133D61D6F23}.Release|x64.Build.0 = Release|Any CPU
110120
EndGlobalSection
111121
GlobalSection(SolutionProperties) = preSolution
112122
HideSolutionNode = FALSE

ZXBasicStudioTest/UnitTest1.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
namespace ZXBasicStudioTest
2+
{
3+
public class UnitTest1
4+
{
5+
[Fact]
6+
public void Test1()
7+
{
8+
int a = 10;
9+
int b = 20;
10+
11+
Assert.NotEqual(a, b);
12+
}
13+
}
14+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
8+
<IsPackable>false</IsPackable>
9+
<IsTestProject>true</IsTestProject>
10+
</PropertyGroup>
11+
12+
<ItemGroup>
13+
<PackageReference Include="coverlet.collector" Version="6.0.2">
14+
<PrivateAssets>all</PrivateAssets>
15+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
16+
</PackageReference>
17+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
18+
<PackageReference Include="xunit" Version="2.9.0" />
19+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
20+
<PrivateAssets>all</PrivateAssets>
21+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
22+
</PackageReference>
23+
</ItemGroup>
24+
25+
<ItemGroup>
26+
<Using Include="Xunit" />
27+
</ItemGroup>
28+
29+
</Project>

0 commit comments

Comments
 (0)