Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Issues creating executable

Ok, so I wrote an executable today to test my application progress. I have everything working in the development environment to a level that I can get my processes launched and shut down cleanly. I tried wrapping in an exe to test before I proceed. I am getting an error 7 when I try to run the launcher in the exeutable, saying that it cannot find the parent class actor that I am attempting to launch. In the application builder I have the launcher class as the top level VI, and I include all of the libraries and folders into the same directory as the application.exe. Not sure what I am doing wrong.

If I run in debugging mode and probe, it goes to the /My Application/Source/Controller folder but it cant find the Controller.lvclass in the Launch Parent Actor VI. The Application Settings vi's that I feed into the Parent Class set the directories and paths to all of the application folders for the Controller, Processes, Modules, and future Plugins. I use the application directory primitive to create the folder for the application, then build a path to the controller, with the application paths controller directory vi.

Maybe it's something simple I am overlooking? I will probably hit my head against the wall if it is...doh!

0 Kudos
Message 1 of 8
(6,357 Views)

Hi,

In the compiled version, is Controller.lvclass in Controller folder? It seems to me that you have compiled all classes and possible plugins into one exe. If you want to load it dynamically, it needs to be separate.

In other words, I would do the following: keep your framework code as it is, but instead of trying to load Controller.lvclass when testing (which is the parent class) try to load one of the children of controller, e.g. TestController.lvclass, which is not compiled and is in the controller folder of the exe. So if your Launcher is compiled into <exe folder>, your uncompiled TestController.lvclass should be saved manually to <exe folder>/<Controller>/TestController.lvclass.

Your main exe would include all the parent classes of your plugins (Controller, Process, Module, Plugin). The classes actually loaded at runtime would inherit from these classes and NOT be compiled in the exe.

I hope that makes things clearer.

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 2 of 8
(4,356 Views)

Danielle,

Thank you for the reply. I am still a bit confused. I am still pretty new to creating applications where Object Oriented and Plugin type architectures are used. Most of my work with the application builder has involved static VIs and a standard hierarchy.

I fully understand how the OOP and plugin type architectures work in the development environment and how to set the paths, but am a bit confused on how the app builder incorporates these items? If I have a folder hierarchy in my project and build it, will the app builder duplicate and create those folders in the executable, or is everything compiled down to a flat file location? I know on the destinations page of the app builder you can create folders and pointers there. Is that what I need to do? Create folders that match my folders in the project and point the source files for the modules and plugins there?

In my application, the Launcher is the top level VI that should run, when the application is launched, which then finds the Controller.lvclass (Parent Actor). This VI then calls a method that finds and launches all of the Child.lvclass Actors in the Modules folder.

I have separate folders in the application for the Controller, the Modules, and the Processes, and created one for the Plugins.

I didnt understand what you meant by including the Controller into the EXE but not the Modules and Plugins?

Are you talking about the Source File Settings page where you can tell it to set the destination for the called item? I would put the controller into "same as caller" or "application.exe" and the remaining modules, etc into those specific folders that I created in the project?

Thanks for your time.

-Steven

0 Kudos
Message 3 of 8
(4,356 Views)

Are you aware of how to dynamically load plain VIs? Leaving aside all the OO related stuff, if you just do the same thing with clases that you do with plain VIs used as plug-ins, everything works out. I understand that answer may not be helpful, but it is a quick answer for now that I thought might help if you had prior experience with VI type plug-ins.

Message 4 of 8
(4,356 Views)

I just make sure the parent class goes to the same destination as the plugin children, then programmatically get the parents path to use as the base of a search.

Message 5 of 8
(4,356 Views)

AQ, thanks.....I didnt know if the App builder handled classes any differently than regular VIs...the checkboxes in regards to exclustions threw me. I have built a few executables but its not something I do everyday. I am a learn by repetition person.

0 Kudos
Message 6 of 8
(4,356 Views)

drjdpowell, thank you, that helps alot. Thanks for all the information folks. I will give it a whirl. Like I said in my previous post, I dont build executables everyday, so I tend to forget little nuances from time to time. 😃

0 Kudos
Message 7 of 8
(4,356 Views)

Hi,

If you have a folder heirarchy in your project and build it, they will be replicated within the exe. So A.vi that calles folder1\B.vi will become program.exe\A.vi that calls program.exe\folder1\B.vi. In other words, you have no access to these VIs, and the only reason I know this is through wrongful use of "this VI's path" function

You can point specific VIs into the destination folders. I have never tried to do this to create plugins, though, and I think the possible pitfalls would be enormous.

     

I didnt understand what you meant by including the Controller into the EXE but not the Modules and Plugins?

I meant that the top level of your heirarchy should be part of your exe, not the plugin children. (I assumed that only classes that inherit from Plugin are plugins, and classes that inherit from Module are not) Ideally, they shouldn't even be in the same project, so that your Main knows it's loading plugins, modules, etc. but doesn't know (or care) that it's loading PluginA and not PluginB.

So as I see it, you have project Main that has the abstract parent of anything you want to load at runtime and code for loading and communicating with it. This is compiled into an exe.

And then you have a separate project(s) with the stuff you want to load at runtime. These are compiled as source distributions into their correct folders from the exe point of view, i.e. MyPlugin would be compiled as a source distibution into EXE root folder\Plugins.

I hope I made things clearer and didn't confuse you even more

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
Message 8 of 8
(4,356 Views)