B4J Question CustomBuildAction Types

bdunkleysmith

Active Member
Licensed User
Longtime User
For the last couple of weeks I've been exploring the use of the CustomBuildAction to create installation packages customised for each customer, however I've a few related questions.

A post in this thread Change Icon and Assets Files based on the Build Configuration defines five types of CustomBuildAction in the context of:

B4X:
#CustomBuildAction: 1, %WINDIR%\system32\robocopy.exe, ..\Ringwood\ ..\Files\ Default.png

being:

At the moment, five Actions are available:
1 - Before the compiler cleans the objects folder (it happens after the code is parsed).
2 - Before R.java file is generated.
3 - Before the package is signed (the APK file at this point is: bin\temp.ap_).
4 - Before the APK is installed.
5 - After the APK is installed.

However those appear applicable to an B4A (Android) build and so how do these relate to a B4J (Windows) build?

Is "After Packager" just equivalent to one of these number types?

What is the full range of CustomBuildActions available for B4J?

Thanks in anticipation of some guidance.
 

bdunkleysmith

Active Member
Licensed User
Longtime User
Thanks @Erel, but is it possible to just list all current steps applicable to B4J with the associated number or label as I now see there is also a "folders ready" as well as "after packager" label.

It may be clear to those who understand what happens "under the hood", but when I search the Forum on this topic it seems the applicable/available steps has varied. For instance in a post in this thread What are the #CustomBuildAction Steps supported by B4J? it says:

folders ready - after the code is parsed and the folders tree is ready. This is the only cross platform step.
1 - no reason to use.
2 - before the compiled program is run.
3 - after a library was compiled.
after packager - after a standalone package was built.

But many examples continue to use "1" (and indeed I do in some of my projects) and so should we not use "1"? If so, what to use instead?

Again for those of us who don't have knowledge of the compilation process, where does "folders ready" sit in the order of 1, 2, 3 and after packager?

Apologies if this is already documented in one of the many great Guides, but I've not been able to find such a reference and so perhaps if it's not then it could be added.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
The list you posted is almost accurate. I've clarified step 1 and added "before packager".

folders ready - after the code is parsed and the folders tree is ready. This is the only cross platform step.
1 - no reason to use. Before the cleaning step. Use "folders ready" instead.
2 - before the compiled program is run.
3 - after a library was compiled.
before packager - before the standalone package process starts.
after packager - after a standalone package was built.
 
Upvote 0
Top