Experimental support for Symbian S60 3rd edition

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3064 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
gewlitys
2008-08-31 00:34:29 +00:00
parent 7310148db6
commit 50664a6f71
24 changed files with 939 additions and 60 deletions
+150 -31
View File
@@ -72,7 +72,7 @@ uqm_prepare_config()
MENU_main_ITEMS="debug graphics sound mikmod ovcodec netplay joystick \
ioformat accel threadlib"
case "$HOST_SYSTEM" in
Darwin)
Darwin|WINSCW|ARMV5)
# Installation directory not modifiable
;;
MINGW32*|cegcc)
@@ -133,35 +133,53 @@ uqm_prepare_config()
CHOICE_debug_OPTION_strictdebug_TITLE="Debug + strict compile checks"
CHOICE_debug_OPTION_strictdebug_ACTION='strictdebug_action'
strictdebug_action() {
CFLAGS="$CFLAGS -O1" # This is needed for -Wunitialized
CFLAGS="$CFLAGS -W -Wall \
-Wbad-function-cast -Wcast-qual -Wmissing-prototypes \
-Wstrict-prototypes -Wmissing-declarations \
-Wwrite-strings -Wimplicit -Wreturn-type -Wformat \
-Wswitch -Wcomment -Wchar-subscripts \
-Wparentheses -Wcast-align \
-Winline -Wuninitialized"
# CFLAGS="$CFLAGS -Waggregate-return"
# It's not unreasonable to return structs at times.
# CFLAGS="$CFLAGS "-Wpointer-arith"
# Some standard header won't even compile with this on
# CFLAGS="$CFLAGS -Wshadow"
# This gives absurd conflicts with standard files,
# like from 'y0 and y1'
# CFLAGS="$CFLAGS -Werror"
# We shouldn't do this until we actually nail them
# all in the original code. Then we can enforce them
# on ourselves.
# CFLAGS="$CFLAGS -pedantic-errors -ansi -trigraphs" # ANSI
# CFLAGS="$CFLAGS -Wnested-externs"
# We know they're in the code, and though we'd like to get
# rid of them, they're not bugs.
CFLAGS=`echo $CFLAGS`
# Remove all the unnecessary spaces from $CFLAGS,
# for more readable messages.
case "$HOST_SYSTEM" in
WINSCW)
CFLAGS="$CFLAGS -g -O0 -W all -d DEBUG -d _DEBUG"
;;
ARMV5)
CFLAGS="$CFLAGS -g -O0 -DDEBUG -D_DEBUG"
;;
*)
CFLAGS="$CFLAGS -O1" # This is needed for -Wunitialized
CFLAGS="$CFLAGS -W -Wall \
-Wbad-function-cast -Wcast-qual -Wmissing-prototypes \
-Wstrict-prototypes -Wmissing-declarations \
-Wwrite-strings -Wimplicit -Wreturn-type -Wformat \
-Wswitch -Wcomment -Wchar-subscripts \
-Wparentheses -Wcast-align \
-Winline -Wuninitialized"
# CFLAGS="$CFLAGS -Waggregate-return"
# It's not unreasonable to return structs at times.
# CFLAGS="$CFLAGS "-Wpointer-arith"
# Some standard header won't even compile with this on
# CFLAGS="$CFLAGS -Wshadow"
# This gives absurd conflicts with standard files,
# like from 'y0 and y1'
# CFLAGS="$CFLAGS -Werror"
# We shouldn't do this until we actually nail them
# all in the original code. Then we can enforce them
# on ourselves.
# CFLAGS="$CFLAGS -pedantic-errors -ansi -trigraphs" # ANSI
# CFLAGS="$CFLAGS -Wnested-externs"
# We know they're in the code, and though we'd like to get
# rid of them, they're not bugs.
CFLAGS=`echo $CFLAGS`
# Remove all the unnecessary spaces from $CFLAGS,
# for more readable messages.
;;
esac
DEBUG=1
}
CHOICE_debug_DEFAULT=debug
}
case "$HOST_SYSTEM" in
ARMV5|WINSCW)
CHOICE_debug_DEFAULT=nodebug
;;
*)
CHOICE_debug_DEFAULT=debug
;;
esac
CHOICE_graphics_OPTIONS="pure opengl"
CHOICE_graphics_TITLE="OpenGL graphics support"
@@ -253,7 +271,15 @@ uqm_prepare_config()
CFLAGS="$CFLAGS -DHAVE_JOYSTICK"
}
CHOICE_joystick_OPTION_disabled_TITLE="disabled"
CHOICE_joystick_DEFAULT=enabled
case "$HOST_SYSTEM" in
ARMV5|WINSCW)
CHOICE_joystick_DEFAULT=disabled
;;
*)
CHOICE_joystick_DEFAULT=enabled
;;
esac
CHOICE_netplay_OPTIONS="none full ipv4"
CHOICE_netplay_TITLE="Network Supermelee support"
@@ -438,7 +464,7 @@ uqm_post_build() {
RFORK="src/res/darwin/${BUILD_PROJECT}.r"
test -f "$TARGET_FILE" || return
# If run from the command-line on OSX, the Window Manager
# will refuse to recognize the window unless the program has
# a resource fork; so we give it a small one here. When
@@ -449,6 +475,20 @@ uqm_post_build() {
Darwin)
$REZ "$RFORK" -o "$TARGET_FILE"
;;
ARMV5)
cp "$TARGET_FILE" "$BUILD_EPOCROOT/epoc32/release/armv5/urel/"
cd src/symbian
cmd \\/C bldmake bldfiles armv5
cmd \\/C abld build armv5 urel
cd ../..
;;
WINSCW)
cp "$TARGET_FILE" "$BUILD_EPOCROOT/epoc32/release/winscw/udeb/"
cd src/symbian
cmd \\/C bldmake bldfiles winscw
cmd \\/C abld build winscw udeb
cd ../..
;;
esac
}
@@ -469,6 +509,12 @@ uqm_install() {
echo "No installation procedure available for Windows CE."
echo "Read the manual for more information."
;;
WINSCW)
uqm_install_winscw
;;
ARMV5)
uqm_install_armv5
;;
*)
generic_install
;;
@@ -543,11 +589,84 @@ uqm_install_osx() {
cp $uqm_NAME "$INSTROOT/MacOS/The Ur-Quan Masters"
}
uqm_install_winscw() {
local PRIVATE_DIR
PRIVATE_DIR="$BUILD_EPOCROOT/epoc32/winscw/c/private/A000A0C3"
uqm_create_symbian_content_package
echo "Creating directory structure to $PRIVATE_DIR ..."
mkdir "$PRIVATE_DIR"
mkdir "$PRIVATE_DIR/content"
mkdir "$PRIVATE_DIR/content/packages"
mkdir "$PRIVATE_DIR/userdata"
echo "Copying data to $PRIVATE_DIR ..."
cp content/version "$PRIVATE_DIR/content"
cp content.uqm "$PRIVATE_DIR/content/packages"
cp src/symbian/uqm.cfg "$PRIVATE_DIR/userdata"
}
uqm_install_armv5() {
uqm_create_symbian_content_package
cd src/symbian
cmd \\/C makekeys -cert -password asdfgh -len 2048 -dname "CN=UQM OR=Ur-Quan Masters CO=FI" uqm.key uqm.cer
cmd \\/C makesis uqm.pkg
cmd \\/C signsis -v uqm.sis uqm.sisx uqm.cer uqm.key asdfgh
mv uqm.sisx ../..
cd ../..
}
uqm_create_symbian_content_package() {
if [ -e "content.uqm" ]; then
echo "Content package already exists, skipping"
return
fi
echo "Creating content package..."
cd content
echo "Building file list..."
find . -type f -not -path '*/CVS*' -not -path '*/.svn*' -not -path './addons*' -not -name "version" >../content.lst
echo "Zipping..."
zip -q ../content.uqm -r . -i@../content.lst
cd ..
rm content.lst
}
uqm_clean() {
case "$HOST_SYSTEM" in
MINGW32*|CYGWIN*)
rm -f "$BUILD_WORK/config_win.h"
;;
ARMV5)
local TARGET_FILE
eval TARGET_FILE="\$BUILD_WORK/\${${BUILD_PROJECT}_NAME}"
rm -f "$BUILD_WORK/config_unix.h"
rm -f "$BUILD_EPOCROOT/epoc32/release/armv5/urel/$TARGET_FILE"
rm -f $TARGET_FILE uqm.sisx content.uqm
cd src/symbian
cmd \\/C abld reallyclean armv5
cmd \\/C bldmake clean
rm -f uqm.sis uqm.key uqm.cer
cd ../..
;;
WINSCW)
local TARGET_FILE
eval TARGET_FILE="\$BUILD_WORK/\${${BUILD_PROJECT}_NAME}"
rm -f "$BUILD_WORK/config_unix.h"
rm -f "$BUILD_EPOCROOT/epoc32/release/winscw/udeb/$TARGET_FILE"
rm -f $TARGET_FILE content.uqm
cd src/symbian
cmd \\/C abld reallyclean winscw
cmd \\/C bldmake clean
cd ../..
;;
*)
rm -f "$BUILD_WORK/config_unix.h"
;;