Revision: 201035 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 15 Sep 2010 12:20:42 +0300
branchRCL_3
changeset 73 79647526f98c
parent 70 e8965914fac7
child 81 42552535c1ac
Revision: 201035 Kit: 201036
appinstaller/AppMngr2/Widget/inc/appmngr2widgetappinfo.h
appinstaller/AppMngr2/Widget/inc/appmngr2widgetinfoiterator.h
appinstaller/AppMngr2/Widget/inc/appmngr2widgetruntime.h
appinstaller/AppMngr2/Widget/src/appmngr2widgetappinfo.cpp
appinstaller/AppMngr2/Widget/src/appmngr2widgetinfoiterator.cpp
appinstaller/AppMngr2/Widget/src/appmngr2widgetruntime.cpp
iaupdate/IAD/api/client/src/iaupdateclient.cpp
iaupdate/IAD/api/client/src/iaupdatemanager.cpp
iaupdate/IAD/group/bld.inf
iaupdate/IAD/swhandlerplugin/data/swhandlerplugin.rss
iaupdate/IAD/swhandlerplugin/group/bld.inf
iaupdate/IAD/swhandlerplugin/group/swhandlerplugin.mmp
iaupdate/IAD/swhandlerplugin/inc/swhandlerplugin.h
iaupdate/IAD/swhandlerplugin/inc/swhandlerplugin.hrh
iaupdate/IAD/swhandlerplugin/src/proxy.cpp
iaupdate/IAD/swhandlerplugin/src/swhandlerplugin.cpp
iaupdate/IAD/swhandlerplugin/tsrc/group/ut_swhandlerplugin.mmp
iaupdate/IAD/swhandlerplugin/tsrc/inc/ut_swhandlerplugin.h
iaupdate/IAD/swhandlerplugin/tsrc/src/dllmain.cpp
iaupdate/IAD/swhandlerplugin/tsrc/src/ut_swhandlerplugin.cpp
iaupdate/rom/iaupdate.iby
installationservices/swi/test/testexes/bld.inf
installationservices/swi/test/testexes/interpretsis_testcase/interpretsis_testcase_01.mmp
installationservices/swi/test/testexes/interpretsis_testcase/interpretsis_testcase_Main.cpp
installationservices/swi/test/testexes/packages_interpretsis_testcase/int_rominstall_01.pkg
installationservices/swi/test/testexes/packages_interpretsis_testcase/int_rominstall_02.pkg
installationservices/swi/test/testexes/packages_interpretsis_testcase/int_rominstall_03.pkg
installationservices/swi/test/testexes/packages_interpretsis_testcase/int_rominstall_04.pkg
installationservices/swi/test/testexes/packages_interpretsis_testcase/interpretsis_testcase.pkg
installationservices/swi/test/testexes/prepareexes.pl
installationservices/swi/test/tsisfile/data/test_system_drive.pkg
installationservices/switestfw/test/autotesting/testMakesis.pl
ncdengine/engine/transport/inc/catalogshttpstack.h
secureswitools/swisistools/group/bld.inf
secureswitools/swisistools/source/interpretsis/commandparser.cpp
secureswitools/swisistools/source/interpretsislib/configmanager.cpp
secureswitools/swisistools/source/interpretsislib/filedescription.cpp
secureswitools/swisistools/source/interpretsislib/installablefile.cpp
secureswitools/swisistools/source/interpretsislib/installablefile.h
secureswitools/swisistools/source/interpretsislib/installer.cpp
secureswitools/swisistools/source/interpretsislib/installer.h
secureswitools/swisistools/source/interpretsislib/interpretsis.cpp
secureswitools/swisistools/source/interpretsislib/parameterlist.h
secureswitools/swisistools/source/interpretsislib/sisfile.cpp
secureswitools/swisistools/source/interpretsislib/sisfile.h
secureswitools/swisistools/source/interpretsislib/sisregistry.cpp
secureswitools/swisistools/source/interpretsislib/sisregistry.h
secureswitools/swisistools/source/interpretsislib/stringutils.cpp
secureswitools/swisistools/source/signsislib/certificateinfo.cpp
secureswitools/swisistools/test/testmakesis/largelanguagecodes.pkg
secureswitools/swisistools/test/tinterpretsisinteg/scripts/ini.ini
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int-rominstall-09.script
secureswitools/swisistools/test/tinterpretsisinteg/scripts/int-rominstall-10.script
secureswitools/swisistools/test/tinterpretsisinteg/testinterpretsis.bat
secureswitools/swisistools/test/tinterpretsisinteg/testlist.xml
--- a/appinstaller/AppMngr2/Widget/inc/appmngr2widgetappinfo.h	Tue Sep 14 21:31:28 2010 +0300
+++ b/appinstaller/AppMngr2/Widget/inc/appmngr2widgetappinfo.h	Wed Sep 15 12:20:42 2010 +0300
@@ -35,6 +35,7 @@
 public:     // from CAppMngr2InfoBase
     TInt IconIndex() const;
     const TDesC& Name() const;
+    const TDesC& Version() const;
     const TDesC& Details() const;
     TBool SupportsGenericCommand( TInt aCmdId );
     void HandleCommandL( TInt aCommandId, TRequestStatus& aStatus );
@@ -51,6 +52,7 @@
 private:    // data
     TUid iWidgetUid;
     HBufC* iName;
+    HBufC* iVersion;
     HBufC* iDetails;
     SwiUI::RSWInstLauncher* iSWInstLauncher;
     HBufC8* iMimeType;
--- a/appinstaller/AppMngr2/Widget/inc/appmngr2widgetinfoiterator.h	Tue Sep 14 21:31:28 2010 +0300
+++ b/appinstaller/AppMngr2/Widget/inc/appmngr2widgetinfoiterator.h	Wed Sep 15 12:20:42 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -29,13 +29,15 @@
             TAppMngr2InfoType aInfoType );
     ~CAppMngr2WidgetInfoIterator();
 
-protected:  // new functions
-    void ConstructL();
+protected:  // from CAppMngr2InfoIterator
+    void SetAllFieldsL();
+    void SetVersionL();
     void SetOtherFieldsL();
 
 private:    // new functions
     CAppMngr2WidgetInfoIterator( CAppMngr2InfoBase& aWidget,
             TAppMngr2InfoType aInfoType );
+    void ConstructL();
     };
 
 #endif  // C_APPMNGR2WIDGETINFOITERATOR_H
--- a/appinstaller/AppMngr2/Widget/inc/appmngr2widgetruntime.h	Tue Sep 14 21:31:28 2010 +0300
+++ b/appinstaller/AppMngr2/Widget/inc/appmngr2widgetruntime.h	Wed Sep 15 12:20:42 2010 +0300
@@ -51,6 +51,7 @@
 
 public:     // new functions
     HBufC8* GetMimeTypeL( const TUid& aWidgetUid );
+    HBufC* GetVersionL( const TUid& aWidgetUid );
 
 private:    // new functions
     CAppMngr2WidgetRuntime( MAppMngr2RuntimeObserver& aObserver );
--- a/appinstaller/AppMngr2/Widget/src/appmngr2widgetappinfo.cpp	Tue Sep 14 21:31:28 2010 +0300
+++ b/appinstaller/AppMngr2/Widget/src/appmngr2widgetappinfo.cpp	Wed Sep 15 12:20:42 2010 +0300
@@ -48,6 +48,7 @@
     {
     CancelCommand();
     delete iName;
+    delete iVersion;
     delete iDetails;
     delete iMimeType;
     }
@@ -75,6 +76,19 @@
     }
 
 // ---------------------------------------------------------------------------
+// CAppMngr2WidgetAppInfo::Version()
+// ---------------------------------------------------------------------------
+//
+const TDesC& CAppMngr2WidgetAppInfo::Version() const
+    {
+    if( iVersion )
+        {
+        return *iVersion;
+        }
+    return KNullDesC;
+    }
+
+// ---------------------------------------------------------------------------
 // CAppMngr2WidgetAppInfo::Details()
 // ---------------------------------------------------------------------------
 //
@@ -188,6 +202,7 @@
 
     CAppMngr2WidgetRuntime& runtime( static_cast<CAppMngr2WidgetRuntime&>( Runtime() ) );
     iMimeType = runtime.GetMimeTypeL( iWidgetUid );
+    iVersion = runtime.GetVersionL( iWidgetUid );
     }
 
 // ---------------------------------------------------------------------------
--- a/appinstaller/AppMngr2/Widget/src/appmngr2widgetinfoiterator.cpp	Tue Sep 14 21:31:28 2010 +0300
+++ b/appinstaller/AppMngr2/Widget/src/appmngr2widgetinfoiterator.cpp	Wed Sep 15 12:20:42 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -48,12 +48,30 @@
     }
 
 // ---------------------------------------------------------------------------
-// CAppMngr2WidgetInfoIterator::ConstructL()
+// CAppMngr2WidgetInfoIterator::SetAllFieldsL()
 // ---------------------------------------------------------------------------
 //
-void CAppMngr2WidgetInfoIterator::ConstructL()
+void CAppMngr2WidgetInfoIterator::SetAllFieldsL()
     {
-    BaseConstructL();
+    SetFieldL( R_SWCOMMON_DETAIL_NAME, iInfo.Name() );
+    SetVersionL();
+    SetStatusL();
+    SetLocationL();
+    SetFieldL( R_SWCOMMON_DETAIL_APPSIZE, iInfo.Details() );
+    SetOtherFieldsL();
+    }
+
+// ---------------------------------------------------------------------------
+// CAppMngr2WidgetInfoIterator::SetVersionL()
+// ---------------------------------------------------------------------------
+//
+void CAppMngr2WidgetInfoIterator::SetVersionL()
+    {
+    CAppMngr2WidgetAppInfo* widgetInfo = reinterpret_cast<CAppMngr2WidgetAppInfo*>( &iInfo );
+    if( widgetInfo->Version().Length() )
+        {
+        SetFieldL( R_SWCOMMON_DETAIL_VERSION, widgetInfo->Version() );
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -78,3 +96,12 @@
     {
     }
 
+// ---------------------------------------------------------------------------
+// CAppMngr2WidgetInfoIterator::ConstructL()
+// ---------------------------------------------------------------------------
+//
+void CAppMngr2WidgetInfoIterator::ConstructL()
+    {
+    BaseConstructL();
+    }
+
--- a/appinstaller/AppMngr2/Widget/src/appmngr2widgetruntime.cpp	Tue Sep 14 21:31:28 2010 +0300
+++ b/appinstaller/AppMngr2/Widget/src/appmngr2widgetruntime.cpp	Wed Sep 15 12:20:42 2010 +0300
@@ -187,6 +187,25 @@
     }
 
 // ---------------------------------------------------------------------------
+// CAppMngr2WidgetRuntime::GetVersionL()
+// ---------------------------------------------------------------------------
+//
+HBufC* CAppMngr2WidgetRuntime::GetVersionL( const TUid& aWidgetUid )
+    {
+    HBufC* versionStr = NULL;
+    CWidgetPropertyValue* prop = iWidgetRegistry.GetWidgetPropertyValueL( aWidgetUid,
+        EBundleVersion );
+    if( prop )
+        {
+        CleanupStack::PushL( prop );
+        const TPtrC valuePtr( *prop );
+        versionStr = valuePtr.AllocL();
+        CleanupStack::PopAndDestroy( prop );
+        }
+    return versionStr;
+    }
+
+// ---------------------------------------------------------------------------
 // CAppMngr2WidgetRuntime::CAppMngr2WidgetRuntime()
 // ---------------------------------------------------------------------------
 //
--- a/iaupdate/IAD/api/client/src/iaupdateclient.cpp	Tue Sep 14 21:31:28 2010 +0300
+++ b/iaupdate/IAD/api/client/src/iaupdateclient.cpp	Wed Sep 15 12:20:42 2010 +0300
@@ -91,6 +91,10 @@
         {
         TRAP( error, StartNewAppToBackgroundL( ServiceUid(), aStatus ) );
         }
+    else
+        {
+        error = KErrAlreadyExists;
+        } 
     IAUPDATE_TRACE_1("[IAUPDATE] RIAUpdateClient::OpenToBackroundAsync() end error code: %d", error );
     return error;
     }
