[Interest] [Qt Android] Any recommended way to modify the package name for different build configuration?

Tomasz Siekierda sierdzio at gmail.com
Sun Jun 29 19:07:25 CEST 2014


On 29 June 2014 08:14, Ben Lau <xbenlau at gmail.com> wrote:
> Hi,
>
> I am using TestFairy to deliver beta/testing version of our application to
> others. It is great if we don't have development version and those released
> via TestFairy on a same device. Since TestFairy will re-sign the package ,
> if the APK's package name is same, it will need to remove the previous
> development version then install the TestFairy version , or vice-versa. That
> will lose saved data.
>
> It is better to keep both of the version on a phone. Therefore , I am
> looking for a method which can change the package name / AndroidManifest.xml
> by passing an option to qmake so that it could be handled by build server.
>
> Any recommended method?

In your .pro file:

contains(DEFINES, other) {
  OTHER_FILES += android/AndroidManifestOther.xml
  TARGET = myAppNameOther
} else {
  OTHER_FILES += android/AndroidManifestFairy.xml
  TARGET = myAppNameFairy
}

And then run qmake like this:
qmake DEFINES+=other



More information about the Interest mailing list