Setting up Trysil from git
You found Trysil on GitHub and want to try it. This post walks through everything between git clone and a working Delphi project that links against Trysil’s packages: cloning the repo, building for your Delphi version, configuring the search path, and one section that surprises Delphi newcomers — which packages your edition can actually compile.
GetIt is also an option if you prefer the package-manager route. Going from git is what I’d recommend if you want to track tip of master, pin to a tag, or contribute back. Everything below assumes a fresh clone.
1. Clone
1
git clone https://github.com/davidlastrucci/Trysil.git
This gives you the full source tree. The relevant directories:
Trysil/— core ORMTrysil.JSon/— JSON serialization moduleTrysil.Http/— REST/HTTP modulePackages/—.dprojand.dpkfiles for each supported Delphi version, plus the build batchesDemos/— runnable examplesLib/— output directory, created by the build
2. Build the packages
Each supported Delphi version has its own Build<ver>.bat in Packages/:
| Version | Batch file | Delphi |
|---|---|---|
370 | Build370.bat | 13 Florence |
290 | Build290.bat | 12 Athens |
280 | Build280.bat | 11 Alexandria |
270 | Build270.bat | 10.4 Sydney |
260 | Build260.bat | 10.3 Rio |
Open a command prompt in Packages/ and run the one that matches your Delphi:
1
Build370.bat
Each Build<ver>.bat is a one-liner that delegates to MainBuild.bat with three arguments — Studio version, package version, and target platforms:
1
@CALL "%~dp0MainBuild.bat" 37.0 370 "Win32 Win64"
Win32 and Win64 in both Debug and Release is the default. If you also want Linux64 (or OSX64, iOSDevice64, etc.), open the batch file for your version — it’s literally one line — and append the platform to the quoted list:
1
@CALL "%~dp0MainBuild.bat" 37.0 370 "Win32 Win64 Linux64"
Compiled output lands under Lib/<ver>/$(Platform)/$(Config)/ as .bpl, .dcp, and .dcu files. On a clean run you’ll see one [OK] line per package/config/platform and a final BUILD SUCCESS in green. If anything fails, the MSBuild output for that single invocation is printed inline — easier to read than scrolling through a wall of green-on-success noise.
3. Edition compatibility
This is the part that surprises people new to Delphi. Not every package compiles on every edition: FireDAC’s database drivers are gated by the edition Embarcadero licensed you.
| Driver | Community | Professional | Enterprise | Architect |
|---|---|---|---|---|
Trysil.SQLite | ✓ | ✓ | ✓ | ✓ |
Trysil.PostgreSQL | ✓ (localhost only) | ✓ (localhost only) | ✓ | ✓ |
Trysil.FirebirdSQL | ✓ (localhost / embedded) | ✓ (localhost / embedded) | ✓ | ✓ |
Trysil.SqlServer | ✗ | ✗ | ✓ | ✓ |
Two practical consequences:
- SQL Server requires Enterprise or Architect. On Community and Professional, the
Trysil.SqlServer<ver>package fails to build because the FireDAC SQL Server units (FireDAC.Phys.MSSQL) ship only with the higher editions. The fix on Pro is to removeTrysil.SqlServerfrom the package list inMainBuild.bat, or just accept the single failure: the build continues regardless, every other driver still produces its.bpland.dcu. - PostgreSQL and Firebird connect to local servers only on Community/Professional. The packages compile and the units are usable; FireDAC simply restricts the runtime connection to
localhost(or embedded mode for Firebird). To talk to a remote database server you need Enterprise or Architect.
SQLite has no restriction — it’s file-based, “local” by definition, and works on every edition. That’s why every Trysil tutorial post starts there.
If your goal is just to follow along with the documentation, none of this affects you.
4. Configure your project
Two settings in your consumer project and you’re done.
Environment variable $(Trysil)
Point an environment variable named Trysil at the Lib/<ver>/ directory. For Delphi 13:
1
Trysil = C:\path\to\Trysil\Lib\370
You can set it system-wide (Windows → Environment Variables) or per-IDE in Tools → Options → IDE → Environment Variables. The latter keeps the variable scoped to Delphi and out of your shell.
Search path
In your project’s Project Options → Building → Delphi Compiler → Search path, add:
1
$(Trysil)\$(Platform)\$(Config)
$(Platform) and $(Config) are Delphi’s own build-time macros (Win64, Debug, etc.). One entry covers every platform/config combination — you don’t need a separate path per target.
5. Verify
If everything is set up correctly:
Build370.batended withBUILD SUCCESSin greenLib/370/Win64/Release/Trysil370.bplexists (or the path matching your version and target)A new Delphi project with
1 2 3 4
uses Trysil.Data, Trysil.Data.FireDAC.SQLite, Trysil.Context;
compiles without complaining about missing units
You’re ready for the next step. The natural follow-up is your first Trysil entity — a tiny SQLite program that maps a class and runs read, insert, update, delete.
Happy coding.