<type>documentation</type>
<domain>intro</domain>
<id>installing-your-license</id>
<title>Installing Your License</title>
<date>$Date$</date>
<version>$Revision$</version>
<product>pro+</product>

Wing Pro requires a license in order to run, either a trial license obtained from Wing at
startup, or a purchased license. If Wing is running without any license at all it displays
the following dialog at startup:

.. image:: license-choose.png

From here, you can choose either to start a trial, visit the Wingware store to
purchase a license, activate a purchased license, or start a 10-minute emergency
session running without any license. 

**Starting a Trial**

To start a full-featured time-limited trial, select the first option in the dialog above
and then press ``Continue``. You will be offered the option to connect directly to
wingware.com to complete the activation of the trial, or to activate manually, as described
below.

Trials are valid for 10 days, with an option to extend twice for up to 30 days total (or
more on request by sending the trial license id to `sales@wingware.com
<mailto:sales@wingware.com>`__).

While Wing is running on a trial license, a reminder dialog is shown at startup, with
the option to obtain or activate a purchased license.

If you run into problems or need additional evaluation time, please email your 
trial license id to `sales@wingware.com <mailto:sales@wingware.com>`__.

**Activating a Purchased License**

Purchased licenses may either be non-expiring ``Perpetual`` licenses for a particular
major version of Wing or expiring ``Annual`` licenses. See `License Terms
<https://wingware.com/wingide/license>`__ for details on the available license types.

All licenses must be activated on each machine where they are used by entering the license
into the license dialog at startup. If Wing Pro already has a valid trial license, a
different dialog is shown initially, with a button for activating a permanent license. Or,
if Wing has already been started and is running on a trial license, ``Enter License`` in
the ``Help`` menu can be used to enter the permanent license.

In all of these cases, the purchased license id from your license delivery email must
be pasted or typed into the activation dialog. Then press ``Continue`` to select how to
activate the license.

The most convenient way to activate a license is to ask Wing Pro to connect directly to
``wingware.com`` (which it does via https, TCP/IP port 443):

.. image:: obtain-trial.png

If you're unable to connect directly, you can go to `https://wingware.com/activate
<https://wingware.com/activate>`__ in your browser or on another device to enter the
license id and activation request code obtained from the license dialog (the second option
in the above screenshot). You will be given an activation key which you can then enter
into Wing's dialog box to complete the activation. This is exactly the same exchange of
information that occurs when Wing Pro connects directly to ``wingware.com`` to obtain a
trial license.

If activation fails, Wing will provide a way to configure an HTTP proxy.
Wing tries to detect and use proxies by default but in some cases they
will need to be manually configured.  Please ask your network
administrator if you do not know what proxy settings to use.  See also
`how to determine proxy settings <http://superuser.com/questions/346372/how-do-i-know-what-proxy-server-im-using>`__.

**Obtaining Additional Activations**

If you run out of activations, you can use the `self-serve license manager
<https://wingware.com/license>`__ or email us at `sales@wingware.com
<mailto:sales@wingware.com>`__ to obtain additional activations on any valid license.

**Transferring a License**

Wing Pro Commercial Use licenses may be transferred from one individual to another, as
needed from time to time as employees come and go or change roles. To do this the current
user must stop using Wing before the new user starts using the license. The license
activation may be removed from the current user's machine as described in the next
section.

**Deactivating a License**

If you wish to deactivate and remove your license id from a machine,
click ``License`` in Wing's `About <script:about-application>`__ dialog
box and then ``Deactivate``. This will remove the license activation and quit
Wing.

Note that this just removes your license id from the machine. If you are
out of activations you will still need to follow the instructions in
``Obtaining Additional Activations`` above.

**Activating on Shared Drives**

If Wing's `Settings Directory <ref:install/user-settings-dir>`__ (where the license
activation is stored) is accessed from several different computers, the license must be
reactivated once on each computer. The resulting extra activations will be stored in the
settings directory as ``license.act1``, ``license.act2``, and so forth, and Wing will
automatically select the appropriate activation depending on where it is running.

A Vendor File (described below) can be used to automate activation on
each additional computer.

**Computer Labs**

Computer labs consisting of identical hosts mirrored from a master may accept a single
activation of a license for all the hosts.  This may be used for site licenses and
free permanent educational use licenses as follows:

1) Activate the license on the master host
2) Move the ``license.act`` file from the `Settings Directory <ref:install/user-settings-dir>`__
   to the Wing installation directory (on macOS, place it into ``Content/Resources``
   within the application bundle)
3) Mirror the activation to all the clones

Note that Wing's acceptance of a shared activation in this configuration *in no way*
relieves you of the responsibility to pay for one license per user.

**Vendor Files**

To make it easier to reactivate in a case where Wing is on a shared drive, and for
computer labs where the above method does not work, you can store your license code in the
file ``resources/vendor`` in your Wing installation, in the following form::

  license="XXXXX-XXXXX-XXXXX-XXXXX"
  
This file should be named ``vendor`` (without any extension) and go into the 
existing ``resources`` directory in the top level of your
Wing installation (or on macOS, within ``Content/Resources/resources`` inside the
application bundle). You will need to create the file if it does not exist. 

Once this is done Wing will read this file at startup and try to automatically activate
the license, prompting you only if the activation fails. If many activations are expected,
you will need to contact `sales@wingware.com <mailto:sales@wingware.com>`__ to obtain
additional activations for your license.

**Country or Region of Use**

Most Wing Pro licenses are Worldwide licenses that may be used in any country or region.
Some discounted licenses may be designated as geographically restricted licenses, for
use in a specific country or region.  These licenses are invalid and may fail to
activate elsewhere.

