This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Further consolidate static logical name routines in vms/vms.c
[perl5.git] / symbian / makesis.pl
index 1ee5e8d..270f6b4 100644 (file)
@@ -5,18 +5,21 @@
 use strict;
 use lib "symbian";
 
-do "sanity.pl";
+do "sanity.pl" or die $@;
 
-my %VERSION = %{ do "version.pl" };
+my %VERSION = %{ do "version.pl" or die $@ };
 my $VERSION = "$VERSION{REVISION}$VERSION{VERSION}$VERSION{SUBVERSION}";
 my $R_V_SV  = "$VERSION{REVISION}.$VERSION{VERSION}.$VERSION{SUBVERSION}";
 
-my $SDK  = do "sdk.pl";
-my $UID  = do "uid.pl";
-my %PORT = %{ do "port.pl" };
+my ($SYMBIAN_ROOT, $SYMBIAN_VERSION, $SDK_NAME, $SDK_VARIANT, $SDK_VERSION) =
+    @{ do "sdk.pl" or die $@ };
+my $UID  = do "uid.pl" or die $@;
+my %PORT = %{ do "port.pl" or die $@ };
 
-my $ARM = 'thumb'; # TODO
-my $S60SK = $ENV{S60SDK}; # from sdk.pl
+my $ARM = 'armv5';#'thumb'; # TODO
+my $S60SDK = $ENV{S60SDK}; # from sdk.pl
+my $S80SDK = $ENV{S80SDK}; # from sdk.pl
+my $S90SDK = $ENV{S90SDK}; # from sdk.pl
 
 my $UREL = $ENV{UREL}; # from sdk.pl
 $UREL =~ s/-ARM-/$ARM/;
@@ -75,6 +78,10 @@ for my $target (@target) {
             next unless /^lib\s+(.+)/;
             chomp;
             my $f = $1;
+           unless (-f "lib/$f") {
+               warn qq[$0: No "lib/$f", skipping...\n];
+               next;
+           }
             $f =~ s:/:\\:g;
             $copy{"lib\\$f"} = "$lib\\Perl\\$R_V_SV\\$f";
             print "\t$f\n";
@@ -123,9 +130,9 @@ for my $target (@target) {
         "perl${VERSION}dll" => $UID + 0,
         "perl${VERSION}ext" => $UID + 1,
         "perl${VERSION}lib" => $UID + 2,
-
-        # app = + 3
-        # rec = + 4
+        "perlapp"           => $UID + 3,
+        "perlrecog"         => $UID + 4,
+        "perlappmin"        => $UID + 5,
     );
 
     die "$0: target has no UID\n" unless defined $UID{$target};
@@ -149,6 +156,15 @@ for my $target (@target) {
       && defined $PATCH
       && ( $PATCH eq 0 || $PATCH > 0 );
 
+     my $ProductId =
+         defined $S60SDK ?
+qq[;Supports Series 60 v0.9\n(0x101F6F88), 0, 0, 0, {"Series60ProductID"}\n] :
+         defined $S80SDK ?
+qq[;Supports Series 80 v2.0\n(0x101F8ED2), 0, 0, 0, {"Series80ProductID"}\n] :
+         defined $S90SDK ?
+qq[;Supports Series 90 v1.1\n(0x101FBE05), 0, 0, 0, {"Series90ProductID"}\n] :
+         ";Supports Series NN";
+
     open PKG, ">$pkg" or die "$0: failed to create $pkg: $!\n";
     print PKG <<__EOF__;
 ; \u$target installation script
@@ -160,12 +176,14 @@ for my $target (@target) {
 ;
 #{"\u$target"},($uid),$MAJOR,$MINOR,$PATCH
 ;
+;Localised Vendor name
+%{"Vendor-EN"}
+;
 ; Private key and certificate (unused)
 ;
 ;* "\u$target.key", "\u$target.cer"
 ;
-; Supports Series60 v0.9
-(0x101F6F88), 0, 0, 0, {"Series60ProductID"}
+$ProductId
 ; The files to install
 ;
 $copy