#######################
Set Up Your Environment
#######################

.. sidebar:: Contents

    .. contents::
        :local:

This documentation provides step-by-step instructions for setting up your environment for developing with HOOPS Exchange using C.

The process includes installing a **development environment**, downloading and extracting the **library package**, obtaining and configuring **the license**, and **testing** the installation using sample codes.

Installing Your Development Environment
=======================================

.. tabs::

   .. group-tab:: Windows

      Developing applications with HOOPS Exchange for Windows is typically done using the Visual Studio Integrated Development Environment (IDE).
      
      To get started, visit the `Microsoft Visual Studio download page <https://visualstudio.microsoft.com/downloads/>`__ and choose the edition of Visual Studio that suits your needs.
      During the installation process, make sure to select at least the **Desktop development with C++** component set.
      
      .. image:: setup-env-vs-components.png
         :align: center
      
      Additionally, verify that your installed compiler adheres to the :doc:`HOOPS Exchange platform requirements </start/supported-platforms>`.
      
      After completing the installation, restart your computer to ensure that all changes take effect.
      
   .. group-tab:: Linux

         **Configure Linux:**
      
         * Go to the :doc:`required components </start/supported-platforms>` page.
         * Make sure that your *Minimum Supported OS* and *Compiler* are compatible with HOOPS Exchange.

   .. group-tab:: macOS

         **Configure macOS:**

         * Go to the :doc:`required components </start/supported-platforms>` page.
         * Make sure that your *Minimum Supported OS* and *Compiler* are compatible with HOOPS Exchange.
      
   .. group-tab:: iOS

         **Configure iOS:**
         
         * Go to the :doc:`required components </start/supported-platforms>` page.
         * Make sure that your *Minimum Supported OS* and *Compiler* are compatible with HOOPS Exchange.

   .. group-tab:: Android

         **Configure Android:**
         
         * Go to the :doc:`required components </start/supported-platforms>` page.
         * Make sure that your *Minimum Supported OS* and *Compiler* are compatible with HOOPS Exchange.

.. _tuto_init_license:

Installing HOOPS Exchange
=========================

