Re: [Interest] PRO File defines

2016-04-25 Thread Hamish Moffatt

On 25/04/16 20:58, Francisco Ares wrote:


P.S.: by the way, I've been fiddling with some PRO files, and nowadays 
use a few tricks, like:


 using one source tree to build different executables, with different 
functionality:




op1=$$find(DEFINES,"_REGISTER")
count(op1,1){
include(../ModBus/QModBusMaster.pri)
op2=$$find(QT,network)
count(op2,0){
unix|win32:QT+=network
}


Yikes. Consider "contains(QT, network)" instead of that $$find() mess. 
Or just:


unix | win32: QT *= network

(meaning add network if it is not already there).


Hamish
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] PRO File defines

2016-04-25 Thread Francisco Ares
2016-04-25 2:39 GMT-03:00 Igor Mironchik :

> Hi,
>
> On 25.04.2016 00:29, Gianluca wrote:
>
> It’s not the first time that I see people knowing some “secrets” of Qmake …
> … where is the full documentation of all these details ?
>
>
> I found that here:
>
> http://doc.qt.io/qt-5/building-from-source-ios.html
>
> *Note: *A default build will include both simulator and device libraries.
> If you want to build for a single target, use the -sdk argument with
> either iphoneos or iphonesimulator.
>
> But I don't remember where I found that first time, just google a
> little... :)
>
> Il giorno 24/apr/2016, alle ore 18:47, Igor Mironchik 
>   ha scritto:
>
>
> Hi,
>
> For real device you can use:
>
> ios {
>  iphoneos {
># Here is the real device
>  }
> }
>
> On 24.04.2016 20:45, mark diener wrote:
>
> Hello List:
>
> Who can tell me how to detect whether a build is for IOS or IOS Simulator
> in the project PRO file.
>
> ios {
> QMAKE_IOS_DEPLOYMENT_TARGET=8.0
> QMAKE_IOS_TARGETED_DEVICE_FAMILY=1,2
> }
>
> But how to I differentiate between IOS builds and IOS-simulator builds?
>
> Thanks,
>
> Marco
> ___
> Interest mailing 
> listInterest@qt-project.orghttp://lists.qt-project.org/mailman/listinfo/interest
>
> ___
> Interest mailing 
> listInterest@qt-project.orghttp://lists.qt-project.org/mailman/listinfo/interest
>
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>

There's this link, also, which I found most interesting:

http://doc.qt.io/qt-5/qmake-manual.html

Good luck and
Best regards,
Francisco


P.S.: by the way, I've been fiddling with some PRO files, and nowadays use
a few tricks, like:

 using one source tree to build different executables, with different
functionality:



op1=$$find(DEFINES,"_REGISTER")

count (op1,1) {

include(../ModBus/QModBusMaster.pri)

op2=$$find(QT, network)

count(op2,0) {

unix|win32: QT += network

}

TARGET = WebR

}

count(op1,0) {

TARGET = Web

}



building a usable string with the revision number, which considers the
subversion's own revision number:





REV_MAJOR_CODE = 1
REV_MINOR_CODE = 7
REV_PATCH_CODE = 0

win32 {
defineReplace(Revisions){
NUMBERS = $$system(set LANG=en_US && svn info | sed --quiet 
/Rev:/p
| cut -d: -f2 )
# message($$NUMBERS)
return ($$NUMBERS)
}
}

unix {
defineReplace(Revisions){
NUMBERS = $$system(A=`LC_ALL=C svn info | grep "Rev:" | cut 
-d\" \"
 -f4` && echo $A)
# message($$NUMBERS)
return ($$NUMBERS)
}
}

VER = $$REV_MAJOR_CODE $$REV_MINOR_CODE $$REV_PATCH_CODE $$Revisions()
VERSION = $$join(VER, ".")

DEFINES += \
REV_SUBVN_CODE=$$Revisions() \
REV_PATCH_CODE=$$REV_PATCH_CODE \
REV_MINOR_CODE=$$REV_MINOR_CODE \
REV_MAJOR_CODE=$$REV_MAJOR_CODE \
REV_CODE=\\\"$$VERSION\\\" \
APP_VERSION=\\\"$$VERSION\\\" \
APP_NAME=\"$$TARGET\" \
QT_DLL

message($$TARGET v.: $$VERSION  -  Qt $$QT_VERSION)


So, like this, the source may use the PRO file defined REV_CODE
variable to show it anywhere as desired, for instance.


Knowledge and practice really does something!
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] PRO File defines

2016-04-24 Thread Igor Mironchik

Hi,

On 25.04.2016 00:29, Gianluca wrote:

It’s not the first time that I see people knowing some “secrets” of Qmake …
… where is the full documentation of all these details ?


I found that here:

http://doc.qt.io/qt-5/building-from-source-ios.html

*Note:*A default build will include both simulator and device libraries. 
If you want to build for a single target, use the|-sdk|argument with 
either|iphoneos|or|iphonesimulator|.


But I don't remember where I found that first time, just google a 
little... :)





