Directory Structure

Directory Structure

fips creates project directories and a few special directories on the same level as the fips directory itself.

┣━━ fips/
┣━━ fips-build/
┣━━ fips-deploy/
┣━━ fips-sdks/
┣━━ project-1/
┣━━ project-2/
┣━━ .../

The fips-build directory

The fips-build directory contains the generated cmake build files, separated in subdirectories by project name and config name. The content of fips-build is created with the ‘fips gen’ command (or on the fly during ‘fips build’ or ‘fips make’):

┗━━ fips-build/
    ┣━━ project-1/
    ┃   ┣━━ osx-xcode-debug/
    ┃   ┃   ┣━━ oryol.xcodeproj/
    ┃   ┃   ┗━━ ...
    ┃   ┗━━ emsc-make-release/
    ┃       ┣━━ Makefile
    ┃       ┗━━ ...
    ┗━━ project-2/
        ┗━━ emsc-make-release/
            ┣━━ Makefile
            ┗━━ ...

The fips-deploy directory

The fips-deploy directory contains the built executable files, also separated in subdirectories by project and config name. The content of the fips-deploy directory is created during the ‘fips build’ or ‘fips make’ commands:

┗━━ fips-deploy/
    ┣━━ project-1/
    ┃   ┣━━ osx-xcode-debug/
    ┃   ┃   ┣━━
    ┃   ┃   ┣━━
    ┃   ┃   ┗━━ ...
    ┃   ┗━━ emsc-make-release/
    ┃       ┣━━ app-1.html
    ┃       ┣━━ app-2.html
    ┃       ┗━━ ...
    ┗━━ project-2/
        ┗━━ emsc-make-release/
            ┣━━ app-1.html
            ┗━━ ...

Both the fips-build and fips-deploy directories contain only generated files, it is not dangerous to completely delete these directories.

The fips command ‘fips clean [config]' deletes the generated files for all configs, the active config, or a named config.

The fips-sdks directory

The fips-sdks directory contains the platform SDK files installed with:

> fips setup emscripten
> fips setup android

The fips-sdks directory structure currently looks like this (details may change in the future):

┗━━ fips-sdks/
    ┗━━ android
    ┗━━ emsdk

Special fips files

A project needs at least a fips.yml file to be recognized as a fips project. Most projects have additional fips-specific files and directories:

┗━━ project-1/
    ┣━━ fips.yml 
    ┣━━ fips 
    ┣━━ fips.cmd 
    ┣━━ fips-files/
    ┃   ┣━━ include.cmake 
    ┃   ┣━━ verbs/ 
    ┃   ┣━━ generators/ 
    ┃   ┣━━ configs/
    ┃   ┗━━ toolchains/
    ┣━━ .fips-settings.yml
    ┣━━ .fips-imports.cmake

All files except fips.yml are optional, all hidden files (starting with a ‘.') are maintained by fips and should not be under version control.

Here’s a description of what each file means:

  • fips.yml: contains the imports, exports and policy options of the project
  • fips: proxy python script to be able to run fips commands from within the project directory
  • fips.cmd: Windows batch file to call the ‘fips’ python script
  • fips-files/include.cmake: if present, this cmake file is included by other fips projects which depend on this project, this can be used to define global cmake attributes for projects which export multiple modules
  • fips-files/verbs/: if present, this directory contains python scripts which add additional commands (verbs) to fips
  • fips-files/generators/: if present, this directory contains python code-generator scripts which are called during the build process
  • fips-files/configs/: if present, the fips-files/configs directory contains additional fips configs, the config names must not collide with the fips standard config names (e.g. osx-xcode-debug), so it is a good idea to include the project name in those custom configs
  • fips-files/toolchains: if this directory exists it should contain cmake toolchain files, which can either override the standard toolchain files in the fips-directory, or can be completely new toolchain files for new platforms. Toolchain files can be defined in build-configs using the ‘cmake-toolchain’ attribute. Toolchain files will be searched in the following order: first in the current project, then in imported projects, and finally in the fips directory itself.
  • .fips-settings.yml: hidden file with project-specific fips settings generated by ‘fips set [key] [value]' or ‘fips unset [key]'
  • .fips-imports.cmake: generated cmake file which contains all imports of the project, the .fips-imports.cmake file is created during ‘fips gen’ and other fips commands which implicitly do a cmake run (like ‘fips build’ or ‘fips make’)
  • a generated python helper script for code generation during the build process