P PJLPJLPJL Member Licensed User Longtime User Mar 11, 2022 #1 I may be wrong (in which case, my apologies) but I don't think this line in the Project Attributes section is working Code: #CustomBuildAction: 3,"C:\Users\PJL\B4A\Version.bat","" There is no indication in the Compile:Build box that a custom action is being run before the APK is signed and the work intended to be done by the '.bat' file is not happening. Moreover, if the '.bat' file does not exist no error is thrown. Just to see what happened, I changed the step number to 6 and then an error was thrown if the '.bat' file did not exist. With thanks. PJL
I may be wrong (in which case, my apologies) but I don't think this line in the Project Attributes section is working Code: #CustomBuildAction: 3,"C:\Users\PJL\B4A\Version.bat","" There is no indication in the Compile:Build box that a custom action is being run before the APK is signed and the work intended to be done by the '.bat' file is not happening. Moreover, if the '.bat' file does not exist no error is thrown. Just to see what happened, I changed the step number to 6 and then an error was thrown if the '.bat' file did not exist. With thanks. PJL
Erel B4X founder Staff member Licensed User Longtime User Mar 13, 2022 #2 It will run before the signing step when you build an AAB package. Upvote 0
P PJLPJLPJL Member Licensed User Longtime User Mar 13, 2022 #3 Thank you for explaining Erel. Is there any way this can be run when building an APK? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Mar 13, 2022 #4 You are probably looking for the "folders ready" step: Code: #CustomBuildAction: folders ready,"C:\Users\PJL\B4A\Version.bat","" Upvote 0
You are probably looking for the "folders ready" step: Code: #CustomBuildAction: folders ready,"C:\Users\PJL\B4A\Version.bat",""
P PJLPJLPJL Member Licensed User Longtime User Mar 13, 2022 #5 Thank you for the suggestion. However, I wanted to programatically add a version name to the APK before it was signed. I think "folders ready" is too early in the process for that. Upvote 0
Thank you for the suggestion. However, I wanted to programatically add a version name to the APK before it was signed. I think "folders ready" is too early in the process for that.
Erel B4X founder Staff member Licensed User Longtime User Mar 13, 2022 #6 PJLPJLPJL said: wanted to programatically add a version name to the APK before it was signed Click to expand... No such thing and signing has nothing to do with the file name. You can use 4 or 5 which run before or after the installation step. Make a copy of the APK and give it a different name. Upvote 0
PJLPJLPJL said: wanted to programatically add a version name to the APK before it was signed Click to expand... No such thing and signing has nothing to do with the file name. You can use 4 or 5 which run before or after the installation step. Make a copy of the APK and give it a different name.
P PJLPJLPJL Member Licensed User Longtime User Mar 13, 2022 #7 Sorry Erel, we're at cross-purposes. I'm wanting to programatically update the android version name text in the manifest file in the APK. I can do this with a manifest editor (I've downloaded one from https://github.com/WindySha) but it leaves the apk unsigned. Therefore I need to run this before the apk is signed and installed on the device. Perhaps this just isn't possible! Upvote 0
Sorry Erel, we're at cross-purposes. I'm wanting to programatically update the android version name text in the manifest file in the APK. I can do this with a manifest editor (I've downloaded one from https://github.com/WindySha) but it leaves the apk unsigned. Therefore I need to run this before the apk is signed and installed on the device. Perhaps this just isn't possible!
Erel B4X founder Staff member Licensed User Longtime User Mar 13, 2022 #8 2 should work for this use case. It fires after AndroidManifest.xml is created and before the APK is signed. Upvote 0
2 should work for this use case. It fires after AndroidManifest.xml is created and before the APK is signed.