-
Notifications
You must be signed in to change notification settings - Fork 12
Building
Since the code is not exactly stable yet, we don't release binaries of wxWabbitemu. However, it shouldn't be hard to build it yourself! :)
Currently, the SVN code status is: Mostly stable - will build and run, but some features may cause wxWabbitemu to crash.
You need the following:
- A working C compiler. This includes, but is not limited to, GCC and Clang.
- The wxWidgets development files. Basically, the headers and linking libraries for wxWidgets. And of course, the wxWidgets library itself.
- The GNU Make program. This program will build wxWabbitemu for you. BSD make might work as well, but no guarantees.
In all of the commands that you are instructed to type in, you should follow each command with pressing the return key.
We try our best to provide instructions for all OSes... but we aren't perfect. If your OS isn't listed here, it's likely that you are using a derivative - hence the "and friends". Find your base OS name, and then follow the instructions there.
This part is a work in progress - if you have any fixes, suggestions, screenshots, or even new guides for new OSes, please tell us!
Update your sources, and update your packages! In a terminal type:
sudo apt-get update && sudo apt-get upgrade
Reboot if necessary.
Then open a terminal again (if you rebooted), and install the GNU Compiler Collection (GCC and friends), the needed GNU Make program, and the wxWidgets development files and library by typing this in:
sudo apt-get install build-essential libwxgtk2.8-dev
-
If you are using the GNOME Desktop (there's an Application menu on the top left of the screen) OR the XFCE Desktop:
Open the menu: System > Administration > Synaptic Package Manager.
Search for the packagesbuild-essential
andlibwxgtk2.8-dev
.
When it asks to install additional packages, accept.
Finally, click Apply Changes, and then confirm them. -
If you are using the KDE Desktop (there's a little "K" button on the bottom left of the screen):
This may not be accurate, since the writer doesn't have Kubuntu installed on his system...
Open the menu: K Menu->System->Adept (Package Manager)
Search for the packagesbuild-essential
andlibwxgtk2.8-dev
.
When it asks to install additional packages, accept.
Finally, click Apply Changes, and then confirm them.
Assuming everything went well, you are now ready to build!
Update your sources, and update your packages! In a terminal type:
su -c "yum update"
Reboot if necessary.
Then open a terminal again (if you rebooted), and install the GNU Compiler Collection (GCC and friends), the needed GNU Make program, and the wxWidgets development files and library by typing this in:
su -c "yum install gcc gcc-c++ make wxGTK wxGTK-devel"
Update your sources, and update your packages! In a terminal type:
sudo zypper patch && sudo zypper update
Reboot if necessary.
Then open a terminal again (if you rebooted), and install the GNU Compiler Collection (GCC and friends), the needed GNU Make program, and the wxWidgets development files and library by typing this in:
sudo zypper install gcc make wxWidgets wxWidgets-devel
In a terminal type:
git clone https://github.com/alberthdev/wxwabbitemu.git
cd wxwabbitemu/
make
To run it, type, in the same directory:
bin/wxwabbitemu
Note, though, that wxwabbitemu is a portable file and it can be copied to anywhere in your computer and ran from any location.
We hope you enjoy wxWabbitemu! Should it fail to do something, or crash, please help us by reporting bugs in our [issue tracker] (https://github.com/alberthdev/wxwabbitemu/issues).
Continue reading below only if you are interesting in messing around with the code.
So you think you can hack? (Or, you know you want to hack, and you wish to know how?) Continue reading!
We use a shiny new build system called [Premake] (http://industriousone.com/premake). Actually, it's more of a Makefile
/IDE project generator for developers to use so that the end users (like you!) can build our programs easier. (Hence why we have pregenerated Makefile
s in build/
...)
Nevertheless, we know that there are some audacious people out there! Therefore, we'll tell you a bit about this system so that you can play and hack away!
There are two important files in the premake/
directory.
premake4.lua
: This file is the most important file for generating Makefile
s and project files. It contains all of the project settings - what files to build, compiler flags and defines, include directories, etc.
use_wxwidgets.lua
: This file is the second most important file for generating Makefile
s and project files. This contains wxWidgets specific compiler settings that allows us to build with wxWidgets without too much pain! This is referenced by premake4.lua
.
There are two other files in the premake/
directory: premake4
and premake4_linux_x86
. The former is a symbolic link (shortcut in Windows terms) to the latter, which is a precompiled binary of Premake 4.3 for users running x86 (32 bit) Linux.
Makefile
and create_makefile.sh
are Linux-specific tools that performs the default, dynamic library detection configuration for creating the Makefiles. This should only be used for "default" (e.g. released to users by default) source - if you want to customize the options in Premake yourself, avoid using these files.
If you are interested in adding or removing source files, you must modify the premake4.lua
file, and then regenerate the Makefiles.
Run the following:
./premake4 clean
./premake4 gmake
You can also generate files for other IDEs, like Code::Blocks and Visual Studio. They can also be generated for other platforms, like Windows, Mac, and even the PS3 and XBOX 360! (OK, that's going too far...)
The syntax for these files, as you probably have guessed, is 100% Lua. We recommend reading the tutorial and API from the [Premake website] (http://industriousone.com/premake) before modifying anything!
Note that Premake does NOT check for dependencies - it assumes that the target user has them. (Actually, it doesn't even do that - the functionality is just to create project files, not automate the build process for the user.)
The code is (barely) organized into a set of folders. Here's a breakdown of the files and folders:
Folders:
build
: folder where building occurs and Makefiles are generated.
core
: main CPU emulation code
debugger
: debugger code, where disassembly occurs. Also some GUI code for the debugger are located here.
gui
: GUI code... but not all GUI code are located here.
hardware
: calculator specific code, linking code, LCD code, and key handling code can be found here.
interface
: code here links all of the main emulation into something cohesive for the GUI to... you know, interface with it.
premake
: Premake4 build config files
res
: images for debugger and misc.
utilities
: Misc. code for handling files. This includes some 3rd party libraries, like GIF handling.
Files:
makefile.old
: old Makefile used for building, deprecated in favor of using the Premake generated Makefiles
TODO.txt
: Todo list for this project... hasn't been updated for a while.
z.rom
: dummy ROM for testing
IMPLEMENTED.txt
: List of implemented features... not going to be used. (And too lazy to delete??)
README.txt
: Very informative README.
stdafx.h
: This is a VERY important file - it defines some types not found on Windows or in a GCC compiler environment. It also preserves the code's Window-ness with some hacky Windows definitions, both macro and variable.
That's it! Good luck hacking! :)
This is our personal TODO for this guide. You can help us make this TODO smaller by contributing in the comments!
- Add the Subversion package MUST DO
- Add more distros
- Add the GUI package managers
- Add screenshots (??)
We will be moving to automated build systems like Premake and CMake, so this guide will be updated accordingly.