Re: [SailfishDevel] Sharing version number (and other constants?) between .yaml/spec, .pro and .cpp/.qml

2013-12-14 Thread Artem Marchenko
Thanks, Robin!
Worked fine.

Cheers,
Artem.



On Sat, Dec 7, 2013 at 12:50 AM, Robin Burchell wrote:

>  https://github.com/nemomobile/mlite/blob/master/rpm/mlite-qt5.yaml#L20
> gives you
> https://github.com/nemomobile/mlite/blob/master/rpm/mlite-qt5.spec#L60
>
>  if you want to go all out gung-ho with automation, you can also do
> something like
> https://github.com/nemomobile/mlite/blob/master/src/src.pro#L3 in your
> project file for local builds.
>
>  On 06 Dec 2013, at 23:45, Artem Marchenko 
> wrote:
>
>  Hi All
>
>  Does anybody know a way to share constants between .yaml and any other
> project file (preferably .pro, but any other way would do as well)?
>
>  I sort of got tired to duplicate version numbers in .yaml and app's
> about dialog :)
> Writing app description in one place only would've been good too.
>
>  Best regards,
> Artem.
>
>  --
> Artem Marchenko
> http://agilesoftwaredevelopment.com
> http://twitter.com/AgileArtem
>  ___
> SailfishOS.org Devel mailing list
>
>
>
> ___
> SailfishOS.org Devel mailing list
>



-- 
Artem Marchenko
http://agilesoftwaredevelopment.com
http://twitter.com/AgileArtem
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Sharing version number (and other constants?) between .yaml/spec, .pro and .cpp/.qml

2013-12-07 Thread Putze Sven
Hi,

I've used something like

VERSION = 0.1.0
HC_GITHASH  = $$system(git show HEAD|grep "^commit"|cut -c 8-)
# c style DEFINEs to access the git hash and program version
DEFINES += HC_PROGRAMVERSION=\\\"$$VERSION\\\"
DEFINES += HC_GITHASH=\\\"$$HC_GITHASH\\\"

in the .PRO file. This provides access in the .PRO file itself and in any .h or 
.cpp file. From there should be a way to .qml (via Q_PROPERTY). Not sure about 
the .yaml file.

BR.
Sven

On 07.12.2013, at 00:26, Artem Marchenko  wrote:

> P.S.
> Oh well, super ideal version would pull tag from git into both .pro and 
> .yaml, but I guess that is impossible without the custom scripts.
> 
> 
> On Sat, Dec 7, 2013 at 1:25 AM, Artem Marchenko  
> wrote:
> Just what I was looking for. Thanks, Robin!
> 
> Cheers,
> Artem.
> 
> 
> On Sat, Dec 7, 2013 at 12:50 AM, Robin Burchell  
> wrote:
> https://github.com/nemomobile/mlite/blob/master/rpm/mlite-qt5.yaml#L20
> gives you
> https://github.com/nemomobile/mlite/blob/master/rpm/mlite-qt5.spec#L60
> 
> if you want to go all out gung-ho with automation, you can also do something 
> like https://github.com/nemomobile/mlite/blob/master/src/src.pro#L3 in your 
> project file for local builds.
> 
> On 06 Dec 2013, at 23:45, Artem Marchenko  wrote:
> 
>> Hi All
>> 
>> Does anybody know a way to share constants between .yaml and any other 
>> project file (preferably .pro, but any other way would do as well)?
>> 
>> I sort of got tired to duplicate version numbers in .yaml and app's about 
>> dialog :)
>> Writing app description in one place only would've been good too.
>> 
>> Best regards,
>> Artem.
>> 
>> -- 
>> Artem Marchenko
>> http://agilesoftwaredevelopment.com
>> http://twitter.com/AgileArtem
>> ___
>> SailfishOS.org Devel mailing list
> 
> 
> ___
> SailfishOS.org Devel mailing list
> 
> 
> 
> -- 
> Artem Marchenko
> http://agilesoftwaredevelopment.com
> http://twitter.com/AgileArtem
> 
> 
> 
> -- 
> Artem Marchenko
> http://agilesoftwaredevelopment.com
> http://twitter.com/AgileArtem
> ___
> SailfishOS.org Devel mailing list

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Sharing version number (and other constants?) between .yaml/spec, .pro and .cpp/.qml

2013-12-06 Thread Artem Marchenko
P.S.
Oh well, super ideal version would pull tag from git into both .pro and
.yaml, but I guess that is impossible without the custom scripts.


On Sat, Dec 7, 2013 at 1:25 AM, Artem Marchenko
wrote:

