LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

AF -> packed lib -> break the dependencies

Solved!
Go to solution

I want to make a module system where the end program (exe) checks the folder with dynamic modules (lvlibP) and runs them all. This way I can add modules in the future without recompiling the project.
But I'm stuck on the penultimate step.

 

My steps are:
1) build AF in lvlibp as described here: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000015A6NSAU
This step begs the question if I need to do something with vi.lib\ActorFramework\Actor\Casting Utility For Actors.vim
I can't add it to the library since it's a vim file. I can't make it private to build it either, because every Do.vi calls this function. So now all my Acrol-libraries call the original file, but all other functions are called from Actor Framework.lvlibp

 

2) Build some generic typedef into a separate library.
3) build a basic Actor (contains some common UI functions that I will use in all parts of the project) in lvlibp.
4) build two (different) interfaces - for the future program and for modules in lvlibp.
I do all the steps in different projects. I tried to build some steps in one project, but now, trying to break dependencies, I made a separate project for each step.
Now I have each project looking for the built libraries (lvlibp) in the biuld folder. I tried copying the build result of each step to the next step's project directory, but that didn't work either.
Also in the builds settings I specify exclude dependent lib, so the built libraries are still inverted to the previous level libraries in the builds folder

 

5) make a project for Main (future exe).

This project has references to all levels (typedef + interface libraries + base actor library).

And at this step I encountered difficulties.

If I run the program from the project, everything works fine.

Then, I build the exe (in this case I turn off the exclude dependent lib option) and I get a program that has all the dependent libraries (which I built in the previous steps) copied to the data folder, as I expect. But when I run the program, it tries to find the typedef control from the library I built in the first step, but it doesn't find it in the data folder at all.

 

Question: what am I doing wrong? How can I tell the program new paths to lvlibp?

0 Kudos
Message 1 of 5
(223 Views)

Here is simple exampe

 

001_typedef - proj to build lvlibp with some typedefs

002_base_actor - actor which uses typdef from 001

003_interface1- interface which also uses typdef from 001

004_app - the final app which uses all of them: typdef and inherit from 002 + 003

 

In build folder I have all libs in different subfolders

ArtemSPb_0-1751375191211.png

 

And in project the app works as expected

 

After build of exe I have data folder with all libs in one place

ArtemSPb_1-1751375250280.png 

ArtemSPb_2-1751375411940.png

 

And when I run exe, I get search window for all components

ArtemSPb_3-1751375553953.png

 

 

0 Kudos
Message 2 of 5
(165 Views)

I can't attach zip, no ideas why

zip with project:

https://drive.proton.me/urls/NA55XTYGF0#REgTMLiVGkV3

zip with AF in packed library:

https://drive.proton.me/urls/7MZK9CQEEG#Pt7QmmcUmrm2

0 Kudos
Message 3 of 5
(163 Views)
Solution
Accepted by topic author Artem.SPb

You may want to check out this: https://github.com/ni/actor-framework Actor Framework was moved to Open Source, and the latest release of the open source version has changes that make building it into a PPL a smoother experience. 

 

Beyond that though, the actual issue is due to how you are building the PPLs, and then building the EXE. The EXE is copying the PPLs into the data folder, so the PPLs are all next to each other. But when you build the PPLs alone, you are putting them in subfolders. So when the exe is built, and copies them next to each other, it's a separate hiearchy structure and won't work.

 

You should just build the PPLs to the same folder instead of separate folders (with the Actor Framework.lvlibp in that folder to begin with). Otherwise you have to duplicate the folder structure when you build the EXE. 

Message 4 of 5
(143 Views)

@ShockHouse wrote:

You may want to check out this: https://github.com/ni/actor-framework Actor Framework was moved to Open Source, and the latest release of the open source version has changes that make building it into a PPL a smoother experience. 

 

You should just build the PPLs to the same folder instead of separate folders (with the Actor Framework.lvlibp in that folder to begin with). Otherwise you have to duplicate the folder structure when you build the EXE. 


Thank you. Now I can work 🙂

0 Kudos
Message 5 of 5
(110 Views)