Hi,
so i still try to automate my full codeblocks build process... Some progress can be found here:
https://github.com/bluehazzard/codeblocks_build_utilities Scripts are from installation to automated build of every wx and build combination. The error reporting is not implemented yet... This is my first journey to bash scripting so any ideas and improvements are really welcome! This works at the moment only on linux. I may try to do the same with msys2 or even better automate also the windows builds with wine on linux... ( i don't want to crosscompile...)
Now to the problem: This is related on windows:
I can not get the build to work on windows. My setup:
1) Mingw64 compiler x86_64-w64-mingw32
2) Installed on D:\mingw64
3) the compiler is set as gcc in codeblocks with path and everything working
set CB_ROOT=D:\codeblocks\output31_64
set GCC_ROOT=D:\mingw64\bin
Now if i build codeblocks within codeblocks i have no problems... But if i call the batch_build.bat from the directory i get the
x86_64-w64-mingw32-g++.exe: error: CreateProcess: No such file or directory
error. After some googeling i found out that i have to add (
http://wiki.codeblocks.org/index.php?title=Installing_MinGW_with_Vista)
D:\mingw64\libexec\gcc\x86_64-w64-mingw32\8.1.0
to the PATH variable. Now the build works until it hits this error:
x86_64-w64-mingw32-g++.exe: fatal error: -fuse-linker-plugin, but liblto_plugin-0.dll not found
now the library in question is in
D:\mingw64\libexec\gcc\x86_64-w64-mingw32\8.1.0
And here i am.. I can not modify the library search path from the command line...
My question is now... Why does the batch build needs all this setup? The compiler should be set up in the codeblocks config file/project file. Why do i have to add all this to the environment?
Shouldn't it simply run and be good?
I have searched the source for some differences of batch build and normal build but i can only find some gui differences....
And here we come to point 2 of this post:
Some time ago i did this commit:
https://sourceforge.net/p/codeblocks/code/11706/ Where i display a message box on error. I will wrap this in a if like the compiler plugin does:
if (Manager::IsBatchBuild()) // no dialog if batch building...
Manager::Get()->GetLogManager()->LogToStdOut(msg);
else
cbMessageBox(msg, _("Error"), wxICON_ERROR);
Any objections? Note this is only a temporary commit to make the build more automaticable. The target is to implement a UI interface that is different for batch builds and normal builds as discussed in some ticket. But one step after the other. Now i want to automate the build as far as possible...
greetings