ps2dev / ps2sdk-ports

Ports of useful libraries to PS2SDK
Other
107 stars 43 forks source link

Added script for compiling MINGW32 cmake based ports #63

Closed AKuHAK closed 3 years ago

AKuHAK commented 3 years ago

Fix zlib to always use libz.a instead of libzlib.a

AKuHAK commented 3 years ago

@ps2dev Commit f10cd50 is not the best solution that I found, but I didn't found a solution on how to use if-else statements inside the bash function. MINGW32 CMake-based projects need to use mingw32-make instead of make and don't support multithreading. And CMake needs -G "MinGW Makefiles" flag. so I just created an alternative bash script for that purpose. If someone knows how to improve this solution, you can fix my PR.

Also romfs port doesn't compile in MINGW32.

rickgaiser commented 3 years ago

Instead of using make and mingw32-make isn't it possible to use $(MAKE) instead? Optional parameters are also used in other scripts, for instance something like this:

if [ ${OSVER:0:5} == MINGW ]; then
    XTRA_OPTS=-G "MinGW Makefiles"
fi

I would prefer to keep this all in one script, since they are 90% the same.

AKuHAK commented 3 years ago

@rickgaiser yes $(MAKE) will solve the problem, but I was not able to get it to work. If I check OSVER and define MAKE=mingw32-make this just doesn't work. for unknown reason if-else didn't work in this bash script - I didn't found the reason why.

    XTRA_OPTS=-G "MinGW Makefiles"

this also will not work - when I define variable in such way, everything after space character is cut off: it will be like -G "MinGW and produces an error.

AKuHAK commented 3 years ago

@rickgaiser with some tricky solutions, now it is working fine in all compatible environments. For now it is only needed to fix romfs and this PR can be merged.

AKuHAK commented 3 years ago

Everything is fixed, hope can be merged now. Will check multicore again

rickgaiser commented 3 years ago

If you're ready I'll pull the PR?

fjtrujy commented 3 years ago

I see it ready as well. You can merge @rickgaiser if @AKuHAK says it is ok. Thanks

AKuHAK commented 3 years ago

Yes, it is ok now, you can merge it, it is supporting multicore.

rickgaiser commented 3 years ago

Merged, thanks for supporting Windows @AKuHAK !