equal
deleted
inserted
replaced
|
1 #!perl |
|
2 # Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 # All rights reserved. |
|
4 # This component and the accompanying materials are made available |
|
5 # under the terms of the License "Symbian Foundation License v1.0" |
|
6 # which accompanies this distribution, and is available |
|
7 # at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
8 # |
|
9 # Initial Contributors: |
|
10 # Nokia Corporation - initial contribution. |
|
11 # |
|
12 # Contributors: |
|
13 # |
|
14 # Description: |
|
15 # |
|
16 |
|
17 use strict; |
|
18 use warnings; |
|
19 use FindBin; |
|
20 use lib $FindBin::Bin; |
|
21 use lib $FindBin::Bin."/old"; |
|
22 use lib $FindBin::Bin."/src"; |
|
23 use SysModelGen; |
|
24 |
|
25 #legacy stuff |
|
26 use lib $FindBin::Bin."/src/old/svg"; |
|
27 use DrawSvg; |
|
28 |
|
29 |
|
30 my %versions = &DrawSvg::SchemaVersionsFromArgs(@ARGV); |
|
31 #my $drawer = new DrawSvg(); |
|
32 |
|
33 my $nOld = 0; |
|
34 my $nCurrent = 0; |
|
35 |
|
36 # test versions here. If any are less than 3.0.0, build using old model code |
|
37 foreach my $v (keys(%versions)) |
|
38 { # need to downgrade anything in 3.x syntax |
|
39 if($v=~/^[12]\./) {$nOld++} else {$nCurrent++} |
|
40 } |
|
41 |
|
42 if($nOld && $nCurrent) |
|
43 { |
|
44 die "Cannot mix pre-3.0 syntax system definitions with 3.0 and later syntaxes"; |
|
45 } |
|
46 |
|
47 my $drawer = ($nOld) ? new DrawSvg() : new SysModelGen(); |
|
48 |
|
49 $drawer->Draw(); |
|
50 |
|
51 exit; |