09-11-2013 12:15 PM
Hi all,
I have a project which uses the Gnuwin32 package for GSL for my fitting program, now to use the EXE of my program on a different computer , I do require to install that Gnuwin32 package on the host machine with reference to bin folder in PATH of the enviroment variable. I am wondering if there can be automatic way to define these thing in the installer or application package of my project .
please let me know if there is way to do that.
Thanks
09-12-2013 12:48 PM
Hello,
If I understand you correctly, when you build your installer for your project, you want to be able to install the Gnuwin32 package along with the project? Do you have an executable that you used to install the whole Gnuwin32 package the first time? If you do it should be relatively easy to just add the Gnuwin32 package installer executable to your project in the Project Explorer. When you go to make the installer for your project and are prompted to edit the Build Properties go to the Source Files tab and add the executables from your project, both the Gnuwin32 package install and your project executable. Then you can go to the Advanced Tab in the Build Properties for the same installer and check “Run executable at end of installation” and direct that to the executable for the Gnuwin32 package installer you just added to the source files. It will then install your program and immediately afterwards install the package. Please let me know if this is what you were looking for.
09-12-2013 01:06 PM - edited 09-12-2013 01:07 PM
@PilotMatt27 wrote:
Hello,
If I understand you correctly, when you build your installer for your project, you want to be able to install the Gnuwin32 package along with the project? Do you have an executable that you used to install the whole Gnuwin32 package the first time? If you do it should be relatively easy to just add the Gnuwin32 package installer executable to your project in the Project Explorer. When you go to make the installer for your project and are prompted to edit the Build Properties go to the Source Files tab and add the executables from your project, both the Gnuwin32 package install and your project executable. Then you can go to the Advanced Tab in the Build Properties for the same installer and check “Run executable at end of installation” and direct that to the executable for the Gnuwin32 package installer you just added to the source files. It will then install your program and immediately afterwards install the package. Please let me know if this is what you were looking for.
Hi PilotMatt27,
Thanks for the response, I do have the whole package of Gnuwin32 , I will try your suggestion to include it in the installer. I also have another problem , the Gnu package contains the dll "libgsl.dll' which is required by my fitiing program dll which calls this one, I do not have the source code of the dll since I inherited the program from another person who left. the only way to get that program working is to give the reference of gnuwin32 bin folder in the PATH (environment variable).
If I dont set the enviroment variable my executable doest run
Attached is my vi let me know if there is any way to escape that stting up the enviroment variable.
Thanks
Ankitg
09-12-2013 01:17 PM - edited 09-12-2013 01:17 PM
AnkitG,
When you say it won’t run, you mean you have tried to make the executable on the one computer, which already has the Gnuwin32 package installed, and it won’t execute because it cannot find the libgsl.dll? I am also confused if you have the libgsl.dll or not.
09-12-2013 01:57 PM - edited 09-12-2013 01:59 PM
@PilotMatt27 wrote:
AnkitG,
When you say it won’t run, you mean you have tried to make the executable on the one computer, which already has the Gnuwin32 package installed, and it won’t execute because it cannot find the libgsl.dll? I am also confused if you have the libgsl.dll or not.
Yes I do have the dll,but I do need to setup the PATH (environment variable) of the bin folder of the gnuwin32 package which contains libgsl.dll,
I installed gnuwin32 and check the bin folder that if it contains libgsl.dll or not, to make my program work I do require to also setup that environment variable. Is there a way to excape that route.
here is the error i get
Thanks
09-13-2013 04:25 PM
AnkitG,
Maybe you can try adding the libgsl.dll to project and then place the libgsl.dll into the Always Include section under the Source Files tab in the Build Properties of the executable, and then rebuild the executable and the installer.
09-13-2013 08:26 PM
@PilotMatt27 wrote:
AnkitG,
Maybe you can try adding the libgsl.dll to project and then place the libgsl.dll into the Always Include section under the Source Files tab in the Build Properties of the executable, and then rebuild the executable and the installer.
Thank you PlioltMatt27, I will try that.
09-14-2013 03:41 AM - edited 09-14-2013 03:42 AM
You could also write a batch file and add this to your program installation. This could be either the launcher for your executable which will prepare the path variable and then start your real program or it could be a one time batch file that is executed by the LabVIEW installer at the end, which will first call the gnuwin32 installer and then update the system path variable in the registry accordingly.
Or you could try to find out what registry entry holds the system path variable and update that one directly from within the LabVIEW installer but I doubt that that would work since the application builder only allows to set registry variables, not to add information to existing variables.