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

The 20 November 2016 build (10922) is out.

Started by killerbot, November 20, 2016, 05:45:37 PM

Previous topic - Next topic

Xaviou

#30
Well : I think there is nothing in the project file that is "wx-3.1.0" specific.
Here is the content of the project file :
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="CBTest1" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="bin/Debug/CBTest1" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="0" />
<Option compiler="gcc" />
<Option projectLinkerOptionsRelation="2" />
<Compiler>
<Add option="-g" />
</Compiler>
<ExtraCommands>
<Add after="/Developer/Tools/Rez -d __DARWIN__ -t APPL Carbon.r -o $(TARGET_OUTPUT_FILE)" />
</ExtraCommands>
</Target>
<Target title="Release">
<Option output="bin/Release/CBTest1" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="0" />
<Option compiler="gcc" />
<Option projectLinkerOptionsRelation="2" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
<ExtraCommands>
<Add after="/Developer/Tools/Rez -d __DARWIN__ -t APPL Carbon.r -o $(TARGET_OUTPUT_FILE)" />
</ExtraCommands>
</Target>
</Build>
<Compiler>
<Add option="`wx-config --cflags`" />
<Add option="-Wall" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
</Linker>
<Unit filename="CBTest1App.cpp" />
<Unit filename="CBTest1App.h" />
<Unit filename="CBTest1Main.cpp" />
<Unit filename="CBTest1Main.h" />
<Extensions>
<code_completion />
<envvars />
<debugger />
</Extensions>
</Project>
</CodeBlocks_project_file>


As you can see in the screenshot, the compilation command line is a "basic" one (without any wx-config command nor result as it is specified in the project options).

Regards
Xav'
My wxWidgets's stuff : [url="https://wxstuff.xaviou.fr/"]https://wxstuff.xaviou.fr/[/url]

Xaviou

Hi.

I've perhaps found the source of the problem : CB doesn't seems to have the full correct $PATH env var.

For this, I've added following "pre-build" command:
echo $PATH
The printed result doesn't contain "/usr/local/bin" (witch is where I've placed a copy of wx-config)

$PATH value from Code::Blocks:
/usr/bin:/usr:/bin:/usr/sbin:/sbin

$PATH value from a terminal window:
/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

The first diff (Python related) is added from my ".bash_profile", but I don't know where the "/usr/local/bin" one come from.

I've also made a test to see the content of the $PATH var in a GUI application and I've obtained a third different result :
/usr/bin:/bin:/usr/sbin:/sbin
The "/usr" part is not present.

Does someone have any idea on how to modify this env var "system wide" ?

Regards
Xav'
My wxWidgets's stuff : [url="https://wxstuff.xaviou.fr/"]https://wxstuff.xaviou.fr/[/url]

Jenna

Quote from: Xaviou on December 24, 2016, 12:02:45 PM
Hi.

I've perhaps found the source of the problem : CB doesn't seems to have the full correct $PATH env var.

For this, I've added following "pre-build" command:
echo $PATH
The printed result doesn't contain "/usr/local/bin" (witch is where I've placed a copy of wx-config)

$PATH value from Code::Blocks:
/usr/bin:/usr:/bin:/usr/sbin:/sbin

$PATH value from a terminal window:
/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

The first diff (Python related) is added from my ".bash_profile", but I don't know where the "/usr/local/bin" one come from.

I've also made a test to see the content of the $PATH var in a GUI application and I've obtained a third different result :
/usr/bin:/bin:/usr/sbin:/sbin
The "/usr" part is not present.

Does someone have any idea on how to modify this env var "system wide" ?

Regards
Xav'
If the environment-variables plugin is installed, you can set it in "Settings->Environment->Environment variables".

Xaviou

Quote from: jens on December 24, 2016, 01:01:10 PM
If the environment-variables plugin is installed, you can set it in "Settings->Environment->Environment variables".
It worked.
I've added "PATH" = "$PATH:/usr/local/bin" to the environment variables plugin, ignored the warning message saying that this variable was already set, and restarted CB and the build process worked fine.

Thank you.

Regards
Xav'
My wxWidgets's stuff : [url="https://wxstuff.xaviou.fr/"]https://wxstuff.xaviou.fr/[/url]

oBFusCATed

I think this is the default behaviour of the launcher or the dock.

About the build target combo: Can you check if the auidemo in the wx works correctly on mac. I hope they have added combos in the toolbars in the demo. If they haven't you can probably easily add one.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Xaviou

Hi
Quote from: oBFusCATed on December 26, 2016, 04:43:11 PM
About the build target combo: Can you check if the auidemo in the wx works correctly on mac. I hope they have added combos in the toolbars in the demo.
They did, and it works : see attached screenshot.

Another thing that doesn't work on Mac : the scripted wizard for wxWidgets project add a "post build" command containing :
File wizard.script line 917
/Developer/Tools/Rez -d __DARWIN__ -t APPL Carbon.r -o $(TARGET_OUTPUT_FILE)

The "/Developer/Tools/" directory doesn't exists.
I tried removing the full path :
Rez -d __DARWIN__ -t APPL Carbon.r -o $(TARGET_OUTPUT_FILE)
It worked but the resulting executable can't be runned.
I've searched a little on internet, and it seems that this command remove the "terminal" console for GUI applications (perhaps it has other features that I don't know).
The only thing that I know is that it can be replaced by "SetFile" (as it can be found in wxWidgets minimal sample makefile).
So the correct command to add is :
SetFile -t APPL $(TARGET_OUTPUT_FILE)

