Showing posts with label build. Show all posts
Showing posts with label build. Show all posts

Thursday, May 17, 2018

Game Boy Advance Development 101: Compiling Tank Advance

If you've happen to download Tank Advance source code from Loirak Development, chances are you're having a problem compiling a working GBA file with devkitPro.


That's because of the compiler.


The pre-compiled GBA file inside the Tank Advance ZIP file was compiled 2002 -- that's more than a decade and a half.  Last 2002, GCC was just version 3.  As of this writing, devkitPro is using GCC version 7.


Without much further ado, use the following lines in MSYS2:
arm-none-eabi-gcc -c gfx.c -mthumb-interwork -mthumb -O2 -o gfx.o
arm-none-eabi-gcc -c main.c -mthumb-interwork -mthumb -O2 -o main.o
arm-none-eabi-gcc main.o gfx.o -mthumb-interwork -mthumb -specs=gba.specs -o tank.elf
arm-none-eabi-objcopy -v -O binary tank.elf tank.gba



If successful, you should have a freshly compiled Tank Advance and you can start changing the code to understand how it works so you can start writing your own Game Boy Advance game. :)


Happy GBA deving!


~creek23

Friday, May 24, 2013

Compiling Geany on Windows

Can't remember exactly how many times I've tried compiling Geany or even thought of trying to compile it on Windows.  But I remember that my last try was last 2011 -- about February or March.

It's been a while that I've been trying to find a stable and reliable free and open source (not to mention cross-platform) Source Code Editing software so I could strip it down to provide an IDE specifically functioning for my open source game creation project called KAGE.  Finally, -- finally! -- I successfully compiled it yesterday!

I know that Geany's project page has a how-to page for compiling it on Windows but I still had bumps along the way.  This tutorial is simply to compliment what seems to be missing in the official tutorial.

So, just a recap. You need to have this things done already:

Not sure if we also need the GtkMM for Scintilla, but I did have that installed on my machine before I tried compiling Geany for the last time.

Before we proceed, let's make sure that you had the contents of GCC and GTK+ under C:\libs directory.  And that C:\libs\bin is added on your %PATH%, as well as C:\libs\msys\1.0\bin.

Now, for the `complimentary' part of my tutorial.

First, download the Manifest file from Geany's Git repo, which was not included in the downloadable zipped source code.

Rename win32-config.h to config.h then change the content of makefile.win32 from

all: config.h
 $(MAKE) -C tagmanager/ctags -f makefile.win32
 $(MAKE) -C tagmanager/mio -f makefile.win32
 $(MAKE) -C tagmanager/src -f makefile.win32
 $(MAKE) -C scintilla -f makefile.win32
 $(MAKE) -C plugins -f makefile.win32
 $(MAKE) -C src -f makefile.win32

config.h: win32-config.h
 $(CP) $< $@


to this

all: $(MAKE) -C tagmanager/ctags -f makefile.win32
 $(MAKE) -C tagmanager/mio -f makefile.win32
 $(MAKE) -C tagmanager/src -f makefile.win32
 $(MAKE) -C scintilla -f makefile.win32
 $(MAKE) -C plugins -f makefile.win32
 $(MAKE) -C src -f makefile.win32


The reason behind is that, there seems to be wrong with the makefile that the command COPY thinks config.h is supposed to be a directory.

Now, open a command line then run cd to the directory where you extracted Geany's source code.

Finally, type-in: make -f makefile.win32

Wait for it to compile and you'll then end up a very fresh build of Geany on Windows.

~creek23

Saturday, February 12, 2011

MSYS pr not found

Ever got the pr not found error on MSYS?

Not sure why the packages made pr command to be obsolete. But compiling FFMPEG on Windows using MinGW and MSYS requires pr in the toolchain.

Do not worry, it is still on MinGW's download page though not easily accessible. It's hidden inside MSYS/BaseSystem/msys-core/obsolete

But be careful, you will only need the PR.EXE, everything else is unnecessary.

UPDATE: Updated link.

Friday, February 13, 2009

How to build Gnash on Windows (Part I) UPDATE Oct 29, 2009


You have stumbled to this blog/guide so I assume the you know what Gnash is.

As I write this article, there's only Gnash 0.8.2 for Windows yet that version is months old from the latest build, which is 0.8.4.

With MinGW already installed on my Windows box, I wanted to build the latest version of Gnash.

I tried to look for some other guide on the net but there seem to be none or I'm just too lame to find one. So this will be my small documentation on building Gnash on Windows.

Part I
0. Updating MinGW
Gnash requires GNU Autoconf 2.61. And GStreamer requires Autopoint 0.17.

UPDATE: MinGW port of Autoconf 2.63 has been officially released, not sure if it works with Gnash, though.

1. Getting the source code
You can get the source from the official releases or from its Bazaar repository by typing:
bzr branch http://bzr.savannah.gnu.org/r/gnash/trunk

2. Downloading the dependencies

* Source to dependency files has been proven to be compatible to Gnash 0.8.4

3. Downloading NSPR

Gnash is using NSAPI that's why we need to build NSPR, and compiling NSPR requires NSINSTALL, yet there's no NSINSTALL from the MinGW. We have to get it from Mozilla Build. But it's 39MB and all we need is the nsinstall.exe. If I know how to compile nsinstall from source then I will let you know, but I don't. Now if you trust me, I am offering the same nsinstall.exe (14 KB) from Mozilla Build.

Extract nsinstall either from Mozilla Build (or from the link I gave you) to your MSYS bin directory. Then extract NSPR to MSYS home directory if you haven't already.

You are now ready to compile NSPR. Just type the following on MSYS console:
cd nspr*/m*/n*
configure
make
There'll be a dist directory which will contain three other directories (bin, include, and lib). Move all the content to root directory of MSYS (c:\msys\1.0\{here}).

If you are not having luck compiling NSPR, you might want to download a precompiled NSPR from my stash.

That's it for Part I, I'll have yet to know just how to prepare this dependencies in Part II.