racket/src/worksp-vc70
Matthew Flatt fbc091dab6 /Oy- for MzScheme build
svn: r2153
2006-02-07 16:30:29 +00:00
..
extradlls removed msvcr71 2006-01-13 06:46:20 +00:00
gc2 fixed make.ss to deal with worksp-vc07 split 2005-07-19 15:17:47 +00:00
jpeg Creating the worksp directory for DevStudio 7.0 2005-07-05 20:49:44 +00:00
libmred Creating the worksp directory for DevStudio 7.0 2005-07-05 20:49:44 +00:00
libmysterx Creating the worksp directory for DevStudio 7.0 2005-07-05 20:49:44 +00:00
libmzgc delay-load non-system DLLs in MzScheme and MrEd executables 2006-01-02 23:09:25 +00:00
libmzsch /Oy- for MzScheme build 2006-02-07 16:30:29 +00:00
mred removed pltgdi 2006-01-13 06:39:48 +00:00
mrstart Creating the worksp directory for DevStudio 7.0 2005-07-05 20:49:44 +00:00
mzcom 2005->2006 2005-12-26 20:45:10 +00:00
mzscheme delay-load non-system DLLs in MzScheme and MrEd executables 2006-01-02 23:09:25 +00:00
mzstart Creating the worksp directory for DevStudio 7.0 2005-07-05 20:49:44 +00:00
png Creating the worksp directory for DevStudio 7.0 2005-07-05 20:49:44 +00:00
starters Creating the worksp directory for DevStudio 7.0 2005-07-05 20:49:44 +00:00
wxme Creating the worksp directory for DevStudio 7.0 2005-07-05 20:49:44 +00:00
wxs Creating the worksp directory for DevStudio 7.0 2005-07-05 20:49:44 +00:00
wxutils Creating the worksp directory for DevStudio 7.0 2005-07-05 20:49:44 +00:00
wxwin Creating the worksp directory for DevStudio 7.0 2005-07-05 20:49:44 +00:00
zlib Creating the worksp directory for DevStudio 7.0 2005-07-05 20:49:44 +00:00
mzconfig.h configure test for getaddrinfo, use gethostbyname when getaddrinfo is not available 2005-12-31 02:21:47 +00:00
README removed pltgdi 2006-01-13 06:39:48 +00:00

This directory contains 

 - solution files and project files for building MzScheme and
    MrEd with Microsoft Visual Studio (which work with the .NET
    and Express 2005 versions of Visual Studio);

 - mzconfig.h which is a manual version of information that is
    gathered automatically when using the "configure" script.

If you have downloaded MzCOM, the directory also contains Visual
Studio files for MzCOM.

Visual Studio Express is available for free from Microsoft, and it is
the recommended compiler for building PLT Scheme.

MzScheme and MrEd also compile with Cygwin gcc (a free compiler from
GNU and Cygnus Solutions), but the result is a Unix-style
installation, not a Window-style installation. To compile with gcc,
follow the instructions in plt\src\README (there is a short
Windows-specific section in that file).

With an MSVC-built MzScheme, compatible extensions can be built with
other compilers. Build with Cygwin and copy the installed plt\lib\gcc
to a MSVC-based build to support Cygwin-built extensions. To support
Borland-built extensions, cd to plt\src\mzscheme\dynsrc and run
mkbordyn.bat (which requires bcc23.exe, of course).

As always, please report bugs via one of the following:
  - Help Desk's "submit bug report" link  (preferred)
  - http://bugs.plt-scheme.org/
  - bugs@plt-scheme.org                   (last resort)

-PLT
 scheme@plt-scheme.org

----------------------------------------------------------------------
Building MzScheme, MzCOM, and MrEd
----------------------------------------------------------------------

