Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
New Variable to support wx-config in MSys2 MinGW
stahta01:
I am working on upgrading wxWidgets version to 3.1.6 in MSys2.
While doing that I tested how to use wx-config-3.1.
And, CB still needs a patch to make it easy to do.
--- Code: ---Index: src/sdk/macrosmanager.cpp
===================================================================
--- src/sdk/macrosmanager.cpp (revision 12814)
+++ src/sdk/macrosmanager.cpp (working copy)
@@ -394,6 +394,8 @@
wxFileName MasterPath;
MasterPath.SetPath(c->GetMasterPath(), wxPATH_NATIVE);
m_Macros[_T("TARGET_COMPILER_DIR")] = MasterPath.GetPathWithSep(wxPATH_NATIVE);
+ m_Macros[_T("TARGET_COMPILER_UNIX_PATH")] = MasterPath.GetPath(wxPATH_GET_VOLUME, wxPATH_UNIX);
+ m_Macros[_T("TARGET_COMPILER_VOLUME")] = MasterPath.GetVolume();
}
m_Macros[_T("TARGET_OBJECT_DIR")] = target->GetObjectOutput();
}
--- End code ---
TARGET_COMPILER_UNIX_PATH is like TARGET_COMPILER_DIR but, it always uses forward slashes and does not have a slash at the end. And, it does not show the drive letter like I thought it would.
So, I also added TARGET_COMPILER_VOLUME which will be just the drive letter.
custom variable
--- Code: ---WX_CONFIG=wx-config-3.1 --prefix=$(TARGET_COMPILER_VOLUME):$(TARGET_COMPILER_UNIX_PATH)
--- End code ---
Extra setting entry example
--- Code: ---`sh.exe -c '$(WX_CONFIG) --cflags'`
--- End code ---
Global Compiler Additional paths; this may be needed with wxWidgets 3.1.6; might not be needed with 3.1.5 msys2 library
--- Code: ---$(TARGET_COMPILER_DIR)../usr/bin
--- End code ---
ollydbg:
Hi, Tim, thanks, I am also interested on this usage.
But:
--- Code: ---WX_CONFIG=wx-config-3.1 --prefix=$(TARGET_COMPILER_VOLUME):$(TARGET_COMPILER_UNIX_PATH)
--- End code ---
Do we need two variables? I mean maybe we only need one variable to handle this?
stahta01:
--- Quote from: ollydbg on May 19, 2022, 07:10:00 am ---Hi, Tim, thanks, I am also interested on this usage.
But:
--- Code: ---WX_CONFIG=wx-config-3.1 --prefix=$(TARGET_COMPILER_VOLUME):$(TARGET_COMPILER_UNIX_PATH)
--- End code ---
Do we need two variables? I mean maybe we only need one variable to handle this?
--- End quote ---
The logic would need to be more complex to have only one variable and a few years back a posted a patch that used only one and it was never applied.
If you wish to do a more complex patch feel free. I thought that having an variable that was useful under Linux would help get the change applied.
Tim S.
ollydbg:
--- Quote from: stahta01 on May 19, 2022, 07:30:32 am ---The logic would need to be more complex to have only one variable and a few years back a posted a patch that used only one and it was never applied.
--- End quote ---
Can you tell me where is the "posted patch", thanks!
I will have a look at that patch.
ollydbg:
I just did some test:
--- Code: ---F:\code>sh.exe -c 'wx-config-3.1 --prefix=F:/code/msys2-64/mingw64/ --libs all'
-LF:/code/msys2-64/mingw64//lib -pipe -Wl,--dynamicbase,--high-entropy-va,--nxcompat,--default-image-base-high -Wl,--subsystem,windows -mwindows -lwx_mswu_xrc-3.1 -lwx_mswu_webview-3.1 -lwx_mswu_stc
-3.1 -lwx_mswu_richtext-3.1 -lwx_mswu_ribbon-3.1 -lwx_mswu_propgrid-3.1 -lwx_mswu_aui-3.1 -lwx_mswu_gl-3.1 -lwx_mswu_html-3.1 -lwx_mswu_qa-3.1 -lwx_mswu_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1
-lwx_baseu-3.1
F:\code>sh.exe -c 'wx-config-3.1 --prefix=F:\code\msys2-64\mingw64\ --libs all'
--- End code ---
So, you can see, we only need the "/" (forward slash) path separator version of the TARGET_COMPILER_DIR?
Navigation
[0] Message Index
[#] Next page
Go to full version