@@ -104,6 +108,10 @@
     {
     IAUPDATE_TRACE("[IAUPDATE] RIAUpdateClient::ConnectToApp() begin");
     TInt error( KErrNone );
+    if ( iConnected )
+        {
+        return error;
+        }
     TName serverName;
     ServerName(serverName, ServiceUid(), iDifferentiator);
     TRAP( error,ConnectExistingByNameL( serverName ) );
--- a/iaupdate/IAD/api/client/src/iaupdatemanager.cpp	Tue Sep 14 21:31:28 2010 +0300
+++ b/iaupdate/IAD/api/client/src/iaupdatemanager.cpp	Wed Sep 15 12:20:42 2010 +0300
@@ -387,7 +387,7 @@
     switch ( updateType )
         {
         case EIAUpdateStartServer:
-            if ( errorCode == KErrNone )
+            if ( errorCode == KErrNone || errorCode == KErrAlreadyExists )
                 {
                 CheckUpdatesContinue();            
                 }
--- a/iaupdate/IAD/group/bld.inf	Tue Sep 14 21:31:28 2010 +0300
+++ b/iaupdate/IAD/group/bld.inf	Wed Sep 15 12:20:42 2010 +0300
@@ -59,3 +59,6 @@
 
 // configurator
 #include "../configurator/group/bld.inf"
+
+// swhandlerplugin
+#include "../swhandlerplugin/group/bld.inf"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/swhandlerplugin/data/swhandlerplugin.rss	Wed Sep 15 12:20:42 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2010- Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <ecom/registryinfo.rh>
+#include "swhandlerplugin.hrh"
+
+RESOURCE REGISTRY_INFO theInfo
+    {
+    dll_uid = SW_HANDLER_PLUGIN_UID;
+    interfaces = 
+        {
+        INTERFACE_INFO
+            {
+            interface_uid = SCHEME_INTERFACE_DEF;
+            implementations = 
+                {
+                IMPLEMENTATION_INFO
+                    {
+                    implementation_uid = SW_HANDLER_PLUGIN_IMP;
+                    version_no = 1;
+                    display_name = "URL handler for sw:// scheme";
+                    default_data = "sw";
+                    opaque_data = "";
+                    }
+                };
+            }
+        };
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/swhandlerplugin/group/bld.inf	Wed Sep 15 12:20:42 2010 +0300
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2010- Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_MMPFILES
+swhandlerplugin.mmp
+#ifdef WINSCW
+//../tsrc/group/ut_swhandlerplugin.mmp
+#endif
+
+PRJ_EXPORTS
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/swhandlerplugin/group/swhandlerplugin.mmp	Wed Sep 15 12:20:42 2010 +0300
@@ -0,0 +1,45 @@
+/*
+* Copyright (c) 2010- Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <platform_paths.hrh>
+#include "../inc/swhandlerplugin.hrh"
+
+TARGET		  	swhandlerplugin.dll
+TARGETTYPE	  	PLUGIN
+UID			  	0x10009D8D SW_HANDLER_PLUGIN_UID
+
+VENDORID   VID_DEFAULT
+
+SOURCEPATH		../data
+START RESOURCE 	SW_HANDLER_PLUGIN_RSS_NAME
+END
+
+CAPABILITY  	CAP_ECOM_PLUGIN
+
+USERINCLUDE	 	../inc
+MW_LAYER_SYSTEMINCLUDE
+
+SOURCEPATH	  	../src
+
+SOURCE			proxy.cpp
+SOURCE			swhandlerplugin.cpp
+
+LIBRARY			euser.lib
+LIBRARY	    	ECOM.LIB
+LIBRARY     	apparc.lib      // MApaServerAppExitObserver
+LIBRARY         avkon.lib		// MAknServerAppExitObserver
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/swhandlerplugin/inc/swhandlerplugin.h	Wed Sep 15 12:20:42 2010 +0300
@@ -0,0 +1,70 @@
+/*
+* Copyright (c) 2010- Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef __SWHANDLERPLUGIN_H__
+#define __SWHANDLERPLUGIN_H__
+
+//  Include Files
+
+#include <e32base.h>	// CBase
+#include <schemehandler.h>
+#include <AknServerApp.h>
+
+//  Constants
+
+//  Class Definitions
+
+class CSwHandlerPlugin : public CSchemeHandler
+    {
+public:
+    // new functions
+    static CSwHandlerPlugin* NewL();
+    CSwHandlerPlugin();
+    ~CSwHandlerPlugin();
+
+public: // CSchemeHandler
+    
+    /**
+    * Url Handler with embedding
+    * @param -
+    */
+    virtual void HandleUrlEmbeddedL();
+
+    /**
+    * Url Handler without embedding
+    * @param -
+    */
+    virtual void HandleUrlStandaloneL();
+
+    /**
+    * Observer
+    * @param - aSchemeDoc
+    */
+    virtual void Observer( MAknServerAppExitObserver* aSchemeDoc );     
+    
+private:
+    void ConstructL();
+
+private: // data
+    /**
+     * Exit observer.
+     */
+    MAknServerAppExitObserver* iSchemeDoc; ///< Not owned.
+    };
+
+#endif  // __SWHANDLERPLUGIN_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/swhandlerplugin/inc/swhandlerplugin.hrh	Wed Sep 15 12:20:42 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010- Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef SW_HANDLER_PLUGIN_HRH
+#define SW_HANDLER_PLUGIN_HRH
+
+// ***************************************************************************
+// **  THIS FILE IS INCLUDED IN RESOURCES (.rss) AND PROJECT FILES (.mmp).  **
+// **                     ONLY MACROS ARE ALLOWED.                          **
+// ***************************************************************************
+
+// MACROS
+
+/// UID value for specific scheme handler dll.
+    #define SW_HANDLER_PLUGIN_UID         0x20031DF8
+    #define SW_HANDLER_PLUGIN_RSS_NAME    swhandlerplugin.rss
+
+/// Scheme handler interface definition Uid
+    #define SCHEME_INTERFACE_DEF          0x101f8534
+
+/// Implementation UID for specific scheme handler
+    #define SW_HANDLER_PLUGIN_IMP         0x20031DF9
+
+
+
+#endif // SW_HANDLER_PLUGIN_HRH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/swhandlerplugin/src/proxy.cpp	Wed Sep 15 12:20:42 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2010- Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <e32std.h>
+#include <ecom/implementationproxy.h>
+
+#include "swhandlerplugin.hrh"
+#include "swhandlerplugin.h"
+
+// Exported proxy for instantiation method resolution
+// Define the interface UIDs
+const TImplementationProxy ImplementationTable[] = 
+    {
+    IMPLEMENTATION_PROXY_ENTRY( SW_HANDLER_PLUGIN_IMP, CSwHandlerPlugin::NewL )
+    };
+
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
+    {
+    aTableCount = sizeof( ImplementationTable) / sizeof( TImplementationProxy );
+    return ImplementationTable;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/swhandlerplugin/src/swhandlerplugin.cpp	Wed Sep 15 12:20:42 2010 +0300
@@ -0,0 +1,116 @@
+/*
+* Copyright (c) 2010- Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+//  Include Files  
+#include "swhandlerplugin.h"	// CSwHandlerPlugin
+
+#include <ecom/ecom.h>
+#include <AknServerApp.h>
+#ifdef _DEBUG
+#include <e32debug.h>
+#endif
+
+// ================= MACROS =======================
+#ifdef _DEBUG
+#define LOG(str) {RDebug::Printf(str);}
+#define LOG1(str, a) {RDebug::Printf(str, a);}
+#else
+#define LOG(str)
+#define LOG1(str, a)
+#endif
+
+//  Member Functions
+
+CSwHandlerPlugin* CSwHandlerPlugin::NewL()
+    {
+    CSwHandlerPlugin* self = new (ELeave) CSwHandlerPlugin;
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CSwHandlerPlugin::CSwHandlerPlugin()
+// note, CBase initialises all member variables to zero
+    {
+    }
+
+void CSwHandlerPlugin::ConstructL()
+    {
+    // second phase constructor, anything that may leave must be constructed here
+    LOG("CSwHandlerPlugin::ConstructL()");
+    }
+
+CSwHandlerPlugin::~CSwHandlerPlugin()
+    {
+    }
+
+/**
+ * Url Handler with embedding
+ * @param -
+ */
+void CSwHandlerPlugin::HandleUrlEmbeddedL()
+    {
+    LOG("CSwHandlerPlugin::HandleUrlEmbeddedL()");
+    
+    HandleUrlStandaloneL();
+    }
+
+/**
+ * Url Handler without embedding
+ * @param -
+ */
+void CSwHandlerPlugin::HandleUrlStandaloneL()
+    {
+    LOG("CSwHandlerPlugin::HandleUrlStandaloneL()");
+    
+    _LIT(KIAUpdateLauncherExe, "iaupdatelauncher.exe");
+    _LIT(KEmptyDescriptor, "");
+
+    RProcess rProcess;
+    User::LeaveIfError(rProcess.Create(KIAUpdateLauncherExe,KEmptyDescriptor));
+    LOG("CSwHandlerPlugin::HandleUrlStandaloneL() >> Created rProcess");
+    
+    // start the process running! Don't forget this.
+    rProcess.Resume();
+    LOG("CSwHandlerPlugin::HandleUrlStandaloneL() >> Resumed process");
+
+    // free resources before returning
+    rProcess.Close();
+    LOG("CSwHandlerPlugin::HandleUrlStandaloneL() >> Closed rProcess (handle)");
+
+    if(iSchemeDoc)
+        {
+        LOG("CSwHandlerPlugin::HandleUrlStandaloneL() >> Calling HandlerServerAppExit for observer");
+        iSchemeDoc->HandleServerAppExit(KErrNone);
+        }
+    
+    LOG("CSwHandlerPlugin::HandleUrlStandaloneL() returning");
+    }
+
+/**
+ * Observer
+ * @param - aSchemeDoc
+ */
+void CSwHandlerPlugin::Observer(MAknServerAppExitObserver* aSchemeDoc)
+    {
+    LOG("CSwHandlerPlugin::Observer()");
+    
+    iSchemeDoc = aSchemeDoc;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/swhandlerplugin/tsrc/group/ut_swhandlerplugin.mmp	Wed Sep 15 12:20:42 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2010- Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include<platform_paths.hrh>
+#include<eunitcaps.h>
+
+// DEFINES
+#define         KMyUniqueUid3 0x20031E7A
+#define         KEUnitTestDllUid2 0x1000af5a
+
+// Build target
+TARGET          ut_swhandlerplugin.dll
+TARGETTYPE      dll
+UID             KEUnitTestDllUid2 KMyUniqueUid3
+
+CAPABILITY      EUNIT_CAPS
+VENDORID        VID_DEFAULT
+
+// Source files
+SOURCEPATH      ../src
+SOURCE          dllmain.cpp
+SOURCE          ut_swhandlerplugin.cpp
+
+// Code under test
+SOURCEPATH      ../../src
+SOURCE          swhandlerplugin.cpp
+
+// Include paths
+USERINCLUDE     . ../ ../inc ../../inc 
+
+MW_LAYER_SYSTEMINCLUDE
+
+// Dependencies to system components
+LIBRARY         euser.lib
+LIBRARY	        eunit.lib
+LIBRARY         ECOM.LIB
+LIBRARY         apparc.lib      // MApaServerAppExitObserver
+LIBRARY         avkon.lib       // MAknServerAppExitObserver
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/swhandlerplugin/tsrc/inc/ut_swhandlerplugin.h	Wed Sep 15 12:20:42 2010 +0300
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2010- Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef __UT_CSWHANDLERPLUGIN_H__
+#define __UT_CSWHANDLERPLUGIN_H__
+
+// INCLUDES
+#include <digia/eunit/ceunittestsuiteclass.h>
+#include <digia/eunit/eunitdecorators.h>
+
+#include "swhandlerplugin.h"
+
+// FORWARD DECLARATIONS
+
+
+// CLASS DEFINITION
+/**
+ * Generated EUnit test suite class.
+ */
+NONSHARABLE_CLASS( UT_CSwHandlerPlugin )
+	: public CEUnitTestSuiteClass
+    {
+    public:  // Constructors and destructor
+
+        static UT_CSwHandlerPlugin* NewL();
+        static UT_CSwHandlerPlugin* NewLC();
+        ~UT_CSwHandlerPlugin();
+
+    private: // Constructors
+
+        UT_CSwHandlerPlugin();
+        void ConstructL();
+
+    private: // New methods
+
+         void SetupL();
+        
+         void Teardown();
+        
+         void T_Global_HandleUrlEmbeddedLL();
+        
+         void T_Global_HandleUrlStandaloneLL();
+        
+         void T_Global_ObserverL();
+        
+
+    private: // Data
+
+        CSwHandlerPlugin* iCSwHandlerPlugin;
+
+        EUNIT_DECLARE_TEST_TABLE;
+
+    };
+
+#endif      //  __UT_CSWHANDLERPLUGIN_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/swhandlerplugin/tsrc/src/dllmain.cpp	Wed Sep 15 12:20:42 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2010- Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include <digia/eunit/ceunittestsuite.h>
+#include <ut_swhandlerplugin.h>
+
+/**
+ * UT_CSwHandlerPlugin.dll test suite factory function.
+ */
+EXPORT_C MEUnitTest* CreateTestSuiteL()
+	{
+	// In this example, a root suite is needed for holding the two suites
+	//with test cases. If there was only one suite with tests, that suite
+	//instance could be returned directly. (see the other examples)
+	CEUnitTestSuite* rootSuite = CEUnitTestSuite::NewLC(_L("Sw Handler Plugin Unit Tests"));
+
+	// Note that NewLC leaves the object in the cleanupstack.
+	rootSuite->AddL( UT_CSwHandlerPlugin::NewLC() );
+	CleanupStack::Pop();
+
+
+	CleanupStack::Pop( rootSuite );
+
+	return rootSuite;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/swhandlerplugin/tsrc/src/ut_swhandlerplugin.cpp	Wed Sep 15 12:20:42 2010 +0300
@@ -0,0 +1,145 @@
+/*
+* Copyright (c) 2010- Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include "ut_swhandlerplugin.h"
+#include <digia/eunit/eunitmacros.h>
+#include <digia/eunit/eunitdecorators.h>
+
+#include "swhandlerplugin.h"
+#include <AknServerApp.h>
+#include <e32def.h>
+
+NONSHARABLE_CLASS( UT_CSwHandlerPluginTestObserver ) : public MAknServerAppExitObserver
+    {
+public:
+    inline UT_CSwHandlerPluginTestObserver() { iObserverCalled = EFalse; iReason = 0; }
+    virtual void HandleServerAppExit(TInt aReason);
+    
+    inline TBool WasObserverCalled() const { return iObserverCalled; }
+    inline TInt Reason() const { return iReason; }
+private:
+    TBool iObserverCalled;
+    TInt iReason;
+    };
+
+void UT_CSwHandlerPluginTestObserver::HandleServerAppExit(TInt aReason)
+    {
+    iObserverCalled = ETrue;
+    iReason = aReason;
+    }
+
+// - Construction -----------------------------------------------------------
+
+UT_CSwHandlerPlugin* UT_CSwHandlerPlugin::NewL()
+    {
+    UT_CSwHandlerPlugin* self = UT_CSwHandlerPlugin::NewLC();
+    CleanupStack::Pop();
+    return self;
+    }
+
+UT_CSwHandlerPlugin* UT_CSwHandlerPlugin::NewLC()
+    {
+    UT_CSwHandlerPlugin* self = new( ELeave ) UT_CSwHandlerPlugin();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+UT_CSwHandlerPlugin::~UT_CSwHandlerPlugin()
+    {
+    }
+
+UT_CSwHandlerPlugin::UT_CSwHandlerPlugin()
+    {
+    }
+
+void UT_CSwHandlerPlugin::ConstructL()
+    {
+    CEUnitTestSuiteClass::ConstructL();
+    }
+
+// - Test methods -----------------------------------------------------------
+
+
+
+void UT_CSwHandlerPlugin::SetupL(  )
+    {
+    iCSwHandlerPlugin = CSwHandlerPlugin::NewL();
+    }
+    
+
+void UT_CSwHandlerPlugin::Teardown(  )
+    {
+    delete iCSwHandlerPlugin; 
+     iCSwHandlerPlugin = NULL; 
+    }
+    
+
+void UT_CSwHandlerPlugin::T_Global_HandleUrlEmbeddedLL(  )
+    {
+    EUNIT_ASSERT_NO_LEAVE(iCSwHandlerPlugin->HandleUrlEmbeddedL( ));
+    }
+    
+void UT_CSwHandlerPlugin::T_Global_HandleUrlStandaloneLL(  )
+    {
+    EUNIT_ASSERT_NO_LEAVE(iCSwHandlerPlugin->HandleUrlStandaloneL( ));
+    }
+    
+void UT_CSwHandlerPlugin::T_Global_ObserverL(  )
+    {
+    UT_CSwHandlerPluginTestObserver testObserver;
+    
+    iCSwHandlerPlugin->Observer(&testObserver);
+    
+    EUNIT_ASSERT_NO_LEAVE(iCSwHandlerPlugin->HandleUrlEmbeddedL());
+    
+    EUNIT_ASSERT( testObserver.WasObserverCalled());
+
+    EUNIT_ASSERT_EQUALS( KErrNone, testObserver.Reason() );
+    }
+    
+
+// - EUnit test table -------------------------------------------------------
+
+EUNIT_BEGIN_TEST_TABLE(
+    UT_CSwHandlerPlugin,
+    "Tests the Sw Handler Plugin which launches IAD client based on a URL scheme.",
+    "UNIT" )
+
+EUNIT_TEST(
+    "HandleUrlEmbeddedL - test0",
+    "CSwHandlerPlugin",
+    "HandleUrlEmbeddedL - test0",
+    "FUNCTIONALITY",
+    SetupL, T_Global_HandleUrlEmbeddedLL, Teardown)
+    
+EUNIT_TEST(
+    "HandleUrlStandaloneL - test1",
+    "CSwHandlerPlugin",
+    "HandleUrlStandaloneL - test1",
+    "FUNCTIONALITY",
+    SetupL, T_Global_HandleUrlStandaloneLL, Teardown)
+    
+EUNIT_TEST(
+    "Observer - test2",
+    "CSwHandlerPlugin",
+    "Observer - test2",
+    "FUNCTIONALITY",
+    SetupL, T_Global_ObserverL, Teardown)
+    
+
+EUNIT_END_TEST_TABLE
--- a/iaupdate/rom/iaupdate.iby	Tue Sep 14 21:31:28 2010 +0300
+++ b/iaupdate/rom/iaupdate.iby	Wed Sep 15 12:20:42 2010 +0300
@@ -41,6 +41,9 @@
 file=ABI_DIR\BUILD_DIR\iaupdatebg.exe            SHARED_LIB_DIR\iaupdatebg.exe 
 file=ABI_DIR\BUILD_DIR\iaupdatefwupdate.dll      SHARED_LIB_DIR\iaupdatefwupdate.dll
 
+ECOM_PLUGIN(swhandlerplugin.dll,swhandlerplugin.rsc)
+data=DATAZ_\RESOURCE_FILES_DIR\plugins\swhandlerplugin.rsc    RESOURCE_FILES_DIR\plugins\swhandlerplugin.rsc
+
 #ifdef _IMAGE_TYPE_RND
 data=ZPRIVATE\2000F85A\iaupdateengineconfig_testing.xml  PRIVATE\2000F85A\iaupdateengineconfig.xml
 #else
--- a/installationservices/swi/test/testexes/bld.inf	Tue Sep 14 21:31:28 2010 +0300
+++ b/installationservices/swi/test/testexes/bld.inf	Wed Sep 15 12:20:42 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -145,3 +145,4 @@
 
 non_stubbed_exe.mmp
 
+interpretsis_testcase/interpretsis_testcase_01.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/interpretsis_testcase/interpretsis_testcase_01.mmp	Wed Sep 15 12:20:42 2010 +0300
@@ -0,0 +1,28 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// using relative paths for sourcepath and user includes
+//
+
+TARGET        interpretsis_testcase_01.exe
+TARGETTYPE    exe
+UID           0x100039CE 0xE800005A
+VENDORID 	  0x70000001
+SOURCEPATH    .
+SOURCE        interpretsis_testcase_Main.cpp
+
+MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+LIBRARY       euser.lib
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/interpretsis_testcase/interpretsis_testcase_Main.cpp	Wed Sep 15 12:20:42 2010 +0300
@@ -0,0 +1,20 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Dummy application to generate exe file for interpretsis install testing.
+//
+
+int E32Main()
+	{
+	return 0;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages_interpretsis_testcase/int_rominstall_01.pkg	Wed Sep 15 12:20:42 2010 +0300
@@ -0,0 +1,34 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Install file for multi-lingual application
+; supporting two language variants.
+;
+
+; Languages - 
+&EN,GE
+
+; List of localised vendor names.
+%{"Nokia Software Ltd", "Nokia Software Ltd"}
+
+; Single, non-localised (global) vendor name.
+:"Nokia Software Ltd"
+
+; Installation header.
+; Two component names as we support English and German
+#{"Interpretsis_RomInstall", "Interpretsis_RomInstall1"}, (0x90000086), 1,0,0, Type=SA
+
+;Ordinary file to selected drive
+"osver.txt"-"!:\Documents\abc1.txt"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages_interpretsis_testcase/int_rominstall_02.pkg	Wed Sep 15 12:20:42 2010 +0300
@@ -0,0 +1,34 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Install file for multi-lingual application
+; supporting two language variants.
+;
+
+; Languages - 
+&EN,GE
+
+; List of localised vendor names.
+%{"Nokia Software Ltd", "Nokia Software Ltd"}
+
+; Single, non-localised (global) vendor name.
+:"Nokia Software Ltd"
+
+; Installation header.
+; Two component names as we support English and German
+#{"Interpretsis_RomInstall", "Interpretsis_RomInstall1"}, (0x80000086), 1,0,0, Type=SA, RU
+
+;Ordinary file to selected drive
+"osver.txt"-"!:\Documents\abc1.txt"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages_interpretsis_testcase/int_rominstall_03.pkg	Wed Sep 15 12:20:42 2010 +0300
@@ -0,0 +1,49 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Install file for multi-lingual application
+; supporting two language variants.
+;
+
+; Languages - 
+&EN,GE
+
+; List of localised vendor names.
+%{"Nokia Software Ltd", "Nokia Software Ltd"}
+
+; Single, non-localised (global) vendor name.
+:"Nokia Software Ltd"
+
+; Installation header.
+; Two component names as we support English and German
+#{"Interpretsis_RomInstall", "Interpretsis_RomInstall1"}, (0x80000086), 1,0,0, Type=SA
+
+;Ordinary file to selected drive
+"osver.txt"-"c:\Documents\abc1.txt"
+
+;Ordinary file to selected drive
+"osver.txt"-"$:\Documents\abc2.txt"
+
+;Ordinary file to selected drive
+"osver.txt"-"e:\Documents\abc3.txt"
+
+;Ordinary file to selected drive
+"osver.txt"-"x:\Documents\abc4.txt"
+
+;Ordinary file to selected drive
+"osver.txt"-"!:\Documents\abc5.txt"
+
+;Ordinary file to selected drive
+"osver.txt"-"z:\Documents\abc6.txt"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages_interpretsis_testcase/int_rominstall_04.pkg	Wed Sep 15 12:20:42 2010 +0300
@@ -0,0 +1,37 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Install file for multi-lingual application
+; supporting two language variants.
+;
+
+; Languages - 
+&EN,GE
+
+; List of localised vendor names.
+%{"Nokia Software Ltd", "Nokia Software Ltd"}
+
+; Single, non-localised (global) vendor name.
+:"Nokia Software Ltd"
+
+; Installation header.
+; Two component names as we support English and German
+#{"Interpretsis_RomInstall", "Interpretsis_RomInstall1"}, (0x90000086), 2,0,1, Type=SA
+
+;Ordinary file to selected drive
+"osver.txt"-"!:\Documents\abc7.txt"
+
+;Ordinary file to selected drive
+"osver.txt"-"c:\Documents\abc8.txt"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/testexes/packages_interpretsis_testcase/interpretsis_testcase.pkg	Wed Sep 15 12:20:42 2010 +0300
@@ -0,0 +1,39 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;
+; Install file for multi-lingual application
+; supporting two language variants.
+;
+
+; Languages - 
+&EN,GE
+
+; List of localised vendor names.
+%{"Symbian Software Ltd", "Symbian Software Ltd"}
+
+; Single, non-localised (global) vendor name.
+:"Symbian Software Ltd"
+
+; Installation header.
+; Two component names as we support English and German
+#{"interpretsis_eng_testcase", "interpretsis_german_testcase"}, (0xE8000097), 1,0,0
+
+; Language-neutral files to be installed
+"\epoc32\release\<PLATFORM>\<CONFIGURATION>\interpretsis_testcase_01.exe"-"!:\sys\bin\interpretsis_testcase_01.exe"
+
+; Lists of language-specific resource files, of which only those files will be installed
+; which are supported by the device. 
+
--- a/installationservices/swi/test/testexes/prepareexes.pl	Tue Sep 14 21:31:28 2010 +0300
+++ b/installationservices/swi/test/testexes/prepareexes.pl	Wed Sep 15 12:20:42 2010 +0300
@@ -801,6 +801,7 @@
 SignFileWithSpecifiedCert("int_nr_option_04.sis", "int_nr_option_04_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby);
 SignFileWithSpecifiedCert("int_nr_option_05.sis", "int_nr_option_05_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby);
 SignFileWithSpecifiedCert("sp_int_nr_option_06.sis", "sp_int_nr_option_06_sucert.sis", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby);
+SignFileWithSpecifiedCert("int_rominstall_02.sis", "int_rominstall_02.sisx", "tsisfile\\data\\signedsis\\sucert\\sucert.der", "tsisfile\\data\\signedsis\\sucert\\sucertkey.pem", \*iby);
 
 SignFile("romupgrademorecapsthansucert_sucert.sis", "romupgrademorecapsthansucert_sucert_root5.sis", "root5ca", \*iby);
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installationservices/swi/test/tsisfile/data/test_system_drive.pkg	Wed Sep 15 12:20:42 2010 +0300
@@ -0,0 +1,30 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; This test file tests is files are copied to system and extended drive
+
+;Languages
+&EN
+
+;Header
+#{"testsystemdrive"}, (0x800000FD), 1, 2, 3,TYPE=SA
+
+%{"Vendor"}
+:"Unique Vendor Name"
+
+"files\option1.txt"-"!:\Documents\InstTest\upgrade1.txt";
+"files\option1.txt"-"$:\Documents\InstTest\upgrade2.txt";
+"files\option1.txt"-"!:\Documents\InstTest\upgrade3.txt";
+"files\option1.txt"-"$:\Documents\InstTest\upgrade4.txt";
\ No newline at end of file
--- a/installationservices/switestfw/test/autotesting/testMakesis.pl	Tue Sep 14 21:31:28 2010 +0300
+++ b/installationservices/switestfw/test/autotesting/testMakesis.pl	Wed Sep 15 12:20:42 2010 +0300
@@ -1779,6 +1779,39 @@
 }
 
 #
+# New test code for DEF145101 - MakeSIS cannot handle package files that contain large (>1000) language codes.
+# 
+sub TestDEF145101 {
+
+	my $path = "/epoc32/winscw/c/tswi";
+	my $pkgfile = "$path/largelanguagecodes";
+	my $expectedResult = 0;
+
+	WriteLog("Test for DEF145101 - MakeSIS cannot handle package files that contain large (>1000) language codes.\n");
+	
+	# Do MAKESIS test
+	@retval = system("$makesisExeLocation $pkgfile.pkg $pkgfile-tmp.sis > $pkgfile.log");
+	
+	$logMsg = sprintf "Expected code:%5d   result Code:%5d\n", $expectedResult, $?;
+	WriteLog( $logMsg);
+
+	$NumberOfTests++;
+	
+	if( $? == $expectedResult ) {
+		$NumberOfPassed++;
+		WriteLog("Passed\n\n");
+	}
+	else {
+		$NumberOfFailed++;
+		WriteLog("Failed\n\n");
+	}
+
+	unlink("$pkgfile-tmp.sis");
+	unlink("$pkgfile.sis");
+	unlink("$pkgfile.log");
+}
+
+#
 # Main
 #
 # Create environment and control test flow to testing MAKESIS.EXE 
@@ -2914,6 +2947,11 @@
 TestInterpretsisReport();
 
 #
+# Test for DEF145101 - MakeSIS cannot handle package files that contain large (>1000) language codes.
+#
+TestDEF145101();
+
+#
 # These tests are very specific to windows OS only
 #
 #
--- a/ncdengine/engine/transport/inc/catalogshttpstack.h	Tue Sep 14 21:31:28 2010 +0300
+++ b/ncdengine/engine/transport/inc/catalogshttpstack.h	Wed Sep 15 12:20:42 2010 +0300
@@ -29,7 +29,7 @@
 
 
 // Constants
-const TInt KRequestTimeoutMicroseconds( 180000000 );
+const TInt KRequestTimeoutMicroseconds( 60000000 );
 
 // Forward declarations
 class RHTTPSession;
--- a/secureswitools/swisistools/group/bld.inf	Tue Sep 14 21:31:28 2010 +0300
+++ b/secureswitools/swisistools/group/bld.inf	Wed Sep 15 12:20:42 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 1999-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -110,6 +110,9 @@
 ../test/testmakesis/utf8.pkg /epoc32/winscw/c/tswi/utf8.pkg
 ../test/testmakesis/utf8.txt /epoc32/winscw/c/tswi/utf8.txt
 
+// file for testMakesis.pl to test 
+../test/testmakesis/largelanguagecodes.pkg /epoc32/winscw/c/tswi/largelanguagecodes.pkg
+
 // signsis
 ../test/tsignsis/largefile.zip									/epoc32/winscw/c/tswi/tsignsis/largefile.zip
 ../test/tsignsis/largedata.pkg								/epoc32/winscw/c/tswi/tsignsis/largedata.pkg
@@ -1546,6 +1549,8 @@
 ../test/tinterpretsisinteg/scripts/int_nr_option-37.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-37.script
 ../test/tinterpretsisinteg/scripts/int_nr_option-38.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-38.script
 ../test/tinterpretsisinteg/scripts/int_nr_option-39.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int_nr_option-39.script
+../test/tinterpretsisinteg/scripts/int-rominstall-09.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int-rominstall-09.script
+../test/tinterpretsisinteg/scripts/int-rominstall-10.script  /epoc32/winscw/c/tswi/tinterpretsisinteg/scripts/int-rominstall-10.script
 
 ../test/tinterpretsisinteg/preq2525-interpretsis-01/argumentfile.ini  /epoc32/winscw/c/tswi/tinterpretsisinteg/preq2525-interpretsis-01/argumentfile.ini
 ../test/tinterpretsisinteg/preq2525-interpretsis-02/argumentfile.ini  /epoc32/winscw/c/tswi/tinterpretsisinteg/preq2525-interpretsis-02/argumentfile.ini
--- a/secureswitools/swisistools/source/interpretsis/commandparser.cpp	Tue Sep 14 21:31:28 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsis/commandparser.cpp	Wed Sep 15 12:20:42 2010 +0300
@@ -523,9 +523,19 @@
 
 				char drive = tolower(*++optPtr);
 
-				if (drive < 'a' || drive > 'y')
+				if (drive < 'a' || drive > 'z')
 					throw CCommandParser::ECmdLineInvalidSISFileAttribute;
 
+				if(drive == 'z')
+					{
+					aParamList.SetFlag(CParameterList::EFlagsRomInstallSet);
+					sisFileName.iGenerateRomStub = true;
+					sisFileName.iNotRegister = true;
+					}
+				else
+					{
+					aParamList.SetFlag(CParameterList::EFlagsExtDriveSet);
+					}
 				// Set target drive
 				sisFileName.iTargetDrive = drive;
 
--- a/secureswitools/swisistools/source/interpretsislib/configmanager.cpp	Tue Sep 14 21:31:28 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/configmanager.cpp	Wed Sep 15 12:20:42 2010 +0300
@@ -203,12 +203,27 @@
 		CheckAndAddDrive(aParamList.SystemDriveLetter(), aParamList.SystemDrivePath());
 		}
 
-	if ( !IsTargetDrivePresent(aParamList.SystemDriveLetter()) )
+	if ((!IsTargetDrivePresent(aParamList.SystemDriveLetter())) && (!aParamList.IsFlagSet(CParameterList::EFlagsRomInstallSet)))
 		{
 		std::stringstream err;
 		err << "The directory representing the system drive is not defined";
 		throw ConfigManagerException( ConfigManagerException::ETypeDriveError, err.str());
 		}
+
+	if (!((aParamList.IsFlagSet(CParameterList::EFlagsCDriveSet)) ^ (aParamList.IsFlagSet(CParameterList::EFlagsRomInstallSet)))) 
+		{
+		std::stringstream err;
+		err << "The System Drive should not be defined for Installation to Rom Drive";
+		throw ConfigManagerException( ConfigManagerException::ETypeDriveError, err.str());
+		}
+	
+	if ((!aParamList.IsFlagSet(CParameterList::EFlagsCDriveSet)) && (aParamList.IsFlagSet(CParameterList::EFlagsExtDriveSet)))
+		{
+		std::stringstream err;
+		err << "The Extended Drive cannot be specified without -c (System drive) option.";
+		throw ConfigManagerException( ConfigManagerException::ETypeDriveError, err.str());
+		}
+
 	}
 
 
--- a/secureswitools/swisistools/source/interpretsislib/filedescription.cpp	Tue Sep 14 21:31:28 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/filedescription.cpp	Wed Sep 15 12:20:42 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -38,6 +38,10 @@
 	iIndex(aFile.FileIndex()),
 	iSid(aSid)
 {
+	if((L'z'==aTargetDrive) || (L'Z'==aTargetDrive))
+	{
+		iTarget[0]='z';
+	}	
 	const unsigned char* data = aFile.Hash().Blob().Data();
 	TUint32 len = aFile.Hash().Blob().Size();
 
--- a/secureswitools/swisistools/source/interpretsislib/installablefile.cpp	Tue Sep 14 21:31:28 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/installablefile.cpp	Wed Sep 15 12:20:42 2010 +0300
@@ -34,7 +34,8 @@
 
 
 // SA SIS files
-InstallableFile::InstallableFile(const CSISFileDescription& aFdes, const CSISFileData* aFdata, const std::wstring aDrivePath, int aInstallingDrive)
+InstallableFile::InstallableFile(const CSISFileDescription& aFdes, const CSISFileData* aFdata, const std::wstring aDrivePath, 
+									int aInstallingDrive, const int aSystemdrive, const bool aGenerateRomStub)
 : isExecutable(aFdata->IsExecutable()),
   isExe(aFdata->IsExe()),
   iSid(aFdata->GetSid()),
@@ -50,7 +51,7 @@
 	std::transform(iLocalTargetFile.begin(), iLocalTargetFile.end(), iLocalTargetFile.begin(), tolower);
 
 	// Update the installing file with the actual target drive letter
-	ChangeTargetDrive(aDrivePath, aInstallingDrive);
+	ChangeTargetDrive(aDrivePath, aInstallingDrive, aSystemdrive, aGenerateRomStub);
 
 	// warn the user if they are using a winscw emulator binary
 	if (aFdata->IsEmulatorExecutable())
@@ -59,7 +60,7 @@
 
 // PA SIS files		
 InstallableFile::InstallableFile(const CSISFileDescription& aFdes, const std::wstring aDrivePath,
-								 int aInstallingDrive)
+								 int aInstallingDrive, const int aSystemdrive, const bool aGenerateRomStub)
 : isExecutable(false),
   isExe(false),
   iSid(0),
@@ -75,7 +76,7 @@
 	std::transform(iLocalTargetFile.begin(), iLocalTargetFile.end(), iLocalTargetFile.begin(), tolower);
 
 	// Update the installing file with the actual target drive letter
-	ChangeTargetDrive(aDrivePath, aInstallingDrive);
+	ChangeTargetDrive(aDrivePath, aInstallingDrive, aSystemdrive, aGenerateRomStub);
 
 		// retrieve the file attributes e.g. exe, dll, SID etc.
 	const bool fileExists = FileExists( iLocalTargetFile );
@@ -116,8 +117,13 @@
 	delete iFileData;
 }
 
+void InstallableFile::SetTarget(const  std::wstring& aTargetFile)
+{
+	iTargetFile = aTargetFile;
+}
 
-void InstallableFile::ChangeTargetDrive(const std::wstring aDrivePath, int aInstallingDrive)
+void InstallableFile::ChangeTargetDrive(const std::wstring aDrivePath, int aInstallingDrive, 
+												const int aSystemdrive, const bool aGenerateRomStub)
 {
 	// get the local path
 	ConvertToLocalPath(iLocalTargetFile,aDrivePath);
@@ -132,9 +138,24 @@
 		int targetFileDrive = tolower(target[0]);
 		if (targetFileDrive != aInstallingDrive)
 		{
-			iTargetFile[0] = aInstallingDrive;
-			LINFO(L"Disregarding drive selection. Installing "
-				+ target + L" to " + iTargetFile);
+			if((iTargetFile[0] == '$') && !aGenerateRomStub)
+			{
+				//Creating tmpTarget so that '$' in iTargetFile is retained  and 
+				//can be used as a marker while File Copy to system drive and 
+				//not to LocalTargetPath
+				std::wstring tmpTarget(iTargetFile);
+				tmpTarget[0] = aSystemdrive;
+				
+				LINFO(L"Disregarding drive selection. Installing "
+					<< target.c_str() << L" to " << tmpTarget.c_str());
+			}
+			else
+			{
+				iTargetFile[0] = aInstallingDrive;
+				
+				LINFO(L"Disregarding drive selection. Installing "
+					<< target.c_str() << L" to " << iTargetFile.c_str());
+			}
 		}
 	}
 	else
--- a/secureswitools/swisistools/source/interpretsislib/installablefile.h	Tue Sep 14 21:31:28 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/installablefile.h	Wed Sep 15 12:20:42 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -39,10 +39,12 @@
 
 public:
 	// constructor for non stub files
-	InstallableFile(const CSISFileDescription&, const CSISFileData*, const std::wstring aDrivePath, int aInstallingDrive);
+	InstallableFile(const CSISFileDescription&, const CSISFileData*, const std::wstring aDrivePath,
+						int aInstallingDrive, const int aSystemdrive, const bool aGenerateRomStub);
 	
 	// constructor for stub files
-	InstallableFile(const CSISFileDescription&, const std::wstring aDrivePath, int aInstallingDrive);
+	InstallableFile(const CSISFileDescription&, const std::wstring aDrivePath, int aInstallingDrive, 
+						const int aSystemdrive, const bool aGenerateRomStub);
 	~InstallableFile();
 
 public:
@@ -53,10 +55,12 @@
 	const CSISFileDescription* FileDescription() const{ return iFileDescription;};
 	const CSISFileData* FileData() const{ return iFileData;};
 	const std::wstring& GetTarget() const { return iTargetFile; };
+	void SetTarget(const std::wstring& aTargetFile);
 	const std::wstring& GetLocalTarget() const { return iLocalTargetFile; };
 
 private:
-	void ChangeTargetDrive(const std::wstring aDrivePath, int aInstallingDrive);
+	void ChangeTargetDrive(const std::wstring aDrivePath, int aInstallingDrive, 
+									const int aSystemdrive, const bool aGenerateRomStub);
 
 private:
 	bool isExecutable;
--- a/secureswitools/swisistools/source/interpretsislib/installer.cpp	Tue Sep 14 21:31:28 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/installer.cpp	Wed Sep 15 12:20:42 2010 +0300
@@ -138,7 +138,8 @@
 				{
 					InstallSISFile sisFileName(shortName + KDirectorySeparator + *currStr, 
 												curr->iTargetDrive, curr->iGenerateStub, 
-												curr->iNonRemovable, curr->iReadOnly, curr->iNotRegister, curr->iSUFlag);
+												curr->iNonRemovable, curr->iReadOnly, curr->iNotRegister, 
+												curr->iSUFlag, curr->iGenerateRomStub);
 
 					sisFiles.push_back(sisFileName);
 				}
@@ -153,7 +154,8 @@
 				|| (shortName.find(L".sis",0) != std::wstring::npos))
 		{
 			InstallSISFile sisFileName(shortName, curr->iTargetDrive, curr->iGenerateStub, 
-										curr->iNonRemovable, curr->iReadOnly, curr->iNotRegister, curr->iSUFlag);
+										curr->iNonRemovable, curr->iReadOnly, curr->iNotRegister, 
+										curr->iSUFlag, curr->iGenerateRomStub);
 
 			sisFiles.push_back(sisFileName);
 		}
@@ -338,20 +340,21 @@
 		return MISSING_DEPENDENCY;
 	}
 
-	if (!IsValidUpgrade(file, aInstallSISFile.iSUFlag, aInstallSISFile.iNonRemovable))
+	if (!IsValidUpgrade(file, aInstallSISFile.iSUFlag, aInstallSISFile.iNonRemovable, aInstallSISFile.iGenerateRomStub))
 	{
 		return INVALID_UPGRADE;
 	}
 
 	InstallableFiles installable;
-	GetInstallableFiles(file, installable, *iExpressionEvaluator, aInstallSISFile.iTargetDrive);
+	GetInstallableFiles(file, installable, *iExpressionEvaluator, aInstallSISFile.iTargetDrive, 
+									iParamList.SystemDriveLetter(), aInstallSISFile.iGenerateRomStub);
 
 	// Uninstall the same package (if found) prior to any installation
-	UninstallPkg(file);
+	UninstallPkg(file, aInstallSISFile.iGenerateRomStub);
 
 	CheckDestinations(file, installable, aInstallSISFile);
 
-	InstallFiles(installable, iParamList.SystemDriveLetter());
+	InstallFiles(installable, iParamList.SystemDriveLetter(), aInstallSISFile.iGenerateRomStub);
 
 	UpdateRegistry(file, installable, aInstallSISFile, aInstallSISFile.iSUFlag);
 	
@@ -360,6 +363,11 @@
 		CreateStubSisFile(aInstallSISFile, file);
 	}
 
+	if (aInstallSISFile.iGenerateRomStub)
+	{
+		CreateRomStubSisFile(aInstallSISFile, file);
+	}
+
 	FreeInstallableFiles(installable);
 
 	return SUCCESS;
@@ -458,7 +466,7 @@
 	return (stubExistsInRom && (romUpgradableSA || puInstall || spInstall));    	
 }
 
-void Installer::UninstallPkg(const SisFile& aSis)
+void Installer::UninstallPkg(const SisFile& aSis, const bool aGenerateRomStub)
 {
 	TUint32 uid = aSis.GetPackageUid();
 	TUint32 installType = aSis.GetInstallType();
@@ -466,7 +474,7 @@
 	// Check to see the SA is installed, otherwise, RemovePkg() will throw an exception
 	if (iRegistry.IsInstalled(uid) && (installType == CSISInfo::EInstInstallation))
 	{
-		LINFO(L"Removing package \"" << aSis.GetPackageName() << L"\" prior to re-installation");
+		LINFO(L"Removing package \"" << aSis.GetPackageName().c_str() << L"\" prior to re-installation");
 
 		// Remove all installed files for this Uid's packages and all the SisRegistry Entries
 		iRegistry.RemovePkg(uid, true);
@@ -478,8 +486,32 @@
 		iRegistry.RemoveEntry(uid, aSis.GetPackageName().c_str(), aSis.GetVendorName().c_str());
 	}
 
-	// Regenerate the ROM stub registry entries for eclipsing check later.
-	iRegistry.GenerateStubRegistry();
+	if(!aGenerateRomStub)
+	{
+		// Regenerate the ROM stub registry entries for eclipsing check later.
+		iRegistry.GenerateStubRegistry();
+	}
+	else
+	{
+		std::list<std::wstring> stubFileEntries;
+
+		iRegistry.GetStubFileEntries(uid, stubFileEntries);
+		if((!stubFileEntries.empty()))
+	    {
+			LINFO(L"Rom Stub Upgrade, removing \"" << iRegistry.GetRomStubFile() << L"\" prior to re-installation");
+			RemoveFile(iRegistry.GetRomStubFile());
+		
+			std::list<std::wstring>::const_iterator end = stubFileEntries.end();
+			for (std::list<std::wstring>::const_iterator curr = stubFileEntries.begin() ;
+			 curr != end; ++curr)
+			{
+				std::wstring file = *curr;
+				file[0]='z';
+				ConvertToLocalPath(file, iParamList.RomDrivePath());
+				RemoveFile(file);
+			}
+	 	}
+	}
 }
 
 
@@ -545,7 +577,7 @@
 	}
 
 
-bool Installer::IsValidUpgrade(const SisFile& aFile, bool aSUFlag, bool aNonRemovable)
+bool Installer::IsValidUpgrade(const SisFile& aFile, bool aSUFlag, bool aNonRemovable, bool aGenerateRomStub)
 {
 	TUint32 pkg = aFile.GetPackageUid();
 	TUint32 installFlags = aFile.GetInstallFlags();
@@ -582,22 +614,44 @@
 
 	if (iRegistry.IsInstalled(pkg))
 		{
-		ValidateRegistry(aFile,pkg,installFlags,RUFlag,aNonRemovable);	
+		if (aGenerateRomStub && (installType == CSISInfo::EInstAugmentation || installType == CSISInfo::EInstPartialUpgrade))
+			{
+			// Installing SP and PU to Rom (z) drive not allowed
+			std::stringstream err;
+			err << "Could not perform SP or PU upgrade for Rom (z) drive installation";
+			
+			throw InterpretSisError(err.str(), ATTEMPT_TO_UPGRADE_ROM_PKG);
+			}
+		else
+			{
+			ValidateRegistry(aFile,pkg,installFlags,RUFlag,aNonRemovable,aGenerateRomStub);	
+			}
 		}
 	else if (installType == CSISInfo::EInstAugmentation || installType == CSISInfo::EInstPartialUpgrade)
 		{
-		// Installing SP and PU without the base package
-		std::stringstream err;
-		err << "Could not perform upgrade - the base package 0x" << std::hex 
-			<< pkg << " is missing";
+		if(iParamList.IsFlagSet(CParameterList::EFlagsRomInstallSet))
+			{
+			// Installing SP and PU to Rom Drive is not supported.
+			std::stringstream err;
+			err << "Installing SP and PU to Rom (z) Drive is not supported.";
+			throw InterpretSisError(err.str(), ATTEMPT_TO_UPGRADE_ROM_PKG);
+			}
+		else
+			{
+			// Installing SP and PU without the base package
+			std::stringstream err;
+			err << "Could not perform upgrade - the base package 0x" << std::hex 
+				<< pkg << " is missing";
 
-		throw InterpretSisError(err.str(), MISSING_BASE_PACKAGE);
+			throw InterpretSisError(err.str(), MISSING_BASE_PACKAGE);
+			}
 		}
 
 	return true;
 	}
 
-void Installer::ValidateRegistry(const SisFile& aFile, TUint32 aPckgUid, TUint32 aInstallFlags, bool aRUFlag, bool aNonRemovable)
+void Installer::ValidateRegistry(const SisFile& aFile, TUint32 aPckgUid, TUint32 aInstallFlags, 
+										bool aRUFlag, bool aNonRemovable, bool aGenerateRomStub)
 	{
 	bool isSisNonRemovable = aInstallFlags & CSISInfo::EInstFlagNonRemovable;
 	bool isBaseRemovable = false;
@@ -613,14 +667,14 @@
 
 	if (installType == CSISInfo::EInstInstallation)
 		{
-		if (inRom && !aRUFlag)
+		if (inRom && !aRUFlag && !aGenerateRomStub)
 			{
 			std::stringstream err;
 			err << "Illegal SA upgrade to ROM package 0x" << std::hex << aPckgUid;
 			throw InterpretSisError(err.str(), ATTEMPT_TO_UPGRADE_ROM_PKG);
 			}
 		// This is not a ROM base package, check is there a SIS stub base package present
-		else if (iRegistry.IsRomStubPackage(aPckgUid) && !aRUFlag)
+		else if (iRegistry.IsRomStubPackage(aPckgUid) && !aRUFlag && !aGenerateRomStub)
 			{			
 			std::stringstream err;
 			err << "Indirect SA upgrade to ROM package 0x" << std::hex << aPckgUid
@@ -711,20 +765,21 @@
 	}
 
 bool Installer::GetInstallableFiles(const SisFile& aFile, InstallableFiles& aList, ExpressionEvaluator& aEvaluator, 
-									int aInstallingDrive)
+									int aInstallingDrive, const int aSystemDrive, const bool aGenerateRomStub)
 {
 	return aFile.GetInstallableFiles(aList, aEvaluator, 
-		iConfigManager.GetLocalDrivePath(aInstallingDrive), aInstallingDrive);
+		iConfigManager.GetLocalDrivePath(aInstallingDrive), aInstallingDrive, aSystemDrive, aGenerateRomStub);
 }
 
 
 struct InstallFile
 {
-	InstallFile(const std::wstring& aCDrive, const int aSystemDrive)
-		: iSystemDrivePath(aCDrive), iSystemDrive(aSystemDrive) {}
+	InstallFile(const std::wstring& aCDrive, const int aSystemDrive, const bool aGenerateRomStub)
+		: iSystemDrivePath(aCDrive), iSystemDrive(aSystemDrive), iGenerateRomStub(aGenerateRomStub) {}
 
 	const std::wstring& iSystemDrivePath;
 	const int iSystemDrive;
+	const bool iGenerateRomStub;
 
 	void operator()(const InstallableFile* aFile)
 	{
@@ -742,9 +797,21 @@
             {
 			// Unicode characters can not be displayed on DOS prompt
  			std::string temporary = wstring2string(target);
+			if(temporary[0]=='$')
+			{
+				temporary[0] = iSystemDrive;
+			}
 			std::wstring targetDisplay = string2wstring( temporary );
 		    LINFO(L"Installing file: " << targetDisplay);
 
+			if(target[0]==L'$')
+			{
+				localTarget = target;
+				ConvertToLocalPath( localTarget, iSystemDrivePath );
+				target[0] = iSystemDrive;
+				aFile->SetTarget(target);
+			}
+
             std::wstring targetDirectory = localTarget.substr( 0, localTarget.rfind( KDirectorySeparator ) );    		
 			const unsigned char* buffer = NULL;
 			TUint32 len;
@@ -762,7 +829,7 @@
 				// if the FN option specified, leave the file creation
 				if (fileNullOption)
 				{
-					LINFO(L"File " << target << L" contains \"Delete-File-On-Uninstall\" option." );
+					LINFO(L"File " << target.c_str() << L" contains \"Delete-File-On-Uninstall\" option." );
 				}
 				else 
 				{
@@ -789,7 +856,7 @@
 				}
 			}
 
-			if (aFile->IsExecutable() && !fileNullOption)
+			if (aFile->IsExecutable() && !fileNullOption && !iGenerateRomStub)
 			{
 				// register the hash
 				std::wstring basename = localTarget.substr( localTarget.rfind( KDirectorySeparator ) + 1 );
@@ -835,11 +902,16 @@
 };
 
 
-void Installer::InstallFiles(const InstallableFiles& aList, const int aInstallDrive)
+void Installer::InstallFiles(const InstallableFiles& aList, int aInstallDrive, const bool aGenerateRomStub)
 {
+	if(aGenerateRomStub)
+		{
+		aInstallDrive = 'z'; //Rom Drive
+		}
+
 	std::wstring localTargetPath = iConfigManager.GetLocalDrivePath(aInstallDrive);
 
-	std::for_each(aList.begin(), aList.end(), InstallFile(localTargetPath, aInstallDrive));
+	std::for_each(aList.begin(), aList.end(), InstallFile(localTargetPath, aInstallDrive, aGenerateRomStub));
 }
 
 
@@ -1154,6 +1226,41 @@
 	return isEclipsable;
 }
 
+/** This function handles file overwriting scenarios from Stub SIS files only and not from SISregistry.
+      (i.e: we are trying to install z:\somedir\somename.ext however it already exists)
+ @param aFile the SIS file to be installed
+ @param aTarget The fully qualified filename (full path and name)
+*/
+void Installer::HandleRomFileOverwriting(const SisFile& aFile, const std::wstring& aTarget)
+{
+	// find out which Rom Stub this file belongs to
+	TUint32 owningUid = 0;
+	CSISController* sisController = iRegistry.GetStubControllerUid(aTarget);
+
+	if(sisController)
+	{
+		owningUid=sisController->UID1();
+	}
+
+	// no package owns this file. Always allow orphaned file overwriting!
+	if (owningUid == 0)
+	{
+		LWARN(aTarget << L" overwrites orphaned file");
+	}
+	else if (aFile.GetPackageUid() != owningUid)
+	{
+		std::wostringstream os;
+		os << aTarget.c_str() << L" overwrites file from package 0x" << std::hex << owningUid << L" \"" << sisController->SISInfo().PackageName(0) << L"\"" << std::endl;
+		iProblemFiles.append(os.str());
+		iError = ECLIPSING_VIOLATION;
+	}
+	
+	if(sisController)
+	{
+		delete sisController;	
+	}
+}
+
 /** This function handles overwriting scenarios (i.e: we are trying to install c:\somedir\somename.ext however it already exists)
  In this case we have 2 possibilities:
  1) We are correctly overwriting the already present file (a PU)
@@ -1283,9 +1390,6 @@
     int num_of_files = aFiles.size();
 	TUint32 pkgUid = aFile.GetPackageUid();
 	TUint32 installType = aFile.GetInstallType();
-	std::list<std::wstring> stubFileEntries;
-
-	iRegistry.GetStubFileEntries(pkgUid, stubFileEntries);
 
 	// if a base package exists, check to see if it chains back to a ROM stub. If so, populate
 	// iEclipsableRomFiles with the files owned by the ROM stub. Only ROM files can be eclipsed.
@@ -1341,6 +1445,16 @@
 					continue;
 				}
 			}
+
+			if(aInstallSISFile.iGenerateRomStub)
+			{
+				bool isOverwrite = FileExists(file->GetLocalTarget());
+				// To check if We are incorrectly overwriting the file present.
+				if (isOverwrite)
+				{
+					HandleRomFileOverwriting(aFile, target);
+				}
+			}
 			
 			// additional platsec checks
 			if (target.find(privatePath) != std::wstring::npos)
@@ -1574,6 +1688,45 @@
 }
 
 
+void Installer::CreateRomStubSisFile(const InstallSISFile& aInstallSISFile, SisFile& aSis)
+{
+
+	int targetDrive = aInstallSISFile.iTargetDrive;
+	std::wstring drivePath = iConfigManager.GetLocalDrivePath(targetDrive);
+
+	#ifndef __TOOLS2_LINUX__
+	drivePath.append(L"\\system\\install\\");
+	#else
+	drivePath.append(L"/system/install/");
+	#endif
+
+	// build Rom Stub Pathname
+	if ( !MakeDir( drivePath ) )
+	{
+		throw InterpretSisError(L"Directory Creation Error - "+drivePath, DIRECTORY_CREATION_ERROR);
+	}
+
+	size_t found;
+  	found=aInstallSISFile.iFileName.find_last_of(L"/\\");
+	std::wstring sisFile = aInstallSISFile.iFileName.substr(found+1);
+	std::wstring sisFilename = sisFile.substr(0,sisFile.length()-4);
+	drivePath.append(sisFilename);
+	drivePath.append(L"_");
+	std::wstringstream sUid;
+	sUid << std::hex << aSis.GetPackageUid();
+	drivePath.append(sUid.str());
+	drivePath.append(L".sis");
+
+	// Display the target SIS file. Format the stub SIS file string so it displays correctly.
+	std::wstring ctrlDrive(L"z:");
+	std::wstring ctrlTarget = drivePath.substr(iConfigManager.GetLocalDrivePath(targetDrive).length(),drivePath.length());
+	ctrlDrive.append(ctrlTarget);
+
+	LINFO(L"\tCreating ROM stub: " << ctrlDrive);
+	aSis.MakeSISRomStub(drivePath);
+	// If the NR flag is set, change the file attribute to RO
+}
+
 void Installer::CreateStubSisFile(const InstallSISFile& aInstallSISFile, SisFile& aSis)
 {
 	int targetDrive = aInstallSISFile.iTargetDrive;
--- a/secureswitools/swisistools/source/interpretsislib/installer.h	Tue Sep 14 21:31:28 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/installer.h	Wed Sep 15 12:20:42 2010 +0300
@@ -66,22 +66,24 @@
 
 	void SanitiseSISFileAttributes(const InstallSISFile& aInstallSISFile);
 
-	void UninstallPkg(const SisFile& aSis); // Uninstall the same package (if found)
+	void UninstallPkg(const SisFile& aSis, const bool aGenerateRomStub); // Uninstall the same package (if found)
 											// prior to installation
 
 	bool DependenciesOk(const SisFile& aFile);			// Check to see if the sis file
 														// meets it's dependencies
 
-	bool IsValidUpgrade(const SisFile& aFile, bool aSUFlag, bool aNonRemovable);	// Check to see if this is a valid upgrade
+	bool IsValidUpgrade(const SisFile& aFile, bool aSUFlag, bool aNonRemovable, bool aGenerateRomStub);	// Check to see if this is a valid upgrade
 																	// to the existing packages
-	void ValidateRegistry(const SisFile& aFile, TUint32 aPckgUid, TUint32 aInstallFlags, bool aRUFlag, bool aNonRemovable);
+	void ValidateRegistry(const SisFile& aFile, TUint32 aPckgUid, TUint32 aInstallFlags, 
+										bool aRUFlag, bool aNonRemovable, bool aGenerateRomStub);
 	void InitializeRegistryDetails	( const TUint32 aPckgUid, bool& aIsBaseRemovable, bool& aInRom, bool& aIsPreInstalled, TUint32& aUid, std::wstring& aPackageName );
 
 
 	bool GetInstallableFiles(
-		const SisFile& aFile, InstallableFiles& aList, ExpressionEvaluator& aEvaluator, int aInstallingDrive);
+	const SisFile& aFile, InstallableFiles& aList, ExpressionEvaluator& aEvaluator, 
+						int aInstallingDrive, const int aSystemDrive, const bool aGenerateRomStub);
 
-	void InstallFiles(const InstallableFiles& aList, const int aInstallDrive);	// Retrieves the list of files
+	void InstallFiles(const InstallableFiles& aList, int aInstallDrive, const bool aGenerateRomStub);	// Retrieves the list of files
 														// to install from the sis file
 
 	static void Install(const InstallableFile& aFile);
@@ -106,11 +108,14 @@
 
 	void CreateStubSisFile(const InstallSISFile& aInstallSISFile, SisFile& aSis);
 	
+	void CreateRomStubSisFile(const InstallSISFile& aInstallSISFile, SisFile& aSis);
+	
 	// Eclipsing check methods
 	void PrepareEclipsableFilesList(const SisFile& aSis);
 	bool IsValidEclipsingUpgrade(const SisFile& aSis, const SisRegistryObject& registryEntry);
 	bool ValidEclipse(const SisFile& aFile, const std::wstring& target, const InstallableFile& aInstallableFile, bool aSUFlag);
 	void HandleFileOverwriting(const SisFile& aFile, const std::wstring& target, bool aSUFlag);
+	void HandleRomFileOverwriting(const SisFile& aFile, const std::wstring& target);
 	#ifndef __TOOLS2_LINUX__
 	bool IsEclipsable(std::wstring& aRomFile, bool aSUFlag);
 	#else
--- a/secureswitools/swisistools/source/interpretsislib/interpretsis.cpp	Tue Sep 14 21:31:28 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/interpretsis.cpp	Wed Sep 15 12:20:42 2010 +0300
@@ -90,7 +90,7 @@
 			{
 			if (!dependenciesIt->second.empty())
 				{
-				LERROR(L"Package " << dependenciesIt->first << L" requires:");
+				LERROR(L"Package " << dependenciesIt->first.c_str() << L" requires:");
 				for (std::vector<SisRegistryDependency>::const_iterator dependantsIt = dependenciesIt->second.begin();
 					dependantsIt != dependenciesIt->second.end() ;
 					++dependantsIt)
--- a/secureswitools/swisistools/source/interpretsislib/parameterlist.h	Tue Sep 14 21:31:28 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/parameterlist.h	Wed Sep 15 12:20:42 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -45,27 +45,31 @@
 	 * Default constructor. 
 	 */
 	InstallSISFile() : iFileName(L""), iTargetDrive(L'$'), iGenerateStub(false),
-						iNonRemovable(false),iReadOnly(false), iNotRegister(false), iSUFlag(false) {}
+						iNonRemovable(false),iReadOnly(false), iNotRegister(false), 
+						iSUFlag(false), iGenerateRomStub(false) {}
 
 	/**
 	 * Constructor
 	 */
 	InstallSISFile(std::wstring aName, int aDrive, bool aSUFlag)
 		: iFileName(aName), iTargetDrive(aDrive), iGenerateStub(false), 
-			iNonRemovable(false),iReadOnly(false), iNotRegister(false), iSUFlag(aSUFlag) {}
+			iNonRemovable(false),iReadOnly(false), iNotRegister(false), 
+			iSUFlag(aSUFlag), iGenerateRomStub(false) {}
 
 	/**
 	 * Constructor
 	 */
 	InstallSISFile(std::wstring aName, int aDrive, bool aGenerateStub, bool aNonRemovable,
-					bool aReadOnly, bool aNotRegister, bool aSUFlag)
+					bool aReadOnly, bool aNotRegister, bool aSUFlag, bool aGenerateRomStub)
 		: iFileName(aName), iTargetDrive(aDrive), iGenerateStub(aGenerateStub), 
-			iNonRemovable(aNonRemovable), iReadOnly(aReadOnly), iNotRegister(aNotRegister), iSUFlag(aSUFlag) {}
+			iNonRemovable(aNonRemovable), iReadOnly(aReadOnly), iNotRegister(aNotRegister),
+			iSUFlag(aSUFlag), iGenerateRomStub(aGenerateRomStub) {}
 
 public:
 	std::wstring iFileName; // SIS file name
 	int iTargetDrive;		// Target drive
 	bool iGenerateStub;		// Whether to generate stub sis file for this sis or not.
+	bool iGenerateRomStub;	// Whether to generate stub sis file for ROM Install.
 	bool iNonRemovable;		// Whether this is a non-removable SIS or not.
 	bool iReadOnly;		    // Whether this is a Readonly SIS or not.
 	bool iNotRegister;		// Whether to register the sis or not.
@@ -116,7 +120,9 @@
         EFlagsSysDriveSet           = 0x0010,
         EFlagsStubDirectorySet      = 0x0020,
         EFlagsConfigIniSet          = 0x0040,
-		EFlagsDisableZDriveChecksSet= 0x0080
+		EFlagsDisableZDriveChecksSet= 0x0080,
+        EFlagsRomInstallSet         = 0x0100,
+        EFlagsExtDriveSet	        = 0x0200,
         };
 
 public: // Constructors & destructor
--- a/secureswitools/swisistools/source/interpretsislib/sisfile.cpp	Tue Sep 14 21:31:28 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/sisfile.cpp	Wed Sep 15 12:20:42 2010 +0300
@@ -116,7 +116,9 @@
 bool SisFile::GetInstallableFiles(InstallableFiles& aFiles, 
 								  ExpressionEvaluator& aEvaluator,
 								  const std::wstring& aDrivePath,
-								  int aInstallingDrive) const
+								  int aInstallingDrive,
+								  const int aSystemDrive,
+								  const bool aGenerateRomStub) const
 {
 	bool success = true;
 	
@@ -141,12 +143,12 @@
 			// aFiles will be filled with only file descriptions of files, empty file data
 			if (NULL != dataUnit && fileDes.Operation() != CSISFileDescription::EOpNull)
 				{
-				aFiles.push_back(new InstallableFile(fileDes, new CSISFileData(dataUnit->FileData(fileDes.FileIndex())), aDrivePath, aInstallingDrive));		
+				aFiles.push_back(new InstallableFile(fileDes, new CSISFileData(dataUnit->FileData(fileDes.FileIndex())), aDrivePath, aInstallingDrive, aSystemDrive, aGenerateRomStub));		
 				}
 			else 
 				{
 				// SIS files will not be present in PA stubs
-				aFiles.push_back( new InstallableFile(fileDes,aDrivePath,aInstallingDrive));		
+				aFiles.push_back( new InstallableFile(fileDes,aDrivePath,aInstallingDrive, aSystemDrive, aGenerateRomStub));		
 				}
 			}
 		}
@@ -154,7 +156,7 @@
 	// process main controller - data unit 0
 	const CSISInstallBlock& installBlock = iContents.Controller().InstallBlock();
 
-	ProcessInstallBlock(installBlock, aFiles, aEvaluator, aDrivePath, aInstallingDrive);
+	ProcessInstallBlock(installBlock, aFiles, aEvaluator, aDrivePath, aInstallingDrive, aSystemDrive, aGenerateRomStub);
 
 	return success;
 }
