Fw Setup

This command is a catch all command, which is used to install, update, or rollback the FW API that is downloaded for your system. This is most often used as part of the context of a FW Setup, which is described in a more descriptive guide, here. Rather than thinking this as a command which "sets up" FW, which it does, it is helpful to think of this command as anything referring to THE FW system (or fw setup). That is why you have commands like fw setup --update or fw setup --rollback because it is updating or rolling back THE FW Setup/API on your system. This will help you remember the commands better than if you think of fw setup as merely "the command to initially set up the FW System".

Directory to Run

This command is designed to be run at the root of a valid FW Installation (ie fw-dev or fw-apps), and will give you an error saying so if attempting to run this command (other than just fw setup to install the first time) outside that context. However, technically, any folder can be turned into the root of a valid FW Installation, when running this for the first time.

Arguments

There is one optional argument:

  • version is the FW API version that you wish to install or update/rollback to if using those flags in addition to this argument.

Extra Options

This command actually has quite a few additional options, besides those listed in the base options above. They should probably be categorized appropriately, there are the initial installation options, which are:

  • -d | --directory is an option, which requires a value. It is used to specify an installation directory for the first time you are running the fw setup command. If this option is not set, it will setup the FW API at the current directory. Most often this option will not be set, but if it is, it would look like: fw setup --directory=C:\Users\[user]\webroot\fw-dev\.
  • -w | --webroot is another option, which requires a value. It sets the default webroot for this environment. It is not used very often either, but when it is, it must be used similarly to the above function.
  • -p | --production is a flag option, which will set the FW API into production mode.

The rest of the options are used to do more than just install. These also contain the ones that will be most used with fw setup as well:

  • -u | --update is a flag option which will update the API to the most recently released version (or the version specified). This option is probably the most used option with this command, and fw setup --update should be run every time a developer releases an update to
  • -r | --rollback is a flag option that will roll back the installer to the immediately preceding version of the FW API (or the version specified). Thus, it is important to note that this option works like the rollback of fw update, not fw self-update.
  • -f | --force is a flag option which if it is included will ignore if the FW API is on the most recent version and install the most recent version.
  • -m | --migrate is a flag option which allows you to migrate your FW API from a pre-1.0 setup to 1.0 or higher. This is not likely to be used ever because it was important when our FW System was new and had a huge change made. But if you find yourself on an FW API of pre 1.0, you will need to use it to update further.

Usage

Thus, putting everything together, the structure of fw setup is as follows:

Initial setup:

C:\Users\[user]\webroot\fw-dev> fw setup [version] [--directory=DIRECTORY --webroot=WEBROOT --production]

With existing FW API:

C:\Users\[user]\webroot\fw-dev> fw setup [version] [--update --rollback --force --migrate]