Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

build bot in the github, I see one nice project

<< < (7/26) > >>

stahta01:
The only way I have fixed this issue in the past was to either edit the CBP files or place a good zip command in the path.

To place a good zip command in the path; I first removed or rename the bad zip command and then via trial and error added the path to the good zip command to the PATH using the export command.

Those both worked for me over the past few years; but, neither was easy to automate.

Maybe finding the correct location in cbp2make to edit will be a better solution.

Tim S.

Wkerry:
Have you looked at previous forum posts on github actions as per the following thread to see if it has anything useful?
https://forums.codeblocks.org/index.php?topic=24972.0

ollydbg:

--- Quote from: Grit Clef on August 25, 2024, 04:05:13 am ---OK, I will have a try.
Still the same...
I think those commands are from the project files.

--- End quote ---

Correct, those zip command are defined in the cbp files, see the image show below.

But when those command were run from the windows command line (CMD), it works OK.

So, I'm not sure why it works badly under mingw32-make.exe, did you run mingw32-make.exe inside a msys2's mingw64 shell? or a pure CMD shell?

As Tim(stahta01) suggested, I think you have to check which zip executable the mingw32-make.exe was actually calling.

ollydbg:
I think I found the reason why the zip command works badly.

I create a very simple makefile:


--- Code: ---# Define variables
ZIP = xyz\abc.zip
FILES = xyz\a1.txt
ZIP_CMD = zip -jq9 $(ZIP) $(FILES)

# Default target
all: zip

# Zip target
zip:
$(ZIP_CMD)

# Clean target
clean:
del $(ZIP)

# Phony targets to avoid conflicts with files
.PHONY: all zip clean

--- End code ---

Please note that I can run the command "mingw32-make" under the mingw64 shell under msys2, and it works fine.

But if I change the "xyz\a1.txt" to "xyz\*.txt".

It will failed. my guess is that the mingw64 shell will "escape" the "\*" as a special character.

If I change to "FILES = xyz/*.txt", it works OK.

I have tried the zip command inside the mingw64 shell, or I just use the zip command (I mentioned the zip command's link before), all failed if I use the "xyz\*.txt".

Now, I see that "xyz\*.txt" works OK under Windows native command line shell.

So, the solution is: can we call the "mingw32-make.exe" inside the "Windows native CMD"?

stahta01:

--- Quote from: ollydbg on August 27, 2024, 03:04:56 pm ---I think I found the reason why the zip command works badly.

I create a very simple makefile:


--- Code: ---# Define variables
ZIP = xyz\abc.zip
FILES = xyz\a1.txt
ZIP_CMD = zip -jq9 $(ZIP) $(FILES)

# Default target
all: zip

# Zip target
zip:
$(ZIP_CMD)

# Clean target
clean:
del $(ZIP)

# Phony targets to avoid conflicts with files
.PHONY: all zip clean

--- End code ---

Please note that I can run the command "mingw32-make" under the mingw64 shell under msys2, and it works fine.

But if I change the "xyz\a1.txt" to "xyz\*.txt".

It will failed. my guess is that the mingw64 shell will "escape" the "\*" as a special character.

If I change to "FILES = xyz/*.txt", it works OK.

I have tried the zip command inside the mingw64 shell, or I just use the zip command (I mentioned the zip command's link before), all failed if I use the "xyz\*.txt".

Now, I see that "xyz\*.txt" works OK under Windows native command line shell.

So, the solution is: can we call the "mingw32-make.exe" inside the "Windows native CMD"?

--- End quote ---

You might try the normal make like this.


--- Code: ---MSYS2_ARG_CONV_EXCL=* make
--- End code ---

NOTE: The "*" star might need double or single quotes around it. This option is supposed to turn off file handling magic.

See https://www.msys2.org/docs/filesystem-paths/

Tim S.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version