Wish Additional CustomBuildAction condition

MaFu

Well-Known Member
Licensed User
Longtime User
At the moment the following CustomBuildAction conditions exist:
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.

A additional Action would be very helpful:
0 - Before the compiler parses the code (and reload changed files after action).
 

MaFu

Well-Known Member
Licensed User
Longtime User
The problem with this step is that the compiler finds the build actions during the parsing step. It also doesn't load the code from the files.
OK. But you can implement a fast prescan only for CustomBuildAction 0, then reload changed files. And after this step begin with parsing.
It should'nt be a lot of work and would be very helpful (imho, i don't know if it's also helpful for others).
 

MaFu

Well-Known Member
Licensed User
Longtime User
It is solvable. I agree. Do you want to generate code automatically?
Yes.
As an example i have a windows program and would create a android app as remote control (via websockets). A part of the control is very simple, therefore i can update the B4A source automatically if the windows source gets new functionality.
I can make this step before compilation, but with a CustomBuildAction i can't forget it.
 

Troberg

Well-Known Member
Licensed User
Longtime User
I agree, this would be very useful. I sometimes rely a lot on code generators, especially when handling databases or lots of asynchroneous server calls, and it's nice to be able to have the code regenerated automatically based on current specs on compile.
 

DonManfred

Expert
Licensed User
Longtime User
this is an old thread. Conditional compiling is already build-in in B4A.
 

Troberg

Well-Known Member
Licensed User
Longtime User
I'm sorry, I somehow missed to quote. What I thought would be useful would be to be able to have a build action run before the code is compiled, so I can run a code generator automatically each build. As it is today, I can't have build actions run before the code is parsed.
 
Top