Skip to content

Commit

Permalink
replace old build script. redo README info for build script.
Browse files Browse the repository at this point in the history
  • Loading branch information
bricas committed Jan 3, 2013
1 parent 9f62e77 commit 1329158
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 34 deletions.
7 changes: 4 additions & 3 deletions README.md
Expand Up @@ -6,9 +6,6 @@ This is a complete rewrite of [AnsiLove/PHP](http://ansilove.sourceforge.net) in

AnsiLove/C is strictly using the `C99 standard` to achieve high portability to all major operating systems. It's developed from ground up with the vision to compile just fine on your platform. Be sure to link against `libgd` when compiling which is also needed when running the binary. Supported compilers are `GCC` and `Clang`, others may work but aren't tested. All files include the C standard headers. An exception is compilation on `Mac OS X`, where defines in the sources ensure importing `<Foundation/Foundation.h>`. In other words: on the Mac, the resulting binary is a Foundation tool. We use Mac OS X and Linux for AnsiLove/C development. You'll find a Xcode project file in this repository. Additional there's a shell script that builds AnsiLove/C on Ubuntu, it should compile on other distros as well. Feel free to fork and add custom build scripts for your own platform, [Homebrew](https://github.com/mxcl/homebrew) formulas, Linux packages, whatever.

# This is the patch for building on Ubuntu.
Use shbuild/build_ubuntu_fo_real.sh

# Why C?

There were many reasons, most notably PHP interpreter independence and performance. A solid C foundation is just perfect for creating libraries and frameworks and it can easily embedded into applications. We already mentioned portability. What else? We wanted evolution. AnsiLove/C should not be understood as a port. It takes many different approaches (like processing binary font dumps or generating @2x Retina images), it is overall improved and introduces new features. While results tend to be the same, the codebase does not have much in common with it's ancestor.
Expand All @@ -17,6 +14,10 @@ There were many reasons, most notably PHP interpreter independence and performan

If you're looking for something to implement into your Cocoa applications, we highly recommend taking a look at [AnsiLove.framework](https://github.com/ByteProject/AnsiLove.framework), which is actively maintained by [@ByteProject](https://github.com/ByteProject). It uses AnsiLove/C as rendering library and provides a Cocoa layer on top of it.

# Build script for Ubuntu

Use `shbuild/build_ubuntu.sh` to build AnsiLove/C on Ubuntu.

# Features

Rendering of all known ANSi / ASCII art file types:
Expand Down
17 changes: 13 additions & 4 deletions shbuild/build_ubuntu.sh
@@ -1,18 +1,27 @@
#!/bin/sh
#########################################################
# This UNIX script builds AnsiLove/C under Ubuntu Linux #
# and links it against libgd. #
# and links it against libgd. #
#########################################################
# modify alconfig.h to configure the resulting binary #
#########################################################
# build script version 1.1, created by Stefan Vogt #
# build script version 1.2, updated by h3rb gi11iland #
# originally created by Stefan Vogt #
#########################################################

echo "========================================="
echo "AnsiLove/C build script --> Ubuntu Linux "
echo "========================================="
echo "... building"
gcc -Wall -I../lib/MacOSX/libgd/include/ ../ansilove/main.c ../ansilove/alconfig.h ../ansilove/ansilove.h ../ansilove/ansilove.c ../ansilove/substr.h ../ansilove/substr.c ../ansilove/strtolower.h ../ansilove/strtolower.c ../ansilove/explode.h ../ansilove/explode.c ../ansilove/filesize.h ../ansilove/filesize.c ../ansilove/albinfonts.h ../ansilove/albinfonts.c /usr/lib/libgd.so.2 -o ansilove
echo "... done."
mkdir -p ../bin
gcc -Wall ../ansilove/main.c \
../ansilove/alconfig.h ../ansilove/ansilove.h ../ansilove/ansilove.c \
../ansilove/substr.h ../ansilove/substr.c ../ansilove/strtolower.h \
../ansilove/strtolower.c ../ansilove/explode.h ../ansilove/explode.c \
../ansilove/filesize.h ../ansilove/filesize.c ../ansilove/albinfonts.h \
../ansilove/albinfonts.c \
-lz -ljpeg -lpng -lfreetype -lm -lgd \
-o ../bin/ansilove
echo "... done. Get on with that looooove!"

exit
27 changes: 0 additions & 27 deletions shbuild/build_ubuntu_fo_real.sh

This file was deleted.

0 comments on commit 1329158

Please sign in to comment.