@@ -230,35 +232,35 @@
 				const CSISFileDescription::TSISInstOption operationOptions = fD.OperationOptions();
 				if(operationOptions & CSISFileDescription::EInstFileRunOptionByMimeType)
 				{
-					LWARN(L"File " << target << L" contains \"Run-Using-MIME\" option that will be ignored.");
+					LWARN(L"File " << target.c_str() << L" contains \"Run-Using-MIME\" option that will be ignored.");
 				}
 				if((operationOptions & CSISFileDescription::EInstFileRunOptionInstall) \
 						&& (operationOptions & CSISFileDescription::EInstFileRunOptionUninstall))
 				{
-					LWARN(L"File " << target << L" contains \"RUN-BOTH\" option that will be ignored.");			
+					LWARN(L"File " << target.c_str() << L" contains \"RUN-BOTH\" option that will be ignored.");			
 				}
 				else if(operationOptions & CSISFileDescription::EInstFileRunOptionInstall)
 				{
-					LWARN(L"File " << target << L" contains \"Run-On-Install\" option that will be ignored.");			
+					LWARN(L"File " << target.c_str() << L" contains \"Run-On-Install\" option that will be ignored.");			
 				}
 				else if(operationOptions & CSISFileDescription::EInstFileRunOptionUninstall)
 				{
-					LWARN(L"File " << target << L" contains \"Run-On-Uninstall\" option that will be ignored.");			
+					LWARN(L"File " << target.c_str() << L" contains \"Run-On-Uninstall\" option that will be ignored.");			
 				}
 				if(operationOptions & CSISFileDescription::EInstFileRunOptionBeforeShutdown)
 				{
-					LWARN(L"File " << target << L" contains \"Run-Before-Shutdown\" option that will be ignored.");			
+					LWARN(L"File " << target.c_str() << L" contains \"Run-Before-Shutdown\" option that will be ignored.");			
 				}
                 if(operationOptions & CSISFileDescription::EInstFileRunOptionAfterInstall)
 				{
-					LWARN(L"File " << target << L" contains \"Run-After-Install\" option that will be ignored.");			
+					LWARN(L"File " << target.c_str() << L" contains \"Run-After-Install\" option that will be ignored.");			
 				}
