idtglobal.pm (1ba1fd99) idtglobal.pm (04be0b07)
1#**************************************************************
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance

--- 765 unchanged lines hidden (view full) ---

774 }
775}
776
777##############################################################
778# Copying all needed files to create a msi database
779# into one language specific directory
780##############################################################
781
1#**************************************************************
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance

--- 765 unchanged lines hidden (view full) ---

774 }
775}
776
777##############################################################
778# Copying all needed files to create a msi database
779# into one language specific directory
780##############################################################
781
782sub prepare_language_idt_directory
782sub prepare_language_idt_directory ($$$$$$$)
783{
784 my ($destinationdir, $newidtdir, $onelanguage, $filesref, $iconfilecollector, $binarytablefiles, $allvariables) = @_;
785
786 # Copying all idt-files from the source $installer::globals::idttemplatepath to the destination $destinationdir
787 # Copying all files in the subdirectory "Binary"
788 # Copying all files in the subdirectory "Icon"
789
790 my $infoline = "";
791
792 installer::systemactions::copy_directory($installer::globals::idttemplatepath, $destinationdir);
793
794 if ( -d $installer::globals::idttemplatepath . $installer::globals::separator . "Binary")
795 {
796 installer::systemactions::create_directory($destinationdir . $installer::globals::separator . "Binary");
783{
784 my ($destinationdir, $newidtdir, $onelanguage, $filesref, $iconfilecollector, $binarytablefiles, $allvariables) = @_;
785
786 # Copying all idt-files from the source $installer::globals::idttemplatepath to the destination $destinationdir
787 # Copying all files in the subdirectory "Binary"
788 # Copying all files in the subdirectory "Icon"
789
790 my $infoline = "";
791
792 installer::systemactions::copy_directory($installer::globals::idttemplatepath, $destinationdir);
793
794 if ( -d $installer::globals::idttemplatepath . $installer::globals::separator . "Binary")
795 {
796 installer::systemactions::create_directory($destinationdir . $installer::globals::separator . "Binary");
797 installer::systemactions::copy_directory($installer::globals::idttemplatepath . $installer::globals::separator . "Binary", $destinationdir . $installer::globals::separator . "Binary");
797 installer::systemactions::copy_directory(
798 $installer::globals::idttemplatepath . $installer::globals::separator . "Binary",
799 $destinationdir . $installer::globals::separator . "Binary");
798
799 if ((( $installer::globals::patch ) && ( $allvariables->{'WINDOWSPATCHBITMAPDIRECTORY'} )) || ( $allvariables->{'WINDOWSBITMAPDIRECTORY'} ))
800 {
801 my $bitmapdir = "";
800
801 if ((( $installer::globals::patch ) && ( $allvariables->{'WINDOWSPATCHBITMAPDIRECTORY'} )) || ( $allvariables->{'WINDOWSBITMAPDIRECTORY'} ))
802 {
803 my $bitmapdir = "";
802 if ( $allvariables->{'WINDOWSPATCHBITMAPDIRECTORY'} ) { $bitmapdir = $allvariables->{'WINDOWSPATCHBITMAPDIRECTORY'}; }
803 if ( $allvariables->{'WINDOWSBITMAPDIRECTORY'} ) { $bitmapdir = $allvariables->{'WINDOWSBITMAPDIRECTORY'}; }
804 if ( $allvariables->{'WINDOWSPATCHBITMAPDIRECTORY'} )
805 {
806 $bitmapdir = $allvariables->{'WINDOWSPATCHBITMAPDIRECTORY'};
807 }
808 if ( $allvariables->{'WINDOWSBITMAPDIRECTORY'} )
809 {
810 $bitmapdir = $allvariables->{'WINDOWSBITMAPDIRECTORY'};
811 }
804
805 my $newsourcedir = $installer::globals::unpackpath . $installer::globals::separator . $bitmapdir; # path setting in list file dependent from unpackpath !?
806 $installer::logger::Lang->printf("\n");
807 $installer::logger::Lang->printf(
808 "Overwriting files in directory \"%s%sBinary\" with files from directory \"%s\".\n",
809 $destinationdir,
810 $installer::globals::separator,
811 $newsourcedir);
812 if ( ! -d $newsourcedir )
813 {
814 my $currentdir = cwd();
812
813 my $newsourcedir = $installer::globals::unpackpath . $installer::globals::separator . $bitmapdir; # path setting in list file dependent from unpackpath !?
814 $installer::logger::Lang->printf("\n");
815 $installer::logger::Lang->printf(
816 "Overwriting files in directory \"%s%sBinary\" with files from directory \"%s\".\n",
817 $destinationdir,
818 $installer::globals::separator,
819 $newsourcedir);
820 if ( ! -d $newsourcedir )
821 {
822 my $currentdir = cwd();
815 installer::exiter::exit_program("ERROR: Directory $newsourcedir does not exist! Current directory is: $currentdir", "prepare_language_idt_directory");
823 installer::exiter::exit_program(
824 "ERROR: Directory $newsourcedir does not exist! Current directory is: $currentdir",
825 "prepare_language_idt_directory");
816 }
826 }
817 installer::systemactions::copy_directory($newsourcedir, $destinationdir . $installer::globals::separator . "Binary");
827 installer::systemactions::copy_directory(
828 $newsourcedir,
829 $destinationdir . $installer::globals::separator . "Binary");
818 }
819 }
820
821 installer::systemactions::create_directory($destinationdir . $installer::globals::separator . "Icon");
822
823 if ( -d $installer::globals::idttemplatepath . $installer::globals::separator . "Icon")
824 {
830 }
831 }
832
833 installer::systemactions::create_directory($destinationdir . $installer::globals::separator . "Icon");
834
835 if ( -d $installer::globals::idttemplatepath . $installer::globals::separator . "Icon")
836 {
825 installer::systemactions::copy_directory($installer::globals::idttemplatepath . $installer::globals::separator . "Icon", $destinationdir . $installer::globals::separator . "Icon");
837 installer::systemactions::copy_directory(
838 $installer::globals::idttemplatepath . $installer::globals::separator . "Icon",
839 $destinationdir . $installer::globals::separator . "Icon");
826 }
827
828 # Copying all files in $iconfilecollector, that describe icons of folderitems
829
830 for ( my $i = 0; $i <= $#{$iconfilecollector}; $i++ )
831 {
832 my $iconfilename = ${$iconfilecollector}[$i];
833 installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$iconfilename);
840 }
841
842 # Copying all files in $iconfilecollector, that describe icons of folderitems
843
844 for ( my $i = 0; $i <= $#{$iconfilecollector}; $i++ )
845 {
846 my $iconfilename = ${$iconfilecollector}[$i];
847 installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$iconfilename);
834 installer::systemactions::copy_one_file(${$iconfilecollector}[$i], $destinationdir . $installer::globals::separator . "Icon" . $installer::globals::separator . $iconfilename);
848 installer::systemactions::copy_one_file(
849 ${$iconfilecollector}[$i],
850 $destinationdir . $installer::globals::separator . "Icon" . $installer::globals::separator . $iconfilename);
835 }
836
837 # Copying all files in $binarytablefiles in the binary directory
838
851 }
852
853 # Copying all files in $binarytablefiles in the binary directory
854
839 for ( my $i = 0; $i <= $#{$binarytablefiles}; $i++ )
855 foreach my $binaryfile (@$binarytablefiles)
840 {
856 {
841 my $binaryfile = ${$binarytablefiles}[$i];
842 my $binaryfilepath = $binaryfile->{'sourcepath'};
843 my $binaryfilename = $binaryfilepath;
857 my $binaryfilepath = $binaryfile->{'sourcepath'};
858 my $binaryfilename = $binaryfilepath;
859 $installer::logger::Lang->printf("copying binary file %s to %s\n",
860 $binaryfilepath,
861 $binaryfilename);
844 installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$binaryfilename);
862 installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$binaryfilename);
845 installer::systemactions::copy_one_file($binaryfilepath, $destinationdir . $installer::globals::separator . "Binary" . $installer::globals::separator . $binaryfilename);
863 installer::systemactions::copy_one_file(
864 $binaryfilepath,
865 $destinationdir . $installer::globals::separator . "Binary" . $installer::globals::separator . $binaryfilename);
846 }
847
848 # Copying all new created and language independent idt-files to the destination $destinationdir.
849 # Example: "File.idt"
850
851 installer::systemactions::copy_directory_with_fileextension($newidtdir, $destinationdir, "idt");
852
853 # Copying all new created and language dependent idt-files to the destination $destinationdir.

--- 1602 unchanged lines hidden ---
866 }
867
868 # Copying all new created and language independent idt-files to the destination $destinationdir.
869 # Example: "File.idt"
870
871 installer::systemactions::copy_directory_with_fileextension($newidtdir, $destinationdir, "idt");
872
873 # Copying all new created and language dependent idt-files to the destination $destinationdir.

--- 1602 unchanged lines hidden ---