diff options
author | Vladimir Glazunov <vg@openoffice.org> | 2010-08-25 16:13:14 +0200 |
---|---|---|
committer | Vladimir Glazunov <vg@openoffice.org> | 2010-08-25 16:13:14 +0200 |
commit | 302b5ce7a81635fb0f5dde3d08777361de204e22 (patch) | |
tree | 9238e3db63806eb32c5e1c07f28834b6bda812d4 | |
parent | b63a5a9e8e235da89dcc6c721de93326f9975353 (diff) | |
parent | 63b41e2967bd928e01b57b010471c11c346da2f3 (diff) |
DEV300: changesets OOO330 up to m5
-rwxr-xr-x | ooo.lst | 2 | ||||
-rw-r--r-- | scp2/source/ooo/common_brand.scp | 18 | ||||
-rw-r--r-- | scp2/source/ooo/profileitem_ooo.scp | 1 | ||||
-rwxr-xr-x | scp2/source/ooo/windowscustomaction_ooo.scp | 29 | ||||
-rw-r--r--[-rwxr-xr-x] | solenv/bin/build.pl | 221 | ||||
-rwxr-xr-x | solenv/bin/jpropex | 10 | ||||
-rw-r--r-- | solenv/bin/modules/RepositoryHelper.pm | 205 | ||||
-rwxr-xr-x[-rw-r--r--] | solenv/bin/modules/SourceConfig.pm | 146 | ||||
-rw-r--r-- | solenv/bin/modules/installer/epmfile.pm | 48 | ||||
-rw-r--r-- | solenv/bin/modules/installer/globals.pm | 2 | ||||
-rw-r--r-- | solenv/bin/modules/installer/simplepackage.pm | 144 | ||||
-rwxr-xr-x | solenv/bin/subsequenttests | 2 | ||||
-rw-r--r-- | solenv/inc/_tg_srs.mk | 20 | ||||
-rw-r--r-- | solenv/inc/rules.mk | 2 | ||||
-rw-r--r--[-rwxr-xr-x] | solenv/inc/set_wntx64.mk | 13 | ||||
-rw-r--r-- | solenv/inc/settings.mk | 3 | ||||
-rw-r--r-- | solenv/inc/target.mk | 3 | ||||
-rw-r--r-- | solenv/inc/tg_config.mk | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | solenv/inc/tg_help.mk | 2 | ||||
-rw-r--r-- | solenv/inc/tg_srs.mk | 2 | ||||
-rwxr-xr-x | solenv/inc/tg_xmerge.mk | 109 | ||||
-rw-r--r-- | solenv/inc/wntmsci10.mk | 2 | ||||
-rw-r--r-- | solenv/inc/wntmsci11.mk | 17 |
23 files changed, 705 insertions, 298 deletions
@@ -15,7 +15,7 @@ http://hg.services.openoffice.org/binaries 2ae988b339daec234019a7066f96733e-commons-lang-2.3-src.tar.gz 2c9b0f83ed5890af02c0df1c1776f39b-commons-httpclient-3.1-src.tar.gz 2f6ecca935948f7db92d925d88d0d078-icu4c-4_0_1-src.tgz -ef9ab6c1740682fbd730606d5f6922e6-liberation-fonts-ttf-1.05.3.20100427.zip +ca4870d899fd7e943ffc310a5421ad4d-liberation-fonts-ttf-1.06.0.20100721.tar.gz 35c94d2df8893241173de1d16b6034c0-swingExSrc.zip 35efabc239af896dfb79be7ebdd6e6b9-gentiumbasic-fonts-1.10.zip 377a60170e5185eb63d3ed2fae98e621-README_silgraphite-2.3.1.txt diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp index a7c1f2826381..5ed8c9739f9c 100644 --- a/scp2/source/ooo/common_brand.scp +++ b/scp2/source/ooo/common_brand.scp @@ -43,6 +43,8 @@ Module gid_Module_Root_Brand gid_Brand_Dir_Share_C05_Faq, gid_Brand_Dir_Share_Config, gid_Brand_Dir_Share_Extension, + gid_Brand_Dir_Share_Extensions, + gid_Brand_Dir_Share_Prereg, gid_Brand_Dir_Share_Uno_Packages, gid_Brand_Dir_Share_Uno_Packages_Cache, gid_Brand_Dir_Share_Registry, @@ -97,7 +99,8 @@ Module gid_Module_Root_Brand gid_Brand_File_Share_Xdg_Printeradmin, gid_Brand_File_Share_Xdg_QStart, gid_Brand_File_Share_Xdg_StartCenter, - gid_Brand_File_Share_Xdg_Writer); + gid_Brand_File_Share_Xdg_Writer, + gid_Brand_File_Txt_Package); Unixlinks = (gid_Brand_Unixlink_BasisLink, gid_Brand_Unixlink_Program, gid_Brand_Unixlink_Unopkg, @@ -221,6 +224,12 @@ Directory gid_Brand_Dir_Share_Extensions DosName = "extensions"; End +Directory gid_Brand_Dir_Share_Prereg + ParentID = gid_Brand_Dir_Share; + DosName = "prereg"; + Styles = (CREATE); +End + Directory gid_Brand_Dir_Share_Extensions_Install ParentID = gid_Brand_Dir_Share_Extension; DosName = "install"; @@ -644,6 +653,13 @@ File gid_Brand_File_Images_Brand_Zip Styles = (PACKED); End +File gid_Brand_File_Txt_Package + TXT_FILE_BODY; + Dir = gid_Brand_Dir_Share_Extensions; + Name = "package.txt"; + Styles = (PACKED); +End + File gid_Brand_File_Share_Registry_Brand_Xcd TXT_FILE_BODY; Styles = (PACKED, SCPZIP_REPLACE); diff --git a/scp2/source/ooo/profileitem_ooo.scp b/scp2/source/ooo/profileitem_ooo.scp index 9818d5b26749..724316ba6f5e 100644 --- a/scp2/source/ooo/profileitem_ooo.scp +++ b/scp2/source/ooo/profileitem_ooo.scp @@ -461,4 +461,3 @@ ProfileItem gid_Basis_Profileitem_Version_Ooopackageversion Key = "OOOPackageVersion"; Value = "${OOOPACKAGEVERSION}"; End - diff --git a/scp2/source/ooo/windowscustomaction_ooo.scp b/scp2/source/ooo/windowscustomaction_ooo.scp index e129f147932a..7bd6c18fae99 100755 --- a/scp2/source/ooo/windowscustomaction_ooo.scp +++ b/scp2/source/ooo/windowscustomaction_ooo.scp @@ -199,6 +199,25 @@ WindowsCustomAction gid_Customaction_Shellextensionsdll7 Assignment1 = ("InstallExecuteSequence", "REMOVE=\"ALL\" And Not PATCH", "InstallValidate"); End +WindowsCustomAction gid_Customaction_Register_Extensions + Name = "RegisterExtensions"; + Typ = "65"; + Source = "shlxtmsi.dll"; + Target = "RegisterExtensions"; + Inbinarytable = 1; + Assignment1 = ("InstallExecuteSequence", "Not REMOVE=\"ALL\"", "end"); + Assignment2 = ("AdminExecuteSequence", "Not REMOVE=\"ALL\"", "end"); +End + +WindowsCustomAction gid_Customaction_Remove_Extensions + Name = "RemoveExtensions"; + Typ = "65"; + Source = "shlxtmsi.dll"; + Target = "RemoveExtensions"; + Inbinarytable = 1; + Assignment1 = ("InstallExecuteSequence", "REMOVE=\"ALL\" And Not PATCH", "FileCost"); +End + WindowsCustomAction gid_Customaction_Set_Admininstall Name = "SetAdminInstallProperty"; Typ = "65"; @@ -287,6 +306,16 @@ WindowsCustomAction gid_Customaction_Patch_InstallExchangeFiles Assignment2 = ("AdminExecuteSequence", "", "behind_InstallFinalize"); End +WindowsCustomAction gid_Customaction_Langpack_Register_Extensions + Name = "RegisterExtensions"; + Typ = "65"; + Source = "lngpckinsthlp.dll"; + Target = "RegisterExtensions"; + Inbinarytable = 1; + Assignment1 = ("InstallExecuteSequence", "", "end"); + Assignment2 = ("AdminExecuteSequence", "", "end"); +End + WindowsCustomAction gid_Customaction_Patch_SetFeatureState Name = "SetFeatureState"; Typ = "65"; diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl index 66afeec6e2c7..987d7fbb5bea 100755..100644 --- a/solenv/bin/build.pl +++ b/solenv/bin/build.pl @@ -45,6 +45,7 @@ use lib ("$ENV{SOLARENV}/bin/modules"); use SourceConfig; + use RepositoryHelper; my $in_so_env = 0; if (defined $ENV{COMMON_ENV_TOOLS}) { @@ -139,6 +140,8 @@ $html = ''; @ignored_errors = (); %incompatibles = (); + %skip_modules = (); + %exclude_branches = (); $only_platform = ''; # the only platform to prepare $only_common = ''; # the only common output tree to delete when preparing %build_modes = (); @@ -167,8 +170,8 @@ $html_last_updated = 0; %jobs_hash = (); $html_path = undef; - $html_file = CorrectPath($ENV{SOLARSRC} . '/' . $ENV{INPATH}. '.build.html'); $build_finished = 0; + $html_file = ''; %had_error = (); # hack for misteriuos windows problems - try run dmake 2 times if first time there was an error $mkout = CorrectPath("$ENV{SOLARENV}/bin/mkout.pl"); %weights_hash = (); # hash contains info about how many modules are dependent from one module @@ -209,7 +212,6 @@ get_options(); - $html_file = CorrectPath($html_path . '/' . $ENV{INPATH}. '.build.html') if (defined $html_path); # my $temp_html_file = CorrectPath($tmp_dir. '/' . $ENV{INPATH}. '.build.html'); get_build_modes(); %deliver_env = (); @@ -225,12 +227,26 @@ $deliver_env{'OUTPATH'}++; $deliver_env{'L10N_framework'}++; }; + $StandDir = get_stand_dir(); # This also sets $initial_module + $source_config = SourceConfig -> new($StandDir); + + if ($html) { + if (defined $html_path) { + $html_file = CorrectPath($html_path . '/' . $ENV{INPATH}. '.build.html'); + } else { + my $log_directory = Cwd::realpath(CorrectPath($StandDir . '/..')) . '/log'; + if ((!-d $log_directory) && (!mkdir($log_directory))) { + print_error("Cannot create $log_directory for writing html file\n"); + }; + $html_file = $log_directory . '/' . $ENV{INPATH}. '.build.html'; + print "\nPath to html status page: $html_file\n"; + }; + }; if ($generate_config && ($clear_config || (scalar keys %remove_from_config)||(scalar keys %add_to_config))) { generate_config_file(); exit 0; } - $StandDir = get_stand_dir(); # This also sets $initial_module get_module_and_buildlist_paths(); provide_consistency() if (defined $ENV{CWS_WORK_STAMP} && defined($ENV{COMMON_ENV_TOOLS})); @@ -342,7 +358,6 @@ sub rename_file { }; sub generate_config_file { - my $source_config = SourceConfig->new(); $source_config->add_active_modules([keys %add_to_config], 1) if (scalar %add_to_config); $source_config->remove_activated_modules([keys %remove_from_config], 1) if (scalar %remove_from_config); $source_config->remove_all_activated_modules() if ($clear_config); @@ -556,23 +571,36 @@ sub get_build_list_path { # Get dependencies hash of the current and all parent projects # sub get_parent_deps { - my (%parents_deps_hash, $module, $parent); my $prj_dir = shift; my $deps_hash = shift; - my @unresolved_parents = get_parents_array($prj_dir); - $parents_deps_hash{$_}++ foreach (@unresolved_parents); - $$deps_hash{$prj_dir} = \%parents_deps_hash; - while ($module = pop(@unresolved_parents)) { + my @unresolved_parents = ($prj_dir); + my %skipped_branches = (); + while (my $module = pop(@unresolved_parents)) { + next if (defined $$deps_hash{$module}); my %parents_deps_hash = (); - $parents_deps_hash{$_}++ foreach (get_parents_array($module)); + foreach (get_parents_array($module)) { + if (defined $exclude_branches{$_}) { + $skipped_branches{$_}++; + next; + }; + $parents_deps_hash{$_}++; + } $$deps_hash{$module} = \%parents_deps_hash; foreach $Parent (keys %parents_deps_hash) { - if (!defined($$deps_hash{$Parent})) { + if (!defined($$deps_hash{$Parent}) && (!defined $exclude_branches{$module})) { push (@unresolved_parents, $Parent); }; }; }; check_deps_hash($deps_hash); + foreach (keys %skipped_branches) { + print $echo . "Skipping module's $_ branch\n"; + delete $exclude_branches{$_}; + }; + my @missing_branches = keys %exclude_branches; + if (scalar @missing_branches) { + print_error("For $prj_dir branche(s): \"@missing_branches\" not found\n"); + }; }; sub store_weights { @@ -605,18 +633,18 @@ sub expand_dependencies { }; # -# This procedure fills out the %reversed_dependencies hash, -# the hash contaninig the info about modules "waiting" for the module +# This procedure fills the second hash with reversed dependencies, +# ie, with info about modules "waiting" for the module # sub reverse_dependensies { - my $deps_hash = shift; + my ($deps_hash, $reversed) = @_; foreach my $module (keys %$deps_hash) { foreach (keys %{$$deps_hash{$module}}) { - if (defined $reversed_dependencies{$_}) { - ${$reversed_dependencies{$_}}{$module}++ + if (defined $$reversed{$_}) { + ${$$reversed{$_}}{$module}++ } else { my %single_module_dep_hash = ($module => 1); - $reversed_dependencies{$_} = \%single_module_dep_hash; + $$reversed{$_} = \%single_module_dep_hash; }; }; }; @@ -635,8 +663,12 @@ sub build_all { }; modules_classify(keys %global_deps_hash); expand_dependencies (\%global_deps_hash); -# prepare_build_from(\%global_deps_hash) if (scalar keys %incompatibles); - prepare_incompatible_build(\%global_deps_hash) if ($incompatible); + prepare_incompatible_build(\%global_deps_hash) if ($incompatible && (!$build_from_with_branches)); + if ($build_from_with_branches) { + my %reversed_full_deps_hash = (); + reverse_dependensies(\%global_deps_hash, \%reversed_full_deps_hash); + prepare_build_from_with_branches(\%global_deps_hash, \%reversed_full_deps_hash); + } if ($build_all_cont || $build_since) { prepare_build_all_cont(\%global_deps_hash); }; @@ -653,13 +685,13 @@ sub build_all { print_error("There are modules:\n@missing_modules\n\nthat should be built, but they are not activated. Please, verify your $source_config_file.\n"); }; }; - foreach my $module (%dead_parents) { + foreach my $module (keys %dead_parents, keys %skip_modules) { remove_from_dependencies($module, \%global_deps_hash); delete ($global_deps_hash{$module}) if (defined $global_deps_hash{$module}); }; store_weights(\%global_deps_hash); backup_deps_hash(\%global_deps_hash, \%global_deps_hash_backup); - reverse_dependensies(\%global_deps_hash_backup); + reverse_dependensies(\%global_deps_hash_backup, \%reversed_dependencies); $modules_number = scalar keys %global_deps_hash; initialize_html_info($_) foreach (keys %global_deps_hash); if ($processes_to_run) { @@ -1100,6 +1132,7 @@ sub get_commands { while ($arg = pop(@dmake_args)) { $dmake .= ' '.$arg; }; + $dmake .= ' verbose=true' if ($html); }; # @@ -1110,34 +1143,44 @@ sub get_stand_dir { $ENV{mk_tmp} = ''; die "No environment set\n"; }; - my $StandDir; - if ( defined $ENV{PWD} ) { - $StandDir = $ENV{PWD}; - } elsif (defined $ENV{_cwd}) { - $StandDir = $ENV{_cwd}; - } else { - $StandDir = cwd(); - }; - my $previous_dir = ''; - do { - foreach (@possible_build_lists) {# ('build.lst', 'build.xlist'); - if (-e $StandDir . '/prj/'.$_) { - $initial_module = File::Basename::basename($StandDir); - $build_list_paths{$initial_module} =$StandDir . '/prj/'.$_; - $StandDir = File::Basename::dirname($StandDir); - $module_paths{$initial_module} = $StandDir . "/$initial_module"; + my $repository_helper = RepositoryHelper->new(); + my $StandDir = $repository_helper->get_repository_root(); + my $initial_dir = $repository_helper->get_initial_directory(); + if ($StandDir eq $initial_dir) { + print_error('Found no project to build'); + }; + $initial_module = substr($initial_dir, length($StandDir) + 1); + if ($initial_module =~ /(\\|\/)/) { + $initial_module = $`; + }; + $module_paths{$initial_module} = $StandDir . "/$initial_module"; +# $build_list_paths{$initial_module} =$StandDir . '/prj/'.$_; +# if ( defined $ENV{PWD} ) { +# $StandDir = $ENV{PWD}; +# } elsif (defined $ENV{_cwd}) { +# $StandDir = $ENV{_cwd}; +# } else { +# $StandDir = cwd(); +# }; +# my $previous_dir = ''; +# do { +# foreach (@possible_build_lists) {# ('build.lst', 'build.xlist'); +# if (-e $StandDir . '/prj/'.$_) { +# $initial_module = File::Basename::basename($StandDir); +# $build_list_paths{$initial_module} =$StandDir . '/prj/'.$_; +# $StandDir = File::Basename::dirname($StandDir); +# $module_paths{$initial_module} = $StandDir . "/$initial_module"; return $StandDir; - } elsif ($StandDir eq $previous_dir) { - $ENV{mk_tmp} = ''; - print_error('Found no project to build'); - }; - }; - $previous_dir = $StandDir; - $StandDir = File::Basename::dirname(Cwd::realpath($StandDir)); - print_error('Found no project to build') if (!$StandDir); - } -# while (chdir '..'); - while (chdir "$StandDir"); +# } elsif ($StandDir eq $previous_dir) { +# $ENV{mk_tmp} = ''; +# print_error('Found no project to build'); +# }; +# }; +# $previous_dir = $StandDir; +# $StandDir = File::Basename::dirname(Cwd::realpath($StandDir)); +# print_error('Found no project to build') if (!$StandDir); +# } +# while (chdir "$StandDir"); }; # @@ -1236,7 +1279,7 @@ sub check_deps_hash { $jobs_hash{$key} = { SHORT_NAME => $string, BUILD_NUMBER => $build_number, STATUS => 'waiting', - LOG_PATH => $module . "/$ENV{INPATH}/misc/logs/$log_name", + LOG_PATH => '../' . $source_config->get_module_repository($module) . "/$module/$ENV{INPATH}/misc/logs/$log_name", LONG_LOG_PATH => CorrectPath($module_paths{$module} . "/$ENV{INPATH}/misc/logs/$log_name"), START_TIME => 0, FINISH_TIME => 0, @@ -1392,7 +1435,7 @@ sub print_error { sub usage { print STDERR "\nbuild\n"; - print STDERR "Syntax: build [--all|-a[:prj_name]]|[--from|-f prj_name1[:prj_name2] [prj_name3 [...]]]|[--since|-c prj_name] [--with_branches|-b]|[--prepare|-p][:platform] [--deliver|-d [--dlv_switch deliver_switch]]] [-P processes|--server [--setenvstring \"string\"] [--client_timeout MIN] [--port port1[:port2:...:portN]]] [--show|-s] [--help|-h] [--file|-F] [--ignore|-i] [--version|-V] [--mode|-m OOo[,SO[,EXT]] [--html [--html_path html_file_path] [--dontgraboutput]] [--pre_job=pre_job_sring] [--job=job_string|-j] [--post_job=post_job_sring] [--stoponerror] [--genconf [--removeall|--clear|--remove|--add [module1,module2[,...,moduleN]]]] [--interactive]\n"; + print STDERR "Syntax: build [--all|-a[:prj_name]]|[--from|-f prj_name1[:prj_name2] [prj_name3 [...]]]|[--since|-c prj_name] [--with_branches prj_name1[:prj_name2] [--skip prj_name1[:prj_name2] [prj_name3 [...]] [prj_name3 [...]|-b]|[--prepare|-p][:platform] [--deliver|-d [--dlv_switch deliver_switch]]] [-P processes|--server [--setenvstring \"string\"] [--client_timeout MIN] [--port port1[:port2:...:portN]]] [--show|-s] [--help|-h] [--file|-F] [--ignore|-i] [--version|-V] [--mode|-m OOo[,SO[,EXT]] [--html [--html_path html_file_path] [--dontgraboutput]] [--pre_job=pre_job_sring] [--job=job_string|-j] [--post_job=post_job_sring] [--stoponerror] [--genconf [--removeall|--clear|--remove|--add [module1,module2[,...,moduleN]]]] [--exclude_branch_from prj_name1[:prj_name2] [prj_name3 [...]]] [--interactive]\n"; print STDERR "Example1: build --from sfx2\n"; print STDERR " - build all projects dependent from sfx2, starting with sfx2, finishing with the current module\n"; print STDERR "Example2: build --all:sfx2\n"; @@ -1405,9 +1448,11 @@ sub usage { print STDERR "\nSwitches:\n"; print STDERR " --all - build all projects from very beginning till current one\n"; print STDERR " --from - build all projects dependent from the specified (including it) till current one\n"; + print STDERR " --exclude_branch_from - exclude module(s) and its branch from the build\n"; print STDERR " --mode OOo - build only projects needed for OpenOffice.org\n"; print STDERR " --prepare - clear all projects for incompatible build from prj_name till current one [for platform] (cws version)\n"; - print STDERR " --with_branches- build all projects in neighbour branches and current branch starting from actual project\n"; + print STDERR " --with_branches- the same as \"--from\" but with build all projects in neighbour branches\n"; + print STDERR " --skip - do not build certain module(s)\n"; print STDERR " --since - build all projects beginning from the specified till current one (the same as \"--all:prj_name\", but skipping prj_name)\n"; print STDERR " --checkmodules - check if all required parent projects are availlable\n"; print STDERR " --show - show what is going to be built\n"; @@ -1462,19 +1507,25 @@ sub get_options { $arg =~ /^--dlv_switch$/ and $dlv_switch = shift @ARGV and next; $arg =~ /^--file$/ and $cmd_file = shift @ARGV and next; $arg =~ /^-F$/ and $cmd_file = shift @ARGV and next; + $arg =~ /^--skip$/ and get_modules_passed(\%skip_modules) and next; - $arg =~ /^--with_branches$/ and $build_all_parents = 1 - and $build_from_with_branches = shift @ARGV and next; - $arg =~ /^-b$/ and $build_all_parents = 1 - and $build_from_with_branches = shift @ARGV and next; - + if ($arg =~ /^--with_branches$/ || $arg =~ /^-b$/) { + $build_from_with_branches = 1; + $build_all_parents = 1; + get_modules_passed(\%incompatibles); + next; + }; $arg =~ /^--all:(\S+)$/ and $build_all_parents = 1 and $build_all_cont = $1 and next; $arg =~ /^-a:(\S+)$/ and $build_all_parents = 1 and $build_all_cont = $1 and next; if ($arg =~ /^--from$/ || $arg =~ /^-f$/) { $build_all_parents = 1; - get_incomp_projects(); + get_modules_passed(\%incompatibles); + next; + }; + if ($arg =~ /^--exclude_branch_from$/) { + get_modules_passed(\%exclude_branches); next; }; $arg =~ /^--prepare$/ and $prepare = 1 and next; @@ -1527,8 +1578,12 @@ sub get_options { print_error("\"--html_path\" switch is used only with \"--html\"") if ($html_path); print_error("\"--dontgraboutput\" switch is used only with \"--html\"") if ($dont_grab_output); }; + if ((scalar keys %exclude_branches) && !$build_all_parents) { + print_error("\"--exclude_branch_from\" is not applicable for one module builds!!"); + }; $grab_output = 0 if ($dont_grab_output); print_error('Switches --with_branches and --all collision') if ($build_from_with_branches && $build_all_cont); + print_error('Switch --skip is for building multiple modules only!!') if ((scalar keys %skip_modules) && (!$build_all_parents)); # print_error('Please prepare the workspace on one of UNIX platforms') if ($prepare && ($ENV{GUI} ne 'UNX')); print_error('Switches --with_branches and --since collision') if ($build_from_with_branches && $build_since); if ($show) { @@ -1593,7 +1648,6 @@ sub get_options { sub get_module_and_buildlist_paths { if ($build_all_parents || $checkparents) { - my $source_config = SourceConfig -> new($StandDir); $source_config_file = $source_config->get_config_file_path(); $active_modules{$_}++ foreach ($source_config->get_active_modules()); my %active_modules_copy = %active_modules; @@ -1652,7 +1706,13 @@ sub cancel_build { $message_part .= "--from @broken_modules_names\n"; }; } else { - $message_part .= "--all:@broken_modules_names\n"; + if ($processes_to_run) { + $message_part .= "--from "; + } else { + $message_part .= "--all:"; + }; + $message_part .= "@broken_modules_names\n"; + }; if ($broken_modules_number && $build_all_parents) { print "\n"; @@ -2109,12 +2169,12 @@ sub modules_classify { # # This procedure provides consistency for cws -# and optimized build (ie in case of -with_branches, -all:prj_name +# and optimized build (ie in case of --with_branches, -all:prj_name # and -since switches) # sub provide_consistency { check_dir(); - foreach $var_ref (\$build_from_with_branches, \$build_all_cont, \$build_since) { + foreach $var_ref (\$build_all_cont, \$build_since) { if ($$var_ref) { return if (defined $module_paths{$$var_ref}); print_error("Cannot find module '$$var_ref'", 9); @@ -2257,6 +2317,20 @@ sub fix_permissions { chmod '0664', $file; }; +sub prepare_build_from_with_branches { + ($full_deps_hash, $reversed_full_deps_hash) = @_; + foreach my $prerequisite (keys %$full_deps_hash) { + foreach my $dependent_module (keys %incompatibles) { + if (defined ${$$reversed_full_deps_hash{$prerequisite}}{$dependent_module}) { + remove_from_dependencies($prerequisite, $full_deps_hash); + delete $$full_deps_hash{$prerequisite}; +# print "Removed $prerequisite\n"; + last; + }; + }; + }; +}; + # # Removes projects which it is not necessary to build # in incompatible build @@ -2268,7 +2342,6 @@ sub prepare_incompatible_build { if (!defined $$deps_hash{$module}) { print_error("The module $initial_module is independent from $module\n"); } - delete $incompatibles{$module}; $incompatibles{$module} = $$deps_hash{$module}; delete $$deps_hash{$module}; } @@ -2286,8 +2359,8 @@ sub prepare_incompatible_build { @modules_built = keys %$deps_hash; %add_to_config = %$deps_hash; if ($prepare) { - if ((!defined $ENV{UPDATER}) || (defined $ENV{CWS_WORK_STAMP})) { - SourceConfig->new()->add_active_modules([keys %add_to_config], 0); + if ((!(defined $ENV{UPDATER} && (!defined $ENV{CWS_WORK_STAMP}))) || (defined $ENV{CWS_WORK_STAMP})) { + $source_config->add_active_modules([keys %add_to_config], 0); } clear_delivered(); } @@ -2332,21 +2405,6 @@ sub prepare_incompatible_build { # # Removes projects which it is not necessary to build -# with -with_branches switch -# -#sub prepare_build_from { -# my ($prj, $deps_hash); -# $deps_hash = shift; -# my %from_deps_hash = (); # hash of dependencies of the -from project -# get_parent_deps($build_from_with_branches, \%from_deps_hash); -# foreach $prj (keys %from_deps_hash) { -# delete $$deps_hash{$prj}; -# remove_from_dependencies($prj, $deps_hash); -# }; -#}; - -# -# Removes projects which it is not necessary to build # with --all:prj_name or --since switch # sub prepare_build_all_cont { @@ -2412,7 +2470,8 @@ sub get_list_of_modules { # }; }; -sub get_incomp_projects { +sub get_modules_passed { + my $hash_ref = shift; my $option = ''; while ($option = shift @ARGV) { if ($option =~ /^-+/) { @@ -2424,7 +2483,7 @@ sub get_incomp_projects { print_error("\'--from\' switch collision") if ($build_all_cont); $build_all_cont = $'; }; - $incompatibles{$option}++; + $$hash_ref{$option}++; }; }; }; diff --git a/solenv/bin/jpropex b/solenv/bin/jpropex deleted file mode 100755 index 2d62d13b093e..000000000000 --- a/solenv/bin/jpropex +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -if [ x${SOLARENV}x = xx ]; then - echo No environment found, please use 'configure' or 'setsolar' - exit 1 -fi -if [ x${JAVA_HOME}x = xx ]; then - echo No Java found! - exit 1 -fi -exec java -DSOLARSRC=${SOLARSRC} -DWORK_STAMP=${WORK_STAMP} -DUSE_SHELL= -jar ${SOLARVER}/${INPATH}/bin${UPDMINOREXT}/jpropex.jar "$@" diff --git a/solenv/bin/modules/RepositoryHelper.pm b/solenv/bin/modules/RepositoryHelper.pm new file mode 100644 index 000000000000..7677376be70e --- /dev/null +++ b/solenv/bin/modules/RepositoryHelper.pm @@ -0,0 +1,205 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +#************************************************************************* +# +# RepositoryHelper - Perl for working with repositories and underlying SCM +# +# usage: see below +# +#************************************************************************* + +package RepositoryHelper; + +use strict; + + +use Carp; +use Cwd qw (cwd); +use File::Basename; +#use File::Temp qw(tmpnam); + +my $debug = 0; + +##### profiling ##### + +##### ctor ##### + +sub new { + my $proto = shift; + my $class = ref($proto) || $proto; + my $initial_directory = shift; + if ($initial_directory) { + $initial_directory = Cwd::realpath($initial_directory); + } else { + if ( defined $ENV{PWD} ) { + $initial_directory = $ENV{PWD}; + } elsif (defined $ENV{_cwd}) { + $initial_directory = $ENV{_cwd}; + } else { + $initial_directory = cwd(); + }; + }; + my $self = {}; + $self->{INITIAL_DIRECTORY} = $initial_directory; + $self->{REPOSITORY_ROOT} = undef; + $self->{REPOSITORY_NAME} = undef; + $self->{SCM_NAME} = undef; + detect_repository($self); + bless($self, $class); + return $self; +} + +##### methods ##### +sub get_repository_root +{ + my $self = shift; + return $self->{REPOSITORY_ROOT}; +} + +sub get_initial_directory +{ + my $self = shift; + return $self->{INITIAL_DIRECTORY}; +} + +sub get_scm_name +{ + my $self = shift; + return$self->{SCM_NAME}; +} + +##### private methods ##### +sub search_for_hg { + my $self = shift; + my $hg_root; + my $scm_name = 'hg'; + if (open(COMMAND, "$scm_name root 2>&1 |")) { + foreach (<COMMAND>) { + next if (/^Not trusting file/); + chomp; + $hg_root = $_; + last; + }; + close COMMAND; + chomp $hg_root; + if ($hg_root !~ /There is no Mercurial repository here/) { + $self->{REPOSITORY_ROOT} = $hg_root; + $self->{SCM_NAME} = $scm_name; + return 1; + }; + }; + return 0; +}; + +sub search_via_build_lst { + my $self = shift; + my @possible_build_lists = ('build.lst', 'build.xlist'); # build lists names + my $previous_dir = ''; + my $rep_root_candidate = $self->{INITIAL_DIRECTORY}; + do { + foreach (@possible_build_lists) {# ('build.lst', 'build.xlist'); + if (-e $rep_root_candidate . '/prj/'.$_) { + $self->{REPOSITORY_ROOT} = File::Basename::dirname($rep_root_candidate); + return 1; + } elsif ($rep_root_candidate eq $previous_dir) { + return 0; + }; + }; + $previous_dir = $rep_root_candidate; + $rep_root_candidate = File::Basename::dirname(Cwd::realpath($rep_root_candidate)); + return 0 if (!$rep_root_candidate); + } + while (chdir "$rep_root_candidate"); +}; + +sub detect_repository { + my $self = shift; + return if (search_via_build_lst($self)); + chdir $self->{INITIAL_DIRECTORY}; + return if (search_for_hg($self)); + croak('Cannot determine source directory/repository for ' . $self->{INITIAL_DIRECTORY}); +}; + +##### finish ##### + +1; # needed by use or require + +__END__ + +=head1 NAME + +RepositoryHelper - Perl module for working with repositories and underlying SCM + +=head1 SYNOPSIS + + # example that will analyze sources and return the source root directory + + use RepositoryHelper; + + # Create a new instance: + $a = RepositoryHelper->new(); + + # Get repositories for the actual workspace: + $a->get_repository_root(); + + +=head1 DESCRIPTION + +RepositoryHelper is a perlPerl module for working with repositories and underlying SCM +in the database. + +Methods: + +RepositoryHelper::new() + +Creates a new instance of RepositoryHelper. Can be initialized by: some path which likely to belong to a repository, default - empty, the current dir will be taken. + +RepositoryHelper::get_repository_root() + +Returns the repository root, retrieved by SCM methods or on educated guess... + +RepositoryHelper::get_initial_directory() + +Returns full path to the initialistion directory. + +=head2 EXPORT + +RepositoryHelper::new() +RepositoryHelper::get_repository_root() +RepositoryHelper::get_scm_name() +RepositoryHelper::get_initial_directory() + +=head1 AUTHOR + +Vladimir Glazunov, vg@openoffice.org + +=head1 SEE ALSO + +perl(1). + +=cut diff --git a/solenv/bin/modules/SourceConfig.pm b/solenv/bin/modules/SourceConfig.pm index 9379b7764d0a..dfaa797d8f48 100644..100755 --- a/solenv/bin/modules/SourceConfig.pm +++ b/solenv/bin/modules/SourceConfig.pm @@ -38,10 +38,11 @@ package SourceConfig; use strict; use constant SOURCE_CONFIG_FILE_NAME => 'source_config'; -use constant SOURCE_CONFIG_VERSION => 2; +use constant SOURCE_CONFIG_VERSION => 3; use Carp; use Cwd; +use RepositoryHelper; use File::Basename; use File::Temp qw(tmpnam); @@ -75,8 +76,9 @@ sub new { $source_root .= '/..'; } } else { - $source_root = Cwd::realpath($ENV{SOURCE_ROOT_DIR}); + $source_root = $ENV{SOURCE_ROOT_DIR}; }; + $source_root = Cwd::realpath($source_root); $self->{SOURCE_ROOT} = $source_root; $self->{DEBUG} = 0; $self->{VERBOSE} = 0; @@ -94,14 +96,16 @@ sub new { $self->{WARNINGS} = []; $self->{REPORT_MESSAGES} = []; $self->{CONFIG_FILE_CONTENT} = []; - $self->{DEFAULT_REPOSITORY} = undef; if (defined $self->{USER_SOURCE_ROOT}) { ${$self->{REPOSITORIES}}{File::Basename::basename($self->{USER_SOURCE_ROOT})} = $self->{USER_SOURCE_ROOT}; - $self->{DEFAULT_REPOSITORY} = File::Basename::basename($self->{USER_SOURCE_ROOT}); }; $self->{SOURCE_CONFIG_FILE} = get_config_file($self->{SOURCE_ROOT}) if (!defined $self->{SOURCE_CONFIG_FILE}); $self->{SOURCE_CONFIG_DEFAULT} = $self->{SOURCE_ROOT} .'/'.SOURCE_CONFIG_FILE_NAME; + if (defined $self->{USER_SOURCE_ROOT}) { + ${$self->{REPOSITORIES}}{File::Basename::basename($self->{USER_SOURCE_ROOT})} = $self->{USER_SOURCE_ROOT}; + }; read_config_file($self); + get_module_paths($self); bless($self, $class); return $self; } @@ -118,6 +122,19 @@ sub get_repositories return sort keys %{$self->{REPOSITORIES}}; } +sub add_repository +{ + my $self = shift; + my $new_rep_path = shift; + $new_rep_path = Cwd::realpath($new_rep_path); + my $new_rep_name = File::Basename::basename($new_rep_path); + if (defined ${$self->{REPOSITORIES}}{$new_rep_name}) { + croak("Repository $new_rep_name is already defined!!"); + }; + ${$self->{REPOSITORIES}}{$new_rep_name} = $new_rep_path; + $self -> get_repository_module_paths($new_rep_name); +} + sub get_config_file_default_path { my $self = shift; return $self->{SOURCE_CONFIG_DEFAULT}; @@ -131,7 +148,6 @@ sub get_config_file_path { sub get_module_repository { my $self = shift; my $module = shift; - $self -> get_module_paths() if (!scalar keys %{$self->{MODULE_PATHS}}); if (defined ${$self->{MODULE_REPOSITORY}}{$module}) { return ${$self->{MODULE_REPOSITORY}}{$module}; } else { @@ -143,7 +159,6 @@ sub get_module_repository { sub get_module_path { my $self = shift; my $module = shift; - $self -> get_module_paths() if (!scalar keys %{$self->{MODULE_PATHS}}); if (defined ${$self->{MODULE_PATHS}}{$module}) { return ${$self->{MODULE_PATHS}}{$module}; } else { @@ -155,10 +170,17 @@ sub get_module_path { sub get_module_build_list { my $self = shift; my $module = shift; - $self -> get_buildlist_paths() if (!scalar keys %{$self->{MODULE_BUILD_LIST_PATHS}}); if (defined ${$self->{MODULE_BUILD_LIST_PATHS}}{$module}) { return ${$self->{MODULE_BUILD_LIST_PATHS}}{$module}; } else { + my @possible_build_lists = ('build.lst', 'build.xlist'); # build lists names + foreach (@possible_build_lists) { + my $possible_path = ${$self->{MODULE_PATHS}}{$module} . "/prj/$_"; + if (-e $possible_path) { + ${$self->{MODULE_BUILD_LIST_PATHS}}{$module} = $possible_path; + return $possible_path; + }; + }; Carp::cluck("No build list in module $module found!!\n") if ($self->{DEBUG}); return undef; }; @@ -168,7 +190,6 @@ sub get_all_modules { my $self = shift; my $module = shift; - $self -> get_module_paths() if (!scalar keys %{$self->{MODULE_PATHS}}); return sort keys %{$self->{MODULE_PATHS}}; }; @@ -178,7 +199,6 @@ sub get_active_modules if (scalar keys %{$self->{ACTIVATED_MODULES}}) { return sort keys %{$self->{ACTIVATED_MODULES}}; } - $self -> get_module_paths() if (!scalar keys %{$self->{MODULE_PATHS}}); return sort keys %{$self->{REAL_MODULES}}; } @@ -189,49 +209,42 @@ sub is_active if (scalar keys %{$self->{ACTIVATED_MODULES}}) { return exists ($self->{ACTIVATED_MODULES}{$module}); } - $self -> get_module_paths() if (!scalar keys %{$self->{MODULE_PATHS}}); return exists ($self->{REAL_MODULES}{$module}); } ##### private methods ##### -sub get_buildlist_paths { +sub get_repository_module_paths { my $self = shift; - $self -> get_module_paths() if (!scalar keys %{$self->{MODULE_PATHS}}); - my @possible_build_lists = ('build.lst', 'build.xlist'); # build lists names - foreach my $module (keys %{$self->{MODULE_PATHS}}) { - foreach (@possible_build_lists) { - my $possible_path = ${$self->{MODULE_PATHS}}{$module} . "/prj/$_"; - ${$self->{MODULE_BUILD_LIST_PATHS}}{$module} = $possible_path if (-e $possible_path); + my $repository = shift; + my $repository_path = ${$self->{REPOSITORIES}}{$repository}; + if (opendir DIRHANDLE, $repository_path) { + foreach my $module (readdir(DIRHANDLE)) { + next if (($module =~ /^\.+/) || (!-d "$repository_path/$module")); + my $module_entry = $module; + if (($module !~ s/\.lnk$//) && ($module !~ s/\.link$//)) { + $self->{REAL_MODULES}{$module}++; + } + my $possible_path = "$repository_path/$module_entry"; + if (-d $possible_path) { + if (defined ${$self->{MODULE_PATHS}}{$module}) { + close DIRHANDLE; + croak("Ambiguous paths for module $module: $possible_path and " . ${$self->{MODULE_PATHS}}{$module}); + }; + ${$self->{MODULE_PATHS}}{$module} = $possible_path; + ${$self->{MODULE_REPOSITORY}}{$module} = $repository; + } }; + close DIRHANDLE; + } else { + croak("Cannot read $repository_path repository content"); }; }; sub get_module_paths { my $self = shift; foreach my $repository (keys %{$self->{REPOSITORIES}}) { - my $repository_path = ${$self->{REPOSITORIES}}{$repository}; - if (opendir DIRHANDLE, $repository_path) { - foreach my $module (readdir(DIRHANDLE)) { - next if (($module =~ /^\.+/) || (!-d "$repository_path/$module")); - my $module_entry = $module; - if (($module !~ s/\.lnk$//) && ($module !~ s/\.link$//)) { - $self->{REAL_MODULES}{$module}++; - } - my $possible_path = "$repository_path/$module_entry"; - if (-d $possible_path) { - if (defined ${$self->{MODULE_PATHS}}{$module}) { - close DIRHANDLE; - croak("Ambiguous paths for module $module: $possible_path and " . ${$self->{MODULE_PATHS}}{$module}); - }; - ${$self->{MODULE_PATHS}}{$module} = $possible_path; - ${$self->{MODULE_REPOSITORY}}{$module} = $repository; - } - }; - close DIRHANDLE; - } else { - croak("Cannot read $_ repository content"); - }; + get_repository_module_paths($self, $repository); }; my @false_actives = (); foreach (keys %{$self->{ACTIVATED_MODULES}}) { @@ -248,31 +261,21 @@ sub get_config_file { return ''; }; -sub get_hg_root { +# +# Fallback - fallback repository is based on RepositoryHelper educated guess +# +sub get_fallback_repository { my $self = shift; - return $self->{USER_SOURCE_ROOT} if (defined $self->{USER_SOURCE_ROOT}); - my $hg_root; - if (open(COMMAND, "hg root 2>&1 |")) { - foreach (<COMMAND>) { - next if (/^Not trusting file/); - chomp; - $hg_root = $_; - last; - }; - close COMMAND; - chomp $hg_root; - if ($hg_root !~ /There is no Mercurial repository here/) { - return $hg_root; - }; - }; - croak('Cannot open find source_config and/or determine hg root directory for ' . cwd()); + my $repository_root = RepositoryHelper->new()->get_repository_root(); + ${$self->{REPOSITORIES}}{File::Basename::basename($repository_root)} = $repository_root; }; sub read_config_file { my $self = shift; if (!$self->{SOURCE_CONFIG_FILE}) { - my $repository_root = get_hg_root($self); - ${$self->{REPOSITORIES}}{File::Basename::basename($repository_root)} = $repository_root; + if (!defined $self->{USER_SOURCE_ROOT}) { + get_fallback_repository($self); + }; return; }; my $repository_section = 0; @@ -304,11 +307,9 @@ sub read_config_file { my $repository_source_path = $self->{SOURCE_ROOT} . "/$1"; if (defined $ENV{UPDMINOREXT}) { $repository_source_path .= $ENV{UPDMINOREXT}; - }; - if ((defined $self->{DEFAULT_REPOSITORY}) && (${$self->{REPOSITORIES}}{$self->{DEFAULT_REPOSITORY}} eq $repository_source_path)) { - delete ${$self->{REPOSITORIES}}{$self->{DEFAULT_REPOSITORY}}; - $self->{DEFAULT_REPOSITORY} = undef; - + if (defined ${$self->{REPOSITORIES}}{$1.$ENV{UPDMINOREXT}}) { + delete ${$self->{REPOSITORIES}}{$1.$ENV{UPDMINOREXT}}; + }; }; ${$self->{REPOSITORIES}}{$1} = $repository_source_path; ${$self->{ACTIVATED_REPOSITORIES}}{$1}++; @@ -323,9 +324,7 @@ sub read_config_file { }; close SOURCE_CONFIG_FILE; if (!scalar keys %{$self->{REPOSITORIES}}) { - # Fallback - default repository is the directory where is our module... - my $hg_root = get_hg_root($self); - ${$self->{REPOSITORIES}}{File::Basename::basename($hg_root)} = $hg_root; + get_fallback_repository($self); }; } else { croak('Cannot open ' . $self->{SOURCE_CONFIG_FILE} . 'for reading'); @@ -379,15 +378,18 @@ sub remove_activated_modules { sub add_active_repositories { my $self = shift; $self->{NEW_REPOSITORIES} = shift; - croak('Empty module list passed for adding to source_config') if (!scalar @{$self->{NEW_REPOSITORIES}}); + croak('Empty repository list passed for addition to source_config') if (!scalar @{$self->{NEW_REPOSITORIES}}); $self->{VERBOSE} = shift; + foreach (@{$self->{NEW_REPOSITORIES}}) { + $self->add_repository($_); + }; generate_config_file($self); }; sub add_active_modules { my $self = shift; $self->{NEW_MODULES} = shift; - croak('Empty module list passed for adding to source_config') if (!scalar @{$self->{NEW_MODULES}}); + croak('Empty module list passed for addition to source_config') if (!scalar @{$self->{NEW_MODULES}}); $self->{VERBOSE} = shift; generate_config_file($self); }; @@ -535,6 +537,8 @@ SourceConfig - Perl extension for parsing general info databases # Get repositories for the actual workspace: $a->get_repositories(); + # Add a repository new_repository for the actual workspace (via full path): + $a->add_repository(/DEV300/new_repository); =head1 DESCRIPTION @@ -559,6 +563,11 @@ SourceConfig::get_repositories() Returns sorted list of active repositories for the actual workspace +SourceConfig::add_repository(REPOSITORY_PATH) + +Adds a repository to the list of active repositories + + SourceConfig::get_active_modules() Returns a sorted list of active modules @@ -622,6 +631,7 @@ Removes all activated repositories from the source_config file SourceConfig::new() SourceConfig::get_version() SourceConfig::get_repositories() +SourceConfig::add_repository() SourceConfig::get_active_modules() SourceConfig::get_all_modules() SourceConfig::get_module_path($module) diff --git a/solenv/bin/modules/installer/epmfile.pm b/solenv/bin/modules/installer/epmfile.pm index f8e35f208251..8b828b85335f 100644 --- a/solenv/bin/modules/installer/epmfile.pm +++ b/solenv/bin/modules/installer/epmfile.pm @@ -762,33 +762,13 @@ sub replace_many_variables_in_shellscripts foreach $key (keys %{$variableshashref}) { my $value = $variableshashref->{$key}; - if ( ! $value =~ /.oxt/ ) { $value = lc($value); } # lowercase ! - if ( $installer::globals::issolarisbuild) { $value =~ s/\.org/org/g; } # openofficeorg instead of openoffice.org + # $value = lc($value); # lowercase ! + # if ( $installer::globals::issolarisbuild) { $value =~ s/\.org/org/g; } # openofficeorg instead of openoffice.org replace_variable_in_shellscripts($scriptref, $value, $key); } } ####################################### -# Setting oxt file name variable -####################################### - -sub set_oxt_filename -{ - my ($filesinpackage, $allvariables) = @_; - - for ( my $i = 0; $i <= $#{$filesinpackage}; $i++ ) - { - my $onefile = ${$filesinpackage}[$i]; - if ( $onefile->{'Name'} =~ /.oxt\s*$/ ) - { - $allvariables->{'OXTFILENAME'} = $onefile->{'Name'}; - # $allvariables->{'FULLOXTFILENAME'} = $onefile->{'destination'}; - last; # only one oxt file for each rpm! - } - } -} - -####################################### # Adding shell scripts to epm file ####################################### @@ -796,9 +776,6 @@ sub adding_shellscripts_to_epm_file { my ($epmfileref, $shellscriptsfilename, $localrootpath, $allvariableshashref, $filesinpackage) = @_; - # Setting variable for ${OXTFILENAME} into $allvariableshashref, if this is a RPM with an extension - set_oxt_filename($filesinpackage, $allvariableshashref); - # $installer::globals::shellscriptsfilename push( @{$epmfileref}, "\n\n" ); @@ -1803,26 +1780,27 @@ sub is_extension_package # share/extension/install ###################################################################### -sub get_extension_name +sub contains_extension_dir { my ($prototypefile) = @_; - my $extensionName = ""; + my $contains_extension_dir = 0; + + # d none opt/openoffice.org3/share/extensions/ for ( my $i = 0; $i <= $#{$prototypefile}; $i++ ) { my $line = ${$prototypefile}[$i]; - if ( $line =~ /^\s*f\s+none\s+share\/extension\/install\/(\w+?\.oxt)\s*\=/ ) + if ( $line =~ /^\s*d\s+none\s.*\/share\/extensions\// ) { - $extensionName = $1; + $contains_extension_dir = 1; last; } } - return $extensionName; + return $contains_extension_dir; } - ############################################################ # A Solaris patch contains 7 specific scripts ############################################################ @@ -1839,9 +1817,9 @@ sub add_scripts_into_prototypefile $path = $path . $installer::globals::separator; my @newlines = (); - my $extensionname = get_extension_name($prototypefile); + my $is_extension_package = contains_extension_dir($prototypefile); - if ( $extensionname ne "" ) + if ( $is_extension_package ) { for ( my $i = 0; $i <= $#installer::globals::solarispatchscriptsforextensions; $i++ ) { @@ -1865,9 +1843,7 @@ sub add_scripts_into_prototypefile my $scriptfile = installer::files::read_file($sourcefilename); # Replacing variables - my $oldstring = "\$\{OXTFILENAME\}"; - replace_variables_in_shellscripts_for_patch($scriptfile, $destpath, $oldstring, $extensionname); - $oldstring = "PRODUCTDIRECTORYNAME"; + my $oldstring = "PRODUCTDIRECTORYNAME"; replace_variables_in_shellscripts_for_patch($scriptfile, $destpath, $oldstring, $staticpath); # Saving file diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm index ccef960e0337..582bd8c708b1 100644 --- a/solenv/bin/modules/installer/globals.pm +++ b/solenv/bin/modules/installer/globals.pm @@ -184,7 +184,7 @@ BEGIN $installertypedir = ""; $controlledmakecabversion = "5"; $saved_packages_path = ""; - $max_lang_length = 65; + $max_lang_length = 50; $globalblock = "Globals"; $rootmodulegid = ""; %alllangmodules = (); diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm index fdf9fc6fa4c3..518edc683c3d 100644 --- a/solenv/bin/modules/installer/simplepackage.pm +++ b/solenv/bin/modules/installer/simplepackage.pm @@ -71,9 +71,10 @@ sub get_extensions_dir my $extensiondir = $subfolderdir . $installer::globals::separator; if ( $installer::globals::officedirhostname ne "" ) { $extensiondir = $extensiondir . $installer::globals::officedirhostname . $installer::globals::separator; } - $extensiondir = $extensiondir . "share" . $installer::globals::separator . "extensions"; + my $extensionsdir = $extensiondir . "share" . $installer::globals::separator . "extensions"; + my $preregdir = $extensiondir . "share" . $installer::globals::separator . "prereg" . $installer::globals::separator . "bundled"; - return $extensiondir; + return ( $extensionsdir, $preregdir ); } #################################################### @@ -82,21 +83,24 @@ sub get_extensions_dir sub register_extensions { - my ($officedir, $languagestringref) = @_; + my ($officedir, $languagestringref, $preregdir) = @_; + + my $infoline = ""; + + if ( $preregdir eq "" ) + { + $infoline = "ERROR: Failed to determine directory \"prereg\" for extension registration! Please check your installation set.\n"; + push( @installer::globals::logfileinfo, $infoline); + installer::exiter::exit_program($infoline, "register_extensions"); + } my $programdir = $officedir . $installer::globals::separator; - # if ( $installer::globals::sundirhostname ne "" ) { $programdir = $programdir . $installer::globals::sundirhostname . $installer::globals::separator; } if ( $installer::globals::officedirhostname ne "" ) { $programdir = $programdir . $installer::globals::officedirhostname . $installer::globals::separator; } $programdir = $programdir . "program"; my $from = cwd(); chdir($programdir); - my $infoline = ""; - - # my $unopkgfile = $officedir . $installer::globals::separator . "program" . - # $installer::globals::separator . $installer::globals::unopkgfile; - my $unopkgfile = $installer::globals::unopkgfile; my $unopkgexists = 1; @@ -107,87 +111,73 @@ sub register_extensions push( @installer::globals::logfileinfo, $infoline); } - # my $extensiondir = $officedir . $installer::globals::separator . "share" . - # $installer::globals::separator . "extension" . - # $installer::globals::separator . "install"; - - my $extensiondir = ".." . $installer::globals::separator . "share" . $installer::globals::separator . "extension" . $installer::globals::separator . "install"; - - my $allextensions = installer::systemactions::find_file_with_file_extension("oxt", $extensiondir); + if ( ! -f $unopkgfile ) + { + $unopkgexists = 0; + $infoline = "Info: File $unopkgfile does not exist! Extensions cannot be registered.\n"; + push( @installer::globals::logfileinfo, $infoline); + } - if (( $#{$allextensions} > -1 ) && ( $unopkgexists )) + if ( $unopkgexists ) { my $currentdir = cwd(); print "... current dir: $currentdir ...\n"; $infoline = "Current dir: $currentdir\n"; push( @installer::globals::logfileinfo, $infoline); - for ( my $i = 0; $i <= $#{$allextensions}; $i++ ) - { - my $oneextension = $extensiondir . $installer::globals::separator . ${$allextensions}[$i]; - - # my $systemcall = $unopkgfile . " add --shared --suppress-license " . "\"" . $oneextension . "\""; + if ( ! -f $unopkgfile ) { installer::exiter::exit_program("ERROR: $unopkgfile not found!", "register_extensions"); } - if ( ! -f $unopkgfile ) { installer::exiter::exit_program("ERROR: $unopkgfile not found!", "register_extensions"); } - if ( ! -f $oneextension ) { installer::exiter::exit_program("ERROR: $oneextension not found!", "register_extensions"); } + my $localtemppath = installer::systemactions::create_directories("uno", $languagestringref); - my $localtemppath = installer::systemactions::create_directories("uno", $languagestringref); + my $slash = ""; - if ( $installer::globals::iswindowsbuild ) + if ( $installer::globals::iswindowsbuild ) + { + if ( $^O =~ /cygwin/i ) { - if ( $^O =~ /cygwin/i ) - { - $localtemppath = $installer::globals::cyg_temppath; - } - else - { - $windowsslash = "\/"; - } - $localtemppath =~ s/\\/\//g; - $localtemppath = "/".$localtemppath; + $localtemppath = $installer::globals::cyg_temppath; + $preregdir = qx{cygpath -m "$preregdir"}; + chomp($preregdir); } - my $systemcall = $unopkgfile . " add --shared --suppress-license --verbose " . $oneextension . " -env:UserInstallation=file://" . $localtemppath . " 2\>\&1 |"; + $localtemppath =~ s/\\/\//g; + $slash = "/"; # Third slash for Windows. Other OS pathes already start with "/" + } - print "... $systemcall ...\n"; + $preregdir =~ s/\/\s*$//g; - $infoline = "Systemcall: $systemcall\n"; - push( @installer::globals::logfileinfo, $infoline); + my $systemcall = $unopkgfile . " sync --verbose -env:BUNDLED_EXTENSIONS_USER=\"file://" . $slash . $preregdir . "\"" . " -env:UserInstallation=file://" . $slash . $localtemppath . " 2\>\&1 |"; - my @unopkgoutput = (); + print "... $systemcall ...\n"; - open (UNOPKG, $systemcall); - while (<UNOPKG>) - { - my $lastline = $_; - push(@unopkgoutput, $lastline); - } - close (UNOPKG); + $infoline = "Systemcall: $systemcall\n"; + push( @installer::globals::logfileinfo, $infoline); - my $returnvalue = $?; # $? contains the return value of the systemcall + my @unopkgoutput = (); - if ($returnvalue) - { - # Writing content of @unopkgoutput only in the error case into the log file. Sometimes it - # contains strings like "Error" even in the case of success. This causes a packaging error - # when the log file is analyzed at the end, even if there is no real error. - for ( my $j = 0; $j <= $#unopkgoutput; $j++ ) { push( @installer::globals::logfileinfo, "$unopkgoutput[$j]"); } + open (UNOPKG, $systemcall); + while (<UNOPKG>) + { + my $lastline = $_; + push(@unopkgoutput, $lastline); + } + close (UNOPKG); - $infoline = "ERROR: Could not execute \"$systemcall\"!\nExitcode: '$returnvalue'\n"; - push( @installer::globals::logfileinfo, $infoline); - installer::exiter::exit_program("ERROR: $systemcall failed!", "register_extensions"); - } - else - { - $infoline = "Success: Executed \"$systemcall\" successfully!\n"; - push( @installer::globals::logfileinfo, $infoline); - } + my $returnvalue = $?; # $? contains the return value of the systemcall + + if ($returnvalue) + { + # Writing content of @unopkgoutput only in the error case into the log file. Sometimes it + # contains strings like "Error" even in the case of success. This causes a packaging error + # when the log file is analyzed at the end, even if there is no real error. + for ( my $j = 0; $j <= $#unopkgoutput; $j++ ) { push( @installer::globals::logfileinfo, "$unopkgoutput[$j]"); } + + $infoline = "ERROR: Could not execute \"$systemcall\"!\nExitcode: '$returnvalue'\n"; + push( @installer::globals::logfileinfo, $infoline); + installer::exiter::exit_program("ERROR: $systemcall failed!", "register_extensions"); } - } - else - { - if ( ! ( $#{$allextensions} > -1 )) + else { - $infoline = "No extensions located in directory $extensiondir.\n"; + $infoline = "Success: Executed \"$systemcall\" successfully!\n"; push( @installer::globals::logfileinfo, $infoline); } } @@ -662,6 +652,7 @@ sub create_simple_package if ( $onedir->{'HostName'} ) { my $destdir = $subfolderdir . $installer::globals::separator . $onedir->{'HostName'}; + if ( ! -d $destdir ) { if ( $^O =~ /cygwin/i ) # Cygwin performance check @@ -787,19 +778,18 @@ sub create_simple_package system($localcall); } - # Registering the extensions - - # installer::logger::print_message( "... registering extensions ...\n" ); - # installer::logger::include_header_into_logfile("Registering extensions:"); - # register_extensions($subfolderdir, $languagestringref); - installer::logger::print_message( "... removing superfluous directories ...\n" ); installer::logger::include_header_into_logfile("Removing superfluous directories:"); - my $extensionfolder = get_extensions_dir($subfolderdir); - + my ( $extensionfolder, $preregdir ) = get_extensions_dir($subfolderdir); installer::systemactions::remove_empty_dirs_in_folder($extensionfolder); + # Registering the extensions + + installer::logger::print_message( "... registering extensions ...\n" ); + installer::logger::include_header_into_logfile("Registering extensions:"); + register_extensions($subfolderdir, $languagestringref, $preregdir); + if ( $installer::globals::compiler =~ /^unxmacx/ ) { installer::worker::put_scpactions_into_installset("$installdir/$packagename"); diff --git a/solenv/bin/subsequenttests b/solenv/bin/subsequenttests index 34e6b8034c70..3caa84293f3e 100755 --- a/solenv/bin/subsequenttests +++ b/solenv/bin/subsequenttests @@ -47,7 +47,7 @@ while (@ARGV) { } my @testpaths = (); -my $sc = SourceConfig->new(); +my $sc = SourceConfig->new($ENV{'SOLARSRC'}); my $module; foreach $module ($sc->get_active_modules()) { my $buildlst = $sc->get_module_build_list($module); diff --git a/solenv/inc/_tg_srs.mk b/solenv/inc/_tg_srs.mk index 063f98f2f322..a71216f0a7e9 100644 --- a/solenv/inc/_tg_srs.mk +++ b/solenv/inc/_tg_srs.mk @@ -28,7 +28,7 @@ $(foreach,i,$(SRC1FILES) $(COMMONMISC)/$(TARGET)/$i) : $$(@:f) $(LOCALIZESDF) $(COMMAND_ECHO)-$(MKDIR) $(@:d) $(COMMAND_ECHO)-$(RM) $@ $(COMMAND_ECHO)-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME) - $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all + $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all $(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@ $(COMMAND_ECHO)-$(RM) $@.$(INPATH) @@ -81,7 +81,7 @@ $(foreach,i,$(SRC2FILES) $(COMMONMISC)/$(TARGET)/$i) : $$(@:f) $(LOCALIZESDF) $(COMMAND_ECHO)-$(MKDIR) $(@:d) $(COMMAND_ECHO)-$(RM) $@ $(COMMAND_ECHO)-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME) - $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all + $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all $(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@ $(COMMAND_ECHO)-$(RM) $@.$(INPATH) @@ -134,7 +134,7 @@ $(foreach,i,$(SRC3FILES) $(COMMONMISC)/$(TARGET)/$i) : $$(@:f) $(LOCALIZESDF) $(COMMAND_ECHO)-$(MKDIR) $(@:d) $(COMMAND_ECHO)-$(RM) $@ $(COMMAND_ECHO)-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME) - $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all + $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all $(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@ $(COMMAND_ECHO)-$(RM) $@.$(INPATH) @@ -187,7 +187,7 @@ $(foreach,i,$(SRC4FILES) $(COMMONMISC)/$(TARGET)/$i) : $$(@:f) $(LOCALIZESDF) $(COMMAND_ECHO)-$(MKDIR) $(@:d) $(COMMAND_ECHO)-$(RM) $@ $(COMMAND_ECHO)-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME) - $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all + $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all $(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@ $(COMMAND_ECHO)-$(RM) $@.$(INPATH) @@ -240,7 +240,7 @@ $(foreach,i,$(SRC5FILES) $(COMMONMISC)/$(TARGET)/$i) : $$(@:f) $(LOCALIZESDF) $(COMMAND_ECHO)-$(MKDIR) $(@:d) $(COMMAND_ECHO)-$(RM) $@ $(COMMAND_ECHO)-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME) - $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all + $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all $(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@ $(COMMAND_ECHO)-$(RM) $@.$(INPATH) @@ -293,7 +293,7 @@ $(foreach,i,$(SRC6FILES) $(COMMONMISC)/$(TARGET)/$i) : $$(@:f) $(LOCALIZESDF) $(COMMAND_ECHO)-$(MKDIR) $(@:d) $(COMMAND_ECHO)-$(RM) $@ $(COMMAND_ECHO)-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME) - $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all + $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all $(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@ $(COMMAND_ECHO)-$(RM) $@.$(INPATH) @@ -346,7 +346,7 @@ $(foreach,i,$(SRC7FILES) $(COMMONMISC)/$(TARGET)/$i) : $$(@:f) $(LOCALIZESDF) $(COMMAND_ECHO)-$(MKDIR) $(@:d) $(COMMAND_ECHO)-$(RM) $@ $(COMMAND_ECHO)-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME) - $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all + $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all $(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@ $(COMMAND_ECHO)-$(RM) $@.$(INPATH) @@ -399,7 +399,7 @@ $(foreach,i,$(SRC8FILES) $(COMMONMISC)/$(TARGET)/$i) : $$(@:f) $(LOCALIZESDF) $(COMMAND_ECHO)-$(MKDIR) $(@:d) $(COMMAND_ECHO)-$(RM) $@ $(COMMAND_ECHO)-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME) - $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all + $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all $(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@ $(COMMAND_ECHO)-$(RM) $@.$(INPATH) @@ -452,7 +452,7 @@ $(foreach,i,$(SRC9FILES) $(COMMONMISC)/$(TARGET)/$i) : $$(@:f) $(LOCALIZESDF) $(COMMAND_ECHO)-$(MKDIR) $(@:d) $(COMMAND_ECHO)-$(RM) $@ $(COMMAND_ECHO)-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME) - $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all + $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all $(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@ $(COMMAND_ECHO)-$(RM) $@.$(INPATH) @@ -505,7 +505,7 @@ $(foreach,i,$(SRC10FILES) $(COMMONMISC)/$(TARGET)/$i) : $$(@:f) $(LOCALIZESDF) $(COMMAND_ECHO)-$(MKDIR) $(@:d) $(COMMAND_ECHO)-$(RM) $@ $(COMMAND_ECHO)-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME) - $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all + $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all $(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@ $(COMMAND_ECHO)-$(RM) $@.$(INPATH) diff --git a/solenv/inc/rules.mk b/solenv/inc/rules.mk index 63c4d0cef28c..7ad8fd19f33f 100644 --- a/solenv/inc/rules.mk +++ b/solenv/inc/rules.mk @@ -722,7 +722,7 @@ $(COMMONMISC)/$(TARGET)/%.ulf : %.ulf @echo "Making: " $(@:f) $(COMMAND_ECHO)-$(MKDIR) $(@:d) $(COMMAND_ECHO)-$(RM) $@ - $(COMMAND_ECHO)$(ULFEX) $(ULFEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all + $(COMMAND_ECHO)$(ULFEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all $(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@ $(COMMAND_ECHO)-$(RM) $@.$(INPATH) diff --git a/solenv/inc/set_wntx64.mk b/solenv/inc/set_wntx64.mk index bf2ca9314f33..412fb3bd2821 100755..100644 --- a/solenv/inc/set_wntx64.mk +++ b/solenv/inc/set_wntx64.mk @@ -42,6 +42,10 @@ LIBMGR_X64=$(WRAPCMD) $(LIBMGR_X64_BINARY) $(NOLOGO) IMPLIB_X64=$(WRAPCMD) $(LIBMGR_X64_BINARY) USE_CFLAGS_X64=-c -nologo -Gs $(NOLOGO) -Zm500 -Zc:forScope,wchar_t- -GR + +# Stack buffer overrun detection. +CFLAGS+=-GS + USE_CDEFS_X64+= -DWIN32 -D_AMD64_=1 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NON_CONFORMING_SWPRINTFS .IF "$(debug)"!="" USE_CFLAGS_X64+=-Zi -Fd$(MISC_X64)/$(@:b).pdb @@ -78,6 +82,15 @@ CDEFSOBJMT_X64+=-D_MT LINKFLAGS_X64=/MAP /OPT:NOREF .ENDIF +# excetion handling protection +LINKFLAGS+=-safeseh + +# enable DEP +LINKFLAGS+=-nxcompat + +# enable ASLR +LINKFLAGS+=-dynamicbase + .IF "$(PRODUCT)"!="full" LINKFLAGS_X64+= -NODEFAULTLIB -DEBUG .ELSE # "$(PRODUCT)"!="full" diff --git a/solenv/inc/settings.mk b/solenv/inc/settings.mk index 76407f9f0384..68bbc797d8af 100644 --- a/solenv/inc/settings.mk +++ b/solenv/inc/settings.mk @@ -967,9 +967,6 @@ RSC=$(AUGMENT_LIBRARY_PATH) $(FLIPCMD) $(SOLARBINDIR)/rsc .IF "$(VERBOSE)" == "FALSE" VERBOSITY=-quiet ZIP_VERBOSITY=-q - TRANSEX_VERBOSITY=-QQ - CFGEX_VERBOSITY=-QQ - ULFEX_VERBOSITY=-QQ .ENDIF .ENDIF # "$(VERBOSE)" == "TRUE" COMPILE_ECHO_SWITCH= diff --git a/solenv/inc/target.mk b/solenv/inc/target.mk index 1a4ad6e182a0..0fe06145879d 100644 --- a/solenv/inc/target.mk +++ b/solenv/inc/target.mk @@ -1518,7 +1518,7 @@ $(LOCALIZE_ME_DEST) .PHONY : $(LOCALIZE_ME) $(LOCALIZESDF) .ENDIF # "$(LASTRUN_MERGED)"=="TRUE" $(COMMAND_ECHO)-$(MKDIR) $(@:d) $(COMMAND_ECHO)-$(RM) $@ - $(COMMAND_ECHO)$(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:b:+"_tmpl")$(@:e) -o $(@:d)/$(@:b:+"_tmpl")$(@:e).$(INPATH) -m $(LOCALIZESDF) -l all + $(COMMAND_ECHO)$(TRANSEX) -p $(PRJNAME) -i $(@:b:+"_tmpl")$(@:e) -o $(@:d)/$(@:b:+"_tmpl")$(@:e).$(INPATH) -m $(LOCALIZESDF) -l all $(COMMAND_ECHO)$(RENAME) $(@:d)$(@:b:+"_tmpl")$(@:e).$(INPATH) $@ .ENDIF # "$(WITH_LANG)"=="" @@ -2043,6 +2043,7 @@ $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(BIN))/hid.lst .PHONY : .INCLUDE : tg_merge.mk .INCLUDE : tg_propmerge.mk +.INCLUDE : tg_xmerge.mk wordcount: wc *.* >> $(TMP)/wc.lst diff --git a/solenv/inc/tg_config.mk b/solenv/inc/tg_config.mk index bbc720ed600e..cfe2fe147ebe 100644 --- a/solenv/inc/tg_config.mk +++ b/solenv/inc/tg_config.mk @@ -137,7 +137,7 @@ $(XCU_LANG) : $(LOCALIZESDF) $(PROCESSOUT)/merge/$(PACKAGEDIR)/%.xcu : %.xcu @-$(MKDIRHIER) $(@:d) - $(COMMAND_ECHO)$(CFGEX) $(CFGEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $@ -m $(LOCALIZESDF) -l all + $(COMMAND_ECHO)$(CFGEX) -p $(PRJNAME) -i $(@:f) -o $@ -m $(LOCALIZESDF) -l all .IF "$(XCU_LANG)" != "" $(XCU_LANG) : $(XSLDIR)/alllang.xsl diff --git a/solenv/inc/tg_help.mk b/solenv/inc/tg_help.mk index aa62b1cf477f..89f1ebabec6c 100644..100755 --- a/solenv/inc/tg_help.mk +++ b/solenv/inc/tg_help.mk @@ -45,7 +45,7 @@ $(COMMONMISC)$/{$(aux_alllangiso)}$/$(SHELL_PACKAGE)$/%.xhp :| %.xhp $(COMMONMISC)$/$(TARGET).done : $(HLANGXHPFILES) .IF "$(WITH_LANG)"!="" - $(AUGMENT_LIBRARY_PATH) $(HELPEX) -QQ -p $(PRJNAME) -r $(PRJ) -i @$(mktmp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES))))) -x $(COMMONMISC) -y $(SHELL_PACKAGE) -l all -lf $(aux_alllangiso:t",") -m $(LOCALIZESDF) && $(TOUCH) $@ + $(AUGMENT_LIBRARY_PATH) $(HELPEX) -p $(PRJNAME) -r $(PRJ) -i @$(mktmp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES))))) -x $(COMMONMISC) -y $(SHELL_PACKAGE) -l all -lf $(aux_alllangiso:t",") -m $(LOCALIZESDF) && $(TOUCH) $@ .ELSE # "$(WITH_LANG)"!="" cp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES)))) $(COMMONMISC)$/en-US$/$(SHELL_PACKAGE) && $(TOUCH) $@ .ENDIF # "$(WITH_LANG)"!="" diff --git a/solenv/inc/tg_srs.mk b/solenv/inc/tg_srs.mk index 347dd25569de..4e70eb06b1b4 100644 --- a/solenv/inc/tg_srs.mk +++ b/solenv/inc/tg_srs.mk @@ -56,7 +56,7 @@ $(foreach,i,$(SRC$(TNR)FILES) $(COMMONMISC)/$(TARGET)/$i) : $$(@:f) $(LOCALIZESD $(COMMAND_ECHO)-$(MKDIR) $(@:d) $(COMMAND_ECHO)-$(RM) $@ $(COMMAND_ECHO)-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME) - $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) $(TRANSEX_VERBOSITY) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all + $(COMMAND_ECHO)$(WRAPCMD) $(TRANSEX) -p $(PRJNAME) -i $(@:f) -o $(@).$(INPATH) -m $(LOCALIZESDF) -l all $(COMMAND_ECHO)$(RENAME) $@.$(INPATH) $@ $(COMMAND_ECHO)-$(RM) $@.$(INPATH) diff --git a/solenv/inc/tg_xmerge.mk b/solenv/inc/tg_xmerge.mk new file mode 100755 index 000000000000..fa3e2297184f --- /dev/null +++ b/solenv/inc/tg_xmerge.mk @@ -0,0 +1,109 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +.IF "$(XTXFILES)"!="" + +ALLTAR : $(MISC)/$(TARGET).xtx.pmerge.mk $(XTXFILES) + +.IF "$(L10NEXT)"=="" +L10NEXT:=.txt +.ENDIF + +$(MISC)/$(TARGET).xtx.pmerge.mk : $(XTXFILES) + +$(XTXFILES) : $(LOCALIZESDF) + +.INCLUDE .IGNORE : $(MISC)/$(TARGET).xtx.pmerge.mk + +.IF "$(alllangiso)"!="$(last_merge)" +XTXMERGEPHONY:=.PHONY +.ENDIF # "$(alllangiso)" != "$(last_merge)" + +$(MISC)/$(TARGET)/%$(L10NEXT) $(XTXMERGEPHONY) : %.xtx + @@-$(MKDIRHIER) $(@:d) +.IF "$(WITH_LANG)"=="" + $(COMMAND_ECHO)$(COPY) $< $@ +.ELSE # "$(WITH_LANG)"=="" + @@-$(RM) $@ + $(COMMAND_ECHO)@noop $(assign XTXMERGELIST+:=$(<:f)) + $(COMMAND_ECHO)@noop $(assign XTXDESTDIR:=$(@:d)) +.ENDIF # "$(WITH_LANG)"=="" + +$(MISC)/$(TARGET).xtx.pmerge.mk : $(XTXMERGELIST) +.IF "$(WITH_LANG)"!="" +# xtxex command file requirements: +# - one file per line +# - no spaces +# - no empty lines +# $(uniq ...) to workaround $assign adding the value twice... + @noop $(assign XTXMERGEFILELIST:=$(uniq $(XTXMERGELIST))) + $(COMMAND_ECHO) $(SOLARBINDIR)/xtxex -p $(PRJNAME) -r $(PRJ) -o $(XTXDESTDIR) -i @$(mktmp $(XTXMERGEFILELIST:t"\n":s/ //)) -l $(alllangiso:s/ /,/) -f $(alllangiso:s/ /,/) -m $(LOCALIZESDF) -s"[path]/[fileNoExt]_[language]$(L10NEXT)" +.ENDIF # "$(WITH_LANG)"!="" + + @-$(RM) $@ + $(COMMAND_ECHO)echo last_merge=$(alllangiso) > $@ +.ENDIF # "$(XTXFILES)"!="" + +.IF "$(TREEFILE)"!="" +ALLTAR : $(MISC)/$(TARGET).tree.pmerge.mk $(TREEFILE) + +$(MISC)/$(TARGET).tree.pmerge.mk : $(TREEFILE) + +$(TREEFILE) : $(LOCALIZESDF) + +.INCLUDE .IGNORE : $(MISC)/$(TARGET).tree.pmerge.mk + +.IF "$(alllangiso)"!="$(last_merge)" +TREEMERGEPHONY:=.PHONY +.ENDIF # "$(alllangiso)" != "$(last_merge)" + +$(OUT_HELP)/en-US/help.tree $(TREEMERGEPHONY) : help.tree + @@-$(MKDIRHIER) $(@:d) +.IF "$(WITH_LANG)"=="" + $(COMMAND_ECHO)$(COPY) $< $@ +.ELSE # "$(WITH_LANG)"=="" + @@-$(RM) $@ + $(COMMAND_ECHO)@noop $(assign TREEMERGELIST+:=$(<:f)) + $(COMMAND_ECHO)@noop $(assign TREEDESTDIR:=$(@:d:d:d)) +.ENDIF # "$(WITH_LANG)"=="" + +$(MISC)/$(TARGET).tree.pmerge.mk : $(TREEMERGELIST) +.IF "$(WITH_LANG)"!="" +# xtxex command file requirements: +# - one file per line +# - no spaces +# - no empty lines +# $(uniq ...) to workaround $assign adding the value twice... + @noop $(assign TREEMERGEFILELIST:=$(uniq $(TREEMERGELIST))) +# Variables for the pattern filename,fileNoExt,language,extension,pathPrefix,pathPostFix,path + $(COMMAND_ECHO) $(SOLARBINDIR)/xhtex -p $(PRJNAME) -r $(PRJ) -o $(TREEDESTDIR) -i @$(mktmp $(TREEMERGEFILELIST:t"\n":s/ //)) -l $(alllangiso:s/ /,/) -f $(alllangiso:s/ /,/) -m $(LOCALIZESDF) -s"[path]/[language]/[fileNoExt].tree" +.ENDIF # "$(WITH_LANG)"!="" + @-$(RM) $@ + $(COMMAND_ECHO)echo last_merge=$(alllangiso) > $@ +.ENDIF # "$(TREEFILE)"!="" + + diff --git a/solenv/inc/wntmsci10.mk b/solenv/inc/wntmsci10.mk index 6ed8327c8506..5c959f7d0e3c 100644 --- a/solenv/inc/wntmsci10.mk +++ b/solenv/inc/wntmsci10.mk @@ -34,7 +34,7 @@ JAVAFLAGSDEBUG=-g # SOLAR JAva Unterstuetzung nur fuer wntmsci ASM=ml -AFLAGS=/c /Cp /coff +AFLAGS=/c /Cp /coff /safeseh # architecture dependent flags for the C and C++ compiler that can be changed by # exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build diff --git a/solenv/inc/wntmsci11.mk b/solenv/inc/wntmsci11.mk index b270a6a25cfe..972feb0a8fdc 100644 --- a/solenv/inc/wntmsci11.mk +++ b/solenv/inc/wntmsci11.mk @@ -34,7 +34,7 @@ JAVAFLAGSDEBUG=-g # SOLAR JAva Unterstuetzung nur fuer wntmsci ASM=ml -AFLAGS=/c /Cp /coff +AFLAGS=/c /Cp /coff /safeseh # architecture dependent flags for the C and C++ compiler that can be changed by # exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build @@ -82,6 +82,10 @@ COMPILE_ECHO_FILE= # lookup": # -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 CFLAGS+=-Zm500 -Zc:forScope,wchar_t- -GR + +# Stack buffer overrun detection. +CFLAGS+=-GS + CFLAGS+=-c -nologo -Gs $(NOLOGO) CDEFS+= -D_X86_=1 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NON_CONFORMING_SWPRINTFS @@ -235,8 +239,17 @@ LINKOUTPUTFILTER= $(PIPEERROR) $(GREP) -v "LNK4197:" LINKFLAGS=/MAP /OPT:NOREF .ENDIF +# excetion handling protection +LINKFLAGS+=-safeseh + +# enable DEP +LINKFLAGS+=-nxcompat + +# enable ASLR +LINKFLAGS+=-dynamicbase + .IF "$(linkinc)" != "" -LINKFLAGS=-NODEFAULTLIB -INCREMENTAL:YES -DEBUG +LINKFLAGS+=-NODEFAULTLIB -INCREMENTAL:YES -DEBUG MAPFILE= _VC_MANIFEST_INC=1 .ELSE # "$(linkinc)" != "" |