Jelajahi Sumber

Merge branch 'master' into bgfx

Daniele Bartolini 11 tahun lalu
induk
melakukan
22050c841f

+ 3 - 0
.gitignore

@@ -2,6 +2,9 @@
 /.build
 /.installation
 
+# Ignore Python stuff
+__pycache__
+
 # Ignore C# stuff
 /tools/**/bin
 /tools/**/obj

+ 6 - 6
engine/audio/SoundWorld.h

@@ -81,14 +81,14 @@ public:
 	/// Resumes all previously paused sounds in the world.
 	virtual void resume_all() = 0;
 
-	/// Sets the @a positions (in world space) of @a count sound instances @a ids.
-	virtual void set_sound_positions(uint32_t count, const SoundInstanceId* ids, const Vector3* positions) = 0;
+	/// Sets the @a positions (in world space) of @a num sound instances @a ids.
+	virtual void set_sound_positions(uint32_t num, const SoundInstanceId* ids, const Vector3* positions) = 0;
 
-	/// Sets the @a ranges (in meters) of @a count sound instances @a ids.
-	virtual void set_sound_ranges(uint32_t count, const SoundInstanceId* ids, const float* ranges) = 0;
+	/// Sets the @a ranges (in meters) of @a num sound instances @a ids.
+	virtual void set_sound_ranges(uint32_t num, const SoundInstanceId* ids, const float* ranges) = 0;
 
-	/// Sets the @a volumes of @a count sound instances @a ids.
-	virtual void set_sound_volumes(uint32_t count, const SoundInstanceId* ids, const float* volumes) = 0;
+	/// Sets the @a volumes of @a num sound instances @a ids.
+	virtual void set_sound_volumes(uint32_t num, const SoundInstanceId* ids, const float* volumes) = 0;
 
 	virtual void reload_sounds(SoundResource* old_sr, SoundResource* new_sr) = 0;
 

+ 10 - 10
engine/audio/backend/ALSoundWorld.cpp

@@ -278,28 +278,28 @@ public:
 		}
 	}
 
-	virtual void set_sound_positions(uint32_t count, const SoundInstanceId* ids, const Vector3* positions)
+	virtual void set_sound_positions(uint32_t num, const SoundInstanceId* ids, const Vector3* positions)
 	{
-		for (uint32_t i = 0; i < id_array::size(m_playing_sounds); i++)
+		for (uint32_t i = 0; i < num; i++)
 		{
-			m_playing_sounds[i].set_position(positions[i]);
+			id_array::get(m_playing_sounds, ids[i]).set_position(positions[i]);
 		}
 	}
 
-	virtual void set_sound_ranges(uint32_t count, const SoundInstanceId* ids, const float* ranges)
+	virtual void set_sound_ranges(uint32_t num, const SoundInstanceId* ids, const float* ranges)
 	{
-		for (uint32_t i = 0; i < id_array::size(m_playing_sounds); i++)
+		for (uint32_t i = 0; i < num; i++)
 		{
-			m_playing_sounds[i].set_range(ranges[i]);
+			id_array::get(m_playing_sounds, ids[i]).set_range(ranges[i]);
 		}
 	}
 
-	virtual void set_sound_volumes(uint32_t count, const SoundInstanceId* ids, const float* volumes)
+	virtual void set_sound_volumes(uint32_t num, const SoundInstanceId* ids, const float* volumes)
 	{
-		for (uint32_t i = 0; i < id_array::size(m_playing_sounds); i++)
+		for (uint32_t i = 0; i < num; i++)
 		{
-			m_playing_sounds[i].set_volume(volumes[i]);
-		}		
+			id_array::get(m_playing_sounds, ids[i]).set_volume(volumes[i]);
+		}
 	}
 
 	virtual void reload_sounds(SoundResource* old_sr, SoundResource* new_sr)

+ 9 - 9
engine/audio/backend/SLESSoundWorld.cpp

@@ -421,27 +421,27 @@ public:
 		}
 	}
 
-	virtual void set_sound_positions(uint32_t count, const SoundInstanceId* ids, const Vector3* positions)
+	virtual void set_sound_positions(uint32_t num, const SoundInstanceId* ids, const Vector3* positions)
 	{
-		for (uint32_t i = 0; i < id_array::size(m_playing_sounds); i++)
+		for (uint32_t i = 0; i < num; i++)
 		{
-			m_playing_sounds[i].set_position(positions[i]);
+			id_array::get(m_playing_sounds, ids[i]).set_position(positions[i]);
 		}
 	}
 
