Skip to content

Commit bb838ce

Browse files
committed
More details on debug, several additional script additions, disclaimer about cmake etc complications to just supportl ogging.
1 parent ee8bded commit bb838ce

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@
2525
It is a few primary components:
2626

2727
- 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).
3030
- 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.
3131
- 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)
3232
- 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
3335
- Github actions produces **Windows binaries** for download. You can find these under the [![Tool Builds](https://github.com/mitchcapper/WIN64LinuxBuild/actions/workflows/tool_builds.yml/badge.svg)](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.
3436

3537
# Warnings
@@ -68,6 +70,7 @@ Almost all config is done through the default_config.ini and overriding those se
6870
- WLB_BASE_FOLDER - The base folder for compiles
6971
- 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
7072
- 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`
7174

7275
## Shell Launch
7376

@@ -99,6 +102,9 @@ Most of the work here as not done by me and there are some great resources out t
99102
- 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.
100103
- 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.
101104
- 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.
102108

103109
## Why don't you add these patches upstream?
104110

repo_notes/gawk_README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# gawk
2+
3+
[Original Source](https://git.savannah.gnu.org/git/gawk.git) | [Changes](https://github.com/mitchcapper/gawk/compare/master...win32_enhancements)
4+
5+
- Remove much of the "pc/Win32" specific code opting to use the more updated gnulib code
6+
- Add GNULIB proper to project to pull in more modules (makefiles adjusted to accommodate)
7+
- minor other windows fixes
8+
- Dynamic extension fixes for windows
9+
- Builds in shared mode always to support dynamic extension loading

repo_notes/tar_README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# tar
22

3-
While the changes are only #defined for windows, the spawn code should work for all platforms. Did not go through and rewrite grandchild handlers for Windows, but those could also be done if needed.
3+
While the changes are only #defined for windows, the spawn code should work for all platforms. Did not go through and rewrite grandchild handlers for Windows, but those could also be done if needed. Doing an stdin and stdout with external compressor seems to require this (normal external compressor usage does work).
44

55
[Original Source](https://www.gnu.org/software/tar/) | [Changes](https://github.com/mitchcapper/tar/compare/master...win32_enhancements)
66

77
- Standard GNULIB patches
88
- Disable some permission settings that don't apply
99
- Largest changes to change fork code over to gnulib execute/spawnp library
1010
- Fixed symbolic links to work properly in create, extract, compare on windows
11+
- minor paxutils [Changes](https://github.com/mitchcapper/paxutils/compare/master...win32_enhancements)

repo_notes/zlib_README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# zlib
2+
3+
4+
5+
[Original Source](https://github.com/madler/zlib) | [Changes](https://github.com/mitchcapper/zlib/compare/develop...win32_enhancements)
6+
7+
- Ability to do shared library builds with static
8+
9+

0 commit comments

Comments
 (0)