1#************************************************************************* 2# 3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4# 5# Copyright 2000, 2010 Oracle and/or its affiliates. 6# 7# OpenOffice.org - a multi-platform office productivity suite 8# 9# This file is part of OpenOffice.org. 10# 11# OpenOffice.org is free software: you can redistribute it and/or modify 12# it under the terms of the GNU Lesser General Public License version 3 13# only, as published by the Free Software Foundation. 14# 15# OpenOffice.org is distributed in the hope that it will be useful, 16# but WITHOUT ANY WARRANTY; without even the implied warranty of 17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18# GNU Lesser General Public License version 3 for more details 19# (a copy is included in the LICENSE file that accompanied this code). 20# 21# You should have received a copy of the GNU Lesser General Public License 22# version 3 along with OpenOffice.org. If not, see 23# <http://www.openoffice.org/license.html> 24# for a copy of the LGPLv3 License. 25# 26#************************************************************************* 27 28package installer::windows::icon; 29 30use installer::files; 31use installer::globals; 32use installer::pathanalyzer; 33use installer::windows::idtglobal; 34 35########################################################################################################### 36# Creating the file Icon.idt dynamically 37# Content: 38# Name Data 39########################################################################################################### 40 41sub create_icon_table 42{ 43 my ($iconfilecollector, $basedir) = @_; 44 45 my @icontable = (); 46 47 installer::windows::idtglobal::write_idt_header(\@icontable, "icon"); 48 49 # Only the iconfiles, that are used in the shortcut table for the 50 # FolderItems (entries in Windows startmenu) are added into the icon table. 51 52 for ( my $i = 0; $i <= $#{$iconfilecollector}; $i++ ) 53 { 54 my $iconfile = ${$iconfilecollector}[$i]; 55 56 installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$iconfile); 57 58 my %icon = (); 59 60 $icon{'Name'} = $iconfile; # simply soffice.exe 61 $icon{'Data'} = $iconfile; # simply soffice.exe 62 63 my $oneline = $icon{'Name'} . "\t" . $icon{'Data'} . "\n"; 64 65 push(@icontable, $oneline); 66 } 67 68 # Saving the file 69 70 my $icontablename = $basedir . $installer::globals::separator . "Icon.idt"; 71 installer::files::save_file($icontablename ,\@icontable); 72 my $infoline = "Created idt file: $icontablename\n"; 73 push(@installer::globals::logfileinfo, $infoline); 74 75} 76 771; 78