-				LWARN(L"File " << target << L" contains \"File-Run\" option that will be ignored.");			
+				LWARN(L"File " << target.c_str() << L" contains \"File-Run\" option that will be ignored.");			
 			}
             success = true;
             break;
         case CSISFileDescription::EOpText:
-        	LWARN(L"File " << target << L" contains \"Display Text\" option that will be ignored." );
+        	LWARN(L"File " << target.c_str() << L" contains \"Display Text\" option that will be ignored." );
             success = true;
             break;
         case CSISFileDescription::EOpNull:
@@ -371,7 +373,9 @@
 void SisFile::GetInstallableFiles(	InstallableFiles& aFiles, 
 									const CSISInstallBlock& aInstallBlock, 
 									const std::wstring& aDrivePath,
-									int aInstallingDrive) const
+									int aInstallingDrive,
+									const int aSystemDrive,
+									const bool aGenerateRomStub) const
 	{
 	CSISInfo::TSISInstallationType installType = iContents.Controller().SISInfo().InstallationType();
 	const CSISDataUnit* dataUnit = NULL;
@@ -398,11 +402,11 @@
 		if (NULL != dataUnit && fileDes.Operation() != CSISFileDescription::EOpNull)
 			{
 			const CSISFileData& filedataref = dataUnit->FileData(fileDes.FileIndex());
-			aFiles.push_back(new InstallableFile(fileDes, new CSISFileData(dataUnit->FileData(fileDes.FileIndex())), aDrivePath, aInstallingDrive));
+			aFiles.push_back(new InstallableFile(fileDes, new CSISFileData(dataUnit->FileData(fileDes.FileIndex())), aDrivePath, aInstallingDrive, aSystemDrive, aGenerateRomStub));
 			}
 		else // for stubs, no file data
 			{
-			aFiles.push_back(new InstallableFile(fileDes, aDrivePath, aInstallingDrive));
+			aFiles.push_back(new InstallableFile(fileDes, aDrivePath, aInstallingDrive, aSystemDrive, aGenerateRomStub));
 			}
 		}
 	}
