News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Improving compiler autodetection (was: Re: registry)

Started by rickg22, November 29, 2005, 06:13:45 PM

Previous topic - Next topic

rickg22

Speaking-of... I've never got to get the MinGW auto-detect working... we should improve on that too.

Urxae

Quote from: 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.
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?

rickg22

Quote from: Urxae on November 29, 2005, 06:17:45 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

Michael

Quote from: rickg22 on November 29, 2005, 06:31:20 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
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]

rickg22

yeah but we'd have to know which directories (or files?) are specific for other compilers.

Michael

Quote from: 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.
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
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]

MortenMacFly

Quote from: rickg22 on November 29, 2005, 06:31:20 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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

takeshimiya

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.

rickg22

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.