ONScripterビルドメモ
Makefileの作成
元からあったARMLinux(LinuxZaurus用)を、開発環境セットに入っている情報を見ながら弄る。
/usr/local/angstrom/arm/environment-setup
./configureがあるなら開発環境セットにあるpndconfigureのスクリプトで作れるらしいのだが、成功した試しなし……。
念のため、コンパイル前にsetprjでonscripterを指定している。
Makefile.ARMLinux
# -*- Makefile -*-
#
# Makefile.ARMLinux - Makefile rules for linux on Zaurus
#
PREF=/usr/local/angstrom/arm
INCS = `sdl-config --cflags` `freetype-config --cflags` -I/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/include/SDL
LIBS = `$(PREF)/bin/sdl-config --libs` -lSDL -lSDL_ttf -lSDL_image -lSDL_mixer -lbz2 -lfreetype -lmad -ljpeg -lm -lvorbisidec -ldl -lz -lpng
DEFS = -DLINUX -DPDA_AUTOSIZE -DBPP16 -DMP3_MAD -DUSE_OGG_VORBIS -DINTEGER_OGG_VORBIS
EXESUFFIX =
OBJSUFFIX = .o
.SUFFIXES:
.SUFFIXES: $(OBJSUFFIX) .cpp .h
CC=arm-angstrom-linux-gnueabi-g++
LD=arm-angstrom-linux-gnueabi-g++ -L/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/lib -Wl,-rpath,/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/lib -o
CFLAGS=-O3 -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize -ffast-math -fsingle-precision-constant -fsigned-char -Wall -fno-exceptions -fno-rtti -fno-check-new -fomit-frame-pointer -c $(INCS) $(DEFS)
RM = rm -f
TARGET = onscripter$(EXESUFFIX) sarconv$(EXESUFFIX) nsaconv$(EXESUFFIX)
EXT_OBJS =
include Makefile.onscripter
ソースファイルの修正
どうもパスが通ってないようなので自力でパスを通す。
</usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/include/SDL/SDL.h>
</usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/include/SDL/SDL_image.h>
</usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/include/SDL/SDL_ttf.h>
</usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/include/SDL/SDL_mixer.h>
*
おまけの起動スクリプト
#!/bin/sh
HOME=`pwd`
OPTS=""
DIR=`zenity --file-selection --directory= --title=GameDir`
[ $? = 0 ] || exit 1
FONT=`ls /usr/share/fonts/truetype | zenity --list --radiolist --column=check --column="Font"`
[ $? = 0 ] || exit 1
DISP=`zenity --list --title "SelectDisplayMode" \
--column "" --column "Display Mode" \
1 "window" \
2 "fullscreen"`
[ $? = 0 ] || exit 1
case "$DISP" in
1) OPTS="$OPTS --window" ;;
2) OPTS="$OPTS --fullscreen" ;;
esac
MODE=`zenity --list --title "SelectOption" --checklist --hide-column 2 \
--column "" --column dummy --column "options" \
false A "wide"\
false B "disable rescale"`
case "$MODE" in
*A*) OPTS="$OPTS --wide" ;;
*B*) OPTS="$OPTS --disable-rescale" ;;
esac
./onscripter $OPTS -f /usr/share/fonts/truetype/$FONT -r $DIR
[ $? = 0 ] || zenity --text-info --title="error" \
--filename /tmp/pndrun_onscripter.out > /dev/null
最終更新:2011年06月21日 22:34