@norgate-av/genlinx

2.2.1Β β€’Β PublicΒ β€’Β Published

genlinx

netlinx-studio-logo

CI Conventional Commits Commitizen friendly GitHub contributors NPM MIT license


A CLI utility for Netlinx projects πŸš€πŸš€πŸš€

Contents πŸ“–

Installation ⚑

Install genlinx globally with:

pnpm add -g @norgate-av/genlinx

# or

yarn global add @norgate-av/genlinx

# or

npm install -g @norgate-av/genlinx

Usage πŸš€

To run genlinx simply type:

genlinx

Command Line πŸ‘¨β€πŸ’»

                   _ _
   __ _  ___ _ __ | (_)_ __ __  __
  / _` |/ _ \ '_ \| | | '_ \\ \/ /
 | (_| |  __/ | | | | | | | |>  <
  \__, |\___|_| |_|_|_|_| |_/_/\_\
  |___/

Open source CLI tool for NetLinx projects
Copyright (c) 2022, Norgate AV Services Limited
https://github.com/Norgate-AV/genlinx

===================================================

Usage: genlinx [options] [command]

cli helper utility for NetLinx projects πŸš€πŸš€πŸš€

Options:
  -v, --version      output the version number
  -h, --help         display help for command

Commands:
  archive [options]  generate a NetLinx workspace zip archive
  build [options]    build a NetLinx project
  cfg [options]      generate NetLinx build CFG files
  help [command]     display help for command

===================================================

For more help, make sure to check out the man page:
    $ man genlinx

archive

Generate a NetLinx workspace zip archive.

Usage: genlinx archive [options]

generate a NetLinx workspace zip archive

Options:
  -w, --workspace-files <string...>              workspace file(s) to generate archive(s) for (default: search for workspace files in current directory)
  -o, --output-file-suffix <string>              output file suffix
  -S, --include-compiled-source-files            include compiled source files
  -M, --include-compiled-module-files            include compiled module files
  -N, --include-files-not-in-workspace           include files not in workspace
  -l, --extra-file-search-locations <string...>  extra file locations to search
  -p, --extra-file-archive-location <string>     location to place extra files in the archive
  --verbose                                      verbose output
  -h, --help                                     display help for command

build

Build a NetLinx project from a CFG file

Usage: genlinx build [options]

build a NetLinx project

Options:
  -c, --cfg-files <string...>     cfg file(s) to build from (default: search for CFG files in current directory)
  -s, --source-files <string...>  axs source file(s) to build
  -i, --include-path <string...>  add additional include paths
  -m, --module-path <string...>   add additional module paths
  -l, --library-path <string...>  add additional library paths
  -a, --all                       select all cfg files without prompting
  -A, --no-all                    select multiple cfg files with a prompt
  --verbose                       verbose output
  -h, --help                      display help for command

cfg

Generate a NetLinx build CFG file

Usage: genlinx cfg [options]

generate NetLinx build CFG files

Options:
  -w, --workspace-files <string...>      workspace file(s) to generate a CFG for (default: search for workspace files in current directory)
  -r, --root-directory <string>          root directory reference (default: use current directory as root)
  -o, --output-file-suffix <string>      output file suffix
  -f, --output-log-file-suffix <string>  output log file suffix
  -k, --output-log-file-option <string>  output log file option
                                         A - append
                                         N - overwrite (choices: "A", "N")
  -c, --output-log-console-option        output log to console
  -C, --no-output-log-console-option     do not output log to console
  -d, --build-with-debug-information     build with debug information
  -D, --no-build-with-debug-information  do not build with debug information
  -s, --build-with-source                build with source
  -S, --no-build-with-source             do not build with source
  -i, --include-path <string...>         add additional include paths
  -m, --module-path <string...>          add additional module paths
  -l, --library-path <string...>         add additional library paths
  -a, --all                              if no workspace files are specified with the -w option and more than one
                                         workspace file is found in the current directory, select all of them
                                         without prompting
  -A, --no-all                           if no workspace files are specified with the -w option and more than one
                                         workspace file is found in the current directory, prompt to select which
                                         workspace files to use
  --verbose                              verbose output
  -h, --help                             display help for command

Configuration βš™οΈ

Global

A global configuration file can be installed to %USERPROFILE%\.config\genlinx\config.json to assist in using genlinx. This file can be edited to change the default values for the commands options.

If you would like to use a different location to store the global configuration file, you can set the GENLINX_CONFIG_DIR environment variable to the path of the directory you would like to use. This directory must contain the config.json file.

{
    "cfg": {
        "outputFile": "build.cfg",
        "outputLogFile": "build.log",
        "outputLogFileOption": "N",
        "outputLogConsoleOption": true,
        "buildWithDebugInformation": false,
        "buildWithSource": false,
        "includePath": [
            "C:\\Program Files (x86)\\Common Files\\AMXShare\\AXIs",
            "C:\\Program Files\\AMX\\Resource Management Suite\\SDK\\NetLinx\\4.7.18\\includes"
        ],
        "modulePath": [
            "C:\\Program Files (x86)\\Common Files\\AMXShare\\Duet\\bundle",
            "C:\\Program Files\\AMX\\Resource Management Suite\\SDK\\NetLinx\\4.7.18",
            "C:\\Program Files\\AMX\\Resource Management Suite\\SDK\\NetLinx\\4.7.18\\monitors",
            "C:\\Program Files\\AMX\\Resource Management Suite\\SDK\\NetLinx\\4.7.18\\monitors-duet",
            "C:\\Program Files\\AMX\\Resource Management Suite\\SDK\\NetLinx\\4.7.18\\monitors-netlinx"
        ],
        "libraryPath": [
            "C:\\Program Files (x86)\\Common Files\\AMXShare\\SYCs"
        ],
        "all": false
    },
    "archive": {
        "outputFile": "archive.zip",
        "includeCompiledSourceFiles": true,
        "includeCompiledModuleFiles": true,
        "includeFilesNotInWorkspace": true,
        "extraFileSearchLocations": [
            "C:\\Program Files (x86)\\Common Files\\AMXShare",
            "C:\\Program Files\\AMX\\Resource Management Suite\\SDK\\NetLinx\\4.7.18"
        ],
        "extraFileArchiveLocation": ".genlinx",
        "all": false,
        "ignoredFiles": [
            "G4API.axi",
            "NetLinx.axi",
            "SNAPI.axi",
            "UnicodeLib.axi",
            "componentssdk.jar",
            "componentssdkrt.jar",
            "DeviceDriverEngine.jar",
            "devicesdkrt.jar",
            "jregex1.2_01-bundle.jar",
            "js-14-bundle.jar",
            "json-bundle.jar",
            "picocontainer-1.3-bundle.jar",
            "snapirouter.jar",
            "snapirouter2.jar"
        ]
    },
    "build": {
        "nlrc": {
            "path": "C:\\Program Files (x86)\\Common Files\\AMXShare\\COM\\NLRC.exe",
            "option": {
                "cfg": "-CFG",
                "includePath": "-I",
                "modulePath": "-M",
                "libraryPath": "-L"
            },
            "includePath": [
                "C:\\Program Files (x86)\\Common Files\\AMXShare\\AXIs",
                "C:\\Program Files\\AMX\\Resource Management Suite\\SDK\\NetLinx\\4.7.18\\includes"
            ],
            "modulePath": [
                "C:\\Program Files (x86)\\Common Files\\AMXShare\\Duet\\bundle",
                "C:\\Program Files\\AMX\\Resource Management Suite\\SDK\\NetLinx\\4.7.18",
                "C:\\Program Files\\AMX\\Resource Management Suite\\SDK\\NetLinx\\4.7.18\\monitors",
                "C:\\Program Files\\AMX\\Resource Management Suite\\SDK\\NetLinx\\4.7.18\\monitors-duet",
                "C:\\Program Files\\AMX\\Resource Management Suite\\SDK\\NetLinx\\4.7.18\\monitors-netlinx"
            ],
            "libraryPath": [
                "C:\\Program Files (x86)\\Common Files\\AMXShare\\SYCs"
            ]
        },
        "shell": {
            "path": "C:\\Windows\\System32\\cmd.exe"
        },
        "all": false,
        "createCfg": true
    }
}

Local

A local configuration file can be used to override parts of global configuration file. This file should be placed in the same directory as the apw file and should be named .genlinxrc.json. The local configuration file will override only the parts you define. You don't have to redefine the entire configuration.

Example

To override the global configuration and not include compiled source or module files in the archive for a particular project, create a .genlinxrc.json file in the same directory as the apw file and add the following:

{
    "archive": {
        "includeCompiledSourceFiles": false,
        "includeCompiledModuleFiles": false
    }
}

Command Line

Options passed by via the CLI have the highest precedence and will override any configuration file options. However, additional paths passed via the CLI will be appended to the configuration file paths.

Precedence

The precedence of the configuration options is as follows:

  1. Command Line
  2. Local Configuration File
  3. Global Configuration File

Team ⚽

This project is maintained by the following person(s) and a bunch of awesome contributors.


Damien Butt

Contributors ✨

[All Contributors]

Thanks go to these awesome people (emoji key):


Dependabot

🚧

Imgbot

🚧

This project follows the all-contributors specification. Contributions of any kind are welcome!

Check out the contributing guide for more information.

LICENSE βš–οΈ

MIT

Readme

Keywords

Package Sidebar

Install

npm i @norgate-av/genlinx

Weekly Downloads

28

Version

2.2.1

License

MIT

Unpacked Size

169 kB

Total Files

9

Last publish

Collaborators

  • damienbutt