How to compile Wagic SVN to Android (Windows)

Problems compiling the game? Ask Here
kevlahnota
Posts: 618
Joined: Tue Feb 08, 2011 3:00 pm
Location: Philippines
Contact:

How to compile Wagic SVN to Android (Windows)

Post by kevlahnota » Wed Nov 21, 2012 6:57 am

How to compile Wagic SVN to Android

I have these in my system(I use Windows 7)

Wagic SVN
Java JDK
Android NDK
Android SDK
Apache ANT

Download all these and install Java JDK, then install Android SDK(take note where you install this). then run Android SDK Manager.

this image is just example:
Image

Now select your target platform( I select Android 2.3.3 just like the image above) and install/download the packages.

After the Android SDK Manager installed the platform. Extract Android NDK to your desired folder(I extracted them in c:\android-ndk-r8c)

Now we need to compile the Wagic Svn Source using the NDK. Open command prompt (type cmd in run window, winkey+r) and type this:

Code: Select all

c:\android-ndk-r8c\ndk-build -C "C:\WagicSVN\projects\mtg\Android"
where -C sets the Wagic Svn directory, It will take a while to finish compiling.

after it finished compiling you will have two folders (armeabi and armeabi-v7a) in C:\WagicSVN\projects\mtg\Android\libs.

now you need to know Android Sdk installation folder(mine is C:\android-sdk\tools)

open command prompt and type:

Code: Select all

C:\android-sdk\tools\android list targets
it will list the target ID for the platform we will use. in my case my target id is 1 for Android 2.3.3

so in the command prompt we will type a new command:

Code: Select all

C:\android-sdk\tools\android update project -t 1 -p "C:\WagicSVN\projects\mtg\Android"
where -t is the target ID and -p is the path for Wagic SVN.

Finally we can now compile our apk using Apache Ant.

Extract Apache Ant to your desired directory(mine is C:\apache-ant-1.8.4).

Open command prompt and type:

Code: Select all

C:\apache-ant-1.8.4\bin\ant debug -f "C:\WagicSVN\projects\mtg\Android"
where -f indicates the path of Wagic SVN, debug is for the debug version.

If the Build succeed then congratulations.

you can browse the apk (named Wagic-debug.apk) inside C:\WagicSVN\projects\mtg\Android\bin folder.

zhdarkstar
Posts: 16
Joined: Mon Jun 29, 2009 7:13 pm

Re: How to compile Wagic SVN to Android (Windows)

Post by zhdarkstar » Sun Nov 25, 2012 8:11 pm

I had problems getting it to compile at first but found the cause of the problem. The JDK defaulted its installation into a separate folder and the only way I was able to get it to compile was to copy the contents of the jdk folder into the jre7 folder.

Are there supposed to be Google ads on the main menu of the SVN version or did I do something wrong? The release version I got from the main site didn't have them so I was curious as to their origin.

wololo
Site Admin
Posts: 3727
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: How to compile Wagic SVN to Android (Windows)

Post by wololo » Fri Dec 28, 2012 7:28 am

zhdarkstar wrote: Are there supposed to be Google ads on the main menu of the SVN version or did I do something wrong? The release version I got from the main site didn't have them so I was curious as to their origin.
Yes. The last release we did had a bug preventing the ads from showing up, which was a mistake. In a way, this is sad, because the poor results we saw with ads revenue (not knowing there was a bug) is one of the reasons I stopped pouring my own time in the project... well, at least people got to enjoy an ad free version :P

jwilkes99999
Posts: 151
Joined: Sun Jan 16, 2011 8:58 pm

Re: How to compile Wagic SVN to Android (Windows)

Post by jwilkes99999 » Fri Dec 28, 2012 9:12 pm

So if the ads in the next version pull in better revenue we might get more attention lol?

William Ward
Posts: 211
Joined: Mon Sep 26, 2011 11:29 am

Re: How to compile Wagic SVN to Android (Windows)

Post by William Ward » Thu Jan 17, 2013 10:35 am

i cant find the svn?


William Ward
Posts: 211
Joined: Mon Sep 26, 2011 11:29 am

Re: How to compile Wagic SVN to Android (Windows)

Post by William Ward » Fri Jan 18, 2013 11:53 pm

Not quite sure how to download it :/

wololo
Site Admin
Posts: 3727
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: How to compile Wagic SVN to Android (Windows)

Post by wololo » Sat Jan 19, 2013 12:20 am

In order to download the wagic sources with SVN, Follow steps 2 to 6 of this guide:
http://code.google.com/p/wagic/wiki/Com ... or_Windows

The guide is called "Compiling for windows", but (of course) the svn instructions are valid whatever your target compilation platform is (this includes Android)

William Ward
Posts: 211
Joined: Mon Sep 26, 2011 11:29 am

Re: How to compile Wagic SVN to Android (Windows)

Post by William Ward » Sun Jan 20, 2013 6:45 pm

Now we need to compile the Wagic Svn Source using the NDK. Open command prompt (type cmd in run window, winkey+r) and type this:
CODE: SELECT ALL
c:\android-ndk-r8c\ndk-build -C "C:\WagicSVN\projects\mtg\Android"


where -C sets the Wagic Svn directory, It will take a while to finish compiling.

after it finished compiling you will have two folders (armeabi and armeabi-v7a) in C:\WagicSVN\projects\mtg\Android\libs.

now you need to know Android Sdk installation folder(mine is C:\android-sdk\tools)

i dont get the files armeabi?

wololo
Site Admin
Posts: 3727
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: How to compile Wagic SVN to Android (Windows)

Post by wololo » Sun Jan 20, 2013 11:23 pm

Do you get an error message when you compile?

Post Reply