Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Modified & Improved wxWidgets Project Wizard

(1/41) > >>

Biplab:
Hi Everybody,

I have modified and improved the wxWidgets Project Wizard. Please note that the modifications are Windows platform specific.

New Features:

* Option to select wxWidgets 2.6.3 or wxWidgets 2.8.0 version libraries (See screenshot below).
* Supports debug, release, static, dynamic, ANSI, Unicode, Monolithic builds of both versions of wxWidgets.
* Added support to MSVC 8 and Borland C++ 5.5.1 compilers.
* Additional compiler flags have been added for MSVC 8. Checks are in place to ensure that they don't come up with MSVC 6 or 7.1
* Option to add additional libraries of wxWidgets if the user is not working with Monolithic build (Partial, see screenshot below).
* Debug target now generates Win32 GUI app instead of Console mode app. It also links against Debug build of wxWidgets.Changes in Rev 1:

* All the modifications are now restricted to Windows only. Linux or Mac users shall not be affected by Script runtime errors (Please check it once if you are using Linux / Mac). For Linux / Mac platform, the wizard behaviour is old one.
* Wizard now checks for appropriate lib file for Monolithic build and wxbase lib file for non-monolithic builds. Check for setup.h has been removed.
* Deprecated compier option /Og has been removed from MSVC 8.
* $(#wx)/include dir is now added as Resource compiler include dir.
* Richtext library can't be selected if user selects wxWidgets 2.6.3.Changes in Rev 2:

* Wizard is now more clean. Adds minimum of numbers of libraries to the project depending upon user's choice.
* No Win32 libs are added if DLL build of wx lib is selected. Huge thanks to TDragon for pointing that and Mandrav for explaining the reason.  :D
* MSVC 8 now support wx lib dynamically linked with C Runtime Library (CRT) for all build configurations of wxWidgets. Statically linked wx lib (for MSVC 8 ) are NOT supported anymore.
* Wizard now generates commands to embed manifest file to generated exe file after linking to load CRT properly during runtime (For MSVC 8 only). So no performance issues with wxString now. But your application will now depend upon msvcrt.dll
* Options to select almost all the individual libs of wxWidgets in non-monolithic mode. (see the following screenshots) Please note the none of the lib from Contrib dir are added. If you need them, you have to add them manually.Changes in Rev 3:

* New Target Policy have been added to linker
* Supports Pre-compiled headers for BCC 5.5.1 and MSVC 8.
* Wizard CPP files are modified to support PCH.
* "Use the debugging libraries" option have been disabled in Windows part. This option is no longer necessary (See screenshot below).
* DECLARE_EVENT_TABLE(); in main.h file has been changed to DECLARE_EVENT_TABLE() This is necessary to avoid error while compiling with BCC.
* msvcrt.lib is now added as /NODEFAULTLIB in Debug target of MSVC 8 to avoid warning messages in some cases.Changes in Rev 3.3:

* Missing preprocessor definition, USE_PCH, in project file of BCC has been fixed.
* Preprocessor definition in BCC for Unicode app has been changed to UNICODE from wxUSE_UNICODE as BCC doesn't likes it.
* Now option to select Advanced UI Library will NOT be available if wxWidgets 2.6.x is usedChanges in Rev 4:

* Wizard now sets Appropriate wxWidgets lib order. But do not forget to add any necessary additional wx libs (Jpeg, Tiff, expat or regex) if you are using advanced lib (RichText, AUI, etc); wizard will not add them. Thanks to three_minute_hero for pointing this.
* Now XML and XRC lib can be selected separately.
* Wizard now stops compilation of wx_pch.h in Non-PCH project builds (This is a temporary fix, needs Improvement). Thanks to Ryan for pointing this.
* Wizard supports BCC 5.82 Compiler. You can now build wx app with it.Changes in Rev 5:

* Supports Microsoft Visual C++ 7.1 Compiler.
* PCH support is activated for MSVC 7.1 compiler.Changes in Rev 6:

* Added support (partial) for Linux and Mac (Untested). It's now possible to select different wxWidgets version present in Linux system.
* Added option to select Static/Dynamic, ANSI/Unicode build of wxWidgets in Linux.
* Added option to select Application Target Type in Windows (For Advanced users only)
* Wizard now checks the presence of wx configuration, selected for project, precisely in Windows. Expect almost No false warning.
* Couple of minor fixes and code clean-up.Changes in Rev 7:

* Creation of Empty Project is now possible.
* Wizard now generates customised header/source files. Filenames are generated on the basis of project name.
* Wizard now accepts Author name, email and website to customise header/source files generated by the wizard.
* Wizard now generates resource file in Windows. Default wx icon is used. XP theme support is also enabled using wx.rc file.
* Wizard now remembers following preferences.
* wxWidgets configuration settings
* Author details

Wizard page to select wxWidgets Version.


Wizard page to add additional libraries if Monolithic build is not selected. Check the option, in bold, to go the next page.

One point to remember that though there is no Next button, but clicking on Finish button will move to next page (if the Add more wxWidgets libraries is selected).


If you need more, then add them here.

Tested with:

* wxWidgets compiled with GCC (MinGW Build) as Release-Dynamic-Monolithic-Unicode build.
* wxWidgets compiled with Borland C++ 5.5.1 as Debug, Release, Static, Dynamic build
* wxWidgets compiled with MSVC 7.1, 8 as Debug, Release, Static, Dynamic and Unicode build. Dynamic linking of C Runtime Libraries have been used.
Known issues:

* Does not support MSVC 6.
* PCH support does not work with MSVC 6
* PCH support needs improvement.

"Use the debugging libraries" option is disabled (For Windows only).

I am attaching the modified files. Please take backup of old files and replace the new files in their place. The files shall be placed to <Code::Blocks Dir>\share\CodeBlocks\templates\wizard\wxwidgets folder.

Please test it and give your feedback and suggestions.  :D Please login to download the attachment. Also download the latest revision.

Latest Release: Revision 7

[attachment deleted by admin]

Commodore64:
It looks like an excellent improvement!
Thank you  :D and merry Christmas!

Biplab:
Thanks for your encouraging words.

Please test the wizard and post your comments, suggestions. I didn't submit patch to Berlios as I could not test it with all possible configurations. After I get good feedback I'll upload patch to Berlios. :D

TDragon:
Why, exactly, does your version disable the debug version under Windows? I use it with MinGW (and VC8, though not through C::B).

Biplab:
I didn't disable the Debug target in Windows and it's there.

Earlier the wizard generated Debug target as Console mode application and the Debug target could be linked againts Debug or Release build of wxWidgets. E.g., let's say you've selected DLL, release lib of wx with earlier wizard, it used to create two targets -

* Debug target - Links as Console mode app with Release lib of wx
* Release target - Links as Win32 GUI mode app with Release lib of wx
With earlier wizard, Debug target didn't mean that you are linking against Debug lib of wx, rather to link against Debug lib of wx you had to select the option "Use the debugging libraries".

The modified wizard creates the target in the following way -

* Debug target - links against Debug lib of wx
* Release target - links against Release lib of wx
Thus the option, use the debugging libraries, have been disabled internally for Windows as it has little significance.

I hope I've cleared your doubts.

Also please give this wizard a try, this works nicely with MSVC 8.  :D

Navigation

[0] Message Index

[#] Next page

Go to full version