QMAPP-mq / qudi

A modular laboratory experiment management suite.
GNU General Public License v3.0
4 stars 0 forks source link

consider setting .dll filenames in the config file #15

Closed mvbnano closed 6 years ago

mvbnano commented 6 years ago

What is affected by this bug?

Some of our equipment can be used on 32 bit machines or on 64 bit machines. Does it make sense to set .dll filenames in the config file so that the .dll loaded is not 'hard coded' into the hardware module?

Where on the platform does it happen?

Hardware modules that have both 32 bit and 64bit .dll files:

mvbnano commented 6 years ago

@latchr what do you think about this?

latchr commented 6 years ago

In one of the Qudi hardware modules (it might be APTmotor) there is a bit of code that checks whether the environment is 32 bit or 64 bit. This handles it automatically.

But there's still a problem. Because the DLL files are usually not redistributable they are in the third party directory and not part of the Qudi repository. A user who gets qudi running would have to find the right DLL somewhere and make a copy into the third party directory in the right subfolder and with the right file name. This is opaque because the relevant info is in the code but not clearly documented.

I agree that it would be better to have the DLL path in the configuration file. This would make it more transparent to the user, and would let us point to the "normal install location" of the DLL. This helps other users know where to look (if we happened to share a config file with someone).

On Wed, Jan 10, 2018, 9:27 AM mvbnano notifications@github.com wrote:

@latchr https://github.com/latchr what do you think about this?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/QMAPP-mq/qudi/issues/15#issuecomment-356434889, or mute the thread https://github.com/notifications/unsubscribe-auth/ARUzY7bkg8duwvHtZC5JQLvelK7wonNiks5tI-fJgaJpZM4RYiNh .

mvbnano commented 6 years ago

Given that we think that this is a good idea, do you think that we should then;

  1. Specify the .dll filename, and not change where qudi looks for .dll files (inside local/thirdparty),
  2. Check the system environment (32 bit or 64 bit), then load the relevant .dll from local/thirdparty,
  3. Either 1 or 2, AND set a default path to local/thirdparty but make this configurable for each .dll.
mvbnano commented 6 years ago

This is each to change on our development branches, but would this "style guide" be a breaking change on the master branch?

mvbnano commented 6 years ago

As per the Thorlabs APT motor hardware module, on activate I now check for 32bit or 64bit architecture and choose the appropriate dll.