From ee27b235f620b09845f6909fffad6bb120222464 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 30 Oct 2013 16:24:45 +0100 Subject: setup_native: use various scripts directly from SRCDIR Change-Id: I6c53fed0a4eace9b306ce0ab425f16fa0ca7d7b3 --- setup_native/Package_scripts.mk | 5 ----- solenv/bin/modules/installer/download.pm | 19 ++++--------------- solenv/bin/modules/installer/languagepack.pm | 9 ++++----- solenv/bin/modules/installer/simplepackage.pm | 13 ++++++------- 4 files changed, 14 insertions(+), 32 deletions(-) diff --git a/setup_native/Package_scripts.mk b/setup_native/Package_scripts.mk index 997f12259b6b..238c3714fbe3 100644 --- a/setup_native/Package_scripts.mk +++ b/setup_native/Package_scripts.mk @@ -11,11 +11,6 @@ $(eval $(call gb_Package_Package,setup_native/scripts,$(SRCDIR)/setup_native/scr $(eval $(call gb_Package_set_outdir,setup_native/scripts,$(OUTDIR))) -$(eval $(call gb_Package_add_file,setup_native/scripts,bin/mac_install.script,mac_install.script)) -$(eval $(call gb_Package_add_file,setup_native/scripts,bin/osx_install_languagepack.applescript,osx_install_languagepack.applescript)) -$(eval $(call gb_Package_add_file,setup_native/scripts,bin/langpackscript.sh,langpackscript.sh)) -$(eval $(call gb_Package_add_file,setup_native/scripts,bin/downloadscript.sh,downloadscript.sh)) - ifeq ($(ENABLE_ONLINE_UPDATE),TRUE) $(eval $(call gb_Package_add_file,setup_native/scripts,bin/unpack_update,unpack_update.sh)) endif diff --git a/solenv/bin/modules/installer/download.pm b/solenv/bin/modules/installer/download.pm index 6f83943d7ad7..4d3bd6745ac2 100644 --- a/solenv/bin/modules/installer/download.pm +++ b/solenv/bin/modules/installer/download.pm @@ -741,23 +741,12 @@ sub create_download_sets else { # find and read setup script template - my $scriptfilename = "downloadscript.sh"; + my $scriptfilename = $ENV{'SRCDIR'} . "/setup_native/scripts/downloadscript.sh"; - my $scriptref = ""; + if (! -f $scriptfilename) { installer::exiter::exit_program("ERROR: Could not find script file $scriptfilename!", "create_download_sets"); } + my $scriptfile = installer::files::read_file($scriptfilename); - if ( $installer::globals::include_paths_read ) - { - $scriptref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$scriptfilename, $includepatharrayref, 0); - } - else - { - $scriptref = installer::scriptitems::get_sourcepath_from_filename_and_includepath_classic(\$scriptfilename, $includepatharrayref, 0); - } - - if ($$scriptref eq "") { installer::exiter::exit_program("ERROR: Could not find script file $scriptfilename!", "create_download_sets"); } - my $scriptfile = installer::files::read_file($$scriptref); - - $infoline = "Found script file $scriptfilename: $$scriptref \n"; + $infoline = "Found script file $scriptfilename \n"; push( @installer::globals::logfileinfo, $infoline); # add product name into script template diff --git a/solenv/bin/modules/installer/languagepack.pm b/solenv/bin/modules/installer/languagepack.pm index 6288d35e863a..cc927b168865 100644 --- a/solenv/bin/modules/installer/languagepack.pm +++ b/solenv/bin/modules/installer/languagepack.pm @@ -454,12 +454,11 @@ sub build_installer_for_languagepack # find and read setup script template - my $scriptfilename = "langpackscript.sh"; - my $scriptref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$scriptfilename, $includepatharrayref, 0); - if ($$scriptref eq "") { installer::exiter::exit_program("ERROR: Could not find script file $scriptfilename!", "build_installer_for_languagepack"); } - my $scriptfile = installer::files::read_file($$scriptref); + my $scriptfilename = $ENV{'SRCDIR'} . "/setup_native/scripts/langpackscript.sh"; + if (! -f $scriptfilename) { installer::exiter::exit_program("ERROR: Could not find script file $scriptfilename!", "build_installer_for_languagepack"); } + my $scriptfile = installer::files::read_file($scriptfilename); - my $infoline = "Found script file $scriptfilename: $$scriptref \n"; + my $infoline = "Found script file $scriptfilename: $scriptfile \n"; push( @installer::globals::logfileinfo, $infoline); # find and read english license file diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm index ef42bdbc5bda..554e0d847a94 100644 --- a/solenv/bin/modules/installer/simplepackage.pm +++ b/solenv/bin/modules/installer/simplepackage.pm @@ -342,25 +342,24 @@ sub create_package my $scriptfilename = ""; if ( $installer::globals::languagepack ) { $scriptfilename = "osx_install_languagepack.applescript"; } if ( $installer::globals::helppack ) { $scriptfilename = "osx_install_helppack.applescript"; } - my $scripthelpersolverfilename = "mac_install.script"; + my $scripthelperfilename = $ENV{'SRCDIR'} . "/setup_native/scripts/mac_install.script"; # my $scripthelperrealfilename = $volume_name; my $scripthelperrealfilename = $volume_name_classic_app; my $translationfilename = $installer::globals::macinstallfilename; # Finding both files in solver - my $scriptref = installer::scriptitems::get_sourcepath_from_filename_and_includepath( \$scriptfilename, $includepatharrayref, 0); - if ($$scriptref eq "") { installer::exiter::exit_program("ERROR: Could not find Apple script $scriptfilename!", "create_package"); } - my $scripthelperref = installer::scriptitems::get_sourcepath_from_filename_and_includepath( \$scripthelpersolverfilename, $includepatharrayref, 0); - if ($$scripthelperref eq "") { installer::exiter::exit_program("ERROR: Could not find Apple script $scripthelpersolverfilename!", "create_package"); } + my $scriptref = $ENV{'SRCDIR'} . "/setup_native/scripts/" . $scriptfilename; + if (! -f $scriptref) { installer::exiter::exit_program("ERROR: Could not find Apple script $scriptfilename ($scriptref)!", "create_package"); } + if (! -f $scripthelperfilename) { installer::exiter::exit_program("ERROR: Could not find Apple script $scripthelperfilename!", "create_package"); } my $translationfileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath( \$translationfilename, $includepatharrayref, 0); if ($$translationfileref eq "") { installer::exiter::exit_program("ERROR: Could not find Apple script translation file $translationfilename ( includepatharrayref = $includepatharrayref )", "create_package"); } $scriptfilename = $contentsfolder . "/" . $scriptrealfilename; $scripthelperrealfilename = $contentsfolder . "/" . $scripthelperrealfilename; - installer::systemactions::copy_one_file($$scriptref, $scriptfilename); - installer::systemactions::copy_one_file($$scripthelperref, $scripthelperrealfilename); + installer::systemactions::copy_one_file($scriptref, $scriptfilename); + installer::systemactions::copy_one_file($scripthelperfilename, $scripthelperrealfilename); # Replacing variables in script $scriptfilename # Localizing script $scriptfilename -- cgit v1.2.3