Android Question How to change .aab filename based on conditional symbols

toby

Active Member
Licensed User
Longtime User
My project can produce two apps, and which to produce is decided by a Conditional Symbol FreeApp

How app name and versions are handled:
#if freeApp
    #ApplicationLabel: Coolapp free
    #VersionCode: 12345
    #VersionName: 1.23.45
#else
    #ApplicationLabel: Coolapp
    #VersionCode: 1.00.00
    #VersionName: 1.00.00
#End If
Right now the name of the compiled .aab/.apk file is same as the project name. How do I make some changes so that it's same as the applicable #ApplictionLabel name , similar effect to the app name and app version?

TIA
 
Solution
Below is what works for my situation (my project can be used to produce two apps, app1 and app2. When creating app2's .aab file, rename app1.aab to app2.aab )
B4X:
#if aab and app2
    #CustomBuildAction: after packager, c:\windows\system32\cmd.exe, /c ren  app1.aab  app2.aab
#End If

This thread helped me solve the problem.

Note: " #CustomBuildAction: 4......" doesn't do anything for me.

toby

Active Member
Licensed User
Longtime User
I just want a different file name when conditional symbol is set; it doesn't have to be same as applicationLabel.
 
Upvote 0

toby

Active Member
Licensed User
Longtime User
Below is what works for my situation (my project can be used to produce two apps, app1 and app2. When creating app2's .aab file, rename app1.aab to app2.aab )
B4X:
#if aab and app2
    #CustomBuildAction: after packager, c:\windows\system32\cmd.exe, /c ren  app1.aab  app2.aab
#End If

This thread helped me solve the problem.

Note: " #CustomBuildAction: 4......" doesn't do anything for me.
 
Upvote 1
Solution
Top