sl@0: # Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: # All rights reserved. sl@0: # This component and the accompanying materials are made available sl@0: # under the terms of "Eclipse Public License v1.0" sl@0: # which accompanies this distribution, and is available sl@0: # at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: # sl@0: # Initial Contributors: sl@0: # Nokia Corporation - initial contribution. sl@0: # sl@0: # Contributors: sl@0: # sl@0: # Description: sl@0: # Write a Feature Registry Configuration File sl@0: # sl@0: # sl@0: sl@0: use strict; sl@0: sl@0: my $record = pack 'a4I3', sl@0: 'feat', # Must be exactly this sl@0: 0, # Must be exactly this sl@0: 3, # feature entry count sl@0: 2; # default-supported range count sl@0: # Feature Entries: sl@0: $record .= pack 'I6', sl@0: 1, # UID1 sl@0: 1, # status of UID1 (bit 0 = 0x1 is set if feature is present) sl@0: 59, # UID2 sl@0: 3, # status sl@0: 60, # and so on sl@0: 0; # ... sl@0: # Default Supported Ranges: sl@0: $record .= pack 'I2', sl@0: 50, # Low UID sl@0: 200; # High UID sl@0: # Symbian Essential Default supported range sl@0: $record .= pack 'I2', sl@0: 0x10279806,# Low UID sl@0: 0x10281805;# High UID sl@0: #$record .= '?' x 66000; # to make the file larger than the limit sl@0: sl@0: my $BINCONFIG; sl@0: open ($BINCONFIG, '>featreg.cfg') or die "Could not open binary config file for writing\n"; sl@0: binmode $BINCONFIG; sl@0: syswrite $BINCONFIG, $record, length $record; sl@0: close($BINCONFIG); sl@0: exit;