diff --git a/CMakeLists.txt b/CMakeLists.txt index afad0f01..081e05fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -166,7 +166,7 @@ set (LOOT_API_SRC ${LOOT_SRC} "${CMAKE_SOURCE_DIR}/src/api/api.cpp") set (LOOT_API_HEADERS ${LOOT_HEADERS} - "${CMAKE_SOURCE_DIR}/src/api/api.h") + "${CMAKE_SOURCE_DIR}/include/loot/api.h") set (LOOT_VALIDATOR_SRC ${LOOT_SRC} "${CMAKE_SOURCE_DIR}/src/validator/main.cpp") @@ -208,6 +208,7 @@ source_group("Header Files" FILES ${LOOT_HEADERS} ${LOOT_GUI_HEADERS} ${LOOT_API # Include source and library directories. include_directories ("${CMAKE_SOURCE_DIR}/src" "${LIBLOADORDER_ROOT}/src" + "${CMAKE_SOURCE_DIR}/include" "${LIBGIT2_ROOT}/include" ${CEF_ROOT} ${LIBESPM_ROOT} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1af1a6e2..179e520f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -62,7 +62,7 @@ If you're adding a new translation, LOOT's source code must be updated to recogn * In [language.h](src/backend/helpers/language.h), add a static constant for the language to the `Language` class. * In [language.cpp](src/backend/helpers/language.cpp), define the value for the constant you added, and update `Language::Language(const std::string& locale)`, `Language::Construct(const unsigned int code)` and `Language::Codes({...})` to include lines for your language. -* Add constants for the language in [api.h](src/api/api.h) and [api.cpp](src/api/api.cpp). +* Add constants for the language in [api.h](include/loot/api.h) and [api.cpp](src/api/api.cpp). * In [archive.js](scripts/archive.js), add the language folder to the list on line 83. * In [installer.iss](scripts/installer.iss), add an entry for your language's translation file to the `[Files]` section. * In [LOOT Metadata Syntax.html](docs/LOOT%20Metadata%20Syntax.html), add a row for your language to the Language Codes table. diff --git a/docs/Doxyfile b/docs/Doxyfile index 8ffdb2b5..fb94428e 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -765,7 +765,7 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = ../src/api/api.h +INPUT = ../include/loot/api.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/src/api/api.h b/include/loot/api.h similarity index 99% rename from src/api/api.h rename to include/loot/api.h index 23dd3c6f..10b0f6d7 100644 --- a/src/api/api.h +++ b/include/loot/api.h @@ -507,7 +507,10 @@ extern "C" * The URL of the remote from which to fetch updates. This can also be * a relative or absolute path to a local repository. * @param remoteBranch - * The branch of the remote from which to apply updates. + * The branch of the remote from which to apply updates. LOOT's + * official masterlists are versioned using separate branches for each + * new version of the masterlist syntax, so if you're using them, + * check their repositories to see which is the latest release branch. * @param updated * `true` if the masterlist was updated. `false` if no update was * necessary, ie. it was already up-to-date. If `true`, the masterlist diff --git a/scripts/archive.js b/scripts/archive.js index 95629151..cab4e645 100644 --- a/scripts/archive.js +++ b/scripts/archive.js @@ -159,7 +159,7 @@ function createApiArchive(dest_path) { // API header file. fs.mkdirsSync(path.join(temp_path, 'include', 'loot')); fs.copySync( - path.join(root_path, 'src', 'api', 'api.h'), + path.join(root_path, 'include', 'loot', 'api.h'), path.join(temp_path, 'include', 'loot', 'api.h') ); diff --git a/src/api/api.cpp b/src/api/api.cpp index aafa7978..002eb6d3 100644 --- a/src/api/api.cpp +++ b/src/api/api.cpp @@ -22,7 +22,7 @@ . */ -#include "api.h" +#include "loot/api.h" #include "../backend/game/game.h" #include "../backend/globals.h" #include "../backend/error.h" diff --git a/src/tests/api/test_api.h b/src/tests/api/test_api.h index 10e6114b..8d64dca4 100644 --- a/src/tests/api/test_api.h +++ b/src/tests/api/test_api.h @@ -25,7 +25,7 @@ along with LOOT. If not, see #ifndef LOOT_TEST_API #define LOOT_TEST_API -#include "api/api.h" +#include "../include/loot/api.h" #include "tests/fixtures.h" #include