Browse Source

Filter PSD files during build, adding --player command for Windows AtomicEditor

Josh Engebretson 10 years ago
parent
commit
bc0f0bfcb2
2 changed files with 21 additions and 0 deletions
  1. 17 0
      Source/AtomicEditor/Source/Main.cpp
  2. 4 0
      Source/ToolCore/Build/BuildBase.cpp

+ 17 - 0
Source/AtomicEditor/Source/Main.cpp

@@ -38,7 +38,24 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE prevInstance, PSTR cmdLine, in
 {
     _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
     Atomic::ParseArguments(GetCommandLineW());
+
+    const Vector<String>& arguments = GetArguments();
+
+    bool runPlayer = false;
+    for (unsigned i = 0; i < arguments.Size();i++)
+    {
+        if (arguments.At(i) == "--player")
+        {
+            runPlayer = true;
+            break;
+        }
+    }
+
+    if (runPlayer)
+        return RunPlayerApplication();
+
     return RunEditorApplication();
+
 }
 // MSVC release mode: write minidump on crash
 #elif defined(_MSC_VER) && defined(ATOMIC_MINIDUMPS) && !defined(ATOMIC_WIN32_CONSOLE)

+ 4 - 0
Source/ToolCore/Build/BuildBase.cpp

@@ -78,6 +78,10 @@ void BuildBase::ScanResourceDirectory(const String& resourceDir)
             }
         }
 
+        // TODO: Add additional filters
+        if (GetExtension(filename) == ".psd")
+            continue;
+
         BuildResourceEntry* newEntry = new BuildResourceEntry;
 
 // BEGIN LICENSE MANAGEMENT