LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Build.exe ActiveX Example...Selecting Active Project

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.

Christopher Povey

Principle Test Systems Engineer for BAE Systems.
0 Kudos
Message 1 of 5
(3,920 Views)
You mean, like "compile Project.prj" ?
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.
--
Guillaume Dargaud
http://www.gdargaud.net/



0 Kudos
Message 2 of 5
(3,905 Views)

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.

 

Christopher Povey

Principle Test Systems Engineer for BAE Systems.
0 Kudos
Message 3 of 5
(3,896 Views)

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,

Andrew McLennan
Applications Engineer
National Instruments
0 Kudos
Message 4 of 5
(3,809 Views)

I do have compile.exe in my CVI directory.  When I get five minutes I'll have a play with it.

 

Thanks.

Christopher Povey

Principle Test Systems Engineer for BAE Systems.
0 Kudos
Message 5 of 5
(3,802 Views)