@@ -411,9 +415,11 @@
 								  InstallableFiles& aFiles, 
 								  ExpressionEvaluator& aEvaluator, 
 								  const std::wstring& aDrivePath,
-								  int aInstallingDrive) const
+								  int aInstallingDrive,
+								  const int aSystemDrive,
+								  const bool aGenerateRomStub) const
 	{
-	GetInstallableFiles(aFiles, aInstallBlock, aDrivePath, aInstallingDrive);
+	GetInstallableFiles(aFiles, aInstallBlock, aDrivePath, aInstallingDrive, aSystemDrive,aGenerateRomStub);
 
 	const CSISArray<CSISIf, CSISFieldRoot::ESISIf>& ifs = aInstallBlock.Ifs();
 	for (int i = 0; i < ifs.size(); ++i)
@@ -432,7 +438,7 @@
 		const bool processBlock = expressionResult.BoolValue();
 		if ( processBlock )
 			{
-			ProcessInstallBlock(ifBlock.InstallBlock(), aFiles, aEvaluator, aDrivePath, aInstallingDrive);
+			ProcessInstallBlock(ifBlock.InstallBlock(), aFiles, aEvaluator, aDrivePath, aInstallingDrive, aSystemDrive, aGenerateRomStub);
 			continue;
 			}
 		
@@ -442,11 +448,11 @@
 			const CSISElseIf& ifElseBlock = ifBlock.ElseIf(i) ;
 			if ( aEvaluator.Evaluate(ifElseBlock.Expression()).BoolValue())
 				{
-				ProcessInstallBlock(ifElseBlock.InstallBlock(), aFiles, aEvaluator, aDrivePath, aInstallingDrive);
+				ProcessInstallBlock(ifElseBlock.InstallBlock(), aFiles, aEvaluator, aDrivePath, aInstallingDrive, aSystemDrive, aGenerateRomStub);
 				break;	// Stop processing else if blocks
 				}
 			// Process the rest of the files
-			GetInstallableFiles(aFiles, ifElseBlock.InstallBlock(), aDrivePath, aInstallingDrive);
+			GetInstallableFiles(aFiles, ifElseBlock.InstallBlock(), aDrivePath, aInstallingDrive, aSystemDrive, aGenerateRomStub);
 			}
 		} 
 	}
