Permalink
Browse files

- Fixed flickering under MS Windows.

- Improved premake4 files to support wx-config even under MS Windows (i.e. wx-config bundled with CodeLite IDE and its wxWidgets distribution can be used now for building of wxFB).
- Fixed build issue dealing with __stdcall EXCEPTION_DISPOSITION under MS Windows with MinGW (not sure whether the fix won't break something under different compiler - must be tested).
  • Loading branch information...
1 parent 505e112 commit 00c5d033a125b22786af8865daf868820d200700 michalbliznak committed Feb 26, 2014
@@ -50,9 +50,9 @@ else
"../../src/controls/src/wxFlatNotebook/**.cpp"
}
if wxUseMediaCtrl then
- libs = "all"
+ libs = "std,stc,richtext,propgrid,aui,media"
else
- libs = "std,stc,richtext,propgrid,aui,ribbon"
+ libs = "std,stc,richtext,propgrid,aui"
end
end
@@ -111,7 +111,7 @@ end
if wxCompiler == "gcc" then
buildoptions {"-gstabs"}
- links {"bfd", "iberty", "psapi", "imagehlp"}
+ links {"bfd", "iberty", "psapi", "imagehlp", "intl"}
end
configuration "Debug"
defines {"__WXFB_DEBUG__"}
@@ -45,6 +45,10 @@ newoption {
trigger = "architecture",
description = "Targeted architecture (e.g i386)"
}
+newoption {
+ trigger = "force-wx-config",
+ description = "Use wx-config for configuration even under MS Windows"
+}
-- Common globals
wxCompiler = _OPTIONS["compiler"]
wxCompilerVersion = _OPTIONS["compiler-version"] or ""
@@ -126,21 +130,28 @@ function wx_config(options)
useStatic = "yes"
end
+-- Use wx-config
+ local useWXConfig = "no"
+ if _OPTIONS["force-wx-config"] then
+ useWXConfig = "yes"
+ end
+
wx_config_Private( options.Root or "",
- options.Debug or "",
- options.Host or "",
- options.Version or wxVersion,
- options.Static or useStatic,
- options.Unicode or useUnicode,
- options.Universal or "",
- options.Libs or "",
- options.WindowsCompiler or wxCompiler,
- options.CompilerVersion or wxCompilerVersion,
- options.WithoutLibs or "no"
+ options.Debug or "",
+ options.Host or "",
+ options.Version or wxVersion,
+ options.Static or useStatic,
+ options.Unicode or useUnicode,
+ options.Universal or "",
+ options.Libs or "",
+ options.WindowsCompiler or wxCompiler,
+ options.CompilerVersion or wxCompilerVersion,
+ options.WithoutLibs or "no",
+ options.UseWXConfig or useWXConfig
)
end
-function wx_config_Private(wxRoot, wxDebug, wxHost, wxVersion, wxStatic, wxUnicode, wxUniversal, wxLibs, wxCompiler, wxCompilerVersion, wxWithoutLibs)
+function wx_config_Private(wxRoot, wxDebug, wxHost, wxVersion, wxStatic, wxUnicode, wxUniversal, wxLibs, wxCompiler, wxCompilerVersion, wxWithoutLibs, wxUseWXConfig)
-- some options are not allowed for newer version of wxWidgets
if wxVersion > "2.8" then -- alphabetical comparison may fail...
wxDebugSuffix = ""
@@ -247,11 +258,28 @@ function wx_config_Private(wxRoot, wxDebug, wxHost, wxVersion, wxStatic, wxUnico
if wxHost ~= "" then configCmd = configCmd .. " --host=" .. wxHost end
-- if wxVersion ~= "" then configCmd = configCmd .. " --version=" .. wxVersion end
- -- set the parameters to the current configuration
- buildoptions {"`" .. configCmd .." --cxxflags`"}
-
- if wxWithoutLibs == "no" then
- linkoptions {"`" .. configCmd .." --libs " .. wxLibs .. "`"}
+ if _ACTION == "codelite" then
+ -- set the parameters to the current configuration
+ buildoptions {"$(shell " .. configCmd .." --cxxflags)"}
+
+ if wxWithoutLibs == "no" then
+ linkoptions {"$(shell " .. configCmd .." --libs " .. wxLibs .. ")"}
+ end
+
+ if os.get() == "windows" then
+ resoptions {"$(shell " .. configCmd .." --rcflags)"}
+ end
+ else
+ -- set the parameters to the current configuration
+ buildoptions {"`" .. configCmd .." --cxxflags`"}
+
+ if wxWithoutLibs == "no" then
+ linkoptions {"`" .. configCmd .." --libs " .. wxLibs .. "`"}
+ end
+
+ if os.get() == "windows" then
+ resoptions {"`" .. configCmd .." --rcflags`"}
+ end
end
end
@@ -282,6 +310,10 @@ function wx_config_Private(wxRoot, wxDebug, wxHost, wxVersion, wxStatic, wxUnico
--~ wxCompiler = _OPTIONS.cc
--~ print("seen option '--cc=" .. _OPTIONS["cc"] .. "' overriding default cc='vc'")
--~ end
- wx_config_for_windows(wxCompiler, wxCompilerVersion)
+ if wxUseWXConfig == "no" then
+ wx_config_for_windows(wxCompiler, wxCompilerVersion)
+ else
+ wx_config_for_posix()
+ end
end
end
@@ -6,9 +6,10 @@ CLS
REM Set Defaults
SET unicode=
SET wxroot=%WXWIN%
-SET wxver=2.9
+SET wxver=3.0
SET compiler=gcc
SET compilerversion=
+SET usewxconfig=
REM Handle parameters
:Loop
@@ -21,6 +22,7 @@ IF [%1]==[--disable-mediactrl] GOTO Mediactrl
IF [%1]==[--wx-root] GOTO Root
IF [%1]==[--disable-unicode] GOTO Unicode
IF [%1]==[--wx-version] GOTO Version
+IF [%1]==[--force-wx-config] GOTO WXConfig
GOTO Premake
:Help
@@ -51,6 +53,11 @@ ECHO.
ECHO --wx-version Specify the wxWidgets version.
ECHO Example: --wx-version=2.9
ECHO Default: %wxver%
+ECHO
+ECHO --force-wx-config Force wx-config for the configuration
+ECHO even under MS Windows (usefull when CodeLite IDE
+ECHO is used for the building)
+ECHO Default: Don't use wx-config under MS Windows
ECHO.
GOTO End
@@ -82,17 +89,22 @@ SET unicode=%1
SHIFT
GOTO Loop
+:WXConfig
+SET usewxconfig=%1
+SHIFT
+GOTO Loop
+
:Version
SET wxver=%2
SHIFT
SHIFT
GOTO Loop
:Premake
-build\premake\windows\premake4.exe --file=build/premake/solution.lua --wx-root=%wxroot% --wx-version=%wxver% --compiler=%compiler% %compilerversion% %unicode% %mediactrl% codelite
+build\premake\windows\premake4.exe --file=build/premake/solution.lua --wx-root=%wxroot% --wx-version=%wxver% --compiler=%compiler% %compilerversion% %unicode% %mediactrl% %usewxconfig% codelite
ECHO.
-build\premake\windows\premake4.exe --file=build/premake/solution.lua --wx-root=%wxroot% --wx-version=%wxver% --compiler=%compiler% %compilerversion% %unicode% %mediactrl% gmake
+build\premake\windows\premake4.exe --file=build/premake/solution.lua --wx-root=%wxroot% --wx-version=%wxver% --compiler=%compiler% %compilerversion% %unicode% %mediactrl% %usewxconfig% gmake
ECHO.
ECHO Done generating all project files for wxFormBuilder.
@@ -5,6 +5,7 @@
* #127 Wrong parent passed to IComponent::OnCreated() (patch by sodev)
* #128 Object Inspector expansion fix (patch by sodev)
* #129 Support for statusbar plugins (patch by sodev)
+* Avoid flickering on MS Windows
+ Added abbility to swap the editor and the object properties panels (patch by tuyanyi)
11/12/2013 Version 3.04.01 (Beta)
View
@@ -58,10 +58,11 @@
#include <sstream>
#include <excpt.h>
- __stdcall EXCEPTION_DISPOSITION StructuredExceptionHandler( struct _EXCEPTION_RECORD *ExceptionRecord,
- void * EstablisherFrame,
- struct _CONTEXT *ContextRecord,
- void * DispatcherContext );
+ //__stdcall EXCEPTION_DISPOSITION StructuredExceptionHandler( struct _EXCEPTION_RECORD *ExceptionRecord, /* breaks build with MinGW */
+ EXCEPTION_DISPOSITION StructuredExceptionHandler( struct _EXCEPTION_RECORD *ExceptionRecord,
+ void * EstablisherFrame,
+ struct _CONTEXT *ContextRecord,
+ void * DispatcherContext );
#endif
void LogStack();
@@ -432,7 +432,7 @@ void VisualEditor::ClearComponents( wxWindow* parent )
*/
void VisualEditor::Create()
{
-#if wxVERSION_NUMBER < 2900 && !defined(__WXGTK__ )
+#if !defined(__WXGTK__ )
if ( IsShown() )
{
Freeze(); // Prevent flickering on wx 2.8,
@@ -706,7 +706,7 @@ void VisualEditor::Create()
m_back->Show(false);
Refresh();
}
-#if wxVERSION_NUMBER < 2900 && !defined(__WXGTK__)
+#if !defined(__WXGTK__)
Thaw();
#endif
}

0 comments on commit 00c5d03

Please sign in to comment.