summaryrefslogtreecommitdiff
path: root/desktop/source/pkgchk
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/source/pkgchk')
-rwxr-xr-x[-rw-r--r--]desktop/source/pkgchk/unopkg/makefile.mk0
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_app.cxx46
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/pkgchk/unopkg/unopkg_main.c0
-rwxr-xr-x[-rw-r--r--]desktop/source/pkgchk/unopkg/unopkg_main.h0
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_misc.cxx9
-rwxr-xr-x[-rw-r--r--]desktop/source/pkgchk/unopkg/unopkg_shared.h2
-rwxr-xr-x[-rw-r--r--]desktop/source/pkgchk/unopkg/version.map0
8 files changed, 37 insertions, 22 deletions
diff --git a/desktop/source/pkgchk/unopkg/makefile.mk b/desktop/source/pkgchk/unopkg/makefile.mk
index 8384f1b243..8384f1b243 100644..100755
--- a/desktop/source/pkgchk/unopkg/makefile.mk
+++ b/desktop/source/pkgchk/unopkg/makefile.mk
diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index de8c13bcf7..2356165235 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -222,7 +222,6 @@ void disposeBridges(Reference<css::uno::XComponentContext> ctx)
}
}
-//##############################################################################
extern "C" int unopkg_main()
{
tools::extendApplicationEnvironment();
@@ -380,7 +379,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 +399,22 @@ 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);
@@ -500,10 +516,9 @@ extern "C" int unopkg_main()
//Now prepare the vector which tells what extension has an
//unaccepted license
vecUnaccepted.resize(vecExtUnaccepted.size() + vec_packages.size());
- ::std::vector<bool>::iterator i_unaccepted =
- ::std::fill_n(vecUnaccepted.begin(),
- vecExtUnaccepted.size(), true);
- ::std::fill_n(i_unaccepted, vec_packages.size(), false);
+ ::std::fill_n(vecUnaccepted.begin(), vecExtUnaccepted.size(), true);
+ ::std::fill_n(vecUnaccepted.begin() + vecExtUnaccepted.size(),
+ vec_packages.size(), false);
dp_misc::writeConsole(
OUSTR("All deployed ") + repository + OUSTR(" extensions:\n\n"));
@@ -613,12 +628,15 @@ extern "C" int unopkg_main()
}
else if (subCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("sync")))
{
- //This sub command may be removed later and is only there to have a
- //possibility to start extension synching without any output.
- //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_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
index c6d26b1df1..f3d68a0079 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
@@ -155,7 +155,7 @@ CommandEnvironmentImpl::~CommandEnvironmentImpl()
}
catch (RuntimeException & exc) {
(void) exc;
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, osl_getThreadTextEncoding() ).getStr() );
}
}
diff --git a/desktop/source/pkgchk/unopkg/unopkg_main.c b/desktop/source/pkgchk/unopkg/unopkg_main.c
index 1d5b31d03f..1d5b31d03f 100644..100755
--- a/desktop/source/pkgchk/unopkg/unopkg_main.c
+++ b/desktop/source/pkgchk/unopkg/unopkg_main.c
diff --git a/desktop/source/pkgchk/unopkg/unopkg_main.h b/desktop/source/pkgchk/unopkg/unopkg_main.h
index 694cc41558..694cc41558 100644..100755
--- a/desktop/source/pkgchk/unopkg/unopkg_main.h
+++ b/desktop/source/pkgchk/unopkg/unopkg_main.h
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
index 9b20f57287..1aad5b14c3 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
@@ -105,7 +105,7 @@ OptionInfo const * getOptionInfo(
}
}
}
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
opt, osl_getThreadTextEncoding() ).getStr() );
return 0;
}
@@ -177,7 +177,6 @@ bool readArgument(
return false;
}
-//##############################################################################
namespace {
struct ExecutableDir : public rtl::StaticWithInit<
@@ -195,7 +194,7 @@ struct ProcessWorkingDir : public rtl::StaticWithInit<
const OUString, ProcessWorkingDir> {
const OUString operator () () {
OUString workingDir;
- tools::getProcessWorkingDir(&workingDir);
+ tools::getProcessWorkingDir(workingDir);
return workingDir;
}
};
@@ -256,7 +255,6 @@ OUString makeAbsoluteFileUrl(
? abs.copy( 0, abs.getLength() -1 ) : abs;
}
-//##############################################################################
namespace {
@@ -369,7 +367,6 @@ void printf_packages(
}
-//##############################################################################
namespace {
@@ -629,7 +626,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..cc25e934d6 100644..100755
--- a/desktop/source/pkgchk/unopkg/unopkg_shared.h
+++ b/desktop/source/pkgchk/unopkg/unopkg_shared.h
@@ -161,7 +161,7 @@ public:
{
m_bDeinitUCB = true;
}
-
+
};
//==============================================================================
diff --git a/desktop/source/pkgchk/unopkg/version.map b/desktop/source/pkgchk/unopkg/version.map
index 8591bb3b58..8591bb3b58 100644..100755
--- a/desktop/source/pkgchk/unopkg/version.map
+++ b/desktop/source/pkgchk/unopkg/version.map