diff --git a/.gitattributes b/.gitattributes index 412eeda7..0b6acf18 100644 --- a/.gitattributes +++ b/.gitattributes @@ -10,13 +10,13 @@ *.dbproj merge=union # Standard to msysgit -*.doc diff=astextplain -*.DOC diff=astextplain +*.doc diff=astextplain +*.DOC diff=astextplain *.docx diff=astextplain *.DOCX diff=astextplain *.dot diff=astextplain *.DOT diff=astextplain *.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore index 035a7bb1..0b2bd207 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,10 @@ *.sql *.sqlite +# Temporary files # +##################3 +*~ + # OS generated files # ###################### .DS_Store diff --git a/CMakeLists.txt b/CMakeLists.txt index f9b81bee..e08b458c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 2.8.9) project (LOOT) -option(BUILD_SHARED_LIBS "Build a shared library" OFF) +option(BUILD_SHARED_LIBS "Build a shared library" ON) option(PROJECT_STATIC_RUNTIME "Build with static runtime libs (/MT)" ON) IF (NOT DEFINED PROJECT_ARCH) @@ -59,6 +59,7 @@ set (LOOT_GUI_SRC ${LOOT_SRC} "${CMAKE_SOURCE_DIR}/src/gui/main_win.cpp" "${CMAKE_SOURCE_DIR}/src/gui/handler.cpp" "${CMAKE_SOURCE_DIR}/src/gui/app.cpp" + "${CMAKE_SOURCE_DIR}/src/gui/scheme.cpp" "${CMAKE_SOURCE_DIR}/src/resource.rc") set (LOOT_API_SRC ${LOOT_SRC} @@ -89,7 +90,7 @@ link_directories ("${LIBLOADORDER_ROOT}/build" # Settings when compiling for Windows. Since it's a Windows-only app this is always true, but useful to check for copy/paste into other projects. IF (CMAKE_SYSTEM_NAME MATCHES "Windows") - add_definitions (-DUNICODE -D_UNICODE -D__WXMSW__ -DNDEBUG -DLIBLO_STATIC -DWIN32 -D_WINDOWS) + add_definitions (-DUNICODE -D_UNICODE -DNDEBUG -DLIBLO_STATIC -DWIN32 -D_WINDOWS) IF (BUILD_SHARED_LIBS) add_definitions (-DLOOT_EXPORT) ELSE () @@ -119,14 +120,14 @@ IF (MINGW) loadorder${PROJECT_ARCH} ssl crypto - ws2_32) + ws2_32 + shlwapi) set (LOOT_GUI_LIBS ${LOOT_LIBS} git2 cef_sandbox libcef libcef_dll_wrapper rpcrt4 - shlwapi comctl32) ELSEIF (MSVC) @@ -146,14 +147,14 @@ ELSEIF (MSVC) set (LOOT_LIBS libyaml-cppmt version loadorder${PROJECT_ARCH} - ws2_32) + ws2_32 + shlwapi) set (LOOT_GUI_LIBS ${LOOT_LIBS} git2 cef_sandbox libcef libcef_dll_wrapper rpcrt4 - shlwapi comctl32) ENDIF () @@ -171,7 +172,7 @@ add_executable (LOOT ${LOOT_GUI_SRC}) target_link_libraries (LOOT ${Boost_LIBRARIES} ${LOOT_GUI_LIBS}) # Copy CEF DLLs. -FOREACH(cef_dll d3dcompiler_43.dll d3dcompiler_46.dll libEGL.dll libGLESv2.dll libcef.dll) +FOREACH(cef_dll d3dcompiler_43.dll d3dcompiler_46.dll libEGL.dll libGLESv2.dll libcef.dll wow_helper.exe) add_custom_command(TARGET LOOT POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/${CEF_ROOT}/$/${cef_dll}" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..5ce1e249 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,67 @@ +Contributing To LOOT +==================== + +A general guide to contributing to LOOT, may be found on [LOOT's wiki](https://github.com/loot/loot.github.io/wiki/How-To-Contribute). Information more specific to this repository is found here. + +## Repository Branching Structure + +The repository branching structure is pretty simple: + +* The `master` branch is a ready-to-release branch. It will generally hold code newer than the latest release, but which could be prepared (ie. update version number, changelog) and packaged for release fairly quickly and easily. Code on this branch *should* be reasonably bug free and features will be complete. +* The `v0.7-alpha` branch is a next-release branch. It holds code that's working towards the next big release but which isn't there yet. Code is generally buggy and features incomplete (though this will vary considerably through the development cycle. After v0.7.0's release, this will be replaced with something a bit more generically named, probably `dev` or `next`. +* Other branches are generally themed on specific features or groups of changes, and come and go as they are merged into one of the two above, or discarded. + +## Getting Involved + +The best way to get started is to comment on something in GitHub's commit log or on the [issue tracker](https://github.com/loot/loot/issues) (new tracker entries are always welcome). + +Surprise pull requests aren't recommended because everything you touched may have been rewritten, making your changes a pain to integrate, or obsolete. There are only generally a few contributors at any one time though, so there's not much chance of painful conflicts requiring resolution, provided you're working off the correct branch. + +When you do make a pull request, please do so from a branch which doesn't have the same name as they branch you're requesting your changes to be merged into. It's a lot easier to keep track of what pull request branches do when they're named something like `you:specific-cool-feature` rather than `you:master`. + +## Translating LOOT + +### General Information + +LOOT supports translation into other languages, with the following limitations: + +* Debug log messages and error messages generated by the libraries LOOT uses cannot be translated. +* Masterlist messages can be translated, but translations must be submitted to the masterlist maintainers for addition. Translating masterlist messages won't be covered here. +* The languages LOOT supports is hardcoded, so LOOT must be updated to include new translations. + +To translate everything but masterlist messages, first fork this repository. All file paths given below are relative to its base folder. + +### Translating the Installer + +1. Open the installer script at `src/installer.nsi` in a text editor of your choice. +2. The English strings are located in the section with the heading `English Strings`. Create a copy of this section below the original. +3. Translate the quoted strings in the copied section, replacing the English text. For the lines beginning `VIAddVersionKey`, only translate the second quoted string. +4. Add an `!insertmacro MUI_LANGUAGE ""` line to the section with the headering `Languages`. `` is the NSIS name for your language: a perhaps incomplete example of accepted values can be found in [this script](http://nsis.sourceforge.net/Examples/Modern%20UI/MultiLanguage.nsi). +3. Save your changes. + +### Translating the LOOT application + +1. Download and install the latest version of [Poedit](http://www.poedit.net/). +2. If you are starting a new translation, select `File->New catalogue from POT file...` and choose the template file at `resources/l10n/template.pot`. In the `Catalog properties` dialog, just click `OK` without changing anything. +3. If you are updating a previous translation, open in Poedit the `loot.po` translation file in the relevant subdirectory of `resources/l10n`, then select `Catalogue->Update from POT file...` and choose the template file you downloaded. Click `OK` in the `Update summary` dialog. +4. Edit the translation file to add or update translations of the programs' text. Strings that were added since the last translation are displayed in bold and dark blue, and strings you have edited the translations of are marked with a star to the left of their source text in the main list. +5. Save the translation file with the filename `loot.po` in `resources/l10n//LC_MESSAGES/`, where `` is your language's locale code. + +Some languages may use different words or phrases for different contexts where only one word or phrase may be used for all contexts in English. While no contextual information is supplied to translators by default, it can be added on request. To request the addition of contextual information to a text string, create an issue for your request in LOOT's [source code issue tracker](https://github.com/loot/loot/issues), quoting the string for which you are requesting contextual information. + +Some strings to be translated may contain special characters. Different types of special character that may be encountered are: + +* Backslashes (`\`) must be escaped using another backslash, so if you wanted to display a single backslash `\`, you would put `\\` in your translated string. +* Double-quotation marks (`"`) must be preceded by a backslash, ie. `\"`, or LOOT will crash when it tries to display the string. +* Formatting placeholders are used so that LOOT can substitute text or numbers that are generated at runtime into pre-made strings. They appear as a number surrounded by percentage signs, eg. `%1%`. If formatting placeholders are used in the untranslated string, they **must all** be present in the translated string, or LOOT will crash when it tries to display the translated string. Placeholders can be moved around so that the sentence makes grammatical sense in the target language. + +### Adding A New Translation + +If you're adding a new translation, LOOT's source code must be updated to recognise it. You can do this yourself and include the changes in your translation's pull request if you wish. The files and functions which must be updated are given below. + +* In [helpers.h](src/backend/helpers.h), add a constant for the language to the `Language` class, and update `Language::Names()`. +* In [helpers.cpp](src/backend/helpers.cpp), update `Language::Language(const std::string& nameOrCode)` and `Language::Construct(const unsigned int code)`. +* Add constants for the language in [api.h](src/api/api.h) and [api.cpp](src/api/api.cpp). +* In [archive.py](src/archive.py), add the language folder to the inline list on line 68. +* In [installer.nsi](src/installer.nsi), add entries for the language folder to the install and uninstall sections. +* In [LOOT Metadata Syntax.html](docs/LOOT%20Metadata%20Syntax.html), add a row for your language to the Language Codes table. \ No newline at end of file diff --git a/README.md b/README.md index 45f4d919..66f21645 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ Although LOOT is able to calculate the correct load order positions for the vast LOOT is intended to make using mods easier, and mod users should still possess a working knowledge of mod load ordering. See the "Introduction To Load Orders" section of the LOOT readme for an overview. - ## Building LOOT LOOT uses [CMake](http://cmake.org) to generate build files, and requires the following libraries (version numbers used in latest development revision given): @@ -29,15 +28,18 @@ Although LOOT uses a cross-platform build system and cross-platform libraries, i ## Packaging Releases -Installer and zip archive releases for the main LOOT application can be handled by running the scripts `installer.nsi` and `archive.py` in the `src` folder respectively. The installer script requires [Unicode NSIS](http://www.scratchpaper.com/), while the archive script requires [Python](http://www.python.org/). +Installer and zip archive releases for the main LOOT application can be handled by running the scripts `installer.nsi` and `archive.py` in the `src` folder respectively. The installer script requires [NSIS 3](http://nsis.sourceforge.net/), while the archive script requires [Python](http://www.python.org/) (2 or 3). The installer and archive files are created in the `build/` folder, relative to the repository root. -## Adding Translations +If you have [Git for Windows (msysGit)](https://msysgit.github.io/) or [GitHub for Windows](https://windows.github.com/) installed and you're building from a clone of this repository, the archive script will give archives descriptive names using the output of `git describe --tags --long`. If you have [7-Zip](http://7-zip.org) installed, `.7z` archives will be created. Otherwise, archives will be named `LOOT Archive` and created as deflate-compressed zip files. -If a translation for a new language is provided, here's what needs changing to make LOOT use that translation. +## Snapshot Builds -* In [helpers.h](src/backend/helpers.h), add a constant for the language to the `Language` class, and update `Language::Names()`. -* In [helpers.cpp](src/backend/helpers.cpp), update `Language::Language(const std::string& nameOrCode)` and `Language::Construct(const unsigned int code)`. -* Add constants for the language in [api.h](src/api/api.h) and [api.cpp](src/api/api.cpp). -* In [archive.py](src/archive.py), add the language folder to the inline list on line 68. -* In [installer.nsi](src/installer.nsi), add entries for the language folder to the install and uninstall sections. If there's an installer translation, also add its string definitions beside all the other language string definitions, and insert its macro beside all the other language macros. -* The readmes should be updated with a link to the translation in the repository in the main readme, and the language's code in the metadata syntax readme. +Snapshot build archives are made available on [Dropbox](https://www.dropbox.com/sh/scuvwwc6ovzagmd/AAD1TodBAwGQTuV1-4Z2d0sCa?dl=0) fairly regularly. If you can't or don't want to build LOOT yourself, but still want to test a more recent build than the latest release or pre-release, you can check to see if there is such a build available. + +The archives are named in the following manner: + +``` +LOOT [last tagged release]-[number of revisions since last tagged release]-g[first seven characters of the revision ID].7z +``` + +For example `LOOT v0.7.0-alpha-2-10-gf6d7e80.7z` was built using the revision with shortened commit hash `f6d7e80`, which is `10` revisions after the revision tagged `v0.7.0-alpha-2`. diff --git a/docs/LOOT Metadata Syntax.html b/docs/LOOT Metadata Syntax.html index 1d8c0880..f91788fc 100644 --- a/docs/LOOT Metadata Syntax.html +++ b/docs/LOOT Metadata Syntax.html @@ -322,6 +322,24 @@ nav: 0 urllocation list✗An unordered list of locations for this plugin. If the same version can be found at multiple locations, only one location should be recorded. This metadata is not currently used by LOOT. dirtydirty info list✗An unordered list of dirty info structures for this plugin. +