The source code for MzScheme, MzCOM, and MrEd is split into several
projects that are grouped into a few solutions. To make the `X'
solution with Visual Studio, open the file plt\src\worksp\X\X.sln.
[When you open a solution, the selected configuration will most likely
be "Debug". Consider changing to "Release" before you build to enable
optimization.]

To build MzScheme, make the MzScheme solution in
   plt\src\worksp\mzscheme - makes plt\mzscheme.exe

To build MzCOM, make the MzCOM solution in
   plt\src\worksp\mzcom - makes plt\collects\mzcom\mzcom.exe

To build MrEd, make the MrEd solution:
   plt\src\worksp\mred - makes plt\mred.exe

The make processes for MzScheme and MzCOM automatically build
   libmzgc - makes plt\libmzgcxxxxxxx.dll and
             plt\src\worksp\libmzgc\Release\libmzgcxxxxxxx.lib
   mzsrc - makes plt\libmzschxxxxxxx.dll and
                 plt\src\worksp\mzsrc\Release\mzsrcxxxxxxx.lib

The make process for MrEd automatically builds
   libmzgc - as above
   libmzsch - as above
   libmred - makes plt\libmredxxxxxxx.dll and
                   plt\src\worksp\libmred\Release\libmredxxxxxxx.lib
   wxutils - makes plt\src\worksp\wxutils\Release\wxutils.lib
   wxwin - makes plt\src\worksp\wxwin\Release\wxwin.lib
   wxs  - makes plt\src\worksp\wxs\Release\wxs.lib
   wxme  - makes plt\src\worksp\wxme\Release\wxme.lib
   jpeg  - makes plt\src\worksp\jpeg\Release\jpeg.lib
   png  - makes plt\src\worksp\jpeg\Release\png.lib
   zlib  - makes plt\src\worksp\jpeg\Release\zlib.lib

In addition, building MzScheme executes
   plt\src\mzscheme\dynsrc\mkmzdyn.bat
which copies .exp, .obj, and .lib files into plt\lib\, and also copies
DLLs from the extradlls directory to to plt\.  uniplt_xxxxxxx.dll is
used only under Windows 95/98/Me for Unicode.

To complete a build, run the versioning script described in the next
section.

----------------------------------------------------------------------
Versioning
----------------------------------------------------------------------

The obnoxious "xxxxxxx" in the DLL names is a placeholder for a
version number. Embedding a version number in a DLL name appears to
be the simplest and surest way to avoid version confusion.

For local testing, you can use the "xxxxxxx" libraries directly. For
any binaries that will be distributed, however, the placeholder should
be replaced with a specific version.

To replace the "xxxxxxx" with a specific version, run

  mzscheme -mvqL winvers.ss setup

in a shell. The "winvers.ss" program will have to make a temporary
copy of mzscheme.exe, libmzschxxxxxxx.dll, and libmzgcxxxxxxx.dll (in
the temporary directory), and it will re-launch MzScheme a couple of
times. The resulting conversions are
  plt\mzscheme.exe -> plt\mzscheme.exe (updated)
  plt\mred.exe -> plt\mred.exe         (updated)
  plt\mzcom.exe -> plt\mzcom.exe       (updated)
  plt\libmzgcxxxxxxx.dll -> plt\libmzgc<version>.dll
  plt\libmzschxxxxxxx.dll -> plt\libmzsch<version>.dll
  plt\libmredxxxxxxx.dll -> plt\libmred<version>.dll
  plt\src\worksp\libmzsch\Release\libmzschxxxxxxx.lib
                          -> plt\lib\win32\msvc\libmzsch<version>.lib
  plt\src\worksp\libmzgc\Release\libmzgcxxxxxxx.lib
                          -> plt\lib\win32\msvc\libmzgc<version>.lib
  plt\uniplt_xxxxxxx.dll -> plt\uniplt_<version>.dll

----------------------------------------------------------------------
Extra stuff for MzScheme and MrEd
----------------------------------------------------------------------

If you're building from scratch, you'll also want the starter
programs used by the launcher collection to make drscheme.exe
and mzc.exe:

   mzstart - makes plt\collects\launcher\mzstart.exe
   mrstart - makes plt\collects\launcher\mrstart.exe

Then, set up all the other executables (besides mred.exe
and mzscheme.exe) by running

   mzscheme.exe -mvqM- setup

(This makes the .zo files, too. To skip compiling .zos, 
add -n to the end of the above command.)

----------------------------------------------------------------------
Embedding MzScheme
----------------------------------------------------------------------

The MzScheme DLLs can be used within an embedding application.

The libraries

    plt\src\worksp\libmzsch\Release\libmzschxxxxxxx.lib
    plt\src\worksp\libmzgc\Release\libmzgcxxxxxxx.lib

which are created by the mzsrc and gc projects, provide linking
information for using the libmzschxxxxxxx.dll and libmzgcxxxxxxx.dll
DLLs. The versioning script adjusts the names and puts them in
    plt\lib\msvc\libmzsch<version>.lib
    plt\lib\msvc\libmzgc<version>.lib

See the "Inside PLT MzScheme" manual for more information about using
these libraries to embed MzScheme in an application.


If you need MzScheme to link to a DLL-based C library (instead of
statically linking to the C library within the MzScheme DLL), then:
 
 1. Compile MzScheme with the /MD flag.

 2. Define the pre-processor symbol USE_MSVC_MD_LIBRARY while
    compiling the GC with /MD.

 3. In your embedding application, call GC_pre_init() before calling
    any MzScheme and GC function.