Perhaps someone can confirm this.

Regards
Xav'
My wxWidgets's stuff : [url="https://wxstuff.xaviou.fr/"]https://wxstuff.xaviou.fr/[/url]

oBFusCATed

Quote from: Xaviou on December 26, 2016, 07:46:10 PM
They did, and it works : see attached screenshot.

Just for confirmation - you're using the same wx libs for cb and auidemo right?

Quote from: Xaviou on December 26, 2016, 07:46:10 PM
So the correct command to add is :
SetFile -t APPL $(TARGET_OUTPUT_FILE)

Patches welcome.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

oBFusCATed

Quote from: Xaviou on December 26, 2016, 07:46:10 PM
They did, and it works : see attached screenshot.

Can you try this patch (it is a shot in the dark):

diff --git a/src/plugins/compilergcc/compilergcc.cpp b/src/plugins/compilergcc/compilergcc.cpp
index a88716dc8..4354d7279 100644
--- a/src/plugins/compilergcc/compilergcc.cpp
+++ b/src/plugins/compilergcc/compilergcc.cpp
@@ -615,9 +615,9 @@ bool CompilerGCC::BuildToolBar(wxToolBar* toolBar)
     wxString my_16x16 = Manager::isToolBar16x16(toolBar) ? _T("_16x16") : _T("");
     Manager::Get()->AddonToolBar(toolBar,_T("compiler_toolbar")+my_16x16);
     m_pToolTarget = XRCCTRL(*toolBar, "idToolTarget", wxChoice);
+    DoRecreateTargetMenu(); // make sure the tool target combo is up-to-date
     toolBar->Realize();
     toolBar->SetInitialSize();
-    DoRecreateTargetMenu(); // make sure the tool target combo is up-to-date
     return true;
}

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Xaviou

Hi
Quote from: oBFusCATed on December 26, 2016, 08:07:01 PM
Quote from: Xaviou on December 26, 2016, 07:46:10 PM
They did, and it works : see attached screenshot.

Just for confirmation - you're using the same wx libs for cb and auidemo right?
No : I'm actually using Code::Blocks built by frankofrank with the wx libs included and for auidemo, it is a freshly updated git repo.  :-[

Quote from: oBFusCATed on December 26, 2016, 08:07:01 PM
Quote from: Xaviou on December 26, 2016, 07:46:10 PM
So the correct command to add is :
SetFile -t APPL $(TARGET_OUTPUT_FILE)

Patches welcome.

Quote from: oBFusCATed on December 27, 2016, 11:45:18 AM
Can you try this patch (it is a shot in the dark):
......
Well... the last time I've tried to build CB on Mac wasn't successfull (it was some months ago).

I think it's time for me to re-try this until it succeed  :P

Regards
Xav'
My wxWidgets's stuff : [url="https://wxstuff.xaviou.fr/"]https://wxstuff.xaviou.fr/[/url]

Xaviou

My wxWidgets's stuff : [url="https://wxstuff.xaviou.fr/"]https://wxstuff.xaviou.fr/[/url]

darmar

It seems, that C::B experiencing problems in calltips with highlighting of current variable on Windows.

Some more explanation: current variable under cursor should be highlighted. However on a new system (I mean, default settings of C::B) the calltips are displayed in a single black color. The user can change the color for the calltips on Settings->Environment->Colours. It works. However a new user should find it first.

You can test this problem, by temporally renaming your C::B settings folder on "C:Users\YourName\AppData\Roaming\CodeBlocks" (it is hidden folder) and starting C::B.

I looked for this problem. I think, I found: in file C::B/src/sdk/ccmanager.cpp on lines 292 and 293, Calltips foreground is defined as "DimGray, while Calltips background is defined as "DarkBlue". Problem, that on Windows there are no such colors predefined. Changin them to "GRAY" and "BLUE", solve the problem.

Before: lines 292-293

    cmgr->RegisterColour(_("Code completion"), _("Tooltip/Calltip foreground"), wxT("cc_tips_fore"),      wxColour(wxT("DimGrey")));
    cmgr->RegisterColour(_("Code completion"), _("Tooltip/Calltip highlight"),  wxT("cc_tips_highlight"), wxColour(wxT("DarkBlue")));


Chage to:


    cmgr->RegisterColour(_("Code completion"), _("Tooltip/Calltip foreground"), wxT("cc_tips_fore"),      wxColour(wxT("GRAY")));
    cmgr->RegisterColour(_("Code completion"), _("Tooltip/Calltip highlight"),  wxT("cc_tips_highlight"), wxColour(wxT("BLUE")));


I did not experience this problem on Linux. I guess, that these colors are predefined on Linux.

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

darmar


killerbot

An updated wx dll, to avoid the compiler optimization bug.


A link to the unicode windows wxWidget dll for Code::Blocks : http://sourceforge.net/projects/codeblocks/files/Binaries/Nightlies/Prerequisites/wxmsw28u_gcc_cb_wx2812_gcc510-TDM-2.7z

Note the '-2'.

Melchior

nice updates ^_^
why no main updates of CB since this  Nov update? :o ???
(PC Specs)
CPU: AMD FX-9590 4.7GHz 8-core  RAM: 32GB
Motherboard: Asus SABERTOOTH 990FX R2.0
GPU: nVidia GTX 1070 Ti 8GB  --  GFX Drivers: Nvidia v431.60
OS: Windows 7 Ultimate 64-bit SP1 (x64)