+ 1#============================================================================
+ 2#Name : sis.py
+ 3#Part of : Helium
+ 4
+ 5#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ 6#All rights reserved.
+ 7#This component and the accompanying materials are made available
+ 8#under the terms of the License "Eclipse Public License v1.0"
+ 9#which accompanies this distribution, and is available
+10#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+11#
+12#Initial Contributors:
+13#Nokia Corporation - initial contribution.
+14#
+15#Contributors:
+16#
+17#Description:
+18#===============================================================================
+19
+20importos
+21
+22importconfiguration
+23importbuildtools
+24
+25
+
32sisConfigs=self.configSet.getConfigurations()
+33commandList=buildtools.CommandList()
+34forconfiginsisConfigs:
+35makeSisArgs=['-v',config['name']+'.pkg',config['name']+'.sis']
+36makeSisCommand=buildtools.Command(config['makesis.tool'],config['path'],makeSisArgs)
+37commandList.addCommand(makeSisCommand)
+38
+39signSisArgs=['-v',config['name']+'.sis',config['name']+'.sisx',config['cert'],config['key']]
+40signSisCommand=buildtools.Command(config['signsis.tool'],config['path'],signSisArgs)
+41commandList.addCommand(signSisCommand,newstage=True)
+42
+43# This is hardcoded xcopy operation that should be replaced by a more generic
+44# definition of tasks that can be created in build files
+45srcFile=os.path.join(config['path'],config['name']+'.sisx')
+46todir=config['build.sisfiles.dir']
+47# mkdir todir
+48mkdirCommand=buildtools.Command('mkdir',config['path'],[todir])
+49commandList.addCommand(mkdirCommand,newstage=True)
+50# xcopy srcFile todir
+51copyCommand=buildtools.Command('xcopy',config['path'],[srcFile,todir])
+52commandList.addCommand(copyCommand,newstage=True)
+53
+54self.writeBuildFile(commandList,buildFilePath)
+