summaryrefslogtreecommitdiff
path: root/solenv/bin
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2013-05-14 12:20:19 +0100
committerMichael Meeks <michael.meeks@suse.com>2013-05-15 09:37:44 +0100
commitd7f7a6de9c8a854af7b2997ccfff30e921cacb69 (patch)
tree07464f66b0cfcedec252cabb0ffba0a7d6630099 /solenv/bin
parent324cae2f713e6a192d8cd34c276c73634b5111e4 (diff)
linkoo - link instset into install
Change-Id: I9f1c340562030bccbe0627ba9e91a56e1611b64e
Diffstat (limited to 'solenv/bin')
-rwxr-xr-xsolenv/bin/linkoo48
1 files changed, 48 insertions, 0 deletions
diff --git a/solenv/bin/linkoo b/solenv/bin/linkoo
index e7c0dcabcf7d..297ad5f9eb42 100755
--- a/solenv/bin/linkoo
+++ b/solenv/bin/linkoo
@@ -146,6 +146,13 @@ my %replaceable = (
# 'share/uno_packages' => '\.zip$'
);
+my @instdir_replaceable = (
+ 'share',
+ 'program',
+# 'presets', # leave these guys alone for now
+ 'help',
+);
+
my @search_dirs = ( 'lib', 'bin', 'class' );
my @known_duplicates = ( 'db.jar', 'libi18n', 'libnssckbi', 'libnssdbm', 'libsqlite3', 'libnssutil3', 'pythonloader.uno', 'pyuno', 'libpyuno' );
@@ -520,6 +527,46 @@ sub link_rdb_files()
print "\n";
}
+# instdir is an internal directory in the build tree
+# installdir is the directory we installed into.
+sub do_recursive_link($$)
+{
+ my ($instdir, $installdir) = @_;
+
+ (-d $installdir && -d $instdir) || die "not directories";
+
+ my $dirhandle;
+ if (opendir ($dirhandle, $instdir)) {
+ while (my $fname = readdir ($dirhandle)) {
+ $fname =~ /^\./ && next;
+ if (-d "$instdir/$fname") {
+ if (-d "$installdir/$fname") {
+ do_recursive_link("$instdir/$fname", "$installdir/$fname");
+ } else {
+ print STDERR "mismatching directories $instdir/$fname vs. $installdir/$fname\n";
+ }
+ } elsif (-f "$installdir/$fname") {
+ do_link ($instdir, $installdir, $fname, $fname, 0);
+ } else {
+ print STDERR "Warning: odd file type for $instdir/$fname\n";
+ }
+ }
+ } else {
+ print STDERR "Couldn't scan '$instdir': $!";
+ }
+}
+
+sub link_instdir($$)
+{
+ my ($instdir, $installdir) = @_;
+
+ print "linking instdir ...\n";
+ for my $dir (@instdir_replaceable) {
+# include target ...
+ do_recursive_link("$instdir/$dir", "$installdir/$dir");
+ }
+}
+
evilness ('undo');
my $installed_files = build_installed_list ($OOO_INSTALL);
@@ -529,6 +576,7 @@ link_gdb_py();
link_pagein_files();
link_ui_files();
link_rdb_files();
+link_instdir("$OOO_BUILD/instdir/$TARGET", $OOO_INSTALL);
if (!-f "$OOO_INSTALL/" . $brand_program_dir . "/ooenv") {
my $ooenv;