mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
mwiniimporter
This commit is contained in:
parent
8d7bf34348
commit
fbd626baf6
6 changed files with 100 additions and 1 deletions
|
@ -305,7 +305,7 @@ if(DPKG_PROGRAM)
|
||||||
Data files from the original game is required to run it.")
|
Data files from the original game is required to run it.")
|
||||||
SET(CPACK_DEBIAN_PACKAGE_NAME "openmw")
|
SET(CPACK_DEBIAN_PACKAGE_NAME "openmw")
|
||||||
SET(CPACK_DEBIAN_PACKAGE_VERSION "${VERSION_STRING}")
|
SET(CPACK_DEBIAN_PACKAGE_VERSION "${VERSION_STRING}")
|
||||||
SET(CPACK_PACKAGE_EXECUTABLES "openmw;OpenMW esmtool;Esmtool omwlauncher;OMWLauncher")
|
SET(CPACK_PACKAGE_EXECUTABLES "openmw;OpenMW esmtool;Esmtool omwlauncher;OMWLauncher mwiniimporter;MWiniImporter")
|
||||||
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "nvidia-cg-toolkit (>= 2.1), libboost-filesystem1.46.1 (>= 1.46.1), libboost-program-options1.46.1 (>= 1.46.1), libboost-system1.46.1 (>= 1.46.1), libboost-thread1.46.1 (>= 1.46.1), libc6 (>= 2.11.2), libfreetype6 (>= 2.2.1), libgcc1 (>= 1:4.1.1), libmpg123-0 (>= 1.12.1), libois-1.3.0 (>= 1.3.0), libopenal1 (>= 1:1.12.854), libsndfile1 (>= 1.0.23), libstdc++6 (>= 4.4.5), libuuid1 (>= 2.17.2), libqtgui4 (>= 4.7.0)")
|
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "nvidia-cg-toolkit (>= 2.1), libboost-filesystem1.46.1 (>= 1.46.1), libboost-program-options1.46.1 (>= 1.46.1), libboost-system1.46.1 (>= 1.46.1), libboost-thread1.46.1 (>= 1.46.1), libc6 (>= 2.11.2), libfreetype6 (>= 2.2.1), libgcc1 (>= 1:4.1.1), libmpg123-0 (>= 1.12.1), libois-1.3.0 (>= 1.3.0), libopenal1 (>= 1:1.12.854), libsndfile1 (>= 1.0.23), libstdc++6 (>= 4.4.5), libuuid1 (>= 2.17.2), libqtgui4 (>= 4.7.0)")
|
||||||
|
|
||||||
SET(CPACK_DEBIAN_PACKAGE_SECTION "Games")
|
SET(CPACK_DEBIAN_PACKAGE_SECTION "Games")
|
||||||
|
@ -391,6 +391,11 @@ if (BUILD_LAUNCHER)
|
||||||
add_subdirectory( apps/launcher )
|
add_subdirectory( apps/launcher )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
option(BUILD_MWINIIMPORTER "build MWiniImporter inspector" ON)
|
||||||
|
if (BUILD_MWINIIMPORTER)
|
||||||
|
add_subdirectory( apps/mwiniimporter )
|
||||||
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
if (USE_DEBUG_CONSOLE)
|
if (USE_DEBUG_CONSOLE)
|
||||||
|
|
21
apps/mwiniimporter/CMakeLists.txt
Normal file
21
apps/mwiniimporter/CMakeLists.txt
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
set(MWINIIMPORT
|
||||||
|
main.cpp
|
||||||
|
importer.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(MWINIIMPORT_HEADER
|
||||||
|
main.hpp
|
||||||
|
importer.hpp
|
||||||
|
)
|
||||||
|
|
||||||
|
source_group(launcher FILES ${MWINIIMPORT} ${MWINIIMPORT_HEADER})
|
||||||
|
|
||||||
|
add_executable(mwiniimport
|
||||||
|
${MWINIIMPORT}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(mwiniimport
|
||||||
|
${Boost_LIBRARIES}
|
||||||
|
components
|
||||||
|
)
|
||||||
|
|
6
apps/mwiniimporter/importer.cpp
Normal file
6
apps/mwiniimporter/importer.cpp
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#include "importer.hpp"
|
||||||
|
|
||||||
|
void MwIniImporter::test() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
17
apps/mwiniimporter/importer.hpp
Normal file
17
apps/mwiniimporter/importer.hpp
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
#ifndef MWINIIMPORTER_IMPORTER
|
||||||
|
#define MWINIIMPORTER_IMPORTER 1
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
class MwIniImporter {
|
||||||
|
|
||||||
|
public:
|
||||||
|
void test();
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
39
apps/mwiniimporter/main.cpp
Normal file
39
apps/mwiniimporter/main.cpp
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
#include "main.hpp"
|
||||||
|
#include "importer.hpp"
|
||||||
|
|
||||||
|
int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
|
bpo::options_description desc("Syntax: mwiniimporter <options>\nAllowed options");
|
||||||
|
desc.add_options()
|
||||||
|
("help,h", "produce help message")
|
||||||
|
("in,i", bpo::value<std::string>()->required(), "morrowind.ini input file")
|
||||||
|
("out,o", bpo::value<std::string>()->required(), "openmw.cfg output file")
|
||||||
|
;
|
||||||
|
|
||||||
|
bpo::variables_map vm;
|
||||||
|
try {
|
||||||
|
bpo::store(boost::program_options::parse_command_line(argc, argv, desc), vm);
|
||||||
|
bpo::notify(vm);
|
||||||
|
|
||||||
|
}
|
||||||
|
catch(std::exception& e) {
|
||||||
|
std::cout << "Error:" << e.what() << std::endl;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
catch(...) {
|
||||||
|
std::cout << "Error" << std::endl;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(vm.count("help")) {
|
||||||
|
std::cout << desc;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << "in:" << vm["in"].as<std::string>() << std::endl;
|
||||||
|
|
||||||
|
MwIniImporter importer;
|
||||||
|
importer.test();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
11
apps/mwiniimporter/main.hpp
Normal file
11
apps/mwiniimporter/main.hpp
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#ifndef MWINIIMPORTER_MAIN
|
||||||
|
#define MWINIIMPORTER_MAIN 1
|
||||||
|
|
||||||
|
#include <boost/program_options.hpp>
|
||||||
|
#include <iostream>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace bpo = boost::program_options;
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in a new issue