purebasic icon indicating copy to clipboard operation
purebasic copied to clipboard

UnxUtils in Win SDK README

Open tajmone opened this issue 3 years ago • 0 comments

In the installation folder of PB for Windows I've come across this file:

  • C:\Program Files\PureBasic\SDK\VisualC\ReadMe.txt

(not part of this repository, as far as I can tell)

It's contents:

To compile these examples, you will need:

1) VisualC++ Express edition, if possible the 2010 edition as it's the current one used by PureBasic libraries (fully free, also for commercial application)
2) Unix tools for Windows (UnxUtils) in the PATH, to have the 'make' program. They can be found here: http://unxutils.sourceforge.net/
2.1) Install the update from UnxUtils : http://unxutils.sourceforge.net/UnxUpdates.zip
3) Modify the 'PureLibraries.cmd' file to set the correct environment variables (use a PureBasic path without spaces, or it won't work. Don't put double quotes around paths).
4) Launch 'PureLibraries.cmd' and type 'make' in the directories with a makefile and all should be compiled correctly.
   The resulting purelibrary is automatically copied in your PureBasic\PureLibraries\UserLibraries\ drawer.
5) Open the .c/.h files to see how it works, as they are fully commented

So ... UnxUtils is back!

The problem with these (Jurassic) tools has been amply discussed in Issue #30, and @ChrisRfr even create an ad hoc collection of the required GNU tools using up to date binaries.

Beside the fact that the UnxUtils from SourceForge don't include the required license files, they are really old (many tools don't work anymore), probably unsafe to use, and some of these tools would override native Windows CMD commands if the user simply adds them to the sys PATH.

After many years of engaging in a battle against the *nix and open source world, Microsoft as finally radically changed direction, so much so that today Windows has a native Bash, WSL and WSL2 (which relies on a real Linux Kernel that ships natively with Win 10) ... Shouldn't the PB docs direct Win users toward these tools, instead of old ones (and now unsafe) like UnxUtils?

P.S. — the word "drawer" should be replaced with "folder" in:

  The resulting purelibrary is automatically copied in your
  PureBasic\PureLibraries\UserLibraries\ drawer.

tajmone avatar Feb 22 '21 23:02 tajmone