ForNeVeR / PascalABC.NET.SDK

MSBuild SDK for PascalABC.NET
MIT License
18 stars 2 forks source link
dotnet pascalabcnet

PascalABC.NET SDK Status Enfer

This is an MSBuild SDK for PascalABC.NET programming language.

NuGet

Usage

Prerequisites

  1. For now, only Windows is supported as the target platform.
  2. Download .NET 6 SDK or later.

Quick Start

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.

Items

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.

References

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.

Properties

You can change the following properties in your project file to customize the SDK behavior.

Common MSBuild properties are supported as well.

Development

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

Documentation