11-10-2013 11:15 AM
I'm wondering if there is a way to setup multiple build targets inside single project to build different binaries. The idea is to have single project for Free and Pro versions.
11-10-2013 11:48 AM - edited 11-10-2013 11:58 AM
You can use conditions inside your pro (project) file.
DEFINES += PRO_VERSION
// Here you can add new files for build etc
SOURCES += proversion.cpp
// Lite version
And in your app you can use normally MACRO condition
Hope it helps
For more info and advanced usage check this
11-10-2013 11:54 AM
@Benecore: Thank you for reply. Is it possible to have 2 bar-descriptor.xml files (or setup application name depending on the configuration)?
Is it possible to setup separate build type using Momentics IDE, so I can easily build either Free or Pro version without modifing .pro file?
11-10-2013 12:08 PM
1. I don't think is possible use two bar-descriptor.xml, but changing name of app depending to the PRO or LITE version, is only 10 seconds work, so....
2. Is possible build LITE and PRO without modifying project file, but i recomend this to you. You can use 'simple' condition inside your file
Your header file:
const bool PRO_VERSION = true
and using conditions somewhere in your code.
11-10-2013 01:57 PM
1. It's not only about application name, but version, icon, splash and permissions. Is it possible to have 2 bar-descriptor files (with a different names) and copy one of them into bar-descriptor.xml as pre-build stage?
2. The idea is to not modify source code in order to build LITE or PRO version. Maybe it is possible to create 2 projects that will use same sources and resources?
11-10-2013 02:11 PM - edited 11-10-2013 02:19 PM
Ok, i understand.
Hm, the workaround for this could be use QMAKE_POST_LINK and copy specific bar-descriptor.xml to the root of project (according target).
Not tested, but i think it could work. Tommorow i will play with this