Skip to content

Commit

Permalink
Finished MBE/EXPA feature
Browse files Browse the repository at this point in the history
It may still not be entirely stable/complete due to the nature of reverse engineering stuff.

Also put structure files into it's own folder.

Added THIRD-PARTY-NOTICE to inform about used third party libraries.
  • Loading branch information
SydMontague committed Feb 26, 2020
1 parent bfe2c4c commit 583aca6
Show file tree
Hide file tree
Showing 13 changed files with 953 additions and 61 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ FIND_PACKAGE( Boost 1.65 REQUIRED COMPONENTS filesystem regex)
INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )

# Include sub-projects.
add_subdirectory ("DSCSTools")
add_subdirectory ("DSCSTools")

install (FILES LICENSE THIRD-PARTY-NOTICE DESTINATION ${CMAKE_BINARY_DIR}/target/license)
2 changes: 1 addition & 1 deletion DSCSTools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ add_executable (DSCSTools ${SOURCE_FILES})
target_link_libraries(DSCSTools PUBLIC doboz ${Boost_LIBRARIES})

install (TARGETS DSCSTools DESTINATION ${CMAKE_BINARY_DIR}/target)
install (DIRECTORY structures/ DESTINATION ${CMAKE_BINARY_DIR}/target)
install (DIRECTORY structures/ DESTINATION ${CMAKE_BINARY_DIR}/target/structures)
7 changes: 7 additions & 0 deletions DSCSTools/DSCSTools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ void printUse() {
std::cout << " --mbeextract <source> <targetFolder>" << std::endl;
std::cout << " Extracts a .mbe file or a directory of them into CSV, " << std::endl;
std::cout << " as long as it's structure is defined in the structure.json file." << std::endl;
std::cout << " --mbepack <sourceFolder> <targetFile>" << std::endl;
std::cout << " Repacks an .mbe folder containing CSV files back into a .mbe file " << std::endl;
std::cout << " as long as it's structure is found and defined in the structure.json file." << std::endl;
}

int main(int argc, char** argv) {
Expand Down Expand Up @@ -58,6 +61,10 @@ int main(int argc, char** argv) {
extractMBE(source, target);
std::cout << "Done" << std::endl;
}
else if (strncmp("--mbepack", argv[1], 10) == 0) {
packMBE(source, target);
std::cout << "Done" << std::endl;
}
else {
printUse();
}
Expand Down
Loading

0 comments on commit 583aca6

Please sign in to comment.