@@ -501,3 +507,10 @@
 	contents.WriteSIS(aFileName);
 	}
 
+void SisFile::MakeSISRomStub(std::wstring& aFileName)
+	{
+	CSISContents contents = iContents;
+	contents.SetStub(CSISContents::EStubROM);
+	contents.WriteSIS(aFileName);
+	}
+
--- a/secureswitools/swisistools/source/interpretsislib/sisfile.h	Tue Sep 14 21:31:28 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/sisfile.h	Wed Sep 15 12:20:42 2010 +0300
@@ -62,7 +62,9 @@
 	bool GetInstallableFiles(InstallableFiles& aFiles, 
 							ExpressionEvaluator& aEvaluator,
 							const std::wstring& aCDrivePath,
-							int aInstallingDrive) const;
+							int aInstallingDrive,
+							const int aSystemDrive,
+							const bool aGenerateRomStub) const;
 
 	void GetControllerData(const char*& aData, int& aLen) const;
 
@@ -95,6 +97,8 @@
 	 
 	void MakeSISStub(std::wstring& aFileName);
 	
+	void MakeSISRomStub(std::wstring& aFileName);
+	
 	const CSISController& GetController(); 
 	
 	void ProcessEmbeddedFileWarning(const CSISInstallBlock& aInstallBlock) const;
@@ -105,13 +109,17 @@
 	void GetInstallableFiles(	InstallableFiles& aFiles, 
 								const CSISInstallBlock& aInstallBlock, 
 								const std::wstring& aDrivePath,
-								int aInstallingDrive) const;
+								int aInstallingDrive,
+								const int aSystemDrive,
+								const bool aGenerateRomStub) const;
 	
 	void ProcessInstallBlock(const CSISInstallBlock& aInstallBlock,
 							InstallableFiles& aFiles,
 							ExpressionEvaluator& aEvaluator,
 							const std::wstring& aCDrivePath,
-							int aInstallingDrive) const;
+							int aInstallingDrive,
+							const int aSystemDrive,
+							const bool aGenerateRomStub) const;
 
 private:
 	CSISContents iContents;
--- a/secureswitools/swisistools/source/interpretsislib/sisregistry.cpp	Tue Sep 14 21:31:28 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/sisregistry.cpp	Wed Sep 15 12:20:42 2010 +0300
@@ -223,13 +223,16 @@
 		
 	if(iParamList.RegistryVersionExists())
 		{
-		LINFO(L"Using SIS Registry v" << iParamList.RegistryMajorVersion() << L"." << iParamList.RegistryMinorVersion());
+		if ( !iParamList.IsFlagSet(CParameterList::EFlagsRomInstallSet)) 
+			{
+			LINFO(L"Using SIS Registry v" << iParamList.RegistryMajorVersion() << L"." << iParamList.RegistryMinorVersion());
     
-		std::wstring registryPathDriveC = KPathToRegistry;
+			std::wstring registryPathDriveC = KPathToRegistry;
 
-		ConvertToLocalPath( registryPathDriveC, iParamList.SystemDrivePath() );
+			ConvertToLocalPath( registryPathDriveC, iParamList.SystemDrivePath() );
 	
-		ReadRegistry( registryPathDriveC );
+			ReadRegistry( registryPathDriveC );
+			}
 		}
 	#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 	// this code is for handling the database registry implementation
@@ -252,7 +255,10 @@
 		}
 	#endif // SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 
-	GenerateStubRegistry();
+	if ( !iParamList.IsFlagSet(CParameterList::EFlagsRomInstallSet)) 
+		{
+			GenerateStubRegistry();
+		}
     }
 
 
@@ -558,7 +564,7 @@
 	    {
 		if (aUid == it->first && !wcscmp(aPackageName.c_str(), it->second->GetPackageName().c_str()) && aVendorName == it->second->GetVendorName() )
 			{
-			LINFO(L"Removing package \"" << it->second->GetPackageName() 
+			LINFO(L"Removing package \"" << it->second->GetPackageName().c_str() 
 					<< L"\" prior to re-installation");
 
 			// Remove .reg file
@@ -596,7 +602,7 @@
 			return;
 			}
 
-		LINFO(L"Removing package \"" << aPackageName << L"\" prior to re-installation");
+		LINFO(L"Removing package \"" << aPackageName.c_str() << L"\" prior to re-installation");
 
 		// Remove .ctl file
 		int drive = tolower(iDbHelper->GetSelectedDrive(componentId));
@@ -732,8 +738,15 @@
 	for ( ; curr != end ; ++curr)
 	{
 		std::wstring target((*curr)->GetTarget());
-	
-		ConvertToLocalPath(target, aLocalPath);
+
+		if(target[0]==iParamList.SystemDriveLetter())
+		{
+			ConvertToLocalPath(target, iParamList.SystemDrivePath());
+		}
+		else
+		{
+			ConvertToLocalPath(target, aLocalPath);
+		}
 		RemoveFile(target);
 		RemoveHashForFile(target, iParamList.SystemDriveLetter(), iParamList.SystemDrivePath());
 	}
@@ -913,7 +926,7 @@
 		throw InterpretSisError(L"Directory Creation Error - "+regPath,	DIRECTORY_CREATION_ERROR);
 		}
 
-	LINFO(L"\tAdding ROM Stub: 0x" << std::hex << aSisRegistryObject->GetUid() << L" \"" << aSisRegistryObject->GetPackageName() << L"\"");
+	LINFO(L"\tAdding ROM Stub: 0x" << std::hex << aSisRegistryObject->GetUid() << L" \"" << aSisRegistryObject->GetPackageName().c_str() << L"\"");
 			
 	if(iParamList.RegistryVersionExists())
 		{
@@ -1101,7 +1114,6 @@
 			}
 	}
 
-
 CSISController* SisRegistry::GetStubController(const TUint32 aUid)
 	{
 	if (iParamList.IsFlagSet(CParameterList::EFlagsDisableZDriveChecksSet)) 
@@ -1153,7 +1165,59 @@
 	}
 
 
-CSISController* SisRegistry::GetStubControllerInDir( const std::wstring& aDirectory, const TUint32 aUid)
+CSISController* SisRegistry::GetStubControllerUid(const std::wstring& aTarget)
+	{
+	if (iParamList.IsFlagSet(CParameterList::EFlagsDisableZDriveChecksSet)) 
+		{
+		return NULL;
+		}
+	// If the -z option were used to launch the tool, then read any
+	// SIS stubs that we have gathered from the emulated Z:\System\Install
+	// location.
+	if (iParamList.IsFlagSet(CParameterList::EFlagsZDriveSet)) 
+		{
+		std::wstring stubPathZ = KPathToRomStubs;
+		ConvertToLocalPath( stubPathZ, iParamList.RomDrivePath() );
+
+		CSISController* sisController = GetStubControllerInDir( stubPathZ, aTarget );
+
+		if (sisController)
+			{
+			return sisController;
+			}
+		}
+
+	// If an additional SIS stub path were specified, we'll
+	// also handle that here too.
+	if (iParamList.IsFlagSet(CParameterList::EFlagsStubDirectorySet))
+		{
+		bool readCustomStubPath = true;
+		std::wstring customStubPath = iParamList.SisStubPath();
+
+		// But make sure we don't read the same directory twice!
+		const bool haveRomDrive = iParamList.IsFlagSet(CParameterList::EFlagsZDriveSet);
+		if ( haveRomDrive )
+			{
+			std::wstring stubPathZ = KPathToRomStubs;
+			ConvertToLocalPath( stubPathZ, iParamList.RomDrivePath() );
+			readCustomStubPath = ( stubPathZ != customStubPath );
+			}
+
+		if ( readCustomStubPath )
+			{
+			CSISController* sisController = GetStubControllerInDir( customStubPath, aTarget );
+
+			if (sisController)
+				{
+				return sisController;
+				}
+			}
+		}
+	return NULL;
+	}
+
+
+CSISController* SisRegistry::GetStubControllerInDir( const std::wstring& aDirectory, const std::wstring& aTarget)
 {
     // Make sure the directory name is properly terminated.
     std::wstring basePath = StringUtils::EnsureDirectoryTerminated( aDirectory );
@@ -1180,9 +1244,66 @@
         
 		if (!sisController)
 			continue;
+		const CSISInstallBlock& installBlock =	sisController->InstallBlock();
+		int fileCount = installBlock.FileCount();
+				
+		for (int i = 0; i < fileCount; ++i)
+		{
+			std::wstring file(installBlock.FileDescription(i).Target().GetString());
+			if(file[0]!=L'z')
+			{
+				file[0]=L'z';
+			}
+			file = StringUtils::ToLower(file);
+			aTarget = StringUtils::ToLower(aTarget);
+			#ifdef __TOOLS2_LINUX__
+			ConvertToForwardSlash(file);
+			#endif
+			
+			if (!wcscmp(file.c_str(), aTarget.c_str()))
+			{
+				return sisController;
+			}
+		}
 		
+		delete sisController;	
+	}
+
+	return NULL;
+}
+
+CSISController* SisRegistry::GetStubControllerInDir( const std::wstring& aDirectory, const TUint32 aUid)
+{
+    // Make sure the directory name is properly terminated.
+    std::wstring basePath = StringUtils::EnsureDirectoryTerminated( aDirectory );
+
+	std::list<std::wstring> stubDirs;
+	GetDirContents( basePath, stubDirs );
+
+	std::list<std::wstring>::iterator curr;
+	for (curr = stubDirs.begin(); curr != stubDirs.end() ; ++curr)
+	{
+		std::wstring stubPath ( basePath + *curr );
+
+		int dotIndex = stubPath.rfind(L".");
+		if(dotIndex == std::wstring::npos)
+			continue;
+		
+		std::wstring extOfString = stubPath.substr(dotIndex+1);
+
+        std::wstring extOfStringUpper = StringUtils::ToUpper(extOfString);
+		if (extOfStringUpper != L"SIS" && extOfStringUpper != L"SISX")
+			continue;
+		
+		_TCHAR* fileName = const_cast<_TCHAR *>(stubPath.c_str());
+		CSISController* sisController = ReadStubController( fileName );
+        
+		if (!sisController)
+			continue;
+
 		if (sisController->UID1() == aUid)
 		{
+			SetRomStubFile(fileName);
 			return sisController;
 		}
 		delete sisController;	
@@ -1425,6 +1546,17 @@
 	#endif //SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 	return num;
 }
+
+void SisRegistry::SetRomStubFile(const std::wstring& aRomStubFile)
+{
+	iRomStubFile = aRomStubFile;
+}
+
+const std::wstring& SisRegistry::GetRomStubFile() const
+{
+	return iRomStubFile;
+}
+
 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 
 std::wstring SisRegistry::FormatVersionToString( const Version& aVersion )
--- a/secureswitools/swisistools/source/interpretsislib/sisregistry.h	Tue Sep 14 21:31:28 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/sisregistry.h	Wed Sep 15 12:20:42 2010 +0300
@@ -81,6 +81,8 @@
 	void GenerateStubRegistry();
 	int GetAugmentationsNumber(TUint32 aUid);
 	CSISController* GetStubController(const TUint32 aUid);
+	CSISController* GetStubControllerUid(const std::wstring& aTarget);
+	const std::wstring& GetRomStubFile() const;
 
 	static const int KSisRegistryMajorVersion;
 	static const int KSisRegistryMinorVersion;
@@ -96,6 +98,7 @@
     void ReadStubs( const std::wstring& aDirectory );
     void ReadRegistry( const std::wstring& aRegistryBasePath );
 	CSISController* GetStubControllerInDir( const std::wstring& aDirectory, const TUint32 aUid);
+	CSISController* GetStubControllerInDir( const std::wstring& aDirectory, const std::wstring& aTarget);
 	CSISController* ReadStubController( const wchar_t* aFilename );
 	void GenerateRegistryEntry(SisRegistryObject& aObj, const SisFile& aSis);
 	void ExtractRegistryFiles(const std::wstring& path);
@@ -105,6 +108,7 @@
 	std::wstring GetRegistryDir( const std::wstring& aDrivePath, TUint32 aUid  ) const;
 	void GenerateRegFile(SisRegistryObject& aObj) const;
 	void GenerateCtlFile(SisRegistryObject& aObj, const SisFile& aSis) const;
+	void SetRomStubFile(const std::wstring& aRomStubFile);
 
 public:
 	TUint32 GetUid(TUint32 aSid) const;
@@ -144,10 +148,10 @@
 	std::wstring	iCDrive;
 	TInt			iSystemDrive;
     CParameterList& iParamList;
-    RomManager& iRomManager;
-	ConfigManager& iConfigManager;
-	EntryMap iEntries;
-
+    RomManager& 	iRomManager;
+	ConfigManager& 	iConfigManager;
+	EntryMap 		iEntries;
+	std::wstring	iRomStubFile;
 
 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 private:
--- a/secureswitools/swisistools/source/interpretsislib/stringutils.cpp	Tue Sep 14 21:31:28 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/stringutils.cpp	Wed Sep 15 12:20:42 2010 +0300
@@ -202,7 +202,7 @@
 		if  ( colon == ':' && (backslash == '/' || backslash == '\\'))
 		#endif
             {
-            startsWithDrive = ( drive >= 'A' && drive <= 'Z' ) || (drive == '!') ;
+            startsWithDrive = ( drive >= 'A' && drive <= 'Z' ) || (drive == '!') || (drive == '$') ;
             }
         }
     //
