mirror of
https://github.com/ModOrganizer2/mob.git
synced 2026-07-27 14:07:05 -07:00
changed namespace to mob
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
#include "conf.h"
|
||||
#include "utility.h"
|
||||
|
||||
namespace builder
|
||||
namespace mob
|
||||
{
|
||||
|
||||
fs::path find_root()
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
namespace builder
|
||||
namespace mob
|
||||
{
|
||||
|
||||
struct conf
|
||||
|
||||
+4
-8
@@ -4,7 +4,7 @@
|
||||
#include "process.h"
|
||||
#include "op.h"
|
||||
|
||||
namespace builder
|
||||
namespace mob
|
||||
{
|
||||
|
||||
fs::path find_vcvars()
|
||||
@@ -222,13 +222,9 @@ void* env::get_pointers() const
|
||||
return (void*)string_.c_str();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
namespace builder::current_env
|
||||
{
|
||||
|
||||
void set(const std::string& k, const std::string& v, env::flags f)
|
||||
void this_env::set(const std::string& k, const std::string& v, env::flags f)
|
||||
{
|
||||
switch (f)
|
||||
{
|
||||
@@ -246,7 +242,7 @@ void set(const std::string& k, const std::string& v, env::flags f)
|
||||
}
|
||||
}
|
||||
|
||||
std::string get(const std::string& name)
|
||||
std::string this_env::get(const std::string& name)
|
||||
{
|
||||
const std::size_t buffer_size = GetEnvironmentVariableA(
|
||||
name.c_str(), nullptr, 0);
|
||||
@@ -263,7 +259,7 @@ std::string get(const std::string& name)
|
||||
return buffer.get();
|
||||
}
|
||||
|
||||
env get()
|
||||
env this_env::get()
|
||||
{
|
||||
env e;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "utility.h"
|
||||
|
||||
namespace builder
|
||||
namespace mob
|
||||
{
|
||||
|
||||
class env
|
||||
@@ -39,18 +39,16 @@ private:
|
||||
map::const_iterator find(const std::string& name) const;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
namespace builder::current_env
|
||||
struct this_env
|
||||
{
|
||||
static void set(
|
||||
const std::string& k,
|
||||
const std::string& v,
|
||||
env::flags f=env::replace);
|
||||
|
||||
void set(
|
||||
const std::string& k,
|
||||
const std::string& v,
|
||||
env::flags f=env::replace);
|
||||
|
||||
env get();
|
||||
std::string get(const std::string& k);
|
||||
static env get();
|
||||
static std::string get(const std::string& k);
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
+4
-4
@@ -6,7 +6,7 @@
|
||||
#include "utility.h"
|
||||
#include "tasks/tasks.h"
|
||||
|
||||
namespace builder
|
||||
namespace mob
|
||||
{
|
||||
|
||||
BOOL WINAPI signal_handler(DWORD) noexcept
|
||||
@@ -39,7 +39,7 @@ int run(int argc, char** argv)
|
||||
|
||||
curl_init curl;
|
||||
|
||||
current_env::set(
|
||||
this_env::set(
|
||||
"PATH",
|
||||
(find_third_party_directory() / "bin").string() + ";",
|
||||
env::prepend);
|
||||
@@ -102,8 +102,8 @@ int run(int argc, char** argv)
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int r = builder::run(argc, argv);
|
||||
builder::dump_logs();
|
||||
int r = mob::run(argc, argv);
|
||||
mob::dump_logs();
|
||||
//std::cin.get();
|
||||
return r;
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
#include "op.h"
|
||||
#include "utility.h"
|
||||
|
||||
namespace builder
|
||||
namespace mob
|
||||
{
|
||||
|
||||
url::url(const char* p)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "utility.h"
|
||||
|
||||
namespace builder
|
||||
namespace mob
|
||||
{
|
||||
|
||||
class url
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
#include "utility.h"
|
||||
#include "conf.h"
|
||||
|
||||
namespace builder
|
||||
namespace mob
|
||||
{
|
||||
|
||||
void op::touch(const fs::path& p)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "utility.h"
|
||||
|
||||
namespace builder
|
||||
namespace mob
|
||||
{
|
||||
|
||||
class op
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
#pragma warning(pop)
|
||||
|
||||
namespace builder
|
||||
namespace mob
|
||||
{
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
+3
-3
@@ -3,7 +3,7 @@
|
||||
#include "conf.h"
|
||||
#include "net.h"
|
||||
|
||||
namespace builder
|
||||
namespace mob
|
||||
{
|
||||
|
||||
process::impl::impl(const impl& i)
|
||||
@@ -85,7 +85,7 @@ process::flags_t process::flags() const
|
||||
return flags_;
|
||||
}
|
||||
|
||||
process& process::env(const builder::env& e)
|
||||
process& process::env(const mob::env& e)
|
||||
{
|
||||
env_ = e;
|
||||
return *this;
|
||||
@@ -139,7 +139,7 @@ void process::do_run(const std::string& what)
|
||||
STARTUPINFOA si = { .cb=sizeof(si) };
|
||||
PROCESS_INFORMATION pi = {};
|
||||
|
||||
const std::string cmd = current_env::get("COMSPEC");
|
||||
const std::string cmd = this_env::get("COMSPEC");
|
||||
const std::string args = "/C \"" + what + "\"";
|
||||
|
||||
const char* cwd_p = nullptr;
|
||||
|
||||
+3
-3
@@ -3,7 +3,7 @@
|
||||
#include "utility.h"
|
||||
#include "env.h"
|
||||
|
||||
namespace builder
|
||||
namespace mob
|
||||
{
|
||||
|
||||
class process
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
process& env(const builder::env& e);
|
||||
process& env(const mob::env& e);
|
||||
|
||||
void run();
|
||||
void interrupt();
|
||||
@@ -111,7 +111,7 @@ private:
|
||||
fs::path bin_;
|
||||
fs::path cwd_;
|
||||
flags_t flags_;
|
||||
builder::env env_;
|
||||
mob::env env_;
|
||||
std::string raw_;
|
||||
std::string cmd_;
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "tasks.h"
|
||||
|
||||
namespace builder
|
||||
namespace mob
|
||||
{
|
||||
|
||||
boost::boost()
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "tasks.h"
|
||||
|
||||
namespace builder
|
||||
namespace mob
|
||||
{
|
||||
|
||||
bzip2::bzip2()
|
||||
@@ -30,4 +30,4 @@ url bzip2::source_url()
|
||||
"bzip2-" + versions::bzip2() + ".tar.gz/download";
|
||||
}
|
||||
|
||||
} // namespace builder
|
||||
} // namespace
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "tasks.h"
|
||||
|
||||
namespace builder
|
||||
namespace mob
|
||||
{
|
||||
|
||||
fmt::fmt()
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "tasks.h"
|
||||
|
||||
namespace builder
|
||||
namespace mob
|
||||
{
|
||||
|
||||
gtest::gtest()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "tasks.h"
|
||||
|
||||
namespace builder
|
||||
namespace mob
|
||||
{
|
||||
|
||||
libbsarch::libbsarch()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "tasks.h"
|
||||
|
||||
namespace builder
|
||||
namespace mob
|
||||
{
|
||||
|
||||
libffi::libffi()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "tasks.h"
|
||||
|
||||
namespace builder
|
||||
namespace mob
|
||||
{
|
||||
|
||||
libloot::libloot()
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "tasks.h"
|
||||
|
||||
namespace builder
|
||||
namespace mob
|
||||
{
|
||||
|
||||
lz4::lz4()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user