From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Pre/Post Build Actions" when building installer?

When building a source distribution or application (and some others), we can specify "pre/post build actions", i.e. VIs that are called before or after the build steps.

 

Sadly, this option is missing when building an installer. We can only specify executables that run before of after installation, not before/after the build process.

 

I can think of many scenarios where a "pre/post build action" could be useful when building an installer. For example every time I build an installer, I rename the created "Volume" folder to something else, and every time I edit the setup.ini file to change the  "WinFastStartup=1" to "WinFastStartup=0" (long story). These are steps before/after the build, and occur well before distribution and installation.

 

After "build all", I also move all new builds (source, exe, installer) to a new and unique folder, and since the installer is the last build, even this could be automated if we had post built action when building installers.

 

Am I missing something obvious?

 

(Of course I can write a VI that does all the builds and then applies the actions. Just wondering why the built-in tools are missing this functionality).

 

Message 1 of 12
(4,492 Views)

Ahhh... musings of the Gods.  😄

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 12
(4,452 Views)

I have never wanted to a Pre/Post on an installer, but you make some very good points.  Make it an idea and I'll vote for it.

Message 3 of 12
(4,445 Views)

@Hooovahh wrote:

I have never wanted to a Pre/Post on an installer, but you make some very good points.  Make it an idea and I'll vote for it.


Agreed... I'd vote for it as well.

 

I've run into a couple of cases where doing a pre/post on an installer would have been very useful.  Last time I ended up just compiling the vis as executables and packaging them with the installer, but it felt like a hack way to do it.

0 Kudos
Message 4 of 12
(4,438 Views)

@Hooovahh wrote:

Make it an idea and I'll vote for it.


Yes, this was my plan depending on the comments here, so stay tuned.

 

(... and after I have searched in detail to see if anything similar has not been proposed yet).

0 Kudos
Message 5 of 12
(4,434 Views)

This is very much needed. I like to have a pre-build VI that renames/deletes the previous build output folder to ensure that the build happens in a clean location (so that if I zip up the installer, it doesn't have any old files in there that weren't added specifically during the build process).

0 Kudos
Message 6 of 12
(4,161 Views)

If we are talking about adding to the Pre/Post Build functionality, can we please get NI to allow us to include Actions that can modify the Build options (like set parts of the Version info) before the values are cached as part of the Build Procedure?  Otherwise we are stuck with "Build Twice", or "Build Programmatically" (which allows you to do, yourself, the "Pre-Build" Actions, do the Build, then do the Post-Build Actions, and optionally do this for a single Build Spec or "Build All").

 

Bob "Frustrated" Schor

Message 7 of 12
(4,154 Views)

This is very much needed. I like to have a pre-build VI that renames/deletes the previous build output folder to ensure that the build happens in a clean location (so that if I zip up the installer, it doesn't have any old files in there that weren't added specifically during the build process).

0 Kudos
Message 8 of 12
(4,120 Views)

@Bob_Schor wrote:

If we are talking about adding to the Pre/Post Build functionality, can we please get NI to allow us to include Actions that can modify the Build options (like set parts of the Version info) before the values are cached as part of the Build Procedure?  Otherwise we are stuck with "Build Twice", or "Build Programmatically" (which allows you to do, yourself, the "Pre-Build" Actions, do the Build, then do the Post-Build Actions, and optionally do this for a single Build Spec or "Build All").

 

Bob "Frustrated" Schor


Stumbled on this today. I was wondering why I stopped using pre/post-build and made my own programmatic build. Now I found out why. Going back to programmatic build. Really crazy that I have to build first to get the version numbers correct for the next build. Kudoed https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Have-Post-Pre-Build-VI-For-Installers/idi-p/3680911

Certified LabVIEW Architect
0 Kudos
Message 9 of 12
(2,592 Views)

Still only 16 kudo's. Sigh.

 

Seems like there are few people smart enough to don't want to do the same thing over and over and over again. Ad infinitum

 

For me, it's zipping the installer volume and the fast startup hack.

 

I'd probably automate tossing it over the customer's fence as well.

 

I hope that if\when they do it, the give us an array... The pre\post build action should be an array as well. Probably easier to implement as well.  

 

 

0 Kudos
Message 10 of 12
(2,582 Views)