LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

windows linux cvibuild name collision

I'm trying to keep my Linux port in the same directory as my original Windows code on a network share, fixing the few source code issues with #ifdef __WIN32__ conditional blocks.  But I've run into a problem with a name collisions in the cvibuild.projectname directory. 

I can build the Windows executable on top of the Linux build without issues, but bulding the Linux version with cvicc projectname.prj fails unless I delete the cvibuild.projectname directory (actually it just seems to be the *.niobj files that cause the problem, but deleting the directory is easier).

Any quick way to make one or the other build use a different name so this issues goes away?

--wally.


0 Kudos
Message 1 of 8
(4,050 Views)
Hi Wally,

Unfortunately, there is no way to change the build directory at this time. You will need to rebuild your application everytime you boot into Linux using:
cvicc -rebuild

Regards,
0 Kudos
Message 2 of 8
(4,022 Views)
I may just write a wrapper script in /usr/local/bin to replace the /cvicc symlink that deletes the cvibuild/projectname directory and then runs  /usr/loca/lnatinst/cvi80/cvicc, that should solve my problem well enough.

I've installed the CVI Linux runtime on Ubuntu 6.06 to cross-compile my windows projects to run on Linux.   To ease the process (we've quite a few systems where real-time linux code runs and is controlled by a networked Windows client written in CVI) I've installed VirtualBox virtual machine on Ubuntu and installed Windows 2000 in the virtual machine.  I then installed CVI 8.0.1 and the Runtime for Linux Help in the W2K virtual machine.  I can then on Linux run CVI in the VM  to build windows clients, and then run cvicc in a termiinal window to create native Linux CVI clients that control the real time Linux code.  Almost as good as a Linux native IDE and makes for a smooth transition as we start retiring the old Windows controllers, eliminating a box and network connection to support.

So far the only problem I've encountered is with fonts not being right.  All the original CVI code was done in CVI 5.5 or 6.0 so I haven't determined yet if its a CVI8 issue or a CVI for Linux Runtime issue.

--wally.

0 Kudos
Message 3 of 8
(4,019 Views)
Hi Wally,

Could you elaborate a bit more on the fonts not being right?

Regards,
0 Kudos
Message 4 of 8
(3,989 Views)
The fonts are fine in the UIR editor, but when I run the application they are not  the correct sizes and often overflow the space allocated for the text messing up the interface.

When I compile the sample code the fonts I get in the application seems to match what I see in the UIR editor, but its possible the samples are dense enough in UI elements for the issue to be obvious.

--wally.

0 Kudos
Message 5 of 8
(3,976 Views)
Hi Wally,

The behavior you are describing is expected and described in the CVI help section "Multiplatform User Interface Guidelines". From the help:

The only fonts sure to be available on all platforms are the National Instruments fonts. National Instruments fonts of the same name resemble each other stylistically from one platform to another, although some relative size differences might exist. The National Instruments Meta Fonts are of uniform size, or height, relative to the rest of the user interface and are the most portable family of fonts available. However, the width of the National Instruments Meta Fonts might differ slightly from one platform to another. Allow for extra space in the width of all control labels to assure consistent appearance.

You might find the User Interface library functions GetCtrlBoundingRect, GetTextDisplaySize, and GetScreenSize useful in calculating and compensating for font size discrepancies between platforms.


The bottom line is, you may want to consider using National Instruments Meta Fonts and adding extra space in between the controls on your form.

Regards,
0 Kudos
Message 6 of 8
(3,960 Views)
Thanks, that was it,  somehow (perhpas since the apps are legacy from CVI 5.5 and older) my default fonts were NIDialog, NIApplication, etc.

In the UIR editor "preferences" I was able to reset my defaults to NIDialogMetaFont and then with multi-selection use Edit->ApplyDefaultFont change everything quickly.

Now the problem is the "BOLD" attribute doesn't appear to be available with the Meta Fonts, which makes some things hard to read.  If I click bold checkbox in the UIR editor for a control text the font changes to NIDialog 😞

--wally.

0 Kudos
Message 7 of 8
(3,952 Views)
Hi Wally,

Unfortunately, bold formatting is not available for the National Instruments meta fonts, so if you use any special formatting with a meta font there will be greater variation in the size of the font at run-time.
Regards,


Marty H.
National Instruments
0 Kudos
Message 8 of 8
(3,896 Views)