diff --git a/sc2/INSTALL.symbian b/sc2/INSTALL.symbian index 4bfffe58b..12010dba8 100644 --- a/sc2/INSTALL.symbian +++ b/sc2/INSTALL.symbian @@ -1,5 +1,5 @@ -UQM for Symbian S60 3rd ed. -=========================== +UQM for Symbian S60 3rd edition +=============================== First some general notes. These instructions might be somewhat incomplete or unclear. If you encounter any problems or have suggestions how to improve this @@ -18,9 +18,9 @@ Known problems: Prerequisites: -------------- -- Platform SDK for S60 3rd ed. (MR) / 3rd ed. FP1 / 3rd ed. FP2, depending on - target hardware +- Platform SDK for S60 3rd ed. * Download from http://www.forum.nokia.com/ + * 3rd ed. MR was used for development, FP1 and FP2 have not been tested - Open C plugins (if SDK is other than FP2; in FP2 those should be included already) * Download from http://www.forum.nokia.com/main/resources/tools_and_sdks/openc_cpp/ @@ -28,9 +28,9 @@ Prerequisites: - Carbide.c++ (if building for emulator) * Download from http://www.forum.nokia.com/ * Command line compiling must be enabled - -- ARM RealView compiler (if building for hardware) - * Commercial, see http://www.arm.com/products/DevTools/ + +- CSL ARM Toolchain or RVCT v2.2 (if building for hardware) + * GCCE included with SDK - MinGW and MSYS (for build scripts) * Download from http://www.mingw.org/ @@ -69,18 +69,18 @@ Building: Set BUILD_EPOCROOT to point to the substed drive: export BUILD_EPOCROOT=/z - Set BUILD_HOST to either WINSCW (emulator) or ARMV5 (hardware), depending + Set BUILD_HOST to WINSCW (emulator) or GCCE / ARMV5 (hardware), depending for which target you want to build: - export BUILD_HOST=ARMV5 + export BUILD_HOST=GCCE 8) Compile (you don't need to change any options from the interactive menu): ./build.sh uqm 9) Install. It builds the content zip and puts everything to proper - place (WINSCW) or creates a self-signed SIS package (ARMV5): + place (WINSCW) or creates a self-signed SIS package (GCCE / ARMV5): ./build.sh uqm install -10) If you built for ARMV5, you should now have uqm.sisx in the same directory - from where you did the build. Remember to also install SDL SIS package and - if not using FP2 SDK, Open C plugins before attempting to run UQM on actual - device. +10) If you built for GCCE or ARMV5, you should now have uqm.sisx in the same + directory from where you did the build. Remember to also install SDL SIS + package and if not using FP2 SDK, Open C plugins before attempting to run + UQM on actual device. diff --git a/sc2/Makefile.build b/sc2/Makefile.build index d03322edd..cdfe47cec 100644 --- a/sc2/Makefile.build +++ b/sc2/Makefile.build @@ -22,10 +22,14 @@ ifeq ($(HOST_SYSTEM),ARMV5) else ifeq ($(HOST_SYSTEM),WINSCW) include build/unix/make/buildtools-winscw +else +ifeq ($(HOST_SYSTEM),GCCE) + include build/unix/make/buildtools-gcce else include build/unix/make/buildtools-generic endif endif +endif default: diff --git a/sc2/Makeproject b/sc2/Makeproject index 93600df8a..d6c3ceeda 100644 --- a/sc2/Makeproject +++ b/sc2/Makeproject @@ -9,7 +9,7 @@ else uqm_NAME=uqm # File name of executable fi case "$HOST_SYSTEM" in - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) uqm_NAME="uqm.lib" ;; MINGW32*|CYGWIN*) diff --git a/sc2/build/unix/build.config b/sc2/build/unix/build.config index 53f0f2765..6102d21bb 100644 --- a/sc2/build/unix/build.config +++ b/sc2/build/unix/build.config @@ -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|WINSCW|ARMV5) + Darwin|WINSCW|ARMV5|GCCE) # Installation directory not modifiable ;; MINGW32*|cegcc) @@ -106,6 +106,9 @@ uqm_prepare_config() ;; ARMV5) CFLAGS="$CFLAGS -O3 -Otime -DNDEBUG" + ;; + GCCE) + CFLAGS="$CFLAGS -O3 -DNDEBUG" ;; *) CFLAGS="$CFLAGS -O3" @@ -120,9 +123,9 @@ uqm_prepare_config() WINSCW) CFLAGS="$CFLAGS -g -O0 -W all -d DEBUG -d _DEBUG" ;; - ARMV5) + ARMV5|GCCE) CFLAGS="$CFLAGS -g -O0 -DDEBUG -D_DEBUG" - ;; + ;; *) CFLAGS="$CFLAGS -g -O0 -W -Wall -DDEBUG" LDFLAGS="$LDFLAGS -O0" @@ -137,9 +140,9 @@ uqm_prepare_config() WINSCW) CFLAGS="$CFLAGS -g -O0 -W all -d DEBUG -d _DEBUG" ;; - ARMV5) + ARMV5|GCCE) CFLAGS="$CFLAGS -g -O0 -DDEBUG -D_DEBUG" - ;; + ;; *) CFLAGS="$CFLAGS -O1" # This is needed for -Wunitialized CFLAGS="$CFLAGS -W -Wall \ @@ -172,7 +175,7 @@ uqm_prepare_config() DEBUG=1 } case "$HOST_SYSTEM" in - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) CHOICE_debug_DEFAULT=nodebug ;; *) @@ -272,7 +275,7 @@ uqm_prepare_config() } CHOICE_joystick_OPTION_disabled_TITLE="disabled" case "$HOST_SYSTEM" in - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) CHOICE_joystick_DEFAULT=disabled ;; *) @@ -354,7 +357,7 @@ uqm_prepare_config() use_library pthread } case "$HOST_SYSTEM" in - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) CHOICE_threadlib_DEFAULT=pthread ;; *) @@ -478,17 +481,24 @@ uqm_post_build() { ARMV5) cp "$TARGET_FILE" "$BUILD_EPOCROOT/epoc32/release/armv5/urel/" cd src/symbian - cmd \\/C bldmake bldfiles armv5 + cmd \\/C bldmake bldfiles 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 bldmake bldfiles cmd \\/C abld build winscw udeb cd ../.. - ;; + ;; + GCCE) + cp "$TARGET_FILE" "$BUILD_EPOCROOT/epoc32/release/armv5/urel/" + cd src/symbian + cmd \\/C bldmake bldfiles + cmd \\/C abld build gcce urel + cd ../.. + ;; esac } @@ -515,6 +525,9 @@ uqm_install() { ARMV5) uqm_install_armv5 ;; + GCCE) + uqm_install_gcce + ;; *) generic_install ;; @@ -613,7 +626,18 @@ uqm_install_armv5() { 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 makesis uqm-armv5.pkg uqm.sis + cmd \\/C signsis -v uqm.sis uqm.sisx uqm.cer uqm.key asdfgh + mv uqm.sisx ../.. + cd ../.. +} + +uqm_install_gcce() { + 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-gcce.pkg uqm.sis cmd \\/C signsis -v uqm.sis uqm.sisx uqm.cer uqm.key asdfgh mv uqm.sisx ../.. cd ../.. @@ -640,7 +664,7 @@ uqm_clean() { MINGW32*|CYGWIN*) rm -f "$BUILD_WORK/config_win.h" ;; - ARMV5) + ARMV5|GCCE) local TARGET_FILE eval TARGET_FILE="\$BUILD_WORK/\${${BUILD_PROJECT}_NAME}" @@ -649,7 +673,7 @@ uqm_clean() { rm -f $TARGET_FILE uqm.sisx content.uqm cd src/symbian - cmd \\/C abld reallyclean armv5 + cmd \\/C abld reallyclean cmd \\/C bldmake clean rm -f uqm.sis uqm.key uqm.cer cd ../.. @@ -663,7 +687,7 @@ uqm_clean() { rm -f $TARGET_FILE content.uqm cd src/symbian - cmd \\/C abld reallyclean winscw + cmd \\/C abld reallyclean cmd \\/C bldmake clean cd ../.. ;; diff --git a/sc2/build/unix/config_functions b/sc2/build/unix/config_functions index d8334c138..3e4953aa2 100644 --- a/sc2/build/unix/config_functions +++ b/sc2/build/unix/config_functions @@ -1019,6 +1019,8 @@ set_host_system() { HOST_SYSTEM="WINSCW" ;; [Aa][Rr][Mm][Vv]5) HOST_SYSTEM="ARMV5" ;; + [Gg][Cc][Cc][Ee]) + HOST_SYSTEM="GCCE" ;; *) build_message "Warning: host type '$BUILD_HOST' unknown. Using defaults." ;; diff --git a/sc2/build/unix/config_proginfo_build b/sc2/build/unix/config_proginfo_build index d8328a704..59879f05c 100644 --- a/sc2/build/unix/config_proginfo_build +++ b/sc2/build/unix/config_proginfo_build @@ -117,6 +117,31 @@ case "$HOST_SYSTEM" in BUILDTOOL_LINK_COMMAND="\$PROG_armar_FILE $EXTRA_ARMV5_FLAGS_LINK" BUILDTOOL_LINK_DEPEND='armar' ;; + GCCE) + EXTRA_GCCE_FLAGS_COMPILE='-Wno-unknown-pragmas -march=armv5t -mapcs -pipe -nostdinc -msoft-float -D_UNICODE -D__GCCE__ -D__SYMBIAN32__ -D__SERIES60_30__ -D__SERIES60_3X__ -D__GCCE__ -D__EPOC32__ -D__MARM__ -D__EABI__ -D__MARM_ARMV5__ -D __REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__ -D__PRODUCT_INCLUDE__=\"/epoc32/include/variant/Symbian_OS_v9.1.hrh\" -x c -include $BUILD_EPOCROOT/EPOC32/INCLUDE/GCCE/GCCE.h -I$BUILD_EPOCROOT/epoc32/include -I$BUILD_EPOCROOT/epoc32/include/stdapis -I$BUILD_EPOCROOT/epoc32/include/variant' + EXTRA_GCCE_FLAGS_LINK='' + + BUILDTOOL_PREPROC_C_COMMAND="\$PROG_gcce_FILE -E $EXTRA_GCCE_FLAGS_COMPILE" + BUILDTOOL_PREPROC_C_DEPEND='gcce' + + BUILDTOOL_MKDEP_C_COMMAND="\$PROG_gcce_FILE -MM $EXTRA_GCCE_FLAGS_COMPILE" + BUILDTOOL_MKDEP_C_DEPEND='gcce' + + BUILDTOOL_COMPILE_C_COMMAND="\$PROG_gcce_FILE -c $EXTRA_GCCE_FLAGS_COMPILE" + BUILDTOOL_COMPILE_C_DEPEND='gcce' + + BUILDTOOL_PREPROC_OBJC_COMMAND="\$PROG_gcce_FILE -E" + BUILDTOOL_PREPROC_OBJC_DEPEND='gcce' + + BUILDTOOL_MKDEP_OBJC_COMMAND="\$PROG_gcce_FILE -MM" + BUILDTOOL_MKDEP_OBJC_DEPEND='gcce' + + BUILDTOOL_COMPILE_OBJC_COMMAND="\$PROG_gcce_FILE -c" + BUILDTOOL_COMPILE_OBJC_DEPEND='gcce' + + BUILDTOOL_LINK_COMMAND="\$PROG_gcce_FILE $EXTRA_GCCE_FLAGS_LINK" + BUILDTOOL_LINK_DEPEND='gcce' + ;; *) useGccBuildTools ;; @@ -271,6 +296,14 @@ PROG_armar_ACTION="" PROG_armar_VERSION='$(armar --vsn)' +### gcce ### +PROG_gcce_NAME="GNU C Compiler (CodeSourcery ARM)" +PROG_gcce_FILE="arm-none-symbianelf-gcc" +PROG_gcce_ACTION="" +PROG_gcce_VERSION='$(arm-none-symbianelf-gcc --version)' + + + ############################################################################## # Describe the libaries (possibly) used: # ############################################################################## diff --git a/sc2/build/unix/config_proginfo_host b/sc2/build/unix/config_proginfo_host index 3573ff2b6..b19e6b3e0 100644 --- a/sc2/build/unix/config_proginfo_host +++ b/sc2/build/unix/config_proginfo_host @@ -67,15 +67,17 @@ case "$HOST_SYSTEM" in gcc -E -include SDL/SDL_version.h $LIB_SDL_CFLAGS - | \ tail -1 | tr -d ' ') ;; - WINSCW) + WINSCW|GCCE) LIB_SDL_CFLAGS='-I$BUILD_EPOCROOT/epoc32/include/SDL' LIB_SDL_LDFLAGS='' LIB_SDL_VERSION='1.2.13' + LIB_SDL_DETECT="true" ;; ARMV5) LIB_SDL_CFLAGS='-J$BUILD_EPOCROOT/epoc32/include/SDL' LIB_SDL_LDFLAGS='' LIB_SDL_VERSION='1.2.13' + LIB_SDL_DETECT="true" ;; *) LIB_SDL_CFLAGS='$(sdl-config --cflags)' @@ -99,9 +101,10 @@ case "$HOST_SYSTEM" in LIB_SDL_image_CFLAGS='' LIB_SDL_image_LDFLAGS="-framework SDL_image" ;; - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) LIB_SDL_image_CFLAGS="$LIB_SDL_CFLAGS" LIB_SDL_image_LDFLAGS="$LIB_SDL_LDFLAGS" + LIB_SDL_image_DETECT="true" ;; *) LIB_SDL_image_CFLAGS="$LIB_SDL_CFLAGS" @@ -149,7 +152,7 @@ case "$HOST_SYSTEM" in LIB_opengl_CFLAGS="" LIB_opengl_LDFLAGS="-framework OpenGL" ;; - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) LIB_opengl_DETECT="false" ;; *) @@ -166,7 +169,7 @@ LIB_vorbis_CFLAGS="" LIB_vorbis_LDFLAGS="-lvorbis" LIB_vorbis_VERSION="" case "$HOST_SYSTEM" in - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) LIB_vorbis_DETECT="false" ;; esac @@ -198,7 +201,7 @@ case "$HOST_SYSTEM" in esac LIB_vorbisfile_VERSION="" case "$HOST_SYSTEM" in - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) LIB_vorbisfile_DETECT="false" ;; *) @@ -220,7 +223,7 @@ case "$HOST_SYSTEM" in LIB_tremor_CFLAGS="" LIB_tremor_LDFLAGS="-framework Tremor" ;; - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) LIB_tremor_DETECT="false" ;; *) @@ -237,7 +240,7 @@ LIB_libmikmod_CFLAGS="$(libmikmod-config --cflags)" LIB_libmikmod_LDFLAGS="$(libmikmod-config --libs)" LIB_libmikmod_VERSION="$(libmikmod-config --version)" case "$HOST_SYSTEM" in - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) LIB_libmikmod_DETECT="false" ;; esac @@ -250,7 +253,7 @@ case "$HOST_SYSTEM" in MINGW32*|CYGWIN*|cegcc) LIB_zlib_LDFLAGS="-lzdll" ;; - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) LIB_zlib_LDFLAGS="" ;; *) @@ -259,7 +262,7 @@ case "$HOST_SYSTEM" in esac LIB_zlib_VERSION="" case "$HOST_SYSTEM" in - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) LIB_zlib_DETECT="true" ;; *) @@ -283,7 +286,7 @@ case "$HOST_SYSTEM" in LIB_pthread_LDFLAGS="$(pthread-config --ldflags)" LIB_pthread_VERSION="$(pthread-config --version)" ;; - WINSCW|ARMV5) + WINSCW|ARMV5|GCCE) LIB_pthread_CFLAGS="" LIB_pthread_LDFLAGS="" LIB_pthread_VERSION="" @@ -304,7 +307,7 @@ case "$HOST_SYSTEM" in LIB_netlibs_LDFLAGS="-lsocket" LIB_netlibs_VERSION="" ;; - ARMV5|WINSCW) + ARMV5|WINSCW|GCCE) LIB_netlibs_DETECT="false" ;; esac diff --git a/sc2/build/unix/make/buildtools-gcce b/sc2/build/unix/make/buildtools-gcce new file mode 100644 index 000000000..2a5b6ca87 --- /dev/null +++ b/sc2/build/unix/make/buildtools-gcce @@ -0,0 +1,8 @@ +# Definitions for build tools for the makefile used by the UQM build system. +# This file defines the build commands for GCCE tools. + +include build/unix/make/buildtools-generic + +define act_link + arm-none-symbianelf-ar cr "$@" $^ $(LDFLAGS) +endef diff --git a/sc2/src/symbian/uqm.pkg b/sc2/src/symbian/uqm-armv5.pkg similarity index 100% rename from sc2/src/symbian/uqm.pkg rename to sc2/src/symbian/uqm-armv5.pkg diff --git a/sc2/src/symbian/uqm-gcce.pkg b/sc2/src/symbian/uqm-gcce.pkg new file mode 100644 index 000000000..1965e4bba --- /dev/null +++ b/sc2/src/symbian/uqm-gcce.pkg @@ -0,0 +1,26 @@ +;Language - standard language definitions +&EN + +; standard SIS file header +#{"Ur-Quan Masters"},(0xA000A0C3),1,0,0 + +;Localised Vendor name +%{"Interstellar Frungy League"} + +;Unique Vendor name +:"Interstellar Frungy League" + +;Supports Series 60 v 3.0 +[0x101F7961], 0, 0, 0, {"Series60ProductID"} + +*"uqm.key", "uqm.cer" + +;Files to install +; +"\Epoc32\release\gcce\urel\uqm.exe" - "!:\sys\bin\uqm.exe" +"\Epoc32\data\z\resource\apps\uqm.rsc" - "!:\resource\apps\uqm.rsc" +"\Epoc32\data\z\resource\apps\uqm_icon.mif" - "!:\resource\apps\uqm_icon.mif" +"\Epoc32\data\z\private\10003a3f\import\apps\uqm_reg.rsc" - "!:\private\10003a3f\import\apps\uqm_reg.rsc" +"uqm.cfg" - "c:\private\A000A0C3\userdata\uqm.cfg" +"..\..\content\version" - "c:\private\A000A0C3\content\version" +"..\..\content.uqm" - "c:\private\A000A0C3\content\packages\content.uqm" diff --git a/sc2/src/symbian/uqm.mmp b/sc2/src/symbian/uqm.mmp index 46b49ca93..117a97048 100644 --- a/sc2/src/symbian/uqm.mmp +++ b/sc2/src/symbian/uqm.mmp @@ -39,5 +39,5 @@ LIBRARY libm.lib LIBRARY libz.lib LIBRARY libpthread.lib -STATICLIBRARY SDL_image.lib STATICLIBRARY uqm.lib +STATICLIBRARY SDL_image.lib