Author Topic: CodeBlocks and Compiler  (Read 12330 times)

Offline JustinThyme

  • Single posting newcomer
  • *
  • Posts: 7
    • http://
CodeBlocks and Compiler
« on: January 31, 2005, 02:54:12 am »
Mandrav, thanks for the release!  I've got it downloaded, but haven't installed it yet.

With some of the threads in the Troubleshooting forum, have you ever considered prepackaging CodeBlocks with MinGW?  I believe it's still essential to have compatibility with other compilers, but for the average Joe, perhaps a fallback compiler which is preconfig'd with the IDE might make getting up and running easier.  Dev-C++ and Visual MinGW do this.

Just a thought...but it may make things easier for you in the long run.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
CodeBlocks and Compiler
« Reply #1 on: January 31, 2005, 08:55:27 am »
Yes, I 've thought about it. This is my last attempt at "avoiding" including a compiler ;)
With the auto-detection feature and the really simple (I believe) instructions included, it should be a breeze to install any of the supported compilers.

Yiannis.
Be patient!
This bug will be fixed soon...

Offline JustinThyme

  • Single posting newcomer
  • *
  • Posts: 7
    • http://
CodeBlocks and Compiler
« Reply #2 on: February 01, 2005, 06:37:32 am »
I saw your poll on the front page.  Did I open a can 'o worms? :oops:

I think your primary direction with plugin configuration is the best long term solution.  I just thought that while getting things up and running, perhaps an optional IDE/compiler packaging in addition to the IDE only might make things easier for you.

BTW, since it probably doesn't get said often enough, thanks.  Thanks for all your work. 8)

Offline JustinThyme

  • Single posting newcomer
  • *
  • Posts: 7
    • http://
CodeBlocks and Compiler
« Reply #3 on: February 08, 2005, 02:15:55 am »
Mandrav, I noticed something regarding the configuration for MinGW.

It appears that CB doesn't actually detect the specific install of MinGW, it just assumes the defaults.  Being organizationally AR on my PC, I installed MinGW into C:\Programming\MinGW, instead of the default C:\MinGW.  When I went to doublecheck config, it showed C:\MinGW as my MinGW location.

If on install it's possible to scan the registry and preconfigure all the compiler options from actual install info, that may ease some of the problems.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
CodeBlocks and Compiler
« Reply #4 on: February 08, 2005, 09:25:01 am »
Quote from: JustinThyme
It appears that CB doesn't actually detect the specific install of MinGW, it just assumes the defaults.  Being organizationally AR on my PC, I installed MinGW into C:\Programming\MinGW, instead of the default C:\MinGW.  When I went to doublecheck config, it showed C:\MinGW as my MinGW location.

It's not assuming the defaults. As far as I know, MinGW installation does not write anything to the registry, it only creates a "INI" file (c:\windows\mingw.ini) which contains the installation path. This is what CB searches for...
Quote from: JustinThyme
If on install it's possible to scan the registry and preconfigure all the compiler options from actual install info, that may ease some of the problems.

If you know of a registry key for MinGW, please tell me about it :)

Yiannis.

PS1: Did you click on "Auto-detect" button besides "Master path" in Programs" page of global compiler options?
PS2: Can you post the contents of the INI file I 'm talking about?
Be patient!
This bug will be fixed soon...

prr

  • Guest
CodeBlocks and Compiler
« Reply #5 on: February 08, 2005, 02:22:10 pm »
Quote

If you know of a registry key for MinGW, please tell me about it :)


Don't know if it can be useful, but MinGW installer is built with innosetup, that uses this key:

HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\mingw32_is1\Inno\App Path

The problem is that it's not a mingw feature, but only an innosetup feature.
The key may obviously change if MinGW developers change the install system of for intenal innosetup modifications.

walter

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
CodeBlocks and Compiler
« Reply #6 on: February 10, 2005, 09:28:59 am »
Quote from: prr
The problem is that it's not a mingw feature, but only an innosetup feature.
The key may obviously change if MinGW developers change the install system of for intenal innosetup modifications.

That's right Walter.
Quote from: prr
HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\mingw32_is1\Inno\App Path

Even if I wanted to use this registry key, I couldn't because the "_is1" part in "mingw32_is1" is automatically tacked by innosetup and the number is not guaranteed to be the same...
Anyway, I 'll perform a MinGW installation to a non-default path and check the mingw.ini file. If it points to the default path, then this is a MinGW installation error and should be reported to the MinGW team...

Yiannis.
Be patient!
This bug will be fixed soon...

prr

  • Guest
CodeBlocks and Compiler
« Reply #7 on: February 10, 2005, 01:13:29 pm »
Quote from: mandrav

Anyway, I 'll perform a MinGW installation to a non-default path and check the mingw.ini file. If it points to the default path, then this is a MinGW installation error and should be reported to the MinGW team...


Just to increase the sample size:
I've installed MinGW (3.2.0 rc3) in a non-default path, and in my windows dir such file is present but void (0 byte length).

