LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to preserve fonts setting in application .INI file after every build?

Hi All,

I'm using compiled (.exe) application in non-English environment. I'm using application .ini file for change runtime fonts how discussed here. But I don't know how to preserve this file per every build. Currently the every build rewrites one by default.

 

Could anyone help me find out any workaround?

 

Thanks in advance,

Oleg

0 Kudos
Message 1 of 10
(4,481 Views)

The application-specific .ini file that is in your link can be set in the Build using the Advanced page -- put a check in "Use Custom Configuration File" and point it to the .ini file (which I recommend be in the Project/s Resource folder) you want to use.

 

Bob Schor 

Message 2 of 10
(4,458 Views)

Hi Bob,

Thanks you for your reply. But I'm not sure that I'm ready to manage by hand a common section inside this file like these:

server.app.propertiesEnabled=True
server.ole.enabled=True
server.tcp.paranoid=True
server.tcp.serviceName="My Computer/VI Server"
server.vi.callsEnabled=True
server.vi.propertiesEnabled=True
WebServer.TcpAccess="c+*"
WebServer.ViAccess="+*"
DebugServerEnabled=False
DebugServerWaitOnLaunch=False

Currently I've used the post-build action. I'm modifying the .ini file on the fly (see attach). But this is just workaround as it seems for me. 

 

Kind regards,

Oleg

Message 3 of 10
(4,408 Views)

Hi Oleg,

 

5 steps:

- build your EXE once.

- copy the created EXE.ini file to your project folder (and include it in your project tree)

- edit the copied ini file to include the keys for font settings (see the LabVIEW.ini for details)

- now change your Build Specs (Advanced settings -> "user-defined config file") to use the ini file present in your project when creating the EXE

- Create the EXE again to have your "user-defined config file" included…

Done!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 10
(4,395 Views)

I completely agree with Gerd (and basically said the same thing, but with fewer details, in my earlier post).  The point is that LabVIEW will create a Configuration (.ini) for you when you do the first Build.  Save this in your Project (I suggested the Resource folder where you might have an Icon saved) and adjust the Fonts as necessary for your needs.  Then specify it using the Advanced settings.  No need for a Pre-Build Action (which doesn't always "Pre-Build", as I've documented elsewhere).

 

Bob Schor

0 Kudos
Message 5 of 10
(4,368 Views)

Yes, you are both right. But please pay attention on following things:
1. The application .ini file contains a lot of variables that depend from build profile.
2. The DevOps have to manage common section by hand in case of users config
3. The continuous integration/deployment unavailable in this case.

 

I'm looking for solution that provide the real automation around whole project. Hovewer standard approach also can be accepted for small projects or single application with long life cycle.

 

Thanks for your help, regards,

Oleg

0 Kudos
Message 6 of 10
(4,347 Views)

Hi Oleg,

 

1. The application .ini file contains a lot of variables that depend from build profile.
2. The DevOps have to manage common section by hand in case of users config

Create an additional EXE, which acts as an editor for your INI file. So your DevOps don't have to edit the INI file "manually", but can do this within a "safe" environment!

 

3. The continuous integration/deployment unavailable in this case.

Nobody spoke about "continuous" deployment! You deploy just once, with a predefined INI file.

When you have several installations with different INI files you can create a whole bunch of INI files and several BuildSpecs - or you change the BuildSpec each time to choose the correct INI file…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 10
(4,339 Views)

 

Hi Gerd,


@GerdW wrote:

Create an additional EXE, which acts as an editor for your INI file. 

 

 


 

This is the same as post-build VI but more complicated. 

 

Thanks,

Oleg

 

0 Kudos
Message 8 of 10
(4,316 Views)

Hi Oleg,

 

well, this is a one-time work - but all your DevOps have the advantage of a nice tool to edit their settings!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 10
(4,310 Views)

I actually prefer the more reusable solution, that takes less work on a new build, and in this case a post build VI does the trick.  As mentioned this same VI can be used on every built EXE, without needing to edit it, or specify a custom INI file to be used each time.

0 Kudos
Message 10 of 10
(4,275 Views)