Using wxDevCpp to create a DevPak for wxDevCpp - How To...

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Post Reply
NinjaNL
Moderator
Moderator
Posts: 899
Joined: Sun Oct 03, 2004 10:33 am
Location: Oosterwolde, Netherlands

Using wxDevCpp to create a DevPak for wxDevCpp - How To...

Post by NinjaNL »

OK gang, just to clear the air first...

This is not going to tell you where the new devpak is (cos there isn't one yet - I am trying to do something with the sources for a project of my own, and it is taking a lot longer than I had anticipated), but it is going to tell you how to make your own for replacing the 2.5.4 devpak included in the 6.7 distribution, with a 2.5.5 (or 2.6.0 ... ) version. This method is of course a simple way to maintain a cvs head version of the devpak

Frirstly, you need to download the wxWidgets sources. These are currently

here or search for them on the downloads page of wxWidgets

I generally choose the setup archive (in this case wxMSW-2.5.5-setup.zip) expand it and then install into a directory c:\wxWidgets, I always use this directory, the reason will be seen shortly.

In the c:\wxWidgets\Include\wx\msw directory, I open the file setup.h and control that everything is as I want it (which basically means don't touch anything), close the file (saving any changes you made), and then copying this file up one level to c:\wxWidgets\Include\wx. So we now have a file c:\wxWidgets\Include\wx\setup.h.

Now we need to create a bat file, I use Notepad to accomplish this, and here are my contents

Code: Select all

set WXWIN=c:\wxWidgets-2.5.5
set path=c:\Dev-Cpp\bin;%path%

mingw32-make -f makefile.gcc BUILD=release MONOLITHIC=1 USE_OPENGL=1 RUNTIME_LIBS=static USE_RTTI=0 USE_EXCEPTIONS=1

pause

Save this anywhere sensible, since you will need it again in the future (especially when working on cvs head), and then copy it to c:\wxWidgets\build\msw. The batch file is really simple, and should need no real explanation, other than to say that the path value now obviously includes the bin directory of your wxDevCpp directory.

The first two lines need to be changed to reflect where you installed wxWidgets source and where you installed wxDevCpp, the pause is just there so you can see the output once the compilation is complete.

double click on the batch file, and then go and make yourself a cup of coffee, while the compilation of your new library is progressing.

All things being equal, after a (not such a ) short time you should be ready. Of course if it doesn't work because the cvs head doesn't compile correctly, then consider finding the solution to that as housework.

Once the compilation is completed, then you have one of two options (three if consider giving up and getting drunk as an option) to choose from. Firstly, copy the created libraries and necessary include files into your wxDevCpp distribution, or create your own devpak to accomplish much the same task.

Option 1:

Copy the contents of the wxWidgets\Include map to your wxDevCpp\Include directory. Repeat with the contents of your wxWidgets\contrib\include directory.

Copy the contents of the wxWidgets\lib\gcc_lib to your wxDevCpp\lib directory.

All things being equal (and they very rarely are) then wxDevCpp should now be in a position to use your newly created libraries.

You might want to copy the contents of wxWidgets\docs\htmlhelp to wxDevCpp\help, and then see where other interesting directories should go (art, locale).

Option 2:

A tutorial about this is available here

Creating a DevPak is reasonably straightforward, but I did get annoyed making my own for a very simple reason, not all tar programs are created equally. So without further ado, I suggest you download PackMaker from http://sourceforge.net/project/showfile ... _id=310363 or search on the DevCpp resources for it. You install it just as you would any other DevPak.

Once installed, from Explorer, go to your wxDevCpp directory, double click on PackMaker.exe.

You are asked if you want to "create a new package" or "open an existing package". Go for a new one.

In the screen presented give your devpak a name (wxWidgets-2.5.5 sounds cool) and save it in your wxWidgets root map. In the screen presented give it in:

Setup Info
name: wxWidgets
name and version: wxWidgets version 2.5.5
version: 2.5.5


Optional Info
Description: Standard wxWidgets files no contribs
URL: http://www.wxwidgets.org
ReadMe file: Browse to the readme.txt file in the wxWidgets root
License file: Browse to the license.txt file in the wxWidgets root

Ignore the rest.


Start menu Icons
Not interested.


Files/Directories to install
Click on Add Directory,
for Source, use the browse button and browse to docs\htmlhelp click on OK.
for destination <app>\help\ (don't forget the trailing \
Click on OK

Click on Add Directory,
for Source, use the browse button and browse to include click on OK.
for destination <app>\include\ (don't forget the trailing \
Click on OK

Click on Add Directory,
for Source, use the browse button and browse to lib\gcc_lib click on OK.
for destination <app>\lib\ (don't forget the trailing \
Click on OK

Click on Add Directory,
for Source, use the browse button and browse to art click on OK.
for destination <app>\wx\art\ (don't forget the trailing \
Click on OK

Click on Add Directory,
for Source, use the browse button and browse to locale click on OK.
for destination <app>\wx\locale\ (don't forget the trailing \
Click on OK

Once ready, save the file (click on the yellow disk - or for the colour impaired - the left one) and then click on the "Build Package" toolbar button (the one next to the smiley)

All things being well, it should build a devpak for you. Now using the Package manager from wxDevCpp uninstall the wxWidgets 2.5.4 devpak, and install your new shiney version.

Sit back and enjoy your work.


Option 3:

Mine's a Southern Comfort, straight up, don't poison me with ice.
Last edited by NinjaNL on Tue Oct 30, 2007 7:06 pm, edited 2 times in total.
Follow the development of my screenplay authoring program at http://wxscreenplaywriter.blogspot.com/
NinjaNL
Moderator
Moderator
Posts: 899
Joined: Sun Oct 03, 2004 10:33 am
Location: Oosterwolde, Netherlands

Post by NinjaNL »

A version of this tutorial (with pictures) is available on SourceForge now.

https://sourceforge.net/docman/display_ ... p_id=95606
Follow the development of my screenplay authoring program at http://wxscreenplaywriter.blogspot.com/
NinjaNL
Moderator
Moderator
Posts: 899
Joined: Sun Oct 03, 2004 10:33 am
Location: Oosterwolde, Netherlands

Contrib devpak

Post by NinjaNL »

If you wish to create the contrib devpak as well as the basic devpak, change the previously created batch file into this one.

Code: Select all

set WXWIN=c:\\wxWidgets
path=c:\\Dev-Cpp\\bin;%path%

mingw32-make -f makefile.gcc BUILD=release MONOLITHIC=1 USE_OPENGL=1 USE_XRC=1 USE_ODBC=1 RUNTIME_LIBS=static USE_RTTI=0 USE_EXCEPTIONS=1 

cd ..\\..\\contrib\\build\\animate

mingw32-make -f makefile.gcc BUILD=release MONOLITHIC=1 USE_OPENGL=1 USE_XRC=1 USE_ODBC=1 RUNTIME_LIBS=static USE_RTTI=0 USE_EXCEPTIONS=1

cd ..\\deprecated
mingw32-make -f makefile.gcc BUILD=release MONOLITHIC=1 USE_OPENGL=1 USE_XRC=1 USE_ODBC=1 RUNTIME_LIBS=static USE_RTTI=0 USE_EXCEPTIONS=1

cd ..\\fl
mingw32-make -f makefile.gcc BUILD=release MONOLITHIC=1 USE_OPENGL=1 USE_XRC=1 USE_ODBC=1 RUNTIME_LIBS=static USE_RTTI=0 USE_EXCEPTIONS=1

cd ..\\foldbar
mingw32-make -f makefile.gcc BUILD=release MONOLITHIC=1 USE_OPENGL=1 USE_XRC=1 USE_ODBC=1 RUNTIME_LIBS=static USE_RTTI=0 USE_EXCEPTIONS=1

cd ..\\gizmos
mingw32-make -f makefile.gcc BUILD=release MONOLITHIC=1 USE_OPENGL=1 USE_XRC=1 USE_ODBC=1 RUNTIME_LIBS=static USE_RTTI=0 USE_EXCEPTIONS=1

cd ..\\mmedia
mingw32-make -f makefile.gcc BUILD=release MONOLITHIC=1 USE_OPENGL=1 USE_XRC=1 USE_ODBC=1 RUNTIME_LIBS=static USE_RTTI=0 USE_EXCEPTIONS=1

cd ..\\net
mingw32-make -f makefile.gcc BUILD=release MONOLITHIC=1 USE_OPENGL=1 USE_XRC=1 USE_ODBC=1 RUNTIME_LIBS=static USE_RTTI=0 USE_EXCEPTIONS=1

cd ..\\ogl
mingw32-make -f makefile.gcc BUILD=release MONOLITHIC=1 USE_OPENGL=1 USE_XRC=1 USE_ODBC=1 RUNTIME_LIBS=static USE_RTTI=0 USE_EXCEPTIONS=1

cd ..\\plot
mingw32-make -f makefile.gcc BUILD=release MONOLITHIC=1 USE_OPENGL=1 USE_XRC=1 USE_ODBC=1 RUNTIME_LIBS=static USE_RTTI=0 USE_EXCEPTIONS=1

cd ..\\stc
mingw32-make -f makefile.gcc BUILD=release MONOLITHIC=1 USE_OPENGL=1 USE_XRC=1 USE_ODBC=1 RUNTIME_LIBS=static USE_RTTI=0 USE_EXCEPTIONS=1

cd ..\\svg
mingw32-make -f makefile.gcc BUILD=release MONOLITHIC=1 USE_OPENGL=1 USE_XRC=1 USE_ODBC=1 RUNTIME_LIBS=static USE_RTTI=0 USE_EXCEPTIONS=1


pause
Search the makefile.gcc files (for example wxWidgets\contrib\build\animate\makefile.gcc)for the text ..\..\..\lib and replace it with ..\..\lib

Create a folder gcc_lib in the wxWidgets\contrib\lib folder

Run the batch file.

Then create your devpak as explained previously, pointing the pack creator to the correct folders.
Follow the development of my screenplay authoring program at http://wxscreenplaywriter.blogspot.com/
KE5QDA
In need of some credit
In need of some credit
Posts: 2
Joined: Wed Aug 15, 2012 3:55 pm

Re: Using wxDevCpp to create a DevPak for wxDevCpp - How To.

Post by KE5QDA »

Here is my "Install.bat" file as copied from your post and modified for my wxWidgets:

set WXWIN=c:\wxWidgets-2.6.4
set path=c:\Dev-Cpp\bin;%path%

mingw32-make -f makefile.gcc BUILD=release MONOLITHIC=1 USE_OPENGL=1 RUNTIME_LIBS=static USE_RTTI=0 USE_EXCEPTIONS=1

pause

Here are the errors I get and don't understand. I've never compiled anything before and this is all new to me:

/usr/bin/sh: -c: line 1: syntax error: unexpected end of file
mingw-32make: [gcc_msw] Error 1 ignored
if not exist ..\..\lib\gcc_lib mkdir ..\..\lib\gcc_lib
/usr/bin/sh: -c: line 1: syntax error: unexpected end of file
mingw32-make: *** [..\..\lib\gcc_lib] error 1

Any help would be appreciated!!

Ron
KE5QDA
In need of some credit
In need of some credit
Posts: 2
Joined: Wed Aug 15, 2012 3:55 pm

Re: The Answer IS!

Post by KE5QDA »

All I needed to do was go to 'Tools'> Updates > Packages >

WxWidgets was installed as a package on my wxDevCpp automatically and I didn't have to compile anything!

Ron :oops:
Post Reply