Skip to content

Conversation

@HiteshDhola
Copy link
Contributor

minor formating

minor formatting. And adding way to always start msys2 shell with -use-full-path argument.
* Static builds (For more Details see `Product Static Build <https://docs.epics-controls.org/en/latest/appdevguide/EPICSBuildFacility.html#product-static-builds>`_.)

1. Add the EPICS Base binary directory for your target to be able to call the EPICS command line tools without specifying their fully qualified path.
1. Add the EPICS Base binary directory ("\\base-x.x.x\\bin") for your target to be able to call the EPICS command line tools without specifying their fully qualified path.
Copy link
Contributor

Choose a reason for hiding this comment

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

The binary directory should be ...\base-x.x.x\bin\<target-arch>, shouldn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. I will update.

1. Select ``Advance`` tab, navigate to ``Environment Variables`` button. That should open editable tables of settings for Windows Environment.
2. Select ``User Variable for 'user'`` option, press NEW
3. Add EPICS BASE path here. In ``Variable Name``, put "EPICS_BASE". For ``Variable Value``, enter the location of your EPICS Base installation, e.g., "C:\\msys64\\home\\'user'\\base-R7.0.4.1"
3. Add EPICS BASE path here. In ``Variable Name``, put "EPICS_BASE". For ``Variable Value``, enter the location of your EPICS Base installation, e.g., "c:\\msys64\\home\\ 'user'\\base-R7.0.4.1"
Copy link
Contributor

Choose a reason for hiding this comment

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

I know that the drive letter is accepted in lower case, but the "official" notation (as used in system environment variables etc.) is upper case.

A space character in the path before the user name seems wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok. It shall remain Capital.

Problem with this path is that when published on 'readthedocs' '' between "home' and 'user' is not visible. It shows ok in github preview though. Only if I put a space path is shown correct. But then as you said it shows space in the path. Can you try something to make it look correct ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, ok.
I will check how this could be done.

4. Set the host architecture. In ``Variable Name``, put "EPICS_HOST_ARCH". For ``Variable Value``, put "windows-x64-mingw" or "windows-x64" (depending on your selection of compilers).
5. Navigate to the variable called ``Path``. Press Edit.
6. If you are using the MinGW compilers and dynamic (DLL) linking, add the path for the MinGW64 DLLs. Press NEW and enter "C:\\msys64\\mingw64\\bin". Press ok.
6. If you are using the MinGW compilers and dynamic (DLL) linking, add the path for the MinGW64 DLLs. Press NEW and enter "c:\\msys64\\mingw64\\bin". Press ok.
Copy link
Contributor

Choose a reason for hiding this comment

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

Drive letter case - see above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK

8. Restart the Machine and check if EPICS commands like ``caget`` and ``camonitor`` are being recognised as valid commands in any location and work.

Note that by default the MSYS2 shell does not inherit the parent environment. To change that behavior, you need to start the shell with the argument ``-use-full-path``.
Note that by default the MSYS2 shell does not inherit the parent environment. To change that behavior, you need to start the shell with the argument ``-use-full-path``. To always start with the argument, replace ``Rem set MSYS2_PATH_TYPE=inherit`` with ``set MSYS2_PATH_TYPE=inherit`` in "c:\\msys64\\msys2_shell.cmd".
Copy link
Contributor

Choose a reason for hiding this comment

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

What about...

To make the MSYS2 shell always inherit the parent environment, uncomment the line rem set MSYS2_PATH_TYPE=inherit in "C:\msys64\msys2_shell.cmd".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks good. I will update

@stephane-cea
Copy link
Collaborator

Hi,
As of #21, I suggest migrating this PR to https://github.com/epics-docs/epics-docs (where the how-tos pages have now been merged) and to close this PR afterward.

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.

3 participants