Author Topic: Improving compiler autodetection (was: Re: registry)  (Read 5952 times)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Improving compiler autodetection (was: Re: registry)
« on: November 29, 2005, 06:13:45 pm »
Speaking-of... I've never got to get the MinGW auto-detect working... we should improve on that too.

Offline Urxae

  • Regular
  • ***
  • Posts: 376
Re: registry
« Reply #1 on: November 29, 2005, 06:17:45 pm »
Speaking-of... I've never got to get the MinGW auto-detect working... we should improve on that too.
What can I say... Works For MeTM :)
How did you install MinGW? Extracted the archives to some directory other than c:\mingw by any chance?

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: registry
« Reply #2 on: November 29, 2005, 06:31:20 pm »
How did you install MinGW? Extracted the archives to some directory other than c:\mingw by any chance?

Exactly. Mine is in G:\mingw.

I'm thinking of an algorithm:

For all local hard drives:
a) Search for Any "mingw" dir. If found, ask user "is this one?".
b) Not found? Then for all top dirs, check those who have a "mingw32" subdirectory.
c) Not found? Ask the user For the mingw directory (put default dir in the dialog box)

Ta-da! :D

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: registry
« Reply #3 on: November 29, 2005, 07:24:05 pm »
I'm thinking of an algorithm:

For all local hard drives:
a) Search for Any "mingw" dir. If found, ask user "is this one?".
b) Not found? Then for all top dirs, check those who have a "mingw32" subdirectory.
c) Not found? Ask the user For the mingw directory (put default dir in the dialog box)

Ta-da! :D
That's good :). Should be used for the other compilers too.

Best wishes,
Michael

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: registry
« Reply #4 on: November 29, 2005, 07:35:54 pm »
yeah but we'd have to know which directories (or files?) are specific for other compilers.

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: registry
« Reply #5 on: November 29, 2005, 07:49:46 pm »
yeah but we'd have to know which directories (or files?) are specific for other compilers.
Yes, you're right. But we can always ask the user where she/he has installed the compiler and then automatically detect what it is needed (eventually, by asking user's confirmation).

Best wishes,
Michael

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: registry
« Reply #6 on: November 29, 2005, 09:34:09 pm »
I'm thinking of an algorithm: [...]
That reminds me of those silly installers that first do a folder search on all HDD's on a system. That's something I personally hate because I have thousands of folders and this usually leads to a very big delay in time which I could perfectly use to point to the application/folder the installer it is looking for... :?

...just my personal thoughts.

Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

takeshimiya

  • Guest
Re: registry
« Reply #7 on: November 29, 2005, 11:32:58 pm »
True, the algorithm must search for most common places (ie. mingw's registry installer, C:\mingw, C:\dev-cpp\mingw, D:\mingw, C:\Devel\mingw, ...).
If nothing found, then a question "Do you want to search on all disks for the compiler?" pops to the user.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: registry
« Reply #8 on: November 29, 2005, 11:58:01 pm »
Yeah well the problem is that when specifying the compiler on the first run, you can't (IIRC) specify the directory. There's only the "autodetect" button.