Code::Blocks Forums

User forums => Help => Topic started by: rickg22 on November 29, 2005, 06:13:45 pm

Title: Improving compiler autodetection (was: Re: registry)
Post by: rickg22 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.
Title: Re: registry
Post by: Urxae 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?
Title: Re: registry
Post by: rickg22 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
Title: Re: registry
Post by: Michael 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
Title: Re: registry
Post by: rickg22 on November 29, 2005, 07:35:54 pm
yeah but we'd have to know which directories (or files?) are specific for other compilers.
Title: Re: registry
Post by: Michael 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
Title: Re: registry
Post by: MortenMacFly 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.
Title: Re: registry
Post by: takeshimiya 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.
Title: Re: registry
Post by: rickg22 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.