Skip to content

Commit c3ded63

Browse files
author
Juan Segura
committed
Merge branch 'master' into features/zxgraphics
2 parents fdacf6a + a2d919f commit c3ded63

File tree

5 files changed

+79
-12
lines changed

5 files changed

+79
-12
lines changed

.github/workflows/build.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Build .NET project
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repo
12+
uses: actions/checkout@v4
13+
14+
- name: Install .NET 8
15+
run: |
16+
curl -Lo dotnet.tar.gz https://download.visualstudio.microsoft.com/download/pr/a91ddad4-a3c2-4303-9efc-1ca6b7af850c/be1763df9211599df1cf1c6f504b3c41/dotnet-sdk-8.0.405-linux-x64.tar.gz
17+
mkdir dotnet
18+
tar -C dotnet -xf dotnet.tar.gz
19+
rm dotnet.tar.gz
20+
echo DOTNET_ROOT=~/dotnet >> $GITHUB_ENV
21+
echo PATH=$PATH:~/dotnet >> $GITHUB_ENV
22+
23+
- name: Show version
24+
run: dotnet --version
25+
26+
- name: Clean build artifacts
27+
run: dotnet restore
28+
29+
- name: Build project
30+
run: dotnet build ZXBasicStudio.sln --configuration Release --no-restore
31+
32+
- name: Publish for Linux
33+
run: |
34+
dotnet publish ZXBStudio/ZXBasicStudio.csproj -c Release -r linux-x64 --self-contained true -p:PublishSingleFile=true -o out
35+
36+
- name: Publish for Windows
37+
run: |
38+
dotnet publish ZXBStudio/ZXBasicStudio.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -o out-win
39+
40+
- name: Publish for Mac
41+
run: |
42+
dotnet publish ZXBStudio/ZXBasicStudio.csproj -c Release -r osx-x64 --self-contained true -p:PublishSingleFile=true -o out-mac
43+
44+
- uses: actions/upload-artifact@v4
45+
with:
46+
name: ZXBasicStudio-linux-x64
47+
path: ~/work/ZXBasicStudio/ZXBasicStudio/out/
48+
49+
- uses: actions/upload-artifact@v4
50+
with:
51+
name: ZXBasicStudio-win-x64
52+
path: ~/work/ZXBasicStudio/ZXBasicStudio/out-win/
53+
54+
- uses: actions/upload-artifact@v4
55+
with:
56+
name: ZXBasicStudio-osx-x64
57+
path: ~/work/ZXBasicStudio/ZXBasicStudio/out-mac/
58+

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
# ZX Basic Studio
2-
ZX Basic Studio is a project created and led by **El Dr. Gusman**, and is available at https://github.com/gusmanb/ZXBasicStudio.
2+
ZX Basic Studio is a project initially created by **Dr. Gusman** whose original code and earlier versions can be found at https://github.com/gusmanb/ZXBasicStudio.
3+
ZX Basic Studio is a cross-platform IDE for the Boriel Basic compiler https://github.com/boriel-basic
34

4-
# Beta 1.0 released!
5-
We are ahppy to announce the [first beta release of ZX Basic Studio](https://github.com/gusmanb/ZXBasicStudio/releases/tag/v1.0-beta.1). This is a work in progress but the development has reached a state in which we feel comfortable to release it to be tested by users.
5+
This is a work in progress but the development has reached a state in which we feel comfortable to release it to be tested by users.
66
Expect bugs as this is a development build.
77

8-
Documentation will come in the near future, but for now you can refer to the [series of videos about ZX Basic](https://www.youtube.com/watch?v=Z0pqYjZBOb0&list=PL4n2c1PEER_qiuLUrLLpftGiW8IPB4IZd) by [Briefer666](https://www.youtube.com/@briefer666)
8+
Download latest version from [releases section](https://github.com/boriel-basic/ZXBasicStudio/releases)
9+
10+
Documentation will come in the near future, take a look at the book [Boriel Basic for ZX Spectrum: A guide for beginners…and those who are not so much](https://www.amazon.co.uk/dp/B0DBF4BHXY) or the spanish version [Boriel Basic para ZX Spectrum: Manual para torpes...y para los que no lo son tanto (Boriel Basic for ZX Spectrum)](https://www.amazon.es/Boriel-Basic-para-ZX-Spectrum/dp/B0CQD65FXZ)
911

1012
Have fun!
1113

1214
## Credits
1315
- Development team:
1416
- El Dr. Gusman
17+
- Boriel
1518
- Duefectu
1619
- AdolFITO
1720
- HashIron

ZXBStudio/BuildSystem/ZXCodeFile.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
using Avalonia.Svg.Skia;
2-
using System;
1+
using System;
32
using System.Collections.Generic;
43
using System.IO;
54
using System.Linq;
6-
using System.Reflection.Metadata;
75
using System.Text;
86
using System.Text.RegularExpressions;
9-
using System.Threading.Tasks;
10-
using ZXBasicStudio.Classes;
117
using ZXBasicStudio.DocumentModel.Classes;
128
using ZXBasicStudio.IntegratedDocumentTypes.CodeDocuments.Basic;
139

@@ -99,6 +95,11 @@ void ContentCleanup()
9995
Content = regRemoveEmpty.Replace(Content, "");
10096
}
10197

98+
private string GetSourceLine(int lineNum, string line)
99+
{
100+
return $"file__{FileGuid}__{lineNum}:\n{line}";
101+
}
102+
102103
public void CreateBuildFile(IEnumerable<ZXCodeFile> AllFiles)
103104
{
104105
string content = Content;
@@ -155,7 +156,7 @@ public void CreateBuildFile(IEnumerable<ZXCodeFile> AllFiles)
155156
else
156157
{
157158
sbSource.AppendLine(line);
158-
line = $"file__{FileGuid}__{lineIndex}: {line}";
159+
line = GetSourceLine(lineIndex, line);
159160
sb.AppendLine(line);
160161
}
161162

@@ -244,11 +245,11 @@ public void CreateBuildFile(IEnumerable<ZXCodeFile> AllFiles)
244245
}
245246
else if (inAsm && !regAsmExclude.IsMatch(line))
246247
{
247-
line = $"file__{FileGuid}__{buc}: {line}";
248+
line = GetSourceLine(buc, line);
248249
}
249250
else if (!inAsm && !string.IsNullOrWhiteSpace(line) && !regBasicExclude.IsMatch(line))
250251
{
251-
line = $"file__{FileGuid}__{buc}: {line}";
252+
line = GetSourceLine(buc, line);
252253
}
253254

254255
}

ZXBasicStudio.sln

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HeadlessEmulator", "Headles
2929
EndProject
3030
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXBasicStudioTest", "ZXBasicStudioTest\ZXBasicStudioTest.csproj", "{6A0F3D17-4AC4-43AC-BA18-2133D61D6F23}"
3131
EndProject
32+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{862E5205-9131-47CF-92B9-B0B89ACA6B28}"
33+
ProjectSection(SolutionItems) = preProject
34+
.github\workflows\build.yaml = .github\workflows\build.yaml
35+
EndProjectSection
36+
EndProject
3237
Global
3338
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3439
Debug|Any CPU = Debug|Any CPU

0 commit comments

Comments
 (0)