Skip to content

Commit aa71040

Browse files
committed
feat(cli-gp-gen): add a lazarus project for easy compilation and a README.md for cli-fp-gen.
1 parent c4a96ab commit aa71040

2 files changed

Lines changed: 175 additions & 0 deletions

File tree

tools/cli-fp-gen/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# cli-fp-gen
2+
3+
A standalone scaffold generator for [cli-fp](../../README.md) applications.
4+
5+
> **You must compile this tool before use.** It is a Free Pascal project and no pre-built binary is distributed.
6+
7+
## Requirements
8+
9+
- [Free Pascal Compiler (FPC) 3.2.2+](https://www.freepascal.org/)
10+
11+
## Build
12+
13+
From the repository root:
14+
15+
```bash
16+
fpc -Ftools/cli-fp-gen/src tools/cli-fp-gen/cli_fp_gen.lpr
17+
```
18+
19+
Or from this directory:
20+
21+
```bash
22+
fpc -Fsrc cli_fp_gen.lpr
23+
```
24+
25+
The output binary (`cli_fp_gen` / `cli_fp_gen.exe`) will be placed in this directory.
26+
27+
## Usage
28+
29+
```text
30+
cli-fp-gen init <target-dir> [--name <app-name>] [--version <x.y.z>] [--dry-run] [--force]
31+
cli-fp-gen generate [--project <dir-or-spec-file>] [--dry-run] [--force]
32+
cli-fp-gen add command <name> [--parent <cmd/path>] [--description <text>] [--project <dir-or-spec-file>] [--dry-run] [--force]
33+
cli-fp-gen remove command <cmd/path> [--cascade] [--project <dir-or-spec-file>] [--dry-run] [--force]
34+
```
35+
36+
## Full Documentation
37+
38+
See [docs/codegen.md](../../docs/codegen.md) for the full reference, including:
39+
40+
- Project spec format (`clifp.json`)
41+
- Supported parameter kinds
42+
- File ownership rules
43+
- Generated project layout
44+
- How to build a generated app
45+
- Verification / test scripts

tools/cli-fp-gen/cli_fp_gen.lpi

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<CONFIG>
3+
<ProjectOptions>
4+
<Version Value="12"/>
5+
<PathDelim Value="\"/>
6+
<General>
7+
<Flags>
8+
<MainUnitHasCreateFormStatements Value="False"/>
9+
<MainUnitHasTitleStatement Value="False"/>
10+
<MainUnitHasScaledStatement Value="False"/>
11+
<UseDefaultCompilerOptions Value="True"/>
12+
</Flags>
13+
<SessionStorage Value="InProjectDir"/>
14+
<Title Value="cli_fp_gen"/>
15+
<UseAppBundle Value="False"/>
16+
<ResourceType Value="res"/>
17+
</General>
18+
<BuildModes>
19+
<Item Name="Default" Default="True"/>
20+
<Item Name="Debug">
21+
<CompilerOptions>
22+
<Version Value="11"/>
23+
<PathDelim Value="\"/>
24+
<Target>
25+
<Filename Value="cli_fp_gen"/>
26+
</Target>
27+
<SearchPaths>
28+
<IncludeFiles Value="$(ProjOutDir)"/>
29+
<OtherUnitFiles Value="src"/>
30+
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
31+
</SearchPaths>
32+
<Parsing>
33+
<SyntaxOptions>
34+
<IncludeAssertionCode Value="True"/>
35+
</SyntaxOptions>
36+
</Parsing>
37+
<CodeGeneration>
38+
<Checks>
39+
<IOChecks Value="True"/>
40+
<RangeChecks Value="True"/>
41+
<OverflowChecks Value="True"/>
42+
<StackChecks Value="True"/>
43+
</Checks>
44+
<VerifyObjMethodCallValidity Value="True"/>
45+
</CodeGeneration>
46+
<Linking>
47+
<Debugging>
48+
<DebugInfoType Value="dsDwarf3"/>
49+
<UseHeaptrc Value="True"/>
50+
<TrashVariables Value="True"/>
51+
</Debugging>
52+
</Linking>
53+
<Other>
54+
<CustomOptions Value="-FcUTF8"/>
55+
</Other>
56+
</CompilerOptions>
57+
</Item>
58+
<Item Name="Release">
59+
<CompilerOptions>
60+
<Version Value="11"/>
61+
<PathDelim Value="\"/>
62+
<Target>
63+
<Filename Value="cli_fp_gen"/>
64+
</Target>
65+
<SearchPaths>
66+
<OtherUnitFiles Value="src"/>
67+
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
68+
</SearchPaths>
69+
<CodeGeneration>
70+
<SmartLinkUnit Value="True"/>
71+
<Optimizations>
72+
<OptimizationLevel Value="3"/>
73+
</Optimizations>
74+
</CodeGeneration>
75+
<Linking>
76+
<Debugging>
77+
<GenerateDebugInfo Value="False"/>
78+
<RunWithoutDebug Value="True"/>
79+
<StripSymbols Value="True"/>
80+
</Debugging>
81+
<LinkSmart Value="True"/>
82+
</Linking>
83+
<Other>
84+
<CustomOptions Value="-FcUTF8"/>
85+
</Other>
86+
</CompilerOptions>
87+
</Item>
88+
</BuildModes>
89+
<PublishOptions>
90+
<Version Value="2"/>
91+
<UseFileFilters Value="True"/>
92+
</PublishOptions>
93+
<RunParams>
94+
<FormatVersion Value="2"/>
95+
</RunParams>
96+
<Units>
97+
<Unit>
98+
<Filename Value="cli_fp_gen.lpr"/>
99+
<IsPartOfProject Value="True"/>
100+
</Unit>
101+
</Units>
102+
</ProjectOptions>
103+
<CompilerOptions>
104+
<Version Value="11"/>
105+
<PathDelim Value="\"/>
106+
<Target>
107+
<Filename Value="cli_fp_gen"/>
108+
</Target>
109+
<SearchPaths>
110+
<OtherUnitFiles Value="src"/>
111+
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
112+
</SearchPaths>
113+
<Other>
114+
<CustomOptions Value="-FcUTF8"/>
115+
</Other>
116+
</CompilerOptions>
117+
<Debugging>
118+
<Exceptions>
119+
<Item>
120+
<Name Value="EAbort"/>
121+
</Item>
122+
<Item>
123+
<Name Value="ECodetoolError"/>
124+
</Item>
125+
<Item>
126+
<Name Value="EFOpenError"/>
127+
</Item>
128+
</Exceptions>
129+
</Debugging>
130+
</CONFIG>

0 commit comments

Comments
 (0)