# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1273583773 -10800 # Node ID 08ffbd51e3fd3d05223185b0dc37f1d6ba5abc72 # Parent 25214794fad6c803ec89fea2d44cc211afe71ca9 Revision: 201018 Kit: 201019 diff -r 25214794fad6 -r 08ffbd51e3fd browserplugins/browseraudiovideoplugin/src/BavpController.cpp --- a/browserplugins/browseraudiovideoplugin/src/BavpController.cpp Tue Apr 27 16:41:18 2010 +0300 +++ b/browserplugins/browseraudiovideoplugin/src/BavpController.cpp Tue May 11 16:16:13 2010 +0300 @@ -447,6 +447,12 @@ TRect clipRect ( aRect ); Log( EFalse, _L("GetClipRect") ); +#ifndef __PLATFORM_VERSION_32__ + //For non touch device the Child rect is relative to view port, + //where as for Touch device the child rect is relative to the application view rect (excluding the + //status Pane + return aRect; +#else AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, iNormalScreenRect ); // Calculate not to cover the bottom or the top of the rect. @@ -471,6 +477,7 @@ } return clipRect; +#endif } // ----------------------------------------------------------------------------- diff -r 25214794fad6 -r 08ffbd51e3fd browserplugins/browseraudiovideoplugin/src/BavpPlugin.cpp --- a/browserplugins/browseraudiovideoplugin/src/BavpPlugin.cpp Tue Apr 27 16:41:18 2010 +0300 +++ b/browserplugins/browseraudiovideoplugin/src/BavpPlugin.cpp Tue May 11 16:16:13 2010 +0300 @@ -360,7 +360,9 @@ if(!aParam) //app background { iIsForeGround = EFalse; - if(EBavpPlaying == iBavpController->State()) + //Pause for Live stream will Leave with KErrNotSupported from Helix player + //and intern session will be closed. For Live stream Pause should not be done + if(EBavpPlaying == iBavpController->State() && ( !iBavpController->IsClipLive()) ) { iPauseState = ETrue; iPauseInBackground = ETrue; @@ -398,7 +400,9 @@ { if ( iBavpController && (!iPauseState) ) //plugin background { - if(EBavpPlaying == iBavpController->State()) + //Pause for Live stream will Leave with KErrNotSupported from Helix player + //and intern session will be closed. For Live stream Pause should not be done + if( (EBavpPlaying == iBavpController->State() ) && ( !iBavpController->IsClipLive()) ) { iPauseState = ETrue; iBavpController->PauseL(); diff -r 25214794fad6 -r 08ffbd51e3fd browserui/browser/BrowserAppInc/BrowserContentView.h --- a/browserui/browser/BrowserAppInc/BrowserContentView.h Tue Apr 27 16:41:18 2010 +0300 +++ b/browserui/browser/BrowserAppInc/BrowserContentView.h Tue May 11 16:16:13 2010 +0300 @@ -361,6 +361,10 @@ * focus. */ void SetEmphasis(CCoeControl* aMenuControl,TBool aEmphasis); + + TRect ResizeClientRect(); + void SetContentContainerRect(); + private: /** diff -r 25214794fad6 -r 08ffbd51e3fd browserui/browser/BrowserAppSrc/BrowserAppUi.cpp --- a/browserui/browser/BrowserAppSrc/BrowserAppUi.cpp Tue Apr 27 16:41:18 2010 +0300 +++ b/browserui/browser/BrowserAppSrc/BrowserAppUi.cpp Tue May 11 16:16:13 2010 +0300 @@ -2710,6 +2710,7 @@ BROWSER_LOG( ( _L( "CBrowserAppUi::ConnectionStageAchievedL Set retry flags " ) ) ); TRAP_IGNORE( BrCtlInterface().HandleCommandL( (TInt)TBrCtlDefs::ECommandSetRetryConnectivityFlag + (TInt)TBrCtlDefs::ECommandIdBase ) ); SetRetryFlag(ETrue); + TRAP_IGNORE( BrCtlInterface().HandleCommandL( (TInt)TBrCtlDefs::ECommandCancelQueuedTransactions + (TInt)TBrCtlDefs::ECommandIdBase ) ); if( iRetryConnectivity && iRetryConnectivity->IsActive()) { diff -r 25214794fad6 -r 08ffbd51e3fd browserui/browser/BrowserAppSrc/BrowserContentView.cpp --- a/browserui/browser/BrowserAppSrc/BrowserContentView.cpp Tue Apr 27 16:41:18 2010 +0300 +++ b/browserui/browser/BrowserAppSrc/BrowserContentView.cpp Tue May 11 16:16:13 2010 +0300 @@ -253,6 +253,9 @@ EnableFullScreenModeL( EFalse ); } + // resume js timers + ApiProvider().BrCtlInterface().HandleCommandL((TInt)TBrCtlDefs::ECommandIdBase + (TInt)TBrCtlDefs::ECommandResumeScriptTimers ); + #ifdef RD_SCALABLE_UI_V2 // Close the extended toolbar whenever any item on it is selected if ( iPenEnabled && Toolbar()->ToolbarExtension()->IsShown() ) @@ -348,6 +351,9 @@ #endif iContainer->GotoPane()->SetGotoPaneActiveL(); LaunchGotoAddressEditorL(); + + // pause js timer to allow quicke vkb response + ApiProvider().BrCtlInterface().HandleCommandL((TInt)TBrCtlDefs::ECommandIdBase + (TInt)TBrCtlDefs::ECommandPauseScriptTimers ); break; } @@ -1069,12 +1075,35 @@ StatusPane()->ApplyCurrentSettingsL(); if ( resIdChanged || sizeChangedCba || sizeChangedSP ) { - iContainer->SetRect( ClientRect() ); + + SetContentContainerRect(); } } } } +TRect CBrowserContentView::ResizeClientRect() + { + TRect clientRect = ClientRect(); + + if (Layout_Meta_Data::IsLandscapeOrientation() && + StatusPane()->IsVisible() && !Cba()->IsVisible()) + { + TRect screenRect; + AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EScreen, screenRect); + clientRect.iBr.iY = screenRect.iBr.iY; + + } + + return clientRect; + } + +void CBrowserContentView::SetContentContainerRect() + { + TRect clientRect = ResizeClientRect(); + iContainer->SetRect(clientRect); + } + // ----------------------------------------------------------------------------- // CBrowserContentView::SetFullScreenOffL // ----------------------------------------------------------------------------- @@ -1275,6 +1304,9 @@ LOG_ENTERFN("CBrowserContentView::DynInitMenuPaneL"); __ASSERT_DEBUG(aMenuPane, Util::Panic(Util::EUninitializedData)); + // pasue js timers + ApiProvider().BrCtlInterface().HandleCommandL((TInt)TBrCtlDefs::ECommandIdBase + (TInt)TBrCtlDefs::ECommandPauseScriptTimers ); + if ( aResourceId == R_MENU_PANE ) { // web feeds @@ -1764,7 +1796,6 @@ { iContainer->GotoPane()->SetTextL(*url); iContainer->GotoPane()->SelectAllL(); - CleanupStack::PopAndDestroy(); // url } else { @@ -1772,6 +1803,7 @@ // set "http://www." per Browser UI spec iContainer->GotoPane()->SetTextL(KWWWString ); } + CleanupStack::PopAndDestroy(); // url iContainer->GotoPane()->SetFocus( ETrue ); UpdateCbaL(); @@ -2211,7 +2243,7 @@ // void CBrowserContentView::HandleStatusPaneSizeChange() { - iContainer->SetRect(ClientRect()); + SetContentContainerRect(); } // --------------------------------------------------------------------------- @@ -2402,6 +2434,10 @@ const CArrayFix& /*aAttributesNames*/, const CArrayFix& aAttributeValues) { + + // resume js timers + ApiProvider().BrCtlInterface().HandleCommandL((TInt)TBrCtlDefs::ECommandIdBase + (TInt)TBrCtlDefs::ECommandResumeScriptTimers ); + switch(aCommand) { case TBrCtlDefs::EClientCommandLaunchFindKeyword: @@ -3168,14 +3204,21 @@ UpdateFullScreenL(); } else { + TInt command( KErrNotFound ); + command = TBrCtlDefs::ECommandLeaveFullscreenBrowsing; + ApiProvider().BrCtlInterface().HandleCommandL( + command + (TInt)TBrCtlDefs::ECommandIdBase ); TRAP_IGNORE(AppUi()->SetOrientationL(iOrientation)); if (iPenEnabled) { Toolbar()->SetToolbarVisibility( ETrue, EFalse ); } iContentFullScreenMode = EFalse; SetFullScreenOffL(); + if (iPenEnabled) + { + StartAutoFullScreenIdleTimer(); } - + } } // ----------------------------------------------------------------------------- @@ -3192,7 +3235,9 @@ StatusPane()->SwitchLayoutL(R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT_NO_SOFTKEYS); #endif StatusPane()->MakeVisible( ETrue ); - iContainer->SetRect(ClientRect()); + + SetContentContainerRect(); + // Remove any timer that has already been set if ( iPeriodic ) { @@ -3231,7 +3276,8 @@ if (iContentFullScreenMode && ApiProvider().LastActiveViewId() == KUidBrowserContentViewId ) { StatusPane()->MakeVisible( EFalse ); - iContainer->SetRect(ClientRect()); + + SetContentContainerRect(); } } // ----------------------------------------------------------------------------- diff -r 25214794fad6 -r 08ffbd51e3fd browserui/browser/BrowserAppSrc/BrowserContentViewContainer.cpp --- a/browserui/browser/BrowserAppSrc/BrowserContentViewContainer.cpp Tue Apr 27 16:41:18 2010 +0300 +++ b/browserui/browser/BrowserAppSrc/BrowserContentViewContainer.cpp Tue May 11 16:16:13 2010 +0300 @@ -31,6 +31,8 @@ #include "BrowserWindowManager.h" #include +#include // For Layout_Meta_Data landscape/portrait status + #include #include #include @@ -652,7 +654,7 @@ iApiProvider.Display().RestoreTitleL(); } - SetRect(iView->ClientRect()); + iView->SetContentContainerRect(); if( iApiProvider.Preferences().SearchFeature() ) { diff -r 25214794fad6 -r 08ffbd51e3fd browserui/browser/BrowserAppSrc/BrowserGotoPane.cpp --- a/browserui/browser/BrowserAppSrc/BrowserGotoPane.cpp Tue Apr 27 16:41:18 2010 +0300 +++ b/browserui/browser/BrowserAppSrc/BrowserGotoPane.cpp Tue May 11 16:16:13 2010 +0300 @@ -582,6 +582,9 @@ if ( iSearchPaneActive ) { iSearchEditor->HandlePointerEventL(aPointerEvent); +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF + ActivateVKB(); +#endif } else { @@ -596,6 +599,9 @@ if ( iGotoPaneActive ) { iEditor->HandlePointerEventL(aPointerEvent); +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF + ActivateVKB(); +#endif } else { @@ -1105,6 +1111,9 @@ iEditor->SetSelectionL(pos,pos); TRAP_IGNORE(iEditor->HandlePointerEventL(pe)); } +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF + TRAP_IGNORE(SelectAllL()); +#endif } } diff -r 25214794fad6 -r 08ffbd51e3fd browserui/browser/BrowserAppSrc/BrowserPreferences.cpp --- a/browserui/browser/BrowserAppSrc/BrowserPreferences.cpp Tue Apr 27 16:41:18 2010 +0300 +++ b/browserui/browser/BrowserAppSrc/BrowserPreferences.cpp Tue May 11 16:16:13 2010 +0300 @@ -796,6 +796,7 @@ //get the destination identifyer based on the snap Id case EDestination: { + BROWSER_LOG( ( _L( "CBrowserPreferences::SetDefaultAccessPointL EDestination" ) ) ); RCmManager cmManager; cmManager.OpenL(); @@ -830,6 +831,7 @@ //if connecting with Iap Id case EConnectionMethod: { + BROWSER_LOG( ( _L( "CBrowserPreferences::SetDefaultAccessPointL EConnectionMethod" ) ) ); // if user-defined access point then check that access point still exists. // if it doesn't, reset access point to always ask and homepage to blank access point home page. CApListItem* apItem = iCommsModel.AccessPointsL()->ItemForUid( aDefaultAccessPoint ); @@ -845,6 +847,7 @@ break; } } + BROWSER_LOG( ( _L( "CBrowserPreferences::SetDefaultAccessPointL Ap is not exist, Setting to Always Ask" ) ) ); aDefaultAccessPoint = KWmlNoDefaultAccessPoint; aAssocVpn = KWmlNoDefaultAccessPoint; delete iAllPreferences.iDefaultAPDetails; @@ -927,39 +930,11 @@ //Reset default AP pointer and delete the data delete iAllPreferences.iDefaultAPDetails; iAllPreferences.iDefaultAPDetails = NULL; - if ( err != KErrNone )//Let's select the first + if ( err != KErrNone )// Set it to always ask { -#ifndef __WINSCW__ //we will not select on Wins (defaultap will be assigned a uid indicating that there is - //no default ap) but rather let ConnMan show the Conn Dlg - // The first valid access point has to be selected if exists - LOG_WRITE("WE SHOULD NOT BE HERE!!!"); - CApSelect* apSelect = CApSelect::NewLC - ( - iCommsModel.CommsDb(), - KEApIspTypeAll, //KEApIspTypeWAPMandatory, - EApBearerTypeAll, - KEApSortNameAscending, - EIPv4 | EIPv6 - ); - if ( apSelect->MoveToFirst() ) - { - iAllPreferences.iDefaultAccessPoint = apSelect->Uid(); - iApDH->AccessPointDataL( iAllPreferences.iDefaultAccessPoint, *api ); - iAllPreferences.iDefaultAPDetails = api;//save the ap details - } - else - { - iAllPreferences.iDefaultAccessPoint = KWmlNoDefaultAccessPoint; - iAllPreferences.iDefaultAPDetails = NULL; - delete api; - } - CleanupStack::PopAndDestroy(); // apSelect - CleanupStack::Pop();//api -#else - iAllPreferences.iDefaultAccessPoint = KWmlNoDefaultAccessPoint; - iAllPreferences.iDefaultAPDetails = NULL; - CleanupStack::PopAndDestroy( api ); -#endif//WINSCW + iAllPreferences.iDefaultAccessPoint = KWmlNoDefaultAccessPoint; + iAllPreferences.iDefaultAPDetails = NULL; + CleanupStack::PopAndDestroy( api ); } else { diff -r 25214794fad6 -r 08ffbd51e3fd browserui/browser/FavouritesInc/BrowserAdaptiveListPopup.h --- a/browserui/browser/FavouritesInc/BrowserAdaptiveListPopup.h Tue Apr 27 16:41:18 2010 +0300 +++ b/browserui/browser/FavouritesInc/BrowserAdaptiveListPopup.h Tue May 11 16:16:13 2010 +0300 @@ -152,7 +152,8 @@ void UpdateScrollBarPositionL(const TInt aPosition); void HandleItemClickedL(CEikListBox* aListBox ); - + static TInt ListScrollTimerCallBack(TAny* aAny); + void DoListScrolling(); private: // from CCoeControl @@ -184,6 +185,7 @@ TInt iMaxRecentUrlsToShow; // shows whether search feature is enabled or not. TBool iSearchFeature; + CPeriodic* iListScrollTimer; }; #endif // BROWSERADAPTIVELISTPOPUP_H diff -r 25214794fad6 -r 08ffbd51e3fd browserui/browser/FavouritesSrc/BrowserAdaptiveListPopup.cpp --- a/browserui/browser/FavouritesSrc/BrowserAdaptiveListPopup.cpp Tue Apr 27 16:41:18 2010 +0300 +++ b/browserui/browser/FavouritesSrc/BrowserAdaptiveListPopup.cpp Tue May 11 16:16:13 2010 +0300 @@ -270,7 +270,7 @@ { User::Leave(KErrCouldNotConnect); } - + iListScrollTimer = CPeriodic::NewL(CActive::EPriorityIdle); } // --------------------------------------------------------- @@ -285,6 +285,11 @@ delete iItemNamesToShow; delete iPrevGotoContent; delete iFirstGotoContent; + if(iListScrollTimer) + { + iListScrollTimer->Cancel(); + delete iListScrollTimer; + } } // --------------------------------------------------------- @@ -636,7 +641,13 @@ AknListBoxLayouts::SetupListboxPos( *iList, AppLayout::list_single_graphic_popup_wml_pane( 0 )); } //the last item is visible - iList->ScrollToMakeItemVisible( iList->Model()->NumberOfItems()-1 ); + //ScrollToMakeItemVisible scrolls only after some delay + if(!iListScrollTimer->IsActive()) + { + iListScrollTimer->Start(20, 0, + TCallBack(ListScrollTimerCallBack, this)); + } + #ifdef BRDO_TOUCH_ENABLED_FF const CFont* pFont = AknLayoutUtils::FontFromId(EAknLogicalFontPrimaryFont); TFontSpec fontSpec = pFont->FontSpecInTwips(); @@ -1293,5 +1304,17 @@ iMaxRecentUrlsToShow = maxRecentUrls; } +TInt CBrowserAdaptiveListPopup::ListScrollTimerCallBack(TAny* aAny) + { + CBrowserAdaptiveListPopup* self = static_cast( aAny ); + self->DoListScrolling(); + self->iListScrollTimer->Cancel(); + return KErrNone; + } + +void CBrowserAdaptiveListPopup::DoListScrolling() + { + iList->ScrollToMakeItemVisible( iList->Model()->NumberOfItems()-1 ); + } // End of File diff -r 25214794fad6 -r 08ffbd51e3fd browserui/browser/FavouritesSrc/BrowserBookmarksGotoPane.cpp --- a/browserui/browser/FavouritesSrc/BrowserBookmarksGotoPane.cpp Tue Apr 27 16:41:18 2010 +0300 +++ b/browserui/browser/FavouritesSrc/BrowserBookmarksGotoPane.cpp Tue May 11 16:16:13 2010 +0300 @@ -705,6 +705,9 @@ if(iEditor && Rect().Contains(aPointerEvent.iPosition)) { iEditor->HandlePointerEventL(aPointerEvent); +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF + ActivateVkbL(); +#endif if ( !iEditing ) { SetEditingL( ETrue ); diff -r 25214794fad6 -r 08ffbd51e3fd browserui/browser/FavouritesSrc/BrowserBookmarksView.cpp --- a/browserui/browser/FavouritesSrc/BrowserBookmarksView.cpp Tue Apr 27 16:41:18 2010 +0300 +++ b/browserui/browser/FavouritesSrc/BrowserBookmarksView.cpp Tue May 11 16:16:13 2010 +0300 @@ -1285,8 +1285,9 @@ } if ( ( item ) && ( ( item->Uid() == KFavouritesAdaptiveItemsFolderUid ) || - ( item->ContextId() != NULL ) ) - ) + ( item->ContextId() != NULL ) || + (item->IsReadOnly()) ) //If the bookmarks are the default provided by operator + ) { // We can't delete adaptive bookmarks folder, // or seamless folders @@ -1297,6 +1298,7 @@ { aMenuPane->SetItemDimmed( EWmlCmdMoveToFolder, ETrue ); } + #endif // downloads aMenuPane->SetItemDimmed( EWmlCmdDownloads, !ApiProvider().BrCtlInterface().BrowserSettingL( TBrCtlDefs::ESettingsNumOfDownloads ) ); @@ -1456,9 +1458,13 @@ { aMenuPane->SetItemDimmed( EWmlCmdEditBookmark, ETrue ); } - else if ( (item && (item->IsFolder() || + else if (( (item && (item->IsFolder() || item->Uid() == KFavouritesAdaptiveItemsFolderUid || item->ContextId() || aState.CurrentIsSpecial() || iInAdaptiveBookmarksFolder))) +#ifdef BRDO_SINGLE_CLICK_ENABLED_FF + ||(item->IsReadOnly())//If the bookmarks are readonly(set by the operator) +#endif + ) { aMenuPane->SetItemDimmed( EWmlCmdEditBookmark, ETrue ); } @@ -2239,6 +2245,10 @@ container->GotoPane()->CancelEditingL(); ApiProvider().FetchL( iEnteredURL->Des(), CBrowserLoadObserver::ELoadUrlTypeOther ); + if ( !ApiProvider().Fetching() ) + { + container->SetGotoInactiveL(); + } } } } diff -r 25214794fad6 -r 08ffbd51e3fd browserui/browser/IadSis/Readme.txt --- a/browserui/browser/IadSis/Readme.txt Tue Apr 27 16:41:18 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -This directory contains several scripts to generate a Browser SISx package - -Currently, the associated scripts have been tested building SISx packages only -for the S60 3.2.3 platform. - -to create SISx package for Browser 7.1, use buildIADsis.pl. - -Known issues -* Favengine server needs to be rebooted to take effect - -Future release support: -The following features will be supported soon -* Support for S60 5250 platform -* Support UREL and UDEB version binaries for both winscw and armv5 diff -r 25214794fad6 -r 08ffbd51e3fd browserui/browser/IadSis/buildIADsis.pl --- a/browserui/browser/IadSis/buildIADsis.pl Tue Apr 27 16:41:18 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,358 +0,0 @@ -#!/usr/local/bin/perl -w -# ============================================================================ -# Name : buildIADsis.pl -# Description: Creates SIS installation packages for S60 Browser that -# meets Arrow/IAD program requirements for delivery to end-user devices. -# Also generates R&D signed SIS packages for Nokia R&D internal use. -# -# Copyright © 2008 Nokia. All rights reserved. -# This material, including documentation and any related computer -# programs, is protected by copyright controlled by Nokia. All -# rights are reserved. Copying, including reproducing, storing, -# adapting or translating, any or all of this material requires the -# prior written consent of Nokia. This material also contains -# confidential information which may not be disclosed to others -# without the prior written consent of Nokia. -# ============================================================================ - -# TODOs -# Baseline whatlog and build whatlog need to be processed and compared - -# Notes for maintainers: -# Versioning guide: -# http://s60wiki.nokia.com/S60Wiki/How_to_guide_for_versioning -# Eclipsing ROM files using installers -# http://s60wiki.nokia.com/S60Wiki/How_to_guide_for_eclipsing_ROM_files -# Installers basics -# http://s60wiki.nokia.com/S60Wiki/How_to_guide_for_creating/signing_sis_files -# SIS file naming convention for IAD delivery -# http://s60wiki.nokia.com/S60Wiki/How_to_guide_for_uploading_sis_packages_to_IAD_server - -use strict; -use warnings; -use Getopt::Long; -use Data::Dumper; -use File::Path; -use Benchmark; - -my $usage = q{ -Usage: buildIADsis.pl -opmode dev -appversion 7.1.2 -binversion 10.1 -variant 01 -nocache -verbose - -Mandatory arguments: - -opmode : either dev or integration. If integration, use filelist argument below - -appversion: Browser version as a string e.g 7.1.420 (major.minor.build). Minor must be 1 digit. - -platform: S60 platform. E.g 3.23 or 5.0 - -variant: S60 platform specific variant code. E.g for 3.23: 01->English, 22->Chinese etc. - -Optional arguments: - -platform: S60 platform. Such as S60.323 or S60.50 - -filelist: A text file containing list of files to include in the PKG - File paths must be of the form \epoc32\dir\urel\file.ext - -binversion: version to inject inside all EXEs and DLLs. Must be 10.0 or higher. - -nocache: does everything cleanly, no old data used - -verbose: Turns on debug statements - -webkey: Web signing key filename - -webcert: Web signing certificate filename - -cenrepkey: Cenrep signing key filename - -cenrepcert: Cenrep signing certificate filename - - For quick primer on differences between Application version and Binary version, see: - http://s60wiki.nokia.com/S60Wiki/How_to_guide_for_versioning -}; - -my ($s60platform, $rawFilelist,$appVersion, $binVersion, $variant,$opmode,$lang_code); -my (@variants); -my $langgroup; -my $type = "rnd"; -my $brExe_UID3 = "0x10008D39"; #Unique ID for Browser application -my $packageTypeMajor = "RU"; # even though we use SA,RU, mention the RU in filename since it sounds more important -#TODO: We should be able to query the S60 platform by parsing some file in epoc32. Dunno how to do this. This should NOT be hardcoded. -# Inital value for s60Platform is S60.323 -$s60platform = "S60.323"; -my $cenrepPkg = ".\\pkg\\BrowserNG_Cenrep.pkg"; -my $cenrepSis = "BrowserNG_Cenrep.sis"; -my $finalBrowserPkg = ".\\pkg\\BrowserNG.pkg"; -my $debug_printing = 1; -my $nocache = 0; -#TODO: We might want to pass this as a command-line argument? Note that unsigned SIS is also generated and can always -# be signed separately. -my $webkey = ".\\cert\\RDTest_02.key"; -my $webcert = ".\\cert\\RDTest_02.der"; -my $cenrepkey = ".\\cert\\RDTest_02.key"; -my $cenrepcert = ".\\cert\\RDTest_02.der"; -my $buildType = "urel"; - -my @cleanupList = (); - -GetOptions( - "platform=s", \$s60platform, - "appversion=s",\$appVersion, - "binversion=s",\$binVersion, - "variant=s",\$variant, - "opmode=s",\$opmode, - "nocache",\$nocache, - "verbose",\$debug_printing, - "filelist=s",\$rawFilelist, - "webkey=s", \$webkey, - "webcert=s", \$webcert, - "cenrepkey=s", \$cenrepkey, - "cenrepcert=s", \$cenrepcert, - "build=s", \$buildType - ); - - -#### START OF ARG CHECKS -if ( !defined $appVersion ) { print STDERR "\nBad argument: missing appversion\n $usage"; exit; } -# Parse major.minor.build format string and choke if not well formed -# We will later insert the parsed values inside the PKG file. -my @parsedAppVer = checkAppVersion($appVersion); -if (!$parsedAppVer[3]) { print STDERR "\nBad argument: malformed appversion string ($appVersion) \n $usage"; exit; } - -#By default ROM EXEs/DLLs have a version of 10.0, so you want the newDLLs to have equal or higher minor version. See IAD Eclipsing guide for details -if ( !defined $binVersion ) { print STDOUT "\n Missing binary version, using default\n"; $binVersion = "10.1"; } -my @parsedBinVer = checkBinaryVersion($binVersion); -if (!$parsedBinVer[2]) { print STDERR "\nBad argument or default: malformed binversion string ($binVersion). \n $usage"; exit; } - -if ( !defined $variant ) { print STDERR "\nBad argument: missing variant\n $usage"; exit; } - -if ( !defined $opmode || !($opmode =~ /^dev/ || $opmode =~ /^int/)) { print STDERR "\nBad argument: Can't grok opmode\n $usage"; exit; } - -if (defined $rawFilelist && (! -e $rawFilelist) ) { print STDERR "\nBad argument: File is missing: $rawFilelist\n $usage"; exit; } - -print "no cache flag = $nocache \n" if $debug_printing; -#print "verbose = $debug_printing \n"; -#### END OF ARG CHECKS - -# IAD-compliant SIS file naming convention -# ComponentName__v___.sis -# Example: TestApplication_0x12345678_v1.2.3_SA_S60.32_Euro1.sis -# Reference: http://s60wiki.nokia.com/S60Wiki/How_to_guide_for_uploading_sis_packages_to_IAD_server -# Where: - #package version: major.minor.build - #package type: SIS package type (SA, SP,..) - #platform: S60 Platform (S60.xx where xx = 32, 50,..) - #variant: Language/operator variant - -my $browserSIS = "BrowserNG_${brExe_UID3}_v${appVersion}_${packageTypeMajor}_${s60platform}_${variant}.sis"; -# For 323 we limit the number of IAD to Chinese, Western and Japan -if ( $s60platform eq "S60.323" ) -{ - if ( $variant == 50 ) { - $browserSIS = "BrowserNG_${brExe_UID3}_v${appVersion}_${packageTypeMajor}_${s60platform}_western.sis"; - } - elsif ( $variant == 51 ) { - $browserSIS = "BrowserNG_${brExe_UID3}_v${appVersion}_${packageTypeMajor}_${s60platform}_china.sis"; - } - elsif ( $variant == 16 ) { - $browserSIS = "BrowserNG_${brExe_UID3}_v${appVersion}_${packageTypeMajor}_${s60platform}_japan.sis"; - } - else { - print STDOUT "\n build variant $variant for RnD purpose \n"; - } - print STDOUT "\n=== SIS filename: $browserSIS \n" ; -} -# Handle S60.50 situations -if ( $s60platform eq "S60.50" ) -{ -# May need special handling later -} - -### Call pkg generation perl script -system("CreateIADpackages.pl -s $s60platform -v $variant -p armv5 -r urel -bmajor $parsedAppVer[0] -bminor $parsedAppVer[1] -bnumber $parsedAppVer[2] -build $buildType"); - -# Pick up any files from the WHAT output that match any of these regex patterns -my $filenameRegEx = join '|', qw( - [.]dll$ - [.]exe$ - [.]mif$ - [.]r..$); - -# These type of files need to be stamped with a version number >= 10.0 so that the -# original files on ROM may be eclipsed. -my $binariesRegEx = join '|', qw( - [.]dll$ - [.]exe$); - - - - - - -# In any mode, use a $rawFilelist is passed from the command line -if (defined $rawFilelist) { - print STDOUT "\n=== Caller supplied list of files: $rawFilelist === \n" ; -} else { - # If no file list passed from command-line, we know how to generate one in DEV mode only - if ($opmode =~ /^dev/) { - $rawFilelist = "what_$buildType.log"; - if ($nocache || (! -e $rawFilelist) ) { - print STDOUT "\n=== Generating WHAT log, may take a while.. [",scalar(localtime),"] ===\n"; - makeWhatLog($buildType, $rawFilelist); - print STDOUT "\n=== Finished generating WHAT log ",scalar(localtime)," ===\n"; - } else { - print STDOUT "\n=== Will use cached WHAT log : $rawFilelist ===\n"; - } - } else { - die("\nBad argument: File is missing: $rawFilelist\n $usage"); - } - -} - -#Reduce list of files to those of interest -my @rawList = getRawFileList($rawFilelist); -my @filteredFiles = grep(/$filenameRegEx/i, @rawList); -#print Dumper(@filteredFiles) if $debug_printing; - -print "Changing binary files with version\n" if $debug_printing; -my @binariesOnly = grep(/$binariesRegEx/i, @filteredFiles); -# print Dumper(@binariesOnly) if $debug_printing; -for my $binaryFile (@binariesOnly) { - print STDOUT "Fixing version to $binVersion for file: $binaryFile..\n" if $debug_printing; - changeBinaryVersionAndMore("elftran", $binaryFile, $binVersion); - if ( $? == -1 || ($? >> 8) != 0 ) { cleanDeath("Elftran failed to modify : $binaryFile "); } -} - - -print STDOUT "Creating CenRep installer\n" if $debug_printing; -# No need to cleanup the sis file since it might be certificated differently -# push(@cleanupList, "$cenrepSis"); -system("makesis $cenrepPkg $cenrepSis"); -if ( $? == -1 || ($? >> 8) != 0 ) { cleanDeath("Makesis on CenRep installer failed"); } else { - #printf "\nOK %d\n", $? >> 8; -} -push(@cleanupList, "${cenrepSis}x"); -print STDOUT "\nSigning CenRep installer\n" if $debug_printing; -system("signsis -v $cenrepSis ${cenrepSis}x $cenrepcert $cenrepkey"); -if ( $? == -1 || ($? >> 8) != 0 ) { cleanDeath("Signsis on CenRep installer failed"); } else { - #printf "\nOK %d\n", $? >> 8; -} - -print STDOUT "Creating main Browser installer with filename: $browserSIS\n" if $debug_printing; -system("makesis $finalBrowserPkg $browserSIS"); -if ( $? == -1 || ($? >> 8) != 0 ) { cleanDeath("Makesis on main Browser installer failed"); } else { - #printf "\nOK %d\n", $? >> 8; -} - -print STDOUT "\nSigning main Browser installer\n" if $debug_printing; -system("signsis $browserSIS ${browserSIS}x $webcert $webkey"); -if ( $? == -1 || ($? >> 8) != 0 ) { cleanDeath("Signsis on main Browser installer failed"); } else { - #printf "OK %d\n", $? >> 8; -} - -#cleanup all transient files -cleanup(); - - -# Helps us generate list of DLLs EXEs and resource files to be packaged in SIS package -sub makeWhatLog -{ - my $buildType = shift; - my $file_whatLog = shift; - - system("\\gb_cmds\\gb_aurora_32_what.cmd armv5 $buildType > $file_whatLog"); -} - -# Returns an in-memory list of all binary and resource files that the build process generates (WHAT output) -sub getRawFileList -{ - my $filename = shift; - my @array = 0; - #print "\n == Loading file with list of all assets : $filename == \n" if $debug_printing; - open(HANDLE, $filename) || cleanDeath("Failed to open WHAT command output: $filename\n"); - @array=; - close (HANDLE); - #print Dumper(@rawList) if $debug_printing; - - return @array; -} - -# -sub changeBinaryVersionAndMore -{ - my $elfCmd = shift; - my $file = shift; - my $binaryVersion = shift; - - system("$elfCmd -version $binaryVersion -compressionmethod bytepair $file"); -} -# Dies after doing cleanup -sub cleanDeath { - my $reason = shift; - cleanup(); - die($reason); -} - -# Removes unwanted files from disk -sub cleanup { - for my $file (@cleanupList) { - print "Cleaning up: $file\n"; - unlink($file); - } -} - -# Checks for a well formed Binary Version string in major.minor format and that it is >= 10.0 -# 10.0 is the default version of in-ROM binaries that must be eclipsed by our installation. -sub checkBinaryVersion { - my ($ver) = shift; - - my ($valid, $major, $minor) = (0, 0, 0); - if ($ver =~ /^(\d+)\.(\d+)$/) { - $valid = 1; - ($major, $minor) = ($1, $2); - # {=leading-zeros-ignored} - $major =~ s/^0+//; - $minor =~ s/^0+//; - - } - - my $intMajor = int($major || 0); - my $intMinor = int($minor || 0); - - $valid = 0; - if ( $intMajor >= 10 && $intMinor >=0 ) { - $valid = 1; # enforce 10.0 or higher rule for IAD - } - - my @binVerArray = ( - $intMajor, - $intMinor, - $valid - ); - - #print Dumper(@binVerArray) if $debug_printing; - return @binVerArray; -} - -# Checks for a well formed Application Version string in major.minor.build format -# See the IAD versioning HOWTO (link above) for acceptable format -sub checkAppVersion { - my ($ver) = shift; - - my ($valid, $major, $minor, $build) = (0, 0, 0, 0); - if ($ver =~ /^(\d+)\.(\d+).(\d+)$/) { - $valid = 1; - ($major, $minor, $build) = ($1, $2, $3); - # {=leading-zeros-ignored} - $major =~ s/^0+//; - $minor =~ s/^0+//; - $build =~ s/^0+//; - } - - my $intMajor = int($major || 0); - my $intMinor = int($minor || 0); - my $intBuild = int($build || 0); - - if ($intMinor < 0 || $intMinor > 9) { - $valid = 0; # enforce single digit minor rule for IAD - } - - my @appVerArray = ( - $intMajor, - $intMinor, - $intBuild, - $valid - ); - #print Dumper(@appVerArray) if $debug_printing; - return @appVerArray; -} - diff -r 25214794fad6 -r 08ffbd51e3fd browserui/browser/IadSis/createIADpackages.pl --- a/browserui/browser/IadSis/createIADpackages.pl Tue Apr 27 16:41:18 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,557 +0,0 @@ -#!perl -# ============================================================================ -# Name: createIADPackages.pl -# -# Description: This script generate various SIS package files depeding on the -# depending on the variant selection. for example variant 01 will create -# a package support English, French, Germany and Portuguese. -# -# Example for using this script: -# perl %name create_package.pl -v 15 -p armv5 -r urel -bmajor 7 -bminor 1 -bnumber 32 -# -# Copyright © 2008 Nokia. All rights reserved. -# This material, including documentation and any related computer -# programs, is protected by copyright controlled by Nokia. All -# rights are reserved. Copying, including reproducing, storing, -# adapting or translating, any or all of this material requires the -# prior written consent of Nokia. This material also contains -# confidential information which may not be disclosed to others -# without the prior written consent of Nokia. -# ============================================================================ -# -# TODOs -# If possible, make all the components configurable -# Support 5.0 and onward -# Notes: -# Currently only armv5 is supported, winscw is not supported -# Currently only urel is supported. udeb is not supported -# Currently variant support only CCB on 323 -# -use Getopt::Long; -use File::Copy; -use File::Basename; -use strict; -use warnings; -use Cwd; -use FindBin qw($Bin); -use Data::Dumper; -use fcntl; - -my $usage = q{ -Description: This script generate browser sisx package file automatically. -This script usually is called by buildIADsis.pl. However it can be used separately as well. - -Example: create_package.pl -s S60.323 -v 01 -p armv5 -r urel -bmajor 7 -bminor 1 -bnumber 32 - -Mandatory arguments: --s: S60 platform. Value such as S60.323 or S60.50 --v: S60 language variant number --p: Build target platform. Valid values are: armv5 or winscw, only armv5 supported right now --r: Release build. Valid values are: urel or udeb, only urel supported right now --bmajor: build major number. In term of Browser version 7.1.1234, 7 is the major number --bminor: build minor number. In term of Browser version 7.1.1234, 1 is the minor number --bnumber: build number. In term of Browser version 7.1.1234, 1234 is the build number - -Optional arguments: -- None - -Limitations -- This script only support armv5 urel currently -- This script is valid for CCB on 323 build currently -}; - -my %num_lang = ( - "01" => ["western", "01", "02", "03", "14"], - "02" => ["western", "01", "09", "06", "16"], - "03" => ["western", "01", "37", "57", "50"], - "04" => ["western", "01", "05", "27", "17"], - "05" => ["western", "01", "04", "18", "13"], - "06" => ["western", "01", "51", "76", "83"], - "07" => ["western", "01", "67", "54", "49"], - "08" => ["western", "01", "68", "78", "93"], - "09" => ["western", "01", "42", "45", "79"], - "10" => ["western", "01", "59", "70", "39"], - "11" => ["western", "01", "15", "07", "08"], - "12" => ["western", "01", "58", "94"], - "13" => ["western", "01", "25", "26", "28"], - "14" => ["china", "29", "30", "157"], - "15" => ["china", "31", "159"], - "16" => ["japan", "32", "160"], - "17" => ["thai", "33", "161"], - "18" => ["western", "01", "96"], - "19" => ["china", "31", "326", "159"], - "20" => ["western", "05", "44", "401", "402"], - "50" => ["western", "01", "02", "03", "14", "09", "06", "16", "37", "57", "33", "50", "05", "27", - "17", "04", "18", "13", "51", "76", "83", "67", "54", "49", "68", "78", "93", - "42", "45", "79", "59", "70", "39", "15", "07", "08", "58", "94", "25", "26", "28", - "96", "05", "44"], - "51" => ["china", "29", "30", "157", "31", "159"] - ); -# To support western-all IAD delivery we need to remove Lang 401, 402 of variant 50 - -die $usage unless @ARGV; - -print @ARGV; -print "\n"; - -my ($s60,$variant_num,$platform,$release,$bmajor,$bminor,$bnumber,$udeburel); -$s60 = "S60.323"; # Initialize the default value -$udeburel = "urel"; -#my ($test1, $test2, $test3); -GetOptions("s=s", => \$s60, "v=s", => \$variant_num, "p=s",=> \$platform, "r=s",=> \$release, - "bmajor=s", => \$bmajor, "bminor=s",=> \$bminor, "bnumber=s",=> \$bnumber, - "build=s", => \$udeburel) or die $usage; -print "variant $variant_num \n"; -print "s60platform $s60 \n"; -print "release $release \n"; -print "bmajor, $bmajor \n"; -print "bminor, $bminor \n"; -print "bnumber, $bnumber \n"; -print "build $udeburel \n"; - -print "... package variant $variant_num\n"; -print "... package platform $platform \n"; -print "... release $release \n"; -# print "... major mini build $bmajor $bminor $bnumber \n"); -# exit; - -# print $release; print "\n"; - - -# Create BrowserNG_Cenrep.pkg file -open (CENPKGFILE, '>.\\pkg\\BrowserNG_cenrep.pkg'); -print CENPKGFILE "\;Languages\n"; -print CENPKGFILE "\&EN\n\n"; -print CENPKGFILE "\;Header\n"; -print CENPKGFILE "\#\{\"Browser CenRep INI file\"\}\, \(0x10202BE9\)\,$bmajor,$bminor,$bnumber, TYPE=SP \n\n"; -print CENPKGFILE <.\\pkg\\BrowserNG.pkg'); -#print PKGFILE <