Skip to content

Commit f520ff3

Browse files
committed
Move clients to subdirs. Add common client lib. Remove coinit from vshelper.
1 parent 39343b9 commit f520ff3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+196
-60
lines changed
Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,6 @@ static ::cl::list<String> cl_activate("activate", ::cl::desc("Activate specific
141141

142142
extern ::cl::opt<bool> useFileMonitor;
143143

144-
static ::cl::opt<path> storage_dir_override("storage-dir");
145-
146144
#define SUBCOMMAND(n, d) extern ::cl::SubCommand subcommand_##n;
147145
#include "command/commands.inl"
148146
#undef SUBCOMMAND
@@ -160,33 +158,13 @@ static ::cl::list<path> internal_verify_file("internal-verify-file", ::cl::value
160158
#include <boost/asio/io_context.hpp>
161159
#include <boost/asio/signal_set.hpp>
162160

163-
static ::cl::opt<bool> curl_verbose("curl-verbose");
164-
static ::cl::opt<bool> ignore_ssl_checks("ignore-ssl-checks");
165-
166161
//
167162
#include <sw/core/c.hpp>
168163

169164
sw_driver_t sw_create_driver(void);
170165

171166
//static ::cl::list<String> drivers("load-driver", ::cl::desc("Load more drivers"), ::cl::CommaSeparated);
172167

173-
std::unique_ptr<sw::SwContext> createSwContext()
174-
{
175-
// load proxy settings early
176-
httpSettings.verbose = curl_verbose;
177-
httpSettings.ignore_ssl_checks = ignore_ssl_checks;
178-
httpSettings.proxy = Settings::get_local_settings().proxy;
179-
180-
auto swctx = std::make_unique<sw::SwContext>(storage_dir_override.empty() ? sw::Settings::get_user_settings().storage_dir : storage_dir_override);
181-
// TODO:
182-
// before default?
183-
//for (auto &d : drivers)
184-
//swctx->registerDriver(std::make_unique<sw::driver::cpp::Driver>());
185-
swctx->registerDriver("org.sw.sw.driver.cpp-0.3.1"s, std::make_unique<sw::driver::cpp::Driver>());
186-
//swctx->registerDriver(std::make_unique<sw::CDriver>(sw_create_driver));
187-
return swctx;
188-
}
189-
190168
int setup_main(const Strings &args)
191169
{
192170
// some initial stuff
@@ -325,6 +303,10 @@ int main(int argc, char **argv)
325303
{
326304
//mi_version();
327305

306+
#ifdef _WIN32
307+
CoInitializeEx(0, 0); // vs find helper
308+
#endif
309+
328310
int r = 0;
329311
String error;
330312
bool supress = false;

0 commit comments

Comments
 (0)