Fixes some issue on MinGW
(Windows) 🪛
#39
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's Changed
\n
) inMakefile
withecho ""
. (457a3f2)cleanbin
rule inMakefile
. (1666711)make
. (a868ad9)Description
The messages which printed by
make
is always prints the\n
as text instead treating it as a newline character on Windows with Git Bash and MinGW installed. On my device (Linux), it works well but if I'm using-e
flag it would just prints the given flag.@echo -e "some message" # Output: e some message
So to make it fair, I've changed the newline with the implicit one (print a blank message with
echo
).More details, see below:
jmatrix/Makefile
Lines 96 to 102 in 457a3f2
Besides that, there's some issue that the
javac
command unable to compile, because the given source files list (sourceFiles.lst
) has Windows file separator (\
).In that case,
javac
treats it as flag then raise an errorinvalid flag: "\"
.Once again, this issue only occur on Windows system.
So, I've once again changed the newline character from
os.sep
(based on operating system) to Unix-based separator (/
). See below:jmatrix/src/main/python/generate_list.py
Lines 22 to 26 in a868ad9
And also instead using command based on operating system (that would cause an error when using Git Bash), the command to retrieve the sources and classes files now uses Unix command (which supports Git Bash) both Windows and Unix system.
jmatrix/src/main/python/generate_list.py
Lines 126 to 132 in a868ad9
Also I've encountered some issue with the output message that given by command
java -jar "path/to/jmatrix.jar" -V
, and this only occurred when usingmake
to build the project (on Windows with MinGW installed).So here I've fixed it by adding
strip()
method after retrieving the config onconfig.xml
(theconfig.xml
itself is generated by Python program).jmatrix/src/main/java/com/mitsuki/jmatrix/util/XMLParser.java
Lines 145 to 150 in 37dd3b5
Summary
All of bugs and issues above only occurred on Windows operating system. And now it has been fixed and tested on Windows 10 with Git Bash as shell environment and MinGW installed.