Android Question How ? CustomBuildAction to call a batch file, passing the application name and version name

AnandGupta

Expert
Licensed User
Longtime User
I want to use CustomBuildAction to call a batch file, passing the application name and version name, something like below
B4X:
    #CustomBuildAction: 4, app.bat, %ApplicationLabel% %VersionName%

How can I achieve it ?
 

toby

Well-Known Member
Licensed User
Longtime User
1. You can create the batch file, app.bat, on the fly with ApplicationLabel and VersionName correctly set, or
2. Treat those two parameters at Batch file commandline parameters.
 
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
I wanted the vars for 'ApplicationLabel' and 'VersionName' but they are not available. OK

Check this example for a simple B4J program that reads the project attributes: https://www.b4x.com/android/forum/threads/solved-write-attribute-to-textfile.88549/#post-560535
I already parse the .b4a with batch commands, without any 3rd pty app, but thought to directly get those vars.
 
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
1. You can create the batch file, app.bat, on the fly with ApplicationLabel and VersionName correctly set, or
2. Treat those two parameters at Batch file commandline parameters.
I am writing the 'ApplicationLabel' directly as batch parameter and parsing for 'VersionName'
But your suggestion to 'create the batch file, app.bat, on the fly' is also very good. I will check it.
 
Upvote 0

Similar Threads

Top