mphowardlab / gsd-vmd

A VMD molfile plugin reader for HOOMD-blue GSD files.
BSD 3-Clause "New" or "Revised" License
14 stars 2 forks source link

Trying installation in windows! #13

Closed MasterChief1O7 closed 1 year ago

MasterChief1O7 commented 1 year ago

Hi,

I was trying to install this plugin on windows 10, using WSL2 but currently having problem in defining the path for the vmd executable.

So I was thinking that I can define the VMDDIR as environment variable as the path to the windows vmd installation and then try cmake .. but every time I do that it automatically takes the path to vmd that is installed in the WSL2 system.

Can you suggest if this approach will work or not, or if I'm not setting the variables right?

I have no prior experience with cmake or make so please consider that!

Thank you

mphoward commented 1 year ago

I don't test this plugin on Windows nor with WSL2, so I'm actually not sure if what you are trying to do is valid (why do you want to link against the Windows version of VMD rather than the Linux one you also installed?) or will run properly. However, supposing yes, I'm going to need some more information from you. Could you please share the commands you are actually running to do the build & install?

MasterChief1O7 commented 1 year ago

Hi, in WSL2 currently I'm not getting the GUI, for that I would need extra setup (like setting up display forwarding), which I tried but currently isn't working. So I thought, since WSL2 is able run windows application too so, at least for the software like vmd, it should be able to install the plugin, since it only need the proper directory to put the compiled files in. Therefore if I provide the windows installed path it can figure out the plugin directory and install the plugin there.

Here are the commands that I used from the start:

## first defining the variable for windows installed VMD path
VMDDIR="/mnt/c/Program\ Files/VMD"

## then from the build directoty
cmake ..

Now although I have defined the VMDDIR, it still picks up the Linux installed vmd like in the image below. grafik

Maybe I am not defining the other variables or this variable properly, if you can tell.

mphoward commented 1 year ago

Thanks for the information. Have you checked the contents of VMDDIR to make sure it contains a plugins directory? If not, CMake will try to find the Linux version of VMD on some default paths. If that weren't installed, you would probably just get an error that VMD could not be found.

In any case, I really doubt that what you are trying to do is going to work currently. You are essentially trying to cross-compile the plugin (i.e., build a Windows binary in a Linux environment). In order to do this, you would need to have an appropriate compiler installed in your Linux environment (like mingw), then configure CMake with a Windows cross-compilation toolchain. Is there a reason you can't try building in your Windows environment? That would probably be simpler.

Last, I do want to emphasize that I have never tested this plugin on Windows, and I have no idea if it will work even if you get it to build.

MasterChief1O7 commented 1 year ago

Ya there is plugins directory in VMDDIR.

Ok in that case I'll try to get the WSL2 working, thanks for the help and time!

mphoward commented 1 year ago

Closing because this is a specific use case for Windows. Feel free to reopen if someone wants to make sure this plugin has first-class Windows support.