Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically locate Make for Windows (build script) #245

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

blake502
Copy link

Intended to simplify the updated build documentation for Windows (PR #241), I've added a feature to the Windows build script.

This feature automatically locates make.exe from either:

  1. The Path Environment Variable
  2. The default install location for Make for Windows (C:\Program Files (x86)\GnuWin32\bin)

This works by running make -v (a version check command for make) then checking whether the %errorlevel% variable is equal to 9009 (which is the error code for MSG_DIR_BAD_COMMAND_OR_FILE, signifying that make is not found from the system path)

If make is not found from simply running make -v, then the script attempts to run C:\Program Files (x86)\GnuWin32\bin\make.exe -v, and checks for the same error 9009. If make is still not found, the build script aborts.

If this is accepted, the updated build documentation in PR #241 could be simplified to remove the requirement to manually add Make to the system path.

I understand that this may not be the most elegant solution-- But I feel it would be better to add a small amount of complexity to the build script for the sake of greatly simplifying the build documentation.

@blake502 blake502 mentioned this pull request Sep 15, 2024
@blake502
Copy link
Author

Example

Make found in Path:

image

Make found in default install location:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant