LabVIEW APIs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Get progress when building an EXE with Application Builder API

Hello,

Does anyone know how to get progress when building an EXE with Application Builder API?

I am using the code below to automate my work and it would be nice to see a progress bar like when you build your application from the LV Project.

build code.png

I've found a VI called "Create progressbar events.vi" but I don't know what it does and how to use it.

progressbar.png

Thanks a lot for help.

Matthias.



Matthias Baudot | Software Architect | Founder at STUDIO BODs | DQMH® Consortium Board Member


STUDIO BODs     BLT for LabVIEW     LabVIEW Champion     Certified Professional Instructor     DQMH Trusted Advisor     GCentral Sponsor


 Check out my LabVIEW presentations and videos!

Message 1 of 17
(9,902 Views)

Hi Matthias,

Sorry this is a little late.  "Create progressbar event.vi" creates user events for the Application Builder API to pass messages with, I would guess the normal pop-up window utilizes these events.  Below is a quick and dirty snippet example of using these events to show build status.

build with progress bar.png

 

-Voky

Message 2 of 17
(8,917 Views)

Hi Voky

Have you got snippet example for Installer Builder Progress Bar as well?

 

Thank you

 Peter

0 Kudos
Message 3 of 17
(7,910 Views)

Thanks for the example Voky, and the question, Matthias. It's great to get a little more information about the collection of VIs in these folders.


GCentral
0 Kudos
Message 4 of 17
(7,770 Views)

Hi Peter,

 

Sorry for taking so long to get back to you. I've been busy with a new project the past few months.  I haven't used the installer builder, but poking around the AB_API folder I found something that might be of interest.

 

'.\vi.lib\AppBuilder\IB_Classes\Installer\Get_Installer.vi' looks to be a method for accessing many data members including the user events to drive the progress bar

 

cbutcher,

You're welcome, glad to share it.

 

Thanks guys,

-Voky

0 Kudos
Message 5 of 17
(7,761 Views)

I've been building an App Builder for my company, and found your example of for Building EXEs very helpful! I looked into the IB_Class stuff and unfortunately, I don't think it has the same capability (there's no "IB_API" like there is for App Builder and I can't open a valid Installer object). 

 

This makes me sad, but I'll post if I find a workaround!

0 Kudos
Message 6 of 17
(6,591 Views)

Have you tried using the IB_Load_Class.vi (in AppBuilder/IB_Classes) with maybe the Installer.lvclass (Installer subdirectory) path?
I haven't, but that would be my first guess.

 

There's also a "Load_from_Project.vi" and a "Create_New_Installer.vi" in the Installer subdir. Create_New probably isn't what you're looking for if you want to use an existing build specification (rather than programmatically generating the build spec) but Load_from_Project looks like it might do what you want - it just has some awkward inputs (no idea what you would need to pass - maybe a reference, or an index to a build spec?).


GCentral
0 Kudos
Message 7 of 17
(6,588 Views)

Took a look at those. I can run "IB_Load_Class.vi" and get a valid class from it, but I've not found an equivalent VI to the AB_API's "Open Build.vi" that receives a build spec ref and name. I also tried starting with the "Load_From_Project.vi" (see snippet), which has an input of "Object" that is a U64. I tried casting my installer build spec to a U64, but regardless of what I put into that VI, it never finishes executing.

 

My guess is that the VI is waiting for something from the usual wizard framework like a rendezvous or notifier.

 

 

Thanks for the suggestion though!

0 Kudos
Message 8 of 17
(6,577 Views)

Has anyone been able to figure out how to build installer programmatically with progress? Is it possible?

0 Kudos
Message 9 of 17
(6,460 Views)

Hi Roger,

 

I got closer! I was able to locate the Installer class with equivalent VIs to the EXE class. You'll find it at this path: "C:\Program Files (x86)\National Instruments\LabVIEW 2018\vi.lib\InstallerBuilder\Classes\Win_Installer\AB_Win_Installer.lvclass". You'll find the functions for opening the build, setting version number and other attributes, starting a build, etc.

 

Unfortunately, I don't see a VI for getting event refnums for the progress bar, errors or cancel button enable like the VI in the EXE class :(. It's comprehensive enough for automated builds, but not to monitor progress. 

0 Kudos
Message 10 of 17
(6,371 Views)