diff options
Diffstat (limited to 'desktop/source/pkgchk/unopkg')
-rw-r--r-- | desktop/source/pkgchk/unopkg/makefile.mk | 4 | ||||
-rw-r--r-- | desktop/source/pkgchk/unopkg/unopkg_app.cxx | 32 | ||||
-rw-r--r-- | desktop/source/pkgchk/unopkg/unopkg_misc.cxx | 2 | ||||
-rw-r--r-- | desktop/source/pkgchk/unopkg/unopkg_shared.h | 2 |
4 files changed, 31 insertions, 9 deletions
diff --git a/desktop/source/pkgchk/unopkg/makefile.mk b/desktop/source/pkgchk/unopkg/makefile.mk index 8384f1b243..3f4c16eef5 100644 --- a/desktop/source/pkgchk/unopkg/makefile.mk +++ b/desktop/source/pkgchk/unopkg/makefile.mk @@ -99,6 +99,6 @@ $(APP1TARGETN) : $(MISC)$/binso_created.flg .ENDIF # "$(APP1TARGETN)"!="" $(MISC)$/binso_created.flg: - @@-$(MKDIRHIER) $(BIN)$/so && $(TOUCH) $@ - @@-$(MKDIRHIER) $(MISC)$/so && $(TOUCH) $@ + @@-$(MKDIRHIER) $(BIN)$/so && $(TOUCH) $@ + @@-$(MKDIRHIER) $(MISC)$/so && $(TOUCH) $@ diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx index de8c13bcf7..7c7a6e57bd 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx @@ -380,7 +380,12 @@ extern "C" int unopkg_main() } else if (subCommand.equals(OUSTR("sync"))) { - //sync is private!!!! Only for bundled extensions!!! + //sync is private!!!! Only to be called from setup!!! + //The UserInstallation is diverted to the prereg folder. But only + //the lock file is written! This requires that + //-env:UNO_JAVA_JFW_INSTALL_DATA is passed to javaldx and unopkg otherwise the + //javasettings file is written to the prereg folder. + // //For performance reasons unopkg sync is called during the setup and //creates the registration data for the repository of the bundled //extensions. It is then copied to the user installation during @@ -395,11 +400,21 @@ extern "C" int unopkg_main() //$BUNDLED_EXTENSIONS_USER if (hasNoFolder(OUSTR("$BRAND_BASE_DIR/share/extensions"))) { - removeFolder(OUSTR("$BUNDLED_EXTENSIONS_USER")); + removeFolder(OUSTR("$BUNDLED_EXTENSIONS_PREREG")); //return otherwise we create the registration data again return 0; } - + //redirect the UserInstallation, so we do not create a + //user installation for the admin and we also do not need + //to call unopkg with -env:UserInstallation + ::rtl::Bootstrap::set(OUSTR("UserInstallation"), + OUSTR("$BUNDLED_EXTENSIONS_PREREG/..")); + //Setting UNO_JAVA_JFW_INSTALL_DATA causes the javasettings to be written + //in the office installation. We do not want to create the user data folder + //for the admin. The value must also be set in the unopkg script (Linux, etc.) + //when calling javaldx + ::rtl::Bootstrap::set(OUSTR("UNO_JAVA_JFW_INSTALL_DATA"), + OUSTR("$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml")); } xComponentContext = getUNO( @@ -418,6 +433,7 @@ extern "C" int unopkg_main() //prevent the deletion of the registry data folder //synching is done in XExtensionManager.reinstall if (!subcmd_gui && ! subCommand.equals(OUSTR("reinstall")) + && ! subCommand.equals(OUSTR("sync")) && ! dp_misc::office_is_running()) dp_misc::syncRepositories(xCmdEnv); @@ -618,7 +634,15 @@ extern "C" int unopkg_main() //This is just here so we do not get an error, because of an unknown //sub-command. We do synching before //the sub-commands are processed. - + if (! dp_misc::office_is_running()) + { + xExtensionManager->synchronizeBundledPrereg( + Reference<task::XAbortChannel>(), xCmdEnv); + } + else + { + dp_misc::writeConsoleError(OUSTR("\nError: office is running")); + } } else { diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx index e55b1c0abe..ee05e37a2d 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx @@ -629,7 +629,7 @@ void removeFolder(OUString const & folderUrl) dir.close(); ::osl::Directory::remove(url); } - else + else if (rc != osl::File::E_NOENT) { dp_misc::writeConsole( OUSTR("unopkg: Error while removing ") + url + OUSTR("\n")); diff --git a/desktop/source/pkgchk/unopkg/unopkg_shared.h b/desktop/source/pkgchk/unopkg/unopkg_shared.h index 232fbf8f52..0689780b84 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_shared.h +++ b/desktop/source/pkgchk/unopkg/unopkg_shared.h @@ -192,6 +192,4 @@ void removeFolder(::rtl::OUString const & folderUrl); } - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |