Press enter to see results or esc to cancel.

Creating Buildbox android APK without Eclipse (part 1/2) [Buildbox like a boss serie]

If you already created games with buildbox, you maybe don’t want to open eclipse each time you want to build your Android APK.
or you just don’t like eclipse and don’t want to install it.
if this is your case, this article may interest you.

This is the first article of “Buildbox like a boss” serie, so let me know what do you think about it, and how I can enhance it.

Prerequisties

  • Windows environment
  • Android environment (Java, SDK, Ant)
  • System configuration (Paths)

 

Checking and fixing the environment.

To check if everything is correctly installed, open a command prompt window and type “adb version” (without quotes)
you should see something like this

if you get an error saying that he command is not recognized it means that android SDK is not correctly installed, you need to install it.

now just to make sure that everything is fine, type the following command .

you should see a valid path (not necessary the same as in the screenshot)

cmd-android-ant

 

 

 

and finally type

if you get a message saying that the command is not recognized, you should install ANT.

(follow this tutorial to install ANT)

if your environment is correctly configured you can move to the next step.

 

Creating build script

Now we’ll create a script to automate the APK creation, then we’ll add it to windows explorer context menu to make it easier to use.

Create a folder called c:\bbscripts\
in this folder create a file called apkbuild.bat, edit it with your prefered text/code editor and copy past the lines below

 

Let’s test the script

assuming you exported and android project from buildbox to c:\bbgames\exports\MyGame

(MyGame is the folder containing a subfolder called android).

open a command prompt window and type

now plug your android device and type :

this will build and install the game into the attached device.

if this is working then you can already build your games using this script, but let’s make it more user friendly 🙂

 

Creating shell extensions

Shell extensions will add Explorer right click menu entries to make apk creation easier

inside c:\bbscripts folder

create a file called apkbuild-install.reg and edit it with the following content.

create another file called apkbuild-uninstall.reg and edit it with the following content

 

Double click on apkbuild-install.reg, you’ll be prompted to accept changes made to windows registry, Accept them.

this will add an entry called “BBBuilder” to explorer right click menu.

this entry will show when you click any folder, but is only usable with android export folder from buildbox

at this stage you can right click android folder where your game is exported and choose, BBBuilder > Build Debug APK

 

 

this will run the script we created before and will build and install the APK in the attached device.

 

if you don’t like the shell extension and prefer using command line only, you can remove it at any time by double clicking apkbuild-uninstall.reg .

 

Next

This article showed how to create and run an androit APK without using/installing eclipse.
the created APK here is for testing only (a debug version), since it’s not signed with your keystore, you can’t publish it for large public.

in the next article I’ll explain how to create a release APK package, ready for publishing on google play store.
and we will create a shell extension for it as well.

Indie Gamedev resources

Receive curated list of resources, specifically selected for indie game developers.
including graphics, music, tutorials, software ...etc

(one email per week max)