Added support for daemon startup dependencies. Made synergy
dependent on NetBT, which I hope is right.
This commit is contained in:
parent
d97879b25c
commit
423dd3b718
|
@ -199,11 +199,12 @@ CAutoStart::onInstall(bool allUsers)
|
|||
// clear error message
|
||||
m_errorMessage = "";
|
||||
|
||||
// install
|
||||
// install. depend on NetBT (NetBIOS over TCP/IP).
|
||||
try {
|
||||
ARCH->installDaemon(m_name.c_str(),
|
||||
m_isServer ? SERVER_DAEMON_INFO : CLIENT_DAEMON_INFO,
|
||||
appPath.c_str(), m_cmdLine.c_str(), allUsers);
|
||||
appPath.c_str(), m_cmdLine.c_str(),
|
||||
"NetBT\0", allUsers);
|
||||
askOkay(m_hwnd, getString(IDS_INSTALL_TITLE),
|
||||
getString(allUsers ?
|
||||
IDS_INSTALLED_SYSTEM :
|
||||
|
|
|
@ -178,9 +178,11 @@ CArch::installDaemon(const char* name,
|
|||
const char* description,
|
||||
const char* pathname,
|
||||
const char* commandLine,
|
||||
const char* dependencies,
|
||||
bool allUsers)
|
||||
{
|
||||
m_daemon->installDaemon(name, description, pathname, commandLine, allUsers);
|
||||
m_daemon->installDaemon(name, description, pathname,
|
||||
commandLine, dependencies, allUsers);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -80,6 +80,7 @@ public:
|
|||
const char* description,
|
||||
const char* pathname,
|
||||
const char* commandLine,
|
||||
const char* dependencies,
|
||||
bool allUsers);
|
||||
virtual void uninstallDaemon(const char* name, bool allUsers);
|
||||
virtual int daemonize(const char* name, DaemonFunc func);
|
||||
|
|
|
@ -33,6 +33,7 @@ CArchDaemonNone::installDaemon(const char*,
|
|||
const char*,
|
||||
const char*,
|
||||
const char*,
|
||||
const char*,
|
||||
bool)
|
||||
{
|
||||
// do nothing
|
||||
|
|
|
@ -36,6 +36,7 @@ public:
|
|||
const char* description,
|
||||
const char* pathname,
|
||||
const char* commandLine,
|
||||
const char* dependencies,
|
||||
bool allUsers);
|
||||
virtual void uninstallDaemon(const char* name, bool allUsers);
|
||||
virtual int daemonize(const char* name, DaemonFunc func);
|
||||
|
|
|
@ -82,6 +82,7 @@ CArchDaemonWindows::installDaemon(const char* name,
|
|||
const char* description,
|
||||
const char* pathname,
|
||||
const char* commandLine,
|
||||
const char* dependencies,
|
||||
bool allUsers)
|
||||
{
|
||||
// if not for all users then use the user's autostart registry.
|
||||
|
@ -130,7 +131,7 @@ CArchDaemonWindows::installDaemon(const char* name,
|
|||
pathname,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
dependencies,
|
||||
NULL,
|
||||
NULL);
|
||||
if (service == NULL) {
|
||||
|
|
|
@ -76,6 +76,7 @@ public:
|
|||
const char* description,
|
||||
const char* pathname,
|
||||
const char* commandLine,
|
||||
const char* dependencies,
|
||||
bool allUsers);
|
||||
virtual void uninstallDaemon(const char* name, bool allUsers);
|
||||
virtual int daemonize(const char* name, DaemonFunc func);
|
||||
|
|
|
@ -38,13 +38,16 @@ public:
|
|||
\c commandLine should \b not include the name of program as the
|
||||
first argument. If \c allUsers is true then the daemon will be
|
||||
installed to start at boot time, otherwise it will be installed to
|
||||
start when the current user logs in. Throws an \c XArchDaemon
|
||||
exception on failure.
|
||||
start when the current user logs in. If \p dependencies is not NULL
|
||||
then it's a concatenation of NUL terminated other daemon names
|
||||
followed by a NUL; the daemon will be configured to startup after
|
||||
the listed daemons. Throws an \c XArchDaemon exception on failure.
|
||||
*/
|
||||
virtual void installDaemon(const char* name,
|
||||
const char* description,
|
||||
const char* pathname,
|
||||
const char* commandLine,
|
||||
const char* dependencies,
|
||||
bool allUsers) = 0;
|
||||
|
||||
//! Uninstall daemon
|
||||
|
|
Loading…
Reference in New Issue