Android Question #CustomBuildAction, how to determine Compiling Type?

DonManfred

Expert
Licensed User
Longtime User
Hallo,

the title says everything i think ;)

How can a tool which is started with the #CustomBuildAction directive in b4a-project...

I want to know whether is is compiled in RELEASE-Mode or even one of the other possibilities...

Are the some hidden vars i can use? maybe

#CustomBuildAction 4,tooltostart.exe, x:\path\to\project.b4a /mode=%%mode%%

And %%mode%% would be replaced by b4a before running this tool to Either Release, Debug, Rapid or Obfuscated.

Do something like that already exists? Erel? ;-)
 

DonManfred

Expert
Licensed User
Longtime User
Ok, thanks for answering... Other question; WHERE DO the IDE stores the actual dropdown. It must be stored somewhere. b4a restaurates the last setting...


Should i made a wish-request for it then?
How are the chances that´s this will be available in future? ;-)

I´ll make a wish-request later this day...
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Thanx to B4A v3.8 we now can use this

B4X:
#if Release
  #CustomBuildAction 4,tooltostart.exe, x:\path\to\project.b4a
#end if
#if Debug
  #CustomBuildAction 4,tooltostart2.exe, x:\path\to\project.b4a
#end if

Really great!! THANX YOU SO MUCH FOR THIS (including the hole conditional compiling), @Erel
b4arulez.gif
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Here is an example that uses CustomBuildAction to change the project files and icon: Change Icon and Assets Files based on the Build Configuration

Yes, i saw that thread... It was the base of my solution to use this feature i have requested... Another part was my knowledge about the new Conditions (Release or Debug are always set in these compiling modes)... So it was easy to build my need

B4X:
#if Release
  #CustomBuildAction 4,tooltostart.exe, x:\path\to\project.b4a
#end if

I ONLY want to run the tool in RELEASE mode not on each compiling...
So i now have want i wanted... (big smile in my face). Thanx again :)
 
Upvote 0

Similar Threads

Top