ni / grpc-labview

gRPC client and server support for LabVIEW
MIT License
89 stars 61 forks source link

Windows DLL Path #344

Open EricksonTim opened 9 months ago

EricksonTim commented 9 months ago

When a LabVIEW Client is built into an exe, the path to the DLL resolves to "\Libraries\Win32"

However, using a typical build specification, the DLL is not copied to this folder because of the way the path is dynamically determined in "Get Server DLL Path.vi"

What is the recommended way to include the DLL in the build process?

AB#2636750

bbanacki commented 9 months ago

I have encountered this issue as well, if a build is created and deployed on a machine without LabVIEW and the GRPC package installed the "\Libraries\Win32\labview_grpc_server .dll" file will not exist. Temporarily I've modified the "Get Server DLL Path.vi" and placed the file in the data folder. It may not be the best approach but it worked until it's officially supported. image

dreamflow commented 6 months ago

@EricksonTim :

i've automatised it like this :

.lvproject file -> project explorer -> build specifications -> pre/post build actions -> [X] execute vi after build within this sepcial execute-after-build.vi , is available the build_dirPath (= where the compiled exe lands) .

the compiled exe expects relative to itself in the folder "Libraries\Win64\" : the "labview_grpc_server.dll" together with the "feature_config.ini" .

therefore the folder "Win64\" (or "Win32\") sitting in "\gRPC\LabVIEW gRPC Library\Libraries\" needs to be copied into the folder "\Libraries\" .

the VI Library Function delivers the vilib_dirPath .