Recent Posts

Pages: 1 2 3 4 [5] 6 7 8 9 10
41
Help / Re: wxSmith show a untitled item under the root resource tree
« Last post by ollydbg on March 14, 2023, 12:49:51 am »
I think I have found the reason.

Every C::B cbp(even it is a console project) will have a node shown in the wxSmith's item tree. The untitled node is from the "Clangd_client plugin", because it will create a dummy project.  ;)

I think we have to fix it.
42
Wouldn't it be possible to let the user select if he wants to use a msys installation at the beginning of the wizard with a UI? Like he can select the wx version?
Yes, I can do this. wxWidgets library is different from other libraries. For other libraries, they usually use the "pkg-config.exe" to config the include file search and linker options. The "pkg-config.exe" is already in msys2/mingw64/bin, so it is easy. For wxWidgets, I have to use a hack about the "#wx_config".

Quote
This should probably added for every wizard.... I too prefer the msys way of things nowadays....
Yes, many libraries are supplied by msys2, and I hope we can support all of them.
43
Help / Re: wxSmith show a untitled item under the root resource tree
« Last post by BlueHazzard on March 14, 2023, 12:20:18 am »
You probably have a left over resource in the project file? Can you look at it with a text editor?
44
Wouldn't it be possible to let the user select if he wants to use a msys installation at the beginning of the wizard with a UI? Like he can select the wx version?
This should probably added for every wizard.... I too prefer the msys way of things nowadays....
45
Using Code::Blocks / Re: Ctrl C problems
« Last post by BlueHazzard on March 14, 2023, 12:16:53 am »
Quote
In fact the problem it's at Ctrl C - I checked more deep.
How do you mean this? Deeper in your system or deeper in codeblocks?

Have you tried a nightly version?
46
Help / wxSmith show a untitled item under the root resource tree
« Last post by ollydbg on March 13, 2023, 07:01:47 am »
Hi, I see a node named "untitled" in the wxSmith's item tree, see the attachment image, any ideas?

47
Hi, in my daily work, I used the wx libraries installed by the pacman command under msys2 gcc environment. But our wxWidgets project wizard does not support creating a project for those libraries. I have just modify the wizard.script, and here is the patch file:

Code
diff --git a/wizard.script b/wizard.script
index 679e184..233d284 100644
--- a/wizard.script
+++ b/wizard.script
@@ -51,6 +51,8 @@ GuiAppType <- 1; // Default to Dialog. 0-Dialog, 1-Frame
 AddlLibList <- _T(""); // Contains the complete list
 multi_thread_dynamic <- true; //Default to Multi-thread. For MSVC only.
 
