more info about building the compiler

This commit is contained in:
Irmen de Jong 2023-07-04 22:41:38 +02:00
parent 5af1aeb092
commit b3bdfb7f1f
2 changed files with 13 additions and 2 deletions

View File

@ -14,6 +14,15 @@ Documentation
Full documentation (syntax reference, how to use the language and the compiler, etc.) can be found at: Full documentation (syntax reference, how to use the language and the compiler, etc.) can be found at:
https://prog8.readthedocs.io/ https://prog8.readthedocs.io/
How to get it/build it
----------------------
- Download the latest [official release](https://github.com/irmen/prog8/releases) from github.
- Or, if you want/need a bleeding edge development version, you can:
- download a build artifact zipfile from a recent [github action build](https://github.com/irmen/prog8/actions).
- you can also compile it yourself from source. [Instructions here](https://prog8.readthedocs.io/en/latest/compiling.html).
Software license Software license
---------------- ----------------
GNU GPL 3.0 (see file LICENSE), with exception for generated code: GNU GPL 3.0 (see file LICENSE), with exception for generated code:

View File

@ -19,11 +19,13 @@ Then you can choose a few ways to get a compiler:
**Using the Gradle build system to build it yourself:** **Using the Gradle build system to build it yourself:**
The Gradle build system is used to build the compiler. The Gradle build system is used to build the compiler.
The most interesting gradle commands to run are probably: The most interesting gradle commands to run are probably the ones listed below.
(Note: if you have a recent gradle installed on your system already, you can probably replace the ``./gradlew`` wrapper commands with just the regular ``gradle`` command.)
``./gradlew build`` ``./gradlew build``
Builds the compiler code and runs all available checks and unit-tests. Builds the compiler code and runs all available checks and unit-tests.
Also automatically runs the installDist and installShadowDist tasks. Also automatically runs the installDist and installShadowDist tasks.
Read below at those tasks for where the resulting compiler jar file gets written.
``./gradlew installDist`` ``./gradlew installDist``
Builds the compiler and installs it with scripts to run it, in the directory Builds the compiler and installs it with scripts to run it, in the directory
``./compiler/build/install/p8compile`` ``./compiler/build/install/p8compile``
@ -43,7 +45,7 @@ For normal use, the ``installDist`` task should suffice and after succesful comp
.. hint:: .. hint::
Development and testing is done on Linux using the IntelliJ IDEA IDE, Development and testing is done on Linux using the IntelliJ IDEA IDE,
but the compiler should run on all operating systems that provide a java runtime (version 11 or newer). but the actual prog8 compiler should run on all operating systems that provide a java runtime (version 11 or newer).
If you do have trouble building or running the compiler on your operating system, please let me know! If you do have trouble building or running the compiler on your operating system, please let me know!
To successfully build and debug in IDEA, you have to manually generate the Antlr-parser classes first. To successfully build and debug in IDEA, you have to manually generate the Antlr-parser classes first.