/docs/gem.pg-0.13.1/files/README-Windows_rdoc.html
HTML | 139 lines | 114 code | 25 blank | 0 comment | 0 complexity | a7e4c27460942757de8fbedc7eabd357 MD5 | raw file
- <?xml version="1.0" encoding="utf-8"?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <title>README-Windows.rdoc</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" />
- <link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" />
- <script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
- <script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
- <script src="../js/main.js" type="text/javascript" charset="utf-8"></script>
- </head>
- <body>
- <div class="banner">
- <h1>
- README-Windows.rdoc
- </h1>
- <ul class="files">
- <li>README-Windows.rdoc</li>
- <li>Last modified: Mon Feb 13 07:34:43 +0100 2012</li>
- </ul>
- </div>
- <div id="bodyContent">
- <div id="content">
-
- <div class="description">
- <h1>Compiling ‘pg’ on MS Windows</h1>
- <p>
- In order to build this extension on MS Windows you will need a couple
- things.
- </p>
- <p>
- First, a compiler. For the one click installer this means you should either
- use VC++ 6.0 or the compiler that comes with cygwin or mingw if
- you’re building on that platform.
- </p>
- <p>
- If you’ve built Ruby yourself, you should use the same compiler to
- build this library that you used to build Ruby.
- </p>
- <p>
- Second, PostgreSQL. Be sure you installed it with the development header
- files if you installed it using the standard PostgreSQL installer for
- Windows. If you didn’t, you can run the installer again, select
- “modify”, and then select the ‘development headers’
- option to install them.
- </p>
- <p>
- I recommend making sure that ‘pg_config.exe’ is in your PATH.
- The PostgreSQL installer for Windows does not necessarily update your PATH
- when it installs itself, so you may need to do this manually. This
- isn’t strictly necessary, however.
- </p>
- <p>
- In order to build ruby-pg, just run ‘rake’. If the
- pg_config.exe executable is not in your PATH, you’ll need to
- explicitly point ruby-pg to where your PostgreSQL headers and libraries are
- with something like this:
- </p>
- <pre>
- rake --with-pg-dir=c:/progra~1/postgr~1/8.3
- </pre>
- <p>
- Adjust your path accordingly. BE SURE TO USE THE SHORT PATH NAMES! If you
- try to use a path with spaces in it, the nmake.exe program will choke.
- </p>
- <h2>Cross compiling for mswin32</h2>
- <p>
- Using rake-compiler a cross compiled pg gem can be build on a Linux or
- MacOS X host for the win32 platform. The generated gem is statically linked
- against libpq and libssl. OpenSSL and PostgreSQL are downloaded and
- compiled from the sources. There are no runtime dependencies to any but the
- standard Windows DLLs.
- </p>
- <p>
- Install mingw32 using the instructions in rake-compiler’s README. For
- Debian/Ubuntu it is <tt>apt-get install gcc-mingw32</tt> . Use ruby-1.8.7
- for the following commands.
- </p>
- <p>
- Download and cross compile ruby 1.8 and 1.9 for win32 with:
- </p>
- <pre>
- rake-compiler cross-ruby VERSION=1.8.7-p352
- rake-compiler cross-ruby VERSION=1.9.2-p290
- </pre>
- <p>
- Download and cross compile pg for win32:
- </p>
- <pre>
- rake cross native gem
- </pre>
- <p>
- or with custom versions:
- </p>
- <pre>
- rake cross native gem RUBY_CC_VERSION=1.8.7:1.9.2 \
- OPENSSL_VERSION=1.0.0e POSTGRESQL_VERSION=9.1.1
- </pre>
- <p>
- If everything works, there should be pg-VERSION-x86-mingw32.gem in the pkg
- directory.
- </p>
- <h2>Reporting Problems</h2>
- <p>
- If you have any problems you can submit them via [the project’s
- issue-tracker][bitbucket]. And submit questions, problems, or solutions, so
- that it can be improved.
- </p>
- </div>
-
-
-
-
-
-
-
-
-
-
-
-
- </div>
- </div>
- </body>
- </html>