Browse Source

Able to run C# project from packaged AtomicEditor

JoshEngebretson 10 years ago
parent
commit
ec4397a53f

+ 3 - 3
Build/Windows/Compile.bat

@@ -1,3 +1,3 @@
-call "%VS140COMNTOOLS%..\..\VC\bin\vcvars32.bat"
-cmake ..\\..\\  -DATOMIC_DEV_BUILD=0 -G "Visual Studio 14 2015"
-msbuild /m Atomic.sln /p:Configuration=Release /p:Platform=Win32
+call "%VS140COMNTOOLS%..\..\VC\bin\amd64\vcvars64.bat"
+cmake ..\\..\\  -DATOMIC_DEV_BUILD=0 -G "Visual Studio 14 2015 Win64"
+msbuild /m Atomic.sln /p:Configuration=Release /p:Platform=x64

+ 3 - 3
Build/Windows/CompileAtomicTool.bat

@@ -1,3 +1,3 @@
-call "%VS140COMNTOOLS%..\..\VC\bin\vcvars32.bat"
-cmake ..\\..\\  -DATOMIC_DEV_BUILD=1 -G "Visual Studio 14 2015"
-msbuild /m Atomic.sln /t:AtomicTool /p:Configuration=Release /p:Platform=Win32
+call "%VS140COMNTOOLS%..\..\VC\bin\amd64\vcvars64.bat"
+cmake ..\\..\\  -DATOMIC_DEV_BUILD=1 -G "Visual Studio 14 2015 Win64"
+msbuild /m Atomic.sln /t:AtomicTool /p:Configuration=Release /p:Platform=x64

+ 8 - 4
Jakefile

@@ -496,7 +496,7 @@ namespace('package', function() {
 
   });
 
-  task('windows', ['clean:all', 'build:windows'], function() {
+  task('windows', ['clean:all','build:windows'], function() {
 
     if (!fs.existsSync(distFolder)) {
       jake.mkdirP(distFolder);
@@ -508,9 +508,9 @@ namespace('package', function() {
 
     fs.copySync(windowsBuildFolder + "/Source/AtomicEditor/Release/AtomicEditor.exe", windowsPackageFolder + "/AtomicEditor.exe")
 
-    // 32 bit build for packaging!
+    // 64 bit build for packaging!
 
-    fs.copySync(jakeRoot + "/Build/Windows/Binaries/x86/D3DCompiler_47.dll", windowsPackageFolder + "/D3DCompiler_47.dll")
+    fs.copySync(jakeRoot + "/Build/Windows/Binaries/x64/D3DCompiler_47.dll", windowsPackageFolder + "/D3DCompiler_47.dll")
 
     // copy resources
 
@@ -519,8 +519,12 @@ namespace('package', function() {
     fs.copySync(jakeRoot + "/Resources/PlayerData", windowsPackageFolder + "/Resources/PlayerData");
     fs.copySync(jakeRoot + "/Data/AtomicEditor/", windowsPackageFolder + "/Resources/ToolData");
 
-    // 32 bit!
+    // AtomicNET
+    fs.copySync(jakeRoot + "/Submodules/CoreCLR/Windows/Debug", windowsPackageFolder + "/Resources/AtomicNET/Windows/");
+    fs.copySync(jakeRoot + "/Artifacts/AtomicNET", windowsPackageFolder + "/Resources/AtomicNET/Windows/Atomic");
+
     fs.copySync(jakeRoot + "/Build/Windows/Binaries/x86/D3DCompiler_47.dll", windowsPackageFolder + "/Resources/ToolData/Deployment/Windows/x86/D3DCompiler_47.dll");
+    fs.copySync(jakeRoot + "/Build/Windows/Binaries/x64/D3DCompiler_47.dll", windowsPackageFolder + "/Resources/ToolData/Deployment/Windows/x64/D3DCompiler_47.dll");
 
     if (jenkinsBuild) {
 

+ 6 - 7
Source/AtomicEditor/Application/AEPlayerApp.cpp

@@ -119,13 +119,6 @@ void AEPlayerApplication::Setup()
                 String resourcePaths = ToString("%s/Resources/CoreData;%s/Resources/PlayerData;%s/;%s/Resources;%s;%sCache",
                          ATOMIC_ROOT_SOURCE_DIR, ATOMIC_ROOT_SOURCE_DIR, value.CString(), value.CString(), value.CString(), value.CString());
 
-#ifdef ATOMIC_DOTNET
-                NETCore* netCore = GetSubsystem<NETCore>();
-                String assemblyLoadPath = GetNativePath(ToString("%sResources/Assemblies/", value.CString()));
-                netCore->AddAssemblyLoadPath(assemblyLoadPath);
-
-#endif
-
 #else
 
 #ifdef __APPLE__
@@ -142,6 +135,12 @@ void AEPlayerApplication::Setup()
 
                 engineParameters_["ResourcePaths"] = resourcePaths;
 
+#ifdef ATOMIC_DOTNET
+                NETCore* netCore = GetSubsystem<NETCore>();
+                String assemblyLoadPath = GetNativePath(ToString("%sResources/Assemblies/", value.CString()));
+                netCore->AddAssemblyLoadPath(assemblyLoadPath);
+#endif
+
             }
         }
     }

+ 11 - 0
Source/ToolCore/ToolEnvironment.cpp

@@ -56,6 +56,17 @@ bool ToolEnvironment::InitFromPackage()
 
     toolDataDir_ =  resourcesDir + "ToolData/";
 
+    // AtomicNET
+    netAssemblyLoadPaths_ = GetNativePath(ToString("%sAtomicNET/Windows/Atomic/", resourcesDir.CString()));
+
+#ifdef ATOMIC_PLATFORM_WINDOWS
+    netCoreCLRAbsPath_ = GetNativePath(ToString("%sAtomicNET/Windows/x64/", resourcesDir.CString()));
+    netTPAPaths_ = ToString("%sAtomicNET/Windows/AnyCPU/TPA/", resourcesDir.CString());
+    netTPAPaths_ += ToString(";%sAtomicNET/Windows/Atomic/TPA/", resourcesDir.CString());
+#else
+    String  coreCLRAbsPath = GetNativePath(ToString("%s/Submodules/CoreCLR/OSX/Debug/x64/", ATOMIC_ROOT_SOURCE_DIR);
+#endif
+
     return true;
 }