Skip to content

Base Scripts

Demez edited this page Feb 16, 2020 · 6 revisions

Base scripts define all the base macros, configurations, projects, and project groups

Any macro defined here will be included in every project

The default basefile is set to "_qpc_scripts/_default.qpc_base" and is checked each time QPC is run

Configurations:

These are configurations that will be defined as a macro set to 1 when parsing the project

configurations
{
    Debug
    Release
}

example use:

macro "CONFIG" "Debug" [$DEBUG]
macro "CONFIG" "Release" [$RELEASE]

Projects

Project Blocks define paths to project scripts, and you can have multiple paths in one block, usually with conditionals

They can be in one line like this:

project "Project Name" "path/to/one/project_script.qpc"

Or like this for multiple scripts, usually with a macro to pick one:

project "Project Name"
{
    "path/to/one/foobar.qpc"     [$FOOBAR]
    "path/to/other/barfoo.qpc"   [$BARFOO]
}

Project Groups

Project Group Blocks define a groups of projects you may want to use

Creating a block:

group "Group Name"
{
    "Project Name"
    "Foo"
    "Bar"
}

You can also add multiple names onto a project group block to be used in any group matching that name

So this:

group "GroupOne"
{
    "Project Name"
    "Foo"
    "Bar"
}

group "GroupOne" "GroupTwo"
{
    "SomeOtherProject"
    "YetAnotherProject"
    "Baz"
}

Would result in all projects from GroupTwo to join into GroupOne, like this:

group "GroupOne"
{
    "Project Name"
    "Foo"
    "Bar"
    "SomeOtherProject"
    "YetAnotherProject"
    "Baz"
}

group "GroupTwo"
{
    "SomeOtherProject"
    "YetAnotherProject"
    "Baz"
}

You can also add projects into folders in groups for ides/editors, useful for big projects

group "GroupOne"
{
    "Project Name"
    "Foo"
    "Bar"

    folder "Example"
    {
        "SomeOtherProject"
        "YetAnotherProject"
        "Baz"
    }
}

Folders will be merged with merging groups

Clone this wiki locally