.. tabs::

   .. group-tab:: New Evaluator

      #. **Getting HOOPS Exchange:**
      
         This is your first visit to our website, and neither you nor your company has ever used or licensed our products before:
         
            * Go to our `User Dashboard <https://manage.techsoft3d.com>`__ page and click the **Sign Up** link.
               
               .. image:: /_assets/images/user-dashboard.png
                  :width: 50%
                  :align: center
            
            * Create your self-evaluation account. You will be emailed a link to verify your account details.
            
            * Once you've verified your account, click on **Product Downloads** and then **Download HOOPS Exchange** to be taken to the Developer Zone.
            
               .. image:: /_assets/images/download-links.png
                  :width: 50%
                  :align: center
               
            * Lastly, click the **Download** button for your chosen operating system.
               
               .. image:: /_assets/images/download-exchange.png
                  :width: 50%
                  :align: center
                     
         If you are on a Windows or Linux platform, you may download the Installer or the ZIP file.
         macOS users must use the ZIP file.
         To download the iOS or Android package, please :doc:`Contact Us </contact_us>`.

            .. image:: /_assets/images/download-installers-zip.png
               :width: 50%
               :align: center
            
         Read the :ref:`package_hierarchy` page for more information about the download package content.

            * Installer: Run the installer and follow the instructions to install the package on your local machine.
            * ZIP file: Locate the downloaded package file, which is a zip archive.
           
         You can use either a built-in extractor or third-party software to extract the contents to your chosen destination folder.
         
      #. **Obtaining, Setting Up and Checking the License:**
         
         Before you can use this product, you must have a valid HOOPS Exchange license:
         
            * If you are using the Installer, you'll be required to input the license key to complete installation of the SDK. 
            * The generated key is permanent and accessible from the `Developer Zone <https://developer.techsoft3d.com/start>`__ at any time during your evaluation.

               .. image:: /_assets/images/HE-License-Key.png
                  :width: 50%
                  :align: center

         If you are using the ZIP file, you will need to copy and paste your new license key into the license file available in your installation folder:
   
            * Locate the folder where you have previously extracted HOOPS Exchange on your system.
            * Navigate to the ``../include/`` directory.
            * Edit the file ``hoops_license.h`` and enter your new license key.
   
               .. image:: /_assets/images/Enter-the-Key.png
                  :width: 50%
                  :align: center
               
         From the `Developer Zone <https://developer.techsoft3d.com/start>`__, clicking **Active Evaluations** at the top right of the page and then **License Key** will give you access to your license status.

            .. image:: /_assets/images/dz-main-screen.png
               :width: 50%
               :align: center
         
         HOOPS Exchange only requires a new license key if you are currently using a key which was generated for a prior *major version*.
         For example, developers upgrading from HE 2024.0.0 to HE 2024.1.0 may use the same key, but those upgrading from 2023.0.0 to 2024.0.0 need to generate a new key.

         The expiration date for the generated license key is tied to your contract with Tech Soft 3D. If you have signed a license agreement for HOOPS Exchange,
         then the license key that is generated will be a perpetual (non-expiring) license key.
         If you are evaluating HOOPS Exchange, then the license key will expire when your evaluation expires.
         **Evaluation license keys will expire at the end of the evaluation period and are not suitable for production software. Any software that uses an evaluation license key will no longer work after the evaluation period.**

         HOOPS Exchange releases are not binary compatible with older releases.
         **You must recompile your application when updating to a new version of HOOPS Exchange.**
         Please see :doc:`/distributing` section for an up-to-date list of binaries required for distribution.
            

   .. group-tab:: Existing Partner

      #. **Getting HOOPS Exchange:**
            
         Your company is already evaluating or licensing one of our products, go to the `Developer Zone <https://developer.techsoft3d.com/start>`__.

         At the top right of the page, click on the **Sign In** button:
                 
            * If you have an existing account, simply enter your credentials.
            * If your company is already licensing our technology, please :doc:`contact us <contact_us>`. 
            * After our team has attached your contact to your company records, you will receive a personal invitation to log in.

               .. image:: /_assets/images/dz-licensed-products.png
                  :width: 50%
                  :align: center
            
         From here, you can download:
         
            * Your license file (perpetual and evaluation license key).
            * ZIP files of current and previous versions for Windows, Linux, macOS, iOS, Android platforms.
            * All of our other HOOPS, Ceetron, Partners, and OEM CAD technologies and viewers.
      
         Read the :ref:`package_hierarchy` page for more information about the download package content.

            * ZIP file: Locate the downloaded package file, which is a zip archive.
           
         You can use either a built-in extractor or third-party software to extract the contents to your chosen destination folder.
            
      #. **Obtaining, Setting Up and Checking the License:**          

         Existing partners can download ZIP Files and License File from the Developer Zone:
   
            * Visit the `Developer Zone <https://developer.techsoft3d.com//>`__ and click the **View License Keys** button.

               .. image:: /_assets/images/dz-licensed-products.png
                  :width: 50%
                  :align: center

            * Click the **C Header** button in the *Header Files* section.

               .. image:: /_assets/images/dz-license-keys.png
                  :width: 50%
                  :align: center

         This will generate a file named ``hoops_license.h`` for you. Once done, simply:
   
            * Locate the folder where you have previously extracted HOOPS Exchange on your system.
            * Navigate to the ``../include/`` directory.
            * Copy the downloaded ``hoops_license.h`` and replace the default one in the ``../include/`` directory.

               .. image:: /_assets/images/Enter-the-Key.png
                  :width: 50%
                  :align: center            
               
         HOOPS Exchange only requires a new license key if you are currently using a key which was generated for a prior *major version*.
         For example, developers upgrading from HE 2024.0.0 to HE 2024.1.0 may use the same key, but those upgrading from 2023.0.0 to 2024.0.0 need to generate a new key.

         The expiration date for the generated license key is tied to your contract with Tech Soft 3D. If you have signed a license agreement for HOOPS Exchange,
         then the license key that is generated will be a perpetual (non-expiring) license key.
         If you are evaluating HOOPS Exchange, then the license key will expire when your evaluation expires.
         **Evaluation license keys will expire at the end of the evaluation period and are not suitable for production software. Any software that uses an evaluation license key will no longer work after the evaluation period.**

         HOOPS Exchange releases are not binary compatible with older releases.
         **You must recompile your application when updating to a new version of HOOPS Exchange.**
         Please see :doc:`/distributing` section for an up-to-date list of binaries required for distribution.
         

.. _environment_testing:

Testing the Installation
========================

Now that you've completed the setup and successfully configured a valid HOOPS Exchange license, it's time to test the installation using sample codes provided with HOOPS Exchange.

Locate the folder where you have previously extracted HOOPS Exchange on your system and navigate to the ``../samples/`` directory:

.. include:: /examples/build.rst
   :start-after: .. _samples_build:

Conclusion
==========

You have successfully set up your environment for HOOPS Exchange, including Visual Studio installation, package download and extraction, license configuration, and testing using sample codes.

You are now ready to start working with HOOPS Exchange.
If you encounter any issues or have questions, please refer to our `support resources <https://developer.techsoft3d.com/developer-support/>`__ or `forum <https://forum.techsoft3d.com/>`__.

You are now ready for our next tutorial: :doc:`/tutorials/c/file-to-file-translation`.

