Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: zyd on June 28, 2016, 05:23:17 pm

Title: Other resource compiler options's conf is not saved
Post by: zyd on June 28, 2016, 05:23:17 pm
Hi:
I found the "Other resource compiler options" will aways not saved in default.conf file in win7 64bit.

"Setting -> Compiler -> GNU GCC Compiler -> Compiler settings -> Other resource compiler options", I fill in some options such as "-F pe-x86-64", and click OK to save options, and restart CB, reopen the options dialog, "-F pe-x86-64" is not there, option editor is nothing.

I tried 15.12-RC1, 16.01, and the latest nightly build version 20160621_rev10868, all have this problem.
Title: Re: Other resource compiler options's conf is not saved
Post by: BlueHazzard on June 29, 2016, 11:50:36 pm
I can confirm this on trunk windows 7

i am not very familiar with the code about the compiler, but i think in void Compiler::LoadSettings(const wxString& baseKey) in sdk/compiler.cpp is missing the loading function for the resource compiler options:
Code
    SetCompilerOptions    (GetArrayFromString(cfg->Read(tmp + _T("/compiler_options"), wxEmptyString)));
    SetLinkerOptions      (GetArrayFromString(cfg->Read(tmp + _T("/linker_options"),   wxEmptyString)));
    SetIncludeDirs        (GetArrayFromString(cfg->Read(tmp + _T("/include_dirs"),     wxEmptyString)));
    SetResourceIncludeDirs(GetArrayFromString(cfg->Read(tmp + _T("/res_include_dirs"), wxEmptyString)));
    SetLibDirs            (GetArrayFromString(cfg->Read(tmp + _T("/library_dirs"),     wxEmptyString)));
    SetLinkLibs           (GetArrayFromString(cfg->Read(tmp + _T("/libraries"),        wxEmptyString)));
    SetCommandsBeforeBuild(GetArrayFromString(cfg->Read(tmp + _T("/commands_before"),  wxEmptyString)));
    SetCommandsAfterBuild (GetArrayFromString(cfg->Read(tmp + _T("/commands_after"),   wxEmptyString)));
the include dirs are set, but not the options...

also the save code is not present ???

greetings
Title: Re: Other resource compiler options's conf is not saved
Post by: BlueHazzard on June 30, 2016, 12:15:56 am
Here is a patch what should fix this
Title: Re: Other resource compiler options's conf is not saved
Post by: oBFusCATed on June 30, 2016, 12:27:02 am
I've already fixed it. In trunk.
Title: Re: Other resource compiler options's conf is not saved
Post by: zyd on June 30, 2016, 12:54:31 pm
tks, I'll try it with the latest nightly build. ;)
Title: Re: Other resource compiler options's conf is not saved
Post by: oBFusCATed on July 01, 2016, 12:51:06 am
Latest nightly at this moment doesn't have the fix. You need the next nightly. :)