--- /dev/null
+------------------------------------------------------------------------\r
+ How to build the sources from SVN\r
+------------------------------------------------------------------------\r
+\r
+Please use the install.txt files in docs/gtk, docs/msw, docs/motif, docs/mac\r
+etc. alongside these instructions.\r
+\r
+I) Windows using plain makefiles\r
+----------------------------------------\r
+\r
+a) If using Microsoft Visual C++ 5.0 or 6.0\r
+\r
+Ensure that the command-line compiler and tools (including\r
+nmake) are installed and ready to run. Depending on your\r
+installation there may be a batch file (commonly named VCVARS32.BAT)\r
+that needs to be run to set correct environment variables and PATH entries.\r
+\r
+Continue with item c) below.\r
+\r
+\r
+b) If using the MinGW or Cygwin compilers\r
+\r
+You can get MinGW from http://www.mingw.org/\r
+\r
+Cygwin is available at http://www.cygwin.com/\r
+\r
+If you are using Cygwin or MinGW together with the MSYS environment, you\r
+can build the library using configure (see "Unix ports" and\r
+"Windows using configure" below). You can also\r
+build wxWidgets without configure using native makefile, but only with\r
+MinGW. Using Cygwin together with Windows makefile is no longer supported.\r
+\r
+If building with MinGW without configure:\r
+\r
+-> Set your path so that it includes the directory\r
+ where your compiler and tools reside\r
+\r
+-> Make sure you have GNU Make installed. It must be Windows native version.\r
+ Download it from http://www.mingw.org, the executable will be called\r
+ mingw32-make.exe.\r
+\r
+-> Modern version of MinGW is required; preferably MinGW 2.0 (with gcc3),\r
+ but MinGW with gcc-2.95.3 will suffice. If you are using 2.95, you will\r
+ have to change variable GCC_VERSION in config.gcc (see msw/install.txt\r
+ for details).\r
+\r
+If using configure, Unix instructions apply.\r
+\r
+\r
+c) Build instructions\r
+\r
+Assumming that you installed the wxWidgets sources\r
+into c:\wxWidgets:\r
+\r
+-> Copy c:\wxWidgets\include\wx\msw\setup0.h\r
+ to c:\wxWidgets\include\wx\msw\setup.h\r
+-> Edit c:\wxWidgets\include\wx\msw\setup.h to choose\r
+ the features you would like to compile wxWidgets with[out].\r
+\r
+ and std iostreams are disabled with\r
+ #define wxUSE_STD_IOSTREAM 0\r
+ \r
+-> type: cd c:\wxWidgets\build\msw\r
+-> type: make -f makefile.gcc (if using GNU tools)\r
+or type: nmake -f makefile.vc (if using MS VC++)\r
+etc.\r
+\r
+ See also docs/msw/install.txt for additional compilation options.\r
+\r
+d) Borland (including free command line tools)\r
+ Download tools from http://www.borland.com/downloads/\r
+ \r
+ See docs/msw/install.txt for details; in brief:\r
+\r
+-> type cd c:\wxWidgets\build\msw\r
+-> type make -f makefile.bcc\r
+\r
+You can customize many things in the build process, detailed description is\r
+in docs/msw/install.txt.\r
+\r
+\r
+II) Unix ports\r
+--------------\r
+\r
+Building wxGTK or wxMotif completely without configure\r
+won't ever work, but there is now a new makefile system\r
+that works without libtool and automake, using only\r
+configure to create what is needed.\r
+\r
+In order to create configure, you need to have the\r
+GNU autoconf package (version > 2.54) installed\r
+on your system and type run "autoconf" in the base\r
+directory (or run the autogen.sh script in the same\r
+directory, which just calls autoconf). Note that you usually don't\r
+need to do this because configure is included in SVN.\r
+\r
+Set WXWIN environment variable to the base directory such\r
+as ~/wxWidgets (this is actually not really needed).\r
+\r
+-> type: export WXWIN=~/wxWidgets\r
+-> type: md mybuild\r
+-> type: cd mybuild\r
+-> type: ../configure --with-motif\r
+or type: ../configure --with-gtk\r
+-> type: make\r
+-> type: su <type root password>\r
+-> type: make install\r
+-> type: ldconfig\r
+-> type: exit\r
+\r
+Call configure with --disable-shared to create a static\r
+library. Calling "make uninstall" will remove the installed\r
+library and "make dist" will create a distribution (not\r
+yet complete).\r
+\r
+III) Windows using configure\r
+----------------------------------------\r
+\r
+wxWidgets can be built on Windows using MSYS (see\r
+http://www.mingw.org/), which is a POSIX build environment\r
+for Windows. With MSYS you can just ./configure && make (see also VII,\r
+Unix->Windows cross-compiling using configure).\r
+\r
+Of course, you can also build the library using plain makefiles (see\r
+section I).\r
+\r
+IV) Classic MacOS using CodeWarrior (eg MacOS 8.x/9.x)\r
+----------------------------------------\r
+\r
+Refer to the readme.txt and install.txt files in docs/mac to build\r
+wxWidgets under Classic Mac OS using CodeWarrior.\r
+\r
+If you are checking out the SVN sources using svn under Mac OS X and\r
+compiling under Classic Mac OS:\r
+\r
+- make sure that all text files have a Mac OS type of 'TEXT' otherwise\r
+ CodeWarrior may ignore them. Checking out the SVN sources using svn\r
+ under Mac OS X creates untyped files which can lead to compilation\r
+ errors under CodeWarrior which are hard to track down.\r
+\r
+- convert the xml files to CodeWarrior binary projects using the supplied\r
+ AppleScript in docs/mac (M5xml2mcp.applescript for CodeWarrior 5.3)\r
+\r
+V) MacOS X using configure and the Developer Tools\r
+----------------------------------------\r
+\r
+You need to have the Developer Tools installed. If this is not the case,\r
+you will need to register at the Apple Developer web site (this is a free\r
+registration) in order to download the Developer Tools installer.\r
+\r
+In order to create configure, you need to have the\r
+GNU autoconf package (version >= 2.54) installed\r
+on your system and type run "autoconf" in the base\r
+directory (or run the autogen.sh script in the same\r
+directory, which just calls autoconf).\r
+\r
+-> type: mkdir macbuild\r
+-> type: cd macbuild\r
+-> type: ../configure --with-mac\r
+or type: ../configure\r
+-> type: make\r
+\r
+VI) OS/2\r
+----------------------------------------\r
+No notes.\r
+\r
+VII) Unix->Windows cross-compiling using configure\r
+--------------------------------------------------\r
+\r
+First you'll need a cross-compiler; linux glibc binaries of MinGW and\r
+Cygwin (both based on egcs) can be found at\r
+ftp://ftp.objsw.com/pub/crossgcc/linux-x-win32. Alternative binaries,\r
+based on the latest MinGW release can be found at\r
+http://members.telering.at/jessich/mingw/mingwcross/mingw_cross.html\r
+Otherwise you can compile one yourself.\r
+\r
+[ A Note about Cygwin and MinGW: the main difference is that Cygwin\r
+binaries are always linked against cygwin.dll. This dll encapsulates most\r
+standard Unix C extensions, which is very handy if you're porting unix\r
+software to windows. However, wxMSW doesn't need this, so MinGW is\r
+preferable if you write portable C(++). ]\r
+\r
+You might want to build both Unix and Windows binaries in the same source\r
+tree; to do this make subdirs for each e.g. unix and win32. If you've\r
+already build wxWidgets in the main dir, do a 'make distclean' there,\r
+otherwise configure will get confused. (In any case, read the section 'Unix\r
+using configure' and make sure you're able to build a native wxWidgets\r
+library; cross-compiling errors can be pretty obscure and you'll want to be\r
+sure that your configure setup is basically sound.)\r
+\r
+To cross compile the windows library, do\r
+-> cd win32\r
+(or whatever you called it)\r
+Now run configure. There are two ways to do this\r
+-> ../configure --host=i586-mingw32 --build=i586-linux --with-mingw\r
+where --build= should read whatever platform you're building on. Configure\r
+will notice that build and host platforms differ, and automatically prepend\r
+i586-mingw32- to gcc, ar, ld, etc (make sure they're in the PATH!).\r
+The other way to run configure is by specifying the names of the binaries\r
+yourself:\r
+-> CC=i586-mingw32-gcc CXX=i586-mingw32-g++ RANLIB=i586-mingw32-ranlib \\r
+ DLLTOOL=i586-mingw32-dlltool LD=i586-mingw32-ld NM=i586-mingw32-nm \\r
+ ../configure --host=i586-mingw32 --with-mingw\r
+\r
+(all assuming you're using MinGW)\r
+By default this will compile a DLL, if you want a static library,\r
+specify --disable-shared.\r
+\r
+Type\r
+-> make\r
+and wait, wait, wait. Don't leave the room, because the minute you do there\r
+will be a compile error :-)\r
+\r
+NB: if you are using a very old compiler you risk to get quite a few warnings\r
+ about "ANSI C++ forbids implicit conversion from 'void *'" in all places\r
+ where va_arg macro is used. This is due to a bug in (some versions of)\r
+ MinGW headers which may be corrected by upgrading your compier,\r
+ otherwise you might edit the file\r
+\r
+ ${install_prefix}/lib/gcc-lib/i586-mingw32/egcs-2.91.57/include/stdarg.h\r
+\r
+ (instead of egcs-2.91.57 you may have something different), searching for\r
+ the lines\r
+\r
+/* Define __gnuc_va_list. */\r
+\r
+#ifndef __GNUC_VA_LIST\r
+#define __GNUC_VA_LIST\r
+#if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX) || defined(__NetBSD__)\r
+typedef char *__gnuc_va_list;\r
+#else\r
+typedef void *__gnuc_va_list;\r
+#endif\r
+#endif\r
+\r
+ and adding "|| defined(_WIN32)" to the list of platforms on which\r
+ __gnuc_va_list is char *.\r
+\r
+If this is successful, you end up with a wx23_2.dll/libwx23_2.a in win32/lib\r
+(or just libwx_msw.a if you opted for a static build).\r
+Now try building the minimal sample:\r
+\r
+-> cd samples/minimal\r
+-> make\r
+\r
+and run it with wine, for example (or copy to a Windows box)\r
+-> wine minimal.exe\r
+\r
+If all is well, do an install; from win32\r
+-> make install\r
+\r
+Native and cross-compiled installations can co-exist peacefully\r
+(as long as their widget sets differ), except for wx-config. You might\r
+want to rename the cross-compiled one to i586-mingw32-wx-config, or something.\r
+\r
+Cross-compiling TODO:\r
+---------------------\r
+- resource compiling must be done manually for now (should/can we link the\r
+default wx resources into libwx_msw.a?) [ No we can't; the linker won't\r
+link it in... you have to supply an object file ]\r
+- static executables are HUGE -- there must be room for improvement.\r
+\r