Ticket #8941: scummvm-cibyl.patch

File scummvm-cibyl.patch, 22.1 KB (added by SF/simonkagstrom, 16 years ago)

Cibyl port to ScummVM

  • configure

     
    219219        return 0;
    220220}
    221221EOF
    222 
    223222if test -n "$_host"; then
    224223        # In cross-compiling mode, we cannot run the result
    225         eval "$1 $CXXFLAGS $LDFLAGS -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp" 2> /dev/null && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
     224        eval "$1 $CXXFLAGS $LDFLAGS -c -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp" 2> /dev/null && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
    226225else
    227226        eval "$1 $CXXFLAGS $LDFLAGS -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp" 2> /dev/null && eval "./tmp_cxx_compiler$EXEEXT 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
    228227fi
     
    813812        _host_os=iphone
    814813        _host_cpu=arm
    815814        ;;
     815j2me)
     816        _host_os=j2me
     817        _host_cpu=mips
     818        ;;
    816819neuros)
    817820        _host_os=linux
    818821        _host_cpu=arm
     
    10791082        amigaos*)
    10801083                # TODO: anything to be added here?
    10811084                ;;
     1085        j2me*)
     1086                # TODO: anything to be added here?
     1087                ;;
    10821088        # given this is a shell script assume some type of unix
    10831089        *)
    10841090                echo "WARNING: could not establish system type, assuming unix like"
     
    11861192                        _backend="iphone"
    11871193                        _build_hq_scalers="no"
    11881194                        ;;
     1195                j2me)
     1196                        echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
     1197                        DEFINES="$DEFINES -DJ2ME"
     1198                        _endian=big
     1199                        _need_memalign=yes
     1200                        type_1_byte='char'
     1201                        type_2_byte='short'
     1202                        type_4_byte='int'
     1203                        _backend="j2me"
     1204                        _mak_hq_scalers='DISABLE_HQ_SCALERS = 1'
     1205                        _build_hq_scalers="no"
     1206                        ;;
    11891207                *)
    11901208                        echo "Continuing with auto-detected values ... if you have problems, please add your target to configure."
    11911209                        ;;
     
    17311749                DEFINES="$DEFINES -DIPHONE_BACKEND"
    17321750                MODULES="$MODULES backends/platform/iphone"
    17331751                ;;
     1752        j2me)
     1753                CFLAGS="$CFLAGS -fno-exceptions -fno-rtti"
     1754                INCLUDES="-I$CIBYL_BASE/include -I$CIBYL_BASE/include/generated"
     1755                LDFLAGS="$LDFLAGS -L$CIBYL_BASE/libs/lib/ -EB -nostdlib --whole-archive --emit-relocs -T$CIBYL_BASE/build/linker.lds $CIBYL_BASE/libs/crt0.o"
     1756                LIBS="$LIBS -lc -ljava -ljsr075 -lcrt0 -lstdc++ -lsoftfloat -lm"
     1757                DEFINES="$DEFINES -DJ2ME_BACKEND"
     1758                MODULES="$MODULES backends/platform/j2me"
     1759                ;;
    17341760        *)
    17351761                echo "support for $_backend backend not implemented in configure script yet"
    17361762                exit 1
  • dists/j2me/scummvm.jad.templ

     
     1MIDlet-1: scummvm, , Main
     2MIDlet-Jar-URL: scummvm.jar
     3MIDlet-Name: ScummVM
     4MIDlet-Vendor: scummvm.org
     5MIDlet-Version: 1.0
     6MicroEdition-Configuration: CLDC-1.1
     7MicroEdition-Profile: MIDP-2.0
  • dists/j2me/MANIFEST.MF

     
     1MIDlet-1: scummvm, , Main
     2MIDlet-Name: ScummVM
     3MIDlet-Vendor: scummvm.org
     4MIDlet-Version: 1.0
     5MicroEdition-Configuration: CLDC-1.1
     6MicroEdition-Profile: MIDP-2.0
  • dists/j2me/Makefile

     
     1######################################################################
     2##
     3## Copyright (C) 2007,  Simon Kagstrom
     4##
     5## Filename:      Makefile
     6## Author:        Simon Kagstrom <simon.kagstrom@gmail.com>
     7## Description:   J2ME (Cibyl) Makefile
     8##
     9## $Id: $
     10##
     11######################################################################
     12RESOURCES=res/program.data.bin
     13TARGET   =scummvm.jar scummvm.jad
     14CIBYL_SYSCALL_SETS ?= resource_manager
     15
     16CIBYL_GENERATE_JAVA_WRAPPERS_OPTS=-D JSR075
     17CIBYL_CLASSPATH=$(WTK_PATH)/lib/jsr75.jar
     18CIBYL_MIPS2JAVA_OPTS +=-Iinclude
     19
     20all: c/program
     21
     22include $(CIBYL_BASE)/build/Rules-j2me.mk
     23
     24src/CibylConfig.java: CibylConfig.java
     25        cp $< $@
     26
     27c/program: ../../scummvm
     28        cp $< $@
  • common/str.cpp

     
    2828
    2929#include "common/memorypool.h"
    3030
    31 #if !defined(__SYMBIAN32__)
     31#if !defined(__SYMBIAN32__) && !defined(CIBYL)
    3232#include <new>
    3333#endif
    3434
  • common/scummsys.h

     
    375375        #define SCUMM_BIG_ENDIAN
    376376        #define SCUMM_NEED_ALIGNMENT
    377377
     378#elif defined(J2ME)
     379
     380        #define scumm_stricmp strcasecmp
     381        #define scumm_strnicmp strncasecmp
     382
     383        #define SCUMM_BIG_ENDIAN
     384        #define SCUMM_NEED_ALIGNMENT
     385
    378386#else
    379387        #error No system type defined
    380388
  • j2me-build/scummvm.jad.templ

     
     1MIDlet-1: scummvm, , Main
     2MIDlet-Jar-URL: scummvm.jar
     3MIDlet-Name: scummvm
     4MIDlet-Vendor: Unknown
     5MIDlet-Version: 1.0
     6MicroEdition-Configuration: CLDC-1.1
     7MicroEdition-Profile: MIDP-2.0
  • j2me-build/MANIFEST.MF

     
     1MIDlet-1: scummvm, , Main
     2MIDlet-Name: scummvm
     3MIDlet-Vendor: ScummVM team
     4MIDlet-Version: 1.0
     5MicroEdition-Configuration: CLDC-1.1
     6MicroEdition-Profile: MIDP-2.0
  • j2me.sh

     
     1#!/bin/sh
     2
     3export CC=mips-linux-gcc
     4export CXX=mips-linux-g++
     5export LD=$CC
     6export CXXFLAGS="-G0 -DCIBYL=1 -g -msoft-float -fno-optimize-sibling-calls -nostdinc -Wall -Wa,--no-warn -mips1 -mno-check-zero-division -O1 -fno-pic -mno-abicalls"
     7./configure --backend=j2me --host=j2me --disable-mt32emu --disable-scalers --disable-agos --disable-cine  --disable-scumm --disable-scumm-7-8 --disable-he --disable-gob --disable-kyra --disable-lure --disable-parallaction  --disable-queen --disable-saga  --disable-sky --disable-sword1  --disable-sword2 --disable-touche --disable-drascula --disable-tucker --disable-alsa --disable-vorbis --disable-tremor  --disable-mad --disable-flac --disable-zlib --disable-mpeg2 --disable-fluidsynth --disable-nasm   --enable-release
     8
     9# Compile with:
     10#   make scummvm.jar
     11
     12# Run with:
     13#   $WTK_PATH/bin/emulator -classpath $WTK_PATH/lib/cldcapi11.jar:$WTK_PATH/lib/midpapi20.jar:scummvm.jar: -Xdescriptor:scummvm.jad
  • backends/saves/default/default-saves.cpp

    Property changes on: j2me.sh
    ___________________________________________________________________
    Name: svn:executable
       + *
    
     
    118118        // compile because of this, please let us know (scummvm-devel or Fingolfin).
    119119        // There is a nicely portable workaround, too: Make this method overloadable.
    120120        if (remove(file.getPath().c_str()) != 0) {
    121 #ifndef _WIN32_WCE
     121#if !defined(_WIN32_WCE) && !defined(J2ME)
    122122                if (errno == EACCES)
    123123                        setError(Common::kWritePermissionDenied, "Search or write permission denied: "+file.getName());
    124124
  • backends/platform/j2me/module.mk

     
     1MODULE := backends/platform/j2me
     2
     3MODULE_OBJS := \
     4        j2me.o
     5
     6MODULE_DIRS += \
     7        backends/platform/j2me/
     8
     9# We don't use the rules.mk here on purpose
     10OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) $(OBJS)
  • backends/platform/j2me/j2me.cpp

     
     1/* ScummVM - Graphic Adventure Engine
     2 *
     3 * ScummVM is the legal property of its developers, whose names
     4 * are too numerous to list here. Please refer to the COPYRIGHT
     5 * file distributed with this source distribution.
     6 *
     7 * This program is free software; you can redistribute it and/or
     8 * modify it under the terms of the GNU General Public License
     9 * as published by the Free Software Foundation; either version 2
     10 * of the License, or (at your option) any later version.
     11
     12 * This program is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16
     17 * You should have received a copy of the GNU General Public License
     18 * along with this program; if not, write to the Free Software
     19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
     20 *
     21 * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/backends/platform/null/null.cpp $
     22 * $Id: null.cpp 28966 2007-09-19 08:40:12Z peres001 $
     23 *
     24 */
     25
     26#include "common/system.h"
     27#include "base/main.h"
     28
     29#if defined(J2ME_BACKEND)
     30
     31#include <java/lang.h>
     32#include <javax/microedition/lcdui.h>
     33#include <javax/microedition/lcdui/game.h>
     34
     35#include "common/rect.h"
     36
     37#include "backends/saves/default/default-saves.h"
     38#include "backends/timer/default/default-timer.h"
     39#include "sound/mixer_intern.h"
     40
     41//#include "backends/fs/cibyl/cibyl-fs-factory.h"
     42
     43class OSystem_J2ME : public OSystem {
     44protected:
     45        Common::SaveFileManager *_savefile;
     46        Audio::MixerImpl *_mixer;
     47        Common::TimerManager *_timer;
     48        FilesystemFactory *_fsFactory;
     49
     50        NOPH_GameCanvas_t gc;
     51
     52public:
     53
     54        OSystem_J2ME();
     55        virtual ~OSystem_J2ME();
     56
     57        virtual void initBackend();
     58
     59        virtual bool hasFeature(Feature f);
     60        virtual void setFeatureState(Feature f, bool enable);
     61        virtual bool getFeatureState(Feature f);
     62        virtual const GraphicsMode *getSupportedGraphicsModes() const;
     63        virtual int getDefaultGraphicsMode() const;
     64        bool setGraphicsMode(const char *name);
     65        virtual bool setGraphicsMode(int mode);
     66        virtual int getGraphicsMode() const;
     67        virtual void initSize(uint width, uint height);
     68        virtual int16 getHeight();
     69        virtual int16 getWidth();
     70        virtual void setPalette(const byte *colors, uint start, uint num);
     71        virtual void grabPalette(byte *colors, uint start, uint num);
     72        virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h);
     73        virtual void updateScreen();
     74        virtual Graphics::Surface *lockScreen();
     75        virtual void unlockScreen();
     76        virtual void setShakePos(int shakeOffset);
     77
     78        virtual void showOverlay();
     79        virtual void hideOverlay();
     80        virtual void clearOverlay();
     81        virtual void grabOverlay(OverlayColor *buf, int pitch);
     82        virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h);
     83        virtual int16 getOverlayHeight();
     84        virtual int16 getOverlayWidth();
     85        virtual Graphics::PixelFormat getOverlayFormat() const { return Graphics::createPixelFormat<565>(); }
     86
     87        virtual bool showMouse(bool visible);
     88
     89        virtual void warpMouse(int x, int y);
     90        virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, byte keycolor = 255, int cursorTargetScale = 1);
     91
     92        virtual bool pollEvent(Common::Event &event);
     93        virtual uint32 getMillis();
     94        virtual void delayMillis(uint msecs);
     95
     96        virtual MutexRef createMutex(void);
     97        virtual void lockMutex(MutexRef mutex);
     98        virtual void unlockMutex(MutexRef mutex);
     99        virtual void deleteMutex(MutexRef mutex);
     100
     101        typedef void (*SoundProc)(void *param, byte *buf, int len);
     102        virtual bool setSoundCallback(SoundProc proc, void *param);
     103
     104        virtual void quit();
     105
     106        virtual void setWindowCaption(const char *caption);
     107
     108        virtual Common::SaveFileManager *getSavefileManager();
     109        virtual Audio::Mixer *getMixer();
     110        virtual void getTimeAndDate(struct tm &t) const;
     111        virtual Common::TimerManager *getTimerManager();
     112        FilesystemFactory *getFilesystemFactory();
     113};
     114
     115static const OSystem::GraphicsMode s_supportedGraphicsModes[] = {
     116        {0, 0, 0}
     117};
     118
     119OSystem_J2ME::OSystem_J2ME() {
     120        _savefile = 0;
     121        _mixer = 0;
     122        _timer = 0;
     123        this->gc = NOPH_GameCanvas_get();
     124        //        _fsFactory = new CibylFilesystemFactory();
     125}
     126
     127OSystem_J2ME::~OSystem_J2ME() {
     128        delete _savefile;
     129        delete _mixer;
     130        delete _timer;
     131}
     132
     133void OSystem_J2ME::initBackend() {
     134        _savefile = new DefaultSaveFileManager();
     135        _mixer = new Audio::MixerImpl(this);
     136        _timer = new DefaultTimerManager();
     137
     138        OSystem::initBackend();
     139}
     140
     141bool OSystem_J2ME::hasFeature(Feature f) {
     142        return false;
     143}
     144
     145void OSystem_J2ME::setFeatureState(Feature f, bool enable) {
     146}
     147
     148bool OSystem_J2ME::getFeatureState(Feature f) {
     149        return false;
     150}
     151
     152const OSystem::GraphicsMode* OSystem_J2ME::getSupportedGraphicsModes() const {
     153        return s_supportedGraphicsModes;
     154}
     155
     156
     157int OSystem_J2ME::getDefaultGraphicsMode() const {
     158        return -1;
     159}
     160
     161bool OSystem_J2ME::setGraphicsMode(const char *mode) {
     162        return true;
     163}
     164
     165bool OSystem_J2ME::setGraphicsMode(int mode) {
     166        return true;
     167}
     168
     169int OSystem_J2ME::getGraphicsMode() const {
     170        return -1;
     171}
     172
     173void OSystem_J2ME::initSize(uint width, uint height) {
     174}
     175
     176int16 OSystem_J2ME::getHeight() {
     177        return 320;
     178}
     179
     180int16 OSystem_J2ME::getWidth() {
     181        return 200;
     182}
     183
     184void OSystem_J2ME::setPalette(const byte *colors, uint start, uint num) {
     185}
     186
     187void OSystem_J2ME::grabPalette(byte *colors, uint start, uint num) {
     188
     189}
     190
     191void OSystem_J2ME::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) {
     192}
     193
     194void OSystem_J2ME::updateScreen() {
     195}
     196
     197Graphics::Surface *OSystem_J2ME::lockScreen() {
     198        return 0;
     199}
     200
     201void OSystem_J2ME::unlockScreen() {
     202}
     203
     204void OSystem_J2ME::setShakePos(int shakeOffset) {
     205}
     206
     207void OSystem_J2ME::showOverlay() {
     208}
     209
     210void OSystem_J2ME::hideOverlay() {
     211}
     212
     213void OSystem_J2ME::clearOverlay() {
     214}
     215
     216void OSystem_J2ME::grabOverlay(OverlayColor *buf, int pitch) {
     217}
     218
     219void OSystem_J2ME::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) {
     220}
     221
     222int16 OSystem_J2ME::getOverlayHeight() {
     223        return getHeight();
     224}
     225
     226int16 OSystem_J2ME::getOverlayWidth() {
     227        return getWidth();
     228}
     229
     230bool OSystem_J2ME::showMouse(bool visible) {
     231        return true;
     232}
     233
     234void OSystem_J2ME::warpMouse(int x, int y) {
     235}
     236
     237void OSystem_J2ME::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, byte keycolor, int cursorTargetScale) {
     238}
     239
     240bool OSystem_J2ME::pollEvent(Common::Event &event) {
     241        return false;
     242}
     243
     244uint32 OSystem_J2ME::getMillis() {
     245        return NOPH_System_currentTimeMillis();
     246}
     247
     248void OSystem_J2ME::delayMillis(uint msecs) {
     249        NOPH_Thread_sleep(msecs);
     250}
     251
     252OSystem::MutexRef OSystem_J2ME::createMutex(void) {
     253        return NULL;
     254}
     255
     256void OSystem_J2ME::lockMutex(MutexRef mutex) {
     257}
     258
     259void OSystem_J2ME::unlockMutex(MutexRef mutex) {
     260}
     261
     262void OSystem_J2ME::deleteMutex(MutexRef mutex) {
     263}
     264
     265bool OSystem_J2ME::setSoundCallback(SoundProc proc, void *param) {
     266        return true;
     267}
     268
     269void OSystem_J2ME::quit() {
     270        exit(0);
     271}
     272
     273void OSystem_J2ME::setWindowCaption(const char *caption) {
     274}
     275
     276Common::SaveFileManager *OSystem_J2ME::getSavefileManager() {
     277        assert(_savefile);
     278        return _savefile;
     279}
     280
     281Audio::Mixer *OSystem_J2ME::getMixer() {
     282        assert(_mixer);
     283        return _mixer;
     284}
     285
     286Common::TimerManager *OSystem_J2ME::getTimerManager() {
     287        assert(_timer);
     288        return _timer;
     289}
     290
     291void OSystem_J2ME::getTimeAndDate(struct tm &t) const {
     292}
     293
     294FilesystemFactory *OSystem_J2ME::getFilesystemFactory() {
     295        return _fsFactory;
     296}
     297
     298OSystem *OSystem_J2ME_create() {
     299        return new OSystem_J2ME();
     300}
     301
     302int main(int argc, char *argv[]) {
     303        g_system = OSystem_J2ME_create();
     304        assert(g_system);
     305
     306        // Invoke the actual ScummVM main entry point:
     307        int res = scummvm_main(argc, argv);
     308        g_system->quit();       // TODO: Consider removing / replacing this!
     309        return res;
     310}
     311
     312#else /* USE_J2ME_DRIVER */
     313
     314OSystem *OSystem_J2ME_create() {
     315        return NULL;
     316}
     317
     318#endif
  • backends/fs/cibyl/cibyl-fs-factory.h

     
     1/* ScummVM - Graphic Adventure Engine
     2 *
     3 * ScummVM is the legal property of its developers, whose names
     4 * are too numerous to list here. Please refer to the COPYRIGHT
     5 * file distributed with this source distribution.
     6 *
     7 * This program is free software; you can redistribute it and/or
     8 * modify it under the terms of the GNU General Public License
     9 * as published by the Free Software Foundation; either version 2
     10 * of the License, or (at your option) any later version.
     11 *
     12 * This program is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with this program; if not, write to the Free Software
     19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
     20 *
     21 * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/backends/fs/cibyl/cibyl-fs-factory.h $
     22 */
     23
     24#ifndef CIBYL_FILESYSTEM_FACTORY_H
     25#define CIBYL_FILESYSTEM_FACTORY_H
     26
     27#include "common/singleton.h"
     28#include "backends/fs/fs-factory.h"
     29
     30/**
     31 * Creates CibylFilesystemNode objects.
     32 *
     33 * Parts of this class are documented in the base interface class, FilesystemFactory.
     34 */
     35class CibylFilesystemFactory : public FilesystemFactory, public Common::Singleton<CibylFilesystemFactory> {
     36public:
     37        typedef Common::String String;
     38
     39        virtual AbstractFilesystemNode *makeRootFileNode() const;
     40        virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
     41        virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const;
     42
     43protected:
     44        CibylFilesystemFactory() {};
     45
     46private:
     47        friend class Common::Singleton<SingletonBaseType>;
     48};
     49
     50#endif /*CIBYL_FILESYSTEM_FACTORY_H*/
  • backends/fs/cibyl/cibyl-fs-factory.cpp

     
     1/* ScummVM - Graphic Adventure Engine
     2 *
     3 * ScummVM is the legal property of its developers, whose names
     4 * are too numerous to list here. Please refer to the COPYRIGHT
     5 * file distributed with this source distribution.
     6 *
     7 * This program is free software; you can redistribute it and/or
     8 * modify it under the terms of the GNU General Public License
     9 * as published by the Free Software Foundation; either version 2
     10 * of the License, or (at your option) any later version.
     11 *
     12 * This program is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with this program; if not, write to the Free Software
     19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
     20 *
     21 * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/backends/fs/cibyl/cibyl-fs-factory.cpp $
     22 * $Id: cibyl-fs-factory.cpp 30957 2008-02-24 23:14:04Z fingolfin $
     23 */
     24
     25#if defined(CIBYL)
     26#include "backends/fs/cibyl/cibyl-fs-factory.h"
     27
     28DECLARE_SINGLETON(CibylFilesystemFactory);
     29
     30AbstractFilesystemNode *CibylFilesystemFactory::makeRootFileNode() const {
     31        return NULL;
     32}
     33
     34AbstractFilesystemNode *CibylFilesystemFactory::makeCurrentDirectoryFileNode() const {
     35        return NULL;
     36}
     37
     38AbstractFilesystemNode *CibylFilesystemFactory::makeFileNodePath(const String &path) const {
     39        return NULL;
     40}
     41#endif
  • base/commandLine.cpp

     
    768768        // environment variable. This is weaker than a --savepath on the
    769769        // command line, but overrides the default savepath, hence it is
    770770        // handled here, just before the command line gets parsed.
    771 #if !defined(MACOS_CARBON) && !defined(_WIN32_WCE) && !defined(PALMOS_MODE) && !defined(__GP32__)
     771#if !defined(MACOS_CARBON) && !defined(_WIN32_WCE) && !defined(PALMOS_MODE) && !defined(__GP32__) && !defined(J2ME)
    772772        if (!settings.contains("savepath")) {
    773773                const char *dir = getenv("SCUMMVM_SAVEPATH");
    774774                if (dir && *dir && strlen(dir) < MAXPATHLEN) {
  • ports.mk

     
    185185        cp $(srcdir)/README $(AOS4PATH)/README.txt
    186186        cp /sdk/local/documentation/SDL-1.2.9/README-SDL.txt $(AOS4PATH)
    187187
     188#
     189# J2ME (Cibyl) specific
     190#
     191scummvm.jar: $(OBJS)
     192        $(CXX) -L$(CIBYL_BASE)/libs/lib/ -EB -nostdlib --whole-archive -o scummvm.j2me $(OBJS) $(CIBYL_BASE)/libs/crt0.o -T$(CIBYL_BASE)/build/linker.lds --start-group -lcrt0 -lstdc++ -lc -ljava -ljsr075 -lsoftfloat -lm --end-group -o scummvm.elf
     193        $(CIBYL_BASE)/tools/cibyl-mips2java -d j2me-build/tmpclasses -I$(CIBYL_BASE)/include/generated/ scummvm.elf
     194        cp $(CIBYL_BASE)/java/CRunTime.java j2me-build/tmpclasses/
     195        cp $(CIBYL_BASE)/java/Main.java j2me-build/tmpclasses/
     196        cp $(CIBYL_BASE)/java/GameScreenCanvas.java j2me-build/tmpclasses/
     197        cp $(CIBYL_BASE)/java/CibylConfig.java j2me-build/tmpclasses/
     198        cp j2me-build/tmpclasses/program.data.bin j2me-build/res/
     199        $(JAVA_PATH)/javac -classpath j2me-build/tmpclasses/ -d j2me-build/tmpclasses/ -source 1.4 -bootclasspath $(WTK_PATH)/lib/cldcapi11.jar:$(WTK_PATH)/lib/midpapi20.jar j2me-build/tmpclasses/*.java
     200        $(WTK_PATH)/bin/preverify -classpath $(WTK_PATH)/lib/cldcapi11.jar:$(WTK_PATH)/lib/midpapi20.jar -d j2me-build/classes/ j2me-build/tmpclasses/
     201        $(JAVA_PATH)/jar cfm scummvm.jar j2me-build/MANIFEST.MF -C j2me-build/classes . -C j2me-build/res .
     202        cat j2me-build/scummvm.jad.templ > scummvm.jad
     203        echo -n "MIDlet-Jar-Size: " >> scummvm.jad
     204        wc -c scummvm.jar | cut -d ' ' -f -1 >> scummvm.jad
     205
     206
    188207.PHONY: deb bundle osxsnap win32dist install uninstall