diff options
author | Ingo Schmidt <is@openoffice.org> | 2010-05-26 14:44:44 +0200 |
---|---|---|
committer | Ingo Schmidt <is@openoffice.org> | 2010-05-26 14:44:44 +0200 |
commit | 1e96d7d75ab2fd674d80788d7ebd52ce97fb0d17 (patch) | |
tree | f6b82d265ded20ee1f5c3b10061bdff632ca9884 /solenv/bin/modules/installer/windows | |
parent | ff94b38b00f90b4fbc8f49d132d46f27c537e143 (diff) |
native305 #i92977# new Windows INSTALLLOCATION settings
Diffstat (limited to 'solenv/bin/modules/installer/windows')
-rw-r--r-- | solenv/bin/modules/installer/windows/component.pm | 16 | ||||
-rw-r--r-- | solenv/bin/modules/installer/windows/directory.pm | 193 | ||||
-rw-r--r-- | solenv/bin/modules/installer/windows/idtglobal.pm | 38 | ||||
-rw-r--r-- | solenv/bin/modules/installer/windows/property.pm | 12 | ||||
-rw-r--r-- | solenv/bin/modules/installer/windows/registry.pm | 8 | ||||
-rw-r--r-- | solenv/bin/modules/installer/windows/shortcut.pm | 4 |
6 files changed, 107 insertions, 164 deletions
diff --git a/solenv/bin/modules/installer/windows/component.pm b/solenv/bin/modules/installer/windows/component.pm index 125c8607f249..38989858a4b6 100644 --- a/solenv/bin/modules/installer/windows/component.pm +++ b/solenv/bin/modules/installer/windows/component.pm @@ -162,6 +162,11 @@ sub get_file_component_directory } $uniquedir = $onedir->{'uniquename'}; + + if ( $uniquedir eq $installer::globals::officeinstalldirectory ) + { + $uniquedir = "INSTALLLOCATION"; + } } $onefile->{'uniquedirname'} = $uniquedir; # saving it in the file collection @@ -176,16 +181,7 @@ sub get_file_component_directory sub get_registry_component_directory { - my $componentdir = ""; - - if ( $installer::globals::officeinstalldirectoryset ) - { - $componentdir = $installer::globals::officeinstalldirectory; - } - else - { - $componentdir = "INSTALLLOCATION"; - } + my $componentdir = "INSTALLLOCATION"; return $componentdir; } diff --git a/solenv/bin/modules/installer/windows/directory.pm b/solenv/bin/modules/installer/windows/directory.pm index 2a9463f508a1..6dde28120a44 100644 --- a/solenv/bin/modules/installer/windows/directory.pm +++ b/solenv/bin/modules/installer/windows/directory.pm @@ -110,7 +110,7 @@ sub create_unique_directorynames } else { - $uniqueparentname = "INSTALLLOCATION"; + $uniqueparentname = $installer::globals::programfilesfolder; } if ( $styles =~ /\bPROGRAMFILESFOLDER\b/ ) { $uniqueparentname = $installer::globals::programfilesfolder; } @@ -130,29 +130,50 @@ sub create_unique_directorynames $onedir->{'uniquename'} = $uniquename; $onedir->{'uniqueparentname'} = $uniqueparentname; - # setting the office installation directory - if ( $styles =~ /\bOFFICEDIRECTORY\b/ ) + # setting the installlocation directory + if ( $styles =~ /\bISINSTALLLOCATION\b/ ) { - if ( $installer::globals::officeinstalldirectoryset ) { installer::exiter::exit_program("ERROR: Directory with flag OFFICEDIRECTORY alread set: \"$installer::globals::officeinstalldirectory\".", "create_unique_directorynames"); } - $installer::globals::officeinstalldirectory = $uniquename; - $installer::globals::officeinstalldirectoryset = 1; - if ( $installer::globals::officeinstalldirectory =~ /sun_/i ) { $installer::globals::sundirexists = 1; } + if ( $installer::globals::installlocationdirectoryset ) { installer::exiter::exit_program("ERROR: Directory with flag ISINSTALLLOCATION alread set: \"$installer::globals::installlocationdirectory\".", "create_unique_directorynames"); } + $installer::globals::installlocationdirectory = $uniquename; + $installer::globals::installlocationdirectoryset = 1; + if ( $installer::globals::installlocationdirectory =~ /oracle_/i ) { $installer::globals::sundirexists = 1; } } + } +} + +##################################################### +# The directory with the style ISINSTALLLOCATION +# will be replaced by INSTALLLOCATION +##################################################### + +sub set_installlocation_directory +{ + my ( $directoryref ) = @_; + + if ( ! $installer::globals::installlocationdirectoryset ) { installer::exiter::exit_program("ERROR: Directory with flag ISINSTALLLOCATION not set!", "set_installlocation_directory"); } - # setting the bais installation directory - if ( $styles =~ /\bBASISDIRECTORY\b/ ) + for ( my $i = 0; $i <= $#{$directoryref}; $i++ ) + { + my $onedir = ${$directoryref}[$i]; + + if ( $onedir->{'uniquename'} eq $installer::globals::installlocationdirectory ) { - if ( $installer::globals::basisinstalldirectoryset ) { installer::exiter::exit_program("ERROR: Directory with flag BASISDIRECTORY alread set: \"$installer::globals::basisinstalldirectory\".", "create_unique_directorynames"); } - $installer::globals::basisinstalldirectory = $uniquename; - $installer::globals::basisinstalldirectoryset = 1; + $onedir->{'uniquename'} = "INSTALLLOCATION"; + + if (($installer::globals::addchildprojects) || + ($installer::globals::patch) || + ($installer::globals::languagepack) || + ($allvariableshashref->{'CHANGETARGETDIR'})) + { + + my $sourcediraddon = "\:\."; + $onedir->{'defaultdir'} = $onedir->{'defaultdir'} . $sourcediraddon; + } } - # setting the ure installation directory - if ( $styles =~ /\bUREDIRECTORY\b/ ) + if ( $onedir->{'uniqueparentname'} eq $installer::globals::installlocationdirectory ) { - if ( $installer::globals::ureinstalldirectoryset ) { installer::exiter::exit_program("ERROR: Directory with flag UREDIRECTORY alread set: \"$installer::globals::ureinstalldirectory\".", "create_unique_directorynames"); } - $installer::globals::ureinstalldirectory = $uniquename; - $installer::globals::ureinstalldirectoryset = 1; + $onedir->{'uniqueparentname'} = "INSTALLLOCATION"; } } } @@ -266,27 +287,19 @@ sub add_root_directories { my ($directorytableref, $allvariableshashref) = @_; - my $oneline = "TARGETDIR\t\tSourceDir\n"; - push(@{$directorytableref}, $oneline); +# my $sourcediraddon = ""; +# if (($installer::globals::addchildprojects) || +# ($installer::globals::patch) || +# ($installer::globals::languagepack) || +# ($allvariableshashref->{'CHANGETARGETDIR'})) +# { +# $sourcediraddon = "\:\."; +# } - my $sourcediraddon = ""; - if (($installer::globals::addchildprojects) || - ($installer::globals::patch) || - ($installer::globals::languagepack) || - ($allvariableshashref->{'CHANGETARGETDIR'})) - { - $sourcediraddon = "\:\."; - } + my $oneline = ""; - if (!($installer::globals::product =~ /ada/i )) # the following directories not for ada products + if (( ! $installer::globals::patch ) && ( ! $installer::globals::languagepack ) && ( ! $allvariableshashref->{'DONTUSESTARTMENUFOLDER'} )) { - $oneline = "$installer::globals::programfilesfolder\tTARGETDIR\t.\n"; - push(@{$directorytableref}, $oneline); - - # my $manufacturer = $installer::globals::manufacturer; - # my $shortmanufacturer = installer::windows::idtglobal::make_eight_three_conform($manufacturer, "dir"); # third parameter not used - # $shortmanufacturer =~ s/\s/\_/g; # changing empty space to underline - my $productname = $allvariableshashref->{'PRODUCTNAME'}; my $productversion = $allvariableshashref->{'PRODUCTVERSION'}; my $baseproductversion = $productversion; @@ -318,83 +331,63 @@ sub add_root_directories my $shortproductkey = installer::windows::idtglobal::make_eight_three_conform($productkey, "dir"); # third parameter not used $shortproductkey =~ s/\s/\_/g; # changing empty space to underline - if ( $allvariableshashref->{'SUNDIR'} ) - { - if ( $allvariableshashref->{'SUNDIRNAME'} ) { $installer::globals::sundirname = $allvariableshashref->{'SUNDIRNAME'}; } - $oneline = "sundirectory\t$installer::globals::programfilesfolder\t$installer::globals::sundirname$sourcediraddon\n"; - push(@{$directorytableref}, $oneline); - - $oneline = "INSTALLLOCATION\tsundirectory\t$shortproductkey|$productkey$sourcediraddon\n"; - push(@{$directorytableref}, $oneline); - } - else - { - if ( $allvariableshashref->{'PROGRAMFILESROOT'} ) - { - $oneline = "INSTALLLOCATION\t$installer::globals::programfilesfolder\t.\n"; - } - else - { - $oneline = "INSTALLLOCATION\t$installer::globals::programfilesfolder\t$shortproductkey|$productkey$sourcediraddon\n"; - } - - push(@{$directorytableref}, $oneline); - } - - $oneline = "$installer::globals::programmenufolder\tTARGETDIR\t.\n"; + $oneline = "$installer::globals::officemenufolder\t$installer::globals::programmenufolder\t$shortproductkey|$realproductkey\n"; push(@{$directorytableref}, $oneline); + } - if (( ! $installer::globals::patch ) && ( ! $installer::globals::languagepack ) && ( ! $allvariableshashref->{'DONTUSESTARTMENUFOLDER'} )) - { - $oneline = "$installer::globals::officemenufolder\t$installer::globals::programmenufolder\t$shortproductkey|$realproductkey\n"; - push(@{$directorytableref}, $oneline); - } + $oneline = "TARGETDIR\t\tSourceDir\n"; + push(@{$directorytableref}, $oneline); - $oneline = "$installer::globals::startupfolder\tTARGETDIR\t.\n"; - push(@{$directorytableref}, $oneline); + $oneline = "$installer::globals::programfilesfolder\tTARGETDIR\t.\n"; + push(@{$directorytableref}, $oneline); - $oneline = "$installer::globals::desktopfolder\tTARGETDIR\t.\n"; - push(@{$directorytableref}, $oneline); + $oneline = "$installer::globals::programmenufolder\tTARGETDIR\t.\n"; + push(@{$directorytableref}, $oneline); - $oneline = "$installer::globals::startmenufolder\tTARGETDIR\t.\n"; - push(@{$directorytableref}, $oneline); + $oneline = "$installer::globals::startupfolder\tTARGETDIR\t.\n"; + push(@{$directorytableref}, $oneline); - $oneline = "$installer::globals::commonfilesfolder\tTARGETDIR\t.\n"; - push(@{$directorytableref}, $oneline); + $oneline = "$installer::globals::desktopfolder\tTARGETDIR\t.\n"; + push(@{$directorytableref}, $oneline); - $oneline = "$installer::globals::commonappdatafolder\tTARGETDIR\t.\n"; - push(@{$directorytableref}, $oneline); + $oneline = "$installer::globals::startmenufolder\tTARGETDIR\t.\n"; + push(@{$directorytableref}, $oneline); - $oneline = "$installer::globals::localappdatafolder\tTARGETDIR\t.\n"; - push(@{$directorytableref}, $oneline); + $oneline = "$installer::globals::commonfilesfolder\tTARGETDIR\t.\n"; + push(@{$directorytableref}, $oneline); - if ( $installer::globals::usesharepointpath ) - { - $oneline = "SHAREPOINTPATH\tTARGETDIR\t.\n"; - push(@{$directorytableref}, $oneline); - } + $oneline = "$installer::globals::commonappdatafolder\tTARGETDIR\t.\n"; + push(@{$directorytableref}, $oneline); - $oneline = "$installer::globals::systemfolder\tTARGETDIR\t.\n"; - push(@{$directorytableref}, $oneline); + $oneline = "$installer::globals::localappdatafolder\tTARGETDIR\t.\n"; + push(@{$directorytableref}, $oneline); - my $localtemplatefoldername = $installer::globals::templatefoldername; - my $directorytableentry = $localtemplatefoldername; - my $shorttemplatefoldername = installer::windows::idtglobal::make_eight_three_conform($localtemplatefoldername, "dir"); - if ( $shorttemplatefoldername ne $localtemplatefoldername ) { $directorytableentry = "$shorttemplatefoldername|$localtemplatefoldername"; } - $oneline = "$installer::globals::templatefolder\tTARGETDIR\t$directorytableentry\n"; + if ( $installer::globals::usesharepointpath ) + { + $oneline = "SHAREPOINTPATH\tTARGETDIR\t.\n"; push(@{$directorytableref}, $oneline); + } - if ( $installer::globals::fontsdirname ) - { - $oneline = "$installer::globals::fontsfolder\t$installer::globals::fontsdirparent\t$installer::globals::fontsfoldername\:$installer::globals::fontsdirname\n"; - } - else - { - $oneline = "$installer::globals::fontsfolder\tTARGETDIR\t$installer::globals::fontsfoldername\n"; - } + $oneline = "$installer::globals::systemfolder\tTARGETDIR\t.\n"; + push(@{$directorytableref}, $oneline); - push(@{$directorytableref}, $oneline); + my $localtemplatefoldername = $installer::globals::templatefoldername; + my $directorytableentry = $localtemplatefoldername; + my $shorttemplatefoldername = installer::windows::idtglobal::make_eight_three_conform($localtemplatefoldername, "dir"); + if ( $shorttemplatefoldername ne $localtemplatefoldername ) { $directorytableentry = "$shorttemplatefoldername|$localtemplatefoldername"; } + $oneline = "$installer::globals::templatefolder\tTARGETDIR\t$directorytableentry\n"; + push(@{$directorytableref}, $oneline); + + if ( $installer::globals::fontsdirname ) + { + $oneline = "$installer::globals::fontsfolder\t$installer::globals::fontsdirparent\t$installer::globals::fontsfoldername\:$installer::globals::fontsdirname\n"; } + else + { + $oneline = "$installer::globals::fontsfolder\tTARGETDIR\t$installer::globals::fontsfoldername\n"; + } + + push(@{$directorytableref}, $oneline); } @@ -404,7 +397,7 @@ sub add_root_directories sub create_directory_table { - my ($directoryref, $basedir, $allvariableshashref, $shortdirnamehashref) = @_; + my ($directoryref, $basedir, $allvariableshashref, $shortdirnamehashref, $loggingdir) = @_; # Structure of the directory table: # Directory Directory_Parent DefaultDir @@ -419,7 +412,11 @@ sub create_directory_table overwrite_programfilesfolder($allvariableshashref); create_unique_directorynames($directoryref); + if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt_local_1.log", $directoryref); } create_defaultdir_directorynames($directoryref, $shortdirnamehashref); # only destdir! + if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt_local_2.log", $directoryref); } + set_installlocation_directory($directoryref); + if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt_local_3.log", $directoryref); } installer::windows::idtglobal::write_idt_header(\@directorytable, "directory"); add_root_directories(\@directorytable, $allvariableshashref); create_directorytable_from_collection(\@directorytable, $directoryref); diff --git a/solenv/bin/modules/installer/windows/idtglobal.pm b/solenv/bin/modules/installer/windows/idtglobal.pm index b82f5175250b..dd8151485afc 100644 --- a/solenv/bin/modules/installer/windows/idtglobal.pm +++ b/solenv/bin/modules/installer/windows/idtglobal.pm @@ -1023,44 +1023,6 @@ sub add_officedir_to_database } } - if ( $installer::globals::basisinstalldirectoryset ) - { - $found = 0; - - for ( my $i = 0; $i <= $#{$customacfile}; $i++ ) - { - if ( ${$customacfile}[$i] =~ /\bBASISDIRECTORYGID\b/ ) - { - ${$customacfile}[$i] =~ s/\bBASISDIRECTORYGID\b/$installer::globals::basisinstalldirectory/; - $found = 1; - } - } - - if (( ! $found ) && ( ! $allvariables->{'IGNOREDIRECTORYLAYER'} )) - { - installer::exiter::exit_program("ERROR: \"BASISDIRECTORYGID\" not found in \"$customactionfilename\" !", "add_officedir_to_database"); - } - } - - if ( $installer::globals::ureinstalldirectoryset ) - { - $found = 0; - - for ( my $i = 0; $i <= $#{$customacfile}; $i++ ) - { - if ( ${$customacfile}[$i] =~ /\bUREDIRECTORYGID\b/ ) - { - ${$customacfile}[$i] =~ s/\bUREDIRECTORYGID\b/$installer::globals::ureinstalldirectory/; - $found = 1; - } - } - - if (( ! $found ) && ( ! $allvariables->{'IGNOREDIRECTORYLAYER'} )) - { - installer::exiter::exit_program("ERROR: \"UREDIRECTORYGID\" not found in \"$customactionfilename\" !", "add_officedir_to_database"); - } - } - # Saving the file installer::files::save_file($customactionfilename ,$customacfile); diff --git a/solenv/bin/modules/installer/windows/property.pm b/solenv/bin/modules/installer/windows/property.pm index 2ef083178122..e9f122a54d86 100644 --- a/solenv/bin/modules/installer/windows/property.pm +++ b/solenv/bin/modules/installer/windows/property.pm @@ -318,18 +318,6 @@ sub set_important_properties push(@{$propertyfile}, $onepropertyline); } - if ( $installer::globals::basisdirhostname ) - { - my $onepropertyline = "BASISDIRHOSTNAME" . "\t" . $installer::globals::basisdirhostname . "\n"; - push(@{$propertyfile}, $onepropertyline); - } - - if ( $installer::globals::uredirhostname ) - { - my $onepropertyline = "UREDIRHOSTNAME" . "\t" . $installer::globals::uredirhostname . "\n"; - push(@{$propertyfile}, $onepropertyline); - } - if ( $installer::globals::sundirhostname ) { my $onepropertyline = "SUNDIRHOSTNAME" . "\t" . $installer::globals::sundirhostname . "\n"; diff --git a/solenv/bin/modules/installer/windows/registry.pm b/solenv/bin/modules/installer/windows/registry.pm index f2edd8d0e830..33583ce711a2 100644 --- a/solenv/bin/modules/installer/windows/registry.pm +++ b/solenv/bin/modules/installer/windows/registry.pm @@ -203,8 +203,8 @@ sub get_registry_value if ( $registry->{'Value'} ) { $value = $registry->{'Value'}; } $value =~ s/\\\"/\"/g; # no more masquerading of '"' - $value =~ s/\<progpath\>/\[OFFICEINSTALLLOCATION\]/; - $value =~ s/\[OFFICEINSTALLLOCATION\]\\/\[OFFICEINSTALLLOCATION\]/; # removing "\" after "[OFFICEINSTALLLOCATION]" + $value =~ s/\<progpath\>/\[INSTALLLOCATION\]/; + $value =~ s/\[INSTALLLOCATION\]\\/\[INSTALLLOCATION\]/; # removing "\" after "[INSTALLLOCATION]" if ( $value =~ /\%/ ) { $value = installer::worker::replace_variables_in_string($value, $allvariableshashref); } @@ -224,8 +224,8 @@ sub get_registry_val64 if ( $registry->{'Val64'} ) { $value = $registry->{'Val64'}; } $value =~ s/\\\"/\"/g; # no more masquerading of '"' - $value =~ s/\<progpath\>/\[OFFICEINSTALLLOCATION\]/; - $value =~ s/\[OFFICEINSTALLLOCATION\]\\/\[OFFICEINSTALLLOCATION\]/; # removing "\" after "[OFFICEINSTALLLOCATION]" + $value =~ s/\<progpath\>/\[INSTALLLOCATION\]/; + $value =~ s/\[INSTALLLOCATION\]\\/\[INSTALLLOCATION\]/; # removing "\" after "[INSTALLLOCATION]" if ( $value =~ /\%/ ) { $value = installer::worker::replace_variables_in_string($value, $allvariableshashref); } diff --git a/solenv/bin/modules/installer/windows/shortcut.pm b/solenv/bin/modules/installer/windows/shortcut.pm index b15c7418352f..76039baf10c9 100644 --- a/solenv/bin/modules/installer/windows/shortcut.pm +++ b/solenv/bin/modules/installer/windows/shortcut.pm @@ -111,7 +111,7 @@ sub get_shortcut_directory $directory = $onedir->{'uniquename'}; - if ($directory eq "") { $directory = "OFFICEINSTALLLOCATION"; } # Shortcuts in the root directory + if ($directory eq "") { $directory = "INSTALLLOCATION"; } # Shortcuts in the root directory return $directory; } @@ -343,7 +343,7 @@ sub get_folderitem_wkdir $directory = $onedir->{'uniquename'}; - if ($directory eq "") { $directory = "OFFICEINSTALLLOCATION"; } + if ($directory eq "") { $directory = "INSTALLLOCATION"; } } return $directory; |