Each plugin must have only one matching non-regex entry. If multiple non-regex entries exist with the same name value, all but the first will be ignored. A plugin may match any number of regex entries though, and their metadata will be merged, with later entries being merged into earlier entries as detailed in the table below. Merging only takes place if both entries have their enabled value set to true (which is the default if unspecified). + + + + +
Key NameMerge Behaviour (merging B into A) +
nameNot merged. +
enabledReplaced but must be `true` anyway. +
priorityReplaced by B's value. +
afterMerged. If A and B both contain an entry with the same name value, B's copy is skipped. +
reqMerged. If A and B both contain an entry with the same name value, B's copy is skipped. +
incMerged. If A and B both contain an entry with the same name value, B's copy is skipped. +
msgMerged. If A and B both contain an entry with the same content string (if there are multiple content strings, the first is checked), then B's copy is skipped. +
tagMerged. If A and B both contain an entry with the same name value, B's copy is skipped, unless one is suggesting the tag for addition and the other is suggesting it for removal, in which case both entries are kept. +
urlCurrently skipped by the parser, so neither A nor B will contain any entries anyway. +
dirtyMerged. If A and B both contain an entry with the same crc value, B's copy is skipped. +
+

Example: name: 'Oscuro''s_Oblivion_Overhaul.esm' req: diff --git a/docs/LOOT Readme.html b/docs/LOOT Readme.html index 6d6d54b2..b1f0ef30 100644 --- a/docs/LOOT Readme.html +++ b/docs/LOOT Readme.html @@ -1,6 +1,7 @@ LOOT Readme + - - - - + + +