diff --git a/project/Build.xml b/project/Build.xml index 51c641a58..f210e6f89 100644 --- a/project/Build.xml +++ b/project/Build.xml @@ -62,11 +62,11 @@
- - - - - + + + + + @@ -137,7 +137,7 @@
- + @@ -165,7 +165,7 @@
- + @@ -199,7 +199,7 @@
- + diff --git a/project/README.md b/project/README.md index 77a34fad5..5494fee70 100644 --- a/project/README.md +++ b/project/README.md @@ -57,19 +57,12 @@ Common problems and their solutions: See also [submodule troubleshooting](#submodule-troubleshooting). ## Submodule projects -Lime includes code from several other C/C++ libraries, each of which is treated as a [submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules). For more details about the libraries, see [lib/README.md](lib/README.md). +Lime includes code from several other C/C++ libraries, each of which is treated as a [submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules). For more information on the individual libraries, see [lib/README.md](lib/README.md). -### Overrides -The [overrides folder](lib/overrides) contains a number of customized headers and source files, to be used instead of the equivalent file(s) in the submodule. +### Custom headers and source files +All submodules are used as-is, meaning Lime never modifies the contents of the submodule folder. When Lime needs to modify or add a file, the file goes in [lib/custom](lib/custom). -Caution: overridden files require extra maintenance. Avoid overriding if possible, and instead use `-D` flags to make the customizations you need. - -When overriding a header, always include the overrides folder first. - -```xml - - -``` +Caution: overriding a file requires extra maintenance. Always try to find a different solution first. lib/custom should contain as few files as possible. ### Updating a submodule Submodules are Git repositories in their own right, and are typically kept in "detached HEAD" state. Lime never modifies its submodules directly, but instead changes which commit the HEAD points to. @@ -92,7 +85,7 @@ To update to a more recent version of a submodule: 6. If you exit the submodule and run `git status`, you'll find an unstaged change representing the update. Once you [finish testing](#rebuilding), you can commit this change and submit it as a pull request. ### Submodule troubleshooting -Here are some problems you might run into while attempting to build these submodules, and their solutions. +Here are some submodule-specific problems you might run into while rebuilding. - All submodules are empty: @@ -101,24 +94,32 @@ Here are some problems you might run into while attempting to build these submod git submodule update ``` +- Rebuilding fails after `git pull`, and `git status` reports changes to the submodules: + + ```bash + git submodule update + ``` + - The project is missing a crucial header file, or has `[header].h.in` instead of the header you need: 1. Look for an `autogen.sh` file. If it exists, run it. (On Windows, you may need [WSL](https://docs.microsoft.com/en-us/windows/wsl/about), or you might be able to find a .bat file that does what you need.) 2. If step 1 fails, look for instructions on how to configure the project. This will often involving using `make`, `cmake`, and/or `./configure`. (Again, Windows users may need WSL.) - 3. One of the above steps should hopefully generate the missing header. Place the generated file inside [the overrides folder](#overrides). + 3. One of the above steps should hopefully generate the missing header. Place the generated file inside [the custom folder](#custom-headers-and-source-files). -- The compiler ignores a header in the overrides folder: +- The compiler uses the submodule's original header instead of Lime's custom header: - 1. Make sure the overrides folder is included first. + 1. Make sure the custom folder is included first. ```xml - + ``` - 2. If the header is in the same directory as the corresponding source files, find a different option. You simply can't override headers in that case. Instead, try setting compiler flags to make the changes you need. + 2. If the header is in the same directory as the corresponding source files, you cannot override it. Try setting compiler flags to get the result you want, or look for a different file to override. ```xml ``` + + 3. Approach the problem from a different angle. Upgrade or downgrade the submodule, or open an issue. diff --git a/project/lib/cairo-files.xml b/project/lib/cairo-files.xml index d0df3c510..ea7fca76f 100644 --- a/project/lib/cairo-files.xml +++ b/project/lib/cairo-files.xml @@ -2,17 +2,17 @@ - - - - - + + + + + - + - + diff --git a/project/lib/curl-files.xml b/project/lib/curl-files.xml index b96aed508..5e01a10fe 100644 --- a/project/lib/curl-files.xml +++ b/project/lib/curl-files.xml @@ -2,7 +2,7 @@ - + @@ -17,7 +17,7 @@ - + diff --git a/project/lib/overrides/cairo/configs/default/config.h b/project/lib/custom/cairo/configs/default/config.h similarity index 100% rename from project/lib/overrides/cairo/configs/default/config.h rename to project/lib/custom/cairo/configs/default/config.h diff --git a/project/lib/overrides/cairo/configs/linux/config.h b/project/lib/custom/cairo/configs/linux/config.h similarity index 100% rename from project/lib/overrides/cairo/configs/linux/config.h rename to project/lib/custom/cairo/configs/linux/config.h diff --git a/project/lib/overrides/cairo/configs/mac/config.h b/project/lib/custom/cairo/configs/mac/config.h similarity index 100% rename from project/lib/overrides/cairo/configs/mac/config.h rename to project/lib/custom/cairo/configs/mac/config.h diff --git a/project/lib/overrides/cairo/configs/windows/config.h b/project/lib/custom/cairo/configs/windows/config.h similarity index 100% rename from project/lib/overrides/cairo/configs/windows/config.h rename to project/lib/custom/cairo/configs/windows/config.h diff --git a/project/lib/overrides/cairo/src/cairo-features.h b/project/lib/custom/cairo/src/cairo-features.h similarity index 100% rename from project/lib/overrides/cairo/src/cairo-features.h rename to project/lib/custom/cairo/src/cairo-features.h diff --git a/project/lib/overrides/curl/lib/curl_config.h b/project/lib/custom/curl/lib/curl_config.h similarity index 100% rename from project/lib/overrides/curl/lib/curl_config.h rename to project/lib/custom/curl/lib/curl_config.h diff --git a/project/lib/overrides/freetype/include/freetype/config/ftoption.h b/project/lib/custom/freetype/include/freetype/config/ftoption.h similarity index 100% rename from project/lib/overrides/freetype/include/freetype/config/ftoption.h rename to project/lib/custom/freetype/include/freetype/config/ftoption.h diff --git a/project/lib/overrides/freetype/include/ft2build.h b/project/lib/custom/freetype/include/ft2build.h similarity index 100% rename from project/lib/overrides/freetype/include/ft2build.h rename to project/lib/custom/freetype/include/ft2build.h diff --git a/project/lib/overrides/jpeg/jconfig.h b/project/lib/custom/jpeg/jconfig.h similarity index 100% rename from project/lib/overrides/jpeg/jconfig.h rename to project/lib/custom/jpeg/jconfig.h diff --git a/project/lib/overrides/jpeg/jconfigint.h b/project/lib/custom/jpeg/jconfigint.h similarity index 100% rename from project/lib/overrides/jpeg/jconfigint.h rename to project/lib/custom/jpeg/jconfigint.h diff --git a/project/lib/overrides/jpeg/jversion.h b/project/lib/custom/jpeg/jversion.h similarity index 100% rename from project/lib/overrides/jpeg/jversion.h rename to project/lib/custom/jpeg/jversion.h diff --git a/project/lib/overrides/ogg/include/ogg/config_types.h b/project/lib/custom/ogg/include/ogg/config_types.h similarity index 100% rename from project/lib/overrides/ogg/include/ogg/config_types.h rename to project/lib/custom/ogg/include/ogg/config_types.h diff --git a/project/lib/overrides/openal/alc/hrtf_default.h b/project/lib/custom/openal/alc/hrtf_default.h similarity index 100% rename from project/lib/overrides/openal/alc/hrtf_default.h rename to project/lib/custom/openal/alc/hrtf_default.h diff --git a/project/lib/overrides/openal/build/bsinc_inc.h b/project/lib/custom/openal/build/bsinc_inc.h similarity index 100% rename from project/lib/overrides/openal/build/bsinc_inc.h rename to project/lib/custom/openal/build/bsinc_inc.h diff --git a/project/lib/overrides/openal/build/default-44100.mhr.h b/project/lib/custom/openal/build/default-44100.mhr.h similarity index 100% rename from project/lib/overrides/openal/build/default-44100.mhr.h rename to project/lib/custom/openal/build/default-44100.mhr.h diff --git a/project/lib/overrides/openal/build/default-48000.mhr.h b/project/lib/custom/openal/build/default-48000.mhr.h similarity index 100% rename from project/lib/overrides/openal/build/default-48000.mhr.h rename to project/lib/custom/openal/build/default-48000.mhr.h diff --git a/project/lib/overrides/openal/build/version.h b/project/lib/custom/openal/build/version.h similarity index 100% rename from project/lib/overrides/openal/build/version.h rename to project/lib/custom/openal/build/version.h diff --git a/project/lib/overrides/openal/include/config-android.h b/project/lib/custom/openal/include/config-android.h similarity index 100% rename from project/lib/overrides/openal/include/config-android.h rename to project/lib/custom/openal/include/config-android.h diff --git a/project/lib/overrides/openal/include/config-linux-x86_64.h b/project/lib/custom/openal/include/config-linux-x86_64.h similarity index 100% rename from project/lib/overrides/openal/include/config-linux-x86_64.h rename to project/lib/custom/openal/include/config-linux-x86_64.h diff --git a/project/lib/overrides/openal/include/config-macos-x86_64.h b/project/lib/custom/openal/include/config-macos-x86_64.h similarity index 100% rename from project/lib/overrides/openal/include/config-macos-x86_64.h rename to project/lib/custom/openal/include/config-macos-x86_64.h diff --git a/project/lib/overrides/openal/include/config-windows-x86.h b/project/lib/custom/openal/include/config-windows-x86.h similarity index 100% rename from project/lib/overrides/openal/include/config-windows-x86.h rename to project/lib/custom/openal/include/config-windows-x86.h diff --git a/project/lib/overrides/openal/include/config-windows-x86_64.h b/project/lib/custom/openal/include/config-windows-x86_64.h similarity index 100% rename from project/lib/overrides/openal/include/config-windows-x86_64.h rename to project/lib/custom/openal/include/config-windows-x86_64.h diff --git a/project/lib/overrides/openal/include/config.h b/project/lib/custom/openal/include/config.h similarity index 100% rename from project/lib/overrides/openal/include/config.h rename to project/lib/custom/openal/include/config.h diff --git a/project/lib/overrides/pixman/config.h b/project/lib/custom/pixman/config.h similarity index 100% rename from project/lib/overrides/pixman/config.h rename to project/lib/custom/pixman/config.h diff --git a/project/lib/overrides/pixman/pixman/pixman-version.h b/project/lib/custom/pixman/pixman/pixman-version.h similarity index 100% rename from project/lib/overrides/pixman/pixman/pixman-version.h rename to project/lib/custom/pixman/pixman/pixman-version.h diff --git a/project/lib/overrides/png/pnglibconf.h b/project/lib/custom/png/pnglibconf.h similarity index 100% rename from project/lib/overrides/png/pnglibconf.h rename to project/lib/custom/png/pnglibconf.h diff --git a/project/lib/overrides/sdl/include/SDL2/SDL.h b/project/lib/custom/sdl/include/SDL2/SDL.h similarity index 100% rename from project/lib/overrides/sdl/include/SDL2/SDL.h rename to project/lib/custom/sdl/include/SDL2/SDL.h diff --git a/project/lib/overrides/sdl/include/SDL_config.h b/project/lib/custom/sdl/include/SDL_config.h similarity index 100% rename from project/lib/overrides/sdl/include/SDL_config.h rename to project/lib/custom/sdl/include/SDL_config.h diff --git a/project/lib/overrides/sdl/include/SDL_config_linux.h b/project/lib/custom/sdl/include/SDL_config_linux.h similarity index 100% rename from project/lib/overrides/sdl/include/SDL_config_linux.h rename to project/lib/custom/sdl/include/SDL_config_linux.h diff --git a/project/lib/overrides/sdl/include/SDL_config_macosx.h b/project/lib/custom/sdl/include/SDL_config_macosx.h similarity index 100% rename from project/lib/overrides/sdl/include/SDL_config_macosx.h rename to project/lib/custom/sdl/include/SDL_config_macosx.h diff --git a/project/lib/overrides/sdl/include/SDL_config_rpi.h b/project/lib/custom/sdl/include/SDL_config_rpi.h similarity index 100% rename from project/lib/overrides/sdl/include/SDL_config_rpi.h rename to project/lib/custom/sdl/include/SDL_config_rpi.h diff --git a/project/lib/overrides/sdl/include/SDL_config_windows.h b/project/lib/custom/sdl/include/SDL_config_windows.h similarity index 100% rename from project/lib/overrides/sdl/include/SDL_config_windows.h rename to project/lib/custom/sdl/include/SDL_config_windows.h diff --git a/project/lib/freetype-files.xml b/project/lib/freetype-files.xml index 8f73536b4..c9e9e69e5 100644 --- a/project/lib/freetype-files.xml +++ b/project/lib/freetype-files.xml @@ -5,7 +5,7 @@ - + @@ -50,7 +50,7 @@ - + @@ -60,7 +60,7 @@ - + @@ -68,7 +68,7 @@ - + diff --git a/project/lib/jpeg-files.xml b/project/lib/jpeg-files.xml index 9e314f478..d3acadd5c 100644 --- a/project/lib/jpeg-files.xml +++ b/project/lib/jpeg-files.xml @@ -6,13 +6,13 @@ - + - - + + @@ -20,7 +20,7 @@ - + diff --git a/project/lib/ogg-files.xml b/project/lib/ogg-files.xml index efe4b2fe4..27fc90b8b 100644 --- a/project/lib/ogg-files.xml +++ b/project/lib/ogg-files.xml @@ -1,14 +1,14 @@ - + - + diff --git a/project/lib/openal-files.xml b/project/lib/openal-files.xml index e6784e76e..552fd8006 100644 --- a/project/lib/openal-files.xml +++ b/project/lib/openal-files.xml @@ -3,11 +3,11 @@ - + - + - + @@ -77,7 +77,7 @@
- + diff --git a/project/lib/pixman-files.xml b/project/lib/pixman-files.xml index 6bf43ba7e..097209153 100644 --- a/project/lib/pixman-files.xml +++ b/project/lib/pixman-files.xml @@ -9,8 +9,8 @@ - - + + diff --git a/project/lib/png-files.xml b/project/lib/png-files.xml index 3e1ebcab6..1f95110cf 100644 --- a/project/lib/png-files.xml +++ b/project/lib/png-files.xml @@ -9,7 +9,7 @@ - + @@ -18,7 +18,7 @@ - + diff --git a/project/lib/sdl-files.xml b/project/lib/sdl-files.xml index 04cd24bc7..74ec5e9a0 100644 --- a/project/lib/sdl-files.xml +++ b/project/lib/sdl-files.xml @@ -12,10 +12,10 @@ - + - + @@ -96,7 +96,7 @@ - + diff --git a/project/lib/vorbis-files.xml b/project/lib/vorbis-files.xml index 50fe69fd8..38519189f 100644 --- a/project/lib/vorbis-files.xml +++ b/project/lib/vorbis-files.xml @@ -13,7 +13,7 @@ - + @@ -39,7 +39,7 @@ - +