> Just what I was looking for. Thanks, Robin!
>
> Cheers,
> Artem.
>
>
> On Sat, Dec 7, 2013 at 12:50 AM, Robin Burchell 
> wrote:
>
>>  https://github.com/nemomobile/mlite/blob/master/rpm/mlite-qt5.yaml#L20
>> gives you
>> https://github.com/nemomobile/mlite/blob/master/rpm/mlite-qt5.spec#L60
>>
>>  if you want to go all out gung-ho with automation, you can also do
>> something like
>> https://github.com/nemomobile/mlite/blob/master/src/src.pro#L3 in your
>> project file for local builds.
>>
>>  On 06 Dec 2013, at 23:45, Artem Marchenko 
>> wrote:
>>
>>  Hi All
>>
>>  Does anybody know a way to share constants between .yaml and any other
>> project file (preferably .pro, but any other way would do as well)?
>>
>>  I sort of got tired to duplicate version numbers in .yaml and app's
>> about dialog :)
>> Writing app description in one place only would've been good too.
>>
>>  Best regards,
>> Artem.
>>
>>  --
>> Artem Marchenko
>> http://agilesoftwaredevelopment.com
>> http://twitter.com/AgileArtem
>>  ___
>> SailfishOS.org Devel mailing list
>>
>>
>>
>> ___
>> SailfishOS.org Devel mailing list
>>
>
>
>
> --
> Artem Marchenko
> http://agilesoftwaredevelopment.com
> http://twitter.com/AgileArtem
>



-- 
Artem Marchenko
http://agilesoftwaredevelopment.com
http://twitter.com/AgileArtem
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Sharing version number (and other constants?) between .yaml/spec, .pro and .cpp/.qml

2013-12-06 Thread Artem Marchenko
Just what I was looking for. Thanks, Robin!

Cheers,
Artem.


On Sat, Dec 7, 2013 at 12:50 AM, Robin Burchell wrote:

>  https://github.com/nemomobile/mlite/blob/master/rpm/mlite-qt5.yaml#L20
> gives you
> https://github.com/nemomobile/mlite/blob/master/rpm/mlite-qt5.spec#L60
>
>  if you want to go all out gung-ho with automation, you can also do
> something like
> https://github.com/nemomobile/mlite/blob/master/src/src.pro#L3 in your
> project file for local builds.
>
>  On 06 Dec 2013, at 23:45, Artem Marchenko 
> wrote:
>
>  Hi All
>
>  Does anybody know a way to share constants between .yaml and any other
> project file (preferably .pro, but any other way would do as well)?
>
>  I sort of got tired to duplicate version numbers in .yaml and app's
> about dialog :)
> Writing app description in one place only would've been good too.
>
>  Best regards,
> Artem.
>
>  --
> Artem Marchenko
> http://agilesoftwaredevelopment.com
> http://twitter.com/AgileArtem
>  ___
> SailfishOS.org Devel mailing list
>
>
>
> ___
> SailfishOS.org Devel mailing list
>



-- 
Artem Marchenko
http://agilesoftwaredevelopment.com
http://twitter.com/AgileArtem
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Sharing version number (and other constants?) between .yaml/spec, .pro and .cpp/.qml

2013-12-06 Thread Robin Burchell
https://github.com/nemomobile/mlite/blob/master/rpm/mlite-qt5.yaml#L20
gives you
https://github.com/nemomobile/mlite/blob/master/rpm/mlite-qt5.spec#L60

if you want to go all out gung-ho with automation, you can also do something 
like https://github.com/nemomobile/mlite/blob/master/src/src.pro#L3 in your 
project file for local builds.

On 06 Dec 2013, at 23:45, Artem Marchenko 
mailto:artem.marche...@gmail.com>> wrote:

Hi All

Does anybody know a way to share constants between .yaml and any other project 
file (preferably .pro, but any other way would do as well)?

I sort of got tired to duplicate version numbers in .yaml and app's about 
dialog :)
Writing app description in one place only would've been good too.

Best regards,
Artem.

--
Artem Marchenko
http://agilesoftwaredevelopment.com
http://twitter.com/AgileArtem
___
SailfishOS.org Devel mailing list

___
SailfishOS.org Devel mailing list

[SailfishDevel] Sharing version number (and other constants?) between .yaml/spec, .pro and .cpp/.qml

2013-12-06 Thread Artem Marchenko
Hi All

Does anybody know a way to share constants between .yaml and any other
project file (preferably .pro, but any other way would do as well)?

I sort of got tired to duplicate version numbers in .yaml and app's about
dialog :)
Writing app description in one place only would've been good too.

Best regards,
Artem.

-- 
Artem Marchenko
http://agilesoftwaredevelopment.com
http://twitter.com/AgileArtem
___
SailfishOS.org Devel mailing list