mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
refactor path interface:
- use wrapper class instead of std::wstring (reduces mixing of strings/paths; allows safe+easy join via operator/ and convenient case-insensitive comparison via operator==, avoids NativePathFromString, similar to boost::filesystem) - NativePath -> OsPath - add hash and To/FromJSVal for Path - add TS_ASSERT_PATH_EQUALS - replace _wfopen_s with sys_OpenFile - remove obsolete SortFiles/Directories This was SVN commit r9107.
This commit is contained in:
+5
-5
@@ -437,7 +437,7 @@ static void RunGameOrAtlas(int argc, const char* argv[])
|
||||
Paths paths(args);
|
||||
g_VFS = CreateVfs(20 * MiB);
|
||||
g_VFS->Mount(L"cache/", paths.Cache(), VFS_MOUNT_ARCHIVABLE);
|
||||
g_VFS->Mount(L"", Path::Join(paths.RData(), "mods/public"), VFS_MOUNT_MUST_EXIST);
|
||||
g_VFS->Mount(L"", paths.RData()/"mods/public", VFS_MOUNT_MUST_EXIST);
|
||||
|
||||
{
|
||||
CReplayPlayer replay;
|
||||
@@ -456,12 +456,12 @@ static void RunGameOrAtlas(int argc, const char* argv[])
|
||||
{
|
||||
Paths paths(args);
|
||||
|
||||
NativePath mod = NativePathFromString(args.Get("archivebuild"));
|
||||
NativePath zip;
|
||||
OsPath mod(args.Get("archivebuild"));
|
||||
OsPath zip;
|
||||
if (args.Has("archivebuild-output"))
|
||||
zip = NativePathFromString(args.Get("archivebuild-output"));
|
||||
zip = args.Get("archivebuild-output");
|
||||
else
|
||||
zip = Path::Filename(mod)+L".zip";
|
||||
zip = mod.Filename().ChangeExtension(L".zip");
|
||||
|
||||
CArchiveBuilder builder(mod, paths.Cache());
|
||||
builder.Build(zip);
|
||||
|
||||
Reference in New Issue
Block a user