diff options
author | Mark Spruiell <mes@zeroc.com> | 2004-04-20 22:17:17 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2004-04-20 22:17:17 +0000 |
commit | 6ea4f3e83660c8309f2def22eff593a73b4b87b2 (patch) | |
tree | 10dc62c3107fcfd07ad427c9898ec8f37f61408b /cpp/src/IcePatch/Server.cpp | |
parent | minor fixes (diff) | |
download | ice-6ea4f3e83660c8309f2def22eff593a73b4b87b2.tar.bz2 ice-6ea4f3e83660c8309f2def22eff593a73b4b87b2.tar.xz ice-6ea4f3e83660c8309f2def22eff593a73b4b87b2.zip |
Win32 fixes
Diffstat (limited to 'cpp/src/IcePatch/Server.cpp')
-rw-r--r-- | cpp/src/IcePatch/Server.cpp | 43 |
1 files changed, 39 insertions, 4 deletions
diff --git a/cpp/src/IcePatch/Server.cpp b/cpp/src/IcePatch/Server.cpp index bfee1efefda..a81636eceeb 100644 --- a/cpp/src/IcePatch/Server.cpp +++ b/cpp/src/IcePatch/Server.cpp @@ -17,6 +17,9 @@ #include <IcePatch/FileLocator.h> #include <IcePatch/IcePatchI.h> #include <IcePatch/Util.h> +#ifdef _WIN32 +# include <direct.h> +#endif using namespace std; using namespace Ice; @@ -75,12 +78,44 @@ IcePatch::IcePatchService::IcePatchService() : void IcePatch::IcePatchService::usage(const string& name) { - cerr << "Usage: " << name << " [options]\n"; - cerr << + string options = "Options:\n" "-h, --help Show this message.\n" - "-v, --version Display the Ice version.\n" - ; + "-v, --version Display the Ice version."; +#ifdef _WIN32 + if(!win9x()) + { + options.append( + "\n" + "\n" + "--service NAME Run as the Windows service NAME.\n" + "\n" + "--install NAME [--display DISP] [--executable EXEC] [args]\n" + " Install as Windows service NAME. If DISP is\n" + " provided, use it as the display name,\n" + " otherwise NAME is used. If EXEC is provided,\n" + " use it as the service executable, otherwise\n" + " this executable is used. Any additional\n" + " arguments are passed unchanged to the\n" + " service at startup.\n" + "--uninstall NAME Uninstall Windows service NAME.\n" + "--start NAME [args] Start Windows service NAME. Any additional\n" + " arguments are passed unchanged to the\n" + " service.\n" + "--stop NAME Stop Windows service NAME." + ); + } +#else + options.append( + "\n" + "\n" + "--daemon Run as a daemon.\n" + "--noclose Do not close open file descriptors.\n" + "--nochdir Do not change the current working directory." + ); +#endif + cerr << "Usage: " << name << " [options]" << endl; + cerr << options << endl; } bool |