summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-10-30 16:24:45 +0100
committerMichael Stahl <mstahl@redhat.com>2013-10-31 10:42:22 +0100
commitee27b235f620b09845f6909fffad6bb120222464 (patch)
tree0c3501a780cebbf69b30d9b8966785397362cbea
parentbdd97ec6ee5ad96fd2452ce99b3ebd28e540629a (diff)
setup_native: use various scripts directly from SRCDIR
Change-Id: I6c53fed0a4eace9b306ce0ab425f16fa0ca7d7b3
-rw-r--r--setup_native/Package_scripts.mk5
-rw-r--r--solenv/bin/modules/installer/download.pm19
-rw-r--r--solenv/bin/modules/installer/languagepack.pm9
-rw-r--r--solenv/bin/modules/installer/simplepackage.pm13
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