|
25 | 25 | It is a few primary components:
|
26 | 26 |
|
27 | 27 | - This is a set of patches, mostly for [gnulib](repo_notes/gnulib_README.md), to increase compatibility with windows systems.
|
28 |
| -- A common bash script helper (helpers*.sh) and short template file for easily compiling gnulib and non-gnulib linux apps. The focus is on moving as much duplicate code to the helper includes rather than in each build script. |
29 |
| -- A bash script that uses the above helper lib to compile a variety of common *nix tools for details on changes for each: [tar](repo_notes/tar_README.md), [grep](repo_notes/grep_README.md), [gzip](repo_notes/gzip_README.md), [pcre2](repo_notes/pcre2_README.md), [zstd](repo_notes/zstd_README.md), [coreutils](repo_notes/coreutils_README.md), [findutils](repo_notes/findutils_README.md), [diffutils](repo_notes/diffutils_README.md), [which](repo_notes/which_README.md), [sed](repo_notes/sed_README.md), [openssl](repo_notes/openssl_README.md), [wget](repo_notes/wget_README.md), [highlight](repo_notes/highlight_README.md), [patch](repo_notes/patch_README.md), [make](repo_notes/make_README.md), [automake](repo_notes/automake_README.md), [symlinks](repo_notes/symlinks_README.md), [wget2](repo_notes/wget2_README.md), [pdcurses](repo_notes/pdcurses.md), [libhsts](repo_notes/hsts_README.md), [wolfCrypt](repo_notes/wolfcrypt_README.md). Also, WIP: [bash](repo_notes/bash_README.md). |
| 28 | +- A common bash script helper (helpers*.sh) and short template file for easily compiling gnulib and non-gnulib linux apps. The focus is on moving as much duplicate code to the helper includes rather than in each build script. This includes several debug/trace tools and make/cmake/nmake wrappers. |
| 29 | +- A bash script that uses the above helper lib to compile a variety of common *nix tools for details on changes for each: [tar](repo_notes/tar_README.md), [grep](repo_notes/grep_README.md), [gzip](repo_notes/gzip_README.md), [pcre2](repo_notes/pcre2_README.md), [zstd](repo_notes/zstd_README.md), [coreutils](repo_notes/coreutils_README.md), [findutils](repo_notes/findutils_README.md), [diffutils](repo_notes/diffutils_README.md), [which](repo_notes/which_README.md), [sed](repo_notes/sed_README.md), [openssl](repo_notes/openssl_README.md), [wget](repo_notes/wget_README.md), [highlight](repo_notes/highlight_README.md), [patch](repo_notes/patch_README.md), [make](repo_notes/make_README.md), [automake](repo_notes/automake_README.md), [symlinks](repo_notes/symlinks_README.md), [wget2](repo_notes/wget2_README.md), [pdcurses](repo_notes/pdcurses.md), [libhsts](repo_notes/hsts_README.md), [wolfCrypt](repo_notes/wolfcrypt_README.md), [awk](repo_notes/awk_README.md), [gawk](repo_notes/gawk_README.md), [zlib](repo_notes/zlib_README.md). Also, WIP: [bash](repo_notes/bash_README.md). |
30 | 30 | - A tool to generate a basic Visual Studio debug project to debug the target, if you can't run the binary in the debugger you can add `launchdebugger()` to the code run from the CLI and will get the normal JIT prompt. Note due to how the debugger launch works it may better to do a bit earlier than needed (or in the main launch). If the code you want to debug into is part of a library then you need to remove that code from the library (and add to your MSVC project) or build that library in MSVC. The VS project comes with `debug.h` and `debug.c` that includes a basic console/file logger.
|
31 | 31 | - Easy build flags to compile debug versions of all the libraries and the project itself with MSVC edit and continue support (without needing them all in a VS project)
|
32 | 32 | - Minimal changes to each target to make it work, to reduce maintenance requirements as the code changes. For some of these projects we throw additional gnulib modules at it that seem to fix the problems, there may be easier ways but this does result in minimal changes to the native code base.
|
| 33 | +- Build entire projects in Windows native debug mode for full VS debugging and symbols |
| 34 | +- Logging of build process to create a batch file (.bat) to be able to build most projects without any subsystem at all |
33 | 35 | - Github actions produces **Windows binaries** for download. You can find these under the [](https://github.com/mitchcapper/WIN64LinuxBuild/actions/workflows/tool_builds.yml) workflows, click on a successful one and then the downloads can be found under Artifacts on that page. Note: you must be signed into github to see the artifacts produced.
|
34 | 36 |
|
35 | 37 | # Warnings
|
@@ -68,6 +70,7 @@ Almost all config is done through the default_config.ini and overriding those se
|
68 | 70 | - WLB_BASE_FOLDER - The base folder for compiles
|
69 | 71 | - WLB_SCRIPT_FOLDER - The checkout folder for this repo, most of the time we can get this from the executing script but a few bat files use it to be able to work with absolute paths
|
70 | 72 | - MSYS_PATH - Path to your msys install used by the shell launcher scripts not required can edit them if you have non-default path.
|
| 73 | +- You can override any setting using ENV variables as well, for example to enable debug building rather than editing the build script you can do `export BLD_CONFIG_BUILD_DEBUG=1` |
71 | 74 |
|
72 | 75 | ## Shell Launch
|
73 | 76 |
|
@@ -99,6 +102,9 @@ Most of the work here as not done by me and there are some great resources out t
|
99 | 102 | - For paths try to use a path form that is compatible with both native msys binaries and windows binaries. This form is "c:/path/to/item" using forward slashes means works for both platforms and while normal msys autocompleting for paths is /c/path/to/item (no colon and leading slash) all tools seem to understand the "c:/path/to/item" form, in addition this is a valid windows path format so no conversion is needed.
|
100 | 103 | - Even for non gnulib based tools using the gnulib build-aux comple/ar-lib wrappers that convert native gcc/ar commands to the MSVC equivalents is often enough to make many libraries work.
|
101 | 104 | - It is possible to use msys to generate build batch files for Windows. The helper scripts have a "log_make" function that can be called before the actual make command and will log the make sequence to a file.
|
| 105 | +- Non-makefile based builds (cmake etc) are a bit overcomplicated using wrapper scripts (or for cmake entire other build processes) to be able to capture the build commands and generate build .bat files. This is often not needed and is more prone to breaking. To prevent this set the best cmake style var to "vs" and any `BLD_CONFIG_BUILD_WINDOWS_COMPILE_WRAPPERS` set to 1 are set to 0. |
| 106 | +- To build debug builds set the env var `BLD_CONFIG_BUILD_DEBUG=1` |
| 107 | +- To generate batch files for building without msys run the build script with the arg "log_full". Note you likely need some generated files (like config.h) so these would need to be added along with the normal sources. |
102 | 108 |
|
103 | 109 | ## Why don't you add these patches upstream?
|
104 | 110 |
|
|
0 commit comments