--- a/secureswitools/swisistools/source/signsislib/certificateinfo.cpp	Tue Sep 14 21:31:28 2010 +0300
+++ b/secureswitools/swisistools/source/signsislib/certificateinfo.cpp	Wed Sep 15 12:20:42 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -410,8 +410,14 @@
 	}
 	
 	int len = ConvertMultiByteToWideChar((LPSTR)UTF8Str, strlen((LPSTR)UTF8Str)+1, NULL, 0);
+	#ifndef __TOOLS2_LINUX__
 	*aNameEntry = new wchar_t[len*sizeof(wchar_t)];
 	ConvertMultiByteToWideChar((LPSTR)UTF8Str, strlen((LPSTR)UTF8Str)+1, *aNameEntry, len);
+	#else
+	int tmplen = (len*sizeof(wchar_t))/2;
+	*aNameEntry = new wchar_t[tmplen];
+	ConvertMultiByteToWideChar((LPSTR)UTF8Str, strlen((LPSTR)UTF8Str)+1, *aNameEntry, len*2);
+	#endif
 	return 1;
 	}
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/testmakesis/largelanguagecodes.pkg	Wed Sep 15 12:20:42 2010 +0300
@@ -0,0 +1,218 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+
+;Languages
+;#define LANGUAGE_IDS LANG sc 37 14346 14387 14412 14419 102 42 44 45 25 07 18 01 10 129 158 160 159 157 161 49 50 09 02 51 103 03 54 57 58 30 17 15 59 327 05 32 65 67 68 70 326 08 27 13 76 31 78 16 79 26 28 04 83 06 39 29 33 14 93 94 96
+&01,02,03,04,05,06,07,08,09,10,13,14,15,16,17,18,25,26,27,28,29,30,31,32,33,37,39,42,44,45,49,50,51,54,57,58,59,65,67,68,70,76,78,79,83,93,94,96,102,103,129,157,158,159,160,161,326,327,14346,14387,14412,14419,456789
+
+;Header
+#{"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice "},(0x200002B3),1,1,1,TYPE=SA
+
+;Localised Vendor name
+%{"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice ",
+"Quickoffice "}
+
+;Unique Vendor name
+:"Quickoffice Inc"
+
+;Supports Series 60 v 5.0
+[0x1028315F], 0, 0, 0, 
+{"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID",
+"Series60ProductID"}
--- a/secureswitools/swisistools/test/tinterpretsisinteg/scripts/ini.ini	Tue Sep 14 21:31:28 2010 +0300
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/ini.ini	Wed Sep 15 12:20:42 2010 +0300
@@ -432,6 +432,20 @@
 exist1=c:\Documents\InstTest\upgrade2.txt
 exist2=c:\Documents\InstTest\upgrade3.txt
 
+[ROM-Install-09_checkfiles]
+numexist=1
+exist0=z:\Documents\abc1.txt
+
+[ROM-Install-09_checkfilesall]
+numexist=2
+exist0=z:\Documents\abc1.txt
+exist1=c:\Documents\abc1.txt
+
+[ROM-Install-09]
+uid=80000086
+sis=c:\tswi\tsis\data\int_rominstall_02.sisx
+script=c:\tswi\tuiscriptadaptors\scripts\Simple.xml
+
 [NR-OPTION-01_checkfiles]
 numexist=1
 exist0=c:\Documents\abc1.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int-rominstall-09.script	Wed Sep 15 12:20:42 2010 +0300
@@ -0,0 +1,42 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT-RomInstall-09
+//! @SYMTestCaseDesc 	Installing SA on Rom Stub. This is a positive testcase 
+//! @SYMPREQ  			
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	Install SIS file
+//! @SYMTestExpectedResults 	error code 0 returned.
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+RUN_UTILS DeleteDirectory c:\sys\bin
+RUN_UTILS DeleteDirectory c:\sys\hash
+RUN_UTILS DeleteDirectory c:\sys\install
+RUN_UTILS DeleteDirectory c:\Documents
+
+START_TESTCASE INT-RomInstall-09
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini ROM-Install-09_checkfiles
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini ROM-Install-09
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini ROM-Install-09_checkfilesall
+//RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT-RomInstall-09
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/scripts/int-rominstall-10.script	Wed Sep 15 12:20:42 2010 +0300
@@ -0,0 +1,43 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+// Load Suite
+LOAD_SUITE tuiscriptadaptors
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+//! @SYMTestCaseID 		INT-RomInstall-10
+//! @SYMTestCaseDesc 	UnInstalling SA upgrade on Rom Stub. This is a positive testcase 
+//! @SYMPREQ  			
+//! @SYMTestStatus		Released
+//! @SYMTestPriority 	High
+//! @SYMTestActions 	UnInstall SIS file
+//! @SYMTestExpectedResults 	error code 0 returned.
+//! @SYMTestType		CIT
+//////////////////////////////////////////////////////////////////////////////////////////////
+RUN_UTILS DeleteDirectory c:\sys\bin
+RUN_UTILS DeleteDirectory c:\sys\hash
+RUN_UTILS DeleteDirectory c:\sys\install
+RUN_UTILS DeleteDirectory c:\Documents
+
+START_TESTCASE INT-RomInstall-10
+
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini ROM-Install-09_checkfiles
+RUN_TEST_STEP 100 tuiscriptadaptors InstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini ROM-Install-09
+RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep c:\tswi\tinterpretsisinteg\scripts\ini.ini ROM-Install-09_checkfilesall
+RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+//RUN_TEST_STEP_RESULT -5 100 tuiscriptadaptors UninstallStep c:\tswi\tinterpretsisinteg\scripts\ini.ini  NR-OPTION-01
+
+END_TESTCASE INT-RomInstall-10
\ No newline at end of file
--- a/secureswitools/swisistools/test/tinterpretsisinteg/testinterpretsis.bat	Tue Sep 14 21:31:28 2010 +0300
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/testinterpretsis.bat	Wed Sep 15 12:20:42 2010 +0300
@@ -1,5 +1,5 @@
 @rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 @rem All rights reserved.
 @rem This component and the accompanying materials are made available
 @rem under the terms of the License "Eclipse Public License v1.0"
@@ -901,6 +901,50 @@
 GOTO PASS_CLEAN
 
 
+:INT002-019
+if not exist \ddrive mkdir \ddrive > NUL
+if not exist .\edrive mkdir .\edrive > NUL
+call interpretsis -z .\romdrive -c .\cdrive -s \epoc32\winscw\c\tswi\tsis\data\test_system_drive.sis +e -d g -i \epoc32\winscw\c\tswi\tinterpretsisinteg\data\config-drives.ini -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+if not %errorlevel%==0 GOTO LAST
+set exist_file=.\cdrive\sys\install\sisregistry\800000FD\00000000.reg
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\800000FD\00000000_0000.ctl
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\edrive\sys\install\sisregistry\800000FD\00000000_0000.ctl
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\edrive\Documents\InstTest\upgrade1.txt
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\cdrive\Documents\InstTest\upgrade2.txt
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\edrive\Documents\InstTest\upgrade3.txt
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\cdrive\Documents\InstTest\upgrade4.txt
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+GOTO PASS_CLEAN
+
+
+:INT002-020
+if not exist \ddrive mkdir \ddrive > NUL
+if not exist .\edrive mkdir .\edrive > NUL
+call interpretsis -z .\romdrive -c .\cdrive -s \epoc32\winscw\c\tswi\tsis\data\test_system_drive.sis +e -d g -i \epoc32\winscw\c\tswi\tinterpretsisinteg\data\config-drives.ini -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive -x 0x800000FD +e -d g -i \epoc32\winscw\c\tswi\tinterpretsisinteg\data\config-drives.ini -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+if not %errorlevel%==0 GOTO LAST
+set exist_file=.\cdrive\sys\install\sisregistry\800000FD\00000000.reg
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\800000FD\00000000_0000.ctl
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\edrive\sys\install\sisregistry\800000FD\00000000_0000.ctl
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\edrive\Documents\InstTest\upgrade1.txt
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\cdrive\Documents\InstTest\upgrade2.txt
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\edrive\Documents\InstTest\upgrade3.txt
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\cdrive\Documents\InstTest\upgrade4.txt
+if exist %exist_file% GOTO FAIL_FOUND
+GOTO PASS_CLEAN
+
 :SWI002-001
 if not exist .\romdrive\sys\bin\ mkdir .\romdrive\sys\bin\
 if not exist .\romdrive\private\10273582\ mkdir .\romdrive\private\10273582\
@@ -3006,6 +3050,304 @@
 if not %errorlevel%==0 GOTO LAST
 GOTO PASS_CLEAN
 
