Iwant to access the build version of my EXE with a post build action VI. My goal is to modify the welcome message in the installer build spec to include the build version. If that fails, I want to at least generate a file that can be included with the installer to label the build version. Ideally, I would like to place the build in a folder that incorporates the version in the name. Not sure yet how to accomplish this in an automated way, but the first thing to tackle is getting the version of the EXE.
In the exe I decrypt the file (its just a hard coded password) and return those items. I find that the build date is far more useful than the build version, and it constantly gets out of sync anyway if you have multiple people making builds from a source repo. Additionally the exe is able to check that it has the correct version file as it can run a SHA-1 on itself since it was generated after the build.
Thanks for the ideas. I like the idea of the EXE verification. But, I am trying really hard to stick with native LV build specs and the installer. I just think we should have this kind of feature. Not sure I will be able to pull it off however. Can you modify the installer portion of the build spec from the post build action VI and have the change take effect before the installer build runs (when doing a build all)?
There is a vi in vi.lib that will natively return the version of an executable, there is no need to bust out the .NET. Sorry, no LabVIEW on my phone so I can't comment where it is or what it's called.
....There is a vi in vi.lib that will natively return the version of an executable, there is no need to bust out the .NET. Sorry, no LabVIEW on my phone so I can't comment where it is or what it's called...
That's the one! Of course the VI just makes a call to a bunch of system DLLs, so I don't think it would work on Linux/Mac/Etc. Ultimately you're really not gaining anything over .NET other than you don't need to deal with it directly.
The snippet above probably doesn't require the file/directory info primitive, but I've always used it as such and not found with any trouble. I'd love to play with some scripting or use j's code to have version info in the IDE, but that's so low on the priority list since ultimately the application is always distributed in built form.
Ok, so I think I have this working. At least the part of dynamically updating the installer message to reflect the version of the EXE we just built and are packaging. I also am updating the installer target folder to reflect the EXE version. This way you get a new folder every time you build the installer. So, no more clobbering the previous build output. Now I need to rename the EXE target folder based on the version. This will be harder since I will need to point the installer to the new folder each time. For now, this seems to work well. Let me know what you think.
Thanks. I will post an update once I get the other features added. My long term goal is an automated build system that is script driven and will let you do nightly builds, beta builds, release builds, including pushing them out to network drives for distribution. Now if only I could so silent installs on targets I would really have something!
Word of caution: I tried integrating this into an existing project where there are multiple exe's in the project and it took the version of the first exe in my project (which was not the one that I was building). I haven't looked into how to resolve this issue yet but thanks for the headstart!
Creating Directory Versions in Build Specifications
In LabVIEW 2012 and earlier, if you create a build specification, LabVIEW does not include the build
version number in the directory path on disk. In LabVIEW 2013, you can use tags in the build destination
path so LabVIEW automatically includes the build version in the directory path. You can include the
[VersionNumber] tag in the Destination path field on the Destinations page or the Destination
directory field on the Information page of the build specification properties dialog box.
"The fact that they may play a big role in your susceptibility to disease and health is profound. I mean, it's astounding," says Jeff Leach, who helped dream up the American Gut Project. "It changes everything. I think it's a watershed moment for human health."
Say hello to your microbiome, Rob Stein. Our intrepid correspondent decided to get his gut bacteria analyzed. Now he's wondering if he needs to eat more garlic and onions. Morgan Walker/NPR hide caption
A few weeks later, an envelope arrived in the mail with an instruction sheet and a long two-pronged cotton swab. After spending a week carefully logging the details of everything I ate and drank, I used the swab to collect a fecal sample and mailed it off for analysis.
"I don't know how likely it is, but we could say by looking at Rob Stein's microbiome that Rob is going to die of cancer in the next three years," said Greely. "That could upset Rob Stein, and his friends and his admirers, of whom there are many, no doubt."
Here's why: Volunteers in these projects disclose lots of very personal stuff about their health, their daily habits and their families. It's all supposed to be kept strictly confidential, but there's no way to guarantee that these days, Greely said. Revealing any kind of personal health information could cause a variety of problems, including difficulties getting jobs, long-term care insurance or life insurance.
"When it's a child, first of all, more will be learned as we go through that child's life about the implications of microbiome information," she says. "And there is a longer time during which that information may come back to bite the person."
And there's another angle that's really tricky, according to Eric Juengst, a bioethicist at the University of North Carolina, Chapel Hill. What if someone ends up profiting from research involving an individual's microbes? Should they get a cut?
Leach asked me to open an attachment in an email. A series of multicolored bar charts popped up on the screen. Some showed my microbes while others displayed those of other volunteers, including Leach, for comparison.
Proteobacteria includes "a lot of your bad guys," Leach said, such as E. coli and salmonella. They are associated with inflammation that may increase the risk of heart disease, cancer and other health problems.
"Those are typically considered good bacteria," Leach said. "So the more actinobacteria you have, the better." They're helpful, Leach said. "They're anti-inflammatory. They're known to suppress proteobacteria. So, those are often known as probiotics."
So Leach started asking me about my diet. He eats the Paleo diet, which is heavy on stuff like meat and vegetables. People who eat a lot of onion, garlic and leeks tend to have higher levels of beneficial actinobacteria, he said.
"Is this going to diagnose your disease? Absolutely not. Is this going to change your life? You know, maybe, maybe not. We don't suggest that this is something you can print out and run down to your doctor's office with," Leach said. "That's not what the project's about."
I asked Leach about all those ethical concerns. First of all, he said, the project is all about advancing science, not making money. And as far as the privacy concerns go, Leach said the project is taking pains to keep everything private.
So there you have it: I should think about eating more garlic, leeks, onions and maybe whole grains. And if I'm worried about all this getting out in public, I probably shouldn't have decided to put it on the radio in the first place.
3a8082e126