Contents | Previous | Next

#
Command Line Options

Source-Navigator supports the following command line options:

`--batchmode`

This forces batch mode to create a new project. If this is set, Source-Navigator will not launch. Instead the following command line options will be used to create a new project.

`--projectname`

This command creates a project in the current directory using the directory path. For example, if the current directory is `/home/foo` and `--projectname` is run, the project name becomes `/home/foo/foo.proj`.

`--avail-options`

Sets preferences for an option used in project creation.

`--define <option>=<value>`

Lists options that can be set using `--define`.

`--databasedir <directory>`

(synonyms: `-dbdir`, `-database`, `-db`)

Defines the directory for the symbol databases. Without this, the symbol databases are put in a directory called `SNDB4` at the same level as the project file.

`--import <file>`

Specifies a text file with a list of all files or directories to add to the project.

`--noxref`

This option prevents the creation of cross-references. By default, Source-Navigator generates cross-reference information for the project.

`--create`

This option is used to start the Auto-Create dialog. It is not normally used with `--batchmode`. Source-Navigator prompts the user for information used to create a project.

#### Example: Creating a new project in devo-files

The following command creates a project named `/home/smith/devo.proj` using the files listed in devo-files in batch mode. The database files are stored in `~/db_files`. Source-Navigator returns when the project has been created.

    ~bin/snavigator --batchmode \
      --import devo-files \
      --databasedir ~/db_files \
      --project /home/smith/devo

#### Example: Creating a new project in the current directory

The following command creates a project in batch mode using the current directory. It adds all of the files in the current directory and in all of the subdirectories. The current working directory is `/home/smith/devo/snavigator`. The generated project name is `/home/smith/devo/snavigator/snavigator.proj`.

    ~bin/snavigator --batchmode

#### Example: Auto-Create dialog

The following command displays the Auto-Create dialog, initialized with the current directory, with `foo.proj` as the project name. To view the project, you must open Source-Navigator.

    ~bin/snavigator --projectname foo

Contents | Previous | Next