+:INT-RomInstall-01
+::Testcase to Install SIS file to ROM (z) drive and check for file exists.
+mkdir .\romdrive\sys\bin > NUL
+call interpretsis -z .\romdrive -s \epoc32\winscw\c\tswi\tsis\data\interpretsis_testcase.sis +z -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+if not %errorlevel%==0 GOTO LAST
+set exist_file=.\cdrive\sys\install\sisregistry\e8000097\00000000.reg
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\e8000097\00000000_0000.ctl
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\romdrive\sys\bin\interpretsis_testcase_01.exe
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\romdrive\system\install\interpretsis_testcase_e8000097.sis
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+GOTO PASS_CLEAN
+
+:INT-RomInstall-02
+::Testcase to UnInstall SIS file installed in ROM (z) drive and check for file exists
+mkdir .\romdrive\sys\bin > NUL
+call interpretsis -z .\romdrive -s \epoc32\winscw\c\tswi\tsis\data\interpretsis_testcase.sis +z -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -c .\cdrive -x 0xe8000097 -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+if %errorlevel%==0 GOTO LAST
+set exist_file=.\cdrive\sys\install\sisregistry\e8000097\00000000.reg
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\e8000097\00000000_0000.ctl
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\romdrive\sys\bin\interpretsis_testcase_01.exe
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\romdrive\system\install\interpretsis_testcase_e8000097.sis
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+GOTO PASS_CLEAN
+
+
+:INT-RomInstall-03
+::Testcase to Install SA over SA to ROM (z) drive. Also validates that the eclipsing is not done. 
+mkdir .\romdrive\sys\bin > NUL
+call interpretsis -z .\romdrive -s \epoc32\winscw\c\tswi\tsis\data\interpretsis_testcase.sis +z -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -s \epoc32\winscw\c\tswi\tsis\data\interpretsis_testcase.sis +z -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+if not %errorlevel%==0 GOTO LAST
+set exist_file=.\cdrive\sys\install\sisregistry\e8000097\00000000.reg
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\e8000097\00000000_0000.ctl
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\romdrive\sys\bin\interpretsis_testcase_01.exe
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\romdrive\system\install\interpretsis_testcase_e8000097.sis
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+GOTO PASS_CLEAN
+
+:INT-RomInstall-04
+::Testcase to Install SP to ROM (z) drive.
+call interpretsis -z .\romdrive -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +z -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -s \epoc32\winscw\c\tswi\tsis\data\sp_int_nr_option_01.sis +z -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+if %errorlevel%==0 GOTO LAST
+set exist_file=.\cdrive\sys\install\sisregistry\80000086\00000000.reg
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\80000086\00000000_0000.ctl
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\romdrive\documents\abc1.txt
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\romdrive\system\install\int_nr_option_01_80000086.sis
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+GOTO PASS_CLEAN
+
+:INT-RomInstall-05
+::Testcase to Install PU to ROM (z) drive.
+call interpretsis -z .\romdrive -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +z -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -s \epoc32\winscw\c\tswi\tsis\data\pu_int_nr_option_01.sis +z -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+if %errorlevel%==0 GOTO LAST
+set exist_file=.\cdrive\sys\install\sisregistry\80000086\00000000.reg
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\80000086\00000000_0000.ctl
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\romdrive\documents\abc1.txt
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\romdrive\system\install\int_nr_option_01_80000086.sis
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+GOTO PASS_CLEAN
+
+:INT-RomInstall-06
+::Testcase to overwrite orphan files when Installing to ROM (z) drive.
+mkdir .\romdrive\documents > NUL
+call copy \epoc32\winscw\c\tswi\teclipsing\data\file1.txt .\romdrive\documents\abc1.txt > NUL
+call interpretsis -z .\romdrive -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +z -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+if not %errorlevel%==0 GOTO LAST
+set exist_file=.\cdrive\sys\install\sisregistry\80000086\00000000.reg
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\80000086\00000000_0000.ctl
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\romdrive\documents\abc1.txt
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\romdrive\system\install\int_nr_option_01_80000086.sis
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+GOTO PASS_CLEAN
+
+:INT-RomInstall-07
+::Testcase for installing multiple SA to ROM (z) drive using one CLI.
+call interpretsis -z .\romdrive -s \epoc32\winscw\c\tswi\tsis\data\interpretsis_testcase.sis +z -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +z -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+if not %errorlevel%==0 GOTO LAST
+set exist_file=.\cdrive\sys\install\sisregistry\80000086\00000000.reg
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\80000086\00000000_0000.ctl
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\romdrive\documents\abc1.txt
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\romdrive\system\install\int_nr_option_01_80000086.sis
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\e8000097\00000000.reg
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\e8000097\00000000_0000.ctl
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\romdrive\sys\bin\interpretsis_testcase_01.exe
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\romdrive\system\install\interpretsis_testcase_e8000097.sis
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+GOTO PASS_CLEAN
+
+
+:INT-RomInstall-08
+::Testcase for overwritting a file belonging to different SA.
+call interpretsis -z .\romdrive -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +z -s \epoc32\winscw\c\tswi\tsis\data\int_rominstall_01.sis +z -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+if %errorlevel%==0 GOTO LAST
+set exist_file=.\cdrive\sys\install\sisregistry\90000086\00000000.reg
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\90000086\00000000_0000.ctl
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\romdrive\documents\abc1.txt
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\romdrive\system\install\int_nr_option_01_80000086.sis
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\romdrive\system\install\int_romisntall_01_90000086.sis
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\80000086\00000000.reg
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\80000086\00000000_0000.ctl
+if exist %exist_file% GOTO FAIL_FOUND
+GOTO PASS_CLEAN
+
+:INT-RomInstall-09
+::Testcase for Installing SA using SWI on Rom Stub
+call interpretsis -z .\romdrive -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +z -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+if not %errorlevel%==0 GOTO LAST
+call xcopy .\cdrive \epoc32\winscw\c /S /Y > NUL
+call xcopy .\romdrive \epoc32\release\winscw\udeb\z /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+set exist_file=.\romdrive\documents\abc1.txt
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\romdrive\system\install\int_nr_option_01_80000086.sis
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\80000086\00000000.reg
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\80000086\00000000_0000.ctl
+if exist %exist_file% GOTO FAIL_FOUND
+ECHO ***ERRORCODE*** %errorlevel% PASS>>\epoc32\winscw\c\interpretsis_test_harness.txt
+GOTO END
+
+:INT-RomInstall-10
+::Testcase for UnInstalling SA upgrade using SWI on Rom Stub
+call interpretsis -z .\romdrive -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +z -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+if not %errorlevel%==0 GOTO LAST
+call xcopy .\cdrive \epoc32\winscw\c /S /Y > NUL
+call xcopy .\romdrive \epoc32\release\winscw\udeb\z /S /Y > NUL
+if exist \epoc32\winscw\c\sys\install\sisregistry\backup.lst del \epoc32\winscw\c\sys\install\sisregistry\backup.lst > NUL
+set exist_file=.\romdrive\documents\abc1.txt
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\romdrive\system\install\int_nr_option_01_80000086.sis
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\80000086\00000000.reg
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\80000086\00000000_0000.ctl
+if exist %exist_file% GOTO FAIL_FOUND
+ECHO ***ERRORCODE*** %errorlevel% PASS>>\epoc32\winscw\c\interpretsis_test_harness.txt
+GOTO END
+
+:INT-RomInstall-11
+::Testcase for verifying drive selection for 'c' , '$', 'e', '!', 'z' from pkg files while installing to Rom (z) drive.
+call interpretsis -z .\romdrive -s \epoc32\winscw\c\tswi\tsis\data\int_rominstall_03.sis +z -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+if not %errorlevel%==0 GOTO LAST
+set exist_file=.\romdrive\documents\abc1.txt
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\romdrive\documents\abc2.txt
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\romdrive\documents\abc3.txt
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\romdrive\documents\abc4.txt
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\romdrive\documents\abc5.txt
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\romdrive\documents\abc6.txt
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\romdrive\system\install\int_rominstall_03_80000086.sis
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\80000086\00000000.reg
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\80000086\00000000_0000.ctl
+if exist %exist_file% GOTO FAIL_FOUND
+GOTO PASS_CLEAN
+
+:INT-RomInstall-12
+::Testcase to validate that for Installing SIS file to ROM (z) drive, system drive should not be mentioned.
+mkdir .\romdrive\sys\bin > NUL
+call interpretsis -z .\romdrive -c .\cdrive -s \epoc32\winscw\c\tswi\tsis\data\interpretsis_testcase.sis +z -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+if %errorlevel%==0 GOTO LAST
+set exist_file=.\cdrive\sys\install\sisregistry\e8000097\00000000.reg
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\e8000097\00000000_0000.ctl
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\romdrive\sys\bin\interpretsis_testcase_01.exe
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\romdrive\system\install\interpretsis_testcase_e8000097.sis
+if exist %exist_file% GOTO FAIL_FOUND
+GOTO PASS_CLEAN
+
+:INT-RomInstall-13
+::Testcase to validate that for Installing SA over SA with different file set to ROM (z) drive.
+mkdir .\romdrive\sys\bin > NUL
+call interpretsis -z .\romdrive -s \epoc32\winscw\c\tswi\tsis\data\int_rominstall_01.sis +z -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+call interpretsis -z .\romdrive -s \epoc32\winscw\c\tswi\tsis\data\int_rominstall_04.sis +z -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+if not %errorlevel%==0 GOTO LAST
+set exist_file=.\cdrive\sys\install\sisregistry\80000086\00000000.reg
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\80000086\00000000_0000.ctl
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\romdrive\documents\abc1.txt
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\romdrive\documents\abc7.txt
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\romdrive\documents\abc8.txt
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+set exist_file=.\romdrive\system\install\int_rominstall_01_90000086.sis
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\romdrive\system\install\int_rominstall_04_90000086.sis
+if not exist %exist_file% GOTO FAIL_NOT_FOUND
+GOTO PASS_CLEAN
+
+:INT-RomInstall-14
+::Testcase to validate that for Installing SIS file to ROM (z) drive, -z option is mendatory.
+mkdir .\romdrive\sys\bin > NUL
+call interpretsis -s \epoc32\winscw\c\tswi\tsis\data\interpretsis_testcase.sis +z -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+if %errorlevel%==0 GOTO LAST
+set exist_file=.\cdrive\sys\install\sisregistry\e8000097\00000000.reg
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\e8000097\00000000_0000.ctl
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\romdrive\sys\bin\interpretsis_testcase_01.exe
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\romdrive\system\install\interpretsis_testcase_e8000097.sis
+if exist %exist_file% GOTO FAIL_FOUND
+GOTO PASS_CLEAN
+
+:INT-RomInstall-15
+::Testcase to validate that -s +z and -s +e cannot be used in same CLI with system drive defined.
+:: the order of -s +e and -s +z are different then the testcase INT-RomInstall-17. Used to test both combination as each SIS file is installed saperately
+mkdir .\romdrive\sys\bin > NUL
+call interpretsis -z .\romdrive -c .\cdrive -s \epoc32\winscw\c\tswi\tsis\data\interpretsis_testcase.sis +z -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +e -w info -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+if %errorlevel%==0 GOTO LAST
+set exist_file=.\cdrive\sys\install\sisregistry\e8000097\00000000.reg
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\e8000097\00000000_0000.ctl
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\romdrive\sys\bin\interpretsis_testcase_01.exe
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\romdrive\system\install\interpretsis_testcase_e8000097.sis
+if exist %exist_file% GOTO FAIL_FOUND
+GOTO PASS_CLEAN
+
+:INT-RomInstall-16
+::Testcase to validate that -s +z and -s +e cannot be used in same CLI without system drive defined.
+mkdir .\romdrive\sys\bin > NUL
+if not exist \epoc32\winscw\e mkdir \epoc32\winscw\e > NUL
+call interpretsis -z .\romdrive -s \epoc32\winscw\c\tswi\tsis\data\interpretsis_testcase.sis +z -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +e -w info -i \epoc32\winscw\c\tswi\tinterpretsisinteg\parameters_file\int_nr_option_38.txt -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+if %errorlevel%==0 GOTO LAST
+set exist_file=.\cdrive\sys\install\sisregistry\e8000097\00000000.reg
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\e8000097\00000000_0000.ctl
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\romdrive\sys\bin\interpretsis_testcase_01.exe
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\romdrive\system\install\interpretsis_testcase_e8000097.sis
+if exist %exist_file% GOTO FAIL_FOUND
+GOTO PASS_CLEAN
+
+:INT-RomInstall-17
+::Testcase to validate that -s +z and -s +e cannot be used in same CLI with system drive defined.
+:: the order of -s +e and -s +z are different then the testcase INT-RomInstall-15. Used to test both combination as each SIS file is installed saperately
+mkdir .\romdrive\sys\bin > NUL
+if not exist \epoc32\winscw\e mkdir \epoc32\winscw\e > NUL
+call interpretsis -z .\romdrive -c .\cdrive -s \epoc32\winscw\c\tswi\tsis\data\int_nr_option_01.sis +e -s \epoc32\winscw\c\tswi\tsis\data\interpretsis_testcase.sis +z -w info -i \epoc32\winscw\c\tswi\tinterpretsisinteg\parameters_file\int_nr_option_38.txt -l \epoc32\winscw\c\interpretsis_test_harness.txt > NUL
+if %errorlevel%==0 GOTO LAST
+set exist_file=.\cdrive\sys\install\sisregistry\e8000097\00000000.reg
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\cdrive\sys\install\sisregistry\e8000097\00000000_0000.ctl
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\romdrive\sys\bin\interpretsis_testcase_01.exe
+if exist %exist_file% GOTO FAIL_FOUND
+set exist_file=.\romdrive\system\install\interpretsis_testcase_e8000097.sis
+if exist %exist_file% GOTO FAIL_FOUND
+GOTO PASS_CLEAN
+
 
 :PASS_CLEAN
 rmdir /S /Q .\cdrive > NUL
--- a/secureswitools/swisistools/test/tinterpretsisinteg/testlist.xml	Tue Sep 14 21:31:28 2010 +0300
+++ b/secureswitools/swisistools/test/tinterpretsisinteg/testlist.xml	Wed Sep 15 12:20:42 2010 +0300
@@ -985,6 +985,16 @@
 	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\testinterpretsis.bat INT002-017</command>
 	<check type="result"/>
 	</test>
+<test id="INT002-019">
+	<title>SEC-sistools-InterpretSIS-INT002-019</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\testinterpretsis.bat INT002-019</command>
+	<check type="result"/>
+	</test>
+<test id="INT002-020">
+	<title>SEC-sistools-InterpretSIS-INT002-020</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\testinterpretsis.bat INT002-020</command>
+	<check type="result"/>
+	</test>	
 <test id="SWI002-001" type="nativeonly">
 	<title>SEC-sistools-InterpretSIS-SWI002-001</title>
 	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\testinterpretsis.bat SWI002-001</command>
@@ -1859,4 +1869,106 @@
 	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT_NR_Option-39  INT_NR_Option-39 3  "positive"  "both" "nouid" "nobatchfile" "int_nr_option-39.script" "int_nr_option-39.htm" "FAIL = 0" "FAIL = 0" </check>
 	</test>
 	
+<test id="INT-RomInstall-01">
+	<title>INT-RomInstall-01</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\testinterpretsis.bat INT-RomInstall-01</command>
+	<check type="result"/>
+	</test>
+	
+<test id="INT-RomInstall-02">
+	<title>INT-RomInstall-02</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\testinterpretsis.bat INT-RomInstall-02</command>
+	<check type="result"/>
+	</test>
+	
+<test id="INT-RomInstall-03">
+	<title>INT-RomInstall-03</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\testinterpretsis.bat INT-RomInstall-03</command>
+	<check type="result"/>
+	</test>
+	
+<test id="INT-RomInstall-04">
+	<title>INT-RomInstall-04</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\testinterpretsis.bat INT-RomInstall-04</command>
+	<check type="result"/>
+	</test>
+	
+<test id="INT-RomInstall-05">
+	<title>INT-RomInstall-05</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\testinterpretsis.bat INT-RomInstall-05</command>
+	<check type="result"/>
+	</test>
+	
+<test id="INT-RomInstall-06">
+	<title>INT-RomInstall-06</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\testinterpretsis.bat INT-RomInstall-06</command>
+	<check type="result"/>
+	</test>
+	
+<test id="INT-RomInstall-07">
+	<title>INT-RomInstall-07</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\testinterpretsis.bat INT-RomInstall-07</command>
+	<check type="result"/>
+	</test>
+	
+<test id="INT-RomInstall-08">
+	<title>INT-RomInstall-08</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\testinterpretsis.bat INT-RomInstall-08</command>
+	<check type="result"/>
+	</test>
+	
+<test id="INT-RomInstall-09" type="nativeonly">
+	<title>INT-RomInstall-09</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\testinterpretsis.bat INT-RomInstall-09</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT-RomInstall-09  INT-RomInstall-09 3  "positive"  "both" "nouid" "nobatchfile" "int-rominstall-09.script" "int-rominstall-09.htm" "nocheck" "PASS = 3" </check>
+	</test>
+	
+<test id="INT-RomInstall-10" type="nativeonly">
+	<title>INT-RomInstall-10</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\testinterpretsis.bat INT-RomInstall-10</command>
+	<check type="program" name="perl \epoc32\winscw\c\tswi\tinterpretsisinteg\swicheck.pl">INT-RomInstall-10  INT-RomInstall-10 3  "positive"  "both" "nouid" "nobatchfile" "int-rominstall-10.script" "int-rominstall-10.htm" "nocheck" "PASS = 4" </check>
+	</test>
+	
+<test id="INT-RomInstall-11">
+	<title>INT-RomInstall-11</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\testinterpretsis.bat INT-RomInstall-11</command>
+	<check type="result"/>
+	</test>
+
+<test id="INT-RomInstall-12">
+	<title>INT-RomInstall-12</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\testinterpretsis.bat INT-RomInstall-12</command>
+	<check type="result"/>
+	</test>
+	
+<test id="INT-RomInstall-13">
+	<title>INT-RomInstall-13</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\testinterpretsis.bat INT-RomInstall-13</command>
+	<check type="result"/>
+	</test>
+	
+<test id="INT-RomInstall-14">
+	<title>INT-RomInstall-14</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\testinterpretsis.bat INT-RomInstall-14</command>
+	<check type="result"/>
+	</test>
+	
+<test id="INT-RomInstall-15">
+	<title>INT-RomInstall-15</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\testinterpretsis.bat INT-RomInstall-15</command>
+	<check type="result"/>
+	</test>
+	
+<test id="INT-RomInstall-16">
+	<title>INT-RomInstall-16</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\testinterpretsis.bat INT-RomInstall-16</command>
+	<check type="result"/>
+	</test>
+	
+<test id="INT-RomInstall-17">
+	<title>INT-RomInstall-17</title>
+	<command log="no">\epoc32\winscw\c\tswi\tinterpretsisinteg\testinterpretsis.bat INT-RomInstall-17</command>
+	<check type="result"/>
+	</test>
+	
 </testlist>