Updated ExampleLibrary and fixed the project creation command to use the correct source directory
This commit is contained in:
parent
b0718aeb74
commit
191b121542
6 changed files with 130 additions and 7 deletions
|
@ -6,3 +6,34 @@ this project is a means to test the compiler capabilities of NCC
|
|||
|
||||
### Generating a project configuration file.
|
||||
|
||||
You can generate a project configuration file using the NCC
|
||||
command-line interface, you should run the command in the
|
||||
root directory of your project rather than the source directory.
|
||||
|
||||
The argument `src` allows you to specify the source directory
|
||||
which is required, otherwise NCC will assume the src directory is the current working directory.
|
||||
|
||||
```shell
|
||||
$ ls
|
||||
README.md src
|
||||
|
||||
$ ncc project create --src="src/ExampleLibrary" --package="com.example.library" --name="ExampleLibrary"
|
||||
Project successfully created
|
||||
|
||||
$ ls
|
||||
ncc project.json README.md src
|
||||
```
|
||||
|
||||
Upon creating the project, you will see a directory named `ncc`
|
||||
and a file named `project.json`, the `ncc` directory will simply
|
||||
contain extra information about the project, the file `project.json`
|
||||
contains information about the project itself, you can modify
|
||||
and change the contents of the project accordingly
|
||||
|
||||
This process only needs to be done once, any additional changes
|
||||
can be done manually by editing project.json
|
||||
|
||||
Once project.json is created, the project can be compiled using NCC
|
||||
|
||||
|
||||
### Compiling the project
|
57
tests/example_project/project.json
Normal file
57
tests/example_project/project.json
Normal file
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"project": {
|
||||
"compiler": {
|
||||
"extension": "php",
|
||||
"minimum_version": "7.4",
|
||||
"maximum_version": "8.1"
|
||||
},
|
||||
"options": []
|
||||
},
|
||||
"assembly": {
|
||||
"name": "ExampleLibrary",
|
||||
"package": "com.example.library",
|
||||
"description": null,
|
||||
"company": null,
|
||||
"product": null,
|
||||
"copyright": null,
|
||||
"trademark": null,
|
||||
"version": "1.0.0",
|
||||
"uid": "4a37f1c8-50a2-11ed-9ce4-170520693532"
|
||||
},
|
||||
"build": {
|
||||
"source_path": "src/ExampleLibrary",
|
||||
"default_configuration": "debug",
|
||||
"exclude_files": [],
|
||||
"options": [],
|
||||
"scope": null,
|
||||
"define_constants": {
|
||||
"ASSEMBLY_NAME": "%ASSEMBLY.NAME%",
|
||||
"ASSEMBLY_PACKAGE": "%ASSEMBLY.PACKAGE%",
|
||||
"ASSEMBLY_VERSION": "%ASSEMBLY.VERSION%",
|
||||
"ASSEMBLY_UID": "%ASSEMBLY.UID%"
|
||||
},
|
||||
"dependencies": [],
|
||||
"configurations": [
|
||||
{
|
||||
"name": "debug",
|
||||
"options": [],
|
||||
"output_path": "build/debug",
|
||||
"define_constants": {
|
||||
"DEBUG": "1"
|
||||
},
|
||||
"exclude_files": [],
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"name": "release",
|
||||
"options": [],
|
||||
"output_path": "build/release",
|
||||
"define_constants": {
|
||||
"DEBUG": "0"
|
||||
},
|
||||
"exclude_files": [],
|
||||
"dependencies": []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue