03-24-2009 10:54 AM
On my last project we used the Build.Exe program in a batch file to build all the static libraries for the software (in the correct order) and then the main executable.
I wanted to do something similar for my new project, but some of their CVI project files contain multiple project entries. To do it manually I would open the PRJ file and right click on each one to make it active then build it.
What I want to do is modify BUILD.EXE so I can create a batch file as follows:
build "d:\Projects\MyProject.prj" -ActiveProject "MyFirstProject" -useExisting -log "MyProject_MyFirstProject_build_log.txt"
build "d:\Projects\MyProject.prj" -ActiveProject "MySecondProject" -useExisting -log "MyProject_MySecondProject_build_log.txt"
I do not know what CVI function to call though, or even if this is possible?
Thanks.
03-25-2009 08:10 AM
03-25-2009 10:18 AM
You mean, like "compile Project.prj" ?
I am using CVI 8.0.0. That project does not exist on my installation. So cannot check...
You can make a cygwin bash script to extract the prj files from the cws file
for instance an execute compile on them.:
grep "Project 00.*\.prj" *.cws | sed -e "s/.* \"/\"/" | xargs -l compile
or something similar.
Problem is I do not have Grep on my Windows XP PC. As it is a work PC I am not allowed to install it.
04-14-2009 04:37 AM
Hi Christopher,
Thank you for contacting National Instruments. I have been doing some investigation into this problem and I have a couple of suggestions.
I am currently using CVI 8.5. but I think the operation should be very similar. Can you verify that you can see an Exe file called "Compile.exe" in the root directory of your CVI installation. You should be able to use this to compile your projects. You could then copy all of the commands that you are using into a text editor to create a Batch file which will compile everything at once.
I've attached the syntax of this command. I will also be installing CVI 8.0.0 to try and emulate your setup.
C:\Program Files\National Instruments\CVI85>compile
Library 'Traditional NI-DAQ Library' not loaded.
Library 'NI-IMAQ I/O' not loaded.
LabWindows/CVI Command Line Compiler
Command line arguments are:
<filename>
-debug
-rebuild
-log LOGFILE
-logappend LOGFILE
-fileVersion w,x,y,z
-productVersion w,x,y,z
-fileVersionString FILEVERSIONTEXT
-productVersionString PRODUCTVERSIONTEXT
-DDEFINE
C:\Program Files\National Instruments\CVI85>
Please let me know how you get on.
Many thanks,
04-14-2009 06:32 AM
I do have compile.exe in my CVI directory. When I get five minutes I'll have a play with it.
Thanks.