+IsMsys2Lib <- true; // when we are using the header files and libraries from Msys2 installed by pacman
+
 
 function BeginWizard()
 {
@@ -75,17 +77,20 @@ function BeginWizard()
         Wizard.AddProjectPathPage();
         Wizard.AddPage(_T("WxProjDetails"));
         Wizard.AddPage(_T("WxGuiSelect"));
-        if (PLATFORM == PLATFORM_MSW)
+
+
+        // if we are working under the msys2 environment, the header files and lib files are similar to the Unix type
+        if (PLATFORM == PLATFORM_MSW && !IsMsys2Lib)
             Wizard.AddGenericSelectPathPage(_T("WxPath"), wxpath_msg, _("wxWidgets' location:"), _T("$(#wx)"));
 
         // we need the compiler selection before wx settings, because we 'll have
         // to validate the settings. To do this we must know the compiler beforehand...
         Wizard.AddCompilerPage(_T(""), _T("*"), true, true);
-        if (PLATFORM == PLATFORM_MSW)
+        if (PLATFORM == PLATFORM_MSW && !IsMsys2Lib)
             Wizard.AddPage(_T("WxConf")); // only for windows
         else
             Wizard.AddPage(_T("WxConfUnix")); // just PCH option
-        if (PLATFORM == PLATFORM_MSW)
+        if (PLATFORM == PLATFORM_MSW && !IsMsys2Lib)
         {
             Wizard.AddPage(_T("WxConfAdvOpt")); // Wizard page to select target type
             Wizard.AddPage(_T("WxAddLib")); // Add additional wx libraries
@@ -103,17 +108,17 @@ function BeginWizard()
                                               _("Please select the wxWidgets version you want to use."),
                                               _T("wxWidgets 3.0;wxWidgets 3.1;wxWidgets 3.2;wxWidgets 3.3"),
                                               WxVersion); // select wxwidgets version
-        if (PLATFORM == PLATFORM_MSW)
+        if (PLATFORM == PLATFORM_MSW && !IsMsys2Lib)
             Wizard.AddGenericSelectPathPage(_T("WxPath"), wxpath_msg, _("wxWidgets' location:"), _T("$(#wx)"));
 
         // we need the compiler selection before wx settings, because we 'll have
         // to validate the settings. To do this we must know the compiler beforehand...
         Wizard.AddBuildTargetPage(_T(""), false, true, _T(""), _T("*"), true);
-        if (PLATFORM == PLATFORM_MSW)
+        if (PLATFORM == PLATFORM_MSW && !IsMsys2Lib)
             Wizard.AddPage(_T("WxConf")); // only for windows
         else
             Wizard.AddPage(_T("WxConfUnix")); // just PCH option
-        if (PLATFORM == PLATFORM_MSW)
+        if (PLATFORM == PLATFORM_MSW && !IsMsys2Lib)
         {
             Wizard.AddPage(_T("WxConfAdvOpt")); // Wizard page to select target type
             Wizard.AddPage(_T("WxAddLib")); // Add additional wx libraries
@@ -605,12 +610,26 @@ function SetupProject(project)
     local libdir;
     SetupAddlLibs();
     // set project options
-    if (PLATFORM != PLATFORM_MSW)
+    if (PLATFORM != PLATFORM_MSW || IsMsys2Lib)
     {
         if (ChoiceWxUnixLib == 0)
         {
-            project.AddCompilerOption(_T("`wx-config --cflags`"));
-            project.AddLinkerOption(_T("`wx-config --libs`"));
+            if (IsMsys2Lib)
+            {
+                // WX_CONFIG is a Code::Blocks global variable which can be set under
+                // MENU->Settings->Global Variable Editor, e.g. it could be:
+                // wx-config-msys2.exe --prefix=$(TARGET_COMPILER_DIR)
+                // in the above setting, you should supply wx-config-msys2.exe which can be built from
+                // https://github.com/eranif/wx-config-msys2
+                project.AddCompilerOption(_T("`$(#WX_CONFIG) --cflags`"));
+                project.AddLinkerOption(_T("`$(#WX_CONFIG) --libs`"));
+                project.AddResourceCompilerOption(_T("`$(#WX_CONFIG) --rcflags`"));
+            }
+            else
+            {
+                project.AddCompilerOption(_T("`$(#WX_CONFIG) --cflags`"));
+                project.AddLinkerOption(_T("`$(#WX_CONFIG) --libs base,core`"));
+            }
         }
         else
         {
@@ -929,7 +948,7 @@ function SetupTarget(target, is_debug)
         LibDebugSuffix = _T("");
 
     /* For Linux / Mac */
-    if (PLATFORM != PLATFORM_MSW)
+    if (PLATFORM != PLATFORM_MSW || IsMsys2Lib)
     {
         if (ChoiceWxUnixLib == 1)
         {


The patch is very simple, it first add a new variable named "IsMsys2Lib", and by I set it to "true". The wx library supplied by msys2/gcc is using some kinds of Linux format, so I change some code of the wizard.script to follow the condition of the PLATFORM == Unix branch.

To build the generated project, you have to define your global variable named "wx_config".

In my case, it refer to something like below:

Code
wx-config-msys2.exe --prefix=$(TARGET_COMPILER_DIR)

Note that the "wx-config-msys2.exe" can be built from the github repo: https://github.com/eranif/wx-config-msys2  (Thanks eranif)

You can define the "wx_config" to other strings, for example: Re: codeblocks cbp projects for wx samples, in this post, if you would like to use a wx library build you self, you can define the string as:

Code
wx-config.exe --prefix=F:/code/wxWidgets-3.2.1 --wxcfg=gcc_dll/mswu

Note the "wx-config.exe" can also be built from the github repo: https://github.com/eranif/wx-config-msys2

Basically, you have to create a user defined wizard.script file under you C::B's APPDATA folder, usually:
Code
%APPDATA%\CodeBlocks\share\codeblocks\templates\wizard\wxwidgets
If you do not understand where you %APPDATA% locates, you can see this as a reference: wxpbguide/cb/wizard at master PBfordev/wxpbguide (Thanks PB)

See this thread New Variable to support wx-config in MSys2 MinGW to understand how the global variable can be defined and used to support building. (Thanks stahta01)

I have attach the wizard file if you are lazy to apply my patch.  :)

If you have any issue, comments are welcome!
48
Using Code::Blocks / Re: Ctrl C problems
« Last post by mariusm on March 12, 2023, 11:04:59 pm »
In fact the problem it's at Ctrl C - I checked more deep.
49
Nightly builds / The 12 March 2023 build (13231) is out.
« Last post by killerbot on March 12, 2023, 03:42:18 pm »
We switched to wx 3.2.1 (on 01 October 2022) --> download the new wx dll's see link below

Get quick announcements through the RSS feed http://www.codeblocks.org/nightly/CodeBlock_RSS.xml

Before you use a nightly make sure you understand how it works.

A link to the unicode windows wxWidget dll(s) for Code::Blocks : https://sourceforge.net/projects/codeblocks/files/Binaries/Nightlies/Prerequisites/wxmsw32u_gcc_cb_wx321_2D_gcc810-mingw64.7z
A link to Mingw64 dll's needed by Code::Blocks : http://sourceforge.net/projects/codeblocks/files/Binaries/Nightlies/Prerequisites/Mingw64dlls8.1.0.7z


The 12 March 2023 build is out.
  - Windows :
   http://sourceforge.net/projects/codeblocks/files/Binaries/Nightlies/2023/CB_20230312_rev13231_win64.7z
  - Linux :
   none

The current SDK version is : 2.24.0

Resolved Fixed:

  • src, globs: allow to select targets for globs. Add setting to add files to project file or not. Fix ID errors in globs. Fix comments.
  • SDK: Add export of global variables sets to a text file.
  • sdk: Try to fix change detection in globs
  • sdk: Fix modified flag of project when glob files are not stored in project file.
  • Allow importing global variable sets.
  • sdk: globs: fix random crash by introducing range check
  • Do not select all files in "Remove files..." by default (ticket #1382, thanks LETARTARE).
  • wxSmith-Aui: Add flag wxAUI_MGR_LIVE_RESIZE (present since 2009) to wxAuiManager.
  • Clangd_client 1.2.63 2023/02/28 - Fix Double click on doc popup crash;
  • compiler: Fix response file generation (fix #1336)

Regressions/Confirmed/Annoying/Common bugs:


    50
    Help / Re: New to CB ... getting a lot of IDE screen screw ups ...
    « Last post by BlueHazzard on March 11, 2023, 09:31:33 pm »
    And desktop environment?
    [Edit:] found it from your previous post... sry about the noise
    Pages: 1 2 3 4 [5] 6 7 8 9 10