* [NON-SMACK Targets](#non-smack-targets)
* [SMACK enabled Targets](#smack-enabled-targets)
* [DEBUG Builds](#debug-builds)
+ * [3. Building for MS Windows](#3-building-for-ms-windows)
# Build Instructions
$ gbs build -A [TARGET_ARCH] --define "%enable_debug 1"
+## 3. Building for MS Windows
+
+Third party dependencies are built using vcpkg. Instructions on how to install vcpkg can be found in the
+vcpkg-script folder in the windows-dependencies repository.
+
+- Download the windows-dependencies repository from DaliHub
+
+ $ git clone https://github.com/dalihub/windows-dependencies.git
+
+- Read the README.md and vcpkg-script/Readme.md files for more instructions on how to install and build the third-party dependencies.
\ No newline at end of file
INCLUDE( ${ROOT_SRC_DIR}/dali/integration-api/file.list )
INCLUDE( ${ROOT_SRC_DIR}/dali/public-api/file.list )
INCLUDE( ${ROOT_SRC_DIR}/dali/devel-api/file.list )
+IF( UNIX )
+ INCLUDE( ${ROOT_SRC_DIR}/dali/internal/file-unix.list )
+ELSEIF( WIN32 )
+ INCLUDE( ${ROOT_SRC_DIR}/dali/internal/file-windows.list )
+ENDIF()
INCLUDE( ${ROOT_SRC_DIR}/doc/file.list )
SET(LIBTYPE SHARED)
#include <dali/integration-api/context-notifier.h>
#include <dali/integration-api/resource-policies.h>
+#undef FALSE
+#undef TRUE
+
namespace Dali
{
namespace Log
{
-thread_local LogFunction gthreadLocalLogFunction = NULL;
+thread_local LogFunction gthreadLocalLogFunction = nullptr;
/* Forward declarations */
std::string FormatToString(const char *format, ...);
void UninstallLogFunction()
{
- gthreadLocalLogFunction = NULL;
+ gthreadLocalLogFunction = nullptr;
}
#ifdef DEBUG_ENABLED
Filter* Filter::gRender = Filter::New(Debug::Concise, false, "LOG_RENDER");
Filter* Filter::gResource = Filter::New(Debug::Concise, false, "LOG_RESOURCE");
Filter* Filter::gGLResource = Filter::New(Debug::Concise, false, "LOG_GL_RESOURCE");
-Filter* Filter::gObject = NULL;
+Filter* Filter::gObject = nullptr;
Filter* Filter::gImage = Filter::New(Debug::Concise, false, "LOG_IMAGE");
Filter* Filter::gModel = Filter::New(Debug::Concise, false, "LOG_MODEL");
-Filter* Filter::gNode = NULL;
-Filter* Filter::gElement = NULL;
+Filter* Filter::gNode = nullptr;
+Filter* Filter::gElement = nullptr;
Filter* Filter::gActor = Filter::New(Debug::Concise, false, "LOG_ACTOR");
Filter* Filter::gShader = Filter::New(Debug::Concise, false, "LOG_SHADER");
if( mTraceEnabled )
{
- char *buffer = NULL;
+ char *buffer = nullptr;
int numChars = asprintf( &buffer, " %-*c %s", mNesting, ':', format );
if( numChars >= 0 ) // No error
{
#endif // DEBUG_ENABLED
-
std::string ArgListToString(const char *format, va_list args)
{
std::string str; // empty string
/**
* Provides unfiltered logging for global warning level messages
*/
-#define DALI_LOG_WARNING(format, ...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugWarning, "%s " format, __PRETTY_FUNCTION__, ## __VA_ARGS__)
+#define DALI_LOG_WARNING(format, ...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugWarning, "%s " format, ASSERT_LOCATION, ## __VA_ARGS__)
#else // DEBUG_ENABLED
#define DALI_LOG_TRACE_METHOD_FMT(filter, format, ...) \
- Dali::Integration::Log::TraceObj debugTraceObj(filter, "%s: " format, __PRETTY_FUNCTION__, ## __VA_ARGS__)
+ Dali::Integration::Log::TraceObj debugTraceObj(filter, "%s: " format, ASSERT_LOCATION, ## __VA_ARGS__)
#define DALI_LOG_TRACE_METHOD(filter) \
- Dali::Integration::Log::TraceObj debugTraceObj(filter, __PRETTY_FUNCTION__)
+ Dali::Integration::Log::TraceObj debugTraceObj(filter, ASSERT_LOCATION)
#else // DEBUG_ENABLED
# Set the source directory
SET( platform_abstraction_src_dir ${ROOT_SRC_DIR}/dali/integration-api )
-# Add platform abstraction headers here
+# Add platform abstraction source files here
SET( platform_abstraction_src_files
${platform_abstraction_src_dir}/bitmap.cpp
${platform_abstraction_src_dir}/core.cpp
* Used for function tracing. It logs tracing of the fuction from start to end.
*/
#define DALI_TRACE_FUNCTION( filter ) \
- Dali::Integration::Trace::Tracer logTraceFunction( filter, __PRETTY_FUNCTION__ );
+ Dali::Integration::Trace::Tracer logTraceFunction( filter, ASSERT_LOCATION );
/**
* Used for scope tracing. It logs tracing around a scope.
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// FILE HEADER
+#include <dali/internal/event/common/demangler.h>
+
+// INTERNAL HEADERS
+#include <dali/public-api/common/vector-wrapper.h>
+
+namespace
+{
+
+// true if character represent a digit
+inline bool IsDigit(char c)
+{
+ return (c >= '0' && c <= '9');
+}
+
+// Gets the number of characters (number is in string)
+// start The start position to look for a number
+// result The number as an integer
+// returns the number of characters used to define the number ie '12' is 2
+size_t GetNumberOfCharacters(const std::string& s, const size_t& start, int& result)
+{
+ size_t size = s.size();
+
+ size_t i = start;
+
+ int number = 0;
+
+ for( ; i < size; ++i )
+ {
+ char c = s.at(i);
+ if( !IsDigit( c ) )
+ {
+ break;
+ }
+ else
+ {
+ number = 10 * number + (c - '0');
+ }
+ }
+
+ if( i - start )
+ {
+ result = number;
+ }
+
+ return i - start;
+}
+
+/**
+ * @brief Demangle a nested typeid name into its component parts.
+ * A nested type name is one containing namespaces and class names only.
+ * eg DemangleNestedNames(typeid(Dali::Actor).name());
+ * @param[in] typeIdName The type id name string to demangle.
+ * @returns the demangled list of names ie ["Dali","Actor"] or an empty list
+ */
+std::vector<std::string> DemangleNestedNames(const char *typeIdName)
+{
+ // Demangle class name mangled according to the Itanium C++ ABI
+ // Returns demangled names ie "N4Dali8Internal5ActorE" is ["Dali","Internal","Actor"]
+ std::vector<std::string> ret;
+
+ const std::string mangledName(typeIdName);
+
+
+ size_t size = mangledName.size();
+
+ if( size >= 2 )
+ {
+ int number = 0;
+ size_t start = 0;
+
+ // If the class isnt nested in a namespace then it just starts with the
+ // number of characters
+ if(mangledName[0] == 'N' && mangledName[size-1] == 'E')
+ {
+ start = 1;
+ }
+
+ while( size_t chars = GetNumberOfCharacters(mangledName, start, number) )
+ {
+ ret.push_back( mangledName.substr( start + chars, number ) );
+
+ start += chars + number;
+ }
+ }
+
+ return ret;
+}
+
+} // anon namespace
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+const std::string DemangleClassName(const char *typeIdName)
+{
+ std::string name;
+ std::vector<std::string> names = DemangleNestedNames(typeIdName);
+
+ if( names.size() )
+ {
+ name = names[ names.size() - 1 ];
+ }
+
+ return name;
+}
+
+} // namespace Internal
+
+} // namespace Dali
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// FILE HEADER
+#include <dali/internal/event/common/demangler.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+const std::string DemangleClassName(const char *typeIdName)
+{
+ std::string name = typeIdName;
+ int index = name.find_last_of(' ');
+
+ if( 0 <= index )
+ {
+ name = name.substr( index + 1, name.size() - index );
+ }
+
+ index = name.find_last_of(':');
+
+ if( 0 <= index )
+ {
+ name = name.substr(index + 1, name.size() - index);
+ }
+
+ return name;
+}
+
+} // namespace Internal
+
+} // namespace Dali
+++ /dev/null
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-//
-// gcc and clang minimal demangling
-// Both follow Itanium C++ ABI
-//
-// We only decode namespaces and class typeid names for simplicity as its all we need.
-//
-// From http://mentorembedded.github.io/cxx-abi/abi.html#mangling-structure
-//
-// <nested-name> ::= N [<CV-qualifiers>] <prefix> <unqualified-name> E
-// ::= N [<CV-qualifiers>] <template-prefix> <template-args> E
-//
-// <prefix> ::= <prefix> <unqualified-name>
-// ::= <template-prefix> <template-args>
-// ::= <template-param>
-// ::= <decltype>
-// ::= # empty
-// ::= <substitution>
-// ::= <prefix> <data-member-prefix>
-//
-// <template-prefix> ::= <prefix> <template unqualified-name>
-// ::= <template-param>
-// ::= <substitution>
-// <unqualified-name> ::= <operator-name>
-// ::= <ctor-dtor-name>
-// ::= <source-name>
-// ::= <unnamed-type-name>
-//
-// <source-name> ::= <positive length number> <identifier>
-// <number> ::= [n] <non-negative decimal integer>
-// <identifier> ::= <unqualified source code identifier>
-//
-// So for example
-//
-// Dali::Internal::Actor would be
-//
-// N4Dali8Internal5ActorE
-//
-
-// CLASS HEADER
-#include <dali/internal/event/common/demangler.h>
-
-namespace
-{
-
-// true if character represent a digit
-inline bool IsDigit(char c)
-{
- return (c >= '0' && c <= '9');
-}
-
-// Gets the number of characters (number is in string)
-// start The start position to look for a number
-// result The number as an integer
-// returns the number of characters used to define the number ie '12' is 2
-size_t GetNumberOfCharacters(const std::string& s, const size_t& start, int& result)
-{
- size_t size = s.size();
-
- size_t i = start;
-
- int number = 0;
-
- for( ; i < size; ++i )
- {
- char c = s.at(i);
- if( !IsDigit( c ) )
- {
- break;
- }
- else
- {
- number = 10 * number + (c - '0');
- }
- }
-
- if( i - start )
- {
- result = number;
- }
-
- return i - start;
-}
-
-} // anon namespace
-
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-#if defined(__clang__) || defined(__GNUC__)
-
-// Demangle class name mangled according to the Itanium C++ ABI
-// Returns demangled names ie "N4Dali8Internal5ActorE" is ["Dali","Internal","Actor"]
-std::vector<std::string> DemangleNestedNames(const char *typeIdName)
-{
- std::vector<std::string> ret;
-
- const std::string mangledName(typeIdName);
-
-
- size_t size = mangledName.size();
-
- if( size >= 2 )
- {
- int number = 0;
- size_t start = 0;
-
- // If the class isnt nested in a namespace then it just starts with the
- // number of characters
- if(mangledName[0] == 'N' && mangledName[size-1] == 'E')
- {
- start = 1;
- }
-
- while( size_t chars = GetNumberOfCharacters(mangledName, start, number) )
- {
- ret.push_back( mangledName.substr( start + chars, number ) );
-
- start += chars + number;
- }
- }
-
- return ret;
-}
-
-#else
-# error Unsupported Compiler
-#endif
-
-
-const std::string DemangleClassName(const char *typeIdName)
-{
- std::string name;
- std::vector<std::string> names = DemangleNestedNames(typeIdName);
-
- if( names.size() )
- {
- name = names[ names.size() - 1 ];
- }
-
- return name;
-}
-
-} // namespace Internal
-
-} // namespace Dali
// EXTERNAL INCLUDES
#include <string>
-// INTERNAL INCLUDES
-#include <dali/public-api/common/vector-wrapper.h>
-
namespace Dali
{
{
/**
- * Demangle a nested typeid name into its component parts.
- * A nested type name is one containing namespaces and class names only.
- * eg DemangleNestedNames(typeid(Dali::Actor).name());
- * @param[in] typeIdName The type id name string to demangle.
- * @returns the demangled list of names ie ["Dali","Actor"] or an empty list
- */
-std::vector<std::string> DemangleNestedNames(const char *typeIdName);
-
-/**
- * Demangle a nested typeid name to its class name.
+ * @brief Demangle a nested typeid name to its class name.
* @param[in] typeIdName The type id name string to demangle.
* @returns the class name ie "Actor" or an empty string
*/
#include <dali/internal/event/common/type-registry-impl.h>
// INTERNAL INCLUDES
-#include <dali/internal/event/common/thread-local-storage.h>
#include <dali/public-api/object/type-registry.h>
#include <dali/public-api/object/base-handle.h>
#include <dali/internal/event/actors/custom-actor-internal.h>
#include <dali/internal/event/common/demangler.h>
+#include <dali/internal/event/common/thread-local-storage.h>
#include <dali/integration-api/debug.h>
namespace Dali
{
-extern std::string Demangle(const char* symbol);
-
namespace Internal
{
--- /dev/null
+# Set the source directory
+SET( internal_src_dir ${ROOT_SRC_DIR}/dali/internal )
+
+# Add internal unix source files here
+SET( internal_unix_src_files
+ ${internal_src_dir}/event/common/demangler-unix.cpp
+)
+
+SET( SOURCES ${SOURCES}
+ ${internal_unix_src_files}
+)
\ No newline at end of file
--- /dev/null
+# Set the source directory
+SET( internal_src_dir ${ROOT_SRC_DIR}/dali/internal )
+
+# Add internal windows source files here
+SET( internal_windows_src_files
+ ${internal_src_dir}/event/common/demangler-windows.cpp
+)
+
+SET( SOURCES ${SOURCES}
+ ${internal_windows_src_files}
+)
\ No newline at end of file
${internal_src_dir}/event/animation/linear-constrainer-impl.cpp
${internal_src_dir}/event/animation/path-impl.cpp
${internal_src_dir}/event/animation/path-constrainer-impl.cpp
- ${internal_src_dir}/event/common/demangler.cpp
${internal_src_dir}/event/common/event-thread-services.cpp
${internal_src_dir}/event/common/notification-manager.cpp
${internal_src_dir}/event/common/object-impl.cpp
${internal_src_dir}/update/rendering/scene-graph-renderer.cpp
)
-
SET( SOURCES ${SOURCES}
${internal_src_files}
)
* @SINCE_1_0.0
*/
#if defined(DEBUG_ENABLED)
+#if defined(WIN32)
+#define ASSERT_LOCATION __FUNCSIG__
+#else
#define ASSERT_LOCATION __PRETTY_FUNCTION__
+#endif
#else
#define ASSERT_LOCATION NULL
#endif