Re: [wxlua-users] wxWidgets 2.9.3 cmake and mingw

2012-06-27 Thread John Labenski
On Wed, Jun 27, 2012 at 11:02 AM, João Mendes lord@gmail.com wrote:
 I could almost using cmake.
 Attached the output generated by mingw32-make when i try compile.

I'm glad you noticed the update, I build wxWidgets trunk and wxLua
using mingw without a hitch after the last fixes. I believe that we
even built wxWidgets with the same options, though I built with
UNICODE=1, but that shouldn't be a problem.

I'm confused about the undefined references as I didn't get them.
Note that I build both wxLua and wxWidgets for Debug.

Here's the docs for how I did it, eventually they'll be part of the
install.html.

Build wxWidgets
2.4 - Build using MinGW

Download mingw-get-inst-20120426.exe or an appropriate newer
version to automatically download and install a fully working system.
Run the installer and select C Compiler, C++ Compiler, MSYS
Basic System, and the MinGW Developer Toolkit at minimum.
It is probably best to install to a directory without a space
in the name.
Open a cmd.exe (DOS) prompt and cd to wxWidgets\build\msw\
Run set PATH=C:\MinGW\bin;%PATH% so that the compiler can be found.
Or optionally set a system wide environment variable PATH to
point to the \bin\ directory of the MinGW install.
Or use the MinGW shell which has the PATH already set, but note
that this shell is a Linux (Cygwin) shell rather than a DOS shell so
it works a little differently.
If you are unfamiliar with Unix or Linux you should probably
use the cmd.exe (DOS) prompt.
The build is configured by config.gcc, but don't edit it, rather
override the default values of the variables on the make command line.
To build static libs run this command :
32-bit : mingw32-make.exe -f makefile.gcc SHARED=0 UNICODE=1
BUILD=[debug,release]
To build shared libs (DLLs) run this command :
32-bit : mingw32-make.exe -f makefile.gcc SHARED=1 UNICODE=1
BUILD=[debug,release] MONOLITHIC=1
You can speed up compilation by adding the flag -jN, e.g. -j4 to
use four processors, for multi-processor compilation.
Note that you may have to run make multiple times since you
may initially get errors since the compilers are not synced.

Build wxLua
4.2 - CMake with MinGW

See the section above titled Build using MinGW for more
information about getting and using MinGW.

Choose the CMAKE_BUILD_TYPE that you want.
Note that you MUST have built wxWidgets in debug for a wxLua
Debug build, but a wxWidgets release build works with a wxLua Release,
MinSizeRel, RelWithDebInfo build.
To find wxWidgets you must set the variable
wxWidgets_ROOT_DIR=/path/to/wxWidgets
Press Configure, but it probably won't work just yet.
To find the libraries for wxWidgets (you may have compilied a
variety of them) you must also set the variable
wxWidgets_LIB_DIR=/path/to/wxWidgets/lib/gcc_lib
gcc_dll for DLLs
Press Configure and now it should work, the output window should
say Configuring done and the log should have a complete description
of your wxWidgets build.
Press Generate to have CMake write out the build files.
Open a cmd.exe prompt to run mingw32-make.exe help to display all
the available targets.
If you run mingw32-make.exe with no parameters you will build
everything, which is probably best.
All the apps are put into build\bin\Debug or Release, MinSizeRel,
RelWithDebInfo as appropriate.

Hope this helps,
John

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


[wxlua-users] wxLua install.html for CMake

2012-06-27 Thread John Labenski
I've updated the install.html file for using the new CMake build
files. I hope it makes some sense and every build in it was tested as
written.

http://wxlua.svn.sourceforge.net/viewvc/wxlua/trunk/wxLua/docs/install.html

I've also added a svn:externals to grab wxstedit from wxCode so that
should be much less of a hassle to compile.

Unfortunately, this means I didn't have time to make a release tonight.

Regards,
John

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Apps fail to build against wx with -fno-exceptions

2012-06-27 Thread John Labenski
On Tue, Jun 26, 2012 at 8:56 AM, strawman straw...@lavabit.com wrote:
 wxLua from SVN builds successfully against wxMSW 2.9.3 with USE_EXCEPTIONS=0
 (-fno-exceptions) set in wx's config.gcc, but building apps fails with the
 attached error.  Using -fno-exceptions in wxLua's makefile causes no issues.

When you compile wxWidgets with USE_EXCEPTIONS=0 your
wxWidgets/lib/vc_lib/mswud/wx/setup.h (adjust dir for your build)
should have wxUSE_EXCEPTIONS=0, does it? If it does, put some invalid
code into that file and recompile, do you get an error? If no then
you're somehow not including that file as it should be, if you do get
an error.. .then I don't know what's going on.

 Additionally, building apps against wx with DEBUG_FLAG = 0 set in the
 makefile produces a few thousand undefined reference to
 wxOnAssert/wxTheAssertHandler errors, unless -DwxDEBUG_FLAG=0 is added to
 wxLua's CPPFLAGS.

I'm curious why you want to change these?  I suppose you do not want
__NO_VC_CRTDBG__, but for what reason?
http://biolpc22.york.ac.uk/wx/docs/html/faqmsw.htm (search for __NO_VC_CRTDBG__)

I grepped for wxDEBUG_FLAG though all of wxLua and wxWidgets 2.9.4 and
didn't find it. Who is using this define and why would it fix
anything?

Regards,
John

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


[wxlua-users] UPDATE_UI events not triggered for menu items in full-screen mode

2012-06-27 Thread Paul K
Hi John,

I think this is a bug in wxwidgets, but I'm looking for suggestions
about a workaround.

Essentially, if the application has menu items that change their
state, the change in that state is not detected when the application
is in full screen mode (and the menu is hidden). The same issue is
described here (http://forums.wxwidgets.org/viewtopic.php?f=1t=32224)
and this ticket may be related too
(http://trac.wxwidgets.org/ticket/4843).

I can see that UPDATE_UI event is triggered in a normal case when an
accelerator key is used (even when the menu is disabled), but it is
NOT triggered when the menu is hidden, which doesn't allow to fix
its state. I tried using

frame:UpdateWindowUI(wx.wxUPDATE_UI_RECURSE) and
frame:UpdateWindowUI(wx.wxUPDATE_UI_FROMIDLE)

but I don't see the UPDATE_UI triggered for that particular item. I
also tried your code from wxLua (btw, why did you use it in your
case?):

function UpdateUIMenuItems()
if frame and frame:GetMenuBar() then
for n = 0, frame:GetMenuBar():GetMenuCount()-1 do
frame:GetMenuBar():GetMenu(n):UpdateUI()
end
end
end

but it doesn't trigger UPDATE_UI either (in full screen mode). I tried
putting this code in KEY_DOWN and ON_IDLE events with the same result.

Is there a way to force UPDATE_UI on those menu items to make the
accelerator keys work? Is there another workaround?

This is on Win32 using wxwidgets 2.8.7. Thank you.

Paul.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users