-	virtual void set_sound_ranges(uint32_t count, const SoundInstanceId* ids, const float* ranges)
+	virtual void set_sound_ranges(uint32_t num, const SoundInstanceId* ids, const float* ranges)
 	{
-		for (uint32_t i = 0; i < id_array::size(m_playing_sounds); i++)
+		for (uint32_t i = 0; i < num; i++)
 		{
-			m_playing_sounds[i].set_range(ranges[i]);
+			id_array::get(m_playing_sounds, ids[i]).set_range(ranges[i]);
 		}
 	}
 
-	virtual void set_sound_volumes(uint32_t count, const SoundInstanceId* ids, const float* volumes)
+	virtual void set_sound_volumes(uint32_t num, const SoundInstanceId* ids, const float* volumes)
 	{
-		for (uint32_t i = 0; i < id_array::size(m_playing_sounds); i++)
+		for (uint32_t i = 0; i < num; i++)
 		{
-			m_playing_sounds[i].set_volume(volumes[i]);
+			id_array::get(m_playing_sounds, ids[i]).set_volume(volumes[i]);
 		}
 	}
 

+ 18 - 24
engine/compilers/BundleCompiler.cpp

@@ -24,7 +24,6 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#include <inttypes.h>
 #include "BundleCompiler.h"
 #include "Vector.h"
 #include "DynamicString.h"
@@ -35,6 +34,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include "Path.h"
 #include "DiskFilesystem.h"
 #include "TempAllocator.h"
