Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Compiler Plugin: Plan to add compiler for MSys2

<< < (4/6) > >>

stahta01:

--- Quote from: oBFusCATed on October 24, 2016, 03:12:22 am ---Why do you want to introduce this complexity instead of just adding a field if the compiler is enabled? You'll have to add such field anyway. And then add the simple dialog where the user can select the needed compilers. And lastly add some logic to show this dialog if C::B detects if the user has old config.

Is the default GCC compiler user-defined using your logic? Will it be removed from everybody's list of compilers if this change is added to C::B?

--- End quote ---

user-defined is what the auto detect window calls it; me I would throw out the auto detect and just add a field like you suggest. But, that does NOT seem to match the autodetect windows that is displayed on startup when it detects new/missing compilers.

Tim S.

stahta01:

--- Quote from: stahta01 on October 24, 2016, 04:06:54 am ---
--- Quote from: oBFusCATed on October 24, 2016, 03:12:22 am ---Why do you want to introduce this complexity instead of just adding a field if the compiler is enabled? You'll have to add such field anyway. And then add the simple dialog where the user can select the needed compilers. And lastly add some logic to show this dialog if C::B detects if the user has old config.

Is the default GCC compiler user-defined using your logic? Will it be removed from everybody's list of compilers if this change is added to C::B?

--- End quote ---

user-defined is what the auto detect window calls it; me I would throw out the auto detect and just add a field like you suggest. But, that does NOT seem to match the autodetect windows that is displayed on startup when it detects new/missing compilers.

Tim S.

--- End quote ---

Decided on a less GUI change method.
Add a checkbox called "Do not show missing compilers" which are the ones marked Not-Found by the auto detect window.

I can do most of the code changes in a single function called by DoRegisterCompilers, by verifying the compiler installation directory exists.
If it does NOT exist remove it from the list of compilers.

Edit: Decided to change
 void CompilerFactory::RegisterCompiler(Compiler* compiler)
to
 void CompilerFactory::RegisterCompiler(Compiler* compiler, bool found = false)

When found equals true it only Registers the Compiler if the master path of the compiler exists.

Tim S.

stahta01:
Link to the patch that still needs a lot of work https://github.com/stahta01/cb_misc/blob/master/Patches/svn/reduceList.patch

Tim S.

oBFusCATed:
1. How do I enable not found compiler? I've installed one in non-default location and want to use it for example.
2. How do I disable found compiler I don't care for?
3. Why are you mixing addition of msys2-mingw and the autodetection changes in this patch?
4. Can you install this new compiler on linux? I doubt, but just want to ask.
5. Default parameter values is better to not be used.

stahta01:

--- Quote from: oBFusCATed on October 24, 2016, 09:55:08 am ---1. How do I enable not found compiler? I've installed one in non-default location and want to use it for example.

--- End quote ---

I have yet to do the GUI changes; at current time I am using the "Enable non-platform compilers".


--- Quote from: oBFusCATed on October 24, 2016, 09:55:08 am ---2. How do I disable found compiler I don't care for?

--- End quote ---

Set the master path to an invalid path will do it.


--- Quote from: oBFusCATed on October 24, 2016, 09:55:08 am ---3. Why are you mixing addition of msys2-mingw and the autodetection changes in this patch?

--- End quote ---

Speed, the final patch will split those two xml files out.


--- Quote from: oBFusCATed on October 24, 2016, 09:55:08 am ---4. Can you install this new compiler on linux? I doubt, but just want to ask.

--- End quote ---

Not likely.


--- Quote from: oBFusCATed on October 24, 2016, 09:55:08 am ---5. Default parameter values is better to not be used.

--- End quote ---

Should I make a second function with the same name; but, two parameters or use a different name?
I think using the same name is better.

Tim S.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version