Skip to content

Latest commit

 

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KodePas

KodePas 2

KodePas 2 is a lightweight project manager for Free Pascal and Lazarus. It is the active implementation at the repository root. The original 2020 SDK is preserved under legacy/ and is not used by the current build.

Repository layout

  • src/ — current command-line implementation
  • tests/ and scripts/ — core and integration tests
  • legacy/ — archived KodePas 1 source, vendored Lazarus files and binaries

Requirements

  • Free Pascal 3.2.2 or newer
  • Lazarus 4.x only when building lazarus-gui projects

KodePas never downloads or executes project templates from an unsigned remote source. The initial templates are embedded in the binary so project creation is deterministic and works offline.

Build

make
./build/kodepas version

Without make:

mkdir -p build/units
fpc -Fusrc -FEbuild -FUbuild/units src/kodepas.lpr

Commands

kodepas doctor
kodepas new <name> [--type console|lazarus-gui]
kodepas build [--release]
kodepas run [-- <program arguments>]
kodepas test
kodepas clean
kodepas version

New projects contain a portable kodepas.ini manifest:

[project]
version=2
name=hello_pascal
type=console
source=src/main.pas
output=build/hello_pascal

All paths in the manifest must be relative to the project. KodePas rejects absolute paths and parent-directory traversal before writing or deleting files. The output must be an extensionless direct child of build/; Lazarus GUI projects use build/<project-name> so the manifest and .lpi target stay in sync across platforms.

kodepas run rebuilds the project, forwards arguments placed after --, and connects the program directly to the current standard input, output, and error streams. The program's exit code is returned unchanged.

Tests

make test

The test suite verifies manifest parsing, safe paths, both project scaffolds, the CLI lifecycle, compilation of a console project, and Lazarus compilation when lazbuild is available.

Migrating from KodePas 1

KodePas 1, now archived in legacy/, used local.ini and mutated Lazarus XML files during every build. Migrate projects manually for now:

  1. Keep the Pascal source and .lpi files.
  2. Create kodepas.ini using the example above.
  3. Use type=console for a direct FPC program or type=lazarus-gui for an existing .lpi project.
  4. Point source at the main .pas/.lpr or .lpi file.
  5. Keep generated output below build/.

Web, Node and Hybrid modes from the legacy CLI are intentionally not carried forward because they depended on unavailable or unsafe external tooling.

About

Free and opensource Software Development Kit for Pascal

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages