diff options
author | Lars Persson | 2005-06-21 20:19:39 +0000 |
---|---|---|
committer | Lars Persson | 2005-06-21 20:19:39 +0000 |
commit | 7bded41f194331f309388afa5a30035927655f5d (patch) | |
tree | 394c4111912f6bb328ef0c0669aa4f7e9335fe11 /backends/epoc/build/S60 | |
parent | fd8c94a2f372e64593657b1d02776d208af62bd0 (diff) | |
download | scummvm-rg350-7bded41f194331f309388afa5a30035927655f5d.tar.gz scummvm-rg350-7bded41f194331f309388afa5a30035927655f5d.tar.bz2 scummvm-rg350-7bded41f194331f309388afa5a30035927655f5d.zip |
This is the submission of the Epoc/Symbian build files for
UIQ 2.1 UI
Series 60
Series 80
Series 90/Nokia 7710
There is a dependency on ESdl for these devices.
svn-id: r18427
Diffstat (limited to 'backends/epoc/build/S60')
-rw-r--r-- | backends/epoc/build/S60/BLD.INF | 12 | ||||
-rw-r--r-- | backends/epoc/build/S60/EScummVMS60.rss | 62 | ||||
-rw-r--r-- | backends/epoc/build/S60/EScummVM_080.pkg | 36 | ||||
-rw-r--r-- | backends/epoc/build/S60/EScummVM_S60.mmp | 113 | ||||
-rw-r--r-- | backends/epoc/build/S60/EScummVM_S60_App.mmp | 47 | ||||
-rw-r--r-- | backends/epoc/build/S60/ScummVMApp.cpp | 163 | ||||
-rw-r--r-- | backends/epoc/build/S60/ScummVMApp.h | 79 |
7 files changed, 512 insertions, 0 deletions
diff --git a/backends/epoc/build/S60/BLD.INF b/backends/epoc/build/S60/BLD.INF new file mode 100644 index 0000000000..25d2d236ca --- /dev/null +++ b/backends/epoc/build/S60/BLD.INF @@ -0,0 +1,12 @@ +PRJ_PLATFORMS +WINS ARMI // ARM4 THUMB + +PRJ_MMPFILES +..\scummvm_base.mmp +..\scummvm_scumm.mmp +..\scummvm_simon.mmp +..\scummvm_sky.mmp +..\scummvm_queen.mmp +..\scummvm_gob.mmp +.\EScummVM_S60.mmp +.\EScummVM_S60_App.mmp diff --git a/backends/epoc/build/S60/EScummVMS60.rss b/backends/epoc/build/S60/EScummVMS60.rss new file mode 100644 index 0000000000..0d1fe28bde --- /dev/null +++ b/backends/epoc/build/S60/EScummVMS60.rss @@ -0,0 +1,62 @@ +/* ScummVM - Scumm Interpreter + * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL + * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System + * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer + * Copyright (C) 2005 The ScummVM project + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Header: + */ + +// ScummVM.RSS + +NAME SCUM + +// Include definitions of resource STRUCTS used by this +// resource script +#include <eikon.rh> +#include "..\..\Scummvm.hrh" +// Include the standard Eikon resource ids +#include <eikon.rsg> + + +RESOURCE RSS_SIGNATURE + { + } + +RESOURCE TBUF16 { buf=""; } + +RESOURCE EIK_APP_INFO + { + menubar = r_scum_menubar; + } + +RESOURCE MENU_BAR r_scum_menubar // *** Menu bar +{ + titles = + { + MENU_TITLE { menu_pane = r_scum_menu; txt = "ScummVM"; } + }; +} + +RESOURCE MENU_PANE r_scum_menu // *** Submenu +{ + items = + { + + MENU_ITEM{command = EEikCmdExit;txt = "Exit";} + }; +} diff --git a/backends/epoc/build/S60/EScummVM_080.pkg b/backends/epoc/build/S60/EScummVM_080.pkg new file mode 100644 index 0000000000..51cb3e394c --- /dev/null +++ b/backends/epoc/build/S60/EScummVM_080.pkg @@ -0,0 +1,36 @@ +;;; +;;; EScummVM .PKG file for .SIS gegeration +;;; + +; Languages +;&EN + +; UID is the app's UID +#{"EScummVM S60"},(0x101f9b57),0,80,3 + +; Platform type +(0x101F6F88), 0, 0, 0, {"Series60ProductID"} + +; Signature +*"EScummVM.key","EScummVM.cer" + +; Application file Launcher and actual exe +"..\..\\epoc32\release\armi\urel\EScummVMS60.app"-"!:\system\apps\EScummVMS60\EScummVMS60.app" +"\epoc32\release\armi\urel\EScummVM.exe"-":\system\apps\EScummVMS60\EScummVM.exe" + +; AIF application information file +"\epoc32\data\z\system\apps\EScummVMS60\EScummVMS60.aif"-"!:\system\apps\EScummVMS60\EScummVMS60.aif" + +; Resource file +"\epoc32\data\z\system\apps\EScummVMS60\EScummVMS60.rsc"-"!:\system\apps\EScummVMS60\EScummVMS60.rsc" + +; Empty .placeholder file, ensures creation of c:\documents\EScummVM\ for future file saves +".placeholder"-"c:\documents\EScummVM\.placeholder" + +; Config/log files: 'empty' will automagically be removed on uninstall +""-"c:\documents\EScummVM\scummvm.ini",FN +""-"c:\documents\EScummVM\scummvm.stdout.txt",FN +""-"c:\documents\EScummVM\scummvm.stderr.txt",FN + +; This install layout will let you upgrade to newer versions wihout loss of scummvm.ini. +; It will remove the config file, std***.txt files & dirs on uninstall.
\ No newline at end of file diff --git a/backends/epoc/build/S60/EScummVM_S60.mmp b/backends/epoc/build/S60/EScummVM_S60.mmp new file mode 100644 index 0000000000..9fe8e1e9c7 --- /dev/null +++ b/backends/epoc/build/S60/EScummVM_S60.mmp @@ -0,0 +1,113 @@ +/* ScummVM - Scumm Interpreter + * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL + * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System + * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer + * Copyright (C) 2005 The ScummVM project + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Header: + */ + +// +// EPOC S60 MMP makefile project for ScummVM +// + +// *** Definitions + +#if defined(WINS) + TARGET EScummVM.dll +#else + TARGET EScummVM.exe +#endif +TARGETPATH system\apps\EScummVMs60 +TARGETTYPE EXEDLL + // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp +OPTION MSVC /QIfist /Ob1 /Oy /GF +//OPTION GCC -O3 -funroll-loops -finline-functions -ffast-math -frerun-loop-opt -fconserve-space -fexpensive-optimizations -Wno-multichar -Wno-reorder +sourcepath ..\ +EPOCSTACKSIZE 0x00008000 + +EPOCHEAPSIZE 1024 5242880 + +MACRO S60 +MACRO NONSTANDARD_PORT + +// these need too high a resolution +MACRO DISABLE_SWORD1 +MACRO DISABLE_SWORD2 +// these are not ready to be released +MACRO DISABLE_SAGA +MACRO DISABLE_KYRA +// these work, so don't disable them :) +//MACRO DISABLE_SIMON +//MACRO DISABLE_SKY +//MACRO DISABLE_QUEEN +//MACRO DISABLE_GOB + +// *** Static Libraries + +STATICLIBRARY scummvm_scumm.lib +STATICLIBRARY scummvm_simon.lib +STATICLIBRARY scummvm_sky.lib +STATICLIBRARY scummvm_queen.lib +STATICLIBRARY scummvm_gob.lib +STATICLIBRARY scummvm_base.lib + +STATICLIBRARY libmad.lib +STATICLIBRARY zlib.lib +STATICLIBRARY esdl.lib +#if !defined(WINS) +STATICLIBRARY egcc.lib // for __fixunsdfsi +#endif +// *** Include paths + +USERINCLUDE ..\..\..\.. ..\..\..\..\common ..\..\..\..\gui +USERINCLUDE ..\..\..\..\backends\fs ..\..\..\..\backends\epoc ..\..\..\..\backends\sdl ..\..\..\..\sound + +SYSTEMINCLUDE \epoc32\include\ESDL +SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version +SYSTEMINCLUDE \epoc32\include\libc +SYSTEMINCLUDE \epoc32\include +SYSTEMINCLUDE ..\..\..\..\backends\epoc // for portdefs.h + +// *** SOURCE files + +SOURCEPATH ..\..\..\.. + +//START_AUTO_OBJECTS_BASE_// Updated @ Tue May 31 18:35:38 2005 +SOURCE base\engine.cpp +SOURCE base\gameDetector.cpp +SOURCE base\main.cpp +SOURCE base\plugins.cpp +//STOP_AUTO_OBJECTS_BASE_// + +// backend EPOC/SDL/ESDL specific includes +SOURCE backends\sdl\events.cpp +SOURCE backends\sdl\graphics.cpp +SOURCE backends\sdl\sdl.cpp +SOURCE backends\fs\symbian\symbian-fs.cpp +SOURCE backends\epoc\SymbianOS.cpp +SOURCE backends\epoc\ScummApp.cpp + +// *** Dynamic Libraries + +LIBRARY cone.lib eikcore.lib +LIBRARY euser.lib apparc.lib fbscli.lib +LIBRARY estlib.lib apgrfx.lib +LIBRARY gdi.lib hal.lib bitgdi.lib +LIBRARY mediaclientaudiostream.lib efsrv.lib ws32.lib +LIBRARY AVKON.LIB + diff --git a/backends/epoc/build/S60/EScummVM_S60_App.mmp b/backends/epoc/build/S60/EScummVM_S60_App.mmp new file mode 100644 index 0000000000..0664320027 --- /dev/null +++ b/backends/epoc/build/S60/EScummVM_S60_App.mmp @@ -0,0 +1,47 @@ +/* ScummVM - Scumm Interpreter + * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL + * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System + * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer + * Copyright (C) 2005 The ScummVM project + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Header: + */ + +// +// MAKEFILE.MMP S60 ScummVM Launcher +// + +TARGET EScummVMS60.app +TARGETPATH system\apps\EScummVMS60 +TARGETTYPE app + +UID 0x100039ce 0x101f9b57 +RESOURCE ESCUMMVMS60.rss + +SOURCEPATH . +USERINCLUDE . +SYSTEMINCLUDE \epoc32\include \epoc32\include\libc + +// app source +SOURCE ScummVMApp.cpp +sourcepath .. +AIF EScummVmS60.Aif ..\ ScummVmAif.rss c16 ScummL.bmp ScummLM.bmp ScummS.bmp ScummSM.bmp // still fails? +// libraries +LIBRARY cone.lib EIKCORE.lib +LIBRARY euser.lib apparc.lib +LIBRARY efsrv.lib apgrfx.lib +LIBRARY avkon.lib
\ No newline at end of file diff --git a/backends/epoc/build/S60/ScummVMApp.cpp b/backends/epoc/build/S60/ScummVMApp.cpp new file mode 100644 index 0000000000..1702a88ba7 --- /dev/null +++ b/backends/epoc/build/S60/ScummVMApp.cpp @@ -0,0 +1,163 @@ +/* ScummVM - Scumm Interpreter + * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL + * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System + * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer + * Copyright (C) 2005 The ScummVM project + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Header$ + */ + +#include "ScummVMapp.h" +#include <escummvms60.rsg> +#include <apgcli.h> +#include <eikdll.h> + +EXPORT_C CApaApplication* NewApplication() { + return (new CScummVM); +} + +CScummVM::CScummVM() { +} + +CScummVM::~CScummVM() { +} + +CApaDocument* CScummVM::CreateDocumentL() +{ + return new (ELeave) CScummVMDoc(*this); +} + +TUid CScummVM::AppDllUid() const +{ + return TUid::Uid(0x101f9b57); +} + +CScummVMDoc::CScummVMDoc(CEikApplication& aApp):CAknDocument(aApp) { +} + +CScummVMDoc::~CScummVMDoc() { +} + +CEikAppUi* CScummVMDoc::CreateAppUiL() { + return new (ELeave) CScummVMUi; +} + +void CScummVMUi::HandleForegroundEventL(TBool aForeground) { + if(aForeground) { + BringUpEmulatorL(); + } +} + +CScummVMUi::CScummVMUi() { +} + +CScummVMUi::~CScummVMUi() { + if(iWatcher) { + iThreadWatch.LogonCancel(iWatcher->iStatus); + iWatcher->Cancel(); + } + delete iWatcher; + + iThreadWatch.Close(); +} + +void CScummVMUi::ConstructL() { + BaseConstructL(); + TBuf<128> startFile; + startFile = iEikonEnv->EikAppUi()->Application()->AppFullName(); + TParse parser; + parser.Set(startFile,NULL,NULL); + + startFile = parser.DriveAndPath(); +#ifndef __WINS__ + startFile.Append( _L("EScummVM.exe")); +#else + startFile.Append( _L("EScummVM.dll")); +#endif + CApaCommandLine* cmdLine=CApaCommandLine::NewLC(startFile); + RApaLsSession lsSession; + lsSession.Connect(); + CleanupClosePushL(lsSession); + lsSession.StartApp(*cmdLine,iThreadId); + CleanupStack::PopAndDestroy();//close lsSession + CleanupStack::PopAndDestroy(cmdLine); + + TApaTaskList taskList(iEikonEnv->WsSession()); + TApaTask myTask=taskList.FindApp(TUid::Uid(0x101f9b57)); + myTask.SendToBackground(); + TApaTask exeTask=taskList.FindByPos(0); + iExeWgId=exeTask.WgId(); + + if(iExeWgId == myTask.WgId()) { // Should n't be the same + Exit(); + } + if(iThreadWatch.Open(iThreadId)==KErrNone) { + iWatcher = new (ELeave)CScummWatcher; + iWatcher->iAppUi=this; + iThreadWatch.Logon(iWatcher->iStatus); + } +} + +CScummWatcher::CScummWatcher():CActive(EPriorityStandard) { + CActiveScheduler::Add(this); + iStatus=KRequestPending; + SetActive(); +} + +CScummWatcher::~CScummWatcher() { +} + +void CScummWatcher::DoCancel() { +} + +void CScummWatcher::RunL() { + iAppUi->HandleCommandL(EEikCmdExit); +} + +void CScummVMUi::BringUpEmulatorL() { + RThread thread; + if(thread.Open(iThreadId)==KErrNone) { + thread.Close(); + TApaTask apaTask(iEikonEnv->WsSession()); + apaTask.SetWgId(iExeWgId); + apaTask.BringToForeground(); + } + else + { + iExeWgId=-1; + } +} + +void CScummVMUi::HandleCommandL(TInt aCommand) { + switch(aCommand) { + case EEikCmdExit: + { + RThread thread; + if(thread.Open(iThreadId)==KErrNone) + { + thread.Terminate(0); + thread.Close(); + } + Exit(); + } + break; + } +} + +GLDEF_C TInt E32Dll(TDllReason) { + return KErrNone; +} diff --git a/backends/epoc/build/S60/ScummVMApp.h b/backends/epoc/build/S60/ScummVMApp.h new file mode 100644 index 0000000000..9cf8623835 --- /dev/null +++ b/backends/epoc/build/S60/ScummVMApp.h @@ -0,0 +1,79 @@ +/* ScummVM - Scumm Interpreter + * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL + * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System + * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer + * Copyright (C) 2005 The ScummVM project + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Header$ + */ + +#ifndef ScummVMapps60h +#define ScummVMapps60h + +#include <aknapp.h> +#include <eikapp.h> +#include <e32base.h> +#include <coecntrl.h> +#include <eikenv.h> +#include <coeview.h> +#include <eikappui.h> + +class CScummVM:public CEikApplication { +public: + CScummVM(); + ~CScummVM(); + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; +}; + + +#include <AKNdoc.h> + +class CScummVMDoc:public CAknDocument { +public: + ~CScummVMDoc(); + CEikAppUi* CreateAppUiL(); + void ConstructL(); + CScummVMDoc(CEikApplication& aApplicaiton); +}; + +#include <aknappui.h> +class CScummVMUi; +class CScummWatcher:public CActive { +public: + CScummWatcher(); + ~CScummWatcher(); + void DoCancel(); + void RunL(); + CScummVMUi* iAppUi; +}; + +class CScummVMUi:public CAknAppUi { +public: + CScummVMUi(); + ~CScummVMUi(); + void ConstructL(); + void HandleCommandL(TInt aCommand); + void HandleForegroundEventL(TBool aForeground); + void BringUpEmulatorL(); +private: + TThreadId iThreadId; + TInt iExeWgId; + RThread iThreadWatch; + CScummWatcher* iWatcher; +}; +#endif |