~andreas-pokorny/mir/unwrap-the-wrap

« back to all changes in this revision

Viewing changes to src/platform/options/default_configuration.cpp

  • Committer: Andreas Pokorny
  • Date: 2015-01-21 10:15:07 UTC
  • Revision ID: andreas.pokorny@canonical.com-20150121101507-sjqr2795yv6nvcux
Remove wrapper and instead search for client and server platform paths relative to executable path but fallback to the compiled in directory in any case of failure

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include "mir/graphics/platform.h"
22
22
#include "mir/default_configuration.h"
23
23
#include "mir/abnormal_exit.h"
 
24
#include "mir/executable_path.h"
24
25
#include "mir/shared_library_prober.h"
25
26
#include "mir/logging/null_shared_library_prober_report.h"
26
27
#include "mir/graphics/platform_probe.h"
110
111
    using namespace options;
111
112
    namespace po = boost::program_options;
112
113
 
 
114
    auto default_platform_path = default_server_platform_path();
 
115
    auto server_path_description = "Directory to look for platform libraries (default: " + default_platform_path + ")";
 
116
 
113
117
    add_options()
114
118
        (host_socket_opt, po::value<std::string>(),
115
119
            "Host socket filename")
119
123
        (prompt_socket_opt, "Provide a \"..._trusted\" filename for prompt helper connections")
120
124
        (platform_graphics_lib, po::value<std::string>(),
121
125
            "Library to use for platform graphics support (default: autodetect)")
122
 
        (platform_path, po::value<std::string>()->default_value(MIR_SERVER_PLATFORM_PATH),
123
 
            "Directory to look for platform libraries (default: " MIR_SERVER_PLATFORM_PATH ")")
 
126
        (platform_path, po::value<std::string>()->default_value(default_platform_path),
 
127
            server_path_description.c_str())
124
128
        (enable_input_opt, po::value<bool>()->default_value(enable_input_default),
125
129
            "Enable input.")
126
130
        (compositor_report_opt, po::value<std::string>()->default_value(off_opt_value),
166
170
         po::value<std::string>(), "");
167
171
    program_options.add_options()
168
172
        (platform_path,
169
 
         po::value<std::string>()->default_value(MIR_SERVER_PLATFORM_PATH),
 
173
         po::value<std::string>()->default_value(default_server_platform_path()),
170
174
        "");
171
175
    mo::ProgramOption options;
172
176
    options.parse_arguments(program_options, argc, argv);