PageRenderTime 58ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/docs/gem.pg-0.13.1/files/README-Windows_rdoc.html

https://github.com/toy/rb
HTML | 139 lines | 114 code | 25 blank | 0 comment | 0 complexity | a7e4c27460942757de8fbedc7eabd357 MD5 | raw file
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  5. <head>
  6. <title>README-Windows.rdoc</title>
  7. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  8. <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" />
  9. <link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" />
  10. <script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
  11. <script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
  12. <script src="../js/main.js" type="text/javascript" charset="utf-8"></script>
  13. </head>
  14. <body>
  15. <div class="banner">
  16. <h1>
  17. README-Windows.rdoc
  18. </h1>
  19. <ul class="files">
  20. <li>README-Windows.rdoc</li>
  21. <li>Last modified: Mon Feb 13 07:34:43 +0100 2012</li>
  22. </ul>
  23. </div>
  24. <div id="bodyContent">
  25. <div id="content">
  26. <div class="description">
  27. <h1>Compiling &#8216;pg&#8217; on MS Windows</h1>
  28. <p>
  29. In order to build this extension on MS Windows you will need a couple
  30. things.
  31. </p>
  32. <p>
  33. First, a compiler. For the one click installer this means you should either
  34. use VC++ 6.0 or the compiler that comes with cygwin or mingw if
  35. you&#8217;re building on that platform.
  36. </p>
  37. <p>
  38. If you&#8217;ve built Ruby yourself, you should use the same compiler to
  39. build this library that you used to build Ruby.
  40. </p>
  41. <p>
  42. Second, PostgreSQL. Be sure you installed it with the development header
  43. files if you installed it using the standard PostgreSQL installer for
  44. Windows. If you didn&#8217;t, you can run the installer again, select
  45. &#8220;modify&#8221;, and then select the &#8216;development headers&#8217;
  46. option to install them.
  47. </p>
  48. <p>
  49. I recommend making sure that &#8216;pg_config.exe&#8217; is in your PATH.
  50. The PostgreSQL installer for Windows does not necessarily update your PATH
  51. when it installs itself, so you may need to do this manually. This
  52. isn&#8217;t strictly necessary, however.
  53. </p>
  54. <p>
  55. In order to build ruby-pg, just run &#8216;rake&#8217;. If the
  56. pg_config.exe executable is not in your PATH, you&#8217;ll need to
  57. explicitly point ruby-pg to where your PostgreSQL headers and libraries are
  58. with something like this:
  59. </p>
  60. <pre>
  61. rake --with-pg-dir=c:/progra~1/postgr~1/8.3
  62. </pre>
  63. <p>
  64. Adjust your path accordingly. BE SURE TO USE THE SHORT PATH NAMES! If you
  65. try to use a path with spaces in it, the nmake.exe program will choke.
  66. </p>
  67. <h2>Cross compiling for mswin32</h2>
  68. <p>
  69. Using rake-compiler a cross compiled pg gem can be build on a Linux or
  70. MacOS X host for the win32 platform. The generated gem is statically linked
  71. against libpq and libssl. OpenSSL and PostgreSQL are downloaded and
  72. compiled from the sources. There are no runtime dependencies to any but the
  73. standard Windows DLLs.
  74. </p>
  75. <p>
  76. Install mingw32 using the instructions in rake-compiler&#8217;s README. For
  77. Debian/Ubuntu it is <tt>apt-get install gcc-mingw32</tt> . Use ruby-1.8.7
  78. for the following commands.
  79. </p>
  80. <p>
  81. Download and cross compile ruby 1.8 and 1.9 for win32 with:
  82. </p>
  83. <pre>
  84. rake-compiler cross-ruby VERSION=1.8.7-p352
  85. rake-compiler cross-ruby VERSION=1.9.2-p290
  86. </pre>
  87. <p>
  88. Download and cross compile pg for win32:
  89. </p>
  90. <pre>
  91. rake cross native gem
  92. </pre>
  93. <p>
  94. or with custom versions:
  95. </p>
  96. <pre>
  97. rake cross native gem RUBY_CC_VERSION=1.8.7:1.9.2 \
  98. OPENSSL_VERSION=1.0.0e POSTGRESQL_VERSION=9.1.1
  99. </pre>
  100. <p>
  101. If everything works, there should be pg-VERSION-x86-mingw32.gem in the pkg
  102. directory.
  103. </p>
  104. <h2>Reporting Problems</h2>
  105. <p>
  106. If you have any problems you can submit them via [the project&#8217;s
  107. issue-tracker][bitbucket]. And submit questions, problems, or solutions, so
  108. that it can be improved.
  109. </p>
  110. </div>
  111. </div>
  112. </div>
  113. </body>
  114. </html>