Il giorno 24/apr/2016, alle ore 18:47, Igor Mironchik 
 ha scritto:


Hi,

For real device you can use:

ios {
  iphoneos {
# Here is the real device
  }
}

On 24.04.2016 20:45, mark diener wrote:

Hello List:

Who can tell me how to detect whether a build is for IOS or IOS Simulator
in the project PRO file.

ios {
 QMAKE_IOS_DEPLOYMENT_TARGET=8.0
 QMAKE_IOS_TARGETED_DEVICE_FAMILY=1,2
}

But how to I differentiate between IOS builds and IOS-simulator builds?

Thanks,

Marco
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] PRO File defines

2016-04-24 Thread Gianluca
ehehehe … cool … there is also an “official” undocumented qmake document: 
https://wiki.qt.io/Undocumented_QMake
:-D


Il giorno 24/apr/2016, alle ore 22:31, Olivier B. 
 ha scritto:

> Google 'undocumented qmake', or else, qmake source code ?
> 
> Le 24 avr. 2016 23:29, "Gianluca"  a écrit :
> It’s not the first time that I see people knowing some “secrets” of Qmake …
> … where is the full documentation of all these details ?
> 
> 
> Il giorno 24/apr/2016, alle ore 18:47, Igor Mironchik 
>  ha scritto:
> 
> > Hi,
> >
> > For real device you can use:
> >
> > ios {
> >  iphoneos {
> ># Here is the real device
> >  }
> > }
> >
> > On 24.04.2016 20:45, mark diener wrote:
> >> Hello List:
> >>
> >> Who can tell me how to detect whether a build is for IOS or IOS Simulator
> >> in the project PRO file.
> >>
> >> ios {
> >> QMAKE_IOS_DEPLOYMENT_TARGET=8.0
> >> QMAKE_IOS_TARGETED_DEVICE_FAMILY=1,2
> >> }
> >>
> >> But how to I differentiate between IOS builds and IOS-simulator builds?
> >>
> >> Thanks,
> >>
> >> Marco
> >> ___
> >> Interest mailing list
> >> Interest@qt-project.org
> >> http://lists.qt-project.org/mailman/listinfo/interest
> >
> > ___
> > Interest mailing list
> > Interest@qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/interest
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] PRO File defines

2016-04-24 Thread Olivier B.
Google 'undocumented qmake', or else, qmake source code ?
Le 24 avr. 2016 23:29, "Gianluca"  a écrit :

> It’s not the first time that I see people knowing some “secrets” of Qmake …
> … where is the full documentation of all these details ?
>
>
> Il giorno 24/apr/2016, alle ore 18:47, Igor Mironchik <
> igor.mironc...@gmail.com> ha scritto:
>
> > Hi,
> >
> > For real device you can use:
> >
> > ios {
> >  iphoneos {
> ># Here is the real device
> >  }
> > }
> >
> > On 24.04.2016 20:45, mark diener wrote:
> >> Hello List:
> >>
> >> Who can tell me how to detect whether a build is for IOS or IOS
> Simulator
> >> in the project PRO file.
> >>
> >> ios {
> >> QMAKE_IOS_DEPLOYMENT_TARGET=8.0
> >> QMAKE_IOS_TARGETED_DEVICE_FAMILY=1,2
> >> }
> >>
> >> But how to I differentiate between IOS builds and IOS-simulator builds?
> >>
> >> Thanks,
> >>
> >> Marco
> >> ___
> >> Interest mailing list
> >> Interest@qt-project.org
> >> http://lists.qt-project.org/mailman/listinfo/interest
> >
> > ___
> > Interest mailing list
> > Interest@qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/interest
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] PRO File defines

2016-04-24 Thread Gianluca
It’s not the first time that I see people knowing some “secrets” of Qmake …
… where is the full documentation of all these details ?


Il giorno 24/apr/2016, alle ore 18:47, Igor Mironchik 
 ha scritto:

> Hi,
> 
> For real device you can use:
> 
> ios {
>  iphoneos {
># Here is the real device
>  }
> }
> 
> On 24.04.2016 20:45, mark diener wrote:
>> Hello List:
>> 
>> Who can tell me how to detect whether a build is for IOS or IOS Simulator
>> in the project PRO file.
>> 
>> ios {
>> QMAKE_IOS_DEPLOYMENT_TARGET=8.0
>> QMAKE_IOS_TARGETED_DEVICE_FAMILY=1,2
>> }
>> 
>> But how to I differentiate between IOS builds and IOS-simulator builds?
>> 
>> Thanks,
>> 
>> Marco
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] PRO File defines

2016-04-24 Thread mark diener
Hello List:

Who can tell me how to detect whether a build is for IOS or IOS Simulator
in the project PRO file.

ios {
QMAKE_IOS_DEPLOYMENT_TARGET=8.0
QMAKE_IOS_TARGETED_DEVICE_FAMILY=1,2
}

But how to I differentiate between IOS builds and IOS-simulator builds?

Thanks,

Marco
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest