LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create feature options in a distributed exe

Solved!
Go to solution
Highlighted

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
(366 Views)
Highlighted

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
(364 Views)
Highlighted

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
(362 Views)
Highlighted

@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
(356 Views)
Highlighted

@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
0 Kudos
Message 15 of 20
(355 Views)
Highlighted

@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
(353 Views)
Highlighted

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
(316 Views)
Highlighted

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
(300 Views)
Highlighted

@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
Message 19 of 20
(292 Views)
Highlighted
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
(291 Views)