From 1e3bdc439b7692dfcf61847784e744756b1b8390 Mon Sep 17 00:00:00 2001 From: leper Date: Thu, 21 Feb 2013 19:59:39 +0000 Subject: [PATCH] Fix MSVC warning. Refs #1838. Remove special support for removed internal mod. This was SVN commit r13180. --- .../structures/persians/gardens_bush_dese_a.xml | Bin 682 -> 340 bytes binaries/system/readme.txt | 1 - build/workspaces/build-osx-bundle.sh | 2 -- source/ps/GameSetup/GameSetup.cpp | 12 ++++-------- source/ps/GameSetup/Paths.cpp | 2 +- source/tools/entity/Entity.pm | 6 +----- source/tools/entity/checkrefs.pl | 10 +--------- source/tools/fontbuilder2/testcharset.pl | 1 - 8 files changed, 7 insertions(+), 27 deletions(-) diff --git a/binaries/data/mods/public/art/actors/props/structures/persians/gardens_bush_dese_a.xml b/binaries/data/mods/public/art/actors/props/structures/persians/gardens_bush_dese_a.xml index dbbddad3df19b0b36c5fe1764c8bdb0091d14abd..9c320e8326d96e357f4c514f984b2c1106cc68c4 100644 GIT binary patch literal 340 zcmZ8d&CR literal 682 zcmaiy%}&EW420*5#5+W}lfaF`lDjr zenMvC9avAtk@uBTL*2W|3&a+tgC@QGh^E>j6+L=9ipE7YA@=At<|_8+VKHqJRi24U zIMc*66B$<%=NwdP1IjAv7#oP!APW9GXGiUs+vc`@^W*5z;%e$-3X(T-e*P|T8E$sy zYNNZR$Yv}5(9*zd+X>)IkL_&3+4QcXhWx_KbLa9OjW*#me=YahRva39 mods = args.GetMultiple("mod"); - if (!args.Has("onlyPublicFiles")) - mods.insert(mods.begin(), "internal"); mods.insert(mods.begin(), "public"); if (!args.Has("noUserMod")) mods.push_back("user"); - OsPath modArchivePath = paths.Cache()/"mods"; - OsPath modLoosePath = paths.RData()/"mods"; + OsPath modPath = paths.RData()/"mods"; OsPath modUserPath = paths.UserData()/"mods"; for (size_t i = 0; i < mods.size(); ++i) { size_t priority = i+1; // mods are higher priority than regular mountings, which default to priority 0 size_t flags = VFS_MOUNT_WATCH|VFS_MOUNT_ARCHIVABLE|VFS_MOUNT_MUST_EXIST; OsPath modName(mods[i]); - g_VFS->Mount(L"", modLoosePath / modName/"", flags, priority); - g_VFS->Mount(L"", modArchivePath / modName/"", flags, priority); + g_VFS->Mount(L"", modPath / modName/"", flags, priority); g_VFS->Mount(L"", modUserPath / modName/"", flags, priority); } @@ -474,9 +470,9 @@ static void InitVfs(const CmdLineArgs& args) g_VFS->Mount(L"saves/", paths.UserData()/"saves"/"", VFS_MOUNT_WATCH); const OsPath readonlyConfig = paths.RData()/"config"/""; // Mounting with highest priority, so that a mod supplied user.cfg is harmless - g_VFS->Mount(L"config/", readonlyConfig, 0, -1); + g_VFS->Mount(L"config/", readonlyConfig, 0, (size_t)-1); if(readonlyConfig != paths.Config()) - g_VFS->Mount(L"config/", paths.Config(), 0, -1); + g_VFS->Mount(L"config/", paths.Config(), 0, (size_t)-1); g_VFS->Mount(L"cache/", paths.Cache(), VFS_MOUNT_ARCHIVABLE); // (adding XMBs to archive speeds up subsequent reads) diff --git a/source/ps/GameSetup/Paths.cpp b/source/ps/GameSetup/Paths.cpp index 1bad0f2129..7d9883e42e 100644 --- a/source/ps/GameSetup/Paths.cpp +++ b/source/ps/GameSetup/Paths.cpp @@ -126,7 +126,7 @@ Paths::Paths(const CmdLineArgs& args) } // We don't make the game vs. user data distinction on OS X - m_gameData = appSupportPath / "data"/""; + m_gameData = appSupportPath /""; m_userData = m_gameData; m_cache = cachePath/""; m_config = appSupportPath / "config"/""; diff --git a/source/tools/entity/Entity.pm b/source/tools/entity/Entity.pm index 74333933d2..bf4e66100a 100644 --- a/source/tools/entity/Entity.pm +++ b/source/tools/entity/Entity.pm @@ -13,9 +13,6 @@ sub get_filename { my ($vfspath) = @_; my $fn = "$vfsroot/public/simulation/templates/$vfspath.xml"; - if (not -e $fn) { - $fn = "$vfsroot/internal/simulation/templates/$vfspath.xml"; - } return $fn; } @@ -125,12 +122,11 @@ sub find_entities my $n = $File::Find::name; return if /~$/; return unless -f $_; - $n =~ s~\Q$vfsroot\E/(public|internal)/simulation/templates/~~; + $n =~ s~\Q$vfsroot\E/public/simulation/templates/~~; $n =~ s/\.xml$//; push @files, $n; }; find({ wanted => $find_process }, "$vfsroot/public/simulation/templates"); - find({ wanted => $find_process }, "$vfsroot/internal/simulation/templates") if -e "$vfsroot/internal"; return @files; } diff --git a/source/tools/entity/checkrefs.pl b/source/tools/entity/checkrefs.pl index 013cba9b0b..9c70e56e76 100755 --- a/source/tools/entity/checkrefs.pl +++ b/source/tools/entity/checkrefs.pl @@ -9,7 +9,6 @@ use Entity; use constant CHECK_SCENARIOS_XML => 0; use constant ROOT_ACTORS => 1; -use constant INCLUDE_INTERNAL => 1; my @files; my @roots; @@ -21,9 +20,6 @@ sub vfs_to_physical { my ($vfspath) = @_; my $fn = "$vfsroot/public/$vfspath"; - if (INCLUDE_INTERNAL and not -e $fn) { - $fn = "$vfsroot/internal/$vfspath"; - } return $fn; } @@ -31,9 +27,6 @@ sub vfs_to_relative_to_mods { my ($vfspath) = @_; my $fn = "public/$vfspath"; - if (INCLUDE_INTERNAL and not -e "$vfsroot/$fn") { - $fn = "internal/$vfspath"; - } return $fn; } @@ -47,11 +40,10 @@ sub find_files return if /~$/; return unless -f $_; return unless /\.($extn)$/; - $n =~ s~\Q$vfsroot\E/(public|internal)/~~; + $n =~ s~\Q$vfsroot\E/public/~~; push @files, $n; }; find({ wanted => $find_process }, "$vfsroot/public/$vfspath"); - find({ wanted => $find_process }, "$vfsroot/internal/$vfspath") if INCLUDE_INTERNAL and -e "$vfsroot/internal/$vfspath"; return @files; } diff --git a/source/tools/fontbuilder2/testcharset.pl b/source/tools/fontbuilder2/testcharset.pl index ac4ff3ee51..b83b1c1df9 100644 --- a/source/tools/fontbuilder2/testcharset.pl +++ b/source/tools/fontbuilder2/testcharset.pl @@ -23,7 +23,6 @@ sub find_entities push @files, $n; }; find({ wanted => $find_process }, "$vfsroot/public/simulation/templates"); - find({ wanted => $find_process }, "$vfsroot/internal/simulation/templates") if -e "$vfsroot/internal"; return @files; }