walter

Offline bszente

  • Multiple posting newcomer
  • *
  • Posts: 28
CodeBlocks and Compiler
« Reply #8 on: February 10, 2005, 02:15:48 pm »
Maybe the best way would be to write a code to search for the mingw32-gcc.exe file in the installation process, and ask the user to confirm if realy that is the installation path for mingw.

You may do the following:
1. look for the mingw.ini file.
2. if it contains an entry, look after mingw32-gcc.exe based on that path. if you find it, than in 99% the path is the right one.
3.  if no valid entry or no file, then look for some standard possible locations like
        c:\mingw
        c:\program files\mingw
 4. in last instance do a search for mingw32-gcc.exe or let the user to enter the installation path.

Offline Urxae

  • Regular
  • ***
  • Posts: 376
CodeBlocks and Compiler
« Reply #9 on: February 10, 2005, 04:05:32 pm »
I installed MinGW in a non-default location and C:\WINNT\MinGW.ini contains the correct path, so it's not on every non-default install. I'm running Windows 2000 though, maybe that makes a difference...

Offline prr

  • Single posting newcomer
  • *
  • Posts: 6
CodeBlocks and Compiler
« Reply #10 on: February 10, 2005, 05:21:21 pm »
Quote from: fvbommel
I installed MinGW in a non-default location and C:\WINNT\MinGW.ini contains the correct path, so it's not on every non-default install. I'm running Windows 2000 though, maybe that makes a difference...


2nd try:

I have uninstalled mingw and _manually_ deleted %windir%\mingw.ini, than reinstalled mingw, and the ini and it's expected contents was there.

After this, I have uninstalled mingw a second time but _without_ manually delete the ini file and I've observed that the mingw uninstaller instead of deleting ini file, _empy_ it! Producing the aforesaid 0 byte lenght ini file, that will not be overwritten or updated by a new fresh installation.

walter

Offline bszente

  • Multiple posting newcomer
  • *
  • Posts: 28
CodeBlocks and Compiler
« Reply #11 on: February 10, 2005, 05:38:11 pm »
This means that you cannot trust in MinGW.ini contents. It seems that the only almost certain solution is to search for one of the mingw32-....exe files.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
CodeBlocks and Compiler
« Reply #12 on: February 10, 2005, 05:59:18 pm »
I will try to contact the MinGW team. Meanwhile I 'm not investing time in this because the next release will probably come with MinGW included, as an option.

Yiannis.
Be patient!
This bug will be fixed soon...

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
CodeBlocks and Compiler
« Reply #13 on: February 20, 2005, 06:24:47 am »
I HAVE A SOLUTION!

It's simple.
1) Get the Windows env. variable 'PATH'. For each of the directories found, search it for any mingw ocurrences. (like make sure it has the folders BIN and MINGW/BIN).

2) If still you don't find it, then "bail out" and just ask the user where he downloaded the file.

My reasoning? Simple. If one has manually moved the MINGW installation, the he probably set up the path manually, too! :D

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
CodeBlocks and Compiler
« Reply #14 on: February 20, 2005, 09:33:47 am »
IIRC, the MinGW setup does not update the PATH env var...
Or does it? Can someone confirm this?

Yiannis.
Be patient!
This bug will be fixed soon...

Offline mike

  • Multiple posting newcomer
  • *
  • Posts: 53
CodeBlocks and Compiler
« Reply #15 on: February 20, 2005, 09:52:08 pm »
Quote
the MinGW setup does not update the PATH env var... Or does it?


As far as I understand, it does not. I have added mine manually.

Offline AkiraDev

  • Multiple posting newcomer
  • *
  • Posts: 71
CodeBlocks and Compiler
« Reply #16 on: February 20, 2005, 10:40:34 pm »
No, the MinGW installation does _not_ as of yet set the PATH for it.
I saw a post from someone at their forum volunteering to change this, but it shouldn't be expected to work in the near future, though.
I set my manually, and think that everyone else who uses it does the same.

dan_w

  • Guest
CodeBlocks and Compiler
« Reply #17 on: March 05, 2005, 07:05:35 am »
Code: [Select]
[InstallSettings]
InstallPath MinGW=G:\MinGW
InstallPath=G:\MinGW


That's my mingw.ini file. What happened was I first installed the candidate version, 3.2 I think, and it wrote the first line. It did not work. It said it was expecting an '='. So then I downloaded the current, 3.1? version, installed it over it, and it seems to have added the second line.
I just tried deleting the first line, but the detect feature still doesn't catch it.
What I did was I entered the path manually, and replaced all programs with their full paths, and everything works.

Maybe it would be easier for you to scan the file backwards, one past the first occurrence of ':\' (colon-backslash)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
CodeBlocks and Compiler
« Reply #18 on: July 05, 2005, 07:52:55 pm »
When I installed MINGW manually, i did set up the paths. So, it might help.