aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorLars Persson2006-02-25 10:29:56 +0000
committerLars Persson2006-02-25 10:29:56 +0000
commitef195dab1703be9f9c620ea11acc27cdf02f218a (patch)
treea33afc121eccc22cab3fa4b331214b369538d847 /backends
parente053cea9c003e70fbc3a7f83b79d87c0c05feecb (diff)
downloadscummvm-rg350-ef195dab1703be9f9c620ea11acc27cdf02f218a.tar.gz
scummvm-rg350-ef195dab1703be9f9c620ea11acc27cdf02f218a.tar.bz2
scummvm-rg350-ef195dab1703be9f9c620ea11acc27cdf02f218a.zip
New makescripts for Symbian OS
svn-id: r20870
Diffstat (limited to 'backends')
-rw-r--r--backends/symbian/BuildPackageUpload_AllVersions.pl612
-rw-r--r--backends/symbian/BuildPackageUpload_LocalSettings.pl288
2 files changed, 900 insertions, 0 deletions
diff --git a/backends/symbian/BuildPackageUpload_AllVersions.pl b/backends/symbian/BuildPackageUpload_AllVersions.pl
new file mode 100644
index 0000000000..c6071eff3d
--- /dev/null
+++ b/backends/symbian/BuildPackageUpload_AllVersions.pl
@@ -0,0 +1,612 @@
+
+use Cwd;
+use Switch;
+
+system("cls");
+require "BuildPackageUpload_LocalSettings.pl";
+
+##################################################################################################################
+# prep some vars
+
+$SDK_BuildDirs{'UIQ2'} = "UIQ2";
+$SDK_BuildDirs{'UIQ3'} = "UIQ3";
+$SDK_BuildDirs{'S60v1'} = "S60";
+$SDK_BuildDirs{'S60v2'} = "S60";
+$SDK_BuildDirs{'S60v3'} = "S60v3";
+$SDK_BuildDirs{'S80'} = "S80";
+$SDK_BuildDirs{'S90'} = "S90";
+
+$build_dir = getcwd();
+$output_dir = "$build_dir/Packages";
+chdir("../../");
+$base_dir = getcwd();
+chdir($build_dir);
+$build_log_out = "$build_dir/Build.out.log";
+$build_log_err = "$build_dir/Build.err.log";
+
+$initial_path = $ENV{'PATH'}; # so we can start with a fresh PATH for each Build
+
+($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime();
+$date = sprintf("%02d%02d%02d", $year-100, $mon+=1, $mday);
+$file_tpl_pkg = "scummvm-CVS-Symbian%s.pkg";
+$file_tpl_sis = "scummvm-%s-Symbian%s%s.sis";
+$version_tpl_sis = "$date"; # "CVS$date"
+
+$PackagesQueued = 0;
+$PackagesCreated = 0;
+$PackagesUploaded = 0;
+@ErrorMessages = ();
+$ftp_url = "FTP://$FTP_User\@$FTP_Host/$FTP_Dir/";
+
+$ExtraMacros = "MACRO NONSTANDARD_PORT\n";
+$ExtraMacros .= "MACRO DISABLE_FANCY_THEMES\n";
+
+# prep nice list of SDKs
+#while( ($SDK, $RootDir) = each(%SDK_RootDirs) )
+foreach $SDK (sort keys(%SDK_RootDirs))
+{
+ $SDKs .= "$SDK\t$SDK_RootDirs{$SDK}\n\t\t\t";
+}
+
+# prep nice list of Libraries
+while( ($SDK, $Value) = each(%SDK_LibraryDirs) )
+{
+ while( ($Library, $Path) = each(%{$SDK_LibraryDirs{$SDK}}) )
+ {
+ $PresentLibs{$Library} = $Path;
+ }
+}
+foreach $Library (sort keys(%PresentLibs))
+{
+ $LIBs .= "$Library\t$PresentLibs{$Library}\n\t\t\t";
+}
+
+# prep nice list of Variations
+while( ($SDK, $Value) = each(%SDK_Variations) )
+{
+ while( ($Variation, $Value2) = each(%{$SDK_Variations{$SDK}}) )
+ {
+ $Extra = ($Variation ne '' ? "_$Variation" : "");
+ if ($SDK eq "ALL")
+ {
+ while( ($SDK2, $RootDir) = each(%SDK_RootDirs) )
+ {
+ if ($SDK_RootDirs{$SDK2} ne '') # is this SDK listed as installed? (fails silently)
+ {
+ push @Packages, sprintf($file_tpl_sis, $version_tpl_sis, $SDK2, $Extra);
+ $PackagesQueued++;
+ }
+ }
+ }
+ else
+ {
+ if ($SDK_RootDirs{$SDK} ne '') # is this SDK listed as installed? (fails silently)
+ {
+ push @Packages, sprintf($file_tpl_sis, $version_tpl_sis, $SDK, $Extra);
+ $PackagesQueued++;
+ }
+ }
+ }
+}
+foreach $Package (sort @Packages)
+{
+ $PackagesStr .= "$Package\n\t\t\t";
+}
+
+print "
+=======================================================================================
+Preparing to Build, Package & Upload $PackagesQueued SymbianOS ScummVM variations
+=======================================================================================
+
+ Producer \t$Producer (RedirE:$RedirectSTDERR HaltE:$HaltOnError Skip:$SkipExistingPackages Quiet:$ReallyQuiet)
+
+ SDKs inst'd \t$SDKs ".( %SDK_LibraryDirs ? "
+ LIBs inst'd \t$LIBs " : "" )."
+ $PackagesQueued Variations \t$PackagesStr
+ DIR base \t$base_dir
+ build \t$build_dir
+ output \t$output_dir
+".( $FTP_Host ne '' ? "
+ FTP host \t$FTP_Host
+ user \t$FTP_User
+ pass \t"."*" x length($FTP_Pass)."
+ dir \t$FTP_Dir
+" : "" )."
+=======================================================================================
+Press Ctrl-C to abort or enter to continue Build, Package & Upload $PackagesQueued Variations...
+=======================================================================================
+";
+
+$line = <STDIN>;
+
+# make sure the output dir exists!
+mkdir($output_dir, 0755) if (! -d $output_dir);
+
+unlink($build_log_out);
+unlink($build_log_err);
+
+# init _base.mmp now, so we can start changing it without affecting the CVS version _base.mmp.in!
+my $name = "mmp/scummvm_base.mmp";
+my $file = "$build_dir/$name";
+open FILE, "$file.in"; @lines = <FILE>; close FILE;
+my $onestr = join("",@lines);
+open FILE, ">$file"; print FILE $onestr; close FILE;
+
+##################################################################################################################
+# do the actual deeds for all present libs
+
+while( ($SDK, $Value) = each(%SDK_LibraryDirs) )
+{
+ while( ($Library, $Path) = each(%{$SDK_LibraryDirs{$SDK}}) )
+ {
+ if ($SDK eq "ALL")
+ {
+ while( ($SDK2, $RootDir) = each(%SDK_RootDirs) )
+ {
+ if ($SDK_RootDirs{$SDK2} ne '') # is this SDK listed as installed? (fails silently)
+ {
+ $LibrariesQueued++;
+ DoLibrary($SDK2, $Library, $Path);
+ }
+ }
+ }
+ else
+ {
+ if ($SDK_RootDirs{$SDK} ne '') # is this SDK listed as installed? (fails silently)
+ {
+ $LibrariesQueued++;
+ DoLibrary($SDK, $Library, $Path);
+ }
+ }
+ }
+}
+
+#system('pause');
+
+##################################################################################################################
+# do the actual deeds for all configured variations
+
+while( ($SDK, $VariationsHash) = each(%SDK_Variations) )
+{
+ while( ($Variation, $MacroBlock) = each(%{$SDK_Variations{$SDK}}) )
+ {
+ if ($SDK eq "ALL")
+ {
+ while( ($SDK2, $RootDir) = each(%SDK_RootDirs) )
+ {
+ if ($SDK_RootDirs{$SDK2} ne '')
+ {
+ DoVariation($SDK2, $Variation, $MacroBlock);
+ }
+ }
+ }
+ else
+ {
+ if ($SDK_RootDirs{$SDK} ne '')
+ {
+ DoVariation($SDK, $Variation, $MacroBlock);
+ }
+ }
+ }
+}
+
+##################################################################################################################
+# give report
+
+chdir($build_dir);
+
+print "
+=======================================================================================".( %SDK_LibraryDirs ? "
+Libraries selected: \t$LibrariesQueued
+ built: \t$LibrariesSucceeded " : "" )."
+Packages selected: \t$PackagesQueued $base_dir ".( $PackagesExisted ? "
+ existed: \t$PackagesExisted $output_dir " : "" )."
+ created: \t$PackagesCreated $output_dir ".( $FTP_Host ne '' ? "
+ uploaded: \t$PackagesUploaded $ftp_url " : "" )."
+=======================================================================================
+";
+
+my $count = @ErrorMessages;
+if ($count)
+{
+ print "Hmm, unfortunately some ERRORs have occurred during the process:\n";
+ foreach $Error (@ErrorMessages)
+ {
+ print "> $Error\n";
+ }
+ print "=======================================================================================\n";
+ print "\007\007\007";
+}
+
+# first clean up 'initial path' by removing possible old entries (in case of aborted builds)
+#$initial_path_system_cleaned = CleanupPath($initial_path_system);
+
+# show them we cleaned up?
+#if ($initial_path_system_cleaned ne $initial_path_system)
+#{
+# PrintMessage("PATH cleaned up from:\n$initial_path_system\n\nto:\n$initial_path_system_cleaned");
+#}
+
+print " SumthinWicked wishes you a ridiculously good and optimally happy day :P\n=======================================================================================";
+
+##################################################################################################################
+##################################################################################################################
+
+# Build, Package & Upload a single Variation
+sub DoLibrary
+{
+ my ($SDK, $Library, $Path) = @_;
+ my $Target = "$SDK - $Library";
+ my $TargetFilePath = $SDK_RootDirs{$SDK}."\\epoc32\\release\\armi\\urel\\$Library";
+ #my $TargetIntermediatePath = uc($SDK_RootDirs{$SDK}."\\EPOC32\\BUILD\\".substr($Path, 3));
+ # does this remove too much?
+ my $TargetIntermediatePath = uc($SDK_RootDirs{$SDK}."\\EPOC32\\BUILD\\");
+
+my $header = "
+=======================================================================================
+=======================================================================================
+=======================================================================================
+ Preparing to build library $Target
+=======================================================================================
+=======================================================================================
+=======================================================================================
+";
+ print $header if (!$ReallyQuiet);
+ open FILE, ">>$build_log_out"; print FILE $header; close FILE;
+ open FILE, ">>$build_log_err"; print FILE $header; close FILE;
+
+ # easy for error-handling:
+ $CurrentTarget = $Target;
+ my $OK = 1;
+
+ PrepSdkPaths($SDK);
+
+ chdir($Path) or $OK=0;
+ PrintErrorMessage("Changing to $Path failed!") if (!$OK);
+ return 0 if (!$OK);
+
+ PrintMessage("Cleaning for $Target") if (!$ReallyQuiet);
+ system("bldmake bldfiles > NUL 2> NUL");
+ PrintErrorMessage("'bldmake bldfiles' exited with value " . ($? >> 8)) if ($? >> 8);
+ system("abld clean armi urel > NUL 2> NUL");
+ PrintErrorMessage("'abld clean armi urel' exited with value " . ($? >> 8)) if ($? >> 8);
+ # remove file so we are sure that after .lib generation we have a fresh copy!
+ if (-e $TargetFilePath) { unlink($TargetFilePath) or PrintErrorMessage("Removing $TargetFilePath"); }
+
+ my $Redirection = "OUT:file, ERR:".($RedirectSTDERR ? "file" : "screen");
+ PrintMessage("Building $Target ($Redirection)");
+ my $OldSize = (-s $build_log_err);
+ $Redirection = ($RedirectSTDERR ? "2>> $build_log_err" : "");
+ system("abld build armi urel $Redirection >> $build_log_out");
+ $OK = 0 if ($? >> 8);
+# print " STDERR: ".((-s $build_log_err)-$OldSize)." bytes output written to $build_log_err\n+--------------------------------------------------------------------------------------\n" if ($OldSize != (-s $build_log_err));
+ PrintErrorMessage("'abld build armi urel' exited with value " . ($? >> 8)) if ($? >> 8);
+ return 0 if (!$OK); # ABLD always returns ok :( grr
+ PrintMessage("Done.") if (!$ReallyQuiet);
+
+ # did it work? :)
+ if (-e $TargetFilePath)
+ {
+ $LibrariesSucceeded++;
+
+ if ($TargetIntermediatePath ne '' && $TargetIntermediatePath =~ /\\EPOC32\\BUILD\\/i) # make really sure it's a valid path!
+ {
+ system("del /S /Q $TargetIntermediatePath > NUL");
+ }
+ return 1;
+ }
+ else
+ {
+ PrintErrorMessage("'abld build armi urel' apparently failed.");
+ if ($HaltOnError)
+ {
+ PrintErrorMessage("Halting on error as requested!");
+ exit 1;
+ }
+ return 0;
+ }
+}
+
+##################################################################################################################
+
+# Build, Package & Upload a single Variation
+sub DoVariation
+{
+ my ($SDK, $Variation, $MacroBlock) = @_;
+ my $Extra = ($Variation ne '' ? "_$Variation" : "");
+ my $Package = sprintf($file_tpl_sis, $version_tpl_sis, $SDK, $Extra);
+
+ if ($SkipExistingPackages && -f "$output_dir/$Package")
+ {
+ PrintMessage("Skipping $Package (already exists!)");
+ $PackagesExisted++;
+ return;
+ }
+
+my $header = "
+=======================================================================================
+=======================================================================================
+=======================================================================================
+ Preparing to build $Package
+=======================================================================================
+=======================================================================================
+=======================================================================================
+";
+ print $header if (!$ReallyQuiet);
+ open FILE, ">>$build_log_out"; print FILE $header; close FILE;
+ open FILE, ">>$build_log_err"; print FILE $header; close FILE;
+
+ # easy for error-handling:
+ $CurrentTarget = $Package;
+ my $OK;
+
+ $OK = PrepVariation($SDK, $Variation, $Package, $MacroBlock);
+
+ if ($OK)
+ {
+ $OK = BuildVariation($SDK, $Variation, $Package, $MacroBlock);
+
+ if ($OK && $FTP_Host ne '')
+ {
+ UploadVariation($SDK, $Variation, $Package);
+ }
+ }
+}
+
+##################################################################################################################
+
+sub PrepVariation()
+{
+ my ($SDK, $Variation, $Package, $MacroBlock) = @_;
+ my $OK = 1;
+
+ PrepSdkPaths($SDK);
+
+ chdir($build_dir) or $OK=0;
+ PrintErrorMessage("Changing to $build_dir failed!") if (!$OK);
+ return 0 if (!$OK);
+
+ # insert $MacroBlock into AUTO_MACRO_MASTER in scummvm_base.mmp
+ PrintMessage("Setting new AUTO_MACROS_MASTER in scummvm_base.mmp for '$Variation'") if (!$ReallyQuiet);
+ my $n = "AUTO_MACROS_MASTER";
+ my $a = "\/\/START_$n\/\/";
+ my $b = "\/\/STOP_$n\/\/";
+ my $name = "scummvm_base.mmp";
+ my $file = "$build_dir/mmp/$name";
+ my $updated = " Updated @ ".localtime();
+
+ open FILE, "$file" or $OK=0;
+ PrintErrorMessage("Reading file '$file'") if (!$OK);
+ return 0 if (!$OK);
+ my @lines = <FILE>;
+ close FILE;
+
+ my $onestr = join("",@lines);
+ $MacroBlock =~ s/^\s*//gm;
+ $onestr =~ s/$a(.*)$b/$a$updated\n$ExtraMacros$MacroBlock$b/s;
+
+ open FILE, ">$file" or $OK=0;
+ PrintErrorMessage("Writing file '$file'") if (!$OK);
+ return 0 if (!$OK);
+ print FILE $onestr;
+ close FILE;
+
+ # running AdaptAllMMPs.pl to propagate changes
+ PrintMessage("Running AdaptAllMMPs.pl to propagate MACRO changes") if (!$ReallyQuiet);
+ system("perl AdaptAllMMPs.pl > NUL");
+ $OK = 0 if ($? >> 8);
+ PrintErrorMessage("'AdaptAllMMPs.pl' exited with value " . ($? >> 8)) if ($? >> 8);
+ return 0 if (!$OK);
+
+ # we are here: so all is ok :)
+ return 1;
+}
+
+##################################################################################################################
+
+sub BuildVariation()
+{
+ my ($SDK, $Variation, $Package, $MacroBlock) = @_;
+ my $OK = 1;
+
+ my $dir = $build_dir."/".$SDK_BuildDirs{$SDK};
+ $dir =~ s#/#\\#g;
+ chdir($dir);
+
+ #my $TargetIntermediatePath = uc($SDK_RootDirs{$SDK}."\\EPOC32\\BUILD\\".substr($dir, 3));
+ # does this remove too much?
+ my $TargetIntermediatePath = uc($SDK_RootDirs{$SDK}."\\EPOC32\\BUILD\\");
+
+ PrintMessage("Cleaning for $Package") if (!$ReallyQuiet);
+
+ # remove some files so we are sure that after .sis package generation we have a fresh copy!
+ my $UnlinkFile = "$output_dir/$Package";
+ if (-e $UnlinkFile) { unlink($UnlinkFile) or PrintErrorMessage("Removing $UnlinkFile"); }
+ $UnlinkFile = $SDK_RootDirs{$SDK}."/epoc32/release/armi/urel/ScummVM.app";
+ if (-e $UnlinkFile) { unlink($UnlinkFile) or PrintErrorMessage("Removing $UnlinkFile"); }
+ $UnlinkFile = $SDK_RootDirs{$SDK}."/epoc32/release/armi/urel/ScummVM.exe";
+ if (-e $UnlinkFile) { unlink($UnlinkFile) or PrintErrorMessage("Removing $UnlinkFile"); }
+
+ system("bldmake bldfiles 2> NUL > NUL");
+ PrintErrorMessage("'bldmake bldfiles' exited with value " . ($? >> 8)) if ($? >> 8);
+
+ system("abld clean armi urel 2> NUL > NUL");
+ PrintErrorMessage("'abld clean armi urel' exited with value " . ($? >> 8)) if ($? >> 8);
+
+ my $Redirection = "OUT:file, ERR:".($RedirectSTDERR ? "file" : "screen");
+ PrintMessage("Building $Package ($Redirection)");
+
+ my $OldSize = (-s $build_log_err);
+ $Redirection = ($RedirectSTDERR ? "2>> $build_log_err" : "");
+ system("abld build armi urel $Redirection >> $build_log_out");
+ $OK = 0 if ($? >> 8);
+ print " STDERR: ".((-s $build_log_err)-$OldSize)." bytes output written to $build_log_err\n+--------------------------------------------------------------------------------------\n" if ($OldSize != (-s $build_log_err));
+ PrintErrorMessage("'abld build armi urel' exited with value " . ($? >> 8)) if ($? >> 8);
+ return 0 if (!$OK); # ABLD always returns ok :( grr
+ PrintMessage("Done.") if (!$ReallyQuiet);
+
+ # do we have an override suffix for the package name?
+ $MacroBlock =~ /^\s*\/\/\s*PKG_SUFFIX:\s*(\w+)\s*/gm; # using '@' as delimiter here instead of '/' for clarity
+ my $PkgSuffix = $1; # can be ""
+ my $PkgFile = sprintf($file_tpl_pkg, $SDK.$PkgSuffix);
+
+ PrintMessage("Creating package $Package") if (!$ReallyQuiet);
+## fix if (!$ReallyQuiet) for next:
+ system("makesis -d\"".$SDK_RootDirs{$SDK}."\" $PkgFile \"$output_dir/$Package\" $Redirection >> $build_log_out");
+ $OK = 0 if ($? >> 8);
+ PrintErrorMessage("'makesis' $PkgFile exited with value " . ($? >> 8)) if (!$OK);
+ if ($HaltOnError && !$OK)
+ {
+ PrintErrorMessage("Halting on error as requested!");
+ exit 1;
+ }
+ return 0 if (!$OK);
+
+ # did it work? :)
+ if (-e "$output_dir/$Package")
+ {
+ $PackagesCreated++;
+
+ if ($TargetIntermediatePath ne '' && $TargetIntermediatePath =~ /\\EPOC32\\BUILD\\/i) # make really sure it's a valid path!
+ {
+ #PrintMessage("Cleaning $TargetIntermediatePath");
+ system("del /S /Q $TargetIntermediatePath > NUL");
+ }
+ return 1;
+ }
+ else
+ {
+ PrintErrorMessage("'makesis' apparently failed. (?)");
+ return 0;
+ }
+}
+
+##################################################################################################################
+
+sub UploadVariation()
+{
+ my ($SDK, $Variation, $Package) = @_;
+
+ use Net::FTP;
+ my $newerr;
+
+ PrintMessage("Connecting to FTP $FTP_Host") if (!$ReallyQuiet);
+
+ $ftp = Net::FTP->new($FTP_Host,Timeout=>240) or $newerr=1;
+ PrintErrorMessage("Connecting to FTP $FTP_Host! Aborting!") if $newerr;
+ if (!$newerr)
+ {
+ $ftp->login($FTP_User, $FTP_Pass) or $newerr=1;
+ PrintErrorMessage("Logging in with $FTP_User to $FTP_Host! Aborting!") if $newerr;
+ if (!$newerr)
+ {
+ if ($FTP_Dir ne '') # do we need to change dir?
+ {
+ PrintMessage("Changing to dir $FTP_Dir");
+ $ftp->cwd($FTP_Dir) or $newerr=1;
+
+ if ($newerr)
+ {
+ PrintErrorMessage("Changing to dir $FTP_Dir! Aborting!");
+ $ftp->quit;
+ return;
+ }
+ }
+
+# leave this for possible auto-deletion of old files?
+# @files = $ftp->dir or $newerr=1;
+# push @ERRORS, "Can't get file list $!\n" if $newerr;
+# print "Got file list\n";
+# foreach(@files) {
+# print "$_\n";
+# }
+
+ PrintMessage("Uploading $Package (".(-s "$output_dir/$Package")." bytes)");
+
+ $ftp->binary;
+ $ftp->put("$output_dir/$Package") or $newerr=1;
+ PrintErrorMessage("Uploading package! Aborting!") if $newerr;
+ $PackagesUploaded++ if (!$newerr);
+ }
+
+ $ftp->quit;
+ }
+}
+
+##################################################################################################################
+
+sub PrepSdkPaths()
+{
+ my ($SDK) = @_;
+ my $EPOCROOT = $SDK_RootDirs{$SDK};
+ my $EPOC32RT = "$EPOCROOT\\epoc32";
+ my $AdditionalPathEntries = "";
+ my $OK = 1;
+
+ # do the directories exist?
+ if (! -d $EPOCROOT) { PrintErrorMessage("$SDK Directory does not exist: '$EPOCROOT'"); return 0; }
+ if (! -d $EPOC32RT) { PrintErrorMessage("$SDK Directory does not exist: '$EPOC32RT'"); return 0; }
+
+ # set env stuff
+ PrintMessage("Prepending $SDK specific paths to %PATH%") if (!$ReallyQuiet);
+ $AdditionalPathEntries .= "$ECompXL_BinDir;" if ($ECompXL_BinDir ne '' && $SDK eq 'UIQ2');
+ $AdditionalPathEntries .= "$EPOC32RT\\include;";
+ $AdditionalPathEntries .= "$EPOC32RT\\tools;";
+ $AdditionalPathEntries .= "$EPOC32RT\\gcc\\bin;";
+ $ENV{'EPOCROOT'} = substr($EPOCROOT,2)."\\"; # strips drive letter, needs to end with backslash!
+ $ENV{'PATH'} = "$AdditionalPathEntries$initial_path";
+
+ return 1;
+}
+
+##################################################################################################################
+
+sub CleanupPath()
+{
+ my ($path) = @_;
+
+ if ($ECompXL_BinDir ne '')
+ {
+ $path =~ s/\"\Q$ECompXL_BinDir\E\";//g;
+ }
+
+ while( ($SDK, $RootDir) = each(%SDK_RootDirs) )
+ {
+ if ($SDK_RootDirs{$SDK} ne '')
+ {
+ my $path_component = "\"".$SDK_RootDirs{$SDK}."\\epoc32\\";
+ $path =~ s/\Q$path_component\E.*?\";//g;
+ }
+ }
+
+ return $path;
+}
+
+##################################################################################################################
+
+sub PrintErrorMessage()
+{
+ my ($msg) = @_;
+
+ # add to array, so we can print it @ the end!
+ push @ErrorMessages, "$CurrentTarget: $msg";
+
+ print "+--------------------------------------------------------------------------------------\n";
+ PrintMessage("ERROR: $CurrentTarget: $msg");
+ print "\007" if (!$HaltOnError);
+ print "\007\007\007" if ($HaltOnError); # make more noise if halt-on-error
+}
+
+sub PrintMessage()
+{
+ my ($msg) = @_;
+
+ print "| $msg\n";
+ print "+--------------------------------------------------------------------------------------\n";
+#$line = <STDIN>;
+
+ #print "\e[1,31m> $msg\e[0m\n";
+}
+
+##################################################################################################################
+ \ No newline at end of file
diff --git a/backends/symbian/BuildPackageUpload_LocalSettings.pl b/backends/symbian/BuildPackageUpload_LocalSettings.pl
new file mode 100644
index 0000000000..08a903557f
--- /dev/null
+++ b/backends/symbian/BuildPackageUpload_LocalSettings.pl
@@ -0,0 +1,288 @@
+
+##################################################################################################################
+
+ # you can use these below for speed & clarity or override with custom settings
+ $DefaultTopMacros = "
+ MACRO USE_ZLIB // LIB:zlib.lib
+ MACRO USE_MAD // LIB:libmad.lib
+ //MACRO USE_TREMOR // LIB:libtremor.lib
+ ";
+
+ $DefaultBottomMacros = "
+ MACRO DISABLE_SWORD1 // LIB:scummvm_sword1.lib
+ MACRO DISABLE_SWORD2 // LIB:scummvm_sword2.lib
+ MACRO DISABLE_LURE // LIB:scummvm_lure.lib
+ ";
+
+ ##
+ ## General system information:
+ ##
+
+ # this way you can use the same LocalSettings.pl file on multiple machines!
+ if ($ENV{'COMPUTERNAME'} eq "MYCOMPUTER")
+ {
+ # might use this string for file/dir naming in the future :)
+ $Producer = "BUILDERNAME";
+ $RedirectSTDERR = 0;
+ $HaltOnError = 1;
+ $SkipExistingPackages = 0;
+ $ReallyQuiet = 0;
+
+ # specify an optional FTP server to upload to after each Build+Package (can leave empty)
+ #$FTP_Host = "ftp.myftp.net";
+ #$FTP_User = "user";
+ #$FTP_Pass = "pass";
+ #$FTP_Dir = "directory";
+
+ # possible SDKs: ("UIQ2", UIQ3", "S60v1", "S60v2", "S60v3", "S80", "S90")
+ # Note1: the \epoc32 directory needs to be in these rootdirs
+ # Note2: these paths do NOT end in a backslash!
+ $SDK_RootDirs{'UIQ2'} = "C:\\S\\UIQ_21";
+ $SDK_RootDirs{'S60v1'} = "C:\\S\\S60v1";
+ $SDK_RootDirs{'S60v2'} = "C:\\S\\S60v2";
+ $SDK_RootDirs{'S80'} = "C:\\S\\S80";
+ $SDK_RootDirs{'S90'} = "C:\\S\\S90";
+ $ECompXL_BinDir = "C:\\S\\ECompXL\\bin"; # only needed for UIQ
+ # you need to specify each of the SDKs used in the blocks below!
+
+ # these supporting libraries get built first, then all the Variations
+ # Note: the string {'xxx.lib'} is used in checking in build success: so needs to be accurate!
+ if (0) # so we can turn them on/off easily
+ {
+ #$SDK_LibraryDirs{'ALL'}{'zlib.lib'} = "C:\\S\\zlib-1.2.2\\epoc";
+ #$SDK_LibraryDirs{'ALL'}{'libmad.lib'} = "C:\\S\\libmad-0.15.1b\\group";
+ #$SDK_LibraryDirs{'ALL'}{'libtremor.lib'}= "C:\\S\\tremor\\epoc";
+ $SDK_LibraryDirs{'UIQ2'}{'esdl.lib'} = $SDK_LibraryDirs{'UIQ3'}{'esdl.lib'} = "C:\\S\\ESDL\\epoc\\UIQ";
+ #$SDK_LibraryDirs{'S60v1'}{'esdl.lib'} = $SDK_LibraryDirs{'S60v2'}{'esdl.lib'} = $SDK_LibraryDirs{'S60v3'}{'esdl.lib'} = "C:\\S\\ESDL\\epoc\\S60";
+ #$SDK_LibraryDirs{'S80'}{'esdl.lib'} = "C:\\S\\ESDL\\epoc\\S80";
+ #$SDK_LibraryDirs{'S90'}{'esdl.lib'} = "C:\\S\\ESDL\\epoc\\S90";
+ #$SDK_LibraryDirs{'ALL'}{'libmpeg2.lib'} = "C:\\S\\mpeg2dec-0.4.0\\epoc";
+ }
+
+ # backup :P
+ #Path=C:\Progra~1\Active\Python24\.;C:\Program Files\Active\Tcl\bin;C:\Progra~1\Active\Perl\bin\;C:\WINDOWS\system32;C:\W
+ #INDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\GNU\cvsnt;C:\Progra
+ #m Files\WinSCP3\;"C:\Program Files\Common Files\Microsoft Shared\VSA\8.0\VsaEnv\";"c:\Program Files\Microsoft Visual Stu
+ #dio 8\VC\bin";"C:\Program Files\UltraEdit-32"
+ }
+ elsif ($ENV{'COMPUTERNAME'} eq "TSSLND0106")
+ {
+#see previous section
+ # now you can add $SDK_Variations only built on this PC here :)
+ }
+ else
+ {
+ print "ERROR: Computer name ".$ENV{'COMPUTERNAME'}." not recognized! Plz edit _LocalSettings.pl!";
+ exit 1;
+ }
+
+ ##
+ ## Variation defines:
+ ##
+
+ # second hash index = literal string used in .sis file created.
+ # empty string also removes the trailing '_'. Some 051101 examples:
+
+ # $SDK_Variations{'UIQ2'}{''} would produce:
+ # scummvm-051101-SymbianUIQ2.sis
+
+ # $SDK_Variations{'S60v2'}{'simon'} would produce:
+ # scummvm-051101-SymbianS60v2_simon.sis
+
+ # $SDK_Variations{'ALL'}{'queen'} with all $SDK_RootDirs defined would produce:
+ # scummvm-051101-SymbianUIQ2_queen.sis
+ # scummvm-051101-SymbianUIQ3_queen.sis
+ # scummvm-051101-SymbianS60v1_queen.sis
+ # scummvm-051101-SymbianS60v2_queen.sis
+ # scummvm-051101-SymbianS60v3_queen.sis
+ # scummvm-051101-SymbianS80_queen.sis
+ # scummvm-051101-SymbianS90_queen.sis
+
+ $SDK_Variations{'UIQ2'}{'test'} = "$DefaultTopMacro
+ MACRO USE_TREMOR // LIB:libtremor.lib
+ //MACRO DISABLE_SCUMM // LIB:scummvm_scumm.lib
+ //MACRO DISABLE_SIMON // LIB:scummvm_simon.lib
+ //MACRO DISABLE_SKY // LIB:scummvm_sky.lib
+ //MACRO DISABLE_QUEEN // LIB:scummvm_queen.lib
+ //MACRO DISABLE_GOB // LIB:scummvm_gob.lib
+ //MACRO DISABLE_SAGA // LIB:scummvm_saga.lib
+ //MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
+ $DefaultBottomMacros";
+# $SDK_Variations{'S60v1'}{'test'} = $SDK_Variations{'UIQ2'}{'test'};
+
+if (0) # all regular combo's
+{
+ # the first one includes all SDKs & engines
+
+ $SDK_Variations{'ALL'}{'all'} = "$DefaultTopMacros
+ //MACRO DISABLE_SCUMM // LIB:scummvm_scumm.lib
+ //MACRO DISABLE_SIMON // LIB:scummvm_simon.lib
+ //MACRO DISABLE_SKY // LIB:scummvm_sky.lib
+ //MACRO DISABLE_QUEEN // LIB:scummvm_queen.lib
+ //MACRO DISABLE_GOB // LIB:scummvm_gob.lib
+ //MACRO DISABLE_SAGA // LIB:scummvm_saga.lib
+ //MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
+ $DefaultBottomMacros";
+
+ # now one for each ready-for-release engine
+
+ $SDK_Variations{'ALL'}{'scumm'} = "$DefaultTopMacros
+ //MACRO DISABLE_SCUMM // LIB:scummvm_scumm.lib
+ MACRO DISABLE_SIMON // LIB:scummvm_simon.lib
+ MACRO DISABLE_SKY // LIB:scummvm_sky.lib
+ MACRO DISABLE_QUEEN // LIB:scummvm_queen.lib
+ MACRO DISABLE_GOB // LIB:scummvm_gob.lib
+ MACRO DISABLE_SAGA // LIB:scummvm_saga.lib
+ MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
+ $DefaultBottomMacros";
+
+ $SDK_Variations{'ALL'}{'simon'} = "$DefaultTopMacros
+ MACRO DISABLE_SCUMM // LIB:scummvm_scumm.lib
+ //MACRO DISABLE_SIMON // LIB:scummvm_simon.lib
+ MACRO DISABLE_SKY // LIB:scummvm_sky.lib
+ MACRO DISABLE_QUEEN // LIB:scummvm_queen.lib
+ MACRO DISABLE_GOB // LIB:scummvm_gob.lib
+ MACRO DISABLE_SAGA // LIB:scummvm_saga.lib
+ MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
+ $DefaultBottomMacros";
+
+ $SDK_Variations{'ALL'}{'sky'} = "$DefaultTopMacros
+ MACRO DISABLE_SCUMM // LIB:scummvm_scumm.lib
+ MACRO DISABLE_SIMON // LIB:scummvm_simon.lib
+ //MACRO DISABLE_SKY // LIB:scummvm_sky.lib
+ MACRO DISABLE_QUEEN // LIB:scummvm_queen.lib
+ MACRO DISABLE_GOB // LIB:scummvm_gob.lib
+ MACRO DISABLE_SAGA // LIB:scummvm_saga.lib
+ MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
+ $DefaultBottomMacros";
+
+ $SDK_Variations{'ALL'}{'queen'} = "$DefaultTopMacros
+ MACRO DISABLE_SCUMM // LIB:scummvm_scumm.lib
+ MACRO DISABLE_SIMON // LIB:scummvm_simon.lib
+ MACRO DISABLE_SKY // LIB:scummvm_sky.lib
+ //MACRO DISABLE_QUEEN // LIB:scummvm_queen.lib
+ MACRO DISABLE_GOB // LIB:scummvm_gob.lib
+ MACRO DISABLE_SAGA // LIB:scummvm_saga.lib
+ MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
+ $DefaultBottomMacros";
+
+ $SDK_Variations{'ALL'}{'gob'} = "$DefaultTopMacros
+ MACRO DISABLE_SCUMM // LIB:scummvm_scumm.lib
+ MACRO DISABLE_SIMON // LIB:scummvm_simon.lib
+ MACRO DISABLE_SKY // LIB:scummvm_sky.lib
+ MACRO DISABLE_QUEEN // LIB:scummvm_queen.lib
+ //MACRO DISABLE_GOB // LIB:scummvm_gob.lib
+ MACRO DISABLE_SAGA // LIB:scummvm_saga.lib
+ MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
+ $DefaultBottomMacros";
+
+ $SDK_Variations{'ALL'}{'saga'} = "$DefaultTopMacros
+ MACRO DISABLE_SCUMM // LIB:scummvm_scumm.lib
+ MACRO DISABLE_SIMON // LIB:scummvm_simon.lib
+ MACRO DISABLE_SKY // LIB:scummvm_sky.lib
+ MACRO DISABLE_QUEEN // LIB:scummvm_queen.lib
+ MACRO DISABLE_GOB // LIB:scummvm_gob.lib
+ //MACRO DISABLE_SAGA // LIB:scummvm_saga.lib
+ MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
+ $DefaultBottomMacros";
+
+ $SDK_Variations{'ALL'}{'kyra'} = "$DefaultTopMacros
+ MACRO DISABLE_SCUMM // LIB:scummvm_scumm.lib
+ MACRO DISABLE_SIMON // LIB:scummvm_simon.lib
+ MACRO DISABLE_SKY // LIB:scummvm_sky.lib
+ MACRO DISABLE_QUEEN // LIB:scummvm_queen.lib
+ MACRO DISABLE_GOB // LIB:scummvm_gob.lib
+ MACRO DISABLE_SAGA // LIB:scummvm_saga.lib
+ //MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
+ $DefaultBottomMacros";
+
+ # below here you could specify weird & experimental combinations, non-ready engines
+
+ $SDK_Variations{'ALL'}{'test_lure'} = "$DefaultTopMacros
+ MACRO DISABLE_SCUMM // LIB:scummvm_scumm.lib
+ MACRO DISABLE_SIMON // LIB:scummvm_simon.lib
+ MACRO DISABLE_SKY // LIB:scummvm_sky.lib
+ MACRO DISABLE_QUEEN // LIB:scummvm_queen.lib
+ MACRO DISABLE_GOB // LIB:scummvm_gob.lib
+ MACRO DISABLE_SAGA // LIB:scummvm_saga.lib
+ MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
+ MACRO DISABLE_SWORD1 // LIB:scummvm_sword1.lib
+ MACRO DISABLE_SWORD2 // LIB:scummvm_sword2.lib
+ //MACRO DISABLE_LURE // LIB:scummvm_lure.lib
+ ";
+
+ $SDK_Variations{'ALL'}{'saga_mini'} = "
+ //MACRO USE_ZLIB // LIB:zlib.lib
+ //MACRO USE_MAD // LIB:libmad.lib
+ //MACRO USE_TREMOR // LIB:libtremor.lib
+ MACRO DISABLE_SCUMM // LIB:scummvm_scumm.lib
+ MACRO DISABLE_SIMON // LIB:scummvm_simon.lib
+ MACRO DISABLE_SKY // LIB:scummvm_sky.lib
+ MACRO DISABLE_QUEEN // LIB:scummvm_queen.lib
+ MACRO DISABLE_GOB // LIB:scummvm_gob.lib
+ //MACRO DISABLE_SAGA // LIB:scummvm_saga.lib
+ MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
+ $DefaultBottomMacros";
+
+ $SDK_Variations{'ALL'}{'scumm_no78he'} = "
+ MACRO USE_ZLIB // LIB:zlib.lib
+ MACRO USE_MAD // LIB:libmad.lib
+ //MACRO USE_TREMOR // LIB:libtremor.lib
+ //MACRO DISABLE_SCUMM // LIB:scummvm_scumm.lib
+ MACRO DISABLE_SIMON // LIB:scummvm_simon.lib
+ MACRO DISABLE_SKY // LIB:scummvm_sky.lib
+ MACRO DISABLE_QUEEN // LIB:scummvm_queen.lib
+ MACRO DISABLE_GOB // LIB:scummvm_gob.lib
+ MACRO DISABLE_SAGA // LIB:scummvm_saga.lib
+ MACRO DISABLE_SCUMM_7_8
+ MACRO DISABLE_SCUMM_HE
+ MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
+ $DefaultBottomMacros";
+
+# $SDK_Variations{'ALL'}{'all_vorbis'} = "
+# MACRO USE_ZLIB // LIB:zlib.lib
+# MACRO USE_MAD // LIB:libmad.lib
+# MACRO USE_TREMOR // LIB:libtremor.lib
+# //MACRO DISABLE_SCUMM // LIB:scummvm_scumm.lib
+# //MACRO DISABLE_SIMON // LIB:scummvm_simon.lib
+# //MACRO DISABLE_SKY // LIB:scummvm_sky.lib
+# //MACRO DISABLE_QUEEN // LIB:scummvm_queen.lib
+# //MACRO DISABLE_GOB // LIB:scummvm_gob.lib
+# //MACRO DISABLE_SAGA // LIB:scummvm_saga.lib
+# $DefaultBottomMacros";
+}
+
+#
+# $SDK_Variations{'S60v2'}{'test_sword'} = "$DefaultTopMacros
+# MACRO USE_MPEG2 // LIB:libmpeg2.lib
+# MACRO USE_TREMOR // LIB:libtremor.lib
+# MACRO DISABLE_SCUMM // LIB:scummvm_scumm.lib
+# MACRO DISABLE_SIMON // LIB:scummvm_simon.lib
+# MACRO DISABLE_SKY // LIB:scummvm_sky.lib
+# MACRO DISABLE_QUEEN // LIB:scummvm_queen.lib
+# MACRO DISABLE_GOB // LIB:scummvm_gob.lib
+# MACRO DISABLE_SAGA // LIB:scummvm_saga.lib
+# MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
+# //MACRO DISABLE_SWORD1 // LIB:scummvm_sword1.lib
+# //MACRO DISABLE_SWORD2 // LIB:scummvm_sword2.lib
+# ";
+# $SDK_Variations{'UIQ2'}{'test_sword'} = $SDK_Variations{'S60v2'}{'test_sword'}
+#
+
+# for mega-fast-testing only plz!
+# $SDK_Variations{'UIQ2'}{'(fast_empty)'} = "
+# //MACRO USE_ZLIB // LIB:zlib.lib
+# //MACRO USE_MAD // LIB:libmad.lib
+# //MACRO USE_TREMOR // LIB:libtremor.lib
+# MACRO USE_UIQ_SE_VIBRA // LIB:vibration.lib
+# MACRO DISABLE_SCUMM // LIB:scummvm_scumm.lib
+# MACRO DISABLE_SIMON // LIB:scummvm_simon.lib
+# MACRO DISABLE_SKY // LIB:scummvm_sky.lib
+# //MACRO DISABLE_QUEEN // LIB:scummvm_queen.lib
+# MACRO DISABLE_GOB // LIB:scummvm_gob.lib
+# MACRO DISABLE_SAGA // LIB:scummvm_saga.lib
+# $DefaultBottomMacros";
+
+##################################################################################################################
+
+1; \ No newline at end of file