Author Topic: Code::Blocks and MinGW  (Read 5858 times)

Offline connexion2000

  • Multiple posting newcomer
  • *
  • Posts: 13
Code::Blocks and MinGW
« on: August 05, 2007, 04:48:23 pm »
Hi!
How does Code::Blocks detect MinGW?
I am asking because I have installed MinGW on my system, but Code::Blocks didn't detec it.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Code::Blocks and MinGW
« Reply #1 on: August 05, 2007, 05:20:34 pm »
I do not think the detection part works for MinGW.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Code::Blocks and MinGW
« Reply #2 on: August 05, 2007, 06:12:47 pm »
I do not think the detection part works for MinGW.

It works for some standard installation dirs. But it does not work if you use any non-standard path.
Be a part of the solution, not a part of the problem.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Code::Blocks and MinGW
« Reply #3 on: August 06, 2007, 09:13:11 am »
The present code includes querying the registry as well as looking in "standard" places. Thus, non-"standard" places should work too, if the installer was used.

However, it is of course always possible that the MinGW installer is changed and we don't know :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline connexion2000

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: Code::Blocks and MinGW
« Reply #4 on: August 06, 2007, 09:24:05 am »
MinGW 5.1.3 installer was used. It's quite new. What registry keys does it look for?

Offline raph

  • Almost regular
  • **
  • Posts: 242
Re: Code::Blocks and MinGW
« Reply #5 on: August 06, 2007, 02:19:47 pm »
It looks in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall for a key starting with "Minimalist GNU for Windows" and reads the value of "InstallLocation".

Offline connexion2000

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: Code::Blocks and MinGW
« Reply #6 on: August 06, 2007, 06:12:04 pm »
Now it is: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall with a key "MinGW"

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: Code::Blocks and MinGW
« Reply #7 on: August 10, 2007, 02:17:02 pm »
An improvement could be to look in directories pointed by the PATH environment variable (at least on Windows) for the standard MinGW binaries.
I guess there must be equivalent on other OSs.

Dje

Offline raph

  • Almost regular
  • **
  • Posts: 242
Re: Code::Blocks and MinGW
« Reply #8 on: August 10, 2007, 06:34:11 pm »
An improvement could be to look in directories pointed by the PATH environment variable (at least on Windows) for the standard MinGW binaries.
Good idea. I've just submitted a patch.