QMAKE. How to figure out host platform and target platform when cross compiling QT projects - qt

I compiling for QNX, ARM, My Host platform can be Win32/64 , Linux or Mac
I want to find a way to see wheat is my host platform in my PRO file (on computer I building my project)
Apparently using:
win32 {}
unix {}
macx {}
does not work because on different OSes it will always report unix, so I assume this is target platform
So what is the way to obtain current host platform to make PRO file flexible because on different platform I would like to do different things.
Thank you

Maybe QMAKE_HOST variable is the answer to your question?
Here's information from official Qt documentation:
QMAKE_HOST
Provides information about the host machine running qmake. For example, you can retrieve the host machine architecture from QMAKE_HOST.arch.
.arch - Host architecture
.os - Host OS
.cpu_count - Number of available cpus
.name - Host computer name
.version - Host OS version number
.version_string - Host OS version string
win32-g++:contains(QMAKE_HOST.arch, x86_64):{
message("Host is 64bit")
...
}

Could not get anything better then:
QMAKE_SPEC_T = $$[QMAKE_SPEC]
contains(QMAKE_SPEC_T,.*win32.*){
HOST_PLATFORM=WIN
IS_WIN = 1
}
contains(QMAKE_SPEC_T,.*macx.*){
HOST_PLATFORM=MAC
IS_MAC = 1
}
contains(QMAKE_SPEC_T,.*linux.*){
HOST_PLATFORM=LINUX
IS_LINUX = 1
}
and then anywhere to check:
!isEmpty(IS_WIN):message($${HOST_PLATFORM})
!isEmpty(IS_MAC):message($${HOST_PLATFORM})
!isEmpty(IS_LINUX):message($${HOST_PLATFORM})

Related

who to configure fop2 with wazo

I installed wazo on a Debian 9 and I also installed fop2 by following the script on their official website.
when I do
/ usr / local / fop2 / fop2_server --test
==> Connection to manager OK!
but when testing from a web interface
==> No input file specified.
can someone tell me what to do to get access from the web
open for any suggestion.

How can I use the Arduino library Wifi-Manager on Mongoose OS?

I started using Mongoose OS recently, however I did not find a way to create a wifi network for my user to choose the wifi and enter the password.
This Arduino library does exactly that. I would like to know how I can use it in Mongoose or if there is a similar one.
Thank you.
You are looking for their wifi library and you want to enable ap mode. The library is located here:
https://github.com/mongoose-os-libs/wifi
For MongooseOS you add this library to your mos.yml file in the libs directory, e.g.:
libs:
...
- origin: https://github.com/cesanta/mos-libs/tree/master/wifi
- origin: https://github.com/cesanta/mos-libs/tree/master/mjs
You can set some of the default config in the same yml file:
config_schema:
- ["wifi.sta.enable", true]
- ["wifi.ap.enable", true]
- ["wifi.ap.ssid", "SSIDPREFIX_??????"]
- ["wifi.ap.pass", "YOURPWD"]
- ["wifi.ap.hostname", "configure.yourdomain.com"]
In this example, I am also using the new hostname option added in December 2017 - once you connect to your device, you can visit that hostname and you should be prompted for your actual wifi SSID/password.

how to post and accept long text to ASP.net web api?

