Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - how to export qt environment: (3 Items)
   
how to export qt environment  
Hello:
I am using qnx6.5 on am335x , I want to deploy qt program on it.
If I use the following command on console then the qt program can run with usb mouse support,the mouse can 
move on the screen.

devi-hid -Pr mouse kbd
export QWS_MOUSE_PROTO="qnx:/dev/devi/touch0 qnx:/dev/devi/mouse0"
/home/test_program -qws

However, I want my qt program run after power up so I add the following line at the tail of my build file.
the usb mouse can not  use,usb mouse can not move.
Can anyone tell me how to make the test_program run with usb mouse support  after power up?

devi-hid -Pr mouse kbd
	reopen /dev/ser1
	[+session] sh &
	export QWS_MOUSE_PROTO="qnx:/dev/devi/touch0 qnx:/dev/devi/mouse0"
	/home/test_program -qws &
Re: how to export qt environment  
First, you do not waitfor the device /dev/devi/mouse0 to appear.  USB enumeration may take some time.

Second, In the build file, it is ineffective to use "export" - you are not in a shell.  Variables are set in the build 
fille environment without "export".  For example,
LD_LIBRARY_PATH=:/proc/boot:/lib:/usr/lib:/lib/dll:/lib/dll/pci

I suggest you put your Qt app call into a shell script, say "/proc/boot/go.sh".  Then you call it from the build file 
like
/bin/sh -c "/proc/boot/go.sh" &

You can use "sh" or "ksh" depending on your build.
Re: how to export qt environment  
Hi Dennis:
 I add  QWS_MOUSE_PROTO="qnx:/dev/devi/touch0 qnx:/dev/devi/mouse0"
in [virtual=armle-v7,raw] .bootstrap = { } or 
 [+script] .script = {}   ,then I build again the bsp,when the system restart ,
I run echo $QWS_MOUSE_PROTO ,it is empty.
Why it can not export in the build file?

So I using following command.The usb mouse work fine in the qt program
/bin/sh -c "/home/go.sh" & 

# cat /home/go.sh
export QWS_MOUSE_PROTO="qnx:/dev/devi/touch0 qnx:/dev/devi/mouse0"
/home/test_program -qws &