Skip to content

development

Thorsten Otto edited this page Feb 7, 2018 · 2 revisions

ARAnyM Development

The process

  • Get the source code
  • Configure
  • Edit the source code
  • Build the binary
  • Run it
  • Debug it if it doesn't run
  • Document it if it runs fine
  • Release it

Note: steps 3-6 are to be repeated almost endlessly until you're satisfied with the result.

Getting the source code

ARAnyM as an Wiki Open-source Software makes its source code freely available through several "channels":

  • GIT (bleeding edge, unstable, might not even compile)
  • nightly builds (actually hourly GIT snapshots)
  • released source code archives (will compile, should be stable for running)

See WWW https://aranym.github.io/download.html for more information.

Note: if you fetch the source code from CVS you must run ''./autogen.sh'' in the top-level ARAnyM folder to create the ''configure'' script.

Configuring the project

Editing the source code

For editing ARAnyM's C++ source code you can use either your favorite plain text editor ([Wiki Editor_war]http://en.wikipedia.org/wiki/Editor_war)) or an Wiki IDE.

Recently I felt like I needed to improve my editing experience so I started looking around for other choices. In particular I have been missing a quick and easy way of switching between declaration and definition of an object, a way of showing who calls what and where i.e. references and call stack, perhaps even Wiki IntelliSense. What I have found so far is documented below.

VIM

I myself have been using Wiki Vi for editing everything since I first met it on Wiki SINIX in 1991, then switched to its improved variant Wiki Elvis and after its development stalled in 2003 I switched to the most iMproved VI clone: Wiki VIM. One of the major advantages of using such a great editor is that it's available on basically all platforms (I remember myself porting the Elvis to MiNT) so you can use it anywhere.

The following are just some notes I have collected when I realized that the IDEs are not that perfect :-)

Anjuta

Tried a very old Anjuta v1.2.4a (as is in Debian Etch).

Step-by-step guide for importing ARAnyM project (existing on your disk) into Anjuta:

  • click File -> Import Project...
  • [Browse] to select top level directory of ARAnyM, click [>Forward]
  • Project Type: select "Generic/Terminal project", click [>Forward]
  • Basic Information: fill in "Project Target" (aranym), select "Programming language" -> C++, click [>Forward]
  • Project Description: fill in something, click [>Forward]
  • Additional Options: click [>Forward]
  • Confirm: click [Apply]
  • "Build -> Autogenerate" will call autogen.sh
  • "Build -> Configure" will call configure (you can specify additional parameters like --enable-fullmmu)
  • "Build -> Build" will call make
  • "Build -> Execute" will run aranym

Eclipse + CDT

Tried Eclipse v3.3.1.1 with CDT 4.0.1 (the Europa release). Installed also autotools plugin v 0.9.5.2 from Red Hat available at http://sourceware.org/eclipse/autotools/

Step-by-step guide for importing ARAnyM project to Eclipse:

  • click File -> Import... in the main Eclipse menu
  • CVS -> Projects from CVS, click [Next>]
  • Checkout Project from CVS repository: select "Create a new repository location", click [Next>]
  • Enter Repository Location Information: fill in "Host" (cvs.sophics.cz), "Repository Path" (/var/repos), "User", "Password", "Connection type" (pserver), click [Next>]
  • Select module: fill in "Use specified module name" (aranym), click [Next>]
  • Check Out As: select "Check out as a project configured using the New Project Wizard", click [Next>]
  • Select Tag: HEAD, click [Finish]
  • New Project - Select a wizard: C++ -> GNU C++ Autotools Project, click [Next>]
  • Autotools C++ Project: fill in Project Name (aranym), click [Finish]

Sun Studio

I plan on trying out the recently released Sun Studio 12. They say it is pretty good (compared to previous version).

Compiling and linking

If not using any IDE then type the following command on your command prompt while you're in the top-level ARAnyM folder: make

For SMP (dual cores) try the following variant for faster compilation: make -j3

If VI/Elvis/VIM is started from the top-level folder then you can also type the following in the editor directly: :make

To build an universal binary on Mac OS X for PowerPC and Intel machines, there is a separarte Makefile below src/Unix/darwin/. It also takes care about autogen.sh/configure, as each architecture requires a separarte run. So if you're in the top-level ARAnyM folder do:

make```

If you're not interested in an universal binary but just want a binary for your machine, from the top-level folder as usual do a simple:
```make```


## Running ##
The following command typed in the top level folder in a bash shell will start ARAnyM
```./aranym```

A variant for MS-Windows is clicking on the ''aranym.exe'' with your left mouse's button.

Try some command line options, for example
```./aranym -N```
this way it will not steal (grab) your mouse and keyboard so if it hangs you can switch to another window and kill it (or attach the debugger and debug it).

## Debugging ##
I don't debug much so someone else will have to fill the void here.

## Documenting ##
Well...

## Packaging and releasing ##
I use my own script ''tools/export''. Rough, but does its job fine.

Uploading to sourceforge.net, writing release notes, announcing on
freshmeat.net, atari.org and elsewhere is then a manual process.

Clone this wiki locally