+#include <inttypes.h>
 
 namespace crown
 {
@@ -111,6 +111,8 @@ bool BundleCompiler::compile(const char* bundle_dir, const char* source_dir, con
 			continue;
 		if (files[i].starts_with("."))
 			continue;
+		if (files[i].ends_with(".config"))
+			continue;
 
 		const char* filename = files[i].c_str();
 
@@ -119,18 +121,10 @@ bool BundleCompiler::compile(const char* bundle_dir, const char* source_dir, con
 		path::extension(filename, filename_extension, 512);
 		path::filename_without_extension(filename, filename_without_extension, 512);
 
-		ResourceId name(filename_extension, filename_without_extension);
-		char out_name[512];
-		snprintf(out_name, 512, "%.16lx-%.16lx", name.type, name.name);
-
-		uint64_t resource_type_hash = name.type;
-
-		// Skip crown.config file
-		if (resource_type_hash == CONFIG_TYPE)
-		{
-			continue;
-		}
+		const ResourceId name(filename_extension, filename_without_extension);
 
+		char out_name[512];
+		snprintf(out_name, 512, "%.16"PRIx64"-%.16"PRIx64, name.type, name.name);
 		CE_LOGI("%s <= %s", out_name, filename);
 
 		DiskFilesystem root_fs(source_dir);
@@ -141,51 +135,51 @@ bool BundleCompiler::compile(const char* bundle_dir, const char* source_dir, con
 
 		if (out_file)
 		{
-			if (resource_type_hash == MESH_TYPE)
+			if (name.type == MESH_TYPE)
 			{
 				mesh_resource::compile(root_fs, filename, out_file);
 			}
-			else if (resource_type_hash == TEXTURE_TYPE)
+			else if (name.type == TEXTURE_TYPE)
 			{
 				texture_resource::compile(root_fs, filename, out_file);
 			}
-			else if (resource_type_hash == LUA_TYPE)
+			else if (name.type == LUA_TYPE)
 			{
 				lua_resource::compile(root_fs, filename, out_file);
 			}
-			else if(resource_type_hash == SOUND_TYPE)
+			else if(name.type == SOUND_TYPE)
 			{
 				sound_resource::compile(root_fs, filename, out_file);
 			}
-			else if(resource_type_hash == SPRITE_TYPE)
+			else if(name.type == SPRITE_TYPE)
 			{
 				sprite_resource::compile(root_fs, filename, out_file);
 			}
-			else if (resource_type_hash == PACKAGE_TYPE)
+			else if (name.type == PACKAGE_TYPE)
 			{
 				package_resource::compile(root_fs, filename, out_file);
 			}
-			else if (resource_type_hash == UNIT_TYPE)
+			else if (name.type == UNIT_TYPE)
 			{
 				unit_resource::compile(root_fs, filename, out_file);
 			}
-			else if (resource_type_hash == PHYSICS_TYPE)
+			else if (name.type == PHYSICS_TYPE)
 			{
 				physics_resource::compile(root_fs, filename, out_file);
 			}
-			else if (resource_type_hash == MATERIAL_TYPE)
+			else if (name.type == MATERIAL_TYPE)
 			{
 				material_resource::compile(root_fs, filename, out_file);
 			}
-			else if (resource_type_hash == PHYSICS_CONFIG_TYPE)
+			else if (name.type == PHYSICS_CONFIG_TYPE)
 			{
 				physics_config_resource::compile(root_fs, filename, out_file);
 			}
-			else if (resource_type_hash == FONT_TYPE)
+			else if (name.type == FONT_TYPE)
 			{
 				font_resource::compile(root_fs, filename, out_file);
 			}
-			else if (resource_type_hash == LEVEL_TYPE)
+			else if (name.type == LEVEL_TYPE)
 			{
 				level_resource::compile(root_fs, filename, out_file);
 			}

+ 5 - 0
engine/os/android/AndroidDevice.cpp

@@ -35,6 +35,11 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include "Touch.h"
 #include "OsWindow.h"
 
+extern "C"
+{
+#include <android_native_app_glue.c>
+}
+
 namespace crown
 {
 

+ 1 - 0
engine/os/android/ApkFile.h

@@ -27,6 +27,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #pragma once
 
 #include "File.h"
+#include <sys/types.h>
 #include <android/asset_manager.h>
 
 namespace crown

+ 1 - 0
engine/os/android/ApkFilesystem.cpp

@@ -24,6 +24,7 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
 
+#include <sys/types.h>
 #include <android/asset_manager.h>
 #include "ApkFilesystem.h"
 #include "TempAllocator.h"

+ 0 - 6
engine/os/android/java/CrownActivity.java → engine/os/android/CrownActivity.java

@@ -28,27 +28,21 @@ package crown.android;
 
 import android.app.NativeActivity;
 import android.os.Bundle;
-import android.util.Log;
 
 public class CrownActivity extends NativeActivity
 {
 	static 
 	{
-		System.loadLibrary("luajit-5.1");
 		System.loadLibrary("crown");
 	}
 
-	public static String TAG = "crown";
-
 	CrownActivity _activity;
 
 	@Override
 	public void onCreate(Bundle savedInstanceState)
 	{
 		super.onCreate(savedInstanceState);
-
 		_activity = this;
-
 		// Init additional stuff here (ads, etc.)
     }
 

+ 2 - 1
engine/resource/FileBundle.cpp

@@ -34,6 +34,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include "StringUtils.h" 
 #include "Types.h"
 #include "OS.h"
+#include "Log.h"
 
 namespace crown
 {
@@ -51,7 +52,7 @@ public:
 	{
 		// Convert name/type into strings
 		char resource_name[512];
-		snprintf(resource_name, 512, "%.16lx-%.16lx", name.type, name.name);
+		snprintf(resource_name, 512, "%.16"PRIx64"-%.16"PRIx64, name.type, name.name);
 
 		// Open the resource and check magic number/version
 		File* file = m_filesystem.open(resource_name, FOM_READ);

+ 4 - 4
engine/resource/PhysicsResource.h

@@ -170,7 +170,7 @@ struct PhysicsResource
 	}
 
 	//-----------------------------------------------------------------------------
-	static void online(void* resource)
+	static void online(void* /*resource*/)
 	{
 	}
 
@@ -182,7 +182,7 @@ struct PhysicsResource
 	}
 
 	//-----------------------------------------------------------------------------
-	static void offline(void* resource)
+	static void offline(void* /*resource*/)
 	{
 	}
 
@@ -335,7 +335,7 @@ struct PhysicsConfigResource
 	}
 
 	//-----------------------------------------------------------------------------
-	static void online(void* resource)
+	static void online(void* /*resource*/)
 	{
 	}
 
@@ -347,7 +347,7 @@ struct PhysicsConfigResource
 	}
 
 	//-----------------------------------------------------------------------------
-	static void offline(void* resource)
+	static void offline(void* /*resource*/)
 	{
 	}
 

+ 2 - 2
engine/resource/SoundResource.h

@@ -80,7 +80,7 @@ public:
 	}
 
 	//-----------------------------------------------------------------------------
-	static void online(void* resource)
+	static void online(void* /*resource*/)
 	{
 	}
 
@@ -92,7 +92,7 @@ public:
 	}
 
 	//-----------------------------------------------------------------------------
-	static void offline(void* resource)
+	static void offline(void* /*resource*/)
 	{
 	}
 

+ 155 - 149
premake/premake4.lua

@@ -98,7 +98,6 @@ solution "crown"
 	end
 
 	flags {
-		"StaticRuntime",
 		"NoMinimalRebuild",
 		"NoPCH",
 		"NoRTTI",
@@ -131,18 +130,12 @@ solution "crown"
 	configuration { "release", "x64" }
 		targetsuffix "-release-64"
 
-	configuration { "debug", "native" }
-		targetsuffix "-debug"
 	configuration { "debug", "native" }
 		targetsuffix "-debug"
 
-	configuration { "development", "native" }
-		targetsuffix "-development"
 	configuration { "development", "native" }
 		targetsuffix "-development"
 
-	configuration { "release", "native" }
-		targetsuffix "-release"
 	configuration { "release", "native" }
 		targetsuffix "-release"
 
@@ -150,8 +143,7 @@ solution "crown"
 	project "crown"
 		language "C++"
 
-		includedirs
-		{
+		includedirs {
 			CROWN_SOURCE_DIR .. "/engine",
 			CROWN_SOURCE_DIR .. "/engine/core",
 			CROWN_SOURCE_DIR .. "/engine/core/bv",
@@ -175,8 +167,7 @@ solution "crown"
 			CROWN_SOURCE_DIR .. "/engine/world"
 		}
 
-		files
-		{
+		files {
 			CROWN_SOURCE_DIR .. "engine/**.h", 
 			CROWN_SOURCE_DIR .. "engine/**.cpp"
 		}
@@ -184,25 +175,28 @@ solution "crown"
 		configuration { "linux-*" }
 			kind "ConsoleApp"
 
-			buildoptions
-			{
-				"-std=c++03",	
+			buildoptions {
+				"-std=c++03",
+				"-Wall",
+				-- "-Wextra",
+				-- "-Werror",
+				-- "-pedantic",
+				"-Wno-unknown-pragmas",
+				"-Wno-unused-local-typedefs"
 			}
 			
-			linkoptions
-			{
-				"-Wl,-rpath=\\$$ORIGIN",
+			linkoptions {
+				"-Wl,-rpath=\\$$ORIGIN"
 			}
 
-			links
-			{
+			links {
 				"Xrandr",
 				"pthread",
 				"dl",
 				"GL",
 				"X11",
 				"openal",
-				"luajit-5.1",
+				"luajit-5.1"
 			}
 
 			includedirs {
@@ -210,8 +204,7 @@ solution "crown"
 				CROWN_SOURCE_DIR .. "/engine/renderers/backend/gl/glx",
 			}
 
-			excludes
-			{
+			excludes {
 				CROWN_SOURCE_DIR .. "engine/os/android/*",
 				CROWN_SOURCE_DIR .. "engine/os/win/*",
 				CROWN_SOURCE_DIR .. "engine/renderers/backend/gl/egl/*",
@@ -219,18 +212,12 @@ solution "crown"
 				CROWN_SOURCE_DIR .. "engine/audio/backend/SLESSoundWorld.cpp",
 			}
 			
-		configuration { "debug", "linux-*" }
-			buildoptions
-			{
-				"-O0",
-				"-Wall",
-				-- "-Werror",
-				"-Wno-unknown-pragmas",
-				"-Wno-unused-local-typedefs",
+		configuration { "linux-*", "debug" }
+			buildoptions {
+				"-O0"
 			}
 
-			linkoptions
-			{ 
+			linkoptions { 
 				"-Wl,--start-group $(addprefix -l," ..
 				"	LowLevelClothCHECKED" ..
 				"	PhysX3CHECKED " ..
@@ -250,16 +237,10 @@ solution "crown"
 			}
 
 		configuration { "linux-*", "development" }
-			buildoptions
-			{
-				"-g",
-				"-pg",
-				"-Wall",
-				-- "-Werror",
-				"-Wno-unknown-pragmas",
-				"-Wno-unused-local-typedefs",
+			buildoptions {
 				"-O2"
 			}
+
 			linkoptions
 			{ 
 				"-Wl,--start-group $(addprefix -l," ..
@@ -280,13 +261,12 @@ solution "crown"
 				") -Wl,--end-group"
 			}
 
-		configuration { "release", "linux-*" }
-			buildoptions
-			{
+		configuration { "linux-*", "release" }
+			buildoptions {
 				"-O2"
 			}
-			linkoptions
-			{ 
+
+			linkoptions { 
 				"-Wl,--start-group $(addprefix -l," ..
 				"	LowLevelCloth" ..
 				"	PhysX3 " ..
@@ -305,16 +285,14 @@ solution "crown"
 				") -Wl,--end-group"
 			}
 
-		configuration { "x32", "linux-*" }
+		configuration { "linux-*", "x32" }
 			targetdir(CROWN_INSTALL_DIR .. "bin/linux32")
 		
-			buildoptions
-			{
-				"-malign-double"
+			buildoptions {
+				"-malign-double" -- Required by PhysX
 			}
 
-			includedirs
-			{
+			includedirs {
 				CROWN_THIRD_DIR .. "luajit/x86/include/luajit-2.0",
 				CROWN_THIRD_DIR .. "physx/x86/include",
 				CROWN_THIRD_DIR .. "physx/x86/include/common",
@@ -340,8 +318,7 @@ solution "crown"
 				CROWN_THIRD_DIR .. "stb_vorbis"
 			}
 
-			libdirs
-			{
+			libdirs {
 				CROWN_THIRD_DIR .. "luajit/x86/lib",
 				CROWN_THIRD_DIR .. "physx/x86/lib"
 			}
@@ -352,7 +329,7 @@ solution "crown"
 				"cp -r " .. CROWN_THIRD_DIR .. "/luajit/x86/share/luajit-2.0.3/jit " .. CROWN_INSTALL_DIR .. "bin/linux32/"
 			}
 
-		configuration { "x64", "linux-*" }
+		configuration { "linux-*", "x64" }
 			targetdir(CROWN_INSTALL_DIR .. "bin/linux64")
 
 			includedirs {
@@ -381,8 +358,7 @@ solution "crown"
 				CROWN_THIRD_DIR .. "stb_vorbis",
 			}
 
-			libdirs
-			{
+			libdirs {
 				CROWN_THIRD_DIR .. "luajit/x86_64/lib",
 				CROWN_THIRD_DIR .. "physx/x86_64/lib",
 			}
@@ -394,33 +370,60 @@ solution "crown"
 			}
 
 		configuration { "android" }
-			kind "SharedLib"
+			kind "ConsoleApp"
+			targetprefix "lib"
+			targetextension ".so"
+
 			targetdir(CROWN_INSTALL_DIR .. "bin/android") -- must be specified by user -- tmp
 
-			buildoptions
-			{
+			flags { "NoImportLib" }
+
+			defines { "__STDC_FORMAT_MACROS" }
+
+			buildoptions {
+				"--sysroot=$(ANDROID_NDK_ROOT)/platforms/android-14/arch-arm",
+				"-ffunction-sections",
+				"-fPIC",
+				"-march=armv7-a",
+				"-mfloat-abi=softfp",
+				"-mthumb",
+				"-no-canonical-prefixes",
 				"-std=c++03",
-				"--sysroot=$(ANDROID_NDK_ROOT)/platforms/android-18/arch-arm"
+				"-Wno-psabi", -- note: the mangling of 'va_list' has changed in GCC 4.4.0
+				"-no-canonical-prefixes",
+				"-fstack-protector",
+				"-mfpu=neon",
+				"-Wa,--noexecstack",
 			}
 			
-			linkoptions
-			{
-				"-Wl,-rpath=\\$$ORIGIN",
+			linkoptions {
+				"-shared",
 				"-nostdlib",
 				"-static-libgcc",
-				"--sysroot=$(ANDROID_NDK_ROOT)/platforms/android-18/arch-arm",
-				"$(ANDROID_NDK_ROOT)/platforms/android-18/arch-arm/usr/lib/crtbegin_so.o",
-				"$(ANDROID_NDK_ROOT)/platforms/android-18/arch-arm/usr/lib/crtend_so.o",
+				"--sysroot=$(ANDROID_NDK_ROOT)/platforms/android-14/arch-arm",
+				"$(ANDROID_NDK_ROOT)/platforms/android-14/arch-arm/usr/lib/crtbegin_so.o",
+				"$(ANDROID_NDK_ROOT)/platforms/android-14/arch-arm/usr/lib/crtend_so.o",
+				"-no-canonical-prefixes",
+				"-Wl,--no-undefined",
+				"-Wl,-z,noexecstack",
+				"-Wl,-z,relro",
+				"-Wl,-z,now",
+				"-march=armv7-a",
+				"-Wl,--fix-cortex-a8",
 			}
 
-			links
-			{
-				"log",
+			links {
+				":libluajit-5.1.a",
 				"android",
+				"c",
+				"dl",
 				"EGL",
+				"gcc",
 				"GLESv2",
-				"z",
-				"OpenSLES",
+				"gnustl_static",
+				"log",
+				"m",
+				"OpenSLES"
 			}
 
 			includedirs {
@@ -454,16 +457,14 @@ solution "crown"
 				"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include"
 			}
 
-			libdirs
-			{
+			libdirs {
 				CROWN_THIRD_DIR .. "luajit/android/lib",
 				CROWN_THIRD_DIR .. "physx/android/lib",
 				"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a",
-				"$(ANDROID_NDK_ROOT)/platforms/android-18/arch-arm/usr/lib"
+				"$(ANDROID_NDK_ROOT)/platforms/android-14/arch-arm/usr/lib"
 			}
 
-			excludes
-			{
+			excludes {
 				CROWN_SOURCE_DIR .. "engine/os/linux/*",
 				CROWN_SOURCE_DIR .. "engine/os/win/*",
 				CROWN_SOURCE_DIR .. "engine/renderers/backend/gl/glx/*",
@@ -471,54 +472,84 @@ solution "crown"
 				CROWN_SOURCE_DIR .. "engine/audio/backend/ALSoundWorld.cpp"
 			}
 
-			postbuildcommands
-			{
-				"cp " .. CROWN_THIRD_DIR .. "luajit/android/lib/libluajit-5.1.so " .. CROWN_INSTALL_DIR .. "bin/android/"
-			}
-
 		configuration { "debug", "android" }
-			linkoptions
-			{
+			-- linkoptions
+			-- {
+			-- 	"-Wl,--start-group $(addprefix -l," ..
+			-- 	"	LowLevelClothCHECKED" ..
+			-- 	"	PhysX3CHECKED " ..
+			-- 	"	PhysX3CommonCHECKED" ..
+			-- 	"	PxTaskCHECKED" ..
+			-- 	"	LowLevelCHECKED" ..
+			-- 	"	PhysX3CharacterKinematicCHECKED" ..
+			-- 	"	PhysX3CookingCHECKED" ..
+			-- 	"	PhysX3ExtensionsCHECKED" ..
+			-- 	"	PhysX3VehicleCHECKED" ..
+			-- 	"	PhysXProfileSDKCHECKED" ..
+			-- 	"	PhysXVisualDebuggerSDKCHECKED" ..
+			-- 	"	PvdRuntimeCHECKED" ..
+			-- 	"	SceneQueryCHECKED" ..
+			-- 	"	SimulationControllerCHECKED" ..
+			-- 	") -Wl,--end-group"
+			-- }
+			linkoptions { 
 				"-Wl,--start-group $(addprefix -l," ..
-				"	LowLevelClothCHECKED" ..
-				"	PhysX3CHECKED " ..
-				"	PhysX3CommonCHECKED" ..
-				"	PxTaskCHECKED" ..
-				"	LowLevelCHECKED" ..
-				"	PhysX3CharacterKinematicCHECKED" ..
-				"	PhysX3CookingCHECKED" ..
-				"	PhysX3ExtensionsCHECKED" ..
-				"	PhysX3VehicleCHECKED" ..
-				"	PhysXProfileSDKCHECKED" ..
-				"	PhysXVisualDebuggerSDKCHECKED" ..
-				"	PvdRuntimeCHECKED" ..
-				"	SceneQueryCHECKED" ..
-				"	SimulationControllerCHECKED" ..
+				"	LowLevelCloth" ..
+				"	PhysX3 " ..
+				"	PhysX3Common" ..
+				"	PxTask" ..
+				"	LowLevel" ..
+				"	PhysX3CharacterKinematic" ..
+				"	PhysX3Cooking" ..
+				"	PhysX3Extensions" ..
+				"	PhysX3Vehicle" ..
+				"	PhysXProfileSDK" ..
+				"	PhysXVisualDebuggerSDK" ..
+				"	PvdRuntime" ..
+				"	SceneQuery" ..
+				"	SimulationController" ..
 				") -Wl,--end-group"
 			}
 		configuration { "development", "android"}
-			linkoptions
-			{ 
+			-- linkoptions
+			-- { 
+			-- 	"-Wl,--start-group $(addprefix -l," ..
+			-- 	"	LowLevelClothPROFILE" ..
+			-- 	"	PhysX3PROFILE " ..
+			-- 	"	PhysX3CommonPROFILE" ..
+			-- 	"	PxTaskPROFILE" ..
+			-- 	"	LowLevelPROFILE" ..
+			-- 	"	PhysX3CharacterKinematicPROFILE" ..
+			-- 	"	PhysX3CookingPROFILE" ..
+			-- 	"	PhysX3ExtensionsPROFILE" ..
+			-- 	"	PhysX3VehiclePROFILE" ..
+			-- 	"	PhysXProfileSDKPROFILE" ..
+			-- 	"	PhysXVisualDebuggerSDKPROFILE" ..
+			-- 	"	PvdRuntimePROFILE" ..
+			-- 	"	SceneQueryPROFILE" ..
+			-- 	"	SimulationControllerPROFILE" ..
+			-- 	") -Wl,--end-group"
+			-- }
+			linkoptions { 
 				"-Wl,--start-group $(addprefix -l," ..
-				"	LowLevelClothPROFILE" ..
-				"	PhysX3PROFILE " ..
-				"	PhysX3CommonPROFILE" ..
-				"	PxTaskPROFILE" ..
-				"	LowLevelPROFILE" ..
-				"	PhysX3CharacterKinematicPROFILE" ..
-				"	PhysX3CookingPROFILE" ..
-				"	PhysX3ExtensionsPROFILE" ..
-				"	PhysX3VehiclePROFILE" ..
-				"	PhysXProfileSDKPROFILE" ..
-				"	PhysXVisualDebuggerSDKPROFILE" ..
-				"	PvdRuntimePROFILE" ..
-				"	SceneQueryPROFILE" ..
-				"	SimulationControllerPROFILE" ..
+				"	LowLevelCloth" ..
+				"	PhysX3 " ..
+				"	PhysX3Common" ..
+				"	PxTask" ..
+				"	LowLevel" ..
+				"	PhysX3CharacterKinematic" ..
+				"	PhysX3Cooking" ..
+				"	PhysX3Extensions" ..
+				"	PhysX3Vehicle" ..
+				"	PhysXProfileSDK" ..
+				"	PhysXVisualDebuggerSDK" ..
+				"	PvdRuntime" ..
+				"	SceneQuery" ..
+				"	SimulationController" ..
 				") -Wl,--end-group"
-			}		
+			}	
 		configuration { "release", "android"}
-			linkoptions
-			{ 
+			linkoptions { 
 				"-Wl,--start-group $(addprefix -l," ..
 				"	LowLevelCloth" ..
 				"	PhysX3 " ..
@@ -537,9 +568,7 @@ solution "crown"
 				") -Wl,--end-group"
 			}
 
-
 		-- it's necessary to define DXSDK_DIR env variable to DirectX sdk directory
-
 		configuration { "vs*" }
 			kind "ConsoleApp"
 
@@ -568,8 +597,7 @@ solution "crown"
 				"/Oy-", -- Suppresses creation of frame pointers on the call stack.
 				"/Ob2", -- The Inline Function Expansion
 			}
-			links
-			{
+			links {
 				"OpenGL32",
 				"lua51",
 				"OpenAL32"
@@ -579,13 +607,11 @@ solution "crown"
 				CROWN_SOURCE_DIR .. "/engine/renderers/backend/gl/wgl"
 			}
 
-			libdirs
-			{
+			libdirs {
 				CROWN_THIRD_DIR .. "openal/lib"
 			}
 
-			excludes
-			{
+			excludes {
 				CROWN_SOURCE_DIR .. "engine/os/android/*",
 				CROWN_SOURCE_DIR .. "engine/os/linux/*",
 				CROWN_SOURCE_DIR .. "engine/os/posix/*",
@@ -601,8 +627,7 @@ solution "crown"
 			}
 
 		configuration { "vs*", "debug" }
-			links
-			{
+			links {
 				"PhysX3ExtensionsCHECKED",
 				"PhysXProfileSDKCHECKED",
 				"PhysXVisualDebuggerSDKCHECKED",
@@ -610,8 +635,7 @@ solution "crown"
 			}
 
 		configuration { "vs*", "development" }
-			links
-			{
+			links {
 				"PhysX3ExtensionsPROFILE",
 				"PhysXProfileSDKPROFILE",
 				"PhysXVisualDebuggerSDKPROFILE",
@@ -619,8 +643,7 @@ solution "crown"
 			}
 
 		configuration { "vs*", "release" }
-			links
-			{
+			links {
 				"PhysX3Extensions",
 				"PhysXProfileSDK",
 				"PhysXVisualDebuggerSDK",
@@ -653,8 +676,8 @@ solution "crown"
 				CROWN_THIRD_DIR .. "stb_image",
 				CROWN_THIRD_DIR .. "stb_vorbis"
 			}
-			libdirs
-			{
+
+			libdirs {
 				CROWN_THIRD_DIR .. "luajit/win32/lib",
 				CROWN_THIRD_DIR .. "physx/win32/lib"
 			}
@@ -740,20 +763,3 @@ solution "crown"
 				"PhysX3Common_x64",
 				"PhysX3Cooking_x64"
 			}
-
-
-	-- os.copyfile(CROWN_THIRD_DIR .. "luajit/x86/lib/libluajit-5.1.so.2.0.3", CROWN_INSTALL_DIR .. "bin/linux32/")
-	-- os.copyfile(CROWN_THIRD_DIR .. "luajit/x86/lib/libluajit-5.1.so.2", CROWN_INSTALL_DIR .. "bin/linux32/")
-	-- os.mkdir(CROWN_INSTALL_DIR .. "bin/linux32/jit")
-	-- os.copyfile(CROWN_THIRD_DIR .. "/luajit/x86/share/luajit-2.0.3/jit/*", CROWN_INSTALL_DIR .. "bin/linux32/jit/")
-
-	-- os.copyfile(CROWN_THIRD_DIR .. "luajit/x86_64/bin/luajit-2.0.3", CROWN_INSTALL_DIR .. "bin/linux64/")
-	-- os.copyfile(CROWN_THIRD_DIR .. "luajit/x86_64/bin/luajit", CROWN_INSTALL_DIR .. "bin/linux64/")
-	-- os.copyfile(CROWN_THIRD_DIR .. "luajit/x86_64/lib/libluajit-5.1.so.2.0.3", CROWN_INSTALL_DIR .. "bin/linux64/")
-	-- os.copyfile(CROWN_THIRD_DIR .. "luajit/x86_64/lib/libluajit-5.1.so.2", CROWN_INSTALL_DIR .. "bin/linux64/")
-	-- os.mkdir(CROWN_INSTALL_DIR .. "bin/linux64/jit")
-	-- os.copyfile(CROWN_THIRD_DIR .. "/luajit/x86_64/share/luajit-2.0.3/jit/*", CROWN_INSTALL_DIR .. "bin/linux64/jit/")
-
-	-- os.copyfile(CROWN_THIRD_DIR .. "luajit/android/lib/libluajit-5.1.so.2.0.2", CROWN_INSTALL_DIR .. "bin/android/")
-	-- os.copyfile(CROWN_THIRD_DIR .. "luajit/android/lib/libluajit-5.1.so", CROWN_INSTALL_DIR .. "bin/android/")
-