LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pre Build EXE and Installer Set Version

Well, just as I'm getting ready to go to NIWeek 2017, I finally solved (to my satisfaction) the "Build an Application setting the Version Number at Build Time" problem (described here).  I basically "gave up" and wrote a VI I called "Build Right" that (a) found the Project Path, (b) asked the User to choose the Build Spec from a Combo Box, (c) set the Build Spec version from the SVN Build, and having done all of these "pre-Build Actions", go do the Build.

 

Confession -- while writing this note, I just realized that I hadn't removed the (now unnecessary, and mal-functioning, "Pre-Build Action" setting in the Build Spec, oops!).

 

Bob Schor

Message 11 of 17
(1,489 Views)

Yes my code at one point had a boolean constant that you could set which would re-invoke the build with the updated version but as you noticed there wasn't any feedback on how the build was going.  Is it successful? Failed? Is there a progress bar?  I need to know!

 

So I just end up building twice so I can see a progress of some kind.

0 Kudos
Message 12 of 17
(1,477 Views)
Spoiler
Hi,

is there anything new on this "problem"? As of right now I`ve got a few git hooks to constantly write the newest tagged Version of my main branch and the commit hash into a file. Now I'm curious if there is anything I could do so it takes the version number the first time because building my project takes around 5-8min on my PC.
0 Kudos
Message 13 of 17
(441 Views)

Nope. 10 years later and the only suggestion I have is to vote for the idea on the Idea Exchange.  Then look at the examples of either automatically canceling the build, and then invoking it.  Or canceling it and prompting the user to restart it.

0 Kudos
Message 14 of 17
(426 Views)

Oh, thanks for your quick reply. I'm doing some "work around" now. In my "pre-build" I´m running some git commands to get the commit hash and the next reachable version tag & write them into a VI, where I then set those strings as standard values. So i at least always have the correct version number somewhat delivered with my exe.

0 Kudos
Message 15 of 17
(418 Views)

I didn't think of that, namely to use the Pre-Build Action to write (and save) a VI with the Build as a constant.  I still think the "logic is broken" -- if the Project file holds "Project information" that includes the Build number, LabVIEW provides functions to allow us to access the "internally-stored" Build number and modify it, and if LabVIEW provides us with a "Pre-Build Action" that we can use to make last-second changes to the Project before the Build (my "naive" interpretation of "Pre-Build"), then this nonsense should not be necessary ...

 

Bob Schor

0 Kudos
Message 16 of 17
(401 Views)

Does anyone know where to find official information about the order of the input array "TopLevel/Always Included VI's"?

 

Is 'TopLevel' the first or the last?
Are AlwaysIncluded in alphabetical order, in the order they appear on the project?

 

I cannot find any description of this.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
21st November 1905: E=mc² → and Physics would never be the same again...
0 Kudos
Message 17 of 17
(396 Views)