In your source code the macro __SERIES60_30__ is defined, you can use this to create a portable code. Ok, lets start changing the code (this is the essential part of the source code change, you should ).
The most important change is in the function E32Dll, you must change it to E32Main:
#ifdef __SERIES60_30__
GLDEF_C TInt E32Main()
{
return EikStart::RunApplication( NewApplication );
}
# else
GLDEF_C TInt E32Dll( TDllReason )
{
return KErrNone;
}
#endif
but you must include this header:
#ifdef __SERIES60_30__
#include <eikstart .h>
#endif
Since we use different UIDs, use different constants:
#ifdef __SERIES60_30__
const TUid KUidS60BibleApp = {0xF0201077};
const TUid KUidS60BibleUi = {0xF0201079};
#else
const TUid KUidS60BibleApp = {0x10201077};
const TUid KUidS60BibleUi = {0x10201079};
#endif
If you use application path for storing data, like c:\\system\\apps\\s60bible\\data.txt, you must change it to \\private\\\\data.txt. This code will set iDataPath (defined as TFileName) on 1st, 2nd, and 3rd:
HBufC *appDll = HBufC::NewLC(KMaxFileName);*appDll = iDocument->Application()->AppFullName();
TParse parsa;
User::LeaveIfError(parsa.SetNoWild(*appDll, NULL, NULL));
#ifdef __SERIES60_30__
CEikonEnv::Static()->FsSession().PrivatePath(iDataPath);
#else
iDataPath = parsa.DriveAndPath();
// If the application is in ROM (drive Z:), put settings on C:
if ( (iDataPath[0] == ‘Z’) || (iDataPath[0] == ‘z’) ) {
iDataPath[0] = ‘C’;
}
#endif
Enable skin support:
On the ConstructL of your class:
#ifdef __SERIES60_30__
BaseConstructL(EAknEnableSkin);
#else
BaseConstructL();
#endif
