1.. _INSTALL-win: 2 3Installing Modules on Windows 4============================= 5 6This document is an overview of building and installing Modules on a Windows 7platform. 8 9 10Requirements 11------------ 12 13Modules consists of one Tcl script so to run it from a user shell the only 14requirement is to have a working version of ``tclsh`` (version 8.4 or later) 15available on your system. ``tclsh`` is a part of `Tcl`_. 16 17.. _Tcl: http://www.tcl.tk/software/tcltk/ 18 19A specific distribution zipball is provided to install Modules on a Windows 20platform. Content of this distribution zipball is ready for use and does not 21require a specific build step. All scripts and documentation found in this 22zipball are pre-built so there is no specific tools are required to install 23Modules from the Windows-specific distribution zipball. 24 25 26Installation instructions 27------------------------- 28 291. Install a Tcl binary distribution for Windows like `ActiveTcl`_ or 30 `Magicsplat Tcl/Tk for Windows`_. Follow instructions provided with the 31 chosen distribution to install it. 32 33.. _ActiveTcl: https://www.activestate.com/products/tcl/ 34.. _Magicsplat Tcl/Tk for Windows: https://www.magicsplat.com/tcl-installer/ 35 362. Once installed, verify that the ``tclsh`` command is correctly found in 37 defined ``PATH`` by typing the following command from a Windows ``cmd`` 38 shell (``windows`` string should be obtained as result):: 39 40 > echo puts $tcl_platform(platform) | tclsh 41 windows 42 433. Download Modules specific distribution zipball for Windows from 44 `SourceForge`_ or `GitHub`_. Such distribution archives are available 45 for Modules release starting version ``4.5.0`` and can be distinguished 46 from the source tarball by the ``-win`` suffix in their name. 47 48.. _SourceForge: https://sourceforge.net/projects/modules/files/Modules/ 49.. _GitHub: https://github.com/cea-hpc/modules/releases 50 514. Unpack downloaded zip file then enter deflated directory and execute the 52 ``INSTALL.bat`` script file found in it. This script installs files by 53 default in ``C:\Program Files\Environment Modules\`` directory and adds the 54 ``bin`` directory in this installation location to the system-wide ``PATH`` 55 environment variable. 56 57.. note:: ``INSTALL.bat`` script may require to be run with administrator 58 rights to perform installation correctly. 59 605. Once installed, verify that the ``module`` command is correctly found in 61 defined ``PATH`` by typing the following command from a Windows ``cmd`` 62 shell:: 63 64 > module -V 65 Modules Release 4.4.1 (2020-01-03) 66 67Installation location can be adapted by running the ``INSTALL.bat`` script 68from a ``cmd`` console shell and passing desired installation target as 69argument. For instance to install Modules in ``C:\EnvironmentModules`` 70directory:: 71 72 > INSTALL.bat C:\EnvironmentModules 73 74Modules installation is now operational and you can setup your modulefiles. By 75default, the ``modulefiles`` directory in installation directory is defined as 76a modulepath and contains few modulefile examples:: 77 78 > module avail 79 ------- C:/Program Files/Environment Modules/modulefiles -------- 80 module-git module-info null 81 82Documentation of the :ref:`module(1)` and :ref:`ml(1)` commands and 83:ref:`modulefile(4)` syntax can be found in the ``doc`` directory in 84installation directory. 85