Browse Source

* Fixed DOS driver.

* Added a build-dos script to cross-compile the DOS version using djgpp.
tags/v0.99.beta14
Sam Hocevar sam 19 years ago
parent
commit
73e689b2a3
5 changed files with 43 additions and 4 deletions
  1. +1
    -1
      Makefile.am
  2. +34
    -0
      build-dos
  3. +5
    -1
      caca/caca_internals.h
  4. +1
    -1
      caca/driver_conio.c
  5. +2
    -1
      cucul/cucul_internals.h

+ 1
- 1
Makefile.am View File

@@ -3,7 +3,7 @@
SUBDIRS = cucul caca src test doc SUBDIRS = cucul caca src test doc
DIST_SUBDIRS = $(SUBDIRS) autotools debian msvc DIST_SUBDIRS = $(SUBDIRS) autotools debian msvc


EXTRA_DIST = NOTES COPYING.LGPL bootstrap build-win32 caca-config.in libcaca.spec
EXTRA_DIST = NOTES COPYING.LGPL bootstrap build-dos build-win32 caca-config.in libcaca.spec
AUTOMAKE_OPTIONS = dist-bzip2 AUTOMAKE_OPTIONS = dist-bzip2


bin_SCRIPTS = caca-config bin_SCRIPTS = caca-config


+ 34
- 0
build-dos View File

@@ -0,0 +1,34 @@
#! /bin/sh

## DOS cross-compilation for libcaca -- Sam Hocevar <sam@zoy.org>
## $Id$

set -x
set -e

# Clean up our working directory
DIRNAME="libcaca-dos-`sed -ne '/^VERSION/s/[^0-9]*//p' Makefile`"
DESTDIR="`pwd`/${DIRNAME}"
rm -Rf "${DIRNAME}"
rm -f "${DIRNAME}.zip"
mkdir "${DIRNAME}"

# Build for DOS
./configure --host=i386-pc-msdosdjgpp --prefix=/ --bindir=/ --libdir=/ --disable-imlib2 --disable-doc
make pkglibdir=/lib pkgdatadir=/data

# Install into our private directory
make install DESTDIR="${DESTDIR}" pkglibdir=/lib pkgdatadir=/
i386-pc-msdosdjgpp-strip "${DESTDIR}/"*.exe
rm -Rf "${DESTDIR}/man"
rm -Rf "${DESTDIR}/include"
rm -f "${DESTDIR}/caca-config"
rm -f "${DESTDIR}/"*.a
mv "${DESTDIR}/share/doc/libcaca-dev/" "${DESTDIR}/doc"
rmdir "${DESTDIR}/share/doc"
rmdir "${DESTDIR}/share"

# Pack the directory
zip "${DIRNAME}.zip" `find "${DIRNAME}"`
rm -Rf "${DIRNAME}"


+ 5
- 1
caca/caca_internals.h View File

@@ -22,12 +22,16 @@


#if defined(HAVE_INTTYPES_H) || defined(_DOXYGEN_SKIP_ME) #if defined(HAVE_INTTYPES_H) || defined(_DOXYGEN_SKIP_ME)
# include <inttypes.h> # include <inttypes.h>
#else
#elif !defined(CUSTOM_INTTYPES)
# define CUSTOM_INTTYPES
typedef unsigned char uint8_t; typedef unsigned char uint8_t;
typedef unsigned short uint16_t; typedef unsigned short uint16_t;
typedef unsigned int uint32_t; typedef unsigned int uint32_t;
#endif #endif


#if defined(USE_CONIO)
# include <conio.h>
#endif
#if defined(USE_GL) #if defined(USE_GL)
# include <GL/glut.h> # include <GL/glut.h>
#endif #endif


+ 1
- 1
caca/driver_conio.c View File

@@ -69,7 +69,7 @@ static int conio_end_graphics(caca_t *kk)
_wscroll = 1; _wscroll = 1;
textcolor((enum COLORS)WHITE); textcolor((enum COLORS)WHITE);
textbackground((enum COLORS)BLACK); textbackground((enum COLORS)BLACK);
gotoxy(_caca_width, _caca_height);
gotoxy(kk->qq->width, kk->qq->height);
cputs("\r\n"); cputs("\r\n");
_setcursortype(_NORMALCURSOR); _setcursortype(_NORMALCURSOR);




+ 2
- 1
cucul/cucul_internals.h View File

@@ -22,7 +22,8 @@


#if defined(HAVE_INTTYPES_H) || defined(_DOXYGEN_SKIP_ME) #if defined(HAVE_INTTYPES_H) || defined(_DOXYGEN_SKIP_ME)
# include <inttypes.h> # include <inttypes.h>
#else
#elif !defined(CUSTOM_INTTYPES)
# define CUSTOM_INTTYPES
typedef unsigned char uint8_t; typedef unsigned char uint8_t;
typedef unsigned char uint16_t; typedef unsigned char uint16_t;
typedef unsigned int uint32_t; typedef unsigned int uint32_t;


Loading…
Cancel
Save