This is an MSBuild SDK for PascalABC.NET programming language.
- For now, only Windows is supported as the target platform.
- Download .NET 6 SDK or later.
Prepare the following project file, MyProject.pasproj
:
<Project Sdk="FVNever.PascalABC.NET.SDK/2.0.1">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
</PropertyGroup>
<ItemGroup>
<MainCompile Include="Hello.pas" />
</ItemGroup>
</Project>
where Hello.pas
is your main Pascal module, for example:
uses References_Generated; // to use SDK-generated assembly references
begin
writeln('Hello, world!');
end.
After that, dotnet build
should build the PascalABC.NET project; see the output in the bin
directory.
dotnet run
may be used to run the project.
See the PascalABC.NET.SDK.Demo
project for details.
In a project, there should be exactly one <MainCompile>
item, which will be the main module passed to the compiler.
Other (non-main) .pas
files may be added as <Compile>
items, which are only used to track incremental compilation dependencies.
All the assembly references are resolved during build and written to a generated module References_Generated
by default. This means that your main module should add uses References_Generated
to access the referenced assemblies.
You can change the following properties in your project file to customize the SDK behavior.
PascalABCNETCompilerPackageName
: the name of the compiler package that will be downloaded from NuGet,FVNever.PascalABC.NET.Compiler
by default.PascalABCNETCompilerPackageVersion
: the version of the compiler package to use; may be updated if a new version of the SDK is published.SkipPascalABCNETCompilerInstallation
: set totrue
to skip the compiler installation by the SDK (if you want to get the compiler yourself via other means).
DebugMode
: iftrue
, then the compiler will generate debug information and disable the optimizations. Enabled by default for theDebug
configuration.PascalAbcCompilerCommand
: command to run the compiler; just the path to the packaged compiler executable by default.SkipGenerateReferenceFile
: if you don't want the SDK to generate the reference module.
Common MSBuild properties are supported as well.
Before opening the solution or running the unit testing suite, first publish the development packages using this shell command (PowerShell is required):
$ pwsh ./scripts/build-packages.ps1
To execute the tests, run the following shell commands:
$ dotnet test PascalABC.NET.UnitTests
$ dotnet test PascalABC.NET.IntegrationTests