From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

How to create feature options in a distributed exe

Solved!
Go to solution

Oh yes, I see what you mean Hoohvahh - I missed the bit about 2 projects having the same source code. That's probably the best method.

Thanks.

0 Kudos
Message 11 of 20
(1,332 Views)

I realise I can do that but I am aiming to build both executables without having to do a manual intervention. It keeps the source control happy if I don't edit anything between builds (my process does an automatic commit after a build).

0 Kudos
Message 12 of 20
(1,330 Views)

Yes - got it now. Thank you


@Mark_Yedinak wrote:

See Hoovahh's reply. Create two projects. Each project will have the appropriate flag set. Both projects include the same source code. However, your users can get access to the full application simply by installing both versions. If the access control is critical then I think you will need some type user authentication method.


It's true, control of the application is important for the security of access but for a first attempt, two different executables will suffice. I have to get this out really fast but we may be able to consider proper authentication soon afterwards.

 

Thanks for your help.

0 Kudos
Message 13 of 20
(1,328 Views)

@pincpanter wrote:

Yes, there is a way. Here is an example taken from one of my projects.

AFAIK it's an undocumented feature (at least it was when I started to use the Set Tag method).

However, it works.

 

Set conditional compilation symbols.png

 


That looks promising - I'll do a test ....

0 Kudos
Message 14 of 20
(1,322 Views)

@magicbean  ha scritto:

I realise I can do that but I am aiming to build both executables without having to do a manual intervention. It keeps the source control happy if I don't edit anything between builds (my process does an automatic commit after a build).


In an exe build specification there is the possibility to specify a Pre-build (and a Post-build) vi.

No manual intervention is required.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 15 of 20
(1,321 Views)

@pincpanter wrote:

@magicbean  ha scritto:

I realise I can do that but I am aiming to build both executables without having to do a manual intervention. It keeps the source control happy if I don't edit anything between builds (my process does an automatic commit after a build).


In an exe build specification there is the possibility to specify a Pre-build (and a Post-build) vi.

No manual intervention is required.


Yes, I use those to set the version numbers according to my source control. I could use the build number tag to specify the options.

0 Kudos
Message 16 of 20
(1,319 Views)

This seems to work fine! Thank you.

 


@magicbean wrote:

@pincpanter wrote:

Yes, there is a way. Here is an example taken from one of my projects.

AFAIK it's an undocumented feature (at least it was when I started to use the Set Tag method).

However, it works.

 

Set conditional compilation symbols.png

 


That looks promising - I'll do a test ....


 

0 Kudos
Message 17 of 20
(1,282 Views)

Is there a way to create from scratches those special property?

They are not in the LabVIEW default pallet.

Benoit

0 Kudos
Message 18 of 20
(1,266 Views)

@bseguin  ha scritto:

Is there a way to create from scratches those special property?

They are not in the LabVIEW default pallet.

Benoit


First, you need to enable VI scripting in the VI Server Options dialog.

Then, create a Property node as usual, selecting the desired Class etc...

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 19 of 20
(1,258 Views)
Solution
Accepted by topic author magicbean

It works now. This is how I added conditional disable symbols to a copy of the project and built it. My actual code builds several different variants but this is the essence of the technique.

 

Notes:

You don't have to save the symbols in frame 3 - I just did that so I could open the temporary project later and see the symbols.

If you don't save the symbols, you won't have to duplicate the project to a temporary one - just keep re-opening the original project, adding symbols, building and then closing the original project without saving.

 

 

Example.png

With many thanks to those posted in here and helped me make it work.

 

Message 20 of 20
(1,257 Views)