LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Combining many small projects into one large project/executable - avoid VI conflicts

I have multiple small projects that have been done, and oru customer now wants them combined into a single executable, where you'd select which program you want to run and have it be launched. My initial thought was no big deal, create a new VI on which the user selects which program to run, and I just call that main.vi for whichever particular program they selected.

 

But wait, not so fast.

 

As soon as the particular smaller programs' main VIs are placed on a block diagram of a VI in this master project, all their dependencies are loaded into the project. Well, a lot of these smaller projects have typedefs with the same name, or even classes with the same name because they were all developed separately. It could be a mess and very time consuming to resolve all these conflicts right now.

 

I was thinking of doing something "plugin-like" where I include the smaller main VIs in the install, in some folder on disk, and they get called dynamically. Would this work? I have never tried it. Is there a better way?

 

There is also the idea of shipping multiple executables, and my "master program" calls a particular one using a command line prompt to run the exe. 

 

Thoughts and suggestions appreciated.

0 Kudos
Message 1 of 9
(4,927 Views)

@for(imstuck) wrote:

There is also the idea of shipping multiple executables, and my "master program" calls a particular one using a command line prompt to run the exe.


This sounds like the simplest solution in your situation. Other options would require managing the dependencies properly, which can be difficult, and seems unnecessary based on your description. It will probably also perform better.


___________________
Try to take over the world!
Message 2 of 9
(4,921 Views)

@tst wrote:

@for(imstuck) wrote:

There is also the idea of shipping multiple executables, and my "master program" calls a particular one using a command line prompt to run the exe.


This sounds like the simplest solution in your situation. Other options would require managing the dependencies properly, which can be difficult, and seems unnecessary based on your description. It will probably also perform better.


Yeah, this felt a little "ugly" but may be best in my case. I also didn't think about the fact that to include the VIs as plugins with my installer, it would require them being in the project, thus bringing me back to square one.

0 Kudos
Message 3 of 9
(4,917 Views)

Another option which should be simple in theory is setting up each project to build its VI as a packed library instead of an EXE. That way, all the VIs it calls should be fully namespaced and included and you can statically call the main VI in each packed library in your master project.

 

I have no practical experience with this, but it will mean that single EXE will now have to load copies of all the shared VIs.


___________________
Try to take over the world!
Message 4 of 9
(4,908 Views)

I agree with just calling the various executables.  I was going to say "just throw all of your stuff into a library" until I read that you used classes.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 9
(4,907 Views)

@tst wrote:

Another option which should be simple in theory is setting up each project to build its VI as a packed library instead of an EXE. That way, all the VIs it calls should be fully namespaced and included and you can statically call the main VI in each packed library in your master project.

 

I have no practical experience with this, but it will mean that single EXE will now have to load copies of all the shared VIs.


Hm, this may work. I think I will take the exe approach for now and can adjust as necessary. Either way it's no different for the programmer, they still have to do two builds if a VI changes (the small project, then the main one). The separate exe's also solve the issue of config files which may or may not have the same names I can't remember. This way they are all in their own data directories instead of one top level data directory which could cause issues post-install.

0 Kudos
Message 6 of 9
(4,903 Views)

You can go with packed libraries as suggested.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 7 of 9
(4,901 Views)

for(imstuck) wrote:Either way it's no different for the programmer, they still have to do two builds if a VI changes (the small project, then the main one).

If you are just calling the executables, why would the main application need rebuilt?  The main should only need rebuilt if another application is added to the list.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 8 of 9
(4,896 Views)

Sorry, installer rebuilt. This way it would include the updated executable to be put on disk when the installer is run.

 

I'm in a generous mood, the kudos are flying haha.

0 Kudos
Message 9 of 9
(4,894 Views)