Skip to content

Conversation

@jraphanel
Copy link
Contributor

…ndows platform

update moduleinit.cmd file to specific environment variables according to the script directory and the file existence for:

  • MODULESHOME if not defined yet and if ..\libexec\modulecmd.tcl exists
  • add ..\bin directory to PATH if module.cmd is not available from PATH and available from ..\bin
  • add ..\bin directory to PATH if tclsh.exe is not available from PATH and available from ..\bin

Closes #272

@codecov
Copy link

codecov bot commented May 8, 2019

Codecov Report

Merging #273 into master will decrease coverage by 0.68%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #273      +/-   ##
==========================================
- Coverage   99.35%   98.66%   -0.69%     
==========================================
  Files           2        2              
  Lines        2932     2471     -461     
==========================================
- Hits         2913     2438     -475     
- Misses         19       33      +14
Impacted Files Coverage Δ
lib/envmodules.c 73.94% <0%> (-26.06%) ⬇️
modulecmd.tcl.in 99.91% <0%> (+0.58%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2f213cd...17f1f50. Read the comment docs.

Copy link
Collaborator

@xdelaruelle xdelaruelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good idea. I would suggest to also define the MODULES_CMD variable and make it contains the fully qualified path of modulecmd.tcl, then update the module.cmd to rely on this variable to call the modulecmd.tcl script.

@jraphanel jraphanel force-pushed the feat-windows-portable-installation branch from ac5cec7 to d34240c Compare May 21, 2019 00:05
xdelaruelle and others added 15 commits January 12, 2020 10:00
Make mb, mlprof, mtreview and playdemo use `/usr/bin/env tclsh` shebang
rather applying there TCLSH location defined by `./configure` process.
Update moduleinit.cmd file to set Modules-specific environment variables
according to the script directory and the file existence for:

* MODULESHOME if not defined yet and if `..\libexec\modulecmd.tcl` exists
* add `..\bin` directory to PATH if `module.cmd` is not available from
  PATH and available from `..\bin`
* add `..\bin` directory to PATH if `tclsh.exe` is not available from
  PATH and available from `..\bin`

Automatically call `moduleinit.cmd` from `module.cmd` if modules is not
initialized yet (based on environment variables)

Fixes envmodules#272
Provide new `--enable-windows-support` option for configure to
automatically install windows batch file to bin directory during install
step. This new option is not enabled by default.
Always define Modules-specific environment variables when running `cmd`
initialization file.
Execute initialization script if MODULES_CMD environment variable is not
found defined.
@xdelaruelle xdelaruelle force-pushed the feat-windows-portable-installation branch from 5b85789 to 17f1f50 Compare January 13, 2020 21:06
@xdelaruelle xdelaruelle merged commit a9d6eb9 into envmodules:master Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide a portable version of modules for Windows platform

2 participants