Merge branch 'vehicledamage' of https://github.com/acemod/ACE3 into vehicledamage

Conflicts:
	extensions/CMakeLists.txt
This commit is contained in:
Nou 2015-05-12 19:29:56 -07:00
commit 3a9fb5cc2a
2 changed files with 15 additions and 26 deletions

View File

@ -35,20 +35,12 @@ include_directories("common")
if(USE_BULLET)
# Dependencies
#
set(BACKUP_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
set(BACKUP_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
set(BACKUP_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
add_definitions(-DUSE_DIRECTX)
add_subdirectory(lib/bullet3)
#set(depname bullet3)
#set(${depname}_PREFIX "lib/${depname}")
#set(${depname}_INSTALL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/binaries/${CMAKE_SYSTEM_NAME}${CMAKE_CXX_COMPILER_ID}${KINEVOX_ARCHITECTURE}/usr/local/")
#set(${depname}_CMAKE_ARGS -DBUILD_SHARED_LIBS=true -DCMAKE_INSTALL_PREFIX=${${depname}_INSTALL_DIR} -DBUILD_BULLET2_DEMOS=false -DBUILD_UNIT_TESTS=false -DBUILD_BULLET3_DEMOS=false -DBUILD_CPU_DEMOS=false -DBUILD_EXTRAS=false -DINSTALL_LIBS=true ${EXTRA_ARGS})
#ExternalProject_Add(
# ${depname}
# PREFIX ${${depname}_PREFIX}
# GIT_REPOSITORY https://github.com/bulletphysics/bullet3.git lib/${depname}
# SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${depname}
# INSTALL_DIR ${${depname}_INSTALL_DIR}
# CMAKE_ARGS ${${depname}_CMAKE_ARGS}
#)
set_target_properties(App_BasicExample PROPERTIES FOLDER Bullet3)
set_target_properties(App_HelloWorld PROPERTIES FOLDER Bullet3)
@ -74,6 +66,10 @@ if(USE_BULLET)
set_target_properties(OpenGLWindow PROPERTIES FOLDER Bullet3)
set_target_properties(LinearMath PROPERTIES FOLDER Bullet3)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${BACKUP_ARCHIVE_OUTPUT_DIRECTORY})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${BACKUP_LIBRARY_OUTPUT_DIRECTORY})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${BACKUP_RUNTIME_OUTPUT_DIRECTORY})
include_directories(BEFORE "lib/bullet3/src")
endif()
if(USE_DIRECTX)

View File

@ -269,6 +269,8 @@ namespace ace {
/* Cast our buffer into an UNICODE_STRING. */
objectName = *(PUNICODE_STRING)objectNameInfo;
/* Print the information! */
if (objectName.Length)
{
@ -278,20 +280,11 @@ namespace ace {
std::string object_type(tmp_type.begin(), tmp_type.end());
std::string object_name(tmp_name.begin(), tmp_name.end());
if (object_type == "File" && object_name.find(".pbo") != object_name.npos) {
char volume_letter[MAX_PATH];
BOOL res = GetVolumePathName(object_name.c_str(), volume_letter, sizeof(volume_letter));
if (res) {
volume_letter[2] = 0x00;
std::vector<std::string> tokens = ace::split(object_name, '\\');
char buffer[MAX_PATH];
GetFinalPathNameByHandle(dupHandle, buffer, sizeof(buffer), VOLUME_NAME_DOS);
std::stringstream s;
s << volume_letter;
for (int x = 3; x < tokens.size(); x++) {
s << "\\" << tokens[x];
}
LOG(DEBUG) << "Pbo: " << s.str();
_active_pbo_list.push_back(s.str());
}
LOG(DEBUG) << "Pbo: " << buffer;
_active_pbo_list.push_back(std::string(buffer));
}
}