I am trying to figure out the parameters and class fields to post and accept "build notes"(example text below) info,I am trying to design my controller as follows?would the following work for accepting a long text?
Controller:
public IEnumerable<class name> GetBuildNotes([FromBody] Buildnotes buildNotes>)
{
...........
........
}
Buildnotes class:
public class buildnotes
{
public string build_notes. --> this goes to a database column build_notes of type longtext
.....
}
Long text:
CHECKOUT POINT
cld3 - 1855314
cmn - 1855287
Known issue
[testsuite: STA_5G_VHT]: COMDEBUG-276224: consistent crash : APPS Crash - Kernel BUG at ffffff82dc55994c [PC at reg_todo+0x1dc/0x260] [LR at reg_todo]
if you observe build loading issue.please use fastboot.exe path : \\\8998_adb_drivers
Latest META only supported on BIN1 MTP. With BINA sometimes its works. but observed random boot-up crash
BIN B MTP doesn't boot up with latest target meta
Expected behavior :Bootloader UI updated with Boot verify feature in UEFI where the signing of the images is verified.
You can use below script to determine the Bin / Sub BIN type and IDDq leakage values thru adb.
Bring up device in adb mode
Source : \\location\team\LA\8998_hw_type\FinalScript
Usage : python bining.py
Please run "adb disable-verity" to avoid "adb remount/push" related issue
Sl4a/ PMC/ Acts/ Comms:Google_testing
$[apps_crm]\source\google_testing
WAPI build
CCX build location
e
HOT FIX
HW used for BIT sanity
Recommendation to use MPT with chipname 2.0 card. please replace chipname card on MTP having MCN ends with 001/003/005
CDT programming forV2 HW
http://qwiki.company.com/qct-drvsw/8998
Pre-built wiki
http://qwiki.company.com/com_wCOM/com-CBI/Build_With_External_AU#BUILDING_DRIVER_POINTING_TO_APPS_CRM
http://qwiki.company.com/com_wCOM/com-CBI/Build_With_External_AU#Build_ROME_and_chip_for_SP_:_com1234.LA.0.1
Build loading procedure
Load BIT (CI) Meta
ENGG WLAN FW load on top of BIT META
adb root
adb remount
adb shell mount -o rw,remount /firmware
adb push wlanmdsp.mbn /firmware/image
adb reboot
ENGG BT FW load on top of BIT META
adb root
adb remount
adb shell mount -o rw,remount /bt_firmware
adb push * /bt_firmware/image
adb reboot
Yes you can, I'm guessing you just need to ensure that the object you're passing from your client application matches your Buildnotes class structure.
Try this:
How to pass json POST data to Web API method as object

meta-qt- yocto layer- change default qt platform (QT_QPA_PLATFORM)

I'm using Yocto buildsystem to create an image for raspberry pi that contains Qt5, but I'm having problems with configuring qtbase properly.
Due to those problems when I run Qt app I get an error:
This application failed to start because it could not find or load the Qt platform plugin "xcb" in "".
Available platform plugins are: eglfs, minimal, minimalegl, offscreen.
Reinstalling the application may fix this problem.
Aborted (core dumped)
On the other hand if I start my app like so:
myApp -platform eglfs
it works properly. The same if I set environment variable QT_QPA_PLATFORM=eglfs - it works.
How can I set my default platform to eglfs and not to xcb?
I have tried to set it like below (in my distro.conf):
DISTRO_FEATURES_remove = "x11"
DISTRO_FEATURES_append = " gles2"
PACKAGECONFIG_GL_pn-qtbase = "gles2"
PACKAGECONFIG_X11_pn-qtbase = ""
PACKAGECONFIG_pn-qtbase += "gles2"
PACKAGECONFIG_pn-qtbase += "dbus udev evdev widgets tools libs"
Unfortunately it did not help and my application still shows this error if I don't set platform explicitly.
all you have to do is:
in /etc/profile, add
export QT_QPA_PLATFORM=eglfs so that every time you logged in the machine, it will automatically does it for you.
Or if you do not know what your graphic backends is. The following is the corresponding
Backend: FB; XWayland; X11
GRAPHICS: eglfs; wayland-egl; xcb
export QT_QPA_PLATFORM=${GRAPHICS}

Nagios won't run when I add this

I want to be able to check if my site is up and monitor it by nagios locally.
So I went to this site http://www.linickx.com/nagios which made the following, now while I cant see hosts.cfg so I created it and also services.cfg I had to create as well:
hosts.cfg
# host definition for bonus
define host{
use generic-host ; Name of host template to use
host_name bonus
alias bonus
address 92.12.35.162
check_command check-host-alive
max_check_attempts 10
notification_interval 120
notification_period 24x7
notification_options d,u,r}
services config
The following should appended to the end of hosts.cfg (located in /etc/nagios or /usr/local/nagios/etc)
# Service definition for bonus
define service{
use generic-service ; Name of service template to use
host_name bonus
service_description HTTP
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
contact_groups technical,support
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_http
}
How can I get this to work please?
Nagios won't add new configuration files unless either the file or directory is specified in the main nagios.cfg. Also, the new object configurations won't be added until you restart the Nagios process. Can you give some more detail as to how you installed Nagios (source or package) and what linux distro you're on?
Here are some additional resources:
Nagios Core Documentation
http://nagios.sourceforge.net/docs/3_0/
Nagios Core Support Forum
http://support.nagios.com/forum/viewforum.php?f=7

Resources