How to detect running in MeeGo (C/C++) ?

How to detect running in MeeGo (C/C++) ?

I try ported my crossplatform Qt-application to MeeGo. And read Compliance Spec 3.1.4 - "Layout in Filesystem":
An application shall be installed to /opt/packagename/ and, if necessary to the /etc/opt/packagename/ and /var/opt/packagename/ directories. System wide configuration files shall be placed in the /etc/opt/packagename directory rather than directly in operate correctly. Variable data from a package, such as lock files, cached files, etc. shall be placed in the /var/opt/packagename directory rather than directly in /var, unless a specific location is necessary for the application or system to operate correctly. User specific files shall be stored in the ~/.config/packagename directory. The rationale for these rules is to avoid filename clashes between application packages and with system files, by defining portions of the filesystem certain to be unique to that application.
But at Linux-standart, the binary putting to /usr/local (instead /opt/packagename/), and user specific files putting to ~/.packagename instead ~/.config/packagename. Because of these differences, I have to do two things:

1. Insert to file if/else logic for create rule for any classic Linux and for MeeGo. Hot to do it? At this time in my write: ----- 8< ----- mytetra_binary.path=/usr/local/bin mytetra_binary.files=bin/mytetra INSTALLS+=mytetra_binary desktop_file.path=/usr/share/applications desktop_file.files=desktop/mytetra.desktop INSTALLS+=desktop_file icon_scalable_file.path=/usr/share/icons/hicolor/scalable/apps icon_scalable_file.files=desktop/mytetra.svg INSTALLS+=icon_scalable_file ----- 8< ----- How to write if/else construction to *.pro file, for automation set setting for classic Linux and for MeeGo?

2. For resolve these differences, need to make changes in C/C++ code. How to detect system type "MeeGo" at run-time? OR How to detect system type "MeeGo" at compilation? In Qt-framework there is only the definition Q_OS_UNIX, but none Q_OS_MEEGO. May be Qt Creator Development Tool Set For MeeGo have undocumented definition for detect target platform?
3 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

One of the ways to detect whether your application is running on MeeGo is to programatically look at the "/proc/version" file. For the MeeGo Tablet 1.2 Preview version, you should see something like "(MeeGo 4.5.1-1)"

Ritratto di BrianDevArch

Good idea Victor, this is something Regex could handle with a degree of certainty.

Accedere per lasciare un commento.